diff --git a/.config/eslint.ci.js b/.config/eslint.ci.js deleted file mode 100644 index c7bbe2f9..00000000 --- a/.config/eslint.ci.js +++ /dev/null @@ -1,30 +0,0 @@ -const baseConfig = require('./eslint.cjs') - -module.exports = { - ...baseConfig, - overrides: [ - baseConfig.overrides[0], - { - ...baseConfig.overrides[0], - files: ['packages/**/*.ts'], - extends: ['plugin:@typescript-eslint/strict-type-checked', 'plugin:import/typescript'], - parser: '@typescript-eslint/parser', - parserOptions: { - project: true, - tsconfigRootDir: __dirname, - }, - rules: { - ...baseConfig.overrides[0].rules, - '@typescript-eslint/restrict-template-expressions': ['error', { allowNever: true }], - }, - reportUnusedDisableDirectives: false, - }, - ...baseConfig.overrides.slice(1), - { - files: ['e2e/**'], - rules: { - 'import/no-unresolved': 'off', - }, - }, - ], -} diff --git a/.config/eslint.cjs b/.config/eslint.cjs deleted file mode 100644 index 02b8bd5b..00000000 --- a/.config/eslint.cjs +++ /dev/null @@ -1,301 +0,0 @@ -module.exports = { - env: { - browser: true, - es2021: true, - node: true, - }, - extends: ['eslint:recommended', 'plugin:import/recommended', 'prettier'], - parserOptions: { - ecmaVersion: 'latest', - sourceType: 'module', - }, - plugins: ['ascii', 'import', 'simple-import-sort'], - reportUnusedDisableDirectives: true, - rules: { - // see https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/style.js#L122 - indent: [ - 2, - 4, - { - SwitchCase: 1, - VariableDeclarator: 1, - outerIIFEBody: 1, - // MemberExpression: null, - FunctionDeclaration: { - parameters: 1, - body: 1, - }, - FunctionExpression: { - parameters: 1, - body: 1, - }, - CallExpression: { - arguments: 1, - }, - ArrayExpression: 1, - ObjectExpression: 1, - ImportDeclaration: 1, - flatTernaryExpressions: false, - // list derived from https://github.com/benjamn/ast-types/blob/HEAD/def/jsx.js - ignoredNodes: [ - 'JSXElement', - 'JSXElement > *', - 'JSXAttribute', - 'JSXIdentifier', - 'JSXNamespacedName', - 'JSXMemberExpression', - 'JSXSpreadAttribute', - 'JSXExpressionContainer', - 'JSXOpeningElement', - 'JSXClosingElement', - 'JSXText', - 'JSXEmptyExpression', - 'JSXSpreadChild', - ], - ignoreComments: false, - }, - ], - - semi: [2, 'never', { beforeStatementContinuationChars: 'never' }], - 'semi-spacing': [2, { before: false, after: true }], - 'wrap-iife': [2, 'inside'], - 'no-caller': 2, - 'no-cond-assign': [2, 'except-parens'], - 'no-constant-condition': 0, - 'no-debugger': 2, - 'no-dupe-args': 2, - 'no-dupe-keys': 2, - 'no-duplicate-case': 2, - 'no-empty': [2, { allowEmptyCatch: true }], - 'no-empty-function': 'off', - 'no-extra-boolean-cast': 2, - // "no-extra-parens": [2, "all"], - 'no-extra-semi': 2, - 'no-func-assign': 2, - 'no-new': 2, - 'no-sparse-arrays': 2, - 'no-unexpected-multiline': 2, - 'no-unreachable': 2, - - 'max-params': [1, 5], - 'max-depth': [1, 4], - 'no-eq-null': 0, - 'no-unused-expressions': 0, - 'dot-notation': 2, - 'use-isnan': 2, - - // Best practices - 'block-scoped-var': 2, - complexity: [0, 11], - curly: [2, 'multi-line'], - eqeqeq: [2, 'always', { null: 'ignore' }], - 'no-else-return': 2, - 'no-extra-bind': 2, - 'no-implicit-coercion': 2, - 'no-return-assign': 0, - 'no-sequences': 2, - yoda: 2, - - // Variables - 'no-restricted-globals': ['error'], - 'no-var': 1, - - // Codestyle - 'arrow-parens': [2, 'always'], - 'array-bracket-spacing': [2, 'never'], - 'brace-style': [2, '1tbs', { allowSingleLine: true }], - camelcase: [2, { properties: 'never' }], - 'comma-dangle': ['warn', 'always-multiline'], - 'comma-spacing': [2, { before: false, after: true }], - 'eol-last': 2, - 'func-call-spacing': [2, 'never'], - 'block-spacing': 2, - 'keyword-spacing': [2, { before: true, after: true }], - 'max-len': [ - 2, - { - code: 120, - ignoreUrls: true, - ignoreComments: false, - ignoreRegExpLiterals: true, - ignoreStrings: true, - ignoreTemplateLiterals: true, - ignorePattern: 'require', - }, - ], - 'no-lonely-if': 2, - 'no-mixed-spaces-and-tabs': 2, - 'no-multi-spaces': 2, - 'no-multiple-empty-lines': [2, { max: 1, maxBOF: 0, maxEOF: 0 }], - 'no-trailing-spaces': 2, - 'ascii/valid-name': 2, - 'no-unneeded-ternary': 2, - 'no-nested-ternary': 2, - 'object-curly-spacing': [2, 'always'], - 'one-var-declaration-per-line': [2, 'initializations'], - 'one-var': [2, { let: 'never', const: 'never' }], - 'operator-linebreak': [2, 'after'], - 'padded-blocks': [2, 'never'], - 'quote-props': [2, 'as-needed', { numbers: true }], - quotes: [2, 'single', { avoidEscape: true }], - 'space-before-blocks': [2, 'always'], - 'space-before-function-paren': [ - 2, - { - named: 'never', - anonymous: 'always', - }, - ], - 'space-in-parens': 2, - 'key-spacing': [2, { beforeColon: false, afterColon: true, mode: 'strict' }], - 'space-infix-ops': 2, - 'padding-line-between-statements': [ - 'error', - { blankLine: 'always', prev: '*', next: 'return' }, - { blankLine: 'always', prev: '*', next: 'block-like' }, - { blankLine: 'any', prev: 'block-like', next: 'block-like' }, - { blankLine: 'any', prev: 'case', next: 'case' }, - ], - - 'simple-import-sort/imports': [ - 'error', - { - groups: [['^[a-z]'], ['^@?mtcute'], ['^@/'], ['^~/'], ['^\\.']], - }, - ], - 'simple-import-sort/exports': 'error', - 'import/no-relative-packages': 'error', - 'import/no-mutable-exports': 'error', - 'import/no-default-export': 'error', - 'no-console': ['error', { allow: ['warn', 'error'] }], - }, - ignorePatterns: [ - 'node_modules/', - '.config/', - '.idea/', - '.vscode/', - - 'private/', - 'docs/', - 'dist/', - - '*.json', - - // codegen - 'packages/tl/binary/rsa-keys.js', - 'packages/tl/binary/reader.js', - 'packages/tl/binary/writer.js', - 'packages/tl/index.js', - 'packages/tl/index.d.ts', - 'packages/tl/*.json', - - 'packages/client/utils.ts', - 'packages/core/utils.ts' - ], - overrides: [ - { - files: ['**/*.ts', '**/*.tsx'], - env: { browser: true, es6: true, node: true }, - extends: ['plugin:@typescript-eslint/strict', 'plugin:import/typescript'], - globals: { Atomics: 'readonly', SharedArrayBuffer: 'readonly' }, - parser: '@typescript-eslint/parser', - plugins: ['@typescript-eslint'], - rules: { - // https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#supported-rules - '@typescript-eslint/member-delimiter-style': [ - 'error', - { - multiline: { - delimiter: 'none', - }, - singleline: { - delimiter: 'semi', // because prettier - }, - }, - ], - '@typescript-eslint/consistent-type-assertions': 2, - '@typescript-eslint/no-explicit-any': 2, - '@typescript-eslint/no-unused-vars': [ - 2, - { - args: 'after-used', - argsIgnorePattern: '^_', - ignoreRestSiblings: true, - vars: 'all', - varsIgnorePattern: '^_', - }, - ], - '@typescript-eslint/no-non-null-assertion': 'off', // todo MTQ-36 - '@typescript-eslint/no-empty-function': 'off', - '@typescript-eslint/no-confusing-void-expression': 'off', - '@typescript-eslint/no-unnecessary-condition': 'off', - '@typescript-eslint/no-var-requires': 'off', - - '@typescript-eslint/no-unsafe-enum-comparison': 'off', - '@typescript-eslint/no-invalid-void-type': 'off', - '@typescript-eslint/unbound-method': 'off', - '@typescript-eslint/no-dynamic-delete': 'off', - '@typescript-eslint/no-unsafe-member-access': 'off', - 'no-restricted-globals': ['error', 'Buffer', '__dirname', 'require'], - 'no-restricted-imports': [ - 'error', - { - paths: ['buffer', 'crypto', 'fs', 'path', 'stream'], - patterns: ['@mtcute/*/dist**'], - }, - ], - }, - reportUnusedDisableDirectives: false, - settings: { - 'import/resolver': { - node: true, - typescript: true, - }, - }, - }, - { - files: ['**/scripts/**', '*.test.ts', 'packages/create-*/**', '**/build.config.cjs', 'packages/node/**'], - rules: { - 'no-console': 'off', - 'no-restricted-imports': [ - 'error', - { - patterns: ['@mtcute/*/dist**'], - }, - ], - }, - }, - { - files: ['packages/client/src/methods/**/*.ts'], - rules: { - // this + max 3 more - 'max-params': ['error', 4], - }, - }, - { - files: ['e2e/**', 'packages/node/**', 'packages/bun/**'], - rules: { - 'no-restricted-globals': 'off', - }, - }, - { - files: ['packages/bun/**', 'packages/deno/**'], - rules: { - 'import/no-unresolved': 'off', - 'no-restricted-imports': 'off', - 'import/no-relative-packages': 'off', // common-internals is symlinked from node - } - }, - { - files: ['e2e/deno/**'], - rules: { - 'import/no-unresolved': 'off', - } - }, - ], - settings: { - 'import/resolver': { - node: true, - }, - }, -} diff --git a/.config/prettier.cjs b/.config/prettier.cjs index 616469ff..59959378 100644 --- a/.config/prettier.cjs +++ b/.config/prettier.cjs @@ -27,9 +27,9 @@ module.exports = { 'packages/tl/*.json', '*.d.ts', - '**/dist' + '**/dist', ], options: { requirePragma: true }, - } + }, ], } diff --git a/.config/tsconfig.build.json b/.config/tsconfig.build.json index 24ed8f74..bd168a0e 100644 --- a/.config/tsconfig.build.json +++ b/.config/tsconfig.build.json @@ -1,8 +1,8 @@ { - "extends": "../tsconfig.json", - "exclude": [ - "../**/*.test.ts", - "../**/*.test-utils.ts", - "../**/__fixtures__/**", - ] + "extends": "../tsconfig.json", + "exclude": [ + "../**/*.test.ts", + "../**/*.test-utils.ts", + "../**/__fixtures__/**" + ] } diff --git a/.config/typedoc/config.cjs b/.config/typedoc/config.cjs index c70df48b..89b87976 100644 --- a/.config/typedoc/config.cjs +++ b/.config/typedoc/config.cjs @@ -1,5 +1,5 @@ -const fs = require('fs') -const path = require('path') +const fs = require('node:fs') +const path = require('node:path') module.exports = { ...require('./config.base.cjs'), @@ -7,8 +7,8 @@ module.exports = { out: '../../docs', entryPoints: fs .readdirSync(path.join(__dirname, '../../packages')) - .filter((it) => !['crypto', 'tl', 'create-bot'].includes(it)) - .map((it) => `../../packages/${it}`), + .filter(it => !['crypto', 'tl', 'create-bot'].includes(it)) + .map(it => `../../packages/${it}`), entryPointStrategy: 'packages', // logLevel: 'Verbose', } diff --git a/.config/typedoc/plugin-external-links.cjs b/.config/typedoc/plugin-external-links.cjs index feb58bc4..b43462db 100644 --- a/.config/typedoc/plugin-external-links.cjs +++ b/.config/typedoc/plugin-external-links.cjs @@ -1,6 +1,6 @@ function load(app) { app.converter.addUnknownSymbolResolver((declaration) => { - const symbol = declaration.symbolReference?.path?.map((path) => path.path).join('.') + const symbol = declaration.symbolReference?.path?.map(path => path.path).join('.') if (symbol === 'Long' || symbol === 'tl.Long') { return { @@ -40,7 +40,7 @@ function load(app) { } } - name = (ns ? ns + '.' : '') + name + name = (ns ? `${ns}.` : '') + name let url diff --git a/.config/typedoc/plugin-umami.cjs b/.config/typedoc/plugin-umami.cjs index add840a5..c79cbec5 100644 --- a/.config/typedoc/plugin-umami.cjs +++ b/.config/typedoc/plugin-umami.cjs @@ -7,14 +7,14 @@ const UMAMI_NOSCRIPT = `https://tei.su/zond.php?website=${WEBSITE_ID}` const { createElement: h } = JSX function load(app) { - app.renderer.hooks.on('head.end', (event) => { + app.renderer.hooks.on('head.end', () => { return h('script', { - async: true, - src: `${UMAMI_URL}/script.js`, + 'async': true, + 'src': `${UMAMI_URL}/script.js`, 'data-website-id': WEBSITE_ID, }) }) - app.renderer.hooks.on('body.begin', (event) => { + app.renderer.hooks.on('body.begin', () => { return h( 'noscript', null, diff --git a/.config/vite-utils/collect-test-entrypoints.ts b/.config/vite-utils/collect-test-entrypoints.ts index 45aa9e44..0864f5d1 100644 --- a/.config/vite-utils/collect-test-entrypoints.ts +++ b/.config/vite-utils/collect-test-entrypoints.ts @@ -1,13 +1,15 @@ -import { join, resolve } from 'path' -import * as fs from 'fs' +import { join, resolve } from 'node:path' +import * as fs from 'node:fs' + import { globSync } from 'glob' -export function collectTestEntrypoints(params: { skipPackages: string[]; skipTests: string[] }) { +export function collectTestEntrypoints(params: { skipPackages: string[], skipTests: string[] }) { const files: string[] = [] + // eslint-disable-next-line no-restricted-globals const packages = resolve(__dirname, '../../packages') - const skipTests = params.skipTests.map((path) => resolve(packages, path)) + const skipTests = params.skipTests.map(path => resolve(packages, path)) for (const dir of fs.readdirSync(packages)) { if (dir.startsWith('.') || params.skipPackages.includes(dir)) continue diff --git a/.config/vite-utils/fixup-cjs.ts b/.config/vite-utils/fixup-cjs.ts index f43da923..1a650361 100644 --- a/.config/vite-utils/fixup-cjs.ts +++ b/.config/vite-utils/fixup-cjs.ts @@ -1,4 +1,4 @@ -import { Plugin } from 'vite' +import type { Plugin } from 'vite' import * as cjsLexer from 'cjs-module-lexer' import esbuild from 'esbuild' diff --git a/.config/vite-utils/polyfills-bun.ts b/.config/vite-utils/polyfills-bun.ts index dfd88472..479da870 100644 --- a/.config/vite-utils/polyfills-bun.ts +++ b/.config/vite-utils/polyfills-bun.ts @@ -1,9 +1,9 @@ -import { describe, it, beforeEach, afterEach, beforeAll, afterAll, jest, vi as bunVi } from 'bun:test' +import { afterAll, afterEach, beforeAll, beforeEach, vi as bunVi, it, jest } from 'bun:test' // https://github.com/oven-sh/bun/issues/6044 -import console from 'console' import * as chai from 'chai' import * as vitestExpect from '@vitest/expect' import * as vitestSpy from '@vitest/spy' + import { setupChai, stubGlobal, unstubAllGlobals, waitFor } from './polyfills' setupChai(chai, vitestExpect) @@ -15,7 +15,7 @@ export const vi = { ...jest, ...bunVi, ...vitestSpy, - mocked: (fn) => fn, + mocked: fn => fn, stubGlobal, unstubAllGlobals, waitFor, diff --git a/.config/vite-utils/polyfills-deno.ts b/.config/vite-utils/polyfills-deno.ts index 564280b0..7021a58c 100644 --- a/.config/vite-utils/polyfills-deno.ts +++ b/.config/vite-utils/polyfills-deno.ts @@ -1,12 +1,14 @@ // @ts-expect-error no typings -import { describe as _describe, it, beforeEach, afterEach, beforeAll, afterAll } from 'jsr:@std/testing/bdd' +import util from 'node:util' + +import { describe as _describe, afterAll, afterEach, beforeAll, beforeEach, it } from 'jsr:@std/testing/bdd' // @ts-expect-error no typings import * as vitestSpy from 'npm:@vitest/spy@1.4.0' // @ts-expect-error no typings import * as chai from 'npm:chai' // @ts-expect-error no typings import * as vitestExpect from 'npm:@vitest/expect@1.4.0' -import util from 'node:util' + import { setupChai, stubGlobal, unstubAllGlobals, waitFor } from './polyfills' export { it, beforeEach, afterEach, beforeAll, afterAll } @@ -15,6 +17,7 @@ setupChai(chai, vitestExpect) // https://github.com/denoland/deno_std/issues/2213 Object.defineProperty(it, 'each', { + // eslint-disable-next-line ts/no-unsafe-function-type value: (items: any[][]) => (name: string, fn: Function) => { return items.map((item) => { return it(`${util.format(name, ...item)}`, () => fn(...item)) @@ -23,8 +26,8 @@ Object.defineProperty(it, 'each', { }) // https://github.com/denoland/deno_std/issues/4634 -export const describe = (...args) => { - const fn = args.find((arg) => typeof arg === 'function') +export function describe(...args) { + const fn = args.find(arg => typeof arg === 'function') if (fn.toString().startsWith('async')) { return } diff --git a/.config/vite-utils/polyfills.ts b/.config/vite-utils/polyfills.ts index 35cd70f3..85710032 100644 --- a/.config/vite-utils/polyfills.ts +++ b/.config/vite-utils/polyfills.ts @@ -6,32 +6,32 @@ export function setupChai(chai: any, vitestExpect: any) { utils.addMethod( chai.Assertion.prototype, 'toMatchInlineSnapshot', - function (properties?: object, inlineSnapshot?: string, message?: string) { + function (properties?: object, inlineSnapshot?: string) { // based on https://github.com/vitest-dev/vitest/blob/main/packages/vitest/src/integrations/snapshot/chai.ts const received = utils.flag(this, 'object') if (typeof properties === 'string') { - message = inlineSnapshot inlineSnapshot = properties properties = undefined } if (typeof inlineSnapshot !== 'string') { - throw new Error('toMatchInlineSnapshot requires a string argument') + throw new TypeError('toMatchInlineSnapshot requires a string argument') } // todo use @vitest/snapshot if (typeof received === 'string') { - const snapshot = '"' + received + '"' + const snapshot = `"${received}"` return chai.expect(snapshot).eql(inlineSnapshot.trim()) } else { - const obj = eval('(' + inlineSnapshot + ')') // idc lol + // eslint-disable-next-line no-eval + const obj = eval(`(${inlineSnapshot})`) // idc lol return chai.expect(received).eql(obj) } }, ) - utils.addMethod(chai.Assertion.prototype, 'toMatchSnapshot', function () { + utils.addMethod(chai.Assertion.prototype, 'toMatchSnapshot', () => { // todo use @vitest/snapshot }) }) @@ -71,6 +71,7 @@ export function unstubAllGlobals() { stubbedGlobal.clear() } +// eslint-disable-next-line ts/no-unsafe-function-type export async function waitFor(fn: Function) { // less customizations than vi.waitFor but it's good enough for now const timeout = Date.now() + 5000 @@ -81,7 +82,7 @@ export async function waitFor(fn: Function) { return await fn() } catch (e) { lastError = e - await new Promise((resolve) => setTimeout(resolve, 10)) + await new Promise(resolve => setTimeout(resolve, 10)) } } diff --git a/.config/vite-utils/test-setup-plugin.ts b/.config/vite-utils/test-setup-plugin.ts index 4e638511..bd8515ff 100644 --- a/.config/vite-utils/test-setup-plugin.ts +++ b/.config/vite-utils/test-setup-plugin.ts @@ -1,7 +1,8 @@ -import { Plugin } from 'vite' -import { fileURLToPath } from 'url' +import { fileURLToPath } from 'node:url' -const setupFile = fileURLToPath(new URL('./test-setup.mts', import.meta.url)) +import type { Plugin } from 'vite' + +const setupFile = fileURLToPath(new URL('./test-setup.ts', import.meta.url)) export function testSetup(params?: { additionalCode?: string }): Plugin { const { additionalCode = '' } = params || {} @@ -12,7 +13,7 @@ export function testSetup(params?: { additionalCode?: string }): Plugin { if (!id.match(/\.test\.m?[tj]s/)) return return { - code: `import '${setupFile}'\n` + additionalCode + code, + code: `import '${setupFile}'\n${additionalCode}${code}`, map: null, } }, diff --git a/.config/vite-utils/test-setup.mts b/.config/vite-utils/test-setup.ts similarity index 98% rename from .config/vite-utils/test-setup.mts rename to .config/vite-utils/test-setup.ts index 1be216bc..5c66fba7 100644 --- a/.config/vite-utils/test-setup.mts +++ b/.config/vite-utils/test-setup.ts @@ -1,4 +1,5 @@ import { expect } from 'vitest' + import { setPlatform } from '../../packages/core/src/platform.js' import { buffersEqual } from '../../packages/core/src/utils/buffer-utils.js' @@ -15,5 +16,5 @@ expect.addEqualityTesters([ if (a instanceof Uint8Array && b instanceof Uint8Array) { return buffersEqual(a, b) } - } -]) \ No newline at end of file + }, +]) diff --git a/.config/vite.browser.mts b/.config/vite.browser.ts similarity index 72% rename from .config/vite.browser.mts rename to .config/vite.browser.ts index 34508d53..d2586158 100644 --- a/.config/vite.browser.mts +++ b/.config/vite.browser.ts @@ -1,11 +1,11 @@ /// -import { defineConfig, mergeConfig } from 'vite' +import { mergeConfig } from 'vite' import { nodePolyfills } from 'vite-plugin-node-polyfills' -import baseConfig from './vite.mjs' +import baseConfig from './vite.js' import { fixupCjs } from './vite-utils/fixup-cjs' -export default mergeConfig(baseConfig, defineConfig({ +export default mergeConfig(baseConfig, { test: { browser: { enabled: true, @@ -14,7 +14,7 @@ export default mergeConfig(baseConfig, defineConfig({ slowHijackESM: false, }, fakeTimers: { - toFake: ['setTimeout', 'clearTimeout', 'setInterval', 'clearInterval', 'Date'] + toFake: ['setTimeout', 'clearTimeout', 'setInterval', 'clearInterval', 'Date'], }, retry: process.env.CI ? 3 : 0, isolate: false, @@ -28,15 +28,20 @@ export default mergeConfig(baseConfig, defineConfig({ plugins: [ fixupCjs(), nodePolyfills({ - include: ['stream', 'path', 'zlib', 'util'], + include: ['stream', 'path', 'zlib', 'util', 'events'], globals: { Buffer: false, global: false, process: false, }, - }) + }), ], + build: { + rollupOptions: { + external: ['bun:sqlite'], + }, + }, define: { - 'import.meta.env.TEST_ENV': '"browser"' - } -})) + 'import.meta.env.TEST_ENV': '"browser"', + }, +}) diff --git a/.config/vite.bun.mts b/.config/vite.bun.ts similarity index 61% rename from .config/vite.bun.mts rename to .config/vite.bun.ts index 66f62f5e..ac2bdad6 100644 --- a/.config/vite.bun.mts +++ b/.config/vite.bun.ts @@ -1,7 +1,8 @@ +/* eslint-disable no-restricted-globals */ +import { resolve } from 'node:path' + import { defineConfig } from 'vite' -import { globSync } from 'glob' -import { resolve, join } from 'path' -import * as fs from 'fs' + import { fixupCjs } from './vite-utils/fixup-cjs' import { testSetup } from './vite-utils/test-setup-plugin' import { collectTestEntrypoints } from './vite-utils/collect-test-entrypoints' @@ -11,39 +12,26 @@ const POLYFILLS = resolve(__dirname, 'vite-utils/polyfills-bun.ts') export default defineConfig({ build: { lib: { - entry: process.env.ENTRYPOINT ? [process.env.ENTRYPOINT] : collectTestEntrypoints({ - // https://github.com/oven-sh/bun/issues/4145 prevents us from using vitest directly - // so we have to use bun's native test runner - skipPackages: ['create-bot', 'crypto-node'], - // bun:test doesn't support certain features of vitest, so we'll skip them for now - // https://github.com/oven-sh/bun/issues/1825 - skipTests: [ + entry: process.env.ENTRYPOINT + ? [process.env.ENTRYPOINT] + : collectTestEntrypoints({ + // https://github.com/oven-sh/bun/issues/4145 prevents us from using vitest directly + // so we have to use bun's native test runner + skipPackages: ['create-bot', 'crypto-node'], + // bun:test doesn't support certain features of vitest, so we'll skip them for now + // https://github.com/oven-sh/bun/issues/1825 + skipTests: [ // uses timers - 'core/src/network/config-manager.test.ts', - 'core/src/network/persistent-connection.test.ts', - ], - }), + 'core/src/network/config-manager.test.ts', + 'core/src/network/persistent-connection.test.ts', + ], + }), formats: ['es'], }, rollupOptions: { external: [ - 'node:zlib', + /^(node|bun):.*/, 'vitest', - 'stream', - 'net', - 'crypto', - 'module', - 'fs', - 'fs/promises', - 'node:fs', - 'readline', - 'worker_threads', - 'events', - 'path', - 'util', - 'os', - 'bun:test', - 'bun:sqlite', ], output: { chunkFileNames: 'chunk-[hash].js', @@ -66,8 +54,8 @@ export default defineConfig({ name: 'polyfills', transform(code) { if (!code.includes('vitest')) return code - code = code.replace(/^import {(.+?)} from ['"]vitest['"]/gms, (_, names) => { - const namesParsed = names.split(',').map((name) => name.trim()) + code = code.replace(/^import \{(.+?)\} from ['"]vitest['"]/gms, (_, names) => { + const namesParsed = names.split(',').map(name => name.trim()) const namesFromFixup: string[] = [] const newNames = namesParsed @@ -92,13 +80,13 @@ export default defineConfig({ }, { name: 'fix-wasm-load', - async transform(code, id) { + async transform(code) { if (code.includes('@mtcute/wasm/mtcute.wasm')) { return code.replace('@mtcute/wasm/mtcute.wasm', resolve(__dirname, '../packages/wasm/mtcute.wasm')) } return code - } + }, }, testSetup(), ], diff --git a/.config/vite.deno.mts b/.config/vite.deno.ts similarity index 67% rename from .config/vite.deno.mts rename to .config/vite.deno.ts index 073611d4..796d847f 100644 --- a/.config/vite.deno.mts +++ b/.config/vite.deno.ts @@ -1,26 +1,31 @@ +import { resolve } from 'node:path' + import { defineConfig } from 'vite' -import { resolve, join } from 'path' + import { fixupCjs } from './vite-utils/fixup-cjs' import { testSetup } from './vite-utils/test-setup-plugin' import { collectTestEntrypoints } from './vite-utils/collect-test-entrypoints' +// eslint-disable-next-line no-restricted-globals const POLYFILLS = resolve(__dirname, 'vite-utils/polyfills-deno.ts') export default defineConfig({ build: { lib: { - entry: process.env.ENTRYPOINT ? [process.env.ENTRYPOINT] : collectTestEntrypoints({ - // these packages rely on node apis and are not meant to be run under deno - skipPackages: ['create-bot', 'crypto-node', 'bun', 'node', 'http-proxy', 'socks-proxy', 'mtproxy'], - skipTests: [ + entry: process.env.ENTRYPOINT + ? [process.env.ENTRYPOINT] + : collectTestEntrypoints({ + // these packages rely on node apis and are not meant to be run under deno + skipPackages: ['create-bot', 'crypto-node', 'bun', 'node', 'http-proxy', 'socks-proxy', 'mtproxy'], + skipTests: [ // uses timers - 'core/src/network/config-manager.test.ts', - 'core/src/network/persistent-connection.test.ts', - // https://github.com/denoland/deno/issues/22470 - 'wasm/tests/gunzip.test.ts', - 'wasm/tests/zlib.test.ts', - ], - }), + 'core/src/network/config-manager.test.ts', + 'core/src/network/persistent-connection.test.ts', + // https://github.com/denoland/deno/issues/22470 + 'wasm/tests/gunzip.test.ts', + 'wasm/tests/zlib.test.ts', + ], + }), formats: ['es'], }, rollupOptions: { @@ -48,8 +53,8 @@ export default defineConfig({ name: 'polyfills', transform(code) { if (!code.includes('vitest')) return code - code = code.replace(/^import {(.+?)} from ['"]vitest['"]/gms, (_, names) => { - const namesParsed = names.split(',').map((name) => name.trim()) + code = code.replace(/^import \{(.+?)\} from ['"]vitest['"]/gms, (_, names) => { + const namesParsed = names.split(',').map(name => name.trim()) return `import {${namesParsed.join(', ')}} from '${POLYFILLS}'` }) diff --git a/.config/vite.mts b/.config/vite.ts similarity index 58% rename from .config/vite.mts rename to .config/vite.ts index f4ee57c5..39bbe63b 100644 --- a/.config/vite.mts +++ b/.config/vite.ts @@ -17,13 +17,21 @@ export default defineConfig({ ], exclude: [ 'packages/**/index.ts', - ] + ], }, setupFiles: [ - './.config/vite-utils/test-setup.mts' - ] + './.config/vite-utils/test-setup.ts', + ], }, define: { - 'import.meta.env.TEST_ENV': '"node"' - } + 'import.meta.env.TEST_ENV': '"node"', + }, + optimizeDeps: { + esbuildOptions: { + // for WHATEVER REASON browserify-zlib uses `global` and it dies in browser lol + define: { + global: 'globalThis', + }, + }, + }, }) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 19493cc8..9b22cf51 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -59,14 +59,14 @@ jobs: GH_RELEASE: 1 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: node scripts/publish.js ${{ steps.find.outputs.modified }} - - uses: denoland/setup-deno@v1 - with: - deno-version: '1.43.1' - - name: Build packages and publish to JSR - env: - JSR: 1 - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: node scripts/publish.js ${{ steps.find.outputs.modified }} + # - uses: denoland/setup-deno@v1 + # with: + # deno-version: '1.45.5' + # - name: Build packages and publish to JSR + # env: + # JSR: 1 + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # run: node scripts/publish.js ${{ steps.find.outputs.modified }} - name: Commit version bumps run: | git commit -am "v${{ steps.bump.outputs.version }}" diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 1ae23c58..fd30eed6 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -52,7 +52,7 @@ jobs: with: bun-version: '1.1.4' - name: 'Build tests' - run: pnpm exec vite build -c .config/vite.bun.mts + run: pnpm exec vite build -c .config/vite.bun.ts - name: 'Run tests' run: cd dist/tests && bun test @@ -63,9 +63,9 @@ jobs: - uses: ./.github/actions/init - uses: denoland/setup-deno@v1 with: - deno-version: '1.43.1' + deno-version: '1.45.5' - name: 'Build tests' - run: pnpm exec vite build -c .config/vite.deno.mts + run: pnpm exec vite build -c .config/vite.deno.ts - name: 'Run tests' run: cd dist/tests && deno test -A --unstable-ffi @@ -110,22 +110,22 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} REGISTRY: 'https://npm.tei.su' run: cd e2e/node && ./cli.sh ci-publish - e2e-deno: - runs-on: ubuntu-latest - needs: [lint, test-node, test-web, test-bun, test-deno] - permissions: - contents: read - actions: write - steps: - - uses: actions/checkout@v4 - - name: Run end-to-end tests under Deno - env: - API_ID: ${{ secrets.TELEGRAM_API_ID }} - API_HASH: ${{ secrets.TELEGRAM_API_HASH }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - uses: nick-fields/retry@v2 - # thanks docker networking very cool - with: - max_attempts: 3 - timeout_minutes: 30 - command: cd e2e/deno && ./cli.sh ci + # e2e-deno: + # runs-on: ubuntu-latest + # needs: [lint, test-node, test-web, test-bun, test-deno] + # permissions: + # contents: read + # actions: write + # steps: + # - uses: actions/checkout@v4 + # - name: Run end-to-end tests under Deno + # env: + # API_ID: ${{ secrets.TELEGRAM_API_ID }} + # API_HASH: ${{ secrets.TELEGRAM_API_HASH }} + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # uses: nick-fields/retry@v2 + # # thanks docker networking very cool + # with: + # max_attempts: 3 + # timeout_minutes: 30 + # command: cd e2e/deno && ./cli.sh ci diff --git a/README.md b/README.md index 4657fb0f..74f24c53 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@

> [!WARNING] -> mtcute is currently in alpha stage: the api is not very stable yet, and there may be a lot of bugs +> mtcute is currently in alpha stage: the api is not very stable yet, and there may be a lot of bugs > feel free to try it out, though, any feedback is appreciated! > > releases may not follow semver just yet, so please pin the versions for now @@ -29,7 +29,7 @@ import { TelegramClient } from '@mtcute/node' import { Dispatcher, filters } from '@mtcute/dispatcher' const tg = new TelegramClient({ - apiId: parseInt(process.env.API_ID), + apiId: Number.parseInt(process.env.API_ID), apiHash: process.env.API_HASH, storage: 'my-account' }) diff --git a/e2e/deno/Dockerfile.build b/e2e/deno/Dockerfile.build index fa6b5552..5d1df581 100644 --- a/e2e/deno/Dockerfile.build +++ b/e2e/deno/Dockerfile.build @@ -1,4 +1,4 @@ -FROM denoland/deno:bin-1.43.1 as deno-bin +FROM denoland/deno:bin-1.45.5 as deno-bin FROM node:20 WORKDIR /app diff --git a/e2e/deno/Dockerfile.test b/e2e/deno/Dockerfile.test index e7137cd9..ad9b1efb 100644 --- a/e2e/deno/Dockerfile.test +++ b/e2e/deno/Dockerfile.test @@ -1,4 +1,4 @@ -FROM denoland/deno:1.43.1 +FROM denoland/deno:1.45.5 WORKDIR /app RUN apt update && apt install -y socat diff --git a/e2e/deno/README.md b/e2e/deno/README.md index 5b579dc9..034bfa89 100644 --- a/e2e/deno/README.md +++ b/e2e/deno/README.md @@ -6,7 +6,7 @@ They are made for 2 purposes: - Ensure published packages work as expected and can properly be imported - Ensure that the library works with the actual Telegram API -To achieve the first goal, we use a local JSR instance container where we publish the package, +To achieve the first goal, we use a local JSR instance container where we publish the package, and then install it from there in another container ## Setting up @@ -27,4 +27,4 @@ Before running the tests, you need to copy `.env.example` to `.env` and fill in ./cli.sh run # or in docker ./cli.sh run-docker -``` \ No newline at end of file +``` diff --git a/e2e/deno/deno.json b/e2e/deno/deno.json index 71f4e17a..120e67e5 100644 --- a/e2e/deno/deno.json +++ b/e2e/deno/deno.json @@ -1,10 +1,10 @@ { - "imports": { - "@mtcute/web": "jsr:@mtcute/web@*", - "@mtcute/wasm": "jsr:@mtcute/wasm@*", - "@mtcute/tl": "jsr:@mtcute/tl@*", - "@mtcute/tl-runtime": "jsr:@mtcute/tl-runtime@*", - "@mtcute/core": "jsr:@mtcute/core@*", - "@mtcute/deno": "jsr:@mtcute/deno@*" - } -} \ No newline at end of file + "imports": { + "@mtcute/web": "jsr:@mtcute/web@*", + "@mtcute/wasm": "jsr:@mtcute/wasm@*", + "@mtcute/tl": "jsr:@mtcute/tl@*", + "@mtcute/tl-runtime": "jsr:@mtcute/tl-runtime@*", + "@mtcute/core": "jsr:@mtcute/core@*", + "@mtcute/deno": "jsr:@mtcute/deno@*" + } +} diff --git a/e2e/deno/init-server.js b/e2e/deno/init-server.js index 429a2e9e..dc1152fd 100644 --- a/e2e/deno/init-server.js +++ b/e2e/deno/init-server.js @@ -1,5 +1,5 @@ /* eslint-disable no-console */ -const { execSync } = require('child_process') +import { execSync } from 'node:child_process' function getDockerContainerIp(name) { const containerId = execSync(`docker compose ps -q ${name}`).toString().trim() @@ -41,27 +41,25 @@ async function createBucket(name) { } } -(async () => { - for (const bucket of ['modules', 'docs', 'publishing', 'npm']) { - const ok = await createBucket(bucket) - console.log(`[i] Created bucket ${bucket}: ${ok}`) - } +for (const bucket of ['modules', 'docs', 'publishing', 'npm']) { + const ok = await createBucket(bucket) + console.log(`[i] Created bucket ${bucket}: ${ok}`) +} - // create @mtcute scope if it doesn't exist - const resp = await fetch(`${API_URL}api/scopes`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - Cookie: 'token=token', - }, - body: JSON.stringify({ scope: 'mtcute' }), - }) +// create @mtcute scope if it doesn't exist +const resp = await fetch(`${API_URL}api/scopes`, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'Cookie': 'token=token', + }, + body: JSON.stringify({ scope: 'mtcute' }), +}) - if (resp.status !== 200 && resp.status !== 409) { - throw new Error(`Failed to create scope: ${resp.statusText} ${await resp.text()}`) - } +if (resp.status !== 200 && resp.status !== 409) { + throw new Error(`Failed to create scope: ${resp.statusText} ${await resp.text()}`) +} - if (resp.status === 200) { - console.log('[i] Created scope mtcute') - } -})() +if (resp.status === 200) { + console.log('[i] Created scope mtcute') +} diff --git a/e2e/deno/tests/01.auth.ts b/e2e/deno/tests/01.auth.ts index 5236b549..b728e7df 100644 --- a/e2e/deno/tests/01.auth.ts +++ b/e2e/deno/tests/01.auth.ts @@ -1,14 +1,14 @@ import { assertEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts' - -import { tl, User } from '@mtcute/core' +import { User, tl } from '@mtcute/core' import { BaseTelegramClient, TelegramClient } from '@mtcute/core/client.js' import { getApiParams } from '../utils.ts' -const getAccountId = () => - Math.floor(Math.random() * 10000) +function getAccountId() { + return Math.floor(Math.random() * 10000) .toString() .padStart(4, '0') +} async function authorizeInDc(dc: number, base: BaseTelegramClient) { const tg = new TelegramClient({ client: base }) diff --git a/e2e/deno/tests/02.methods.ts b/e2e/deno/tests/02.methods.ts index f62b9a13..e60e6841 100644 --- a/e2e/deno/tests/02.methods.ts +++ b/e2e/deno/tests/02.methods.ts @@ -1,5 +1,4 @@ import { assertEquals, assertNotEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts' - import { MtPeerNotFoundError } from '@mtcute/core' import { TelegramClient } from '@mtcute/core/client.js' diff --git a/e2e/deno/tests/03.files.ts b/e2e/deno/tests/03.files.ts index 3cbbbf5a..dee5d703 100644 --- a/e2e/deno/tests/03.files.ts +++ b/e2e/deno/tests/03.files.ts @@ -1,7 +1,8 @@ -import { assertEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts' import { createHash } from 'node:crypto' -import { FileDownloadLocation, Thumbnail } from '@mtcute/core' +import { assertEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts' +import type { FileDownloadLocation } from '@mtcute/core' +import { Thumbnail } from '@mtcute/core' import { TelegramClient } from '@mtcute/core/client.js' import { sleep } from '@mtcute/core/utils.js' diff --git a/e2e/deno/tests/04.updates.ts b/e2e/deno/tests/04.updates.ts index 37bc49e1..f19d015f 100644 --- a/e2e/deno/tests/04.updates.ts +++ b/e2e/deno/tests/04.updates.ts @@ -1,6 +1,5 @@ import { assertEquals, assertNotEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts' - -import { Message } from '@mtcute/core' +import type { Message } from '@mtcute/core' import { TelegramClient } from '@mtcute/core/client.js' import { getApiParams, waitFor } from '../utils.ts' @@ -18,7 +17,7 @@ Deno.test('4. handling updates', { sanitizeResources: false }, async (t) => { await t.step('should send and receive messages', async () => { const tg1Messages: Message[] = [] - tg1.on('new_message', (msg) => tg1Messages.push(msg)) + tg1.on('new_message', msg => tg1Messages.push(msg)) const [tg1User] = await tg1.getUsers('self') let username = tg1User!.username @@ -36,7 +35,7 @@ Deno.test('4. handling updates', { sanitizeResources: false }, async (t) => { await waitFor(() => { assertNotEquals( - tg1Messages.find((msg) => msg.text === messageText), + tg1Messages.find(msg => msg.text === messageText), undefined, ) }) diff --git a/e2e/deno/tests/05.worker.ts b/e2e/deno/tests/05.worker.ts index d50bcf41..c4dd6480 100644 --- a/e2e/deno/tests/05.worker.ts +++ b/e2e/deno/tests/05.worker.ts @@ -1,9 +1,10 @@ import { assertEquals, assertGreater, assertInstanceOf } from 'https://deno.land/std@0.223.0/assert/mod.ts' - import { TelegramClient } from '@mtcute/core/client.js' -import { Long, Message, TelegramWorkerPort, tl } from '@mtcute/deno' +import type { Message } from '@mtcute/deno' +import { Long, TelegramWorkerPort, tl } from '@mtcute/deno' import { getApiParams, waitFor } from '../utils.ts' + import type { CustomMethods } from './_worker.ts' Deno.test('5. worker', { sanitizeResources: false }, async (t) => { @@ -16,7 +17,7 @@ Deno.test('5. worker', { sanitizeResources: false }, async (t) => { }) const portClient = new TelegramClient({ client: port }) - await t.step('should make api calls', async function () { + await t.step('should make api calls', async () => { const res = await port.call({ _: 'help.getConfig' }) assertEquals(res._, 'config') @@ -25,7 +26,7 @@ Deno.test('5. worker', { sanitizeResources: false }, async (t) => { assertEquals(Long.isLong((premiumPromo.users[0] as tl.RawUser).accessHash), true) }) - await t.step('should call custom methods', async function () { + await t.step('should call custom methods', async () => { const hello = await port.invokeCustom('hello') assertEquals(hello, 'world') @@ -33,7 +34,7 @@ Deno.test('5. worker', { sanitizeResources: false }, async (t) => { assertEquals(sum, 5) }) - await t.step('should throw errors', async function () { + await t.step('should throw errors', async () => { try { await port.call({ _: 'test.useConfigSimple' }) throw new Error('should have thrown') @@ -42,7 +43,7 @@ Deno.test('5. worker', { sanitizeResources: false }, async (t) => { } }) - await t.step('should receive updates', async function () { + await t.step('should receive updates', async () => { const client2 = new TelegramClient(getApiParams('dc2.session')) try { diff --git a/e2e/deno/tests/_worker.ts b/e2e/deno/tests/_worker.ts index 1b5e3938..967cbd9a 100644 --- a/e2e/deno/tests/_worker.ts +++ b/e2e/deno/tests/_worker.ts @@ -1,4 +1,4 @@ -import { WorkerCustomMethods } from '@mtcute/core/worker.js' +import type { WorkerCustomMethods } from '@mtcute/core/worker.js' import { BaseTelegramClient, TelegramWorker } from '@mtcute/deno' import { getApiParams } from '../utils.ts' diff --git a/e2e/deno/tests/packaging/base-client.ts b/e2e/deno/tests/packaging/base-client.ts index b752892a..f929853f 100644 --- a/e2e/deno/tests/packaging/base-client.ts +++ b/e2e/deno/tests/packaging/base-client.ts @@ -1,5 +1,4 @@ import { assertEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts' - import { BaseTelegramClient } from '@mtcute/core/client.js' import { getApiParams } from '../../utils.ts' diff --git a/e2e/deno/tests/packaging/tl-runtime.ts b/e2e/deno/tests/packaging/tl-runtime.ts index b00dbeb0..ec577252 100644 --- a/e2e/deno/tests/packaging/tl-runtime.ts +++ b/e2e/deno/tests/packaging/tl-runtime.ts @@ -1,6 +1,4 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import { assertEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts' - import { Long } from '@mtcute/core' import { setPlatform } from '@mtcute/core/platform.js' import { TlBinaryReader, TlBinaryWriter, TlSerializationCounter } from '@mtcute/tl-runtime' @@ -19,7 +17,7 @@ Deno.test('encodings', () => { Deno.test('TlBinaryReader', () => { const map = { - '85337187': function (r: any) { + 85337187(r: any) { const ret: any = {} ret._ = 'mt_resPQ' ret.nonce = r.int128() @@ -30,8 +28,8 @@ Deno.test('TlBinaryReader', () => { return ret }, } - const data = - '000000000000000001c8831ec97ae55140000000632416053e0549828cca27e966b301a48fece2fca5cf4d33f4a11ea877ba4aa5739073300817ed48941a08f98100000015c4b51c01000000216be86c022bb4c3' + const data + = '000000000000000001c8831ec97ae55140000000632416053e0549828cca27e966b301a48fece2fca5cf4d33f4a11ea877ba4aa5739073300817ed48941a08f98100000015c4b51c01000000216be86c022bb4c3' const buf = p.hexDecode(data) const r = new TlBinaryReader(map, buf, 8) @@ -45,7 +43,7 @@ Deno.test('TlBinaryReader', () => { Deno.test('TlBinaryWriter', () => { const map = { - mt_resPQ: function (w: any, obj: any) { + mt_resPQ(w: any, obj: any) { w.uint(85337187) w.bytes(obj.pq) w.vector(w.long, obj.serverPublicKeyFingerprints) diff --git a/e2e/deno/tests/packaging/tl-schema.ts b/e2e/deno/tests/packaging/tl-schema.ts index 5514729e..348fa9c9 100644 --- a/e2e/deno/tests/packaging/tl-schema.ts +++ b/e2e/deno/tests/packaging/tl-schema.ts @@ -1,5 +1,4 @@ import { assertEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts' - import { Long } from '@mtcute/core' import { setPlatform } from '@mtcute/core/platform.js' import { tl } from '@mtcute/tl' @@ -29,7 +28,7 @@ Deno.test('@mtcute/tl', async (t) => { await t.step('readers map works with TlBinaryReader', () => { const buf = p.hexDecode('4ca5e8dd7b00000000000000c801000000000000') - // eslint-disable-next-line + const obj = TlBinaryReader.deserializeObject(__tlReaderMap, buf) assertEquals(obj._, 'inputPeerUser') diff --git a/e2e/deno/tests/packaging/wasm.ts b/e2e/deno/tests/packaging/wasm.ts index 865f670e..69a210ae 100644 --- a/e2e/deno/tests/packaging/wasm.ts +++ b/e2e/deno/tests/packaging/wasm.ts @@ -1,5 +1,4 @@ import { assertEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts' - import { ige256Decrypt, ige256Encrypt } from '@mtcute/wasm' import { WebCryptoProvider, WebPlatform } from '@mtcute/web' diff --git a/e2e/deno/utils.ts b/e2e/deno/utils.ts index dfba3630..86f0f183 100644 --- a/e2e/deno/utils.ts +++ b/e2e/deno/utils.ts @@ -1,9 +1,10 @@ -import { MaybePromise, MemoryStorage } from '@mtcute/core' +import type { MaybePromise } from '@mtcute/core' +import { MemoryStorage } from '@mtcute/core' import { setPlatform } from '@mtcute/core/platform.js' import { LogManager, sleep } from '@mtcute/core/utils.js' import { DenoCryptoProvider, DenoPlatform, SqliteStorage, TcpTransport } from '@mtcute/deno' -export const getApiParams = (storage?: string) => { +export function getApiParams(storage?: string) { if (!Deno.env.has('API_ID') || !Deno.env.has('API_HASH')) { throw new Error('API_ID and API_HASH env variables must be set') } @@ -13,7 +14,7 @@ export const getApiParams = (storage?: string) => { setPlatform(new DenoPlatform()) return { - apiId: parseInt(Deno.env.get('API_ID')!), + apiId: Number.parseInt(Deno.env.get('API_ID')!), apiHash: Deno.env.get('API_HASH')!, testMode: true, storage: storage ? new SqliteStorage(`.sessions/${storage}`) : new MemoryStorage(), diff --git a/e2e/node/.mocharc.json b/e2e/node/.mocharc.json index 1c46b480..04373577 100644 --- a/e2e/node/.mocharc.json +++ b/e2e/node/.mocharc.json @@ -1,3 +1,3 @@ { - "node-option": [] + "node-option": [] } diff --git a/e2e/node/README.md b/e2e/node/README.md index 842f184f..3733d8e4 100644 --- a/e2e/node/README.md +++ b/e2e/node/README.md @@ -6,7 +6,7 @@ They are made for 2 purposes: - Ensure published packages work as expected and can properly be imported - Ensure that the library works with the actual Telegram API (WIP) -To achieve the first goal, we use a Verdaccio container to publish the package to, +To achieve the first goal, we use a Verdaccio container to publish the package to, and then install it from there in another container ## Setting up @@ -45,4 +45,4 @@ npm config set -L project @mtcute:registry http://verdaccio.e2e.orb.local/ > Replace the URL above with the one generated with your Docker GUI of choice > (e2e > verdaccio > RMB > Open in browser). Example above assumes OrbStack -Then use `./cli.sh run` to run the tests \ No newline at end of file +Then use `./cli.sh run` to run the tests diff --git a/e2e/node/cjs/package.json b/e2e/node/cjs/package.json index 9e26dfee..0967ef42 100644 --- a/e2e/node/cjs/package.json +++ b/e2e/node/cjs/package.json @@ -1 +1 @@ -{} \ No newline at end of file +{} diff --git a/e2e/node/cjs/tests/tl-runtime.js b/e2e/node/cjs/tests/tl-runtime.js index 4e38b6ef..1799c80d 100644 --- a/e2e/node/cjs/tests/tl-runtime.js +++ b/e2e/node/cjs/tests/tl-runtime.js @@ -24,7 +24,7 @@ describe('@mtcute/tl-runtime', () => { describe('TlBinaryReader', () => { const map = { - '85337187': function (r) { + 85337187(r) { const ret = {} ret._ = 'mt_resPQ' ret.nonce = r.int128() @@ -35,8 +35,8 @@ describe('@mtcute/tl-runtime', () => { return ret }, } - const data = - '000000000000000001c8831ec97ae55140000000632416053e0549828cca27e966b301a48fece2fca5cf4d33f4a11ea877ba4aa5739073300817ed48941a08f98100000015c4b51c01000000216be86c022bb4c3' + const data + = '000000000000000001c8831ec97ae55140000000632416053e0549828cca27e966b301a48fece2fca5cf4d33f4a11ea877ba4aa5739073300817ed48941a08f98100000015c4b51c01000000216be86c022bb4c3' it('should work with Buffers', () => { const buf = Buffer.from(data, 'hex') @@ -64,7 +64,7 @@ describe('@mtcute/tl-runtime', () => { describe('TlBinaryWriter', () => { const map = { - mt_resPQ: function (w, obj) { + mt_resPQ(w, obj) { w.uint(85337187) w.bytes(obj.pq) w.vector(w.long, obj.serverPublicKeyFingerprints) diff --git a/e2e/node/cjs/tests/tl-schema.js b/e2e/node/cjs/tests/tl-schema.js index 43508e29..f84c8c9e 100644 --- a/e2e/node/cjs/tests/tl-schema.js +++ b/e2e/node/cjs/tests/tl-schema.js @@ -1,5 +1,4 @@ const Long = require('long') - const { TlBinaryReader, TlBinaryWriter } = require('@mtcute/tl-runtime') const { tl } = require('@mtcute/tl') const { __tlReaderMap } = require('@mtcute/tl/binary/reader') @@ -35,6 +34,6 @@ describe('@mtcute/tl', () => { }) it('correctly checks for combinator types', () => { - expect(tl.isAnyInputUser({ _: 'inputUserEmpty' })).to.be.true + expect(tl.isAnyInputUser({ _: 'inputUserEmpty' })).to.eq(true) }) }) diff --git a/e2e/node/cjs/utils.js b/e2e/node/cjs/utils.js index a81c0027..be23b064 100644 --- a/e2e/node/cjs/utils.js +++ b/e2e/node/cjs/utils.js @@ -12,7 +12,7 @@ exports.getApiParams = () => { setPlatform(new NodePlatform()) return { - apiId: parseInt(process.env.API_ID), + apiId: Number.parseInt(process.env.API_ID), apiHash: process.env.API_HASH, testMode: true, storage: new MemoryStorage(), diff --git a/e2e/node/config.js b/e2e/node/config.js index af1d6e14..1f7159fc 100644 --- a/e2e/node/config.js +++ b/e2e/node/config.js @@ -1,17 +1,17 @@ module.exports = { cjs: { getFiles: () => 'tests/**/*.js', - runFile: (file) => `mocha ${file}`, + runFile: file => `mocha ${file}`, }, esm: { getFiles: () => 'tests/**/*.js', - runFile: (file) => `mocha ${file}`, + runFile: file => `mocha ${file}`, }, ts: { getFiles: () => 'tests/**/*.ts', beforeAll: () => ['tsc', 'node build-esm.cjs'], runFile: (file) => { - if (require('path').basename(file)[0] === '_') return null + if (require('node:path').basename(file)[0] === '_') return null if (file.startsWith('tests/packaging/')) { // packaging tests - we need to make sure everything imports and works diff --git a/e2e/node/esm/package.json b/e2e/node/esm/package.json index 7c34deb5..5ffd9800 100644 --- a/e2e/node/esm/package.json +++ b/e2e/node/esm/package.json @@ -1 +1 @@ -{"type":"module"} \ No newline at end of file +{ "type": "module" } diff --git a/e2e/node/esm/tests/base-client.js b/e2e/node/esm/tests/base-client.js index 818b5c97..855ddf90 100644 --- a/e2e/node/esm/tests/base-client.js +++ b/e2e/node/esm/tests/base-client.js @@ -1,6 +1,5 @@ import { expect } from 'chai' import { describe, it } from 'mocha' - import { BaseTelegramClient } from '@mtcute/core/client.js' import { getApiParams } from '../utils.js' diff --git a/e2e/node/esm/tests/tl-runtime.js b/e2e/node/esm/tests/tl-runtime.js index d5a4d3d8..43ce673a 100644 --- a/e2e/node/esm/tests/tl-runtime.js +++ b/e2e/node/esm/tests/tl-runtime.js @@ -1,7 +1,6 @@ import { expect } from 'chai' import Long from 'long' import { describe, it } from 'mocha' - import { NodePlatform } from '@mtcute/node' import { TlBinaryReader, TlBinaryWriter, TlSerializationCounter } from '@mtcute/tl-runtime' @@ -24,7 +23,7 @@ describe('encodings', () => { describe('TlBinaryReader', () => { const map = { - '85337187': function (r) { + 85337187(r) { const ret = {} ret._ = 'mt_resPQ' ret.nonce = r.int128() @@ -35,8 +34,8 @@ describe('TlBinaryReader', () => { return ret }, } - const data = - '000000000000000001c8831ec97ae55140000000632416053e0549828cca27e966b301a48fece2fca5cf4d33f4a11ea877ba4aa5739073300817ed48941a08f98100000015c4b51c01000000216be86c022bb4c3' + const data + = '000000000000000001c8831ec97ae55140000000632416053e0549828cca27e966b301a48fece2fca5cf4d33f4a11ea877ba4aa5739073300817ed48941a08f98100000015c4b51c01000000216be86c022bb4c3' it('should work with Buffers', () => { const buf = Buffer.from(data, 'hex') @@ -64,7 +63,7 @@ describe('TlBinaryReader', () => { describe('TlBinaryWriter', () => { const map = { - mt_resPQ: function (w, obj) { + mt_resPQ(w, obj) { w.uint(85337187) w.bytes(obj.pq) w.vector(w.long, obj.serverPublicKeyFingerprints) diff --git a/e2e/node/esm/tests/tl-schema.js b/e2e/node/esm/tests/tl-schema.js index ba4aab19..f83799f4 100644 --- a/e2e/node/esm/tests/tl-schema.js +++ b/e2e/node/esm/tests/tl-schema.js @@ -1,7 +1,6 @@ import { expect } from 'chai' import Long from 'long' import { describe, it } from 'mocha' - import { NodePlatform } from '@mtcute/node' import { tl } from '@mtcute/tl' import { __tlReaderMap } from '@mtcute/tl/binary/reader.js' @@ -35,6 +34,6 @@ describe('@mtcute/tl', () => { }) it('correctly checks for combinator types', () => { - expect(tl.isAnyInputUser({ _: 'inputUserEmpty' })).to.be.true + expect(tl.isAnyInputUser({ _: 'inputUserEmpty' })).to.eq(true) }) }) diff --git a/e2e/node/esm/tests/wasm.js b/e2e/node/esm/tests/wasm.js index 27291ffa..1de0b398 100644 --- a/e2e/node/esm/tests/wasm.js +++ b/e2e/node/esm/tests/wasm.js @@ -1,6 +1,5 @@ import { expect } from 'chai' import { before, describe, it } from 'mocha' - import { NodeCryptoProvider } from '@mtcute/node/utils.js' import { ige256Decrypt, ige256Encrypt } from '@mtcute/wasm' diff --git a/e2e/node/esm/utils.js b/e2e/node/esm/utils.js index 938b6c7d..3b2b9aeb 100644 --- a/e2e/node/esm/utils.js +++ b/e2e/node/esm/utils.js @@ -4,7 +4,7 @@ import { LogManager } from '@mtcute/core/utils.js' import { NodePlatform, TcpTransport } from '@mtcute/node' import { NodeCryptoProvider } from '@mtcute/node/utils.js' -export const getApiParams = () => { +export function getApiParams() { if (!process.env.API_ID || !process.env.API_HASH) { throw new Error('API_ID and API_HASH env variables must be set') } @@ -12,7 +12,7 @@ export const getApiParams = () => { setPlatform(new NodePlatform()) return { - apiId: parseInt(process.env.API_ID), + apiId: Number.parseInt(process.env.API_ID), apiHash: process.env.API_HASH, testMode: true, storage: new MemoryStorage(), diff --git a/e2e/node/package.json b/e2e/node/package.json index a94bfe9f..dd273173 100644 --- a/e2e/node/package.json +++ b/e2e/node/package.json @@ -1,35 +1,35 @@ { - "name": "mtcute-e2e", - "private": true, - "dependencies": { - "@mtcute/bun": "*", - "@mtcute/core": "*", - "@mtcute/crypto-node": "*", - "@mtcute/dispatcher": "*", - "@mtcute/file-id": "*", - "@mtcute/html-parser": "*", - "@mtcute/http-proxy": "*", - "@mtcute/i18n": "*", - "@mtcute/markdown-parser": "*", - "@mtcute/mtproxy": "*", - "@mtcute/node": "*", - "@mtcute/socks-proxy": "*", - "@mtcute/tl": "*", - "@mtcute/tl-runtime": "*", - "@mtcute/tl-utils": "*", - "@mtcute/wasm": "*", - "@mtcute/web": "*", - "@types/chai": "^4.3.8", - "@types/mocha": "^10.0.2", - "chai": "^4.3.10", - "dotenv": "16.3.1", - "glob": "10.3.10", - "long": "^5.2.3", - "mocha": "^10.2.0", - "ts-node": "^10.9.1", - "typescript": "^5.2.2" - }, - "devDependencies": { - "@types/node": "^20.8.10" - } -} \ No newline at end of file + "name": "mtcute-e2e", + "private": true, + "dependencies": { + "@mtcute/bun": "*", + "@mtcute/core": "*", + "@mtcute/crypto-node": "*", + "@mtcute/dispatcher": "*", + "@mtcute/file-id": "*", + "@mtcute/html-parser": "*", + "@mtcute/http-proxy": "*", + "@mtcute/i18n": "*", + "@mtcute/markdown-parser": "*", + "@mtcute/mtproxy": "*", + "@mtcute/node": "*", + "@mtcute/socks-proxy": "*", + "@mtcute/tl": "*", + "@mtcute/tl-runtime": "*", + "@mtcute/tl-utils": "*", + "@mtcute/wasm": "*", + "@mtcute/web": "*", + "@types/chai": "^4.3.8", + "@types/mocha": "^10.0.2", + "chai": "^4.3.10", + "dotenv": "16.3.1", + "glob": "10.3.10", + "long": "^5.2.3", + "mocha": "^10.2.0", + "ts-node": "^10.9.1", + "typescript": "^5.2.2" + }, + "devDependencies": { + "@types/node": "^20.8.10" + } +} diff --git a/e2e/node/publish-canary.js b/e2e/node/publish-canary.js index 59ca7257..9ed9273b 100644 --- a/e2e/node/publish-canary.js +++ b/e2e/node/publish-canary.js @@ -2,9 +2,9 @@ // at this point, we should have all our packages installed in node_modules // so it should be safe to just cd into them and run `npm publish` on them -const fs = require('fs') -const path = require('path') -const { execSync } = require('child_process') +const fs = require('node:fs') +const path = require('node:path') +const { execSync } = require('node:child_process') // setup tokenw const { NPM_TOKEN, REGISTRY, CURRENT_COMMIT } = process.env @@ -19,8 +19,8 @@ const commit = CURRENT_COMMIT.slice(0, 7) const myPkgJson = JSON.parse(fs.readFileSync(path.join(__dirname, 'package.json'), 'utf8')) const packages = Object.keys(myPkgJson.dependencies) - .filter((x) => x.startsWith('@mtcute/')) - .map((x) => x.slice('@mtcute/'.length)) + .filter(x => x.startsWith('@mtcute/')) + .map(x => x.slice('@mtcute/'.length)) const workDir = path.join(__dirname, 'temp') fs.mkdirSync(workDir, { recursive: true }) @@ -41,7 +41,7 @@ async function main() { // prepare working directory for (const pkg of packages) { - const data = await fetch(`http://localhost:4873/@mtcute/${pkg}`).then((x) => x.json()) + const data = await fetch(`http://localhost:4873/@mtcute/${pkg}`).then(x => x.json()) const version = data['dist-tags'].latest const tarball = data.versions[version].dist.tarball diff --git a/e2e/node/runner.js b/e2e/node/runner.js index dd591f8f..95c9ad27 100644 --- a/e2e/node/runner.js +++ b/e2e/node/runner.js @@ -1,7 +1,8 @@ /* eslint-disable no-console */ +const cp = require('node:child_process') +const path = require('node:path') + const glob = require('glob') -const cp = require('child_process') -const path = require('path') const env = {} require('dotenv').config({ processEnv: env }) @@ -44,7 +45,7 @@ function runForFile(dir, file, single = true) { for (const c of cmds) { console.log('%s $ %s', dir, c) - cp.execSync('pnpm exec ' + c, options) + cp.execSync(`pnpm exec ${c}`, options) } } @@ -69,7 +70,7 @@ function runForDir(dir) { if (beforeAll) { for (const c of beforeAll()) { console.log('%s $ %s', dir, c) - cp.execSync('pnpm exec ' + c, options) + cp.execSync(`pnpm exec ${c}`, options) } } @@ -116,7 +117,7 @@ async function main() { if (file) { const files = glob.sync(config[dir].getFiles(), { cwd: path.join(__dirname, dir) }) - const matchingFile = files.find((f) => f.endsWith(file)) + const matchingFile = files.find(f => f.endsWith(file)) if (!matchingFile) { console.log("Can't find file %s", file) diff --git a/e2e/node/ts/build-esm.cjs b/e2e/node/ts/build-esm.cjs index 64d189ef..4835ead5 100644 --- a/e2e/node/ts/build-esm.cjs +++ b/e2e/node/ts/build-esm.cjs @@ -1,6 +1,7 @@ -const fs = require('fs') -const path = require('path') -const cp = require('child_process') +const fs = require('node:fs') +const path = require('node:path') +const cp = require('node:child_process') + const glob = require('glob') function fixForEsm() { diff --git a/e2e/node/ts/mocha.esm.json b/e2e/node/ts/mocha.esm.json index 95448eb3..72a03424 100644 --- a/e2e/node/ts/mocha.esm.json +++ b/e2e/node/ts/mocha.esm.json @@ -1,3 +1,3 @@ { - "node-option": ["experimental-specifier-resolution=node", "loader=ts-node/esm"] + "node-option": ["experimental-specifier-resolution=node", "loader=ts-node/esm"] } diff --git a/e2e/node/ts/package.json b/e2e/node/ts/package.json index 0292b995..a3c15a7a 100644 --- a/e2e/node/ts/package.json +++ b/e2e/node/ts/package.json @@ -1 +1 @@ -{"type":"commonjs"} \ No newline at end of file +{ "type": "commonjs" } diff --git a/e2e/node/ts/run-esm.cjs b/e2e/node/ts/run-esm.cjs index c00361e1..1ef05b1c 100644 --- a/e2e/node/ts/run-esm.cjs +++ b/e2e/node/ts/run-esm.cjs @@ -1,4 +1,4 @@ -const cp = require('child_process') +const cp = require('node:child_process') const { fixForEsm } = require('./build-esm.cjs') diff --git a/e2e/node/ts/tests/01.auth.ts b/e2e/node/ts/tests/01.auth.ts index aef3419f..386fc9d0 100644 --- a/e2e/node/ts/tests/01.auth.ts +++ b/e2e/node/ts/tests/01.auth.ts @@ -1,15 +1,15 @@ import { expect } from 'chai' import { describe, it } from 'mocha' - -import { tl, User } from '@mtcute/core' +import { User, tl } from '@mtcute/core' import { BaseTelegramClient, TelegramClient } from '@mtcute/core/client.js' import { getApiParams } from '../utils.js' -const getAccountId = () => - Math.floor(Math.random() * 10000) +function getAccountId() { + return Math.floor(Math.random() * 10000) .toString() .padStart(4, '0') +} async function authorizeInDc(dc: number, base: BaseTelegramClient) { const tg = new TelegramClient({ client: base }) @@ -61,7 +61,7 @@ async function authorizeInDc(dc: number, base: BaseTelegramClient) { await tg.close() - expect(user.isSelf).to.be.true + expect(user.isSelf).to.eq(true) expect(user.phoneNumber).to.equal(phone) break } diff --git a/e2e/node/ts/tests/02.methods.ts b/e2e/node/ts/tests/02.methods.ts index 1ad7ec03..5f5ef74c 100644 --- a/e2e/node/ts/tests/02.methods.ts +++ b/e2e/node/ts/tests/02.methods.ts @@ -1,6 +1,5 @@ import { expect } from 'chai' import { describe, it } from 'mocha' - import { MtPeerNotFoundError } from '@mtcute/core' import { TelegramClient } from '@mtcute/core/client.js' @@ -16,14 +15,14 @@ describe('2. calling methods', function () { it('getUsers(@BotFather)', async () => { const [user] = await tg.getUsers('botfather') - expect(user?.isBot).to.be.true + expect(user?.isBot).to.eq(true) expect(user?.displayName).to.equal('BotFather') }) it('getUsers(@BotFather) - cached', async () => { const [user] = await tg.getUsers('botfather') - expect(user?.isBot).to.be.true + expect(user?.isBot).to.eq(true) expect(user?.displayName).to.equal('BotFather') }) @@ -53,7 +52,7 @@ describe('2. calling methods', function () { const res = await tg.updateProfile({ bio }) const newSelf = await tg.getFullChat('self') - expect(res.isSelf).to.be.true + expect(res.isSelf).to.eq(true) expect(oldSelf.bio).to.not.equal(newSelf.bio) expect(newSelf.bio).to.equal(bio) }) diff --git a/e2e/node/ts/tests/03.files.ts b/e2e/node/ts/tests/03.files.ts index bbfc00b5..84df8bd6 100644 --- a/e2e/node/ts/tests/03.files.ts +++ b/e2e/node/ts/tests/03.files.ts @@ -1,9 +1,9 @@ -/* eslint-disable no-restricted-imports */ -import { expect } from 'chai' -import { createHash } from 'crypto' -import { describe, it } from 'mocha' +import { createHash } from 'node:crypto' -import { FileDownloadLocation, Thumbnail } from '@mtcute/core' +import { expect } from 'chai' +import { describe, it } from 'mocha' +import type { FileDownloadLocation } from '@mtcute/core' +import { Thumbnail } from '@mtcute/core' import { TelegramClient } from '@mtcute/core/client.js' import { sleep } from '@mtcute/core/utils.js' diff --git a/e2e/node/ts/tests/04.updates.ts b/e2e/node/ts/tests/04.updates.ts index a6349b34..7bd50023 100644 --- a/e2e/node/ts/tests/04.updates.ts +++ b/e2e/node/ts/tests/04.updates.ts @@ -1,12 +1,11 @@ import { expect } from 'chai' import { describe, it } from 'mocha' - -import { Message } from '@mtcute/core' +import type { Message } from '@mtcute/core' import { TelegramClient } from '@mtcute/core/client.js' import { getApiParams, waitFor } from '../utils.js' -describe('4. handling updates', async function () { +describe('4. handling updates', function () { this.timeout(300_000) const tg1 = new TelegramClient(getApiParams('dc1.session')) @@ -27,7 +26,7 @@ describe('4. handling updates', async function () { it('should send and receive messages', async () => { const tg1Messages: Message[] = [] - tg1.on('new_message', (msg) => tg1Messages.push(msg)) + tg1.on('new_message', msg => tg1Messages.push(msg)) const [tg1User] = await tg1.getUsers('self') let username = tg1User!.username @@ -44,7 +43,8 @@ describe('4. handling updates', async function () { expect(sentMsg.chat.id).to.equal(tg1User!.id) await waitFor(() => { - expect(tg1Messages.find((msg) => msg.text === messageText)).to.exist + // eslint-disable-next-line ts/no-unused-expressions + expect(tg1Messages.find(msg => msg.text === messageText)).to.exist }) }) }) diff --git a/e2e/node/ts/tests/05.worker.ts b/e2e/node/ts/tests/05.worker.ts index b00cd4f8..bdb3d91c 100644 --- a/e2e/node/ts/tests/05.worker.ts +++ b/e2e/node/ts/tests/05.worker.ts @@ -1,16 +1,17 @@ -/* eslint-disable no-restricted-imports */ +import path from 'node:path' +import { Worker } from 'node:worker_threads' + import { expect } from 'chai' import { describe, it } from 'mocha' -import path from 'path' -import { Worker } from 'worker_threads' - import { TelegramClient } from '@mtcute/core/client.js' -import { Long, Message, TelegramWorkerPort, tl } from '@mtcute/node' +import type { Message } from '@mtcute/node' +import { Long, TelegramWorkerPort, tl } from '@mtcute/node' import { getApiParams, waitFor } from '../utils.js' + import type { CustomMethods } from './_worker.js' -describe('5. worker', async function () { +describe('5. worker', function () { this.timeout(300_000) const worker = new Worker(path.resolve(__dirname, '_worker.js')) @@ -20,7 +21,7 @@ describe('5. worker', async function () { }) const portClient = new TelegramClient({ client: port }) - it('should make api calls', async function () { + it('should make api calls', async () => { const res = await port.call({ _: 'help.getConfig' }) expect(res._).to.equal('config') @@ -29,7 +30,7 @@ describe('5. worker', async function () { expect(Long.isLong((premiumPromo.users[0] as tl.RawUser).accessHash)).to.equal(true) }) - it('should call custom methods', async function () { + it('should call custom methods', async () => { const hello = await port.invokeCustom('hello') expect(hello).to.equal('world') @@ -37,7 +38,7 @@ describe('5. worker', async function () { expect(sum).to.equal(5) }) - it('should throw errors', async function () { + it('should throw errors', async () => { try { await port.call({ _: 'test.useConfigSimple' }) throw new Error('should have thrown') @@ -46,7 +47,7 @@ describe('5. worker', async function () { } }) - it('should receive updates', async function () { + it('should receive updates', async () => { const client2 = new TelegramClient(getApiParams('dc2.session')) try { @@ -86,6 +87,6 @@ describe('5. worker', async function () { this.afterAll(async () => { await port.close() - worker.terminate() + void worker.terminate() }) }) diff --git a/e2e/node/ts/tests/_worker.ts b/e2e/node/ts/tests/_worker.ts index 7b0f43f1..03ea259d 100644 --- a/e2e/node/ts/tests/_worker.ts +++ b/e2e/node/ts/tests/_worker.ts @@ -1,4 +1,4 @@ -import { WorkerCustomMethods } from '@mtcute/core/worker.js' +import type { WorkerCustomMethods } from '@mtcute/core/worker.js' import { BaseTelegramClient, TelegramWorker } from '@mtcute/node' import { getApiParams } from '../utils.js' diff --git a/e2e/node/ts/tests/packaging/base-client.ts b/e2e/node/ts/tests/packaging/base-client.ts index 665cbcef..a6d300f1 100644 --- a/e2e/node/ts/tests/packaging/base-client.ts +++ b/e2e/node/ts/tests/packaging/base-client.ts @@ -1,6 +1,5 @@ import { expect } from 'chai' import { describe, it } from 'mocha' - import { BaseTelegramClient } from '@mtcute/core/client.js' // @fix-import diff --git a/e2e/node/ts/tests/packaging/tl-schema.ts b/e2e/node/ts/tests/packaging/tl-schema.ts index 241fe134..529fa04b 100644 --- a/e2e/node/ts/tests/packaging/tl-schema.ts +++ b/e2e/node/ts/tests/packaging/tl-schema.ts @@ -1,7 +1,6 @@ import { expect } from 'chai' import Long from 'long' import { describe, it } from 'mocha' - import { setPlatform } from '@mtcute/core/platform.js' import { NodePlatform } from '@mtcute/node' import { tl } from '@mtcute/tl' @@ -29,16 +28,14 @@ describe('@mtcute/tl', () => { it('readers map works with TlBinaryReader', () => { const buf = p.hexDecode('4ca5e8dd7b00000000000000c801000000000000') - // eslint-disable-next-line const obj = TlBinaryReader.deserializeObject(__tlReaderMap, buf) expect(obj._).equal('inputPeerUser') expect(obj.userId).equal(123) - // eslint-disable-next-line expect(obj.accessHash.toString()).equal('456') }) it('correctly checks for combinator types', () => { - expect(tl.isAnyInputUser({ _: 'inputUserEmpty' })).to.be.true + expect(tl.isAnyInputUser({ _: 'inputUserEmpty' })).to.eq(true) }) }) diff --git a/e2e/node/ts/tests/packaging/wasm.ts b/e2e/node/ts/tests/packaging/wasm.ts index 27291ffa..1de0b398 100644 --- a/e2e/node/ts/tests/packaging/wasm.ts +++ b/e2e/node/ts/tests/packaging/wasm.ts @@ -1,6 +1,5 @@ import { expect } from 'chai' import { before, describe, it } from 'mocha' - import { NodeCryptoProvider } from '@mtcute/node/utils.js' import { ige256Decrypt, ige256Encrypt } from '@mtcute/wasm' diff --git a/e2e/node/ts/tsconfig.json b/e2e/node/ts/tsconfig.json index deed9d5a..2cbc7b39 100644 --- a/e2e/node/ts/tsconfig.json +++ b/e2e/node/ts/tsconfig.json @@ -1,28 +1,28 @@ { - "compilerOptions": { - "outDir": "./dist", - "module": "NodeNext", - "moduleResolution": "NodeNext", - "target": "es2020", - "allowJs": true, - "sourceMap": true, - "inlineSources": true, - "declaration": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "noImplicitAny": true, - "noImplicitThis": true, - "incremental": true, - "stripInternal": true, - "skipLibCheck": true, - "rootDir": "." - }, - "exclude": [ - "**/node_modules", - ], - "include": [ - "./tests", - "./utils.ts" - ] + "compilerOptions": { + "incremental": true, + "target": "es2020", + "rootDir": ".", + "module": "NodeNext", + "moduleResolution": "NodeNext", + "allowJs": true, + "strict": true, + "noImplicitAny": true, + "noImplicitThis": true, + "declaration": true, + "inlineSources": true, + "outDir": "./dist", + "sourceMap": true, + "stripInternal": true, + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "skipLibCheck": true + }, + "include": [ + "./tests", + "./utils.ts" + ], + "exclude": [ + "**/node_modules" + ] } diff --git a/e2e/node/ts/utils.ts b/e2e/node/ts/utils.ts index c39fa786..35472042 100644 --- a/e2e/node/ts/utils.ts +++ b/e2e/node/ts/utils.ts @@ -1,13 +1,13 @@ -// eslint-disable-next-line no-restricted-imports -import { join } from 'path' +import { join } from 'node:path' -import { MaybePromise, MemoryStorage } from '@mtcute/core' +import type { MaybePromise } from '@mtcute/core' +import { MemoryStorage } from '@mtcute/core' import { setPlatform } from '@mtcute/core/platform.js' import { LogManager, sleep } from '@mtcute/core/utils.js' import { NodePlatform, SqliteStorage, TcpTransport } from '@mtcute/node' import { NodeCryptoProvider } from '@mtcute/node/utils.js' -export const getApiParams = (storage?: string) => { +export function getApiParams(storage?: string) { if (!process.env.API_ID || !process.env.API_HASH) { throw new Error('API_ID and API_HASH env variables must be set') } @@ -15,7 +15,7 @@ export const getApiParams = (storage?: string) => { setPlatform(new NodePlatform()) return { - apiId: parseInt(process.env.API_ID), + apiId: Number.parseInt(process.env.API_ID), apiHash: process.env.API_HASH, testMode: true, storage: storage ? new SqliteStorage(join(__dirname, storage)) : new MemoryStorage(), diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 00000000..efb0b8de --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,126 @@ +import antfu from '@antfu/eslint-config' + +export default antfu({ + type: 'lib', + typescript: process.env.CI + ? { + tsconfigPath: 'tsconfig.json', + ignoresTypeAware: [ + '.config/**/*', + 'e2e/**', + ], + overrides: { + 'ts/consistent-type-imports': 'off', + }, + } + : true, + yaml: false, + markdown: false, + linterOptions: { + reportUnusedDisableDirectives: Boolean(process.env.CI), + }, + rules: { + 'style/indent': ['error', 4, { + offsetTernaryExpressions: false, + // the rest is from default config: https://github.com/eslint-stylistic/eslint-stylistic/blob/main/packages/eslint-plugin/configs/customize.ts + ArrayExpression: 1, + CallExpression: { arguments: 1 }, + flatTernaryExpressions: false, + FunctionDeclaration: { body: 1, parameters: 1 }, + FunctionExpression: { body: 1, parameters: 1 }, + ignoreComments: false, + ignoredNodes: [ + 'TemplateLiteral *', + 'TSUnionType', + 'TSIntersectionType', + 'TSTypeParameterInstantiation', + 'FunctionExpression > .params[decorators.length > 0]', + 'FunctionExpression > .params > :matches(Decorator, :not(:first-child))', + ], + ImportDeclaration: 1, + MemberExpression: 1, + ObjectExpression: 1, + outerIIFEBody: 1, + SwitchCase: 1, + VariableDeclarator: 1, + }], + 'style/max-len': ['error', { + code: 120, + ignoreComments: true, + ignoreStrings: true, + ignoreTemplateLiterals: true, + }], + 'curly': ['error', 'multi-line'], + 'style/brace-style': ['error', '1tbs', { allowSingleLine: true }], + 'node/prefer-global/process': ['error', 'always'], + 'node/prefer-global/buffer': ['error', 'always'], + 'no-restricted-globals': ['error', 'Buffer', '__dirname', 'require'], + 'style/quotes': ['error', 'single', { avoidEscape: true }], + 'test/consistent-test-it': 'off', + 'test/prefer-lowercase-title': 'off', + 'test/no-identical-title': 'off', + 'import/order': ['error', { 'newlines-between': 'always' }], + 'antfu/if-newline': 'off', + 'import/no-relative-packages': 'error', + 'style/max-statements-per-line': ['error', { max: 2 }], + 'ts/no-redeclare': 'off', + 'eslint-comments/no-unlimited-disable': 'off', + 'no-cond-assign': 'off', + 'ts/explicit-function-return-type': 'off', + 'no-labels': 'off', + 'no-restricted-syntax': 'off', + 'unicorn/no-new-array': 'off', + 'jsdoc/check-param-names': 'off', // todo: will fix in another iteration + 'jsdoc/require-returns-description': 'off', // todo: will fix in another iteration + 'ts/no-unsafe-member-access': 'off', + 'ts/no-dynamic-delete': 'off', + 'ts/strict-boolean-expressions': 'off', + 'ts/unbound-method': 'off', + 'ts/no-invalid-void-type': 'off', + 'ts/no-unsafe-enum-comparison': 'off', + 'ts/promise-function-async': 'off', + 'dot-notation': 'off', + 'ts/dot-notation': 'off', + 'ts/switch-exhaustiveness-check': 'off', + 'ts/restrict-template-expressions': 'off', + 'ts/method-signature-style': 'off', + }, +}, { + ignores: [ + // codegen + 'packages/tl/binary/rsa-keys.js', + 'packages/tl/binary/reader.js', + 'packages/tl/binary/writer.js', + 'packages/tl/index.js', + 'packages/tl/index.d.ts', + 'packages/tl/*.json', + 'packages/core/utils.ts', + 'e2e/deno/.jsr-data', + 'e2e/node/.verdaccio', + ], +}, { + files: ['e2e/**', 'packages/node/**', 'packages/bun/**'], + rules: { + 'no-restricted-globals': 'off', + }, +}, { + files: ['packages/bun/**', 'packages/deno/**'], + rules: { + 'no-restricted-imports': 'off', + 'import/no-relative-packages': 'off', // common-internals is symlinked from node + }, +}, { + files: ['**/scripts/**', '**/*.cjs'], + rules: { + 'no-restricted-imports': 'off', + 'no-restricted-globals': 'off', + 'no-console': 'off', + }, +}, { + files: ['packages/create-*/**', 'packages/deno/**'], + rules: { + 'node/prefer-global/process': ['error', 'never'], + 'node/prefer-global/buffer': ['error', 'never'], + 'no-console': 'off', + }, +}) diff --git a/package.json b/package.json index f58f944f..b6430160 100644 --- a/package.json +++ b/package.json @@ -1,87 +1,75 @@ { - "name": "mtcute-workspace", - "private": true, - "version": "0.16.6", - "description": "Type-safe library for MTProto (Telegram API) for browser and NodeJS", - "license": "MIT", - "author": "alina sireneva ", - "keywords": [ - "telegram", - "telegram-api", - "telegram-bot", - "telegram-library", - "mtproto", - "tgbot", - "userbot", - "api" - ], - "repository": { - "type": "git", - "url": "https://github.com/mtcute/mtcute" - }, - "homepage": "https://mtcute.dev", - "workspaces": [ - "packages/*" - ], - "scripts": { - "postinstall": "node scripts/validate-deps-versions.mjs && node scripts/remove-jsr-sourcefiles.mjs", - "test": "pnpm run -r test && vitest --config .config/vite.mts run", - "test:dev": "vitest --config .config/vite.mts watch", - "test:ui": "vitest --config .config/vite.mts --ui", - "test:coverage": "vitest --config .config/vite.mts run --coverage", - "test:ci": "vitest --config .config/vite.mts run --coverage.enabled --coverage.reporter=json", - "test:browser": "vitest --config .config/vite.browser.mts run", - "test:browser:dev": "vitest --config .config/vite.browser.mts watch", - "lint": "eslint .", - "lint:ci": "NODE_OPTIONS=\\\"--max_old_space_size=8192\\\" eslint --config .config/eslint.ci.js .", - "lint:tsc": "rimraf packages/**/dist && pnpm -r --workspace-concurrency=4 exec tsc --build", - "lint:tsc:ci": "pnpm -r exec tsc --build", - "lint:dpdm": "dpdm -T --no-warning --no-tree --exit-code circular:1 packages/*", - "lint:fix": "eslint --fix .", - "format": "prettier --write \"packages/**/*.ts\"", - "publish-all": "node scripts/publish.js all", - "docs": "typedoc --options .config/typedoc/config.cjs", - "build-package": "node scripts/build-package.js" - }, - "devDependencies": { - "@teidesu/slow-types-compiler": "1.1.0", - "@types/node": "20.10.0", - "@types/deno": "npm:@teidesu/deno-types@1.43.1", - "@types/ws": "8.5.4", - "@typescript-eslint/eslint-plugin": "6.4.0", - "@typescript-eslint/parser": "6.4.0", - "@vitest/browser": "1.4.0", - "@vitest/coverage-v8": "1.4.0", - "@vitest/expect": "1.4.0", - "@vitest/spy": "1.4.0", - "@vitest/ui": "1.4.0", - "chai": "5.1.0", - "cjs-module-lexer": "1.2.3", - "dotenv-flow": "3.2.0", - "dpdm": "3.14.0", - "esbuild": "0.18.20", - "eslint": "8.47.0", - "eslint-config-prettier": "8.8.0", - "eslint-import-resolver-typescript": "3.6.0", - "eslint-plugin-ascii": "1.0.0", - "eslint-plugin-import": "2.28.0", - "eslint-plugin-simple-import-sort": "10.0.0", - "glob": "10.2.6", - "playwright": "1.42.1", - "prettier": "3.0.3", - "rimraf": "5.0.1", - "semver": "7.5.1", - "ts-node": "10.9.1", - "tsconfig-paths": "4.2.0", - "typedoc": "0.25.12", - "typescript": "5.4.3", - "vite": "5.1.6", - "vite-plugin-node-polyfills": "0.21.0", - "vitest": "1.4.0" - }, - "packageManager": "pnpm@9.0.6", - "prettier": "./.config/prettier.cjs", - "eslintConfig": { - "extends": "./.config/eslint.cjs" - } + "name": "mtcute-workspace", + "type": "module", + "version": "0.16.6", + "private": true, + "packageManager": "pnpm@9.0.6", + "description": "Type-safe library for MTProto (Telegram API) for browser and NodeJS", + "author": "alina sireneva ", + "license": "MIT", + "homepage": "https://mtcute.dev", + "repository": { + "type": "git", + "url": "https://github.com/mtcute/mtcute" + }, + "keywords": [ + "telegram", + "telegram-api", + "telegram-bot", + "telegram-library", + "mtproto", + "tgbot", + "userbot", + "api" + ], + "workspaces": [ + "packages/*" + ], + "scripts": { + "postinstall": "node scripts/validate-deps-versions.js && node scripts/remove-jsr-sourcefiles.js", + "test": "pnpm run -r test && vitest --config .config/vite.ts run", + "test:dev": "vitest --config .config/vite.ts watch", + "test:ui": "vitest --config .config/vite.ts --ui", + "test:coverage": "vitest --config .config/vite.ts run --coverage", + "test:ci": "vitest --config .config/vite.ts run --coverage.enabled --coverage.reporter=json", + "test:browser": "vitest --config .config/vite.browser.ts run", + "test:browser:dev": "vitest --config .config/vite.browser.ts watch", + "lint": "eslint", + "lint:ci": "CI=1 NODE_OPTIONS=\\\"--max_old_space_size=8192\\\" eslint", + "lint:tsc": "rimraf packages/**/dist packages/**/*.tsbuildinfo && pnpm -r --workspace-concurrency=4 exec tsc --build", + "lint:tsc:ci": "pnpm -r exec tsc --build", + "lint:dpdm": "dpdm -T --no-warning --no-tree --exit-code circular:1 packages/*", + "lint:fix": "eslint --fix .", + "publish-all": "node scripts/publish.js all", + "docs": "typedoc --options .config/typedoc/config.cjs", + "build-package": "node scripts/build-package.js" + }, + "devDependencies": { + "@antfu/eslint-config": "2.26.0", + "@teidesu/slow-types-compiler": "1.1.0", + "@types/deno": "npm:@teidesu/deno-types@1.45.5", + "@types/node": "20.10.0", + "@types/ws": "8.5.4", + "@vitest/browser": "2.0.5", + "@vitest/coverage-v8": "2.0.5", + "@vitest/expect": "2.0.5", + "@vitest/spy": "2.0.5", + "@vitest/ui": "2.0.5", + "chai": "5.1.0", + "cjs-module-lexer": "1.2.3", + "dotenv-flow": "4.1.0", + "dpdm": "3.14.0", + "esbuild": "0.23.0", + "eslint": "9.9.0", + "glob": "11.0.0", + "playwright": "1.42.1", + "rimraf": "6.0.1", + "semver": "7.5.1", + "tsx": "4.17.0", + "typedoc": "0.26.5", + "typescript": "5.5.4", + "vite": "5.1.6", + "vite-plugin-node-polyfills": "0.22.0", + "vitest": "2.0.5" + } } diff --git a/packages/bun/package.json b/packages/bun/package.json index af2a7a8f..f98784a0 100644 --- a/packages/bun/package.json +++ b/packages/bun/package.json @@ -1,29 +1,29 @@ { - "name": "@mtcute/bun", - "private": true, - "version": "0.16.6", - "description": "Meta-package for Bun", - "author": "alina sireneva ", - "license": "MIT", - "type": "module", - "sideEffects": false, - "scripts": { - "docs": "typedoc", - "build": "pnpm run -w build-package bun" - }, - "exports": { - ".": "./src/index.ts", - "./utils.js": "./src/utils.ts", - "./methods.js": "./src/methods.ts" - }, - "dependencies": { - "@mtcute/core": "workspace:^", - "@mtcute/wasm": "workspace:^", - "@mtcute/markdown-parser": "workspace:^", - "@mtcute/html-parser": "workspace:^" - }, - "devDependencies": { - "@mtcute/test": "workspace:^", - "bun-types": "1.0.33" - } + "name": "@mtcute/bun", + "type": "module", + "version": "0.16.6", + "private": true, + "description": "Meta-package for Bun", + "author": "alina sireneva ", + "license": "MIT", + "sideEffects": false, + "exports": { + ".": "./src/index.ts", + "./utils.js": "./src/utils.ts", + "./methods.js": "./src/methods.ts" + }, + "scripts": { + "docs": "typedoc", + "build": "pnpm run -w build-package bun" + }, + "dependencies": { + "@mtcute/core": "workspace:^", + "@mtcute/html-parser": "workspace:^", + "@mtcute/markdown-parser": "workspace:^", + "@mtcute/wasm": "workspace:^" + }, + "devDependencies": { + "@mtcute/test": "workspace:^", + "bun-types": "1.0.33" + } } diff --git a/packages/bun/src/client.ts b/packages/bun/src/client.ts index 3baa53e3..2349b5f7 100644 --- a/packages/bun/src/client.ts +++ b/packages/bun/src/client.ts @@ -1,11 +1,15 @@ -import { createInterface, Interface as RlInterface } from 'readline' +import type { Interface as RlInterface } from 'node:readline' +import { createInterface } from 'node:readline' +import type { Readable } from 'node:stream' -import { FileDownloadLocation, FileDownloadParameters, ITelegramStorageProvider, PartialOnly, User } from '@mtcute/core' +import type { FileDownloadLocation, FileDownloadParameters, ITelegramStorageProvider, PartialOnly, User } from '@mtcute/core' +import type { + BaseTelegramClientOptions as BaseTelegramClientOptionsBase, + TelegramClientOptions, +} from '@mtcute/core/client.js' import { BaseTelegramClient as BaseTelegramClientBase, - BaseTelegramClientOptions as BaseTelegramClientOptionsBase, TelegramClient as TelegramClientBase, - TelegramClientOptions, } from '@mtcute/core/client.js' import { setPlatform } from '@mtcute/core/platform.js' @@ -48,9 +52,9 @@ export class BaseTelegramClient extends BaseTelegramClientBase { transport: () => new TcpTransport(), ...opts, storage: - typeof opts.storage === 'string' ? - new SqliteStorage(opts.storage) : - opts.storage ?? new SqliteStorage('client.session'), + typeof opts.storage === 'string' + ? new SqliteStorage(opts.storage) + : opts.storage ?? new SqliteStorage('client.session'), }) } } @@ -91,7 +95,7 @@ export class TelegramClient extends TelegramClientBase { }) } - return new Promise((res) => this._rl?.question(text, res)) + return new Promise(res => this._rl?.question(text, res)) } close(): Promise { @@ -131,7 +135,7 @@ export class TelegramClient extends TelegramClientBase { this.start(params) .then(then) - .catch((err) => this.emitError(err)) + .catch(err => this.emitError(err)) } downloadToFile( @@ -142,7 +146,7 @@ export class TelegramClient extends TelegramClientBase { return downloadToFile(this, filename, location, params) } - downloadAsNodeStream(location: FileDownloadLocation, params?: FileDownloadParameters | undefined) { + downloadAsNodeStream(location: FileDownloadLocation, params?: FileDownloadParameters | undefined): Readable { return downloadAsNodeStream(this, location, params) } } diff --git a/packages/bun/src/methods/download-file.ts b/packages/bun/src/methods/download-file.ts index f847b361..68523f16 100644 --- a/packages/bun/src/methods/download-file.ts +++ b/packages/bun/src/methods/download-file.ts @@ -1,6 +1,7 @@ import { unlinkSync } from 'node:fs' -import { FileDownloadLocation, FileDownloadParameters, FileLocation, ITelegramClient } from '@mtcute/core' +import type { FileDownloadLocation, FileDownloadParameters, ITelegramClient } from '@mtcute/core' +import { FileLocation } from '@mtcute/core' import { downloadAsIterable } from '@mtcute/core/methods.js' /** diff --git a/packages/bun/src/methods/download-node-stream.ts b/packages/bun/src/methods/download-node-stream.ts index fa9874cd..5187640a 100644 --- a/packages/bun/src/methods/download-node-stream.ts +++ b/packages/bun/src/methods/download-node-stream.ts @@ -1,6 +1,6 @@ -import { Readable } from 'stream' +import { Readable } from 'node:stream' -import { FileDownloadLocation, FileDownloadParameters, ITelegramClient } from '@mtcute/core' +import type { FileDownloadLocation, FileDownloadParameters, ITelegramClient } from '@mtcute/core' import { downloadAsStream } from '@mtcute/core/methods.js' /** diff --git a/packages/bun/src/platform.ts b/packages/bun/src/platform.ts index 39f8c937..60ff10ce 100644 --- a/packages/bun/src/platform.ts +++ b/packages/bun/src/platform.ts @@ -1,4 +1,4 @@ -import * as os from 'os' +import * as os from 'node:os' import { NodePlatform } from './common-internals-node/platform.js' import { normalizeFile } from './utils/normalize-file.js' diff --git a/packages/bun/src/sqlite/driver.ts b/packages/bun/src/sqlite/driver.ts index 362e5f97..a9ce5c78 100644 --- a/packages/bun/src/sqlite/driver.ts +++ b/packages/bun/src/sqlite/driver.ts @@ -1,6 +1,6 @@ import { Database } from 'bun:sqlite' - -import { BaseSqliteStorageDriver, ISqliteDatabase } from '@mtcute/core' +import type { ISqliteDatabase } from '@mtcute/core' +import { BaseSqliteStorageDriver } from '@mtcute/core' export interface SqliteStorageDriverOptions { /** @@ -19,7 +19,7 @@ export interface SqliteStorageDriverOptions { export class SqliteStorageDriver extends BaseSqliteStorageDriver { constructor( readonly filename = ':memory:', - readonly params?: SqliteStorageDriverOptions, + readonly params?: SqliteStorageDriverOptions | undefined, ) { super() } diff --git a/packages/bun/src/sqlite/index.ts b/packages/bun/src/sqlite/index.ts index 882b228d..f4fbb33c 100644 --- a/packages/bun/src/sqlite/index.ts +++ b/packages/bun/src/sqlite/index.ts @@ -1,13 +1,14 @@ import { BaseSqliteStorage } from '@mtcute/core' -import { SqliteStorageDriver, SqliteStorageDriverOptions } from './driver.js' +import type { SqliteStorageDriverOptions } from './driver.js' +import { SqliteStorageDriver } from './driver.js' export { SqliteStorageDriver } from './driver.js' export class SqliteStorage extends BaseSqliteStorage { constructor( readonly filename = ':memory:', - readonly params?: SqliteStorageDriverOptions, + readonly params?: SqliteStorageDriverOptions | undefined, ) { super(new SqliteStorageDriver(filename, params)) } diff --git a/packages/bun/src/sqlite/sqlite.test.ts b/packages/bun/src/sqlite/sqlite.test.ts index 6810d931..bc6504a8 100644 --- a/packages/bun/src/sqlite/sqlite.test.ts +++ b/packages/bun/src/sqlite/sqlite.test.ts @@ -1,5 +1,4 @@ import { afterAll, beforeAll, describe } from 'vitest' - import { LogManager } from '@mtcute/core/utils.js' import { testAuthKeysRepository, diff --git a/packages/bun/src/utils/crypto.test.ts b/packages/bun/src/utils/crypto.test.ts index 17292c91..5bb77b50 100644 --- a/packages/bun/src/utils/crypto.test.ts +++ b/packages/bun/src/utils/crypto.test.ts @@ -1,5 +1,4 @@ import { describe } from 'vitest' - import { testCryptoProvider } from '@mtcute/test' if (import.meta.env.TEST_ENV === 'bun') { diff --git a/packages/bun/src/utils/crypto.ts b/packages/bun/src/utils/crypto.ts index 02840d3f..7c79a07b 100644 --- a/packages/bun/src/utils/crypto.ts +++ b/packages/bun/src/utils/crypto.ts @@ -1,7 +1,7 @@ -// eslint-disable-next-line no-restricted-imports -import { readFile } from 'fs/promises' +import { readFile } from 'node:fs/promises' -import { BaseCryptoProvider, IAesCtr, ICryptoProvider, IEncryptionScheme } from '@mtcute/core/utils.js' +import type { IAesCtr, ICryptoProvider, IEncryptionScheme } from '@mtcute/core/utils.js' +import { BaseCryptoProvider } from '@mtcute/core/utils.js' import { createCtr256, ctr256, @@ -28,7 +28,6 @@ const ALGO_TO_SUBTLE: Record = { export class BunCryptoProvider extends BaseCryptoProvider implements ICryptoProvider { async initialize(): Promise { - // eslint-disable-next-line no-restricted-globals const wasmFile = require.resolve('@mtcute/wasm/mtcute.wasm') const wasm = await readFile(wasmFile) initSync(wasm) @@ -49,7 +48,7 @@ export class BunCryptoProvider extends BaseCryptoProvider implements ICryptoProv const ctx = createCtr256(key, iv) return { - process: (data) => ctr256(ctx, data), + process: data => ctr256(ctx, data), close: () => freeCtr256(ctx), } } @@ -74,7 +73,7 @@ export class BunCryptoProvider extends BaseCryptoProvider implements ICryptoProv keyMaterial, (keylen || 64) * 8, ) - .then((result) => new Uint8Array(result)) + .then(result => new Uint8Array(result)) } sha1(data: Uint8Array): Uint8Array { @@ -113,7 +112,7 @@ export class BunCryptoProvider extends BaseCryptoProvider implements ICryptoProv return gunzip(data) } - randomFill(buf: Uint8Array) { + randomFill(buf: Uint8Array): void { crypto.getRandomValues(buf) } } diff --git a/packages/bun/src/utils/normalize-file.ts b/packages/bun/src/utils/normalize-file.ts index 49b00f75..540b6c15 100644 --- a/packages/bun/src/utils/normalize-file.ts +++ b/packages/bun/src/utils/normalize-file.ts @@ -1,24 +1,28 @@ -import { BunFile } from 'bun' -import { ReadStream } from 'fs' -import { stat } from 'fs/promises' -import { basename } from 'path' -import { Readable as NodeReadable } from 'stream' +import { ReadStream } from 'node:fs' +import { stat } from 'node:fs/promises' +import { basename } from 'node:path' +import { Readable as NodeReadable } from 'node:stream' -import { UploadFileLike } from '@mtcute/core' +import type { BunFile } from 'bun' +import type { UploadFileLike } from '@mtcute/core' // https://github.com/oven-sh/bun/issues/10481 function isBunFile(file: unknown): file is BunFile { return file instanceof Blob && 'name' in file && file.name.length > 0 } -export async function normalizeFile(file: UploadFileLike) { +export async function normalizeFile(file: UploadFileLike): Promise<{ + file: UploadFileLike + fileName?: string | undefined + fileSize?: number +} | null> { if (typeof file === 'string') { file = Bun.file(file) } if (isBunFile(file)) { return { - file: file, + file, fileName: file.name, fileSize: file.size, } @@ -27,7 +31,7 @@ export async function normalizeFile(file: UploadFileLike) { // while these are not Bun-specific, they still may happen if (file instanceof ReadStream) { const fileName = basename(file.path.toString()) - const fileSize = await stat(file.path.toString()).then((stat) => stat.size) + const fileSize = await stat(file.path.toString()).then(stat => stat.size) return { file: NodeReadable.toWeb(file) as unknown as ReadableStream, diff --git a/packages/bun/src/utils/tcp.ts b/packages/bun/src/utils/tcp.ts index e8141d8b..c0a6f6cd 100644 --- a/packages/bun/src/utils/tcp.ts +++ b/packages/bun/src/utils/tcp.ts @@ -1,8 +1,9 @@ -import { Socket } from 'bun' -import EventEmitter from 'events' +import EventEmitter from 'node:events' -import { IntermediatePacketCodec, IPacketCodec, ITelegramTransport, MtcuteError, TransportState } from '@mtcute/core' -import { BasicDcOption, ICryptoProvider, Logger } from '@mtcute/core/utils.js' +import type { Socket } from 'bun' +import type { IPacketCodec, ITelegramTransport } from '@mtcute/core' +import { IntermediatePacketCodec, MtcuteError, TransportState } from '@mtcute/core' +import type { BasicDcOption, ICryptoProvider, Logger } from '@mtcute/core/utils.js' /** * Base for TCP transports. @@ -41,7 +42,7 @@ export abstract class BaseTcpTransport extends EventEmitter implements ITelegram return this._currentDc } - // eslint-disable-next-line @typescript-eslint/no-unused-vars + // eslint-disable-next-line unused-imports/no-unused-vars connect(dc: BasicDcOption, testMode: boolean): void { if (this._state !== TransportState.Idle) { throw new MtcuteError('Transport is not IDLE') @@ -49,8 +50,8 @@ export abstract class BaseTcpTransport extends EventEmitter implements ITelegram if (!this.packetCodecInitialized) { this._packetCodec.setup?.(this._crypto, this.log) - this._packetCodec.on('error', (err) => this.emit('error', err)) - this._packetCodec.on('packet', (buf) => this.emit('message', buf)) + this._packetCodec.on('error', err => this.emit('error', err)) + this._packetCodec.on('packet', buf => this.emit('message', buf)) this.packetCodecInitialized = true } @@ -148,5 +149,5 @@ export abstract class BaseTcpTransport extends EventEmitter implements ITelegram } export class TcpTransport extends BaseTcpTransport { - _packetCodec = new IntermediatePacketCodec() + _packetCodec: IntermediatePacketCodec = new IntermediatePacketCodec() } diff --git a/packages/bun/src/worker.ts b/packages/bun/src/worker.ts index 877db612..477e87e0 100644 --- a/packages/bun/src/worker.ts +++ b/packages/bun/src/worker.ts @@ -1,18 +1,20 @@ -import { parentPort, Worker } from 'worker_threads' +import { Worker, parentPort } from 'node:worker_threads' import { setPlatform } from '@mtcute/core/platform.js' -import { +import type { ClientMessageHandler, RespondFn, SendFn, SomeWorker, - TelegramWorker as TelegramWorkerBase, TelegramWorkerOptions, - TelegramWorkerPort as TelegramWorkerPortBase, TelegramWorkerPortOptions, WorkerCustomMethods, WorkerMessageHandler, } from '@mtcute/core/worker.js' +import { + TelegramWorker as TelegramWorkerBase, + TelegramWorkerPort as TelegramWorkerPortBase, +} from '@mtcute/core/worker.js' import { BunPlatform } from './platform.js' @@ -35,8 +37,8 @@ export class TelegramWorker extends TelegramWorke const respond: RespondFn = port.postMessage.bind(port) - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument - parentPort.on('message', (message) => handler(message, respond)) + // eslint-disable-next-line ts/no-unsafe-argument + parentPort.on('message', message => handler(message, respond)) return respond } @@ -50,7 +52,7 @@ export class TelegramWorkerPort extends TelegramW connectToWorker(worker: SomeWorker, handler: ClientMessageHandler): [SendFn, () => void] { if (!(worker instanceof Worker)) { - throw new Error('Only worker_threads are supported') + throw new TypeError('Only worker_threads are supported') } const send: SendFn = worker.postMessage.bind(worker) diff --git a/packages/bun/tsconfig.json b/packages/bun/tsconfig.json index 9d487df1..30689cd4 100644 --- a/packages/bun/tsconfig.json +++ b/packages/bun/tsconfig.json @@ -1,20 +1,20 @@ { - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "./dist", - "rootDir": "./src", - "types": [ - "bun-types", - "vite/client" - ] - }, - "include": [ - "./src", + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "./src", + "types": [ + "bun-types", + "vite/client" ], - "references": [ - { "path": "../core" }, - { "path": "../dispatcher" }, - { "path": "../html-parser" }, - { "path": "../markdown-parser" } - ] + "outDir": "./dist" + }, + "references": [ + { "path": "../core" }, + { "path": "../dispatcher" }, + { "path": "../html-parser" }, + { "path": "../markdown-parser" } + ], + "include": [ + "./src" + ] } diff --git a/packages/convert/README.md b/packages/convert/README.md index 58360337..f9b580fd 100644 --- a/packages/convert/README.md +++ b/packages/convert/README.md @@ -8,7 +8,7 @@ Currently only the libraries that support exporting sessions to strings are supp ## [Telethon](https://github.com/LonamiWebs/Telethon) -> Telethon v2 seems to have removed the ability to export sessions, +> Telethon v2 seems to have removed the ability to export sessions, > so it's currently not supported ```ts diff --git a/packages/convert/package.json b/packages/convert/package.json index 44096fea..92402ee6 100644 --- a/packages/convert/package.json +++ b/packages/convert/package.json @@ -1,20 +1,20 @@ { - "name": "@mtcute/convert", - "private": true, - "version": "0.16.0", - "description": "Cross-library session conversion utilities", - "author": "alina sireneva ", - "license": "MIT", - "type": "module", - "sideEffects": false, - "scripts": { - "build": "pnpm run -w build-package convert" - }, - "exports": "./src/index.ts", - "dependencies": { - "@mtcute/core": "workspace:^" - }, - "devDependencies": { - "@mtcute/test": "workspace:^" - } + "name": "@mtcute/convert", + "type": "module", + "version": "0.16.0", + "private": true, + "description": "Cross-library session conversion utilities", + "author": "alina sireneva ", + "license": "MIT", + "sideEffects": false, + "exports": "./src/index.ts", + "scripts": { + "build": "pnpm run -w build-package convert" + }, + "dependencies": { + "@mtcute/core": "workspace:^" + }, + "devDependencies": { + "@mtcute/test": "workspace:^" + } } diff --git a/packages/convert/src/dcs.ts b/packages/convert/src/dcs.ts index a02f883b..d42afcad 100644 --- a/packages/convert/src/dcs.ts +++ b/packages/convert/src/dcs.ts @@ -1,4 +1,4 @@ -import { DcOptions } from '@mtcute/core/utils.js' +import type { DcOptions } from '@mtcute/core/utils.js' // some libraries only store the DCs in the source code, so we need to map them to the correct DCs // this may not be very accurate, but it's better than nothing @@ -7,7 +7,7 @@ import { DcOptions } from '@mtcute/core/utils.js' // we'll also only map to ipv4 since that's more portable export const DC_MAPPING_PROD: Record = { - '1': { + 1: { main: { id: 1, ipAddress: '149.154.175.56', @@ -19,7 +19,7 @@ export const DC_MAPPING_PROD: Record = { port: 443, }, }, - '2': { + 2: { main: { id: 2, ipAddress: '149.154.167.41', @@ -31,7 +31,7 @@ export const DC_MAPPING_PROD: Record = { port: 443, }, }, - '3': { + 3: { main: { id: 3, ipAddress: '149.154.175.100', @@ -43,7 +43,7 @@ export const DC_MAPPING_PROD: Record = { port: 443, }, }, - '4': { + 4: { main: { id: 4, ipAddress: '149.154.167.91', @@ -55,7 +55,7 @@ export const DC_MAPPING_PROD: Record = { port: 443, }, }, - '5': { + 5: { main: { id: 5, ipAddress: '91.108.56.179', @@ -70,7 +70,7 @@ export const DC_MAPPING_PROD: Record = { } export const DC_MAPPING_TEST: Record = { - '1': { + 1: { main: { id: 1, ipAddress: '149.154.175.10', @@ -82,7 +82,7 @@ export const DC_MAPPING_TEST: Record = { port: 80, }, }, - '2': { + 2: { main: { id: 2, ipAddress: '149.154.167.40', @@ -94,7 +94,7 @@ export const DC_MAPPING_TEST: Record = { port: 443, }, }, - '3': { + 3: { main: { id: 3, ipAddress: '149.154.175.117', @@ -109,5 +109,5 @@ export const DC_MAPPING_TEST: Record = { } export function isTestDc(ip: string): boolean { - return Object.values(DC_MAPPING_TEST).some((dc) => dc.main.ipAddress === ip || dc.media.ipAddress === ip) + return Object.values(DC_MAPPING_TEST).some(dc => dc.main.ipAddress === ip || dc.media.ipAddress === ip) } diff --git a/packages/convert/src/gramjs/__fixtures__/generate.cjs b/packages/convert/src/gramjs/__fixtures__/generate.cjs index 982fba2d..591a3c4a 100644 --- a/packages/convert/src/gramjs/__fixtures__/generate.cjs +++ b/packages/convert/src/gramjs/__fixtures__/generate.cjs @@ -1,6 +1,5 @@ -/* eslint-disable no-console */ -const { execSync } = require('child_process') -const fs = require('fs') +const { execSync } = require('node:child_process') +const fs = require('node:fs') const VERSION = '2.19.20' const TMP_DIR = '/tmp/gramjs' @@ -36,6 +35,7 @@ async function main() { const session = stringSession.save() fs.writeFileSync( + // eslint-disable-next-line node/no-path-concat `${__dirname}/session.ts`, `export const GRAMJS_SESSION = '${session}'\n`, ) diff --git a/packages/convert/src/gramjs/__fixtures__/session.ts b/packages/convert/src/gramjs/__fixtures__/session.ts index b05d3643..7a8433a5 100644 --- a/packages/convert/src/gramjs/__fixtures__/session.ts +++ b/packages/convert/src/gramjs/__fixtures__/session.ts @@ -1,2 +1,2 @@ -export const GRAMJS_SESSION = - '1AgAOMTQ5LjE1NC4xNjcuNDABu60obcEYS8Yb/I7YlCwaLvW84dXCX2oGnBYG+zuMciJhHP99c8ZJvwxJgH8yU1QrqI+Gh0kK0JAuQucIpDfq/jJVLZ1ZRimq5yy1XbeEs65gtZA1+SUwZRXahh+NzGbPmOVUMCnCtRONo9GNvcx/QxSXRrh7T/K0YYN1iHsK1vJDk8/SUnthvTNmRycC+JLn4fMtctqP4Le2WPOH/deYbUF0BlwmR77M7fv1GZSInqCgWReaIl5nvn0IqA4mOCTkdOgcvwOiB2UmXwiyInxRuLdBIyLbBUDCuTlmL1m3FJqbuEpZEUJnoJf2YDFZ1wR6TfL0MUS1VwnjOcy3WIIFwwg=' +export const GRAMJS_SESSION + = '1AgAOMTQ5LjE1NC4xNjcuNDABu60obcEYS8Yb/I7YlCwaLvW84dXCX2oGnBYG+zuMciJhHP99c8ZJvwxJgH8yU1QrqI+Gh0kK0JAuQucIpDfq/jJVLZ1ZRimq5yy1XbeEs65gtZA1+SUwZRXahh+NzGbPmOVUMCnCtRONo9GNvcx/QxSXRrh7T/K0YYN1iHsK1vJDk8/SUnthvTNmRycC+JLn4fMtctqP4Le2WPOH/deYbUF0BlwmR77M7fv1GZSInqCgWReaIl5nvn0IqA4mOCTkdOgcvwOiB2UmXwiyInxRuLdBIyLbBUDCuTlmL1m3FJqbuEpZEUJnoJf2YDFZ1wR6TfL0MUS1VwnjOcy3WIIFwwg=' diff --git a/packages/convert/src/gramjs/convert.test.ts b/packages/convert/src/gramjs/convert.test.ts index 1572fbf6..f18d5318 100644 --- a/packages/convert/src/gramjs/convert.test.ts +++ b/packages/convert/src/gramjs/convert.test.ts @@ -1,5 +1,4 @@ import { describe, expect, it } from 'vitest' - import { getPlatform } from '@mtcute/core/platform.js' import { GRAMJS_SESSION } from './__fixtures__/session.js' @@ -9,14 +8,14 @@ describe('gramjs/convert', () => { it('should correctly convert from gramjs sessions', () => { expect(convertFromGramjsSession(GRAMJS_SESSION)).toEqual({ authKey: getPlatform().hexDecode( - 'ad286dc1184bc61bfc8ed8942c1a2ef5bce1d5c25f6a069c1606fb3b8c722261' + - '1cff7d73c649bf0c49807f3253542ba88f8687490ad0902e42e708a437eafe32' + - '552d9d594629aae72cb55db784b3ae60b59035f925306515da861f8dcc66cf98' + - 'e5543029c2b5138da3d18dbdcc7f43149746b87b4ff2b4618375887b0ad6f243' + - '93cfd2527b61bd3366472702f892e7e1f32d72da8fe0b7b658f387fdd7986d41' + - '74065c2647beccedfbf51994889ea0a059179a225e67be7d08a80e263824e474' + - 'e81cbf03a20765265f08b2227c51b8b7412322db0540c2b939662f59b7149a9b' + - 'b84a59114267a097f6603159d7047a4df2f43144b55709e339ccb7588205c308', + 'ad286dc1184bc61bfc8ed8942c1a2ef5bce1d5c25f6a069c1606fb3b8c722261' + + '1cff7d73c649bf0c49807f3253542ba88f8687490ad0902e42e708a437eafe32' + + '552d9d594629aae72cb55db784b3ae60b59035f925306515da861f8dcc66cf98' + + 'e5543029c2b5138da3d18dbdcc7f43149746b87b4ff2b4618375887b0ad6f243' + + '93cfd2527b61bd3366472702f892e7e1f32d72da8fe0b7b658f387fdd7986d41' + + '74065c2647beccedfbf51994889ea0a059179a225e67be7d08a80e263824e474' + + 'e81cbf03a20765265f08b2227c51b8b7412322db0540c2b939662f59b7149a9b' + + 'b84a59114267a097f6603159d7047a4df2f43144b55709e339ccb7588205c308', ), primaryDcs: { main: { @@ -41,14 +40,14 @@ describe('gramjs/convert', () => { expect( convertToGramjsSession({ authKey: getPlatform().hexDecode( - 'ad286dc1184bc61bfc8ed8942c1a2ef5bce1d5c25f6a069c1606fb3b8c722261' + - '1cff7d73c649bf0c49807f3253542ba88f8687490ad0902e42e708a437eafe32' + - '552d9d594629aae72cb55db784b3ae60b59035f925306515da861f8dcc66cf98' + - 'e5543029c2b5138da3d18dbdcc7f43149746b87b4ff2b4618375887b0ad6f243' + - '93cfd2527b61bd3366472702f892e7e1f32d72da8fe0b7b658f387fdd7986d41' + - '74065c2647beccedfbf51994889ea0a059179a225e67be7d08a80e263824e474' + - 'e81cbf03a20765265f08b2227c51b8b7412322db0540c2b939662f59b7149a9b' + - 'b84a59114267a097f6603159d7047a4df2f43144b55709e339ccb7588205c308', + 'ad286dc1184bc61bfc8ed8942c1a2ef5bce1d5c25f6a069c1606fb3b8c722261' + + '1cff7d73c649bf0c49807f3253542ba88f8687490ad0902e42e708a437eafe32' + + '552d9d594629aae72cb55db784b3ae60b59035f925306515da861f8dcc66cf98' + + 'e5543029c2b5138da3d18dbdcc7f43149746b87b4ff2b4618375887b0ad6f243' + + '93cfd2527b61bd3366472702f892e7e1f32d72da8fe0b7b658f387fdd7986d41' + + '74065c2647beccedfbf51994889ea0a059179a225e67be7d08a80e263824e474' + + 'e81cbf03a20765265f08b2227c51b8b7412322db0540c2b939662f59b7149a9b' + + 'b84a59114267a097f6603159d7047a4df2f43144b55709e339ccb7588205c308', ), primaryDcs: { main: { diff --git a/packages/convert/src/gramjs/convert.ts b/packages/convert/src/gramjs/convert.ts index 05993b5a..60cc786c 100644 --- a/packages/convert/src/gramjs/convert.ts +++ b/packages/convert/src/gramjs/convert.ts @@ -1,7 +1,9 @@ -import { readStringSession, StringSessionData } from '@mtcute/core/utils.js' +import type { StringSessionData } from '@mtcute/core/utils.js' +import { readStringSession } from '@mtcute/core/utils.js' import { convertFromTelethonSession } from '../telethon/convert.js' -import { TelethonSession } from '../telethon/types.js' +import type { TelethonSession } from '../telethon/types.js' + import { parseGramjsSession } from './parse.js' import { serializeGramjsSession } from './serialize.js' diff --git a/packages/convert/src/gramjs/parse.test.ts b/packages/convert/src/gramjs/parse.test.ts index ec4dead1..8c944c08 100644 --- a/packages/convert/src/gramjs/parse.test.ts +++ b/packages/convert/src/gramjs/parse.test.ts @@ -1,5 +1,4 @@ import { describe, expect, it } from 'vitest' - import { getPlatform } from '@mtcute/core/platform.js' import { GRAMJS_SESSION } from './__fixtures__/session.js' @@ -13,14 +12,14 @@ describe('gramjs/parse', () => { port: 443, ipv6: false, authKey: getPlatform().hexDecode( - 'ad286dc1184bc61bfc8ed8942c1a2ef5bce1d5c25f6a069c1606fb3b8c722261' + - '1cff7d73c649bf0c49807f3253542ba88f8687490ad0902e42e708a437eafe32' + - '552d9d594629aae72cb55db784b3ae60b59035f925306515da861f8dcc66cf98' + - 'e5543029c2b5138da3d18dbdcc7f43149746b87b4ff2b4618375887b0ad6f243' + - '93cfd2527b61bd3366472702f892e7e1f32d72da8fe0b7b658f387fdd7986d41' + - '74065c2647beccedfbf51994889ea0a059179a225e67be7d08a80e263824e474' + - 'e81cbf03a20765265f08b2227c51b8b7412322db0540c2b939662f59b7149a9b' + - 'b84a59114267a097f6603159d7047a4df2f43144b55709e339ccb7588205c308', + 'ad286dc1184bc61bfc8ed8942c1a2ef5bce1d5c25f6a069c1606fb3b8c722261' + + '1cff7d73c649bf0c49807f3253542ba88f8687490ad0902e42e708a437eafe32' + + '552d9d594629aae72cb55db784b3ae60b59035f925306515da861f8dcc66cf98' + + 'e5543029c2b5138da3d18dbdcc7f43149746b87b4ff2b4618375887b0ad6f243' + + '93cfd2527b61bd3366472702f892e7e1f32d72da8fe0b7b658f387fdd7986d41' + + '74065c2647beccedfbf51994889ea0a059179a225e67be7d08a80e263824e474' + + 'e81cbf03a20765265f08b2227c51b8b7412322db0540c2b939662f59b7149a9b' + + 'b84a59114267a097f6603159d7047a4df2f43144b55709e339ccb7588205c308', ), }) }) diff --git a/packages/convert/src/gramjs/parse.ts b/packages/convert/src/gramjs/parse.ts index 950a975c..99623166 100644 --- a/packages/convert/src/gramjs/parse.ts +++ b/packages/convert/src/gramjs/parse.ts @@ -2,7 +2,7 @@ import { MtArgumentError } from '@mtcute/core' import { getPlatform } from '@mtcute/core/platform.js' import { dataViewFromBuffer } from '@mtcute/core/utils.js' -import { TelethonSession } from '../telethon/types.js' +import type { TelethonSession } from '../telethon/types.js' export function parseGramjsSession(session: string): TelethonSession { if (session[0] !== '1') { diff --git a/packages/convert/src/gramjs/serialize.test.ts b/packages/convert/src/gramjs/serialize.test.ts index 57936fe2..dd6a43d8 100644 --- a/packages/convert/src/gramjs/serialize.test.ts +++ b/packages/convert/src/gramjs/serialize.test.ts @@ -1,5 +1,4 @@ import { describe, expect, it } from 'vitest' - import { getPlatform } from '@mtcute/core/platform.js' import { GRAMJS_SESSION } from './__fixtures__/session.js' @@ -14,14 +13,14 @@ describe('gramjs/serialize', () => { port: 443, ipv6: false, authKey: getPlatform().hexDecode( - 'ad286dc1184bc61bfc8ed8942c1a2ef5bce1d5c25f6a069c1606fb3b8c722261' + - '1cff7d73c649bf0c49807f3253542ba88f8687490ad0902e42e708a437eafe32' + - '552d9d594629aae72cb55db784b3ae60b59035f925306515da861f8dcc66cf98' + - 'e5543029c2b5138da3d18dbdcc7f43149746b87b4ff2b4618375887b0ad6f243' + - '93cfd2527b61bd3366472702f892e7e1f32d72da8fe0b7b658f387fdd7986d41' + - '74065c2647beccedfbf51994889ea0a059179a225e67be7d08a80e263824e474' + - 'e81cbf03a20765265f08b2227c51b8b7412322db0540c2b939662f59b7149a9b' + - 'b84a59114267a097f6603159d7047a4df2f43144b55709e339ccb7588205c308', + 'ad286dc1184bc61bfc8ed8942c1a2ef5bce1d5c25f6a069c1606fb3b8c722261' + + '1cff7d73c649bf0c49807f3253542ba88f8687490ad0902e42e708a437eafe32' + + '552d9d594629aae72cb55db784b3ae60b59035f925306515da861f8dcc66cf98' + + 'e5543029c2b5138da3d18dbdcc7f43149746b87b4ff2b4618375887b0ad6f243' + + '93cfd2527b61bd3366472702f892e7e1f32d72da8fe0b7b658f387fdd7986d41' + + '74065c2647beccedfbf51994889ea0a059179a225e67be7d08a80e263824e474' + + 'e81cbf03a20765265f08b2227c51b8b7412322db0540c2b939662f59b7149a9b' + + 'b84a59114267a097f6603159d7047a4df2f43144b55709e339ccb7588205c308', ), }), ).toEqual(GRAMJS_SESSION) diff --git a/packages/convert/src/gramjs/serialize.ts b/packages/convert/src/gramjs/serialize.ts index adaa0178..49fc155c 100644 --- a/packages/convert/src/gramjs/serialize.ts +++ b/packages/convert/src/gramjs/serialize.ts @@ -2,7 +2,7 @@ import { MtArgumentError } from '@mtcute/core' import { getPlatform } from '@mtcute/core/platform.js' import { dataViewFromBuffer } from '@mtcute/core/utils.js' -import { TelethonSession } from '../telethon/types.js' +import type { TelethonSession } from '../telethon/types.js' export function serializeGramjsSession(session: TelethonSession) { if (session.authKey.length !== 256) { @@ -24,5 +24,5 @@ export function serializeGramjsSession(session: TelethonSession) { pos += 2 u8.set(session.authKey, pos) - return '1' + getPlatform().base64Encode(u8) + return `1${getPlatform().base64Encode(u8)}` } diff --git a/packages/convert/src/mtkruto/__fixtures__/generate.js b/packages/convert/src/mtkruto/__fixtures__/generate.js index b0e353ab..3af29548 100644 --- a/packages/convert/src/mtkruto/__fixtures__/generate.js +++ b/packages/convert/src/mtkruto/__fixtures__/generate.js @@ -1,4 +1,4 @@ -/* eslint-disable import/no-unresolved, no-undef, no-console */ +/* eslint-disable no-undef, no-console */ import { Client, StorageMemory } from 'https://deno.land/x/mtkruto@0.1.157/mod.ts' diff --git a/packages/convert/src/mtkruto/__fixtures__/session.ts b/packages/convert/src/mtkruto/__fixtures__/session.ts index 348e0acd..c6c7b3d3 100644 --- a/packages/convert/src/mtkruto/__fixtures__/session.ts +++ b/packages/convert/src/mtkruto/__fixtures__/session.ts @@ -1,2 +1,2 @@ -export const MTKRUTO_SESSION = - 'BjItdGVzdAAB_gABAQABWEIKa07Ch-9zoA024mDOpsv20TW4YwuoRRROqSi41YQCbD3c4nKnz7BcFIu1mfn6f6Xm3OTVqoT0zib4p_AuZD9H-t8j5AagecRg-oSpQlmjoiUazKQSxnxWotGWf1mPNntAeOvDNa5t1NjXUxmqdB3e2AjYLF_E2jDESVgUuDBQUMBHIDc_xFBAlz6kVxCZ6iINJHbnyJ2F19tbEPFJvSM999RKaFj5lUUVs0qKNXEUmsFYUuIdPBzjWilY8Uvf9nYU_xXd9CUAAXS5_i4aaWlHoTIf3zn8ZEINhDIU1DMauh5vhSWt7F0fkxODjtou-7PdIunuDtqyQm4steuNJc8' +export const MTKRUTO_SESSION + = 'BjItdGVzdAAB_gABAQABWEIKa07Ch-9zoA024mDOpsv20TW4YwuoRRROqSi41YQCbD3c4nKnz7BcFIu1mfn6f6Xm3OTVqoT0zib4p_AuZD9H-t8j5AagecRg-oSpQlmjoiUazKQSxnxWotGWf1mPNntAeOvDNa5t1NjXUxmqdB3e2AjYLF_E2jDESVgUuDBQUMBHIDc_xFBAlz6kVxCZ6iINJHbnyJ2F19tbEPFJvSM999RKaFj5lUUVs0qKNXEUmsFYUuIdPBzjWilY8Uvf9nYU_xXd9CUAAXS5_i4aaWlHoTIf3zn8ZEINhDIU1DMauh5vhSWt7F0fkxODjtou-7PdIunuDtqyQm4steuNJc8' diff --git a/packages/convert/src/mtkruto/convert.test.ts b/packages/convert/src/mtkruto/convert.test.ts index 939f0699..3f123445 100644 --- a/packages/convert/src/mtkruto/convert.test.ts +++ b/packages/convert/src/mtkruto/convert.test.ts @@ -1,5 +1,4 @@ import { describe, expect, it } from 'vitest' - import { u8HexDecode } from '@mtcute/test' import { MTKRUTO_SESSION } from './__fixtures__/session.js' @@ -9,14 +8,14 @@ describe('mtkruto/convert', () => { it('should correctly convert from mtkruto sessions', () => { expect(convertFromMtkrutoSession(MTKRUTO_SESSION)).toEqual({ authKey: u8HexDecode( - '58420a6b4ec287ef73a00d36e260cea6cbf6d135b8630ba845144ea928b8d584' + - '026c3ddce272a7cfb05c148bb599f9fa7fa5e6dce4d5aa84f4ce26f8a7f02e64' + - '3f47fadf23e406a079c460fa84a94259a3a2251acca412c67c56a2d1967f598f' + - '367b4078ebc335ae6dd4d8d75319aa741dded808d82c5fc4da30c4495814b830' + - '5050c04720373fc45040973ea4571099ea220d2476e7c89d85d7db5b10f149bd' + - '233df7d44a6858f9954515b34a8a3571149ac15852e21d3c1ce35a2958f14bdf' + - 'f67614ff15ddf4250074b9fe2e1a696947a1321fdf39fc64420d843214d4331a' + - 'ba1e6f8525adec5d1f9313838eda2efbb3dd22e9ee0edab2426e2cb5eb8d25cf', + '58420a6b4ec287ef73a00d36e260cea6cbf6d135b8630ba845144ea928b8d584' + + '026c3ddce272a7cfb05c148bb599f9fa7fa5e6dce4d5aa84f4ce26f8a7f02e64' + + '3f47fadf23e406a079c460fa84a94259a3a2251acca412c67c56a2d1967f598f' + + '367b4078ebc335ae6dd4d8d75319aa741dded808d82c5fc4da30c4495814b830' + + '5050c04720373fc45040973ea4571099ea220d2476e7c89d85d7db5b10f149bd' + + '233df7d44a6858f9954515b34a8a3571149ac15852e21d3c1ce35a2958f14bdf' + + 'f67614ff15ddf4250074b9fe2e1a696947a1321fdf39fc64420d843214d4331a' + + 'ba1e6f8525adec5d1f9313838eda2efbb3dd22e9ee0edab2426e2cb5eb8d25cf', ), primaryDcs: { main: { @@ -39,14 +38,14 @@ describe('mtkruto/convert', () => { expect( convertToMtkrutoSession({ authKey: u8HexDecode( - '58420a6b4ec287ef73a00d36e260cea6cbf6d135b8630ba845144ea928b8d584' + - '026c3ddce272a7cfb05c148bb599f9fa7fa5e6dce4d5aa84f4ce26f8a7f02e64' + - '3f47fadf23e406a079c460fa84a94259a3a2251acca412c67c56a2d1967f598f' + - '367b4078ebc335ae6dd4d8d75319aa741dded808d82c5fc4da30c4495814b830' + - '5050c04720373fc45040973ea4571099ea220d2476e7c89d85d7db5b10f149bd' + - '233df7d44a6858f9954515b34a8a3571149ac15852e21d3c1ce35a2958f14bdf' + - 'f67614ff15ddf4250074b9fe2e1a696947a1321fdf39fc64420d843214d4331a' + - 'ba1e6f8525adec5d1f9313838eda2efbb3dd22e9ee0edab2426e2cb5eb8d25cf', + '58420a6b4ec287ef73a00d36e260cea6cbf6d135b8630ba845144ea928b8d584' + + '026c3ddce272a7cfb05c148bb599f9fa7fa5e6dce4d5aa84f4ce26f8a7f02e64' + + '3f47fadf23e406a079c460fa84a94259a3a2251acca412c67c56a2d1967f598f' + + '367b4078ebc335ae6dd4d8d75319aa741dded808d82c5fc4da30c4495814b830' + + '5050c04720373fc45040973ea4571099ea220d2476e7c89d85d7db5b10f149bd' + + '233df7d44a6858f9954515b34a8a3571149ac15852e21d3c1ce35a2958f14bdf' + + 'f67614ff15ddf4250074b9fe2e1a696947a1321fdf39fc64420d843214d4331a' + + 'ba1e6f8525adec5d1f9313838eda2efbb3dd22e9ee0edab2426e2cb5eb8d25cf', ), primaryDcs: { main: { diff --git a/packages/convert/src/mtkruto/convert.ts b/packages/convert/src/mtkruto/convert.ts index d3f15693..1fdcbdc8 100644 --- a/packages/convert/src/mtkruto/convert.ts +++ b/packages/convert/src/mtkruto/convert.ts @@ -1,9 +1,11 @@ -import { readStringSession, StringSessionData } from '@mtcute/core/utils.js' +import type { StringSessionData } from '@mtcute/core/utils.js' +import { readStringSession } from '@mtcute/core/utils.js' import { DC_MAPPING_PROD, DC_MAPPING_TEST } from '../dcs.js' + import { parseMtkrutoSession } from './parse.js' import { serializeMtkrutoSession } from './serialize.js' -import { MtkrutoSession } from './types.js' +import type { MtkrutoSession } from './types.js' export function convertFromMtkrutoSession(session: MtkrutoSession | string): StringSessionData { if (typeof session === 'string') { diff --git a/packages/convert/src/mtkruto/parse.test.ts b/packages/convert/src/mtkruto/parse.test.ts index 77aa19d4..46be4c2e 100644 --- a/packages/convert/src/mtkruto/parse.test.ts +++ b/packages/convert/src/mtkruto/parse.test.ts @@ -1,5 +1,4 @@ import { describe, expect, it } from 'vitest' - import { u8HexDecode } from '@mtcute/test' import { MTKRUTO_SESSION } from './__fixtures__/session.js' @@ -11,14 +10,14 @@ describe('mtkruto/parse', () => { dcId: 2, isTest: true, authKey: u8HexDecode( - '58420a6b4ec287ef73a00d36e260cea6cbf6d135b8630ba845144ea928b8d584' + - '026c3ddce272a7cfb05c148bb599f9fa7fa5e6dce4d5aa84f4ce26f8a7f02e64' + - '3f47fadf23e406a079c460fa84a94259a3a2251acca412c67c56a2d1967f598f' + - '367b4078ebc335ae6dd4d8d75319aa741dded808d82c5fc4da30c4495814b830' + - '5050c04720373fc45040973ea4571099ea220d2476e7c89d85d7db5b10f149bd' + - '233df7d44a6858f9954515b34a8a3571149ac15852e21d3c1ce35a2958f14bdf' + - 'f67614ff15ddf4250074b9fe2e1a696947a1321fdf39fc64420d843214d4331a' + - 'ba1e6f8525adec5d1f9313838eda2efbb3dd22e9ee0edab2426e2cb5eb8d25cf', + '58420a6b4ec287ef73a00d36e260cea6cbf6d135b8630ba845144ea928b8d584' + + '026c3ddce272a7cfb05c148bb599f9fa7fa5e6dce4d5aa84f4ce26f8a7f02e64' + + '3f47fadf23e406a079c460fa84a94259a3a2251acca412c67c56a2d1967f598f' + + '367b4078ebc335ae6dd4d8d75319aa741dded808d82c5fc4da30c4495814b830' + + '5050c04720373fc45040973ea4571099ea220d2476e7c89d85d7db5b10f149bd' + + '233df7d44a6858f9954515b34a8a3571149ac15852e21d3c1ce35a2958f14bdf' + + 'f67614ff15ddf4250074b9fe2e1a696947a1321fdf39fc64420d843214d4331a' + + 'ba1e6f8525adec5d1f9313838eda2efbb3dd22e9ee0edab2426e2cb5eb8d25cf', ), }) }) diff --git a/packages/convert/src/mtkruto/parse.ts b/packages/convert/src/mtkruto/parse.ts index 796e00e9..5afa35a9 100644 --- a/packages/convert/src/mtkruto/parse.ts +++ b/packages/convert/src/mtkruto/parse.ts @@ -3,7 +3,8 @@ import { getPlatform } from '@mtcute/core/platform.js' import { TlBinaryReader } from '@mtcute/core/utils.js' import { telegramRleDecode } from '../utils/rle.js' -import { MtkrutoSession } from './types.js' + +import type { MtkrutoSession } from './types.js' export function parseMtkrutoSession(session: string): MtkrutoSession { const data = telegramRleDecode(getPlatform().base64Decode(session, true)) @@ -19,7 +20,7 @@ export function parseMtkrutoSession(session: string): MtkrutoSession { } const dcId = Number(dcIdStr) - if (isNaN(dcId)) { + if (Number.isNaN(dcId)) { throw new MtArgumentError(`Invalid DC ID: ${dcIdStr}`) } diff --git a/packages/convert/src/mtkruto/serialize.test.ts b/packages/convert/src/mtkruto/serialize.test.ts index fa945c17..de8011bb 100644 --- a/packages/convert/src/mtkruto/serialize.test.ts +++ b/packages/convert/src/mtkruto/serialize.test.ts @@ -1,5 +1,4 @@ import { describe, expect, it } from 'vitest' - import { u8HexDecode } from '@mtcute/test' import { MTKRUTO_SESSION } from './__fixtures__/session.js' @@ -12,14 +11,14 @@ describe('mtkruto/serialize', () => { dcId: 2, isTest: true, authKey: u8HexDecode( - '58420a6b4ec287ef73a00d36e260cea6cbf6d135b8630ba845144ea928b8d584' + - '026c3ddce272a7cfb05c148bb599f9fa7fa5e6dce4d5aa84f4ce26f8a7f02e64' + - '3f47fadf23e406a079c460fa84a94259a3a2251acca412c67c56a2d1967f598f' + - '367b4078ebc335ae6dd4d8d75319aa741dded808d82c5fc4da30c4495814b830' + - '5050c04720373fc45040973ea4571099ea220d2476e7c89d85d7db5b10f149bd' + - '233df7d44a6858f9954515b34a8a3571149ac15852e21d3c1ce35a2958f14bdf' + - 'f67614ff15ddf4250074b9fe2e1a696947a1321fdf39fc64420d843214d4331a' + - 'ba1e6f8525adec5d1f9313838eda2efbb3dd22e9ee0edab2426e2cb5eb8d25cf', + '58420a6b4ec287ef73a00d36e260cea6cbf6d135b8630ba845144ea928b8d584' + + '026c3ddce272a7cfb05c148bb599f9fa7fa5e6dce4d5aa84f4ce26f8a7f02e64' + + '3f47fadf23e406a079c460fa84a94259a3a2251acca412c67c56a2d1967f598f' + + '367b4078ebc335ae6dd4d8d75319aa741dded808d82c5fc4da30c4495814b830' + + '5050c04720373fc45040973ea4571099ea220d2476e7c89d85d7db5b10f149bd' + + '233df7d44a6858f9954515b34a8a3571149ac15852e21d3c1ce35a2958f14bdf' + + 'f67614ff15ddf4250074b9fe2e1a696947a1321fdf39fc64420d843214d4331a' + + 'ba1e6f8525adec5d1f9313838eda2efbb3dd22e9ee0edab2426e2cb5eb8d25cf', ), }), ).toEqual(MTKRUTO_SESSION) diff --git a/packages/convert/src/mtkruto/serialize.ts b/packages/convert/src/mtkruto/serialize.ts index 1e7986cc..1e2b6722 100644 --- a/packages/convert/src/mtkruto/serialize.ts +++ b/packages/convert/src/mtkruto/serialize.ts @@ -2,7 +2,8 @@ import { getPlatform } from '@mtcute/core/platform.js' import { TlBinaryWriter } from '@mtcute/core/utils.js' import { telegramRleEncode } from '../utils/rle.js' -import { MtkrutoSession } from './types.js' + +import type { MtkrutoSession } from './types.js' export function serializeMtkrutoSession(session: MtkrutoSession): string { const dcIdStr = `${session.dcId}${session.isTest ? '-test' : ''}` diff --git a/packages/convert/src/pyrogram/__fixtures__/session.ts b/packages/convert/src/pyrogram/__fixtures__/session.ts index 58642802..51858e88 100644 --- a/packages/convert/src/pyrogram/__fixtures__/session.ts +++ b/packages/convert/src/pyrogram/__fixtures__/session.ts @@ -1,2 +1,2 @@ -export const PYROGRAM_TEST_SESSION = - 'AgAyyvcBTk6KssqikKPxEhxfXJpkoFIgQ_o8VpCk_4g0tcHe0rVCXx34AaDKvaNOlbkJOZ4jA3AI8iDYkI2opuifbM_7S2u9MMdnrjfg5jpfkXfI9-wF8DK_UBGIe1zk_Ibn0IHLRz-lkb-QqZNhh8O8Ggb8cieamatEYwLrkjkZR7JG53q76F0ktUd22L6_bUlp9p_qgXqBg8vZdkIIs9T1OiShw2X6TNO0lYqfJVaczMVQcT9Zt0FiyrAMpovFuT7-96OFKWcQ9gzrs_SHfz9HrQgBwvNSdkVziXTtxLJXsaNz3smGeyh-CEuEgdF3enIECnzftlvvUClLN_ylcPir1bi4_wAAAAEqEi1JAA' +export const PYROGRAM_TEST_SESSION + = 'AgAyyvcBTk6KssqikKPxEhxfXJpkoFIgQ_o8VpCk_4g0tcHe0rVCXx34AaDKvaNOlbkJOZ4jA3AI8iDYkI2opuifbM_7S2u9MMdnrjfg5jpfkXfI9-wF8DK_UBGIe1zk_Ibn0IHLRz-lkb-QqZNhh8O8Ggb8cieamatEYwLrkjkZR7JG53q76F0ktUd22L6_bUlp9p_qgXqBg8vZdkIIs9T1OiShw2X6TNO0lYqfJVaczMVQcT9Zt0FiyrAMpovFuT7-96OFKWcQ9gzrs_SHfz9HrQgBwvNSdkVziXTtxLJXsaNz3smGeyh-CEuEgdF3enIECnzftlvvUClLN_ylcPir1bi4_wAAAAEqEi1JAA' diff --git a/packages/convert/src/pyrogram/__fixtures__/session_old.ts b/packages/convert/src/pyrogram/__fixtures__/session_old.ts index 6951698f..85a6385c 100644 --- a/packages/convert/src/pyrogram/__fixtures__/session_old.ts +++ b/packages/convert/src/pyrogram/__fixtures__/session_old.ts @@ -1,2 +1,2 @@ -export const PYROGRAM_TEST_SESSION_OLD = - 'AgEWdHMtuA1pC01YkNiHpL1bC0yBC3wzGZCwSRWKlA_a69RhePUN3M51NpnwSXrW3pZV9FS8WjAwUkA23uT_49t8c7Umw3ihhKD6-hTpZ5wXC2MuC0EsF0-Z6WshYhT3gmN6QhEt0jlXo5cW1BJ3MYmXtsTWNf_hJfd3_wF_ZFa58ntVV-3qd08wQRhiL_IxM7L5YazjPw0dg2z92CqRARku_oq5D29V6W6bo8T-SLzF_ujj5ZcAQL25mJtCcXfhhjp9atxcrqnKzEs05xyrehnlJZKoGmnX0mF2P_6wUHqZC9tcTBUV4AmFcbuy7m_4SYLnJ8MbftNs7aWHHNcB1R4fAAAAASoSLUkA' +export const PYROGRAM_TEST_SESSION_OLD + = 'AgEWdHMtuA1pC01YkNiHpL1bC0yBC3wzGZCwSRWKlA_a69RhePUN3M51NpnwSXrW3pZV9FS8WjAwUkA23uT_49t8c7Umw3ihhKD6-hTpZ5wXC2MuC0EsF0-Z6WshYhT3gmN6QhEt0jlXo5cW1BJ3MYmXtsTWNf_hJfd3_wF_ZFa58ntVV-3qd08wQRhiL_IxM7L5YazjPw0dg2z92CqRARku_oq5D29V6W6bo8T-SLzF_ujj5ZcAQL25mJtCcXfhhjp9atxcrqnKzEs05xyrehnlJZKoGmnX0mF2P_6wUHqZC9tcTBUV4AmFcbuy7m_4SYLnJ8MbftNs7aWHHNcB1R4fAAAAASoSLUkA' diff --git a/packages/convert/src/pyrogram/convert.test.ts b/packages/convert/src/pyrogram/convert.test.ts index 547990ac..12d575a6 100644 --- a/packages/convert/src/pyrogram/convert.test.ts +++ b/packages/convert/src/pyrogram/convert.test.ts @@ -1,5 +1,4 @@ import { describe, expect, it } from 'vitest' - import { getPlatform } from '@mtcute/core/platform.js' import { PYROGRAM_TEST_SESSION_OLD } from './__fixtures__/session_old.js' @@ -9,14 +8,14 @@ describe('pyrogram/convert', () => { it('should correctly convert from pyrogram sessions', () => { expect(convertFromPyrogramSession(PYROGRAM_TEST_SESSION_OLD)).toEqual({ authKey: getPlatform().hexDecode( - '1674732db80d690b4d5890d887a4bd5b0b4c810b7c331990b049158a940fdaeb' + - 'd46178f50ddcce753699f0497ad6de9655f454bc5a3030524036dee4ffe3db7c' + - '73b526c378a184a0fafa14e9679c170b632e0b412c174f99e96b216214f78263' + - '7a42112dd23957a39716d41277318997b6c4d635ffe125f777ff017f6456b9f2' + - '7b5557edea774f304118622ff23133b2f961ace33f0d1d836cfdd82a9101192e' + - 'fe8ab90f6f55e96e9ba3c4fe48bcc5fee8e3e5970040bdb9989b427177e1863a' + - '7d6adc5caea9cacc4b34e71cab7a19e52592a81a69d7d261763ffeb0507a990b' + - 'db5c4c1515e0098571bbb2ee6ff84982e727c31b7ed36ceda5871cd701d51e1f', + '1674732db80d690b4d5890d887a4bd5b0b4c810b7c331990b049158a940fdaeb' + + 'd46178f50ddcce753699f0497ad6de9655f454bc5a3030524036dee4ffe3db7c' + + '73b526c378a184a0fafa14e9679c170b632e0b412c174f99e96b216214f78263' + + '7a42112dd23957a39716d41277318997b6c4d635ffe125f777ff017f6456b9f2' + + '7b5557edea774f304118622ff23133b2f961ace33f0d1d836cfdd82a9101192e' + + 'fe8ab90f6f55e96e9ba3c4fe48bcc5fee8e3e5970040bdb9989b427177e1863a' + + '7d6adc5caea9cacc4b34e71cab7a19e52592a81a69d7d261763ffeb0507a990b' + + 'db5c4c1515e0098571bbb2ee6ff84982e727c31b7ed36ceda5871cd701d51e1f', ), primaryDcs: { main: { @@ -45,14 +44,14 @@ describe('pyrogram/convert', () => { expect( convertToPyrogramSession({ authKey: getPlatform().hexDecode( - '1674732db80d690b4d5890d887a4bd5b0b4c810b7c331990b049158a940fdaeb' + - 'd46178f50ddcce753699f0497ad6de9655f454bc5a3030524036dee4ffe3db7c' + - '73b526c378a184a0fafa14e9679c170b632e0b412c174f99e96b216214f78263' + - '7a42112dd23957a39716d41277318997b6c4d635ffe125f777ff017f6456b9f2' + - '7b5557edea774f304118622ff23133b2f961ace33f0d1d836cfdd82a9101192e' + - 'fe8ab90f6f55e96e9ba3c4fe48bcc5fee8e3e5970040bdb9989b427177e1863a' + - '7d6adc5caea9cacc4b34e71cab7a19e52592a81a69d7d261763ffeb0507a990b' + - 'db5c4c1515e0098571bbb2ee6ff84982e727c31b7ed36ceda5871cd701d51e1f', + '1674732db80d690b4d5890d887a4bd5b0b4c810b7c331990b049158a940fdaeb' + + 'd46178f50ddcce753699f0497ad6de9655f454bc5a3030524036dee4ffe3db7c' + + '73b526c378a184a0fafa14e9679c170b632e0b412c174f99e96b216214f78263' + + '7a42112dd23957a39716d41277318997b6c4d635ffe125f777ff017f6456b9f2' + + '7b5557edea774f304118622ff23133b2f961ace33f0d1d836cfdd82a9101192e' + + 'fe8ab90f6f55e96e9ba3c4fe48bcc5fee8e3e5970040bdb9989b427177e1863a' + + '7d6adc5caea9cacc4b34e71cab7a19e52592a81a69d7d261763ffeb0507a990b' + + 'db5c4c1515e0098571bbb2ee6ff84982e727c31b7ed36ceda5871cd701d51e1f', ), primaryDcs: { main: { diff --git a/packages/convert/src/pyrogram/convert.ts b/packages/convert/src/pyrogram/convert.ts index d79b6a49..605e8a8b 100644 --- a/packages/convert/src/pyrogram/convert.ts +++ b/packages/convert/src/pyrogram/convert.ts @@ -1,9 +1,11 @@ -import { readStringSession, StringSessionData } from '@mtcute/core/utils.js' +import type { StringSessionData } from '@mtcute/core/utils.js' +import { readStringSession } from '@mtcute/core/utils.js' import { DC_MAPPING_PROD, DC_MAPPING_TEST } from '../dcs.js' + import { parsePyrogramSession } from './parse.js' import { serializePyrogramSession } from './serialize.js' -import { PyrogramSession } from './types.js' +import type { PyrogramSession } from './types.js' export function convertFromPyrogramSession(session: PyrogramSession | string): StringSessionData { if (typeof session === 'string') { diff --git a/packages/convert/src/pyrogram/parse.test.ts b/packages/convert/src/pyrogram/parse.test.ts index 69fb4a71..141b38da 100644 --- a/packages/convert/src/pyrogram/parse.test.ts +++ b/packages/convert/src/pyrogram/parse.test.ts @@ -1,5 +1,4 @@ import { describe, expect, it } from 'vitest' - import { getPlatform } from '@mtcute/core/platform.js' import { PYROGRAM_TEST_SESSION } from './__fixtures__/session.js' @@ -14,14 +13,14 @@ describe('pyrogram/parse', () => { userId: 5000801609, dcId: 2, authKey: getPlatform().hexDecode( - '1674732db80d690b4d5890d887a4bd5b0b4c810b7c331990b049158a940fdaeb' + - 'd46178f50ddcce753699f0497ad6de9655f454bc5a3030524036dee4ffe3db7c' + - '73b526c378a184a0fafa14e9679c170b632e0b412c174f99e96b216214f78263' + - '7a42112dd23957a39716d41277318997b6c4d635ffe125f777ff017f6456b9f2' + - '7b5557edea774f304118622ff23133b2f961ace33f0d1d836cfdd82a9101192e' + - 'fe8ab90f6f55e96e9ba3c4fe48bcc5fee8e3e5970040bdb9989b427177e1863a' + - '7d6adc5caea9cacc4b34e71cab7a19e52592a81a69d7d261763ffeb0507a990b' + - 'db5c4c1515e0098571bbb2ee6ff84982e727c31b7ed36ceda5871cd701d51e1f', + '1674732db80d690b4d5890d887a4bd5b0b4c810b7c331990b049158a940fdaeb' + + 'd46178f50ddcce753699f0497ad6de9655f454bc5a3030524036dee4ffe3db7c' + + '73b526c378a184a0fafa14e9679c170b632e0b412c174f99e96b216214f78263' + + '7a42112dd23957a39716d41277318997b6c4d635ffe125f777ff017f6456b9f2' + + '7b5557edea774f304118622ff23133b2f961ace33f0d1d836cfdd82a9101192e' + + 'fe8ab90f6f55e96e9ba3c4fe48bcc5fee8e3e5970040bdb9989b427177e1863a' + + '7d6adc5caea9cacc4b34e71cab7a19e52592a81a69d7d261763ffeb0507a990b' + + 'db5c4c1515e0098571bbb2ee6ff84982e727c31b7ed36ceda5871cd701d51e1f', ), }) }) @@ -34,14 +33,14 @@ describe('pyrogram/parse', () => { userId: 5000801609, dcId: 2, authKey: getPlatform().hexDecode( - '4e4e8ab2caa290a3f1121c5f5c9a64a0522043fa3c5690a4ff8834b5c1ded2b5' + - '425f1df801a0cabda34e95b909399e23037008f220d8908da8a6e89f6ccffb4b' + - '6bbd30c767ae37e0e63a5f9177c8f7ec05f032bf5011887b5ce4fc86e7d081cb' + - '473fa591bf90a9936187c3bc1a06fc72279a99ab446302eb92391947b246e77a' + - 'bbe85d24b54776d8bebf6d4969f69fea817a8183cbd9764208b3d4f53a24a1c3' + - '65fa4cd3b4958a9f25569cccc550713f59b74162cab00ca68bc5b93efef7a385' + - '296710f60cebb3f4877f3f47ad0801c2f3527645738974edc4b257b1a373dec9' + - '867b287e084b8481d1777a72040a7cdfb65bef50294b37fca570f8abd5b8b8ff', + '4e4e8ab2caa290a3f1121c5f5c9a64a0522043fa3c5690a4ff8834b5c1ded2b5' + + '425f1df801a0cabda34e95b909399e23037008f220d8908da8a6e89f6ccffb4b' + + '6bbd30c767ae37e0e63a5f9177c8f7ec05f032bf5011887b5ce4fc86e7d081cb' + + '473fa591bf90a9936187c3bc1a06fc72279a99ab446302eb92391947b246e77a' + + 'bbe85d24b54776d8bebf6d4969f69fea817a8183cbd9764208b3d4f53a24a1c3' + + '65fa4cd3b4958a9f25569cccc550713f59b74162cab00ca68bc5b93efef7a385' + + '296710f60cebb3f4877f3f47ad0801c2f3527645738974edc4b257b1a373dec9' + + '867b287e084b8481d1777a72040a7cdfb65bef50294b37fca570f8abd5b8b8ff', ), }) }) diff --git a/packages/convert/src/pyrogram/parse.ts b/packages/convert/src/pyrogram/parse.ts index 1363f893..6c6d7b67 100644 --- a/packages/convert/src/pyrogram/parse.ts +++ b/packages/convert/src/pyrogram/parse.ts @@ -4,7 +4,7 @@ import { Long } from '@mtcute/core' import { getPlatform } from '@mtcute/core/platform.js' import { dataViewFromBuffer, longFromBuffer } from '@mtcute/core/utils.js' -import { PyrogramSession } from './types.js' +import type { PyrogramSession } from './types.js' const SESSION_STRING_SIZE = 351 const SESSION_STRING_SIZE_64 = 356 diff --git a/packages/convert/src/pyrogram/serialize.test.ts b/packages/convert/src/pyrogram/serialize.test.ts index 3af64870..b9c4c0d1 100644 --- a/packages/convert/src/pyrogram/serialize.test.ts +++ b/packages/convert/src/pyrogram/serialize.test.ts @@ -1,5 +1,4 @@ import { describe, expect, it } from 'vitest' - import { getPlatform } from '@mtcute/core/platform.js' import { PYROGRAM_TEST_SESSION } from './__fixtures__/session.js' @@ -15,14 +14,14 @@ describe('pyrogram/serialize', () => { userId: 5000801609, dcId: 2, authKey: getPlatform().hexDecode( - '1674732db80d690b4d5890d887a4bd5b0b4c810b7c331990b049158a940fdaeb' + - 'd46178f50ddcce753699f0497ad6de9655f454bc5a3030524036dee4ffe3db7c' + - '73b526c378a184a0fafa14e9679c170b632e0b412c174f99e96b216214f78263' + - '7a42112dd23957a39716d41277318997b6c4d635ffe125f777ff017f6456b9f2' + - '7b5557edea774f304118622ff23133b2f961ace33f0d1d836cfdd82a9101192e' + - 'fe8ab90f6f55e96e9ba3c4fe48bcc5fee8e3e5970040bdb9989b427177e1863a' + - '7d6adc5caea9cacc4b34e71cab7a19e52592a81a69d7d261763ffeb0507a990b' + - 'db5c4c1515e0098571bbb2ee6ff84982e727c31b7ed36ceda5871cd701d51e1f', + '1674732db80d690b4d5890d887a4bd5b0b4c810b7c331990b049158a940fdaeb' + + 'd46178f50ddcce753699f0497ad6de9655f454bc5a3030524036dee4ffe3db7c' + + '73b526c378a184a0fafa14e9679c170b632e0b412c174f99e96b216214f78263' + + '7a42112dd23957a39716d41277318997b6c4d635ffe125f777ff017f6456b9f2' + + '7b5557edea774f304118622ff23133b2f961ace33f0d1d836cfdd82a9101192e' + + 'fe8ab90f6f55e96e9ba3c4fe48bcc5fee8e3e5970040bdb9989b427177e1863a' + + '7d6adc5caea9cacc4b34e71cab7a19e52592a81a69d7d261763ffeb0507a990b' + + 'db5c4c1515e0098571bbb2ee6ff84982e727c31b7ed36ceda5871cd701d51e1f', ), }), ).toEqual(PYROGRAM_TEST_SESSION_OLD) @@ -37,14 +36,14 @@ describe('pyrogram/serialize', () => { userId: 5000801609, dcId: 2, authKey: getPlatform().hexDecode( - '4e4e8ab2caa290a3f1121c5f5c9a64a0522043fa3c5690a4ff8834b5c1ded2b5' + - '425f1df801a0cabda34e95b909399e23037008f220d8908da8a6e89f6ccffb4b' + - '6bbd30c767ae37e0e63a5f9177c8f7ec05f032bf5011887b5ce4fc86e7d081cb' + - '473fa591bf90a9936187c3bc1a06fc72279a99ab446302eb92391947b246e77a' + - 'bbe85d24b54776d8bebf6d4969f69fea817a8183cbd9764208b3d4f53a24a1c3' + - '65fa4cd3b4958a9f25569cccc550713f59b74162cab00ca68bc5b93efef7a385' + - '296710f60cebb3f4877f3f47ad0801c2f3527645738974edc4b257b1a373dec9' + - '867b287e084b8481d1777a72040a7cdfb65bef50294b37fca570f8abd5b8b8ff', + '4e4e8ab2caa290a3f1121c5f5c9a64a0522043fa3c5690a4ff8834b5c1ded2b5' + + '425f1df801a0cabda34e95b909399e23037008f220d8908da8a6e89f6ccffb4b' + + '6bbd30c767ae37e0e63a5f9177c8f7ec05f032bf5011887b5ce4fc86e7d081cb' + + '473fa591bf90a9936187c3bc1a06fc72279a99ab446302eb92391947b246e77a' + + 'bbe85d24b54776d8bebf6d4969f69fea817a8183cbd9764208b3d4f53a24a1c3' + + '65fa4cd3b4958a9f25569cccc550713f59b74162cab00ca68bc5b93efef7a385' + + '296710f60cebb3f4877f3f47ad0801c2f3527645738974edc4b257b1a373dec9' + + '867b287e084b8481d1777a72040a7cdfb65bef50294b37fca570f8abd5b8b8ff', ), }), ).toEqual(PYROGRAM_TEST_SESSION) diff --git a/packages/convert/src/pyrogram/serialize.ts b/packages/convert/src/pyrogram/serialize.ts index 97f4c307..f6c74795 100644 --- a/packages/convert/src/pyrogram/serialize.ts +++ b/packages/convert/src/pyrogram/serialize.ts @@ -2,7 +2,7 @@ import { Long, MtArgumentError } from '@mtcute/core' import { getPlatform } from '@mtcute/core/platform.js' import { dataViewFromBuffer } from '@mtcute/core/utils.js' -import { PyrogramSession } from './types.js' +import type { PyrogramSession } from './types.js' const SESSION_STRING_SIZE_OLD = 267 const SESSION_STRING_SIZE = 271 diff --git a/packages/convert/src/telethon/__fixtures__/session.ts b/packages/convert/src/telethon/__fixtures__/session.ts index f53df8c3..c209e384 100644 --- a/packages/convert/src/telethon/__fixtures__/session.ts +++ b/packages/convert/src/telethon/__fixtures__/session.ts @@ -1,2 +1,2 @@ -export const TELETHON_TEST_SESSION = - '1ApWapygAUChJS1_xwUK01Is4cOvQa1JKTn1POabdMUCfLmXNYFUyvG3v9Z_qbFNFp3zYP--3aVpTYI2DpB2Ib46p_bwSC0j1QEjvdQxJj26cVj8NfslrCkYrdV3glOhdczSq08kp31eqBGXMPhA7wy7DOcSLLAoy-Jf3Q_V_Q3y2a8_64ArFJe8PFfSqkdO56VQutajNLscFUtTQXUQFLJ7ft6vIl__UOc9tpQZEiFW7jWmID79WkfYLHFjuChTVKGMLDa8YcZj6z5Sq-pXPE9VbAbJ5L1JRqXOey3QGtZgJeIEww_WWD5nMMUfhLIydD2i7eDmVoUE5EIZPpsevJmjiGLw4vJk=' +export const TELETHON_TEST_SESSION + = '1ApWapygAUChJS1_xwUK01Is4cOvQa1JKTn1POabdMUCfLmXNYFUyvG3v9Z_qbFNFp3zYP--3aVpTYI2DpB2Ib46p_bwSC0j1QEjvdQxJj26cVj8NfslrCkYrdV3glOhdczSq08kp31eqBGXMPhA7wy7DOcSLLAoy-Jf3Q_V_Q3y2a8_64ArFJe8PFfSqkdO56VQutajNLscFUtTQXUQFLJ7ft6vIl__UOc9tpQZEiFW7jWmID79WkfYLHFjuChTVKGMLDa8YcZj6z5Sq-pXPE9VbAbJ5L1JRqXOey3QGtZgJeIEww_WWD5nMMUfhLIydD2i7eDmVoUE5EIZPpsevJmjiGLw4vJk=' diff --git a/packages/convert/src/telethon/__fixtures__/session_v6.ts b/packages/convert/src/telethon/__fixtures__/session_v6.ts index 14495480..dc7bf5ba 100644 --- a/packages/convert/src/telethon/__fixtures__/session_v6.ts +++ b/packages/convert/src/telethon/__fixtures__/session_v6.ts @@ -1,2 +1,2 @@ -export const TELETHON_TEST_SESSION_V6 = - '1ASABCyjyPfABAAAAAAAAAA4Bu4pveAFWSE51_trKsrRQeMvGXMl8fI6NsGaWqdrXXeqyaXne9qNthqnrBmH56kHfOhFUCPSoVzNNrGgnQr67AYQbkhpP_Yml2EDd8epdc6Gywh4q2NBgYyW6VBT8UKg89-FebYTO6n47I1cJMGsSZ1ddxEOpIpHXsSmPdGBSTz6uaHbLYo0jnxd59PQn4H4dKb8FxuOQsUVa3vY_o79HMVMQRVT1IksUKFg5gAe5ZJ0yx6W4pMviVbC-TYZC0HInmv2fFMv-S3rQyg1C7qpU-Gbo1P6UZC4KZGmu2pMJooFNyfRbFgl3BI5Z-FNx9TKu4UFrF9G6Q0l8PjPXOZm4j-c=' +export const TELETHON_TEST_SESSION_V6 + = '1ASABCyjyPfABAAAAAAAAAA4Bu4pveAFWSE51_trKsrRQeMvGXMl8fI6NsGaWqdrXXeqyaXne9qNthqnrBmH56kHfOhFUCPSoVzNNrGgnQr67AYQbkhpP_Yml2EDd8epdc6Gywh4q2NBgYyW6VBT8UKg89-FebYTO6n47I1cJMGsSZ1ddxEOpIpHXsSmPdGBSTz6uaHbLYo0jnxd59PQn4H4dKb8FxuOQsUVa3vY_o79HMVMQRVT1IksUKFg5gAe5ZJ0yx6W4pMviVbC-TYZC0HInmv2fFMv-S3rQyg1C7qpU-Gbo1P6UZC4KZGmu2pMJooFNyfRbFgl3BI5Z-FNx9TKu4UFrF9G6Q0l8PjPXOZm4j-c=' diff --git a/packages/convert/src/telethon/convert.test.ts b/packages/convert/src/telethon/convert.test.ts index 904ed375..d9d8867c 100644 --- a/packages/convert/src/telethon/convert.test.ts +++ b/packages/convert/src/telethon/convert.test.ts @@ -1,5 +1,4 @@ import { describe, expect, it } from 'vitest' - import { getPlatform } from '@mtcute/core/platform.js' import { TELETHON_TEST_SESSION } from './__fixtures__/session.js' @@ -9,14 +8,14 @@ describe('telethon/convert', () => { it('should correctly convert from telethon sessions', () => { expect(convertFromTelethonSession(TELETHON_TEST_SESSION)).toEqual({ authKey: getPlatform().hexDecode( - '28494b5ff1c142b4d48b3870ebd06b524a4e7d4f39a6dd31409f2e65cd605532' + - 'bc6deff59fea6c5345a77cd83fefb7695a53608d83a41d886f8ea9fdbc120b48' + - 'f54048ef750c498f6e9c563f0d7ec96b0a462b755de094e85d7334aad3c929df' + - '57aa0465cc3e103bc32ec339c48b2c0a32f897f743f57f437cb66bcffae00ac5' + - '25ef0f15f4aa91d3b9e9542eb5a8cd2ec70552d4d05d44052c9edfb7abc897ff' + - 'd439cf6da506448855bb8d69880fbf5691f60b1c58ee0a14d528630b0daf1871' + - '98facf94aafa95cf13d55b01b2792f5251a9739ecb7406b59809788130c3f596' + - '0f99cc3147e12c8c9d0f68bb783995a1413910864fa6c7af2668e218bc38bc99', + '28494b5ff1c142b4d48b3870ebd06b524a4e7d4f39a6dd31409f2e65cd605532' + + 'bc6deff59fea6c5345a77cd83fefb7695a53608d83a41d886f8ea9fdbc120b48' + + 'f54048ef750c498f6e9c563f0d7ec96b0a462b755de094e85d7334aad3c929df' + + '57aa0465cc3e103bc32ec339c48b2c0a32f897f743f57f437cb66bcffae00ac5' + + '25ef0f15f4aa91d3b9e9542eb5a8cd2ec70552d4d05d44052c9edfb7abc897ff' + + 'd439cf6da506448855bb8d69880fbf5691f60b1c58ee0a14d528630b0daf1871' + + '98facf94aafa95cf13d55b01b2792f5251a9739ecb7406b59809788130c3f596' + + '0f99cc3147e12c8c9d0f68bb783995a1413910864fa6c7af2668e218bc38bc99', ), primaryDcs: { main: { @@ -41,14 +40,14 @@ describe('telethon/convert', () => { expect( convertToTelethonSession({ authKey: getPlatform().hexDecode( - '28494b5ff1c142b4d48b3870ebd06b524a4e7d4f39a6dd31409f2e65cd605532' + - 'bc6deff59fea6c5345a77cd83fefb7695a53608d83a41d886f8ea9fdbc120b48' + - 'f54048ef750c498f6e9c563f0d7ec96b0a462b755de094e85d7334aad3c929df' + - '57aa0465cc3e103bc32ec339c48b2c0a32f897f743f57f437cb66bcffae00ac5' + - '25ef0f15f4aa91d3b9e9542eb5a8cd2ec70552d4d05d44052c9edfb7abc897ff' + - 'd439cf6da506448855bb8d69880fbf5691f60b1c58ee0a14d528630b0daf1871' + - '98facf94aafa95cf13d55b01b2792f5251a9739ecb7406b59809788130c3f596' + - '0f99cc3147e12c8c9d0f68bb783995a1413910864fa6c7af2668e218bc38bc99', + '28494b5ff1c142b4d48b3870ebd06b524a4e7d4f39a6dd31409f2e65cd605532' + + 'bc6deff59fea6c5345a77cd83fefb7695a53608d83a41d886f8ea9fdbc120b48' + + 'f54048ef750c498f6e9c563f0d7ec96b0a462b755de094e85d7334aad3c929df' + + '57aa0465cc3e103bc32ec339c48b2c0a32f897f743f57f437cb66bcffae00ac5' + + '25ef0f15f4aa91d3b9e9542eb5a8cd2ec70552d4d05d44052c9edfb7abc897ff' + + 'd439cf6da506448855bb8d69880fbf5691f60b1c58ee0a14d528630b0daf1871' + + '98facf94aafa95cf13d55b01b2792f5251a9739ecb7406b59809788130c3f596' + + '0f99cc3147e12c8c9d0f68bb783995a1413910864fa6c7af2668e218bc38bc99', ), primaryDcs: { main: { diff --git a/packages/convert/src/telethon/convert.ts b/packages/convert/src/telethon/convert.ts index 3e32e591..c14c49a2 100644 --- a/packages/convert/src/telethon/convert.ts +++ b/packages/convert/src/telethon/convert.ts @@ -1,9 +1,11 @@ -import { BasicDcOption, readStringSession, StringSessionData } from '@mtcute/core/utils.js' +import type { BasicDcOption, StringSessionData } from '@mtcute/core/utils.js' +import { readStringSession } from '@mtcute/core/utils.js' import { isTestDc } from '../dcs.js' + import { parseTelethonSession } from './parse.js' import { serializeTelethonSession } from './serialize.js' -import { TelethonSession } from './types.js' +import type { TelethonSession } from './types.js' export function convertFromTelethonSession(session: TelethonSession | string): StringSessionData { if (typeof session === 'string') { diff --git a/packages/convert/src/telethon/parse.test.ts b/packages/convert/src/telethon/parse.test.ts index 58a56e61..ca85915e 100644 --- a/packages/convert/src/telethon/parse.test.ts +++ b/packages/convert/src/telethon/parse.test.ts @@ -1,5 +1,4 @@ import { describe, expect, it } from 'vitest' - import { getPlatform } from '@mtcute/core/platform.js' import { TELETHON_TEST_SESSION } from './__fixtures__/session.js' @@ -14,14 +13,14 @@ describe('telethon/parse', () => { port: 80, ipv6: false, authKey: getPlatform().hexDecode( - '28494b5ff1c142b4d48b3870ebd06b524a4e7d4f39a6dd31409f2e65cd605532' + - 'bc6deff59fea6c5345a77cd83fefb7695a53608d83a41d886f8ea9fdbc120b48' + - 'f54048ef750c498f6e9c563f0d7ec96b0a462b755de094e85d7334aad3c929df' + - '57aa0465cc3e103bc32ec339c48b2c0a32f897f743f57f437cb66bcffae00ac5' + - '25ef0f15f4aa91d3b9e9542eb5a8cd2ec70552d4d05d44052c9edfb7abc897ff' + - 'd439cf6da506448855bb8d69880fbf5691f60b1c58ee0a14d528630b0daf1871' + - '98facf94aafa95cf13d55b01b2792f5251a9739ecb7406b59809788130c3f596' + - '0f99cc3147e12c8c9d0f68bb783995a1413910864fa6c7af2668e218bc38bc99', + '28494b5ff1c142b4d48b3870ebd06b524a4e7d4f39a6dd31409f2e65cd605532' + + 'bc6deff59fea6c5345a77cd83fefb7695a53608d83a41d886f8ea9fdbc120b48' + + 'f54048ef750c498f6e9c563f0d7ec96b0a462b755de094e85d7334aad3c929df' + + '57aa0465cc3e103bc32ec339c48b2c0a32f897f743f57f437cb66bcffae00ac5' + + '25ef0f15f4aa91d3b9e9542eb5a8cd2ec70552d4d05d44052c9edfb7abc897ff' + + 'd439cf6da506448855bb8d69880fbf5691f60b1c58ee0a14d528630b0daf1871' + + '98facf94aafa95cf13d55b01b2792f5251a9739ecb7406b59809788130c3f596' + + '0f99cc3147e12c8c9d0f68bb783995a1413910864fa6c7af2668e218bc38bc99', ), }) }) @@ -33,14 +32,14 @@ describe('telethon/parse', () => { port: 443, ipv6: true, authKey: getPlatform().hexDecode( - '8a6f780156484e75fedacab2b45078cbc65cc97c7c8e8db06696a9dad75deab2' + - '6979def6a36d86a9eb0661f9ea41df3a115408f4a857334dac682742bebb0184' + - '1b921a4ffd89a5d840ddf1ea5d73a1b2c21e2ad8d0606325ba5414fc50a83cf7' + - 'e15e6d84ceea7e3b235709306b1267575dc443a92291d7b1298f7460524f3eae' + - '6876cb628d239f1779f4f427e07e1d29bf05c6e390b1455adef63fa3bf473153' + - '104554f5224b142858398007b9649d32c7a5b8a4cbe255b0be4d8642d072279a' + - 'fd9f14cbfe4b7ad0ca0d42eeaa54f866e8d4fe94642e0a6469aeda9309a2814d' + - 'c9f45b160977048e59f85371f532aee1416b17d1ba43497c3e33d73999b88fe7', + '8a6f780156484e75fedacab2b45078cbc65cc97c7c8e8db06696a9dad75deab2' + + '6979def6a36d86a9eb0661f9ea41df3a115408f4a857334dac682742bebb0184' + + '1b921a4ffd89a5d840ddf1ea5d73a1b2c21e2ad8d0606325ba5414fc50a83cf7' + + 'e15e6d84ceea7e3b235709306b1267575dc443a92291d7b1298f7460524f3eae' + + '6876cb628d239f1779f4f427e07e1d29bf05c6e390b1455adef63fa3bf473153' + + '104554f5224b142858398007b9649d32c7a5b8a4cbe255b0be4d8642d072279a' + + 'fd9f14cbfe4b7ad0ca0d42eeaa54f866e8d4fe94642e0a6469aeda9309a2814d' + + 'c9f45b160977048e59f85371f532aee1416b17d1ba43497c3e33d73999b88fe7', ), }) }) diff --git a/packages/convert/src/telethon/parse.ts b/packages/convert/src/telethon/parse.ts index b630cd72..e366f5b7 100644 --- a/packages/convert/src/telethon/parse.ts +++ b/packages/convert/src/telethon/parse.ts @@ -3,7 +3,8 @@ import { getPlatform } from '@mtcute/core/platform.js' import { dataViewFromBuffer } from '@mtcute/core/utils.js' import { parseIpFromBytes } from '../utils/ip.js' -import { TelethonSession } from './types.js' + +import type { TelethonSession } from './types.js' export function parseTelethonSession(session: string): TelethonSession { if (session[0] !== '1') { diff --git a/packages/convert/src/telethon/serialize.test.ts b/packages/convert/src/telethon/serialize.test.ts index 66ed90bc..ed9fcfc4 100644 --- a/packages/convert/src/telethon/serialize.test.ts +++ b/packages/convert/src/telethon/serialize.test.ts @@ -1,5 +1,4 @@ import { describe, expect, it } from 'vitest' - import { getPlatform } from '@mtcute/core/platform.js' import { TELETHON_TEST_SESSION } from './__fixtures__/session.js' @@ -15,14 +14,14 @@ describe('telethon/serialize', () => { port: 80, ipv6: false, authKey: getPlatform().hexDecode( - '28494b5ff1c142b4d48b3870ebd06b524a4e7d4f39a6dd31409f2e65cd605532' + - 'bc6deff59fea6c5345a77cd83fefb7695a53608d83a41d886f8ea9fdbc120b48' + - 'f54048ef750c498f6e9c563f0d7ec96b0a462b755de094e85d7334aad3c929df' + - '57aa0465cc3e103bc32ec339c48b2c0a32f897f743f57f437cb66bcffae00ac5' + - '25ef0f15f4aa91d3b9e9542eb5a8cd2ec70552d4d05d44052c9edfb7abc897ff' + - 'd439cf6da506448855bb8d69880fbf5691f60b1c58ee0a14d528630b0daf1871' + - '98facf94aafa95cf13d55b01b2792f5251a9739ecb7406b59809788130c3f596' + - '0f99cc3147e12c8c9d0f68bb783995a1413910864fa6c7af2668e218bc38bc99', + '28494b5ff1c142b4d48b3870ebd06b524a4e7d4f39a6dd31409f2e65cd605532' + + 'bc6deff59fea6c5345a77cd83fefb7695a53608d83a41d886f8ea9fdbc120b48' + + 'f54048ef750c498f6e9c563f0d7ec96b0a462b755de094e85d7334aad3c929df' + + '57aa0465cc3e103bc32ec339c48b2c0a32f897f743f57f437cb66bcffae00ac5' + + '25ef0f15f4aa91d3b9e9542eb5a8cd2ec70552d4d05d44052c9edfb7abc897ff' + + 'd439cf6da506448855bb8d69880fbf5691f60b1c58ee0a14d528630b0daf1871' + + '98facf94aafa95cf13d55b01b2792f5251a9739ecb7406b59809788130c3f596' + + '0f99cc3147e12c8c9d0f68bb783995a1413910864fa6c7af2668e218bc38bc99', ), }), ).toEqual(TELETHON_TEST_SESSION) @@ -36,14 +35,14 @@ describe('telethon/serialize', () => { port: 443, ipv6: true, authKey: getPlatform().hexDecode( - '8a6f780156484e75fedacab2b45078cbc65cc97c7c8e8db06696a9dad75deab2' + - '6979def6a36d86a9eb0661f9ea41df3a115408f4a857334dac682742bebb0184' + - '1b921a4ffd89a5d840ddf1ea5d73a1b2c21e2ad8d0606325ba5414fc50a83cf7' + - 'e15e6d84ceea7e3b235709306b1267575dc443a92291d7b1298f7460524f3eae' + - '6876cb628d239f1779f4f427e07e1d29bf05c6e390b1455adef63fa3bf473153' + - '104554f5224b142858398007b9649d32c7a5b8a4cbe255b0be4d8642d072279a' + - 'fd9f14cbfe4b7ad0ca0d42eeaa54f866e8d4fe94642e0a6469aeda9309a2814d' + - 'c9f45b160977048e59f85371f532aee1416b17d1ba43497c3e33d73999b88fe7', + '8a6f780156484e75fedacab2b45078cbc65cc97c7c8e8db06696a9dad75deab2' + + '6979def6a36d86a9eb0661f9ea41df3a115408f4a857334dac682742bebb0184' + + '1b921a4ffd89a5d840ddf1ea5d73a1b2c21e2ad8d0606325ba5414fc50a83cf7' + + 'e15e6d84ceea7e3b235709306b1267575dc443a92291d7b1298f7460524f3eae' + + '6876cb628d239f1779f4f427e07e1d29bf05c6e390b1455adef63fa3bf473153' + + '104554f5224b142858398007b9649d32c7a5b8a4cbe255b0be4d8642d072279a' + + 'fd9f14cbfe4b7ad0ca0d42eeaa54f866e8d4fe94642e0a6469aeda9309a2814d' + + 'c9f45b160977048e59f85371f532aee1416b17d1ba43497c3e33d73999b88fe7', ), }), ).toEqual(TELETHON_TEST_SESSION_V6) diff --git a/packages/convert/src/telethon/serialize.ts b/packages/convert/src/telethon/serialize.ts index 442612c7..bacd7a36 100644 --- a/packages/convert/src/telethon/serialize.ts +++ b/packages/convert/src/telethon/serialize.ts @@ -3,7 +3,8 @@ import { getPlatform } from '@mtcute/core/platform.js' import { dataViewFromBuffer } from '@mtcute/core/utils.js' import { serializeIpv4ToBytes, serializeIpv6ToBytes } from '../utils/ip.js' -import { TelethonSession } from './types.js' + +import type { TelethonSession } from './types.js' export function serializeTelethonSession(session: TelethonSession) { if (session.authKey.length !== 256) { @@ -33,5 +34,5 @@ export function serializeTelethonSession(session: TelethonSession) { let b64 = getPlatform().base64Encode(u8, true) while (b64.length % 4 !== 0) b64 += '=' // for some reason telethon uses padding - return '1' + b64 + return `1${b64}` } diff --git a/packages/convert/src/utils/ip.ts b/packages/convert/src/utils/ip.ts index 8f01b386..e73b199b 100644 --- a/packages/convert/src/utils/ip.ts +++ b/packages/convert/src/utils/ip.ts @@ -20,7 +20,7 @@ export function parseIpFromBytes(data: Uint8Array): string { throw new MtArgumentError('Invalid IP address length') } -export function serializeIpv4ToBytes(ip: string, buf: Uint8Array) { +export function serializeIpv4ToBytes(ip: string, buf: Uint8Array): void { const parts = ip.split('.') if (parts.length !== 4) { @@ -33,7 +33,7 @@ export function serializeIpv4ToBytes(ip: string, buf: Uint8Array) { buf[3] = Number(parts[3]) } -export function serializeIpv6ToBytes(ip: string, buf: Uint8Array) { +export function serializeIpv6ToBytes(ip: string, buf: Uint8Array): void { const parts = ip.split(':') if (parts.length !== 8) { @@ -41,8 +41,8 @@ export function serializeIpv6ToBytes(ip: string, buf: Uint8Array) { } for (let i = 0; i < 8; i++) { - const val = parseInt(parts[i], 16) + const val = Number.parseInt(parts[i], 16) buf[i * 2] = val >> 8 - buf[i * 2 + 1] = val & 0xff + buf[i * 2 + 1] = val & 0xFF } } diff --git a/packages/convert/tsconfig.json b/packages/convert/tsconfig.json index 798d46cb..3b5437ec 100644 --- a/packages/convert/tsconfig.json +++ b/packages/convert/tsconfig.json @@ -1,13 +1,13 @@ { - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "./dist/esm", - "rootDir": "./src", - }, - "include": [ - "./src", - ], - "references": [ - { "path": "../core" }, - ], + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist/esm" + }, + "references": [ + { "path": "../core" } + ], + "include": [ + "./src" + ] } diff --git a/packages/core/README.md b/packages/core/README.md index 407d500e..bd738bde 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -45,4 +45,4 @@ const self = await tg.start({ password: 'my-password', }) console.log(`✨ logged in as ${self.displayName}`) -``` \ No newline at end of file +``` diff --git a/packages/core/build.config.cjs b/packages/core/build.config.cjs index 631e06a0..cf790424 100644 --- a/packages/core/build.config.cjs +++ b/packages/core/build.config.cjs @@ -5,7 +5,7 @@ module.exports = ({ path, glob, transformFile, packageDir, outDir, jsr }) => ({ esmImportDirectives: true, final() { const version = require(path.join(packageDir, 'package.json')).version - const replaceVersion = (content) => content.replace('%VERSION%', version) + const replaceVersion = content => content.replace('%VERSION%', version) if (jsr) { transformFile(path.join(outDir, 'network/network-manager.ts'), replaceVersion) @@ -21,11 +21,11 @@ module.exports = ({ path, glob, transformFile, packageDir, outDir, jsr }) => ({ // skip for jsr for now because types aren't resolved correctly and it breaks everything (TODO: fix this) const decoratorsRegex = new RegExp( `(${KNOWN_DECORATORS.join('|')})\\((.+?)\\)(?:;|$)`, - 'gsm', + 'gms', ) const replaceDecorators = (content, file) => { - if (!KNOWN_DECORATORS.some((d) => content.includes(d))) return null + if (!KNOWN_DECORATORS.some(d => content.includes(d))) return null const countPerClass = new Map() @@ -61,7 +61,7 @@ module.exports = ({ path, glob, transformFile, packageDir, outDir, jsr }) => ({ ) } - return content + '\n' + customExports.join('\n') + '\n' + return `${content}\n${customExports.join('\n')}\n` } const globSrc = path.join(outDir, jsr ? 'highlevel/types/**/*.ts' : 'esm/highlevel/types/**/*.js') diff --git a/packages/core/package.json b/packages/core/package.json index 4868565e..664bf81c 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,36 +1,36 @@ { - "name": "@mtcute/core", - "private": true, - "version": "0.16.6", - "description": "Type-safe library for MTProto (Telegram API)", - "author": "alina sireneva ", - "license": "MIT", - "type": "module", - "sideEffects": false, - "scripts": { - "build": "pnpm run -w build-package core", - "gen-client": "node ./scripts/generate-client.cjs", - "gen-updates": "node ./scripts/generate-updates.cjs" - }, - "exports": { - ".": "./src/index.ts", - "./utils.js": "./src/utils/index.ts", - "./client.js": "./src/highlevel/client.ts", - "./worker.js": "./src/highlevel/worker/index.ts", - "./methods.js": "./src/highlevel/methods.ts", - "./platform.js": "./src/platform.ts" - }, - "dependencies": { - "@mtcute/tl": "workspace:^", - "@mtcute/tl-runtime": "workspace:^", - "@mtcute/file-id": "workspace:^", - "@types/events": "3.0.0", - "events": "3.2.0", - "long": "5.2.3" - }, - "devDependencies": { - "@types/ws": "8.5.4", - "@mtcute/test": "workspace:^", - "ws": "8.13.0" - } + "name": "@mtcute/core", + "type": "module", + "version": "0.16.6", + "private": true, + "description": "Type-safe library for MTProto (Telegram API)", + "author": "alina sireneva ", + "license": "MIT", + "sideEffects": false, + "exports": { + ".": "./src/index.ts", + "./utils.js": "./src/utils/index.ts", + "./client.js": "./src/highlevel/client.ts", + "./worker.js": "./src/highlevel/worker/index.ts", + "./methods.js": "./src/highlevel/methods.ts", + "./platform.js": "./src/platform.ts" + }, + "scripts": { + "build": "pnpm run -w build-package core", + "gen-client": "node ./scripts/generate-client.cjs", + "gen-updates": "node ./scripts/generate-updates.cjs" + }, + "dependencies": { + "@mtcute/file-id": "workspace:^", + "@mtcute/tl": "workspace:^", + "@mtcute/tl-runtime": "workspace:^", + "@types/events": "3.0.0", + "events": "3.2.0", + "long": "5.2.3" + }, + "devDependencies": { + "@mtcute/test": "workspace:^", + "@types/ws": "8.5.4", + "ws": "8.13.0" + } } diff --git a/packages/core/scripts/generate-app-config.cjs b/packages/core/scripts/generate-app-config.cjs index 807c3bc3..fffd2e7b 100644 --- a/packages/core/scripts/generate-app-config.cjs +++ b/packages/core/scripts/generate-app-config.cjs @@ -1,5 +1,5 @@ -const fs = require('fs') -const path = require('path') +const fs = require('node:fs') +const path = require('node:path') const spec = require('@mtcute/tl/app-config.json') @@ -12,11 +12,11 @@ out.write(`// This file is generated automatically, do not modify! export interface AppConfigSchema { `) -const indent = (str) => str.split('\n').map((x) => ' ' + x).join('\n') +const indent = str => str.split('\n').map(x => ` ${x}`).join('\n') for (const [key, { type, description }] of Object.entries(spec)) { - out.write(indent(description) + '\n') - out.write(indent(`${key}?: ${type}`) + '\n') + out.write(`${indent(description)}\n`) + out.write(`${indent(`${key}?: ${type}`)}\n`) } out.write(' [key: string]: unknown\n') diff --git a/packages/core/scripts/generate-client.cjs b/packages/core/scripts/generate-client.cjs index 670d2052..2119d348 100644 --- a/packages/core/scripts/generate-client.cjs +++ b/packages/core/scripts/generate-client.cjs @@ -1,13 +1,14 @@ +const path = require('node:path') +const fs = require('node:fs') + const ts = require('typescript') -const path = require('path') -const fs = require('fs') -const prettier = require('prettier') -const updates = require('./generate-updates.cjs') const schema = require('../../tl/api-schema.json') +const updates = require('./generate-updates.cjs') + function findMethodAvailability(method) { - const entry = schema.e.find((it) => it.kind === 'method' && it.name === method) + const entry = schema.e.find(it => it.kind === 'method' && it.name === method) if (!entry) return null return entry.available ?? null @@ -22,7 +23,7 @@ async function* getFiles(dir) { const res = path.resolve(dir, dirent.name) if (dirent.isDirectory()) { - yield* getFiles(res) + yield * getFiles(res) } else { yield res } @@ -74,15 +75,15 @@ function findRawApiUsages(ast, fileName) { visitRecursively( ast, - (node) => node.kind === ts.SyntaxKind.CallExpression, + node => node.kind === ts.SyntaxKind.CallExpression, (call) => { if (call.expression.kind !== ts.SyntaxKind.PropertyAccessExpression) return const prop = call.expression if ( - prop.name.escapedText === 'call' && - prop.expression.kind === ts.SyntaxKind.Identifier && - prop.expression.escapedText === firstParamName + prop.name.escapedText === 'call' + && prop.expression.kind === ts.SyntaxKind.Identifier + && prop.expression.escapedText === firstParamName ) { usages.push(call) } @@ -102,7 +103,7 @@ function findRawApiUsages(ast, fileName) { ) } - const method = arg.properties.find((it) => it.name.escapedText === '_') + const method = arg.properties.find(it => it.name.escapedText === '_') if (!method || method.kind !== ts.SyntaxKind.PropertyAssignment) { throwError(call, fileName, 'First argument to this.call() must have a _ property') @@ -142,18 +143,18 @@ function findDependencies(ast) { visitRecursively( ast, - (node) => node.kind === ts.SyntaxKind.CallExpression, + node => node.kind === ts.SyntaxKind.CallExpression, (call) => { if (call.expression.kind !== ts.SyntaxKind.PropertyAccessExpression) return const prop = call.expression if ( - prop.name.escapedText !== 'call' && - prop.name.escapedText !== '_emitError' && - prop.name.escapedText !== '_cachePeersFrom' && - prop.name.escapedText !== 'importSession' && - prop.name.escapedText !== 'emit' && - prop.expression.kind === ts.SyntaxKind.ThisKeyword + prop.name.escapedText !== 'call' + && prop.name.escapedText !== '_emitError' + && prop.name.escapedText !== '_cachePeersFrom' + && prop.name.escapedText !== 'importSession' + && prop.name.escapedText !== 'emit' + && prop.expression.kind === ts.SyntaxKind.ThisKeyword ) { deps.add(prop.name.escapedText) } @@ -163,14 +164,14 @@ function findDependencies(ast) { return [...deps] } -function determineCommonAvailability(methods, resolver = (v) => v) { +function determineCommonAvailability(methods, resolver = v => v) { let common = 'both' for (const method of methods) { const available = resolver(method) if (available === null) { - console.log('availability null for ' + method) + console.log(`availability null for ${method}`) return null } @@ -185,18 +186,8 @@ function determineCommonAvailability(methods, resolver = (v) => v) { return common } -async function runPrettier(targetFile) { - const prettierConfig = await prettier.resolveConfig(targetFile) - let fullSource = await fs.promises.readFile(targetFile, 'utf-8') - fullSource = await prettier.format(fullSource, { - ...(prettierConfig || {}), - filepath: targetFile, - }) - await fs.promises.writeFile(targetFile, fullSource) -} - function runEslint(targetFile) { - require('child_process').execSync(`pnpm exec eslint --fix ${targetFile}`, { + require('node:child_process').execSync(`pnpm exec eslint --fix ${targetFile}`, { stdio: 'inherit', }) } @@ -211,15 +202,15 @@ async function addSingleMethod(state, fileName) { function getLeadingComments(ast) { return (ts.getLeadingCommentRanges(fileFullText, ast.pos) || []) - .map((range) => fileFullText.substring(range.pos, range.end)) + .map(range => fileFullText.substring(range.pos, range.end)) .join('\n') } function checkForFlag(ast, flag) { return getLeadingComments(ast) .split('\n') - .map((i) => i.replace(/^(\/\/|\s*\*+|\/\*\*+\s*)/g, '').trim()) - .find((i) => i.startsWith(flag)) + .map(i => i.replace(/^(\/\/|\s*\*+|\/\*{2,}\s*)/g, '').trim()) + .find(i => i.startsWith(flag)) } const hasOverloads = {} @@ -232,8 +223,8 @@ async function addSingleMethod(state, fileName) { if (!isCopy) continue if ( - !stmt.importClause.namedBindings || - stmt.importClause.namedBindings.kind !== ts.SyntaxKind.NamedImports + !stmt.importClause.namedBindings + || stmt.importClause.namedBindings.kind !== ts.SyntaxKind.NamedImports ) { throwError(stmt, fileName, 'Only named imports are supported!') } @@ -247,7 +238,7 @@ async function addSingleMethod(state, fileName) { const modName = path.basename(modFullPath) module = path.join(path.relative(targetDir, modPath), modName).replace(/\\/g, '/') // replace path delim to unix - if (module[0] !== '.') module = './' + module + if (module[0] !== '.') module = `./${module}` } if (module === './client') { @@ -274,8 +265,8 @@ async function addSingleMethod(state, fileName) { ) } - const isExported = (stmt.modifiers || []).find((mod) => mod.kind === ts.SyntaxKind.ExportKeyword) - const isDeclare = (stmt.modifiers || []).find((mod) => mod.kind === ts.SyntaxKind.DeclareKeyword) + const isExported = (stmt.modifiers || []).find(mod => mod.kind === ts.SyntaxKind.ExportKeyword) + const isDeclare = (stmt.modifiers || []).find(mod => mod.kind === ts.SyntaxKind.DeclareKeyword) const isInitialize = checkForFlag(stmt, '@initialize') const isManualImpl = checkForFlag(stmt, '@manual-impl') const isInitializeSuper = isInitialize === 'super' @@ -302,7 +293,7 @@ async function addSingleMethod(state, fileName) { return available })() const rawApiMethods = available === null && findRawApiUsages(stmt, fileName) - const dependencies = findDependencies(stmt).filter((it) => it !== name) + const dependencies = findDependencies(stmt).filter(it => it !== name) if (isInitialize && isExported) { throwError(isExported, fileName, 'Initialization methods must not be exported') @@ -391,7 +382,7 @@ async function addSingleMethod(state, fileName) { continue } - const isExported = (stmt.modifiers || []).find((mod) => mod.kind === ts.SyntaxKind.ExportKeyword) + const isExported = (stmt.modifiers || []).find(mod => mod.kind === ts.SyntaxKind.ExportKeyword) if (isTypeExported) { if (!isExported) { @@ -425,7 +416,7 @@ async function addSingleMethod(state, fileName) { }) } } else if (stmt.kind === ts.SyntaxKind.TypeAliasDeclaration && isTypeExported) { - const isExported = (stmt.modifiers || []).find((mod) => mod.kind === ts.SyntaxKind.ExportKeyword) + const isExported = (stmt.modifiers || []).find(mod => mod.kind === ts.SyntaxKind.ExportKeyword) if (!isExported) { throwError(stmt, fileName, 'Exported type aliases must be exported') @@ -471,11 +462,10 @@ async function main() { } output.write( - '/* eslint-disable @typescript-eslint/no-unsafe-declaration-merging, @typescript-eslint/unified-signatures */\n' + - '/* eslint-disable @typescript-eslint/no-unsafe-argument */\n' + - '/* THIS FILE WAS AUTO-GENERATED */\n' + - "import EventEmitter from 'events'\n" + - "import Long from 'long'\n", + '/* eslint-disable ts/no-unsafe-declaration-merging, ts/no-unsafe-argument */\n' + + '/* THIS FILE WAS AUTO-GENERATED */\n' + + "import EventEmitter from 'events'\n" + + "import Long from 'long'\n", ) Object.entries(state.imports).forEach(([module, items]) => { items = [...items] @@ -518,7 +508,7 @@ on(name: '${type.typeName}', handler: ((upd: ${type.updateType}) => void)): this }) output.write(` -// eslint-disable-next-line @typescript-eslint/no-explicit-any +// eslint-disable-next-line ts/no-explicit-any on(name: string, handler: (...args: any[]) => void): this\n /** @@ -554,7 +544,7 @@ withParams(params: RpcCallOptions): this\n`) // try to determine it automatically const checkDepsAvailability = (deps) => { return determineCommonAvailability(deps, (name) => { - const method = state.methods.list.find((it) => it.name === name && !it.overload) + const method = state.methods.list.find(it => it.name === name && !it.overload) if (!method) { throwError( @@ -583,12 +573,12 @@ withParams(params: RpcCallOptions): this\n`) // create method that calls that function and passes `this` // first let's determine the signature - const returnType = func.type ? ': ' + func.type.getText() : '' - const generics = func.typeParameters ? - `<${func.typeParameters.map((it) => it.getFullText()).join(', ')}>` : - '' + const returnType = func.type ? `: ${func.type.getText()}` : '' + const generics = func.typeParameters + ? `<${func.typeParameters.map(it => it.getFullText()).join(', ')}>` + : '' const rawParams = (func.parameters || []).filter( - (it) => !it.type || it.type.getText() !== 'ITelegramClient', + it => !it.type || it.type.getText() !== 'ITelegramClient', ) const parameters = rawParams .map((it) => { @@ -600,16 +590,16 @@ withParams(params: RpcCallOptions): this\n`) // no explicit type. // infer from initializer if ( - it.initializer.kind === ts.SyntaxKind.TrueKeyword || - it.initializer.kind === ts.SyntaxKind.FalseKeyword + it.initializer.kind === ts.SyntaxKind.TrueKeyword + || it.initializer.kind === ts.SyntaxKind.FalseKeyword ) { it.type = { kind: ts.SyntaxKind.BooleanKeyword } } else if (it.initializer.kind === ts.SyntaxKind.StringLiteral) { it.type = { kind: ts.SyntaxKind.StringKeyword } } else if ( - it.initializer.kind === ts.SyntaxKind.NumericLiteral || - (it.initializer.kind === ts.SyntaxKind.Identifier && - (it.initializer.escapedText === 'NaN' || it.initializer.escapedText === 'Infinity')) + it.initializer.kind === ts.SyntaxKind.NumericLiteral + || (it.initializer.kind === ts.SyntaxKind.Identifier + && (it.initializer.escapedText === 'NaN' || it.initializer.escapedText === 'Infinity')) ) { it.type = { kind: ts.SyntaxKind.NumberKeyword } } else { @@ -620,7 +610,7 @@ withParams(params: RpcCallOptions): this\n`) const deleteParents = (obj) => { if (Array.isArray(obj)) { - return obj.forEach((it) => deleteParents(it)) + return obj.forEach(it => deleteParents(it)) } if (obj.parent) delete obj.parent @@ -648,15 +638,16 @@ withParams(params: RpcCallOptions): this\n`) // remove @internal mark and set default values for parameters comment = comment - .replace(/^\s*\/\/+\s*@(alias|available|manual).*$/gm, '') - .replace(/(\n^|\/\*)\s*\*\s*@internal.*/m, '') - .replace(/((?:\n^|\/\*)\s*\*\s*@param )([^\s]+?)($|\s+)/gm, (_, pref, arg, post) => { - const param = rawParams.find((it) => it.name.escapedText === arg) + .replace(/^\s*\/{2,}\s*@(alias|available|manual).*$/gm, '') + .replace(/(\n|\/\*)\s*\*\s*@internal.*/, '') + .replace(/((?:\n|\/\*)\s*\*\s*@param )(\S+)($|\s+)/gm, (_, pref, arg, post) => { + const param = rawParams.find(it => it.name.escapedText === arg) if (!param) return _ if (!param._savedDefault) return _ return `${pref}[${arg}=${param._savedDefault.trim()}]${post}` }) + // eslint-disable-next-line regexp/optimal-lookaround-quantifier .replace(/(?<=\/\*.*)(?=\n\s*\*\s*(?:@[a-z]+|\/))/s, () => { switch (available) { case 'user': @@ -674,7 +665,7 @@ withParams(params: RpcCallOptions): this\n`) if (!hasOverloads) { if (!comment.match(/\/\*\*?\s*\*\//)) { // empty comment, no need to write it - output.write(comment + '\n') + output.write(`${comment}\n`) } output.write(`${name}${generics}(${parameters})${returnType}\n`) @@ -707,11 +698,11 @@ withParams(params: RpcCallOptions): this\n`) output.write('constructor(opts: TelegramClientOptions) {\n') output.write(' super()\n') state.init.forEach((code) => { - output.write(code + '\n') + output.write(`${code}\n`) }) output.write('}\n') - classContents.forEach((line) => output.write(line + '\n')) + classContents.forEach(line => output.write(`${line}\n`)) output.write(` withParams(params: RpcCallOptions): this { return withParams(this, params) @@ -719,7 +710,7 @@ withParams(params: RpcCallOptions): this\n`) output.write('}\n') - classProtoDecls.forEach((line) => output.write(line + '\n')) + classProtoDecls.forEach(line => output.write(`${line}\n`)) // proxied methods ;[ 'prepare', @@ -747,18 +738,18 @@ withParams(params: RpcCallOptions): this\n`) 'changePrimaryDc', ].forEach((name) => { output.write( - `TelegramClient.prototype.${name} = function(...args) {\n` + - ` return this._client.${name}(...args)\n` + - '}\n', + `TelegramClient.prototype.${name} = function(...args) {\n` + + ` return this._client.${name}(...args)\n` + + '}\n', ) }) // disabled methods - they are used internally and we don't want to expose them // if the user *really* needs them, they can use `client._client` to access the underlying client ;['onServerUpdate', 'onUpdate'].forEach((name) => { output.write( - `TelegramClient.prototype.${name} = function() {\n` + - ` throw new Error('${name} is not available for TelegramClient, use .on() methods instead')\n` + - '}\n', + `TelegramClient.prototype.${name} = function() {\n` + + ` throw new Error('${name} is not available for TelegramClient, use .on() methods instead')\n` + + '}\n', ) }) state.impls.forEach(({ name, code }) => output.write(`TelegramClient.prototype.${name} = ${code}\n`)) @@ -781,10 +772,6 @@ withParams(params: RpcCallOptions): this\n`) await new Promise((resolve) => { outputMethods.end(resolve) }) await new Promise((resolve) => { output.end(resolve) }) - // format the resulting files with prettier and eslint - runPrettier(targetFile) - runPrettier(targetFileMethods) - runEslint(targetFile) runEslint(targetFileMethods) } diff --git a/packages/core/scripts/generate-updates.cjs b/packages/core/scripts/generate-updates.cjs index c814655d..2e16ce70 100644 --- a/packages/core/scripts/generate-updates.cjs +++ b/packages/core/scripts/generate-updates.cjs @@ -1,18 +1,17 @@ -const fs = require('fs') -const path = require('path') -const prettier = require('prettier') +const fs = require('node:fs') +const path = require('node:path') -const snakeToCamel = (s) => { +function snakeToCamel(s) { return s.replace(/(? { return $1.substr(1).toUpperCase() }) } -const camelToPascal = (s) => s[0].toUpperCase() + s.substr(1) +const camelToPascal = s => s[0].toUpperCase() + s.substr(1) -const camelToSnake = (s) => { +function camelToSnake(s) { return s.replace(/(?<=[a-zA-Z0-9])([A-Z0-9]+(?=[A-Z]|$)|[A-Z0-9])/g, ($1) => { - return '_' + $1.toLowerCase() + return `_${$1.toLowerCase()}` }) } @@ -20,8 +19,8 @@ function parseUpdateTypes() { const lines = fs .readFileSync(path.join(__dirname, 'update-types.txt'), 'utf-8') .split('\n') - .map((it) => it.trim()) - .filter((it) => it && it[0] !== '#') + .map(it => it.trim()) + .filter(it => it && it[0] !== '#') const ret = [] @@ -42,11 +41,11 @@ function parseUpdateTypes() { } function replaceSections(filename, sections, dir = __dirname) { - let lines = fs.readFileSync(path.join(dir, '../src', filename), 'utf-8').split('\n') + const lines = fs.readFileSync(path.join(dir, '../src', filename), 'utf-8').split('\n') const findMarker = (marker) => { - const idx = lines.findIndex((line) => line.trim() === `// ${marker}`) - if (idx === -1) throw new Error(marker + ' not found') + const idx = lines.findIndex(line => line.trim() === `// ${marker}`) + if (idx === -1) throw new Error(`${marker} not found`) return idx } @@ -65,17 +64,6 @@ function replaceSections(filename, sections, dir = __dirname) { const types = parseUpdateTypes() -async function formatFile(filename, dir = __dirname) { - const targetFile = path.join(dir, '../src/', filename) - const prettierConfig = await prettier.resolveConfig(targetFile) - let fullSource = await fs.promises.readFile(targetFile, 'utf-8') - fullSource = await prettier.format(fullSource, { - ...(prettierConfig || {}), - filepath: targetFile, - }) - await fs.promises.writeFile(targetFile, fullSource) -} - function toSentence(type, stype = 'inline') { const name = camelToSnake(type.handlerTypeName).toLowerCase().replace(/_/g, ' ') @@ -91,8 +79,8 @@ function toSentence(type, stype = 'inline') { function generateParsedUpdate() { replaceSections('highlevel/types/updates/index.ts', { codegen: - 'export type ParsedUpdate =\n' + - types.map((typ) => ` | { name: '${typ.typeName}'; data: ${typ.updateType} }\n`).join(''), + `export type ParsedUpdate =\n${ + types.map(typ => ` | { name: '${typ.typeName}'; data: ${typ.updateType} }\n`).join('')}`, }) } @@ -100,7 +88,7 @@ async function main() { generateParsedUpdate() } -module.exports = { types, toSentence, replaceSections, formatFile } +module.exports = { types, toSentence, replaceSections } if (require.main === module) { main().catch(console.error) diff --git a/packages/core/src/highlevel/base.test.ts b/packages/core/src/highlevel/base.test.ts index 8447405a..4aeef310 100644 --- a/packages/core/src/highlevel/base.test.ts +++ b/packages/core/src/highlevel/base.test.ts @@ -1,5 +1,4 @@ import { describe, expect, it } from 'vitest' - import { StubTelegramClient } from '@mtcute/test' describe('BaseTelegramClient', () => { diff --git a/packages/core/src/highlevel/base.ts b/packages/core/src/highlevel/base.ts index f6708d9a..5ed8520e 100644 --- a/packages/core/src/highlevel/base.ts +++ b/packages/core/src/highlevel/base.ts @@ -1,30 +1,35 @@ -/* eslint-disable @typescript-eslint/require-await */ -import { mtp, tl } from '@mtcute/tl' +import type { mtp } from '@mtcute/tl' +import { tl } from '@mtcute/tl' -import { MtClient, MtClientOptions } from '../network/client.js' -import { ConnectionKind, RpcCallOptions } from '../network/network-manager.js' -import { StorageManagerExtraOptions } from '../storage/storage.js' +import type { MtClientOptions } from '../network/client.js' +import { MtClient } from '../network/client.js' +import type { ConnectionKind, RpcCallOptions } from '../network/network-manager.js' +import type { StorageManagerExtraOptions } from '../storage/storage.js' import { MtArgumentError } from '../types/errors.js' -import { MustEqual } from '../types/utils.js' +import type { MustEqual } from '../types/utils.js' import { reportUnknownError } from '../utils/error-reporting.js' +import type { + ICryptoProvider, + Logger, + StringSessionData, +} from '../utils/index.js' import { asyncResettable, computeNewPasswordHash, computeSrpParams, - ICryptoProvider, isTlRpcError, - Logger, readStringSession, - StringSessionData, writeStringSession, } from '../utils/index.js' import { LogManager } from '../utils/logger.js' -import { ConnectionState, ITelegramClient, ServerUpdateHandler } from './client.types.js' + +import type { ConnectionState, ITelegramClient, ServerUpdateHandler } from './client.types.js' import { AppConfigManager } from './managers/app-config-manager.js' -import { ITelegramStorageProvider } from './storage/provider.js' -import { TelegramStorageManager, TelegramStorageManagerExtraOptions } from './storage/storage.js' +import type { ITelegramStorageProvider } from './storage/provider.js' +import type { TelegramStorageManagerExtraOptions } from './storage/storage.js' +import { TelegramStorageManager } from './storage/storage.js' import { UpdatesManager } from './updates/manager.js' -import { RawUpdateHandler, UpdatesManagerParams } from './updates/types.js' +import type { RawUpdateHandler, UpdatesManagerParams } from './updates/types.js' export interface BaseTelegramClientOptions extends MtClientOptions { storage: ITelegramStorageProvider @@ -88,7 +93,8 @@ export class BaseTelegramClient implements ITelegramClient { ...this.params.storageOptions, }) } - readonly appConfig = new AppConfigManager(this) + + readonly appConfig: AppConfigManager = new AppConfigManager(this) private _prepare = asyncResettable(async () => { await this.mt.prepare() @@ -109,7 +115,7 @@ export class BaseTelegramClient implements ITelegramClient { * * Call {@link connect} to actually connect. */ - prepare() { + prepare(): Promise { return this._prepare.run() } @@ -197,6 +203,7 @@ export class BaseTelegramClient implements ITelegramClient { const res = await this.mt.call(message, params) if (isTlRpcError(res)) { + // eslint-disable-next-line unicorn/error-message const error = makeRpcError(res, new Error().stack ?? '', message._) if (error.unknown && this.params.enableErrorReporting) { @@ -208,7 +215,7 @@ export class BaseTelegramClient implements ITelegramClient { await this.storage.peers.updatePeersFrom(res) - // eslint-disable-next-line @typescript-eslint/no-unsafe-return + // eslint-disable-next-line ts/no-unsafe-return return res } @@ -233,9 +240,9 @@ export class BaseTelegramClient implements ITelegramClient { if (data.testMode && !this.params.testMode) { throw new Error( - 'This session string is not for the current backend. ' + - `Session is ${data.testMode ? 'test' : 'prod'}, ` + - `but the client is ${this.params.testMode ? 'test' : 'prod'}`, + 'This session string is not for the current backend. ' + + `Session is ${data.testMode ? 'test' : 'prod'}, ` + + `but the client is ${this.params.testMode ? 'test' : 'prod'}`, ) } @@ -320,7 +327,10 @@ export class BaseTelegramClient implements ITelegramClient { this._connectionStateHandler = handler } - async getApiCrenetials() { + async getApiCrenetials(): Promise<{ + id: number + hash: string + }> { return { id: this.params.apiId, hash: this.params.apiHash, @@ -346,6 +356,7 @@ export class BaseTelegramClient implements ITelegramClient { computeSrpParams(request: tl.account.RawPassword, password: string): Promise { return computeSrpParams(this.crypto, request, password) } + computeNewPasswordHash(algo: tl.TypePasswordKdfAlgo, password: string): Promise { return computeNewPasswordHash(this.crypto, algo, password) } diff --git a/packages/core/src/highlevel/client.ts b/packages/core/src/highlevel/client.ts index fa5409b6..c4f43a21 100644 --- a/packages/core/src/highlevel/client.ts +++ b/packages/core/src/highlevel/client.ts @@ -1,29 +1,38 @@ -/* eslint-disable @typescript-eslint/no-unsafe-declaration-merging, @typescript-eslint/unified-signatures */ -/* eslint-disable @typescript-eslint/no-unsafe-argument */ +/* eslint-disable ts/no-unsafe-declaration-merging, ts/no-unsafe-argument */ /* THIS FILE WAS AUTO-GENERATED */ -import EventEmitter from 'events' -import Long from 'long' +import EventEmitter from 'node:events' -import { tdFileId } from '@mtcute/file-id' -import { tl } from '@mtcute/tl' +import type Long from 'long' +import type { tdFileId } from '@mtcute/file-id' +import type { tl } from '@mtcute/tl' -import { RpcCallOptions } from '../network/index.js' -import { MaybeArray, MaybePromise, MtUnsupportedError, PartialExcept, PartialOnly } from '../types/index.js' -import { BaseTelegramClient, BaseTelegramClientOptions } from './base.js' -import { ITelegramClient } from './client.types.js' +import type { RpcCallOptions } from '../network/index.js' +import type { MaybeArray, MaybePromise, PartialExcept, PartialOnly } from '../types/index.js' +import { MtUnsupportedError } from '../types/index.js' + +import type { BaseTelegramClientOptions } from './base.js' +import { BaseTelegramClient } from './base.js' +import type { ITelegramClient } from './client.types.js' +import type { AllStories, ArrayPaginated, ArrayWithTotal, Boost, BoostSlot, BoostStats, BotChatJoinRequestUpdate, BotCommands, BotReactionCountUpdate, BotReactionUpdate, BotStoppedUpdate, BusinessCallbackQuery, BusinessChatLink, BusinessConnection, BusinessMessage, BusinessWorkHoursDay, CallbackQuery, Chat, ChatEvent, ChatInviteLink, ChatInviteLinkMember, ChatJoinRequestUpdate, ChatMember, ChatMemberUpdate, ChatPreview, ChatlistPreview, ChosenInlineResult, CollectibleInfo, DeleteBusinessMessageUpdate, DeleteMessageUpdate, DeleteStoryUpdate, Dialog, FactCheck, FileDownloadLocation, FileDownloadParameters, ForumTopic, FullChat, GameHighScore, HistoryReadUpdate, InlineCallbackQuery, InlineQuery, InputChatEventFilters, InputDialogFolder, InputFileLike, InputInlineResult, InputMediaLike, InputMediaSticker, InputMessageId, InputPeerLike, InputPrivacyRule, InputReaction, InputStickerSet, InputStickerSetItem, InputText, MaybeDynamic, Message, MessageEffect, MessageMedia, MessageReactions, ParametersSkip2, ParsedUpdate, PeerReaction, PeerStories, PeersIndex, Photo, Poll, PollUpdate, PollVoteUpdate, PreCheckoutQuery, RawDocument, ReplyMarkup, SentCode, Sticker, StickerSet, StickerSourceType, StickerType, StoriesStealthMode, Story, StoryInteractions, StoryUpdate, StoryViewer, StoryViewersList, TakeoutSession, TextWithEntities, TypingStatus, UploadFileLike, UploadedFile, User, UserStatusUpdate, UserTypingUpdate } from './types/index.js' +import type { StringSessionData } from './utils/string-session.js' +import type { ITelegramStorageProvider } from './storage/provider.js' +import { Conversation } from './types/conversation.js' +import type { ParsedUpdateHandlerParams } from './updates/parsed.js' +import { makeParsedUpdateHandler } from './updates/parsed.js' import { checkPassword } from './methods/auth/check-password.js' import { getPasswordHint } from './methods/auth/get-password-hint.js' -import { logOut, LogOutResult } from './methods/auth/log-out.js' +import type { LogOutResult } from './methods/auth/log-out.js' +import { logOut } from './methods/auth/log-out.js' import { recoverPassword } from './methods/auth/recover-password.js' import { resendCode } from './methods/auth/resend-code.js' import { run } from './methods/auth/run.js' import { sendCode } from './methods/auth/send-code.js' import { sendRecoveryCode } from './methods/auth/send-recovery-code.js' -import { signIn } from './methods/auth/sign-in.js' import { signInBot } from './methods/auth/sign-in-bot.js' import { signInQr } from './methods/auth/sign-in-qr.js' -import { start } from './methods/auth/start.js' +import { signIn } from './methods/auth/sign-in.js' import { startTest } from './methods/auth/start-test.js' +import { start } from './methods/auth/start.js' import { isSelfPeer } from './methods/auth/utils.js' import { answerCallbackQuery } from './methods/bots/answer-callback-query.js' import { answerInlineQuery } from './methods/bots/answer-inline-query.js' @@ -43,7 +52,8 @@ import { addChatMembers } from './methods/chats/add-chat-members.js' import { archiveChats } from './methods/chats/archive-chats.js' import { banChatMember } from './methods/chats/ban-chat-member.js' import { createChannel } from './methods/chats/create-channel.js' -import { createGroup, CreateGroupResult } from './methods/chats/create-group.js' +import type { CreateGroupResult } from './methods/chats/create-group.js' +import { createGroup } from './methods/chats/create-group.js' import { createSupergroup } from './methods/chats/create-supergroup.js' import { deleteChannel } from './methods/chats/delete-channel.js' import { deleteChatPhoto } from './methods/chats/delete-chat-photo.js' @@ -51,11 +61,11 @@ import { deleteGroup } from './methods/chats/delete-group.js' import { deleteHistory } from './methods/chats/delete-history.js' import { deleteUserHistory } from './methods/chats/delete-user-history.js' import { editAdminRights } from './methods/chats/edit-admin-rights.js' -import { getChat } from './methods/chats/get-chat.js' import { getChatEventLog } from './methods/chats/get-chat-event-log.js' import { getChatMember } from './methods/chats/get-chat-member.js' import { getChatMembers } from './methods/chats/get-chat-members.js' import { getChatPreview } from './methods/chats/get-chat-preview.js' +import { getChat } from './methods/chats/get-chat.js' import { getFullChat } from './methods/chats/get-full-chat.js' import { getNearbyChats } from './methods/chats/get-nearby-chats.js' import { getSimilarChannels } from './methods/chats/get-similar-channels.js' @@ -108,20 +118,22 @@ import { uploadMedia } from './methods/files/upload-media.js' import { createForumTopic } from './methods/forums/create-forum-topic.js' import { deleteForumTopicHistory } from './methods/forums/delete-forum-topic-history.js' import { editForumTopic } from './methods/forums/edit-forum-topic.js' -import { getForumTopics, GetForumTopicsOffset } from './methods/forums/get-forum-topics.js' import { getForumTopicsById } from './methods/forums/get-forum-topics-by-id.js' +import type { GetForumTopicsOffset } from './methods/forums/get-forum-topics.js' +import { getForumTopics } from './methods/forums/get-forum-topics.js' import { iterForumTopics } from './methods/forums/iter-forum-topics.js' import { reorderPinnedForumTopics } from './methods/forums/reorder-pinned-forum-topics.js' -import { toggleForum } from './methods/forums/toggle-forum.js' import { toggleForumTopicClosed } from './methods/forums/toggle-forum-topic-closed.js' import { toggleForumTopicPinned } from './methods/forums/toggle-forum-topic-pinned.js' +import { toggleForum } from './methods/forums/toggle-forum.js' import { toggleGeneralTopicHidden } from './methods/forums/toggle-general-topic-hidden.js' import { createInviteLink } from './methods/invite-links/create-invite-link.js' import { editInviteLink } from './methods/invite-links/edit-invite-link.js' import { exportInviteLink } from './methods/invite-links/export-invite-link.js' -import { getInviteLink } from './methods/invite-links/get-invite-link.js' import { getInviteLinkMembers } from './methods/invite-links/get-invite-link-members.js' -import { getInviteLinks, GetInviteLinksOffset } from './methods/invite-links/get-invite-links.js' +import { getInviteLink } from './methods/invite-links/get-invite-link.js' +import type { GetInviteLinksOffset } from './methods/invite-links/get-invite-links.js' +import { getInviteLinks } from './methods/invite-links/get-invite-links.js' import { getPrimaryInviteLink } from './methods/invite-links/get-primary-invite-link.js' import { hideAllJoinRequests } from './methods/invite-links/hide-all-join-requests.js' import { hideJoinRequest } from './methods/invite-links/hide-join-request.js' @@ -129,23 +141,27 @@ import { iterInviteLinkMembers } from './methods/invite-links/iter-invite-link-m import { iterInviteLinks } from './methods/invite-links/iter-invite-links.js' import { revokeInviteLink } from './methods/invite-links/revoke-invite-link.js' import { closePoll } from './methods/messages/close-poll.js' -import { deleteMessages, deleteMessagesById, DeleteMessagesParams } from './methods/messages/delete-messages.js' +import type { DeleteMessagesParams } from './methods/messages/delete-messages.js' +import { deleteMessages, deleteMessagesById } from './methods/messages/delete-messages.js' import { deleteScheduledMessages } from './methods/messages/delete-scheduled-messages.js' import { editInlineMessage } from './methods/messages/edit-inline-message.js' import { editMessage } from './methods/messages/edit-message.js' -import { ForwardMessageOptions, forwardMessages, forwardMessagesById } from './methods/messages/forward-messages.js' +import type { ForwardMessageOptions } from './methods/messages/forward-messages.js' +import { forwardMessages, forwardMessagesById } from './methods/messages/forward-messages.js' import { getAllScheduledMessages } from './methods/messages/get-all-scheduled-messages.js' import { getAvailableMessageEffects } from './methods/messages/get-available-effects.js' import { getCallbackQueryMessage } from './methods/messages/get-callback-query-message.js' import { getDiscussionMessage } from './methods/messages/get-discussion-message.js' import { getFactCheck } from './methods/messages/get-fact-check.js' -import { getHistory, GetHistoryOffset } from './methods/messages/get-history.js' +import type { GetHistoryOffset } from './methods/messages/get-history.js' +import { getHistory } from './methods/messages/get-history.js' import { getMessageByLink } from './methods/messages/get-message-by-link.js' import { getMessageGroup } from './methods/messages/get-message-group.js' import { getMessageReactions, getMessageReactionsById } from './methods/messages/get-message-reactions.js' -import { getMessages } from './methods/messages/get-messages.js' import { getMessagesUnsafe } from './methods/messages/get-messages-unsafe.js' -import { getReactionUsers, GetReactionUsersOffset } from './methods/messages/get-reaction-users.js' +import { getMessages } from './methods/messages/get-messages.js' +import type { GetReactionUsersOffset } from './methods/messages/get-reaction-users.js' +import { getReactionUsers } from './methods/messages/get-reaction-users.js' import { getReplyTo } from './methods/messages/get-reply-to.js' import { getScheduledMessages } from './methods/messages/get-scheduled-messages.js' import { iterHistory } from './methods/messages/iter-history.js' @@ -155,17 +171,23 @@ import { iterSearchMessages } from './methods/messages/iter-search-messages.js' import { pinMessage } from './methods/messages/pin-message.js' import { readHistory } from './methods/messages/read-history.js' import { readReactions } from './methods/messages/read-reactions.js' -import { searchGlobal, SearchGlobalOffset } from './methods/messages/search-global.js' -import { iterSearchHashtag, searchHashtag, SearchHashtagOffset } from './methods/messages/search-hashtag.js' -import { searchMessages, SearchMessagesOffset } from './methods/messages/search-messages.js' +import type { SearchGlobalOffset } from './methods/messages/search-global.js' +import { searchGlobal } from './methods/messages/search-global.js' +import type { SearchHashtagOffset } from './methods/messages/search-hashtag.js' +import { iterSearchHashtag, searchHashtag } from './methods/messages/search-hashtag.js' +import type { SearchMessagesOffset } from './methods/messages/search-messages.js' +import { searchMessages } from './methods/messages/search-messages.js' import { answerMedia, answerMediaGroup, answerText } from './methods/messages/send-answer.js' import { commentMedia, commentMediaGroup, commentText } from './methods/messages/send-comment.js' -import { CommonSendParams } from './methods/messages/send-common.js' -import { sendCopy, SendCopyParams } from './methods/messages/send-copy.js' -import { sendCopyGroup, SendCopyGroupParams } from './methods/messages/send-copy-group.js' -import { sendMedia } from './methods/messages/send-media.js' +import type { CommonSendParams } from './methods/messages/send-common.js' +import type { SendCopyGroupParams } from './methods/messages/send-copy-group.js' +import { sendCopyGroup } from './methods/messages/send-copy-group.js' +import type { SendCopyParams } from './methods/messages/send-copy.js' +import { sendCopy } from './methods/messages/send-copy.js' import { sendMediaGroup } from './methods/messages/send-media-group.js' -import { QuoteParamsFrom, quoteWithMedia, quoteWithMediaGroup, quoteWithText } from './methods/messages/send-quote.js' +import { sendMedia } from './methods/messages/send-media.js' +import type { QuoteParamsFrom } from './methods/messages/send-quote.js' +import { quoteWithMedia, quoteWithMediaGroup, quoteWithText } from './methods/messages/send-quote.js' import { sendReaction } from './methods/messages/send-reaction.js' import { replyMedia, replyMediaGroup, replyText } from './methods/messages/send-reply.js' import { sendScheduled } from './methods/messages/send-scheduled.js' @@ -179,13 +201,13 @@ import { unpinMessage } from './methods/messages/unpin-message.js' import { getCollectibleInfo } from './methods/misc/get-collectible-info.js' import { initTakeoutSession } from './methods/misc/init-takeout-session.js' import { _normalizePrivacyRules } from './methods/misc/normalize-privacy-rules.js' -import { withParams } from './methods/misc/with-params.js' import { changeCloudPassword } from './methods/password/change-cloud-password.js' import { enableCloudPassword } from './methods/password/enable-cloud-password.js' import { cancelPasswordEmail, resendPasswordEmail, verifyPasswordEmail } from './methods/password/password-email.js' import { removeCloudPassword } from './methods/password/remove-cloud-password.js' import { applyBoost } from './methods/premium/apply-boost.js' -import { canApplyBoost, CanApplyBoostResult } from './methods/premium/can-apply-boost.js' +import type { CanApplyBoostResult } from './methods/premium/can-apply-boost.js' +import { canApplyBoost } from './methods/premium/can-apply-boost.js' import { createBusinessChatLink } from './methods/premium/create-business-chat-link.js' import { deleteBusinessChatLink, editBusinessChatLink } from './methods/premium/edit-business-chat-link.js' import { getBoostStats } from './methods/premium/get-boost-stats.js' @@ -207,7 +229,8 @@ import { moveStickerInSet } from './methods/stickers/move-sticker-in-set.js' import { replaceStickerInSet } from './methods/stickers/replace-sticker-in-set.js' import { setChatStickerSet } from './methods/stickers/set-chat-sticker-set.js' import { setStickerSetThumb } from './methods/stickers/set-sticker-set-thumb.js' -import { canSendStory, CanSendStoryResult } from './methods/stories/can-send-story.js' +import type { CanSendStoryResult } from './methods/stories/can-send-story.js' +import { canSendStory } from './methods/stories/can-send-story.js' import { deleteStories } from './methods/stories/delete-stories.js' import { editStory } from './methods/stories/edit-story.js' import { getAllStories } from './methods/stories/get-all-stories.js' @@ -224,8 +247,8 @@ import { iterProfileStories } from './methods/stories/iter-profile-stories.js' import { iterStoryViewers } from './methods/stories/iter-story-viewers.js' import { readStories } from './methods/stories/read-stories.js' import { reportStory } from './methods/stories/report-story.js' -import { sendStory } from './methods/stories/send-story.js' import { sendStoryReaction } from './methods/stories/send-story-reaction.js' +import { sendStory } from './methods/stories/send-story.js' import { togglePeerStoriesArchived } from './methods/stories/toggle-peer-stories-archived.js' import { toggleStoriesPinned } from './methods/stories/toggle-stories-pinned.js' import { blockUser } from './methods/users/block-user.js' @@ -239,8 +262,8 @@ import { getProfilePhoto } from './methods/users/get-profile-photo.js' import { getProfilePhotos } from './methods/users/get-profile-photos.js' import { getUsers } from './methods/users/get-users.js' import { iterProfilePhotos } from './methods/users/iter-profile-photos.js' -import { resolveChannel, resolvePeer, resolveUser } from './methods/users/resolve-peer.js' import { resolvePeerMany } from './methods/users/resolve-peer-many.js' +import { resolveChannel, resolvePeer, resolveUser } from './methods/users/resolve-peer.js' import { setGlobalTtl } from './methods/users/set-global-ttl.js' import { setMyBirthday } from './methods/users/set-my-birthday.js' import { setMyEmojiStatus } from './methods/users/set-my-emoji-status.js' @@ -249,116 +272,21 @@ import { setMyUsername } from './methods/users/set-my-username.js' import { setOffline } from './methods/users/set-offline.js' import { unblockUser } from './methods/users/unblock-user.js' import { updateProfile } from './methods/users/update-profile.js' -import { ITelegramStorageProvider } from './storage/provider.js' -import { Conversation } from './types/conversation.js' -import { - AllStories, - ArrayPaginated, - ArrayWithTotal, - Boost, - BoostSlot, - BoostStats, - BotChatJoinRequestUpdate, - BotCommands, - BotReactionCountUpdate, - BotReactionUpdate, - BotStoppedUpdate, - BusinessCallbackQuery, - BusinessChatLink, - BusinessConnection, - BusinessMessage, - BusinessWorkHoursDay, - CallbackQuery, - Chat, - ChatEvent, - ChatInviteLink, - ChatInviteLinkMember, - ChatJoinRequestUpdate, - ChatlistPreview, - ChatMember, - ChatMemberUpdate, - ChatPreview, - ChosenInlineResult, - CollectibleInfo, - DeleteBusinessMessageUpdate, - DeleteMessageUpdate, - DeleteStoryUpdate, - Dialog, - FactCheck, - FileDownloadLocation, - FileDownloadParameters, - ForumTopic, - FullChat, - GameHighScore, - HistoryReadUpdate, - InlineCallbackQuery, - InlineQuery, - InputChatEventFilters, - InputDialogFolder, - InputFileLike, - InputInlineResult, - InputMediaLike, - InputMediaSticker, - InputMessageId, - InputPeerLike, - InputPrivacyRule, - InputReaction, - InputStickerSet, - InputStickerSetItem, - InputText, - MaybeDynamic, - Message, - MessageEffect, - MessageMedia, - MessageReactions, - ParametersSkip2, - ParsedUpdate, - PeerReaction, - PeersIndex, - PeerStories, - Photo, - Poll, - PollUpdate, - PollVoteUpdate, - PreCheckoutQuery, - RawDocument, - ReplyMarkup, - SentCode, - Sticker, - StickerSet, - StickerSourceType, - StickerType, - StoriesStealthMode, - Story, - StoryInteractions, - StoryUpdate, - StoryViewer, - StoryViewersList, - TakeoutSession, - TextWithEntities, - TypingStatus, - UploadedFile, - UploadFileLike, - User, - UserStatusUpdate, - UserTypingUpdate, -} from './types/index.js' -import { makeParsedUpdateHandler, ParsedUpdateHandlerParams } from './updates/parsed.js' -import { StringSessionData } from './utils/string-session.js' +import { withParams } from './methods/misc/with-params.js' // from methods/_init.ts // @copy type TelegramClientOptions = ( | (PartialOnly, 'transport' | 'crypto'> & { - /** - * Storage to use for this client. - * - * If a string is passed, it will be used as - * a name for the default platform-specific storage provider to use. - * - * @default `"client.session"` - */ - storage?: string | ITelegramStorageProvider - }) + /** + * Storage to use for this client. + * + * If a string is passed, it will be used as + * a name for the default platform-specific storage provider to use. + * + * @default `"client.session"` + */ + storage?: string | ITelegramStorageProvider + }) | { client: ITelegramClient } ) & { /** @@ -380,218 +308,217 @@ type TelegramClientOptions = ( } export interface TelegramClient extends ITelegramClient { - /** - * Register a raw update handler - * - * @param name Event name - * @param handler Raw update handler - */ - on(name: 'raw_update', handler: (upd: tl.TypeUpdate | tl.TypeMessage, peers: PeersIndex) => void): this +/** + * Register a raw update handler + * + * @param name Event name + * @param handler Raw update handler + */ + on(name: 'raw_update', handler: ((upd: tl.TypeUpdate | tl.TypeMessage, peers: PeersIndex) => void)): this /** * Register a parsed update handler * * @param name Event name * @param handler Raw update handler */ - on(name: 'update', handler: (upd: ParsedUpdate) => void): this + on(name: 'update', handler: ((upd: ParsedUpdate) => void)): this /** * Register a new message handler * * @param name Event name * @param handler New message handler */ - on(name: 'new_message', handler: (upd: Message) => void): this + on(name: 'new_message', handler: ((upd: Message) => void)): this /** * Register an edit message handler * * @param name Event name * @param handler Edit message handler */ - on(name: 'edit_message', handler: (upd: Message) => void): this + on(name: 'edit_message', handler: ((upd: Message) => void)): this /** * Register a message group handler * * @param name Event name * @param handler Message group handler */ - on(name: 'message_group', handler: (upd: Message[]) => void): this + on(name: 'message_group', handler: ((upd: Message[]) => void)): this /** * Register a delete message handler * * @param name Event name * @param handler Delete message handler */ - on(name: 'delete_message', handler: (upd: DeleteMessageUpdate) => void): this + on(name: 'delete_message', handler: ((upd: DeleteMessageUpdate) => void)): this /** * Register a chat member update handler * * @param name Event name * @param handler Chat member update handler */ - on(name: 'chat_member', handler: (upd: ChatMemberUpdate) => void): this + on(name: 'chat_member', handler: ((upd: ChatMemberUpdate) => void)): this /** * Register an inline query handler * * @param name Event name * @param handler Inline query handler */ - on(name: 'inline_query', handler: (upd: InlineQuery) => void): this + on(name: 'inline_query', handler: ((upd: InlineQuery) => void)): this /** * Register a chosen inline result handler * * @param name Event name * @param handler Chosen inline result handler */ - on(name: 'chosen_inline_result', handler: (upd: ChosenInlineResult) => void): this + on(name: 'chosen_inline_result', handler: ((upd: ChosenInlineResult) => void)): this /** * Register a callback query handler * * @param name Event name * @param handler Callback query handler */ - on(name: 'callback_query', handler: (upd: CallbackQuery) => void): this + on(name: 'callback_query', handler: ((upd: CallbackQuery) => void)): this /** * Register an inline callback query handler * * @param name Event name * @param handler Inline callback query handler */ - on(name: 'inline_callback_query', handler: (upd: InlineCallbackQuery) => void): this + on(name: 'inline_callback_query', handler: ((upd: InlineCallbackQuery) => void)): this /** * Register a business callback query handler * * @param name Event name * @param handler Business callback query handler */ - on(name: 'business_callback_query', handler: (upd: BusinessCallbackQuery) => void): this + on(name: 'business_callback_query', handler: ((upd: BusinessCallbackQuery) => void)): this /** * Register a poll update handler * * @param name Event name * @param handler Poll update handler */ - on(name: 'poll', handler: (upd: PollUpdate) => void): this + on(name: 'poll', handler: ((upd: PollUpdate) => void)): this /** * Register a poll vote handler * * @param name Event name * @param handler Poll vote handler */ - on(name: 'poll_vote', handler: (upd: PollVoteUpdate) => void): this + on(name: 'poll_vote', handler: ((upd: PollVoteUpdate) => void)): this /** * Register an user status update handler * * @param name Event name * @param handler User status update handler */ - on(name: 'user_status', handler: (upd: UserStatusUpdate) => void): this + on(name: 'user_status', handler: ((upd: UserStatusUpdate) => void)): this /** * Register an user typing handler * * @param name Event name * @param handler User typing handler */ - on(name: 'user_typing', handler: (upd: UserTypingUpdate) => void): this + on(name: 'user_typing', handler: ((upd: UserTypingUpdate) => void)): this /** * Register a history read handler * * @param name Event name * @param handler History read handler */ - on(name: 'history_read', handler: (upd: HistoryReadUpdate) => void): this + on(name: 'history_read', handler: ((upd: HistoryReadUpdate) => void)): this /** * Register a bot stopped handler * * @param name Event name * @param handler Bot stopped handler */ - on(name: 'bot_stopped', handler: (upd: BotStoppedUpdate) => void): this + on(name: 'bot_stopped', handler: ((upd: BotStoppedUpdate) => void)): this /** * Register a bot chat join request handler * * @param name Event name * @param handler Bot chat join request handler */ - on(name: 'bot_chat_join_request', handler: (upd: BotChatJoinRequestUpdate) => void): this + on(name: 'bot_chat_join_request', handler: ((upd: BotChatJoinRequestUpdate) => void)): this /** * Register a chat join request handler * * @param name Event name * @param handler Chat join request handler */ - on(name: 'chat_join_request', handler: (upd: ChatJoinRequestUpdate) => void): this + on(name: 'chat_join_request', handler: ((upd: ChatJoinRequestUpdate) => void)): this /** * Register a pre checkout query handler * * @param name Event name * @param handler Pre checkout query handler */ - on(name: 'pre_checkout_query', handler: (upd: PreCheckoutQuery) => void): this + on(name: 'pre_checkout_query', handler: ((upd: PreCheckoutQuery) => void)): this /** * Register a story update handler * * @param name Event name * @param handler Story update handler */ - on(name: 'story', handler: (upd: StoryUpdate) => void): this + on(name: 'story', handler: ((upd: StoryUpdate) => void)): this /** * Register a delete story handler * * @param name Event name * @param handler Delete story handler */ - on(name: 'delete_story', handler: (upd: DeleteStoryUpdate) => void): this + on(name: 'delete_story', handler: ((upd: DeleteStoryUpdate) => void)): this /** * Register a bot reaction update handler * * @param name Event name * @param handler Bot reaction update handler */ - on(name: 'bot_reaction', handler: (upd: BotReactionUpdate) => void): this + on(name: 'bot_reaction', handler: ((upd: BotReactionUpdate) => void)): this /** * Register a bot reaction count update handler * * @param name Event name * @param handler Bot reaction count update handler */ - on(name: 'bot_reaction_count', handler: (upd: BotReactionCountUpdate) => void): this + on(name: 'bot_reaction_count', handler: ((upd: BotReactionCountUpdate) => void)): this /** * Register a business connection update handler * * @param name Event name * @param handler Business connection update handler */ - on(name: 'business_connection', handler: (upd: BusinessConnection) => void): this + on(name: 'business_connection', handler: ((upd: BusinessConnection) => void)): this /** * Register a new business message handler * * @param name Event name * @param handler New business message handler */ - on(name: 'new_business_message', handler: (upd: BusinessMessage) => void): this + on(name: 'new_business_message', handler: ((upd: BusinessMessage) => void)): this /** * Register an edit business message handler * * @param name Event name * @param handler Edit business message handler */ - on(name: 'edit_business_message', handler: (upd: BusinessMessage) => void): this + on(name: 'edit_business_message', handler: ((upd: BusinessMessage) => void)): this /** * Register a business message group handler * * @param name Event name * @param handler Business message group handler */ - on(name: 'business_message_group', handler: (upd: BusinessMessage[]) => void): this + on(name: 'business_message_group', handler: ((upd: BusinessMessage[]) => void)): this /** * Register a delete business message handler * * @param name Event name * @param handler Delete business message handler */ - on(name: 'delete_business_message', handler: (upd: DeleteBusinessMessageUpdate) => void): this + on(name: 'delete_business_message', handler: ((upd: DeleteBusinessMessageUpdate) => void)): this - // eslint-disable-next-line @typescript-eslint/no-explicit-any on(name: string, handler: (...args: any[]) => void): this /** @@ -638,10 +565,11 @@ export interface TelegramClient extends ITelegramClient { * @returns The authorized user * @throws BadRequestError In case the code is invalid */ - recoverPassword(params: { + recoverPassword( + params: { /** The recovery code sent via email */ - recoveryCode: string - }): Promise + recoveryCode: string + }): Promise /** * Re-send the confirmation code using a different type. * @@ -650,16 +578,17 @@ export interface TelegramClient extends ITelegramClient { * **Available**: 👤 users only * */ - resendCode(params: { + resendCode( + params: { /** Phone number in international format */ - phone: string + phone: string - /** Confirmation code identifier from {@link SentCode} */ - phoneCodeHash: string + /** Confirmation code identifier from {@link SentCode} */ + phoneCodeHash: string - /** Abort signal */ - abortSignal?: AbortSignal - }): Promise + /** Abort signal */ + abortSignal?: AbortSignal + }): Promise /** * Simple wrapper that calls {@link start} and then * provided callback function (if any) without the @@ -674,7 +603,9 @@ export interface TelegramClient extends ITelegramClient { * @param then Function to be called after {@link start} returns * @deprecated This method provides no real value over {@link start}, please use it instead */ - run(params: Parameters[1], then?: (user: User) => void | Promise): void + run( + params: Parameters[1], + then?: (user: User) => void | Promise): void /** * Send the confirmation code to the given phone number * @@ -682,19 +613,20 @@ export interface TelegramClient extends ITelegramClient { * * @returns An object containing information about the sent confirmation code */ - sendCode(params: { + sendCode( + params: { /** Phone number in international format */ - phone: string + phone: string - /** Saved future auth tokens, if any */ - futureAuthTokens?: Uint8Array[] + /** Saved future auth tokens, if any */ + futureAuthTokens?: Uint8Array[] - /** Additional code settings to pass to the server */ - codeSettings?: Omit + /** Additional code settings to pass to the server */ + codeSettings?: Omit - /** Abort signal */ - abortSignal?: AbortSignal - }): Promise + /** Abort signal */ + abortSignal?: AbortSignal + }): Promise /** * Send a code to email needed to recover your password * @@ -722,34 +654,35 @@ export interface TelegramClient extends ITelegramClient { * **Available**: 👤 users only * */ - signInQr(params: { + signInQr( + params: { /** * Function that will be called whenever the login URL is changed. * * The app is expected to display `url` as a QR code to the user */ - onUrlUpdated: (url: string, expires: Date) => void + onUrlUpdated: (url: string, expires: Date) => void - /** - * Function that will be called when the user has scanned the QR code - * (i.e. when `updateLoginToken` is received), and the library is finalizing the auth - */ - onQrScanned?: () => void + /** + * Function that will be called when the user has scanned the QR code + * (i.e. when `updateLoginToken` is received), and the library is finalizing the auth + */ + onQrScanned?: () => void - /** Password for 2FA */ - password?: MaybeDynamic + /** Password for 2FA */ + password?: MaybeDynamic - /** - * Function that will be called after the server has rejected the password. - * - * Note that in case {@link password} is not a function, - * this callback will never be called, and an error will be thrown instead. - */ - invalidPasswordCallback?: () => MaybePromise + /** + * Function that will be called after the server has rejected the password. + * + * Note that in case {@link password} is not a function, + * this callback will never be called, and an error will be thrown instead. + */ + invalidPasswordCallback?: () => MaybePromise - /** Abort signal */ - abortSignal?: AbortSignal - }): Promise + /** Abort signal */ + abortSignal?: AbortSignal + }): Promise /** * Authorize a user in Telegram with a valid confirmation code. * @@ -759,16 +692,17 @@ export interface TelegramClient extends ITelegramClient { * @throws BadRequestError In case the arguments are invalid * @throws SessionPasswordNeededError In case a password is needed to sign in */ - signIn(params: { + signIn( + params: { /** Phone number in international format */ - phone: string - /** Code identifier from {@link sendCode} */ - phoneCodeHash: string - /** The confirmation code that was received */ - phoneCode: string - /** Abort signal */ - abortSignal?: AbortSignal - }): Promise + phone: string + /** Code identifier from {@link sendCode} */ + phoneCodeHash: string + /** The confirmation code that was received */ + phoneCode: string + /** Abort signal */ + abortSignal?: AbortSignal + }): Promise /** * Utility function to quickly authorize on test DC * using a [Test phone number](https://core.telegram.org/api/auth#test-phone-numbers), @@ -781,26 +715,27 @@ export interface TelegramClient extends ITelegramClient { * * @param params Additional parameters */ - startTest(params?: { + startTest( + params?: { /** * Whether to log out if current session is logged in. * * @default false. */ - logout?: boolean + logout?: boolean - /** - * Override phone number. Must be a valid Test phone number. - * - * By default is randomly generated. - */ - phone?: string + /** + * Override phone number. Must be a valid Test phone number. + * + * By default is randomly generated. + */ + phone?: string - /** - * Override user's DC. Must be a valid test DC. - */ - dcId?: number - }): Promise + /** + * Override user's DC. Must be a valid test DC. + */ + dcId?: number + }): Promise /** * Start the client in an interactive and declarative manner, @@ -817,7 +752,8 @@ export interface TelegramClient extends ITelegramClient { * **Available**: ✅ both users and bots * */ - start(params: { + start( + params: { /** * String session exported using {@link TelegramClient.exportSession}. * @@ -826,84 +762,85 @@ export interface TelegramClient extends ITelegramClient { * Note that passed session will be ignored in case storage already * contains authorization. */ - session?: string | StringSessionData + session?: string | StringSessionData - /** - * Whether to overwrite existing session. - */ - sessionForce?: boolean + /** + * Whether to overwrite existing session. + */ + sessionForce?: boolean - /** - * When passed, [QR login flow](https://core.telegram.org/api/qr-login) - * will be used instead of the regular login flow. - * - * This function will be called whenever the login URL is changed, - * and the app is expected to display it as a QR code to the user. - */ - qrCodeHandler?: (url: string, expires: Date) => void + /** + * When passed, [QR login flow](https://core.telegram.org/api/qr-login) + * will be used instead of the regular login flow. + * + * This function will be called whenever the login URL is changed, + * and the app is expected to display it as a QR code to the user. + */ + qrCodeHandler?: (url: string, expires: Date) => void - /** - * Phone number of the account. - * If account does not exist, it will be created - */ - phone?: MaybeDynamic + /** + * Phone number of the account. + * If account does not exist, it will be created + */ + phone?: MaybeDynamic - /** - * Bot token to use. Ignored if `phone` is supplied. - */ - botToken?: MaybeDynamic + /** + * Bot token to use. Ignored if `phone` is supplied. + */ + botToken?: MaybeDynamic - /** - * 2FA password. Ignored if `botToken` is supplied - */ - password?: MaybeDynamic + /** + * 2FA password. Ignored if `botToken` is supplied + */ + password?: MaybeDynamic - /** - * Code sent to the phone (either sms, call, flash call or other). - * Ignored if `botToken` is supplied, must be present if `phone` is supplied. - */ - code?: MaybeDynamic + /** + * Code sent to the phone (either sms, call, flash call or other). + * Ignored if `botToken` is supplied, must be present if `phone` is supplied. + */ + code?: MaybeDynamic - /** - * If passed, this function will be called if provided code or 2FA password - * was invalid. New code/password will be requested later. - * - * If provided `code`/`password` is a constant string, providing an - * invalid one will interrupt authorization flow. - */ - invalidCodeCallback?: (type: 'code' | 'password') => MaybePromise + /** + * If passed, this function will be called if provided code or 2FA password + * was invalid. New code/password will be requested later. + * + * If provided `code`/`password` is a constant string, providing an + * invalid one will interrupt authorization flow. + */ + invalidCodeCallback?: (type: 'code' | 'password') => MaybePromise - /** - * Whether to force code delivery through SMS - */ - forceSms?: boolean + /** + * Whether to force code delivery through SMS + */ + forceSms?: boolean - /** - * Custom method that is called when a code is sent. Can be used - * to show a GUI alert of some kind. - * - * This method is called *before* {@link start.params.code}. - * - * @param code - * @default `console.log`. - */ - codeSentCallback?: (code: SentCode) => MaybePromise + /** + * Custom method that is called when a code is sent. Can be used + * to show a GUI alert of some kind. + * + * This method is called *before* {@link start.params.code}. + * + * @param code + * @default `console.log`. + */ + codeSentCallback?: (code: SentCode) => MaybePromise - /** Saved future auth tokens, if any */ - futureAuthTokens?: Uint8Array[] + /** Saved future auth tokens, if any */ + futureAuthTokens?: Uint8Array[] - /** Additional code settings to pass to the server */ - codeSettings?: Omit + /** Additional code settings to pass to the server */ + codeSettings?: Omit - /** Abort signal */ - abortSignal?: AbortSignal - }): Promise + /** Abort signal */ + abortSignal?: AbortSignal + }): Promise /** * Check if the given peer/input peer is referring to the current user * **Available**: ✅ both users and bots * */ - isSelfPeer(peer: tl.TypeInputPeer | tl.TypePeer | tl.TypeInputUser): boolean + isSelfPeer( + peer: tl.TypeInputPeer | tl.TypePeer | tl.TypeInputUser): boolean /** * Send an answer to a callback query. * @@ -915,12 +852,12 @@ export interface TelegramClient extends ITelegramClient { answerCallbackQuery( queryId: Long | CallbackQuery, params?: { - /** - * Maximum amount of time in seconds for which - * this result can be cached by the client (not server!). - * - * @default 0 - */ + /** + * Maximum amount of time in seconds for which + * this result can be cached by the client (not server!). + * + * @default 0 + */ cacheTime?: number /** @@ -948,8 +885,7 @@ export interface TelegramClient extends ITelegramClient { * with a deep-link parameter. */ url?: string - }, - ): Promise + }): Promise /** * Answer an inline query. * @@ -963,12 +899,12 @@ export interface TelegramClient extends ITelegramClient { queryId: tl.Long | InlineQuery, results: InputInlineResult[], params?: { - /** - * Maximum number of time in seconds that the results of the - * query may be cached on the server for. - * - * @default 300 - */ + /** + * Maximum number of time in seconds that the results of the + * query may be cached on the server for. + * + * @default 300 + */ cacheTime?: number /** @@ -1019,9 +955,9 @@ export interface TelegramClient extends ITelegramClient { * the chat where they wanted to use the bot's inline capabilities */ switchPm?: { - /** - * Text of the button - */ + /** + * Text of the button + */ text: string /** @@ -1035,9 +971,9 @@ export interface TelegramClient extends ITelegramClient { * list with the specified text, that switches the user to the specified bot web app. */ switchWebview?: { - /** - * Text of the button - */ + /** + * Text of the button + */ text: string /** @@ -1045,62 +981,62 @@ export interface TelegramClient extends ITelegramClient { */ url: string } - }, - ): Promise + }): Promise /** * Answer a pre-checkout query. * - * **Available**: ✅ both users and bots + * **Available**: 🤖 bots only * * @param queryId Pre-checkout query ID */ answerPreCheckoutQuery( queryId: tl.Long | PreCheckoutQuery, params?: { - /** If pre-checkout is rejected, error message to show to the user */ + /** If pre-checkout is rejected, error message to show to the user */ error?: string - }, - ): Promise + }): Promise /** * Delete commands for the current bot and the given scope. * * Does the same as passing `null` to {@link setMyCommands} * * Learn more about scopes in the [Bot API docs](https://core.telegram.org/bots/api#botcommandscope) - * **Available**: ✅ both users and bots + * **Available**: 🤖 bots only * */ - deleteMyCommands(params?: { + deleteMyCommands( + params?: { /** * Scope of the commands. * * @default `BotScope.default_` (i.e. `botCommandScopeDefault`) */ - scope?: tl.TypeBotCommandScope | BotCommands.IntermediateScope + scope?: tl.TypeBotCommandScope | BotCommands.IntermediateScope - /** - * User language applied to the scope. - */ - langCode?: string - }): Promise + /** + * User language applied to the scope. + */ + langCode?: string + }): Promise /** * Gets information about a bot the current uzer owns (or the current bot) * **Available**: ✅ both users and bots * */ - getBotInfo(params: { + getBotInfo( + params: { /** * When called by a user, a bot the user owns must be specified. * When called by a bot, must be empty */ - bot?: InputPeerLike + bot?: InputPeerLike - /** - * If passed, will retrieve the bot's description in the given language. - * If left empty, will retrieve the fallback description. - */ - langCode?: string - }): Promise + /** + * If passed, will retrieve the bot's description in the given language. + * If left empty, will retrieve the fallback description. + */ + langCode?: string + }): Promise /** * Fetches the menu button set for the given user. * **Available**: 🤖 bots only @@ -1117,7 +1053,7 @@ export interface TelegramClient extends ITelegramClient { */ getCallbackAnswer( params: InputMessageId & { - /** Data contained in the button */ + /** Data contained in the button */ data: string | Uint8Array /** @@ -1151,8 +1087,7 @@ export interface TelegramClient extends ITelegramClient { * it is checked by Telegram. */ password?: string - }, - ): Promise + }): Promise /** * Get high scores of a game * **Available**: 🤖 bots only @@ -1160,10 +1095,9 @@ export interface TelegramClient extends ITelegramClient { */ getGameHighScores( params: InputMessageId & { - /** ID of the user to find high scores for */ + /** ID of the user to find high scores for */ userId?: InputPeerLike - }, - ): Promise + }): Promise /** * Get high scores of a game from an inline message * @@ -1174,62 +1108,65 @@ export interface TelegramClient extends ITelegramClient { */ getInlineGameHighScores( messageId: string | tl.TypeInputBotInlineMessageID, - userId?: InputPeerLike, - ): Promise + userId?: InputPeerLike): Promise /** * Get a list of current bot's commands for the given command scope * and user language. If they are not set, empty set is returned. * * Learn more about scopes in the [Bot API docs](https://core.telegram.org/bots/api#botcommandscope) - * **Available**: ✅ both users and bots + * **Available**: 🤖 bots only * */ - getMyCommands(params?: { + getMyCommands( + params?: { /** * Scope of the commands. * * @default `BotScope.default_` (i.e. `botCommandScopeDefault`) */ - scope?: tl.TypeBotCommandScope | BotCommands.IntermediateScope + scope?: tl.TypeBotCommandScope | BotCommands.IntermediateScope - /** - * User language applied to the scope. - */ - langCode?: string - }): Promise + /** + * User language applied to the scope. + */ + langCode?: string + }): Promise /** * Sets information about a bot the current uzer owns (or the current bot) * **Available**: ✅ both users and bots * */ - setBotInfo(params: { + setBotInfo( + params: { /** * When called by a user, a bot the user owns must be specified. * When called by a bot, must be empty */ - bot?: InputPeerLike + bot?: InputPeerLike - /** - * If passed, will update the bot's description in the given language. - * If left empty, will change the fallback description. - */ - langCode?: string + /** + * If passed, will update the bot's description in the given language. + * If left empty, will change the fallback description. + */ + langCode?: string - /** New bot name */ - name?: string + /** New bot name */ + name?: string - /** New bio text (displayed in the profile) */ - bio?: string + /** New bio text (displayed in the profile) */ + bio?: string - /** New description text (displayed when the chat is empty) */ - description?: string - }): Promise + /** New description text (displayed when the chat is empty) */ + description?: string + }): Promise /** * Sets a menu button for the given user. - * **Available**: ✅ both users and bots + * **Available**: 🤖 bots only * */ - setBotMenuButton(user: InputPeerLike, button: tl.TypeBotMenuButton): Promise + setBotMenuButton( + user: InputPeerLike, + button: tl.TypeBotMenuButton): Promise /** * Set a score of a user in a game * @@ -1240,7 +1177,7 @@ export interface TelegramClient extends ITelegramClient { */ setGameScore( params: InputMessageId & { - /** ID of the user who has scored */ + /** ID of the user who has scored */ userId: InputPeerLike /** The new score (must be >0) */ @@ -1263,8 +1200,7 @@ export interface TelegramClient extends ITelegramClient { * to the client's update handler. */ shouldDispatch?: true - }, - ): Promise + }): Promise /** * Set a score of a user in a game contained in * an inline message @@ -1273,25 +1209,26 @@ export interface TelegramClient extends ITelegramClient { * * @param params */ - setInlineGameScore(params: { + setInlineGameScore( + params: { /** ID of the inline message */ - messageId: string | tl.TypeInputBotInlineMessageID - /** ID of the user who has scored */ - userId: InputPeerLike - /** The new score (must be >0) */ - score: number - /** - * When `true`, the game message will not be modified - * to include the new score - */ - noEdit?: boolean + messageId: string | tl.TypeInputBotInlineMessageID + /** ID of the user who has scored */ + userId: InputPeerLike + /** The new score (must be >0) */ + score: number + /** + * When `true`, the game message will not be modified + * to include the new score + */ + noEdit?: boolean - /** - * Whether to allow user's score to decrease. - * This can be useful when fixing mistakes or banning cheaters - */ - force?: boolean - }): Promise + /** + * Whether to allow user's score to decrease. + * This can be useful when fixing mistakes or banning cheaters + */ + force?: boolean + }): Promise /** * Set or delete commands for the current bot and the given scope * @@ -1299,37 +1236,39 @@ export interface TelegramClient extends ITelegramClient { * **Available**: 🤖 bots only * */ - setMyCommands(params: { + setMyCommands( + params: { /** * New list of bot commands for the given scope. * * Pass empty array or `null` to delete them. */ - commands: tl.RawBotCommand[] | null + commands: tl.RawBotCommand[] | null - /** - * Scope of the commands. - * - * @default `BotScope.default_` (i.e. `botCommandScopeDefault`) - */ - scope?: tl.TypeBotCommandScope | BotCommands.IntermediateScope + /** + * Scope of the commands. + * + * @default `BotScope.default_` (i.e. `botCommandScopeDefault`) + */ + scope?: tl.TypeBotCommandScope | BotCommands.IntermediateScope - /** - * User language applied to the scope. - */ - langCode?: string - }): Promise + /** + * User language applied to the scope. + */ + langCode?: string + }): Promise /** * Sets the default chat permissions for the bot in the supergroup or channel. * **Available**: 🤖 bots only * */ - setMyDefaultRights(params: { + setMyDefaultRights( + params: { /** Whether to target groups or channels. */ - target: 'channel' | 'group' - /** The default chat permissions. */ - rights: Omit - }): Promise + target: 'channel' | 'group' + /** The default chat permissions. */ + rights: Omit + }): Promise /** * Add one or more new members to a group, supergroup or channel. * @@ -1343,15 +1282,14 @@ export interface TelegramClient extends ITelegramClient { chatId: InputPeerLike, users: MaybeArray, params: { - /** - * Number of old messages to be forwarded (0-100). - * Only applicable to legacy groups, ignored for supergroups and channels - * - * @default 100 - */ + /** + * Number of old messages to be forwarded (0-100). + * Only applicable to legacy groups, ignored for supergroups and channels + * + * @default 100 + */ forwardCount?: number - }, - ): Promise + }): Promise /** * Archive one or more chats * @@ -1372,19 +1310,20 @@ export interface TelegramClient extends ITelegramClient { * * @returns Service message about removed user, if one was generated. */ - banChatMember(params: { + banChatMember( + params: { /** Chat ID */ - chatId: InputPeerLike + chatId: InputPeerLike - /** ID of the user/channel to ban */ - participantId: InputPeerLike + /** ID of the user/channel to ban */ + participantId: InputPeerLike - /** - * Whether to dispatch the returned service message (if any) - * to the client's update handler. - */ - shouldDispatch?: true - }): Promise + /** + * Whether to dispatch the returned service message (if any) + * to the client's update handler. + */ + shouldDispatch?: true + }): Promise /** * Create a new broadcast channel * @@ -1392,17 +1331,18 @@ export interface TelegramClient extends ITelegramClient { * * @returns Newly created channel */ - createChannel(params: { + createChannel( + params: { /** * Channel title */ - title: string + title: string - /** - * Channel description - */ - description?: string - }): Promise + /** + * Channel description + */ + description?: string + }): Promise /** * Create a legacy group chat * @@ -1411,25 +1351,26 @@ export interface TelegramClient extends ITelegramClient { * **Available**: 👤 users only * */ - createGroup(params: { + createGroup( + params: { /** * Group title */ - title: string + title: string - /** - * User(s) to be invited in the group (ID(s), username(s) or phone number(s)). - * Due to Telegram limitations, you can't create a legacy group with just yourself. - */ - users: MaybeArray + /** + * User(s) to be invited in the group (ID(s), username(s) or phone number(s)). + * Due to Telegram limitations, you can't create a legacy group with just yourself. + */ + users: MaybeArray - /** - * TTL period (in seconds) for the newly created chat - * - * @default 0 (i.e. messages don't expire) - */ - ttlPeriod?: number - }): Promise + /** + * TTL period (in seconds) for the newly created chat + * + * @default 0 (i.e. messages don't expire) + */ + ttlPeriod?: number + }): Promise /** * Create a new supergroup * @@ -1437,29 +1378,30 @@ export interface TelegramClient extends ITelegramClient { * * @returns Newly created supergroup */ - createSupergroup(params: { + createSupergroup( + params: { /** * Supergroup title */ - title: string + title: string - /** - * Supergroup description - */ - description?: string + /** + * Supergroup description + */ + description?: string - /** - * Whether to create a forum - */ - forum?: boolean + /** + * Whether to create a forum + */ + forum?: boolean - /** - * TTL period (in seconds) for the newly created supergroup - * - * @default 0 (i.e. messages don't expire) - */ - ttlPeriod?: number - }): Promise + /** + * TTL period (in seconds) for the newly created supergroup + * + * @default 0 (i.e. messages don't expire) + */ + ttlPeriod?: number + }): Promise /** * Delete a channel or a supergroup @@ -1504,14 +1446,14 @@ export interface TelegramClient extends ITelegramClient { deleteHistory( chat: InputPeerLike, params?: { - /** - * Deletion mode. Can be: - * - `delete`: delete messages (only for yourself) AND the dialog itself - * - `clear`: delete messages (only for yourself), but keep the dialog in the list - * - `revoke`: delete messages for all users - * - * @default 'delete' - */ + /** + * Deletion mode. Can be: + * - `delete`: delete messages (only for yourself) AND the dialog itself + * - `clear`: delete messages (only for yourself), but keep the dialog in the list + * - `revoke`: delete messages for all users + * + * @default 'delete' + */ mode: 'delete' | 'clear' | 'revoke' /** @@ -1520,40 +1462,41 @@ export interface TelegramClient extends ITelegramClient { * @default 0, i.e. remove all messages */ maxId?: number - }, - ): Promise + }): Promise /** * Delete all messages of a user (or channel) in a supergroup * **Available**: 👤 users only * */ - deleteUserHistory(params: { + deleteUserHistory( + params: { /** Chat ID */ - chatId: InputPeerLike - /** User/channel ID whose messages to delete */ - participantId: InputPeerLike + chatId: InputPeerLike + /** User/channel ID whose messages to delete */ + participantId: InputPeerLike - /** - * Whether to dispatch the updates that will be generated by this call. - * Doesn't follow `disableNoDispatch` - */ - shouldDispatch?: true - }): Promise + /** + * Whether to dispatch the updates that will be generated by this call. + * Doesn't follow `disableNoDispatch` + */ + shouldDispatch?: true + }): Promise /** * Edit supergroup/channel admin rights of a user. * **Available**: ✅ both users and bots * */ - editAdminRights(params: { + editAdminRights( + params: { /** Chat ID */ - chatId: InputPeerLike - /** User ID */ - userId: InputPeerLike - /** New admin rights */ - rights: Omit - /** Custom admin rank */ - rank?: string - }): Promise + chatId: InputPeerLike + /** User ID */ + userId: InputPeerLike + /** New admin rights */ + rights: Omit + /** Custom admin rank */ + rank?: string + }): Promise /** * Get chat event log ("Recent actions" in official clients). * @@ -1572,9 +1515,9 @@ export interface TelegramClient extends ITelegramClient { getChatEventLog( chatId: InputPeerLike, params?: { - /** - * Search query - */ + /** + * Search query + */ query?: string /** @@ -1619,8 +1562,7 @@ export interface TelegramClient extends ITelegramClient { * @default 100 */ limit?: number - }, - ): Promise + }): Promise /** * Get information about a single chat member * @@ -1630,12 +1572,13 @@ export interface TelegramClient extends ITelegramClient { * @param userId User ID, username, phone number, `"me"` or `"self"` * @returns Chat member, or `null` if user is not a member of the chat */ - getChatMember(params: { + getChatMember( + params: { /** Chat ID or username */ - chatId: InputPeerLike - /** User ID, username, phone number, `"me"` or `"self"` */ - userId: InputPeerLike - }): Promise + chatId: InputPeerLike + /** User ID, username, phone number, `"me"` or `"self"` */ + userId: InputPeerLike + }): Promise /** * Get a chunk of members of some chat. * @@ -1649,14 +1592,14 @@ export interface TelegramClient extends ITelegramClient { getChatMembers( chatId: InputPeerLike, params?: { - /** - * Search query to filter members by their display names and usernames - * - * > **Note**: Only used for these values of `filter`: - * > `all, banned, restricted, mention, contacts` - * - * @default `''` (empty string) - */ + /** + * Search query to filter members by their display names and usernames + * + * > **Note**: Only used for these values of `filter`: + * > `all, banned, restricted, mention, contacts` + * + * @default `''` (empty string) + */ query?: string /** @@ -1691,8 +1634,7 @@ export interface TelegramClient extends ITelegramClient { * @default `recent` */ type?: 'all' | 'banned' | 'restricted' | 'bots' | 'recent' | 'admins' | 'contacts' | 'mention' - }, - ): Promise> + }): Promise> /** * Get preview information about a private chat. * @@ -1750,7 +1692,8 @@ export interface TelegramClient extends ITelegramClient { * **Available**: 👤 users only * */ - getSimilarChannels(channel: InputPeerLike): Promise> + getSimilarChannels( + channel: InputPeerLike): Promise> /** * Iterate over chat event log. * @@ -1764,11 +1707,11 @@ export interface TelegramClient extends ITelegramClient { iterChatEventLog( chatId: InputPeerLike, params?: Parameters[2] & { - /** - * Total number of events to return. - * - * @default Infinity - */ + /** + * Total number of events to return. + * + * @default Infinity + */ limit?: number /** @@ -1778,8 +1721,7 @@ export interface TelegramClient extends ITelegramClient { * @default 100 */ chunkSize?: number - }, - ): AsyncIterableIterator + }): AsyncIterableIterator /** * Iterate through chat members * @@ -1795,15 +1737,14 @@ export interface TelegramClient extends ITelegramClient { iterChatMembers( chatId: InputPeerLike, params?: Parameters[2] & { - /** - * Chunk size, which will be passed as `limit` parameter - * to {@link getChatMembers}. Usually you shouldn't care about this. - * - * @default `200` - */ + /** + * Chunk size, which will be passed as `limit` parameter + * to {@link getChatMembers}. Usually you shouldn't care about this. + * + * @default `200` + */ chunkSize?: number - }, - ): AsyncIterableIterator + }): AsyncIterableIterator /** * Join a channel or supergroup * @@ -1827,12 +1768,13 @@ export interface TelegramClient extends ITelegramClient { * * @returns Service message about removed user, if one was generated. */ - kickChatMember(params: { + kickChatMember( + params: { /** Chat ID */ - chatId: InputPeerLike - /** User ID */ - userId: InputPeerLike - }): Promise + chatId: InputPeerLike + /** User ID */ + userId: InputPeerLike + }): Promise /** * Leave a group chat, supergroup or channel * @@ -1843,12 +1785,11 @@ export interface TelegramClient extends ITelegramClient { leaveChat( chatId: InputPeerLike, params?: { - /** - * Whether to clear history after leaving (only for legacy group chats) - */ + /** + * Whether to clear history after leaving (only for legacy group chats) + */ clear?: boolean - }, - ): Promise + }): Promise /** * Mark a chat as unread * @@ -1892,37 +1833,40 @@ export interface TelegramClient extends ITelegramClient { * * @param peerId Bot, channel or "me"/"self" */ - reorderUsernames(peerId: InputPeerLike, order: string[]): Promise + reorderUsernames( + peerId: InputPeerLike, + order: string[]): Promise /** * Restrict a user in a supergroup. * **Available**: ✅ both users and bots * */ - restrictChatMember(params: { + restrictChatMember( + params: { /** Chat ID */ - chatId: InputPeerLike + chatId: InputPeerLike - /** User ID */ - userId: InputPeerLike + /** User ID */ + userId: InputPeerLike - /** - * Restrictions for the user. Note that unlike Bot API, this object contains - * the restrictions, and not the permissions, i.e. - * passing `sendMessages=true` will disallow the user to send messages, - * and passing `{}` (empty object) will lift any restrictions - */ - restrictions: Omit + /** + * Restrictions for the user. Note that unlike Bot API, this object contains + * the restrictions, and not the permissions, i.e. + * passing `sendMessages=true` will disallow the user to send messages, + * and passing `{}` (empty object) will lift any restrictions + */ + restrictions: Omit - /** - * Date when the user will be unrestricted. - * When `number` is passed, UNIX time in ms is expected. - * If this value is less than 30 seconds or more than 366 days in - * the future, user will be restricted forever. - * - * @default `0`, i.e. forever - */ - until?: number | Date - }): Promise + /** + * Date when the user will be unrestricted. + * When `number` is passed, UNIX time in ms is expected. + * If this value is less than 30 seconds or more than 366 days in + * the future, user will be restricted forever. + * + * @default `0`, i.e. forever + */ + until?: number | Date + }): Promise /** * Save or delete a draft message associated with some chat * @@ -1931,48 +1875,51 @@ export interface TelegramClient extends ITelegramClient { * @param chatId ID of the chat, its username, phone or `"me"` or `"self"` * @param draft Draft message, or `null` to delete. */ - saveDraft(chatId: InputPeerLike, draft: null | Omit): Promise + saveDraft( + chatId: InputPeerLike, + draft: null | Omit): Promise /** * Set peer color and optionally background pattern * **Available**: 👤 users only * */ - setChatColor(params: { + setChatColor( + params: { /** * Peer where to update the color. * * By default will change the color for the current user */ - peer?: InputPeerLike + peer?: InputPeerLike - /** - * Color identificator - * - * Note that this value is **not** an RGB color representation. Instead, it is - * a number which should be used to pick a color from a predefined - * list of colors: - * - `0-6` are the default colors used by Telegram clients: - * `red, orange, purple, green, sea, blue, pink` - * - `>= 7` are returned by `help.getAppConfig`. - */ - color: number + /** + * Color identificator + * + * Note that this value is **not** an RGB color representation. Instead, it is + * a number which should be used to pick a color from a predefined + * list of colors: + * - `0-6` are the default colors used by Telegram clients: + * `red, orange, purple, green, sea, blue, pink` + * - `>= 7` are returned by `help.getAppConfig`. + */ + color: number - /** - * Background pattern emoji ID. - * - * Must be an adaptive emoji, otherwise the request will fail. - */ - backgroundEmojiId?: tl.Long + /** + * Background pattern emoji ID. + * + * Must be an adaptive emoji, otherwise the request will fail. + */ + backgroundEmojiId?: tl.Long - /** - * Whether to set this color for the profile - * header instead of chat name/replies. - * - * Currently only available for the current user. - */ - forProfile?: boolean - }): Promise + /** + * Whether to set this color for the profile + * header instead of chat name/replies. + * + * Currently only available for the current user. + */ + forProfile?: boolean + }): Promise /** * Change default chat permissions for all members. * @@ -1989,8 +1936,7 @@ export interface TelegramClient extends ITelegramClient { */ setChatDefaultPermissions( chatId: InputPeerLike, - restrictions: Omit, - ): Promise + restrictions: Omit): Promise /** * Change chat description * @@ -2001,7 +1947,9 @@ export interface TelegramClient extends ITelegramClient { * @param chatId Chat ID or username * @param description New chat description, 0-255 characters */ - setChatDescription(chatId: InputPeerLike, description: string): Promise + setChatDescription( + chatId: InputPeerLike, + description: string): Promise /** * Set a new chat photo or video. * @@ -2009,22 +1957,23 @@ export interface TelegramClient extends ITelegramClient { * **Available**: ✅ both users and bots * */ - setChatPhoto(params: { + setChatPhoto( + params: { /** Chat ID or username */ - chatId: InputPeerLike + chatId: InputPeerLike - /** Media type (photo or video) */ + /** Media type (photo or video) */ - type: 'photo' | 'video' + type: 'photo' | 'video' - /** Input media file */ - media: InputFileLike - /** - * When `type = video`, timestamp in seconds which will be shown - * as a static preview. - */ - previewSec?: number - }): Promise + /** Input media file */ + media: InputFileLike + /** + * When `type = video`, timestamp in seconds which will be shown + * as a static preview. + */ + previewSec?: number + }): Promise /** * Change chat title * @@ -2055,7 +2004,9 @@ export interface TelegramClient extends ITelegramClient { * @param chatId Chat ID or current username * @param username New username, or `null` to remove */ - setChatUsername(chatId: InputPeerLike, username: string | null): Promise + setChatUsername( + chatId: InputPeerLike, + username: string | null): Promise /** * Set supergroup's slow mode interval. * @@ -2076,7 +2027,8 @@ export interface TelegramClient extends ITelegramClient { * @param chatId Chat ID or username * @param [enabled=false] Whether content protection should be enabled */ - toggleContentProtection(chatId: InputPeerLike, enabled?: boolean): Promise + toggleContentProtection( + chatId: InputPeerLike, enabled?: boolean): Promise /** * Toggle a collectible (Fragment) username * @@ -2085,20 +2037,21 @@ export interface TelegramClient extends ITelegramClient { * **Available**: 👤 users only * */ - toggleFragmentUsername(params: { + toggleFragmentUsername( + params: { /** Peer ID whose username to toggle */ - peerId: InputPeerLike + peerId: InputPeerLike - /** - * Username to toggle - */ - username: string + /** + * Username to toggle + */ + username: string - /** - * Whether to enable or disable the username - */ - active: boolean - }): Promise + /** + * Whether to enable or disable the username + */ + active: boolean + }): Promise /** * Set whether a channel/supergroup has join requests enabled. * @@ -2110,7 +2063,8 @@ export interface TelegramClient extends ITelegramClient { * @param chatId Chat ID or username * @param [enabled=false] Whether join requests should be enabled */ - toggleJoinRequests(chatId: InputPeerLike, enabled?: boolean): Promise + toggleJoinRequests( + chatId: InputPeerLike, enabled?: boolean): Promise /** * Set whether a channel/supergroup has join-to-send setting enabled. * @@ -2142,13 +2096,14 @@ export interface TelegramClient extends ITelegramClient { * **Available**: ✅ both users and bots * */ - unbanChatMember(params: { + unbanChatMember( + params: { /** Chat ID */ - chatId: InputPeerLike + chatId: InputPeerLike - /** User/channel ID who should be unbanned */ - participantId: InputPeerLike - }): Promise + /** User/channel ID who should be unbanned */ + participantId: InputPeerLike + }): Promise /** * Unban a user/channel from a supergroup or a channel, @@ -2160,45 +2115,47 @@ export interface TelegramClient extends ITelegramClient { * **Available**: ✅ both users and bots * */ - unrestrictChatMember(params: { + unrestrictChatMember( + params: { /** Chat ID */ - chatId: InputPeerLike + chatId: InputPeerLike - /** User/channel ID who should be unbanned */ - participantId: InputPeerLike - }): Promise + /** User/channel ID who should be unbanned */ + participantId: InputPeerLike + }): Promise /** * Add an existing Telegram user as a contact * **Available**: 👤 users only * */ - addContact(params: { + addContact( + params: { /** User ID, username or phone number */ - userId: InputPeerLike + userId: InputPeerLike - /** - * First name of the contact - */ - firstName: string + /** + * First name of the contact + */ + firstName: string - /** - * Last name of the contact - */ - lastName?: string + /** + * Last name of the contact + */ + lastName?: string - /** - * Phone number of the contact, if available - */ - phone?: string + /** + * Phone number of the contact, if available + */ + phone?: string - /** - * Whether to share your own phone number - * with the newly created contact - * - * @default false - */ - sharePhone?: boolean - }): Promise + /** + * Whether to share your own phone number + * with the newly created contact + * + * @default false + */ + sharePhone?: boolean + }): Promise /** * Delete one or more contacts from your Telegram contacts list * @@ -2224,8 +2181,7 @@ export interface TelegramClient extends ITelegramClient { * @param contacts List of contacts */ importContacts( - contacts: PartialOnly, 'clientId'>[], - ): Promise + contacts: PartialOnly, 'clientId'>[]): Promise /** * Create a folder from given parameters * @@ -2237,7 +2193,8 @@ export interface TelegramClient extends ITelegramClient { * @param folder Parameters for the folder * @returns Newly created folder */ - createFolder(folder: PartialExcept): Promise + createFolder( + folder: PartialExcept): Promise /** * Delete a folder by its ID * @@ -2253,18 +2210,19 @@ export interface TelegramClient extends ITelegramClient { * * @returns Modified folder */ - editFolder(params: { + editFolder( + params: { /** * Folder, folder ID or name. * Note that passing an ID or name will require re-fetching all folders, * and passing name might affect not the right folder if you have multiple * with the same name. */ - folder: tl.RawDialogFilter | number | string + folder: tl.RawDialogFilter | number | string - /** Modification to be applied to this folder */ - modification: Partial> - }): Promise + /** Modification to be applied to this folder */ + modification: Partial> + }): Promise /** * Try to find a dialog (dialogs) with a given peer (peers) by their ID, username or phone number. @@ -2288,14 +2246,15 @@ export interface TelegramClient extends ITelegramClient { * * @param params Search parameters. At least one must be set. */ - findFolder(params: { + findFolder( + params: { /** Folder title */ - title?: string - /** Folder emoji */ - emoji?: string - /** Folder ID */ - id?: number - }): Promise + title?: string + /** Folder emoji */ + emoji?: string + /** Folder ID */ + id?: number + }): Promise /** * Get a preview of a chatlist by its invite link * @@ -2330,108 +2289,109 @@ export interface TelegramClient extends ITelegramClient { * * @param params Fetch parameters */ - iterDialogs(params?: { + iterDialogs( + params?: { /** * Offset message date used as an anchor for pagination. */ - offsetDate?: Date | number + offsetDate?: Date | number - /** - * Offset message ID used as an anchor for pagination - */ - offsetId?: number + /** + * Offset message ID used as an anchor for pagination + */ + offsetId?: number - /** - * Offset peer used as an anchor for pagination - */ - offsetPeer?: tl.TypeInputPeer + /** + * Offset peer used as an anchor for pagination + */ + offsetPeer?: tl.TypeInputPeer - /** - * Limits the number of dialogs to be received. - * - * @default `Infinity`, i.e. all dialogs are fetched - */ - limit?: number + /** + * Limits the number of dialogs to be received. + * + * @default `Infinity`, i.e. all dialogs are fetched + */ + limit?: number - /** - * Chunk size which will be passed to `messages.getDialogs`. - * You shouldn't usually care about this. - * - * @default 100. - */ - chunkSize?: number + /** + * Chunk size which will be passed to `messages.getDialogs`. + * You shouldn't usually care about this. + * + * @default 100. + */ + chunkSize?: number - /** - * How to handle pinned dialogs? - * - * Whether to `include` them at the start of the list, - * `exclude` them at all, or `only` return pinned dialogs. - * - * Additionally, for folders you can specify - * `keep`, which will return pinned dialogs - * ordered by date among other non-pinned dialogs. - * - * > **Note**: When using `include` mode with folders, - * > pinned dialogs will only be fetched if all offset - * > parameters are unset. - * - * @default `include`. - */ - pinned?: 'include' | 'exclude' | 'only' | 'keep' + /** + * How to handle pinned dialogs? + * + * Whether to `include` them at the start of the list, + * `exclude` them at all, or `only` return pinned dialogs. + * + * Additionally, for folders you can specify + * `keep`, which will return pinned dialogs + * ordered by date among other non-pinned dialogs. + * + * > **Note**: When using `include` mode with folders, + * > pinned dialogs will only be fetched if all offset + * > parameters are unset. + * + * @default `include`. + */ + pinned?: 'include' | 'exclude' | 'only' | 'keep' - /** - * How to handle archived chats? - * - * Whether to `keep` them among other dialogs, - * `exclude` them from the list, or `only` - * return archived dialogs - * - * Ignored for folders, since folders - * themselves contain information about archived chats. - * - * > **Note**: when `pinned=only`, `archived=keep` will act as `only` - * > because of Telegram API limitations. - * - * @default `exclude` - */ - archived?: 'keep' | 'exclude' | 'only' + /** + * How to handle archived chats? + * + * Whether to `keep` them among other dialogs, + * `exclude` them from the list, or `only` + * return archived dialogs + * + * Ignored for folders, since folders + * themselves contain information about archived chats. + * + * > **Note**: when `pinned=only`, `archived=keep` will act as `only` + * > because of Telegram API limitations. + * + * @default `exclude` + */ + archived?: 'keep' | 'exclude' | 'only' - /** - * Folder from which the dialogs will be fetched. - * - * You can pass folder object, id or title - * - * Note that passing anything except object will - * cause the list of the folders to be fetched, - * and passing a title may fetch from - * a wrong folder if you have multiple with the same title. - * - * Also note that fetching dialogs in a folder is - * *orders of magnitudes* slower than normal because - * of Telegram API limitations - we have to fetch all dialogs - * and filter the ones we need manually. If possible, - * use {@link Dialog.filterFolder} instead. - * - * When a folder with given ID or title is not found, - * {@link MtArgumentError} is thrown - * - * @default (fetches from "All" folder) - */ - folder?: InputDialogFolder + /** + * Folder from which the dialogs will be fetched. + * + * You can pass folder object, id or title + * + * Note that passing anything except object will + * cause the list of the folders to be fetched, + * and passing a title may fetch from + * a wrong folder if you have multiple with the same title. + * + * Also note that fetching dialogs in a folder is + * orders of magnitudes* slower than normal because + * of Telegram API limitations - we have to fetch all dialogs + * and filter the ones we need manually. If possible, + * use {@link Dialog.filterFolder} instead. + * + * When a folder with given ID or title is not found, + * {@link MtArgumentError} is thrown + * + * @default (fetches from "All" folder) + */ + folder?: InputDialogFolder - /** - * Additional filtering for the dialogs. - * - * If `folder` is not provided, this filter is used instead. - * If `folder` is provided, fields from this object are used - * to override filters inside the folder. - */ - filter?: Partial> - }): AsyncIterableIterator + /** + * Additional filtering for the dialogs. + * + * If `folder` is not provided, this filter is used instead. + * If `folder` is provided, fields from this object are used + * to override filters inside the folder. + */ + filter?: Partial> + }): AsyncIterableIterator /** * Join a chatlist by its link * - * **Available**: ✅ both users and bots + * **Available**: 👤 users only * * @param link Invite link to the chatlist * @param params Additional parameters @@ -2440,10 +2400,9 @@ export interface TelegramClient extends ITelegramClient { joinChatlist( link: string, params?: { - /** Chats to join from the chatlist (all by default) */ + /** Chats to join from the chatlist (all by default) */ peers?: MaybeArray - }, - ): Promise + }): Promise /** * Reorder folders * @@ -2462,7 +2421,9 @@ export interface TelegramClient extends ITelegramClient { * * @param params File download parameters */ - downloadAsBuffer(location: FileDownloadLocation, params?: FileDownloadParameters): Promise + downloadAsBuffer( + location: FileDownloadLocation, + params?: FileDownloadParameters): Promise /** * Download a remote file to a local file (only for Node.js). @@ -2473,7 +2434,10 @@ export interface TelegramClient extends ITelegramClient { * @param filename Local file name to which the remote file will be downloaded * @param params File download parameters */ - downloadToFile(filename: string, location: FileDownloadLocation, params?: FileDownloadParameters): Promise + downloadToFile( + filename: string, + location: FileDownloadLocation, + params?: FileDownloadParameters): Promise /** * Download a file and return it as an iterable, which yields file contents * in chunks of a given size. Order of the chunks is guaranteed to be @@ -2483,7 +2447,9 @@ export interface TelegramClient extends ITelegramClient { * * @param params Download parameters */ - downloadAsIterable(input: FileDownloadLocation, params?: FileDownloadParameters): AsyncIterableIterator + downloadAsIterable( + input: FileDownloadLocation, + params?: FileDownloadParameters): AsyncIterableIterator /** * Download a remote file as a Node.js Readable stream. @@ -2494,8 +2460,7 @@ export interface TelegramClient extends ITelegramClient { */ downloadAsNodeStream( location: FileDownloadLocation, - params?: FileDownloadParameters, - ): import('node:stream').Readable + params?: FileDownloadParameters): import('node:stream').Readable /** * Download a file and return it as a readable stream, * streaming file contents. @@ -2504,7 +2469,9 @@ export interface TelegramClient extends ITelegramClient { * * @param params File download parameters */ - downloadAsStream(location: FileDownloadLocation, params?: FileDownloadParameters): ReadableStream + downloadAsStream( + location: FileDownloadLocation, + params?: FileDownloadParameters): ReadableStream /** * Normalize a {@link InputFileLike} to `InputFile`, * uploading it if needed. @@ -2518,8 +2485,7 @@ export interface TelegramClient extends ITelegramClient { fileName?: string fileSize?: number fileMime?: string - }, - ): Promise + }): Promise /** * Normalize an {@link InputMediaLike} to `InputMedia`, * uploading the file if needed. @@ -2527,14 +2493,11 @@ export interface TelegramClient extends ITelegramClient { * */ _normalizeInputMedia( - media: InputMediaLike, - params?: { + media: InputMediaLike, params?: { progressCallback?: (uploaded: number, total: number) => void uploadPeer?: tl.TypeInputPeer businessConnectionId?: string - }, - uploadMedia?: boolean, - ): Promise + }, uploadMedia?: boolean): Promise /** * Upload a file to Telegram servers, without actually @@ -2547,67 +2510,68 @@ export interface TelegramClient extends ITelegramClient { * * @param params Upload parameters */ - uploadFile(params: { + uploadFile( + params: { /** * Upload file source. */ - file: UploadFileLike + file: UploadFileLike - /** - * File name for the uploaded file. Is usually inferred from path, - * but should be provided for files sent as `Buffer` or stream. - * - * When file name can't be inferred, it falls back to "unnamed" - */ - fileName?: string + /** + * File name for the uploaded file. Is usually inferred from path, + * but should be provided for files sent as `Buffer` or stream. + * + * When file name can't be inferred, it falls back to "unnamed" + */ + fileName?: string - /** - * Total file size. Automatically inferred for Buffer, File and local files. - */ - fileSize?: number + /** + * Total file size. Automatically inferred for Buffer, File and local files. + */ + fileSize?: number - /** - * If the file size is unknown, you can provide an estimate, - * which will be used to determine appropriate part size. - */ - estimatedSize?: number + /** + * If the file size is unknown, you can provide an estimate, + * which will be used to determine appropriate part size. + */ + estimatedSize?: number - /** - * File MIME type. By default is automatically inferred from magic number - * If MIME can't be inferred, it defaults to `application/octet-stream` - */ - fileMime?: string + /** + * File MIME type. By default is automatically inferred from magic number + * If MIME can't be inferred, it defaults to `application/octet-stream` + */ + fileMime?: string - /** - * Upload part size (in KB). - * - * By default, automatically selected by file size. - * Must not be bigger than 512 and must not be a fraction. - */ - partSize?: number + /** + * Upload part size (in KB). + * + * By default, automatically selected by file size. + * Must not be bigger than 512 and must not be a fraction. + */ + partSize?: number - /** - * Number of parts to be sent in parallel per connection. - */ - requestsPerConnection?: number + /** + * Number of parts to be sent in parallel per connection. + */ + requestsPerConnection?: number - /** - * Function that will be called after some part has been uploaded. - * - * @param uploaded Number of bytes already uploaded - * @param total Total file size, if known - */ - progressCallback?: (uploaded: number, total: number) => void + /** + * Function that will be called after some part has been uploaded. + * + * @param uploaded Number of bytes already uploaded + * @param total Total file size, if known + */ + progressCallback?: (uploaded: number, total: number) => void - /** - * When using `inputMediaUploadedPhoto` (e.g. when sending an uploaded photo) require - * the file size to be known beforehand. - * - * In case this is set to `true`, a stream is passed as `file` and the file size is unknown, - * the stream will be buffered in memory and the file size will be inferred from the buffer. - */ - requireFileSize?: boolean - }): Promise + /** + * When using `inputMediaUploadedPhoto` (e.g. when sending an uploaded photo) require + * the file size to be known beforehand. + * + * In case this is set to `true`, a stream is passed as `file` and the file size is unknown, + * the stream will be buffered in memory and the file size will be inferred from the buffer. + */ + requireFileSize?: boolean + }): Promise /** * Upload a media to Telegram servers, without actually * sending a message anywhere. Useful when File ID is needed. @@ -2622,12 +2586,10 @@ export interface TelegramClient extends ITelegramClient { * @param [params={}] Upload parameters */ uploadMedia( - media: InputMediaLike, - params?: { + media: InputMediaLike, params?: { peer?: InputPeerLike progressCallback?: (uploaded: number, total: number) => void - }, - ): Promise> + }): Promise> /** * Create a topic in a forum * @@ -2637,36 +2599,37 @@ export interface TelegramClient extends ITelegramClient { * * @returns Service message for the created topic */ - createForumTopic(params: { + createForumTopic( + params: { /** Chat ID or username */ - chatId: InputPeerLike + chatId: InputPeerLike - /** - * Topic title - */ - title: string + /** + * Topic title + */ + title: string - /** - * Icon of the topic. - * - * Can be a number (color in RGB, see {@link ForumTopic} static members for allowed values) - * or a custom emoji ID. - * - * Icon color can't be changed after the topic is created. - */ - icon?: number | tl.Long + /** + * Icon of the topic. + * + * Can be a number (color in RGB, see {@link ForumTopic} static members for allowed values) + * or a custom emoji ID. + * + * Icon color can't be changed after the topic is created. + */ + icon?: number | tl.Long - /** - * Send as a specific channel - */ - sendAs?: InputPeerLike + /** + * Send as a specific channel + */ + sendAs?: InputPeerLike - /** - * Whether to dispatch the returned service message (if any) - * to the client's update handler. - */ - shouldDispatch?: true - }): Promise + /** + * Whether to dispatch the returned service message (if any) + * to the client's update handler. + */ + shouldDispatch?: true + }): Promise /** * Delete a forum topic and all its history * @@ -2679,13 +2642,12 @@ export interface TelegramClient extends ITelegramClient { chat: InputPeerLike, topicId: number | ForumTopic, params?: { - /** - * Whether to dispatch updates that will be generated by this call. - * Doesn't follow `disableNoDispatch` - */ + /** + * Whether to dispatch updates that will be generated by this call. + * Doesn't follow `disableNoDispatch` + */ shouldDispatch?: true - }, - ): Promise + }): Promise /** * Modify a topic in a forum * @@ -2697,40 +2659,43 @@ export interface TelegramClient extends ITelegramClient { * @param topicId ID of the topic (i.e. its top message ID) * @returns Service message about the modification */ - editForumTopic(params: { + editForumTopic( + params: { /** Chat ID or username */ - chatId: InputPeerLike + chatId: InputPeerLike - /** ID of the topic (i.e. its top message ID) */ - topicId: number | ForumTopic + /** ID of the topic (i.e. its top message ID) */ + topicId: number | ForumTopic - /** - * New topic title - */ - title?: string + /** + * New topic title + */ + title?: string - /** - * New icon of the topic. - * - * Can be a custom emoji ID, or `null` to remove the icon - * and use static color instead - */ - icon?: tl.Long | null + /** + * New icon of the topic. + * + * Can be a custom emoji ID, or `null` to remove the icon + * and use static color instead + */ + icon?: tl.Long | null - /** - * Whether to dispatch the returned service message (if any) - * to the client's update handler. - */ - shouldDispatch?: true - }): Promise + /** + * Whether to dispatch the returned service message (if any) + * to the client's update handler. + */ + shouldDispatch?: true + }): Promise /** * Get forum topics by their IDs * - * **Available**: ✅ both users and bots + * **Available**: 👤 users only * * @param chatId Chat ID or username */ - getForumTopicsById(chatId: InputPeerLike, ids: MaybeArray): Promise + getForumTopicsById( + chatId: InputPeerLike, + ids: MaybeArray): Promise /** * Get forum topics * @@ -2741,9 +2706,9 @@ export interface TelegramClient extends ITelegramClient { getForumTopics( chatId: InputPeerLike, params?: { - /** - * Search query - */ + /** + * Search query + */ query?: string /** @@ -2757,8 +2722,7 @@ export interface TelegramClient extends ITelegramClient { * @default 100 */ limit?: number - }, - ): Promise> + }): Promise> /** * Iterate over forum topics. Wrapper over {@link getForumTopics}. * @@ -2769,40 +2733,40 @@ export interface TelegramClient extends ITelegramClient { iterForumTopics( chatId: InputPeerLike, params?: Parameters[2] & { - /** - * Maximum number of topics to return. - * - * @default `Infinity`, i.e. return all topics - */ + /** + * Maximum number of topics to return. + * + * @default `Infinity`, i.e. return all topics + */ limit?: number /** * Chunk size. Usually you shouldn't care about this. */ chunkSize?: number - }, - ): AsyncIterableIterator + }): AsyncIterableIterator /** * Reorder pinned forum topics * * Only admins with `manageTopics` permission can do this. - * **Available**: ✅ both users and bots + * **Available**: 👤 users only * */ - reorderPinnedForumTopics(params: { + reorderPinnedForumTopics( + params: { /** Chat ID or username */ - chatId: InputPeerLike + chatId: InputPeerLike - /** - * Order of the pinned topics - */ - order: (number | ForumTopic)[] + /** + * Order of the pinned topics + */ + order: (number | ForumTopic)[] - /** - * Whether to un-pin topics not present in the order - */ - force?: boolean - }): Promise + /** + * Whether to un-pin topics not present in the order + */ + force?: boolean + }): Promise /** * Toggle open/close status of a topic in a forum * @@ -2812,43 +2776,45 @@ export interface TelegramClient extends ITelegramClient { * * @returns Service message about the modification */ - toggleForumTopicClosed(parmas: { + toggleForumTopicClosed( + parmas: { /** Chat ID or username */ - chatId: InputPeerLike + chatId: InputPeerLike - /** ID of the topic (i.e. its top message ID) */ - topicId: number | ForumTopic + /** ID of the topic (i.e. its top message ID) */ + topicId: number | ForumTopic - /** Whether the topic should be closed */ - closed: boolean + /** Whether the topic should be closed */ + closed: boolean - /** - * Whether to dispatch the returned service message (if any) - * to the client's update handler. - */ - shouldDispatch?: true - }): Promise + /** + * Whether to dispatch the returned service message (if any) + * to the client's update handler. + */ + shouldDispatch?: true + }): Promise /** * Toggle whether a topic in a forum is pinned * * Only admins with `manageTopics` permission can do this. - * **Available**: ✅ both users and bots + * **Available**: 👤 users only * */ - toggleForumTopicPinned(params: { + toggleForumTopicPinned( + params: { /** Chat ID or username */ - chatId: InputPeerLike - /** ID of the topic (i.e. its top message ID) */ - topicId: number | ForumTopic - /** Whether the topic should be pinned */ - pinned: boolean - }): Promise + chatId: InputPeerLike + /** ID of the topic (i.e. its top message ID) */ + topicId: number | ForumTopic + /** Whether the topic should be pinned */ + pinned: boolean + }): Promise /** * Set whether a supergroup is a forum. * * Only owner of the supergroup can change this setting. * - * **Available**: ✅ both users and bots + * **Available**: 👤 users only * * @param chatId Chat ID or username * @param [enabled=false] Whether the supergroup should be a forum @@ -2863,18 +2829,19 @@ export interface TelegramClient extends ITelegramClient { * * @returns Service message about the modification */ - toggleGeneralTopicHidden(params: { + toggleGeneralTopicHidden( + params: { /** Chat ID or username */ - chatId: InputPeerLike - /** Whether the topic should be hidden */ - hidden: boolean + chatId: InputPeerLike + /** Whether the topic should be hidden */ + hidden: boolean - /** - * Whether to dispatch the returned service message (if any) - * to the client's update handler. - */ - shouldDispatch?: true - }): Promise + /** + * Whether to dispatch the returned service message (if any) + * to the client's update handler. + */ + shouldDispatch?: true + }): Promise /** * Create an additional invite link for the chat. * @@ -2888,10 +2855,10 @@ export interface TelegramClient extends ITelegramClient { createInviteLink( chatId: InputPeerLike, params?: { - /** - * Date when this link will expire. - * If `number` is passed, UNIX time in ms is expected. - */ + /** + * Date when this link will expire. + * If `number` is passed, UNIX time in ms is expected. + */ expires?: number | Date /** @@ -2909,8 +2876,7 @@ export interface TelegramClient extends ITelegramClient { * approved by an admin */ withApproval?: boolean - }, - ): Promise + }): Promise /** * Edit an invite link. You can only edit non-primary * invite links. @@ -2924,31 +2890,32 @@ export interface TelegramClient extends ITelegramClient { * @param params * @returns Modified invite link */ - editInviteLink(params: { + editInviteLink( + params: { /** Chat ID */ - chatId: InputPeerLike - /** Invite link to edit */ - link: string | ChatInviteLink - /** - * Date when this link will expire. - * If `number` is passed, UNIX time in ms is expected. - */ - expires?: number | Date + chatId: InputPeerLike + /** Invite link to edit */ + link: string | ChatInviteLink + /** + * Date when this link will expire. + * If `number` is passed, UNIX time in ms is expected. + */ + expires?: number | Date - /** - * Maximum number of users that can be members of this chat - * at the same time after joining using this link. - * - * Integer in range `[1, 99999]` or `Infinity`, - */ - usageLimit?: number + /** + * Maximum number of users that can be members of this chat + * at the same time after joining using this link. + * + * Integer in range `[1, 99999]` or `Infinity`, + */ + usageLimit?: number - /** - * Whether users to be joined via this link need to be - * approved by an admin - */ - withApproval?: boolean - }): Promise + /** + * Whether users to be joined via this link need to be + * approved by an admin + */ + withApproval?: boolean + }): Promise /** * Generate a new primary invite link for a chat, * old primary link is revoked. @@ -2973,9 +2940,9 @@ export interface TelegramClient extends ITelegramClient { getInviteLinkMembers( chatId: InputPeerLike, params?: { - /** - * Invite link for which to get members - */ + /** + * Invite link for which to get members + */ link?: string | ChatInviteLink /** @@ -3008,8 +2975,7 @@ export interface TelegramClient extends ITelegramClient { * Doesn't work when {@link link} is set (Telegram limitation) */ requestedSearch?: string - }, - ): Promise> + }): Promise> /** * Get detailed information about an invite link * @@ -3018,7 +2984,9 @@ export interface TelegramClient extends ITelegramClient { * @param chatId Chat ID * @param link The invite link */ - getInviteLink(chatId: InputPeerLike, link: string): Promise + getInviteLink( + chatId: InputPeerLike, + link: string): Promise /** * Get invite links created by some administrator in the chat. * @@ -3035,11 +3003,11 @@ export interface TelegramClient extends ITelegramClient { getInviteLinks( chatId: InputPeerLike, params?: { - /** - * Only return this admin's links. - * - * @default `"self"` - */ + /** + * Only return this admin's links. + * + * @default `"self"` + */ admin?: InputPeerLike /** @@ -3058,8 +3026,7 @@ export interface TelegramClient extends ITelegramClient { * Offset for pagination. */ offset?: GetInviteLinksOffset - }, - ): Promise> + }): Promise> /** * Get primary invite link of a chat * @@ -3073,29 +3040,31 @@ export interface TelegramClient extends ITelegramClient { * **Available**: 👤 users only * */ - hideAllJoinRequests(params: { + hideAllJoinRequests( + params: { /** Chat/channel ID */ - chatId: InputPeerLike + chatId: InputPeerLike - /** Whether to approve or decline the join requests */ - action: 'approve' | 'decline' + /** Whether to approve or decline the join requests */ + action: 'approve' | 'decline' - /** Invite link to target */ - link?: string | ChatInviteLink - }): Promise + /** Invite link to target */ + link?: string | ChatInviteLink + }): Promise /** * Approve or decline join request to a chat. * **Available**: ✅ both users and bots * */ - hideJoinRequest(params: { + hideJoinRequest( + params: { /** Chat/channel ID */ - chatId: InputPeerLike - /** User ID */ - user: InputPeerLike - /** Whether to approve or decline the join request */ - action: 'approve' | 'decline' - }): Promise + chatId: InputPeerLike + /** User ID */ + user: InputPeerLike + /** Whether to approve or decline the join request */ + action: 'approve' | 'decline' + }): Promise /** * Iterate over users who have joined * the chat with the given invite link. @@ -3108,11 +3077,11 @@ export interface TelegramClient extends ITelegramClient { iterInviteLinkMembers( chatId: InputPeerLike, params?: Parameters[2] & { - /** - * Maximum number of users to return - * - * @default `Infinity`, i.e. all users are fetched - */ + /** + * Maximum number of users to return + * + * @default `Infinity`, i.e. all users are fetched + */ limit?: number /** @@ -3122,8 +3091,7 @@ export interface TelegramClient extends ITelegramClient { * @default 100. */ chunkSize?: number - }, - ): AsyncIterableIterator + }): AsyncIterableIterator /** * Iterate over invite links created by some administrator in the chat. * @@ -3140,10 +3108,10 @@ export interface TelegramClient extends ITelegramClient { iterInviteLinks( chatId: InputPeerLike, params?: Parameters[2] & { - /** - * Limit the number of invite links to be fetched. - * By default, all links are fetched. - */ + /** + * Limit the number of invite links to be fetched. + * By default, all links are fetched. + */ limit?: number /** @@ -3152,8 +3120,7 @@ export interface TelegramClient extends ITelegramClient { * @default `100` */ chunkSize?: number - }, - ): AsyncIterableIterator + }): AsyncIterableIterator /** * Revoke an invite link. * @@ -3166,7 +3133,9 @@ export interface TelegramClient extends ITelegramClient { * @param link Invite link to revoke * @returns If `link` is a primary invite, newly generated invite link, otherwise the revoked link */ - revokeInviteLink(chatId: InputPeerLike, link: string | ChatInviteLink): Promise + revokeInviteLink( + chatId: InputPeerLike, + link: string | ChatInviteLink): Promise /** * Close a poll sent by you. * @@ -3177,13 +3146,12 @@ export interface TelegramClient extends ITelegramClient { */ closePoll( params: InputMessageId & { - /** - * Whether to dispatch the edit message event - * to the client's update handler. - */ + /** + * Whether to dispatch the edit message event + * to the client's update handler. + */ shouldDispatch?: true - }, - ): Promise + }): Promise /** * Delete messages by their IDs * @@ -3192,7 +3160,10 @@ export interface TelegramClient extends ITelegramClient { * @param chatId Chat's marked ID, its username, phone or `"me"` or `"self"`. * @param ids Message(s) ID(s) to delete. */ - deleteMessagesById(chatId: InputPeerLike, ids: number[], params?: DeleteMessagesParams): Promise + deleteMessagesById( + chatId: InputPeerLike, + ids: number[], + params?: DeleteMessagesParams): Promise /** * Delete one or more {@link Message} * @@ -3200,7 +3171,9 @@ export interface TelegramClient extends ITelegramClient { * * @param messages Message(s) to delete */ - deleteMessages(messages: Message[], params?: DeleteMessagesParams): Promise + deleteMessages( + messages: Message[], + params?: DeleteMessagesParams): Promise /** * Delete scheduled messages by their IDs. * @@ -3209,7 +3182,9 @@ export interface TelegramClient extends ITelegramClient { * @param chatId Chat's marked ID, its username, phone or `"me"` or `"self"`. * @param ids Message(s) ID(s) to delete. */ - deleteScheduledMessages(chatId: InputPeerLike, ids: number[]): Promise + deleteScheduledMessages( + chatId: InputPeerLike, + ids: number[]): Promise /** * Edit sent inline message text, media and reply markup. * @@ -3220,52 +3195,53 @@ export interface TelegramClient extends ITelegramClient { * TDLib and Bot API compatible string * @param params */ - editInlineMessage(params: { + editInlineMessage( + params: { /** * Inline message ID, either as a TL object, or as a * TDLib and Bot API compatible string */ - messageId: tl.TypeInputBotInlineMessageID | string + messageId: tl.TypeInputBotInlineMessageID | string - /** - * New message text - * - * When `media` is passed, `media.caption` is used instead - */ - text?: InputText + /** + * New message text + * + * When `media` is passed, `media.caption` is used instead + */ + text?: InputText - /** - * New message media - */ - media?: InputMediaLike + /** + * New message media + */ + media?: InputMediaLike - /** - * Whether to disable links preview in this message - */ - disableWebPreview?: boolean + /** + * Whether to disable links preview in this message + */ + disableWebPreview?: boolean - /** - * Whether to invert media position. - * - * Currently only supported for web previews and makes the - * client render the preview above the caption and not below. - */ - invertMedia?: boolean + /** + * Whether to invert media position. + * + * Currently only supported for web previews and makes the + * client render the preview above the caption and not below. + */ + invertMedia?: boolean - /** - * For bots: new reply markup. - * If omitted, existing markup will be removed. - */ - replyMarkup?: ReplyMarkup + /** + * For bots: new reply markup. + * If omitted, existing markup will be removed. + */ + replyMarkup?: ReplyMarkup - /** - * For media, upload progress callback. - * - * @param uploaded Number of bytes uploaded - * @param total Total file size in bytes - */ - progressCallback?: (uploaded: number, total: number) => void - }): Promise + /** + * For media, upload progress callback. + * + * @param uploaded Number of bytes uploaded + * @param total Total file size in bytes + */ + progressCallback?: (uploaded: number, total: number) => void + }): Promise /** * Edit message text, media, reply markup and schedule date. * @@ -3277,11 +3253,11 @@ export interface TelegramClient extends ITelegramClient { */ editMessage( params: InputMessageId & { - /** - * New message text - * - * When `media` is passed, `media.caption` is used instead - */ + /** + * New message text + * + * When `media` is passed, `media.caption` is used instead + */ text?: InputText /** @@ -3329,8 +3305,7 @@ export interface TelegramClient extends ITelegramClient { invertMedia?: boolean businessConnectionId?: string - }, - ): Promise + }): Promise /** * Forward one or more messages by their IDs. * You can forward no more than 100 messages at once. @@ -3345,12 +3320,11 @@ export interface TelegramClient extends ITelegramClient { */ forwardMessagesById( params: ForwardMessageOptions & { - /** Source chat ID, username, phone, `"me"` or `"self"` */ + /** Source chat ID, username, phone, `"me"` or `"self"` */ fromChatId: InputPeerLike /** Message IDs to forward */ messages: number[] - }, - ): Promise + }): Promise /** * Forward one or more {@link Message}s to another chat. * @@ -3361,8 +3335,7 @@ export interface TelegramClient extends ITelegramClient { forwardMessages( params: ForwardMessageOptions & { messages: Message[] - }, - ): Promise + }): Promise /** * Get all scheduled messages in chat * @@ -3387,14 +3360,13 @@ export interface TelegramClient extends ITelegramClient { */ getCallbackQueryMessage( id: - | CallbackQuery - | tl.RawUpdateBotCallbackQuery - | { - messageId: number - queryId: tl.Long - peer: InputPeerLike - }, - ): Promise + | CallbackQuery + | tl.RawUpdateBotCallbackQuery + | { + messageId: number + queryId: tl.Long + peer: InputPeerLike + }): Promise // public version of the same method because why not /** * Get discussion message for some channel post. @@ -3412,7 +3384,8 @@ export interface TelegramClient extends ITelegramClient { * @param peer Channel where the post was found * @param message ID of the channel post */ - getDiscussionMessage(params: InputMessageId): Promise + getDiscussionMessage( + params: InputMessageId): Promise /** * Get fact check information for one or more messages in a chat @@ -3422,7 +3395,9 @@ export interface TelegramClient extends ITelegramClient { * @param chatId Chat where the messages are located * @param msgIds One or more message IDs */ - getFactCheck(chatId: InputPeerLike, msgIds: MaybeArray): Promise<(FactCheck | null)[]> + getFactCheck( + chatId: InputPeerLike, + msgIds: MaybeArray): Promise<(FactCheck | null)[]> /** * Get chat history. * @@ -3434,11 +3409,11 @@ export interface TelegramClient extends ITelegramClient { getHistory( chatId: InputPeerLike, params?: { - /** - * Limits the number of messages to be retrieved. - * - * @default 100 - */ + /** + * Limits the number of messages to be retrieved. + * + * @default 100 + */ limit?: number /** @@ -3487,8 +3462,7 @@ export interface TelegramClient extends ITelegramClient { * @default false */ reverse?: boolean - }, - ): Promise> + }): Promise> /** * Given a message link (e.g. `t.me/durov/1`), fetch the relevant message. * **Available**: ✅ both users and bots @@ -3517,7 +3491,9 @@ export interface TelegramClient extends ITelegramClient { * @param messages Message IDs * @returns Reactions to corresponding messages, or `null` if there are none */ - getMessageReactionsById(chatId: InputPeerLike, messages: number[]): Promise<(MessageReactions | null)[]> + getMessageReactionsById( + chatId: InputPeerLike, + messages: number[]): Promise<(MessageReactions | null)[]> /** * Get reactions to {@link Message}s. * @@ -3533,7 +3509,8 @@ export interface TelegramClient extends ITelegramClient { * @param messages Message IDs * @returns Reactions to corresponding messages, or `null` if there are none */ - getMessageReactions(messages: Message[]): Promise<(MessageReactions | null)[]> + getMessageReactions( + messages: Message[]): Promise<(MessageReactions | null)[]> /** * Get messages from PM or legacy group by their IDs. * For channels, use {@link getMessages}. @@ -3547,11 +3524,12 @@ export interface TelegramClient extends ITelegramClient { * **Available**: ✅ both users and bots * * @param messageIds Messages IDs - * @param [fromReply=false] + * @param [fromReply] * Whether the reply to a given message should be fetched * (i.e. `getMessages(msg.chat.id, msg.id, true).id === msg.replyToMessageId`) */ - getMessagesUnsafe(messageIds: MaybeArray, fromReply?: boolean): Promise<(Message | null)[]> + getMessagesUnsafe( + messageIds: MaybeArray, fromReply?: boolean): Promise<(Message | null)[]> /** * Get messages in chat by their IDs @@ -3563,11 +3541,13 @@ export interface TelegramClient extends ITelegramClient { * * @param chatId Chat's marked ID, its username, phone or `"me"` or `"self"` * @param messageIds Messages IDs - * @param [fromReply=false] + * @param [fromReply] * Whether the reply to a given message should be fetched * (i.e. `getMessages(msg.chat.id, msg.id, true).id === msg.replyToMessageId`) */ - getMessages(chatId: InputPeerLike, messageIds: MaybeArray, fromReply?: boolean): Promise<(Message | null)[]> + getMessages( + chatId: InputPeerLike, + messageIds: MaybeArray, fromReply?: boolean): Promise<(Message | null)[]> /** * Get users who have reacted to the message. * @@ -3577,9 +3557,9 @@ export interface TelegramClient extends ITelegramClient { */ getReactionUsers( params: InputMessageId & { - /** - * Get only reactions with the specified emoji - */ + /** + * Get only reactions with the specified emoji + */ emoji?: InputReaction /** @@ -3593,8 +3573,7 @@ export interface TelegramClient extends ITelegramClient { * Offset for pagination */ offset?: GetReactionUsersOffset - }, - ): Promise> + }): Promise> /** * For messages containing a reply, fetch the message that is being replied. * @@ -3616,7 +3595,9 @@ export interface TelegramClient extends ITelegramClient { * @param chatId Chat's marked ID, its username, phone or `"me"` or `"self"` * @param messageIds Scheduled messages IDs */ - getScheduledMessages(chatId: InputPeerLike, messageIds: MaybeArray): Promise<(Message | null)[]> + getScheduledMessages( + chatId: InputPeerLike, + messageIds: MaybeArray): Promise<(Message | null)[]> /** * Iterate over chat history. Wrapper over {@link getHistory} * @@ -3628,11 +3609,11 @@ export interface TelegramClient extends ITelegramClient { iterHistory( chatId: InputPeerLike, params?: Parameters[2] & { - /** - * Limits the number of messages to be retrieved. - * - * @default Infinity, i.e. all messages - */ + /** + * Limits the number of messages to be retrieved. + * + * @default Infinity, i.e. all messages + */ limit?: number /** @@ -3641,8 +3622,7 @@ export interface TelegramClient extends ITelegramClient { * @default 100 */ chunkSize?: number - }, - ): AsyncIterableIterator + }): AsyncIterableIterator /** * Iterate over users who have reacted to the message. * @@ -3656,11 +3636,11 @@ export interface TelegramClient extends ITelegramClient { */ iterReactionUsers( params: Parameters[1] & { - /** - * Limit the number of events returned. - * - * @default `Infinity`, i.e. all events are returned - */ + /** + * Limit the number of events returned. + * + * @default `Infinity`, i.e. all events are returned + */ limit?: number /** @@ -3669,8 +3649,7 @@ export interface TelegramClient extends ITelegramClient { * @default 100 */ chunkSize?: number - }, - ): AsyncIterableIterator + }): AsyncIterableIterator /** * Search for messages globally from all of your chats. * @@ -3684,11 +3663,11 @@ export interface TelegramClient extends ITelegramClient { */ iterSearchGlobal( params?: Parameters[1] & { - /** - * Limits the number of messages to be retrieved. - * - * @default `Infinity`, i.e. all messages are returned - */ + /** + * Limits the number of messages to be retrieved. + * + * @default `Infinity`, i.e. all messages are returned + */ limit?: number /** @@ -3698,8 +3677,7 @@ export interface TelegramClient extends ITelegramClient { * @default 100 */ chunkSize?: number - }, - ): AsyncIterableIterator + }): AsyncIterableIterator /** * Search for messages inside a specific chat * @@ -3712,11 +3690,11 @@ export interface TelegramClient extends ITelegramClient { */ iterSearchMessages( params?: Parameters[1] & { - /** - * Limits the number of messages to be retrieved. - * - * @default `Infinity`, i.e. all messages are returned - */ + /** + * Limits the number of messages to be retrieved. + * + * @default `Infinity`, i.e. all messages are returned + */ limit?: number /** @@ -3726,8 +3704,7 @@ export interface TelegramClient extends ITelegramClient { * @default `100` */ chunkSize?: number - }, - ): AsyncIterableIterator + }): AsyncIterableIterator /** * Pin a message in a group, supergroup, channel or PM. * @@ -3740,7 +3717,7 @@ export interface TelegramClient extends ITelegramClient { */ pinMessage( params: InputMessageId & { - /** Whether to send a notification (only for legacy groups and supergroups) */ + /** Whether to send a notification (only for legacy groups and supergroups) */ notify?: boolean /** Whether to pin for both sides (only for private chats) */ bothSides?: boolean @@ -3750,8 +3727,7 @@ export interface TelegramClient extends ITelegramClient { * to the client's update handler. */ shouldDispatch?: true - }, - ): Promise + }): Promise /** * Mark chat history as read. * @@ -3762,11 +3738,11 @@ export interface TelegramClient extends ITelegramClient { readHistory( chatId: InputPeerLike, params?: { - /** - * Message up until which to read history - * - * @default 0, i.e. read everything - */ + /** + * Message up until which to read history + * + * @default 0, i.e. read everything + */ maxId?: number /** @@ -3779,8 +3755,7 @@ export interface TelegramClient extends ITelegramClient { * Doesn't follow `disableNoDispatch` */ shouldDispatch?: true - }, - ): Promise + }): Promise /** * Mark all reactions in chat as read. * @@ -3791,13 +3766,12 @@ export interface TelegramClient extends ITelegramClient { readReactions( chatId: InputPeerLike, params?: { - /** - * Whether to dispatch updates that will be generated by this call. - * Doesn't follow `disableNoDispatch` - */ + /** + * Whether to dispatch updates that will be generated by this call. + * Doesn't follow `disableNoDispatch` + */ shouldDispatch?: true - }, - ): Promise + }): Promise /** * Search for messages globally from all of your chats * @@ -3807,48 +3781,49 @@ export interface TelegramClient extends ITelegramClient { * * @param params Search parameters */ - searchGlobal(params?: { + searchGlobal( + params?: { /** * Text query string. Use `"@"` to search for mentions. * * @default `""` (empty string) */ - query?: string + query?: string - /** - * Limits the number of messages to be retrieved. - * - * @default 100 - */ - limit?: number + /** + * Limits the number of messages to be retrieved. + * + * @default 100 + */ + limit?: number - /** - * Filter the results using some filter. (see {@link SearchFilters}) - * - * @default {@link SearchFilters.Empty} (i.e. will return all messages) - */ - filter?: tl.TypeMessagesFilter + /** + * Filter the results using some filter. (see {@link SearchFilters}) + * + * @default {@link SearchFilters.Empty} (i.e. will return all messages) + */ + filter?: tl.TypeMessagesFilter - /** - * Offset data used for pagination - */ - offset?: SearchGlobalOffset + /** + * Offset data used for pagination + */ + offset?: SearchGlobalOffset - /** - * Only return messages newer than this date - */ - minDate?: Date | number + /** + * Only return messages newer than this date + */ + minDate?: Date | number - /** - * Only return messages older than this date - */ - maxDate?: Date | number + /** + * Only return messages older than this date + */ + maxDate?: Date | number - /** - * Whether to only search across broadcast channels - */ - onlyChannels?: boolean - }): Promise> + /** + * Whether to only search across broadcast channels + */ + onlyChannels?: boolean + }): Promise> /** * Perform a global hashtag search, across the entire Telegram @@ -3861,12 +3836,11 @@ export interface TelegramClient extends ITelegramClient { searchHashtag( hashtag: string, params?: { - /** Offset for the search */ + /** Offset for the search */ offset?: SearchHashtagOffset /** Limit the number of results */ limit?: number - }, - ): Promise> + }): Promise> /** * Perform a global hashtag search, across the entire Telegram * @@ -3880,11 +3854,11 @@ export interface TelegramClient extends ITelegramClient { iterSearchHashtag( hashtag: string, params?: Parameters[2] & { - /** - * Limits the number of messages to be retrieved. - * - * @default `Infinity`, i.e. all messages are returned - */ + /** + * Limits the number of messages to be retrieved. + * + * @default `Infinity`, i.e. all messages are returned + */ limit?: number /** @@ -3894,8 +3868,7 @@ export interface TelegramClient extends ITelegramClient { * @default 100 */ chunkSize?: number - }, - ): AsyncIterableIterator + }): AsyncIterableIterator /** * Search for messages inside a specific chat * @@ -3904,109 +3877,113 @@ export interface TelegramClient extends ITelegramClient { * @param chatId Chat's marked ID, its username, phone or `"me"` or `"self"`. * @param params Additional search parameters */ - searchMessages(params?: { + searchMessages( + params?: { /** * Text query string. Required for text-only messages, * optional for media. * * @default `""` (empty string) */ - query?: string + query?: string - /** - * Chat where to search for messages. - * - * When empty, will search across common message box (i.e. private messages and legacy chats) - */ - chatId?: InputPeerLike + /** + * Chat where to search for messages. + * + * When empty, will search across common message box (i.e. private messages and legacy chats) + */ + chatId?: InputPeerLike - /** - * Offset ID for the search. Only messages earlier than this ID will be returned. - * - * @default `0` (starting from the latest message). - */ - offset?: SearchMessagesOffset + /** + * Offset ID for the search. Only messages earlier than this ID will be returned. + * + * @default `0` (starting from the latest message). + */ + offset?: SearchMessagesOffset - /** - * Additional offset from {@link offset}, in resulting messages. - * - * This can be used for advanced use cases, like: - * - Loading 20 results newer than message with ID `MSGID`: - * `offset = MSGID, addOffset = -20, limit = 20` - * - Loading 20 results around message with ID `MSGID`: - * `offset = MSGID, addOffset = -10, limit = 20` - * - * When {@link offset} is not set, this will be relative to the last message - * - * @default `0` (disabled) - */ - addOffset?: number + /** + * Additional offset from {@link offset}, in resulting messages. + * + * This can be used for advanced use cases, like: + * - Loading 20 results newer than message with ID `MSGID`: + * `offset = MSGID, addOffset = -20, limit = 20` + * - Loading 20 results around message with ID `MSGID`: + * `offset = MSGID, addOffset = -10, limit = 20` + * + * When {@link offset} is not set, this will be relative to the last message + * + * @default `0` (disabled) + */ + addOffset?: number - /** - * Minimum message ID to return - * - * @default `0` (disabled). - */ - minId?: number + /** + * Minimum message ID to return + * + * @default `0` (disabled). + */ + minId?: number - /** - * Maximum message ID to return. - * - * Unless {@link addOffset} is used, this will work the same as {@link offset}. - * - * @default `0` (disabled). - */ - maxId?: number + /** + * Maximum message ID to return. + * + * Unless {@link addOffset} is used, this will work the same as {@link offset}. + * + * @default `0` (disabled). + */ + maxId?: number - /** - * Minimum message date to return - * - * @default `0` (disabled). - */ - minDate?: number | Date + /** + * Minimum message date to return + * + * @default `0` (disabled). + */ + minDate?: number | Date - /** - * Maximum message date to return - * - * @default `0` (disabled). - */ - maxDate?: number | Date + /** + * Maximum message date to return + * + * @default `0` (disabled). + */ + maxDate?: number | Date - /** - * Thread ID to return only messages from this thread. - */ - threadId?: number + /** + * Thread ID to return only messages from this thread. + */ + threadId?: number - /** - * Limits the number of messages to be retrieved. - * - * @default 100 - */ - limit?: number + /** + * Limits the number of messages to be retrieved. + * + * @default 100 + */ + limit?: number - /** - * Filter the results using some filter (see {@link SearchFilters}) - * - * @default {@link SearchFilters.Empty} (i.e. will return all messages) - */ - filter?: tl.TypeMessagesFilter + /** + * Filter the results using some filter (see {@link SearchFilters}) + * + * @default {@link SearchFilters.Empty} (i.e. will return all messages) + */ + filter?: tl.TypeMessagesFilter - /** - * Search only for messages sent by a specific user. - * - * You can pass their marked ID, username, phone or `"me"` or `"self"` - */ - fromUser?: InputPeerLike - }): Promise> + /** + * Search only for messages sent by a specific user. + * + * You can pass their marked ID, username, phone or `"me"` or `"self"` + */ + fromUser?: InputPeerLike + }): Promise> /** Send a text to the same chat (and topic, if applicable) as a given message */ - answerText(message: Message, ...params: ParametersSkip2): ReturnType + answerText( + message: Message, + ...params: ParametersSkip2): ReturnType /** Send a media to the same chat (and topic, if applicable) as a given message */ - answerMedia(message: Message, ...params: ParametersSkip2): ReturnType + answerMedia( + message: Message, + ...params: ParametersSkip2): ReturnType /** Send a media group to the same chat (and topic, if applicable) as a given message */ answerMediaGroup( message: Message, - ...params: ParametersSkip2 - ): ReturnType + ...params: ParametersSkip2): ReturnType /** * Send a text comment to a given message. * @@ -4019,7 +3996,9 @@ export interface TelegramClient extends ITelegramClient { * If this is a channel post which does not have comments section. * To check if a post has comments, use {@link Message#replies}.hasComments */ - commentText(message: Message, ...params: ParametersSkip2): ReturnType + commentText( + message: Message, + ...params: ParametersSkip2): ReturnType /** * Send a text comment to a given message. * @@ -4032,7 +4011,9 @@ export interface TelegramClient extends ITelegramClient { * If this is a channel post which does not have comments section. * To check if a post has comments, use {@link Message#replies}.hasComments */ - commentMedia(message: Message, ...params: ParametersSkip2): ReturnType + commentMedia( + message: Message, + ...params: ParametersSkip2): ReturnType /** * Send a text comment to a given message. * @@ -4047,8 +4028,7 @@ export interface TelegramClient extends ITelegramClient { */ commentMediaGroup( message: Message, - ...params: ParametersSkip2 - ): ReturnType + ...params: ParametersSkip2): ReturnType /** * Copy a message group (i.e. send the same message group, but do not forward it). * @@ -4058,16 +4038,15 @@ export interface TelegramClient extends ITelegramClient { */ sendCopyGroup( params: SendCopyGroupParams & - ( - | { - /** Source chat ID */ - fromChatId: InputPeerLike - /** Message IDs to forward */ - messages: number[] - } - | { messages: Message[] } - ), - ): Promise + ( + | { + /** Source chat ID */ + fromChatId: InputPeerLike + /** Message IDs to forward */ + messages: number[] + } + | { messages: Message[] } + )): Promise /** * Copy a message (i.e. send the same message, but do not forward it). * @@ -4080,16 +4059,15 @@ export interface TelegramClient extends ITelegramClient { */ sendCopy( params: SendCopyParams & - ( - | { - /** Source chat ID */ - fromChatId: InputPeerLike - /** Message ID to forward */ - message: number - } - | { message: Message } - ), - ): Promise + ( + | { + /** Source chat ID */ + fromChatId: InputPeerLike + /** Message ID to forward */ + message: number + } + | { message: Message } + )): Promise /** * Send a group of media. * @@ -4107,12 +4085,12 @@ export interface TelegramClient extends ITelegramClient { chatId: InputPeerLike, medias: (InputMediaLike | string)[], params?: CommonSendParams & { - /** - * Whether to invert media position. - * - * Currently only supported for web previews and makes the - * client render the preview above the caption and not below. - */ + /** + * Whether to invert media position. + * + * Currently only supported for web previews and makes the + * client render the preview above the caption and not below. + */ invertMedia?: boolean /** @@ -4125,8 +4103,7 @@ export interface TelegramClient extends ITelegramClient { * @param total Total file size */ progressCallback?: (index: number, uploaded: number, total: number) => void - }, - ): Promise + }): Promise /** * Send a single media (a photo or a document-based media) * @@ -4144,10 +4121,10 @@ export interface TelegramClient extends ITelegramClient { chatId: InputPeerLike, media: InputMediaLike | string, params?: CommonSendParams & { - /** - * For bots: inline or reply markup or an instruction - * to hide a reply keyboard or to force a reply. - */ + /** + * For bots: inline or reply markup or an instruction + * to hide a reply keyboard or to force a reply. + */ replyMarkup?: ReplyMarkup /** @@ -4175,32 +4152,28 @@ export interface TelegramClient extends ITelegramClient { * @param total Total file size */ progressCallback?: (uploaded: number, total: number) => void - }, - ): Promise + }): Promise /** Send a text in reply to a given quote */ quoteWithText( message: Message, params: QuoteParamsFrom[3]> & { - /** Text to send */ + /** Text to send */ text: Parameters[2] - }, - ): ReturnType + }): ReturnType /** Send a media in reply to a given quote */ quoteWithMedia( message: Message, params: QuoteParamsFrom[3]> & { - /** Media to send */ + /** Media to send */ media: Parameters[2] - }, - ): ReturnType + }): ReturnType /** Send a media group in reply to a given quote */ quoteWithMediaGroup( message: Message, params: QuoteParamsFrom[3]> & { - /** Media group to send */ + /** Media group to send */ medias: Parameters[2] - }, - ): ReturnType + }): ReturnType /** * Send or remove a reaction. * @@ -4212,7 +4185,7 @@ export interface TelegramClient extends ITelegramClient { */ sendReaction( params: InputMessageId & { - /** Reaction emoji (or `null` to remove reaction) */ + /** Reaction emoji (or `null` to remove reaction) */ emoji?: MaybeArray | null /** Whether to use a big reaction */ big?: boolean @@ -4222,17 +4195,19 @@ export interface TelegramClient extends ITelegramClient { * to the client's update handler. */ shouldDispatch?: true - }, - ): Promise + }): Promise /** Send a text in reply to a given message */ - replyText(message: Message, ...params: ParametersSkip2): ReturnType + replyText( + message: Message, + ...params: ParametersSkip2): ReturnType /** Send a media in reply to a given message */ - replyMedia(message: Message, ...params: ParametersSkip2): ReturnType + replyMedia( + message: Message, + ...params: ParametersSkip2): ReturnType /** Send a media group in reply to a given message */ replyMediaGroup( message: Message, - ...params: ParametersSkip2 - ): ReturnType + ...params: ParametersSkip2): ReturnType /** * Send previously scheduled message(s) * @@ -4245,7 +4220,9 @@ export interface TelegramClient extends ITelegramClient { * @param peer Chat where the messages were scheduled * @param ids ID(s) of the messages */ - sendScheduled(peer: InputPeerLike, ids: MaybeArray): Promise + sendScheduled( + peer: InputPeerLike, + ids: MaybeArray): Promise /** * Send a text message * @@ -4259,10 +4236,10 @@ export interface TelegramClient extends ITelegramClient { chatId: InputPeerLike, text: InputText, params?: CommonSendParams & { - /** - * For bots: inline or reply markup or an instruction - * to hide a reply keyboard or to force a reply. - */ + /** + * For bots: inline or reply markup or an instruction + * to hide a reply keyboard or to force a reply. + */ replyMarkup?: ReplyMarkup /** @@ -4277,8 +4254,7 @@ export interface TelegramClient extends ITelegramClient { * client render the preview above the caption and not below. */ invertMedia?: boolean - }, - ): Promise + }): Promise /** * Sends a current user/bot typing event * to a conversation partner or group. @@ -4294,12 +4270,11 @@ export interface TelegramClient extends ITelegramClient { * @param params */ sendTyping( - chatId: InputPeerLike, - status?: Exclude | tl.TypeSendMessageAction, + chatId: InputPeerLike, status?: Exclude | tl.TypeSendMessageAction, params?: { - /** - * For `upload_*` and history import actions, progress of the upload - */ + /** + * For `upload_*` and history import actions, progress of the upload + */ progress?: number /** @@ -4311,8 +4286,7 @@ export interface TelegramClient extends ITelegramClient { * For comment threads, ID of the thread (i.e. top message) */ threadId?: number - }, - ): Promise + }): Promise /** * Send or retract a vote in a poll. * **Available**: 👤 users only @@ -4320,15 +4294,14 @@ export interface TelegramClient extends ITelegramClient { */ sendVote( params: InputMessageId & { - /** - * Selected options, or `null` to retract. - * You can pass indexes of the answers or the `Buffer`s - * representing them. In case of indexes, the poll will first - * be requested from the server. - */ + /** + * Selected options, or `null` to retract. + * You can pass indexes of the answers or the `Buffer`s + * representing them. In case of indexes, the poll will first + * be requested from the server. + */ options: null | MaybeArray - }, - ): Promise + }): Promise /** * Translate message text to a given language. * @@ -4338,10 +4311,9 @@ export interface TelegramClient extends ITelegramClient { */ translateMessage( params: InputMessageId & { - /** Target language (two-letter ISO 639-1 language code) */ + /** Target language (two-letter ISO 639-1 language code) */ toLanguage: string - }, - ): Promise + }): Promise /** * Translate text to a given language. * @@ -4350,7 +4322,9 @@ export interface TelegramClient extends ITelegramClient { * @param text Text to translate * @param toLanguage Target language (two-letter ISO 639-1 language code) */ - translateText(text: InputText, toLanguage: string): Promise + translateText( + text: InputText, + toLanguage: string): Promise /** * Unpin all pinned messages in a chat. * @@ -4361,9 +4335,9 @@ export interface TelegramClient extends ITelegramClient { unpinAllMessages( chatId: InputPeerLike, params?: { - /** - * For forums - unpin only messages from the given topic - */ + /** + * For forums - unpin only messages from the given topic + */ topicId?: number /** @@ -4371,8 +4345,7 @@ export interface TelegramClient extends ITelegramClient { * Doesn't follow `disableNoDispatch` */ shouldDispatch?: true - }, - ): Promise + }): Promise /** * Unpin a message in a group, supergroup, channel or PM. * @@ -4391,7 +4364,9 @@ export interface TelegramClient extends ITelegramClient { * **Available**: 👤 users only * */ - getCollectibleInfo(kind: 'phone' | 'username', item: string): Promise + getCollectibleInfo( + kind: 'phone' | 'username', + item: string): Promise /** * Create a new takeout session * @@ -4399,27 +4374,30 @@ export interface TelegramClient extends ITelegramClient { * * @param params Takeout session parameters */ - initTakeoutSession(params: Omit): Promise + initTakeoutSession( + params: Omit): Promise /** * Normalize {@link InputPrivacyRule}[] to `tl.TypeInputPrivacyRule`, * resolving the peers if needed. * **Available**: ✅ both users and bots * */ - _normalizePrivacyRules(rules: InputPrivacyRule[]): Promise + _normalizePrivacyRules( + rules: InputPrivacyRule[]): Promise /** * Change your 2FA password * **Available**: 👤 users only * */ - changeCloudPassword(params: { + changeCloudPassword( + params: { /** Current password as plaintext */ - currentPassword: string - /** New password as plaintext */ - newPassword: string - /** Hint for the new password */ - hint?: string - }): Promise + currentPassword: string + /** New password as plaintext */ + newPassword: string + /** Hint for the new password */ + hint?: string + }): Promise /** * Enable 2FA password on your account * @@ -4430,14 +4408,15 @@ export interface TelegramClient extends ITelegramClient { * **Available**: 👤 users only * */ - enableCloudPassword(params: { + enableCloudPassword( + params: { /** 2FA password as plaintext */ - password: string - /** Hint for the new password */ - hint?: string - /** Recovery email */ - email?: string - }): Promise + password: string + /** Hint for the new password */ + hint?: string + /** Recovery email */ + email?: string + }): Promise /** * Verify an email to use as 2FA recovery method * @@ -4500,10 +4479,9 @@ export interface TelegramClient extends ITelegramClient { createBusinessChatLink( text: InputText, params?: { - /** Custom title for the link */ + /** Custom title for the link */ title?: string - }, - ): Promise + }): Promise /** * Edit an existing business chat link @@ -4515,12 +4493,11 @@ export interface TelegramClient extends ITelegramClient { editBusinessChatLink( link: string | BusinessChatLink, params: { - /** Text to be inserted in the message input */ + /** Text to be inserted in the message input */ text: InputText /** Custom title for the link */ title?: string - }, - ): Promise + }): Promise /** * Delete a business chat link @@ -4547,9 +4524,9 @@ export interface TelegramClient extends ITelegramClient { getBoosts( peerId: InputPeerLike, params?: { - /** - * Offset for pagination - */ + /** + * Offset for pagination + */ offset?: string /** @@ -4558,8 +4535,7 @@ export interface TelegramClient extends ITelegramClient { * @default 100 */ limit?: number - }, - ): Promise> + }): Promise> /** * Get current user's business chat links @@ -4575,7 +4551,8 @@ export interface TelegramClient extends ITelegramClient { * * @param connectionId ID of the business connection */ - getBusinessConnection(connectionId: string): Promise + getBusinessConnection( + connectionId: string): Promise /** * Get boost slots information of the current user. * @@ -4597,11 +4574,11 @@ export interface TelegramClient extends ITelegramClient { iterBoosters( peerId: InputPeerLike, params?: Parameters[2] & { - /** - * Total number of boosters to fetch - * - * @default Infinity, i.e. fetch all boosters - */ + /** + * Total number of boosters to fetch + * + * @default Infinity, i.e. fetch all boosters + */ limit?: number /** @@ -4611,8 +4588,7 @@ export interface TelegramClient extends ITelegramClient { * @default 100 */ chunkSize?: number - }, - ): AsyncIterableIterator + }): AsyncIterableIterator /** * Set current user's business introduction. @@ -4623,9 +4599,9 @@ export interface TelegramClient extends ITelegramClient { */ setBusinessIntro( intro: { - /** - * Title of the introduction - */ + /** + * Title of the introduction + */ title?: string /** @@ -4637,8 +4613,7 @@ export interface TelegramClient extends ITelegramClient { * Sticker to show beneath the introduction */ sticker?: InputMediaSticker | InputFileLike | tl.TypeInputDocument - } | null, - ): Promise + } | null): Promise /** * Set current user's business work hours. @@ -4647,23 +4622,22 @@ export interface TelegramClient extends ITelegramClient { */ setBusinessWorkHours( params: - | ({ - /** Timezone in which the hours are defined */ - timezone: string - } & ( - | { - /** - * Business work intervals, per-day (like available in {@link BusinessWorkHours.days}) - */ - hours: ReadonlyArray - } - | { - /** Business work intervals, raw intervals */ - intervals: tl.TypeBusinessWeeklyOpen[] - } - )) - | null, - ): Promise + | ({ + /** Timezone in which the hours are defined */ + timezone: string + } & ( + | { + /** + * Business work intervals, per-day (like available in {@link BusinessWorkHours.days}) + */ + hours: ReadonlyArray + } + | { + /** Business work intervals, raw intervals */ + intervals: tl.TypeBusinessWeeklyOpen[] + } + )) + | null): Promise /** * Add a sticker to a sticker set. * @@ -4680,15 +4654,14 @@ export interface TelegramClient extends ITelegramClient { setId: InputStickerSet, sticker: InputStickerSetItem, params?: { - /** - * Upload progress callback - * - * @param uploaded Number of bytes uploaded - * @param total Total file size - */ + /** + * Upload progress callback + * + * @param uploaded Number of bytes uploaded + * @param total Total file size + */ progressCallback?: (uploaded: number, total: number) => void - }, - ): Promise + }): Promise /** * Create a new sticker set. * @@ -4697,78 +4670,79 @@ export interface TelegramClient extends ITelegramClient { * @param params * @returns Newly created sticker set */ - createStickerSet(params: { + createStickerSet( + params: { /** * Owner of the sticker set (must be user). * * If this pack is created from a user account, * can only be `"self"` */ - owner: InputPeerLike + owner: InputPeerLike - /** - * Title of the sticker set (1-64 chars) - */ - title: string + /** + * Title of the sticker set (1-64 chars) + */ + title: string - /** - * Short name of the sticker set. - * Can only contain English letters, digits and underscores - * (i.e. must match `/^[a-zA-Z0-9_]+$/), - * and (for bots) must end with `_by_` - * (`` is case-insensitive). - */ - shortName: string + /** + * Short name of the sticker set. + * Can only contain English letters, digits and underscores + * (i.e. must match `/^[a-zA-Z0-9_]+$/), + * and (for bots) must end with `_by_` + * (`` is case-insensitive). + */ + shortName: string - /** - * Type of the stickers in this set. - * - * @default `sticker`, i.e. regular stickers. - */ - type?: StickerType + /** + * Type of the stickers in this set. + * + * @default `sticker`, i.e. regular stickers. + */ + type?: StickerType - /** - * File source type for the stickers in this set. - * - * @default `static`, i.e. regular WEBP stickers. - */ - sourceType?: StickerSourceType + /** + * File source type for the stickers in this set. + * + * @default `static`, i.e. regular WEBP stickers. + */ + sourceType?: StickerSourceType - /** - * Whether to create "adaptive" emoji set. - * - * Color of the emoji will be changed depending on the text color. - * Only works for TGS-based emoji stickers - */ - adaptive?: boolean + /** + * Whether to create "adaptive" emoji set. + * + * Color of the emoji will be changed depending on the text color. + * Only works for TGS-based emoji stickers + */ + adaptive?: boolean - /** - * List of stickers to be immediately added into the pack. - * There must be at least one sticker in this list. - */ - stickers: InputStickerSetItem[] + /** + * List of stickers to be immediately added into the pack. + * There must be at least one sticker in this list. + */ + stickers: InputStickerSetItem[] - /** - * Thumbnail for the set. - * - * The file must be either a `.png` file - * up to 128kb, having size of exactly `100x100` px, - * or a `.tgs` file up to 32kb. - * - * If not set, Telegram will use the first sticker - * in the sticker set as the thumbnail - */ - thumb?: InputFileLike + /** + * Thumbnail for the set. + * + * The file must be either a `.png` file + * up to 128kb, having size of exactly `100x100` px, + * or a `.tgs` file up to 32kb. + * + * If not set, Telegram will use the first sticker + * in the sticker set as the thumbnail + */ + thumb?: InputFileLike - /** - * Upload progress callback. - * - * @param idx Index of the sticker - * @param uploaded Number of bytes uploaded - * @param total Total file size - */ - progressCallback?: (idx: number, uploaded: number, total: number) => void - }): Promise + /** + * Upload progress callback. + * + * @param idx Index of the sticker + * @param uploaded Number of bytes uploaded + * @param total Total file size + */ + progressCallback?: (idx: number, uploaded: number, total: number) => void + }): Promise /** * Delete a sticker from a sticker set * @@ -4782,8 +4756,7 @@ export interface TelegramClient extends ITelegramClient { * @returns Modfiied sticker set */ deleteStickerFromSet( - sticker: string | tdFileId.RawFullRemoteFileLocation | tl.TypeInputDocument, - ): Promise + sticker: string | tdFileId.RawFullRemoteFileLocation | tl.TypeInputDocument): Promise /** * Get custom emoji stickers by their IDs * @@ -4797,7 +4770,8 @@ export interface TelegramClient extends ITelegramClient { * **Available**: ✅ both users and bots * */ - getCustomEmojisFromMessages(messages: MaybeArray): Promise + getCustomEmojisFromMessages( + messages: MaybeArray): Promise /** * Get a list of all installed sticker packs * @@ -4814,12 +4788,13 @@ export interface TelegramClient extends ITelegramClient { * **Available**: 👤 users only * */ - getMyStickerSets(params?: { + getMyStickerSets( + params?: { /** Offset for pagination */ - offset?: Long - /** Limit for pagination */ - limit?: number - }): Promise> + offset?: Long + /** Limit for pagination */ + limit?: number + }): Promise> /** * Get a sticker set and stickers inside of it. * @@ -4844,8 +4819,7 @@ export interface TelegramClient extends ITelegramClient { */ moveStickerInSet( sticker: string | tdFileId.RawFullRemoteFileLocation | tl.TypeInputDocument, - position: number, - ): Promise + position: number): Promise /** * Replace a sticker in a sticker set with another sticker @@ -4864,15 +4838,14 @@ export interface TelegramClient extends ITelegramClient { sticker: string | tdFileId.RawFullRemoteFileLocation | tl.TypeInputDocument, newSticker: InputStickerSetItem, params?: { - /** - * Upload progress callback - * - * @param uploaded Number of bytes uploaded - * @param total Total file size - */ + /** + * Upload progress callback + * + * @param uploaded Number of bytes uploaded + * @param total Total file size + */ progressCallback?: (uploaded: number, total: number) => void - }, - ): Promise + }): Promise /** * Set group sticker set for a supergroup * @@ -4883,7 +4856,9 @@ export interface TelegramClient extends ITelegramClient { * @param params * @returns Modified sticker set */ - setChatStickerSet(chatId: InputPeerLike, setId: InputStickerSet): Promise + setChatStickerSet( + chatId: InputPeerLike, + setId: InputStickerSet): Promise /** * Set sticker set thumbnail * @@ -4898,15 +4873,14 @@ export interface TelegramClient extends ITelegramClient { id: InputStickerSet, thumb: InputFileLike | tl.TypeInputDocument, params?: { - /** - * Upload progress callback - * - * @param uploaded Number of bytes uploaded - * @param total Total file size - */ + /** + * Upload progress callback + * + * @param uploaded Number of bytes uploaded + * @param total Total file size + */ progressCallback?: (uploaded: number, total: number) => void - }, - ): Promise + }): Promise /** * Check if the current user can post stories as a given peer * @@ -4926,19 +4900,20 @@ export interface TelegramClient extends ITelegramClient { * * @returns IDs of stories that were removed */ - deleteStories(params: { + deleteStories( + params: { /** * Story IDs to delete */ - ids: MaybeArray + ids: MaybeArray - /** - * Peer ID whose stories to delete - * - * @default `self` - */ - peer?: InputPeerLike - }): Promise + /** + * Peer ID whose stories to delete + * + * @default `self` + */ + peer?: InputPeerLike + }): Promise /** * Edit a sent story * @@ -4946,57 +4921,59 @@ export interface TelegramClient extends ITelegramClient { * * @returns Edited story */ - editStory(params: { + editStory( + params: { /** * Story ID to edit */ - id: number + id: number - /** - * Peer ID to whose story to edit - * - * @default `self` - */ - peer?: InputPeerLike + /** + * Peer ID to whose story to edit + * + * @default `self` + */ + peer?: InputPeerLike - /** - * Media contained in a story. Currently can only be a photo or a video. - */ - media?: InputMediaLike + /** + * Media contained in a story. Currently can only be a photo or a video. + */ + media?: InputMediaLike - /** - * Override caption for {@link media} - */ - caption?: InputText + /** + * Override caption for {@link media} + */ + caption?: InputText - /** - * Interactive elements to add to the story - */ - interactiveElements?: tl.TypeMediaArea[] + /** + * Interactive elements to add to the story + */ + interactiveElements?: tl.TypeMediaArea[] - /** - * Privacy rules to apply to the story - * - * @default "Everyone" - */ - privacyRules?: InputPrivacyRule[] - }): Promise + /** + * Privacy rules to apply to the story + * + * @default "Everyone" + */ + privacyRules?: InputPrivacyRule[] + }): Promise /** * Get all stories (e.g. to load the top bar) * **Available**: 👤 users only * */ - getAllStories(params?: { + getAllStories( + params?: { /** * Offset from which to fetch stories */ - offset?: string + offset?: string - /** - * Whether to fetch stories from "archived" (or "hidden") peers - */ - archived?: boolean - }): Promise + /** + * Whether to fetch stories from "archived" (or "hidden") peers + */ + archived?: boolean + }): Promise /** * Get stories of a given peer * @@ -5013,13 +4990,13 @@ export interface TelegramClient extends ITelegramClient { getProfileStories( peerId: InputPeerLike, params?: { - /** - * Kind of stories to fetch - * - `pinned` - stories pinned to the profile and visible to everyone - * - `archived` - "archived" stories that can later be pinned, only visible to the owner - * - * @default `pinned` - */ + /** + * Kind of stories to fetch + * - `pinned` - stories pinned to the profile and visible to everyone + * - `archived` - "archived" stories that can later be pinned, only visible to the owner + * + * @default `pinned` + */ kind?: 'pinned' | 'archived' /** @@ -5033,8 +5010,7 @@ export interface TelegramClient extends ITelegramClient { * @default 100 */ limit?: number - }, - ): Promise> + }): Promise> /** * Get one or more stories by their IDs * @@ -5043,7 +5019,9 @@ export interface TelegramClient extends ITelegramClient { * @param peerId Peer ID whose stories to fetch * @param storyIds Story IDs */ - getStoriesById(peerId: InputPeerLike, storyIds: MaybeArray): Promise + getStoriesById( + peerId: InputPeerLike, + storyIds: MaybeArray): Promise /** * Get brief information about stories interactions. * @@ -5051,7 +5029,9 @@ export interface TelegramClient extends ITelegramClient { * **Available**: 👤 users only * */ - getStoriesInteractions(peerId: InputPeerLike, storyIds: MaybeArray): Promise + getStoriesInteractions( + peerId: InputPeerLike, + storyIds: MaybeArray): Promise /** * Generate a link to a story. * @@ -5062,7 +5042,9 @@ export interface TelegramClient extends ITelegramClient { * **Available**: 👤 users only * */ - getStoryLink(peerId: InputPeerLike, storyId: number): Promise + getStoryLink( + peerId: InputPeerLike, + storyId: number): Promise /** * Get viewers list of a story * **Available**: 👤 users only @@ -5072,9 +5054,9 @@ export interface TelegramClient extends ITelegramClient { peerId: InputPeerLike, storyId: number, params?: { - /** - * Whether to only fetch viewers from contacts - */ + /** + * Whether to only fetch viewers from contacts + */ onlyContacts?: boolean /** @@ -5102,8 +5084,7 @@ export interface TelegramClient extends ITelegramClient { * @default 100 */ limit?: number - }, - ): Promise + }): Promise /** * Hide own stories views (activate so called "stealth mode") * @@ -5111,21 +5092,22 @@ export interface TelegramClient extends ITelegramClient { * **Available**: 👤 users only * */ - hideMyStoriesViews(params?: { + hideMyStoriesViews( + params?: { /** * Whether to hide views from the last 5 minutes * * @default true */ - past?: boolean + past?: boolean - /** - * Whether to hide views for the next 25 minutes - * - * @default true - */ - future?: boolean - }): Promise + /** + * Whether to hide views for the next 25 minutes + * + * @default true + */ + future?: boolean + }): Promise /** * Increment views of one or more stories. * @@ -5137,7 +5119,9 @@ export interface TelegramClient extends ITelegramClient { * @param peerId Peer ID whose stories to mark as read * @param ids ID(s) of the stories to increment views of (max 200) */ - incrementStoriesViews(peerId: InputPeerLike, ids: MaybeArray): Promise + incrementStoriesViews( + peerId: InputPeerLike, + ids: MaybeArray): Promise /** * Iterate over all stories (e.g. to load the top bar) * @@ -5147,14 +5131,13 @@ export interface TelegramClient extends ITelegramClient { */ iterAllStories( params?: Parameters[1] & { - /** - * Maximum number of stories to fetch - * - * @default Infinity - */ + /** + * Maximum number of stories to fetch + * + * @default Infinity + */ limit?: number - }, - ): AsyncIterableIterator + }): AsyncIterableIterator /** * Iterate over profile stories. Wrapper over {@link getProfileStories} * **Available**: ✅ both users and bots @@ -5163,11 +5146,11 @@ export interface TelegramClient extends ITelegramClient { iterProfileStories( peerId: InputPeerLike, params?: Parameters[2] & { - /** - * Total number of stories to fetch - * - * @default `Infinity`, i.e. fetch all stories - */ + /** + * Total number of stories to fetch + * + * @default `Infinity`, i.e. fetch all stories + */ limit?: number /** @@ -5177,8 +5160,7 @@ export interface TelegramClient extends ITelegramClient { * @default 100 */ chunkSize?: number - }, - ): AsyncIterableIterator + }): AsyncIterableIterator /** * Iterate over viewers list of a story. * Wrapper over {@link getStoryViewers} @@ -5189,11 +5171,11 @@ export interface TelegramClient extends ITelegramClient { peerId: InputPeerLike, storyId: number, params?: Parameters[3] & { - /** - * Total number of viewers to fetch - * - * @default Infinity, i.e. fetch all viewers - */ + /** + * Total number of viewers to fetch + * + * @default Infinity, i.e. fetch all viewers + */ limit?: number /** @@ -5203,8 +5185,7 @@ export interface TelegramClient extends ITelegramClient { * @default 100 */ chunkSize?: number - }, - ): AsyncIterableIterator + }): AsyncIterableIterator /** * Mark all stories up to a given ID as read * @@ -5225,33 +5206,33 @@ export interface TelegramClient extends ITelegramClient { peerId: InputPeerLike, storyIds: MaybeArray, params?: { - /** - * Reason for reporting - * - * @default inputReportReasonSpam - */ + /** + * Reason for reporting + * + * @default inputReportReasonSpam + */ reason?: tl.TypeReportReason /** * Additional comment to the report */ message?: string - }, - ): Promise + }): Promise /** * Send (or remove) a reaction to a story * **Available**: 👤 users only * */ - sendStoryReaction(params: { - peerId: InputPeerLike - storyId: number - reaction: InputReaction - /** - * Whether to add this reaction to recently used - */ - addToRecent?: boolean - }): Promise + sendStoryReaction( + params: { + peerId: InputPeerLike + storyId: number + reaction: InputReaction + /** + * Whether to add this reaction to recently used + */ + addToRecent?: boolean + }): Promise /** * Send a story * @@ -5259,56 +5240,57 @@ export interface TelegramClient extends ITelegramClient { * * @returns Created story */ - sendStory(params: { + sendStory( + params: { /** * Peer ID to send story as * * @default `self` */ - peer?: InputPeerLike + peer?: InputPeerLike - /** - * Media contained in a story. Currently can only be a photo or a video. - * - * You can also pass TDLib and Bot API compatible File ID, - * which will be wrapped in {@link InputMedia.auto} - */ - media: InputMediaLike | string + /** + * Media contained in a story. Currently can only be a photo or a video. + * + * You can also pass TDLib and Bot API compatible File ID, + * which will be wrapped in {@link InputMedia.auto} + */ + media: InputMediaLike | string - /** - * Override caption for {@link media} - */ - caption?: InputText + /** + * Override caption for {@link media} + */ + caption?: InputText - /** - * Whether to automatically pin this story to the profile - */ - pinned?: boolean + /** + * Whether to automatically pin this story to the profile + */ + pinned?: boolean - /** - * Whether to disallow sharing this story - */ - forbidForwards?: boolean + /** + * Whether to disallow sharing this story + */ + forbidForwards?: boolean - /** - * Interactive elements to add to the story - */ - interactiveElements?: tl.TypeMediaArea[] + /** + * Interactive elements to add to the story + */ + interactiveElements?: tl.TypeMediaArea[] - /** - * Privacy rules to apply to the story - * - * @default "Everyone" - */ - privacyRules?: InputPrivacyRule[] + /** + * Privacy rules to apply to the story + * + * @default "Everyone" + */ + privacyRules?: InputPrivacyRule[] - /** - * TTL period of the story, in seconds - * - * @default 86400 - */ - period?: number - }): Promise + /** + * TTL period of the story, in seconds + * + * @default 86400 + */ + period?: number + }): Promise /** * Toggle whether peer's stories are archived (hidden) or not. * @@ -5316,7 +5298,9 @@ export interface TelegramClient extends ITelegramClient { * **Available**: 👤 users only * */ - togglePeerStoriesArchived(peerId: InputPeerLike, archived: boolean): Promise + togglePeerStoriesArchived( + peerId: InputPeerLike, + archived: boolean): Promise /** * Toggle one or more stories pinned status * @@ -5324,24 +5308,25 @@ export interface TelegramClient extends ITelegramClient { * * @returns IDs of stories that were toggled */ - toggleStoriesPinned(params: { + toggleStoriesPinned( + params: { /** * Story ID(s) to toggle */ - ids: MaybeArray + ids: MaybeArray - /** - * Whether to pin or unpin the story - */ - pinned: boolean + /** + * Whether to pin or unpin the story + */ + pinned: boolean - /** - * Peer ID whose stories to toggle - * - * @default `self` - */ - peer?: InputPeerLike - }): Promise + /** + * Peer ID whose stories to toggle + * + * @default `self` + */ + peer?: InputPeerLike + }): Promise /** * Block a user * @@ -5357,7 +5342,8 @@ export interface TelegramClient extends ITelegramClient { * * @param ids ID(s) of the photos. Can be file IDs or raw TL objects */ - deleteProfilePhotos(ids: MaybeArray): Promise + deleteProfilePhotos( + ids: MaybeArray): Promise /** * Edit "close friends" list directly using user IDs * @@ -5385,7 +5371,7 @@ export interface TelegramClient extends ITelegramClient { getCommonChats(userId: InputPeerLike): Promise /** * Gets the current default value of the Time-To-Live setting, applied to all new chats. - * **Available**: ✅ both users and bots + * **Available**: 👤 users only * */ getGlobalTtl(): Promise @@ -5413,7 +5399,9 @@ export interface TelegramClient extends ITelegramClient { * @param photoId ID of the photo to fetch * @param params */ - getProfilePhoto(userId: InputPeerLike, photoId: tl.Long): Promise + getProfilePhoto( + userId: InputPeerLike, + photoId: tl.Long): Promise /** * Get a list of profile pictures of a user * @@ -5425,11 +5413,11 @@ export interface TelegramClient extends ITelegramClient { getProfilePhotos( userId: InputPeerLike, params?: { - /** - * Offset from which to fetch. - * - * @default `0` - */ + /** + * Offset from which to fetch. + * + * @default `0` + */ offset?: number /** @@ -5438,8 +5426,7 @@ export interface TelegramClient extends ITelegramClient { * @default `100` */ limit?: number - }, - ): Promise> + }): Promise> /** * Get information about multiple users. * You can retrieve up to 200 users at once. @@ -5462,11 +5449,11 @@ export interface TelegramClient extends ITelegramClient { iterProfilePhotos( userId: InputPeerLike, params?: Parameters[2] & { - /** - * Maximum number of items to fetch - * - * @default `Infinity`, i.e. all items are fetched - */ + /** + * Maximum number of items to fetch + * + * @default `Infinity`, i.e. all items are fetched + */ limit?: number /** @@ -5475,8 +5462,7 @@ export interface TelegramClient extends ITelegramClient { * @default 100 */ chunkSize?: number - }, - ): AsyncIterableIterator + }): AsyncIterableIterator /** * Get multiple `InputPeer`s at once, * while also normalizing and removing @@ -5491,8 +5477,7 @@ export interface TelegramClient extends ITelegramClient { */ resolvePeerMany( peerIds: InputPeerLike[], - normalizer: (obj: tl.TypeInputPeer) => T | null, - ): Promise + normalizer: (obj: tl.TypeInputPeer) => T | null): Promise /** * Get multiple `InputPeer`s at once. * @@ -5502,7 +5487,8 @@ export interface TelegramClient extends ITelegramClient { * * @param peerIds Peer Ids */ - resolvePeerMany(peerIds: InputPeerLike[]): Promise<(tl.TypeInputPeer | null)[]> + resolvePeerMany( + peerIds: InputPeerLike[]): Promise<(tl.TypeInputPeer | null)[]> /** * Get the `InputPeer` of a known peer id. @@ -5513,24 +5499,27 @@ export interface TelegramClient extends ITelegramClient { * @param peerId The peer identifier that you want to extract the `InputPeer` from. * @param [force=false] Whether to force re-fetch the peer from the server (only for usernames and phone numbers) */ - resolvePeer(peerId: InputPeerLike, force?: boolean): Promise + resolvePeer( + peerId: InputPeerLike, force?: boolean): Promise /** * Shorthand for `resolvePeer` that converts the input peer to `InputUser`. * **Available**: ✅ both users and bots * */ - resolveUser(peerId: InputPeerLike, force?: boolean): Promise + resolveUser( + peerId: InputPeerLike, force?: boolean): Promise /** * Shorthand for `resolvePeer` that converts the input peer to `InputChannel`. * **Available**: ✅ both users and bots * */ - resolveChannel(peerId: InputPeerLike, force?: boolean): Promise + resolveChannel( + peerId: InputPeerLike, force?: boolean): Promise /** * Changes the current default value of the Time-To-Live setting, * applied to all new chats. * - * **Available**: ✅ both users and bots + * **Available**: 👤 users only * * @param period New TTL period, in seconds (or 0 to disable) */ @@ -5543,14 +5532,13 @@ export interface TelegramClient extends ITelegramClient { */ setMyBirthday( birthday: { - /** Birthday day */ + /** Birthday day */ day: number /** Birthday month */ month: number /** Birthday year (optional) */ year?: number - } | null, - ): Promise + } | null): Promise /** * Set an emoji status for the current user * @@ -5561,12 +5549,11 @@ export interface TelegramClient extends ITelegramClient { setMyEmojiStatus( emoji: tl.Long | null, params?: { - /** - * Date when the emoji status should expire (only if `emoji` is not `null`) - */ + /** + * Date when the emoji status should expire (only if `emoji` is not `null`) + */ until?: number | Date - }, - ): Promise + }): Promise /** * Set a new profile photo or video for the current user. * @@ -5574,14 +5561,15 @@ export interface TelegramClient extends ITelegramClient { * **Available**: ✅ both users and bots * */ - setMyProfilePhoto(params: { + setMyProfilePhoto( + params: { /** Media type (photo or video) */ - type: 'photo' | 'video' - /** Input media file */ - media: InputFileLike | tl.TypeInputPhoto - /** When `type = video`, timestamp in seconds which will be shown as a static preview. */ - previewSec?: number - }): Promise + type: 'photo' | 'video' + /** Input media file */ + media: InputFileLike | tl.TypeInputPhoto + /** When `type = video`, timestamp in seconds which will be shown as a static preview. */ + previewSec?: number + }): Promise /** * Change username of the current user. * @@ -5618,22 +5606,23 @@ export interface TelegramClient extends ITelegramClient { * * @param params */ - updateProfile(params: { + updateProfile( + params: { /** * New first name */ - firstName?: string + firstName?: string - /** - * New last name. Pass `''` (empty string) to remove it - */ - lastName?: string + /** + * New last name. Pass `''` (empty string) to remove it + */ + lastName?: string - /** - * New bio (max 70 chars). Pass `''` (empty string) to remove it - */ - bio?: string - }): Promise + /** + * New bio (max 70 chars). Pass `''` (empty string) to remove it + */ + bio?: string + }): Promise } export type { TelegramClientOptions } @@ -5644,7 +5633,6 @@ export class TelegramClient extends EventEmitter implements ITelegramClient { _client: ITelegramClient constructor(opts: TelegramClientOptions) { super() - if ('client' in opts) { this._client = opts.client } else { @@ -5688,11 +5676,11 @@ export class TelegramClient extends EventEmitter implements ITelegramClient { ) } } + withParams(params: RpcCallOptions): this { return withParams(this, params) } } - TelegramClient.prototype.checkPassword = function (...args) { return checkPassword(this._client, ...args) } @@ -6439,7 +6427,7 @@ TelegramClient.prototype.iterProfilePhotos = function (...args) { } // @ts-expect-error this kinda breaks typings for overloads, idc TelegramClient.prototype.resolvePeerMany = function (...args) { - // @ts-expect-error this kinda breaks typings for overloads, idc +// @ts-expect-error this kinda breaks typings for overloads, idc return resolvePeerMany(this._client, ...args) } TelegramClient.prototype.resolvePeer = function (...args) { diff --git a/packages/core/src/highlevel/client.types.ts b/packages/core/src/highlevel/client.types.ts index f7ee9886..b3bcf58a 100644 --- a/packages/core/src/highlevel/client.types.ts +++ b/packages/core/src/highlevel/client.types.ts @@ -1,8 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import type { ConnectionKind, RpcCallOptions } from '../network/index.js' import type { MustEqual, PublicPart } from '../types/utils.js' import type { Logger } from '../utils/logger.js' + import type { AppConfigManager } from './managers/app-config-manager.js' import type { TelegramStorageManager } from './storage/storage.js' import type { RawUpdateHandler } from './updates/types.js' @@ -58,7 +59,7 @@ export interface ITelegramClient { onUpdate(handler: RawUpdateHandler): void onConnectionState(handler: (state: ConnectionState) => void): void - getApiCrenetials(): Promise<{ id: number; hash: string }> + getApiCrenetials(): Promise<{ id: number, hash: string }> // todo - this is only used for file dl/ul, which should probably be moved // to the client to allow moving the thing to worker // or at least load this once at startup (and then these methods can be made sync) diff --git a/packages/core/src/highlevel/managers/app-config-manager.ts b/packages/core/src/highlevel/managers/app-config-manager.ts index 6c81764e..fe1bfcdd 100644 --- a/packages/core/src/highlevel/managers/app-config-manager.ts +++ b/packages/core/src/highlevel/managers/app-config-manager.ts @@ -1,10 +1,10 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtTypeAssertionError } from '../../types/errors.js' import { Reloadable } from '../../utils/reloadable.js' import { tlJsonToJson } from '../../utils/tl-json.js' -import { BaseTelegramClient } from '../base.js' -import { AppConfigSchema } from '../types/misc/app-config.js' +import type { BaseTelegramClient } from '../base.js' +import type { AppConfigSchema } from '../types/misc/app-config.js' export class AppConfigManager { constructor(private client: BaseTelegramClient) {} diff --git a/packages/core/src/highlevel/methods.ts b/packages/core/src/highlevel/methods.ts index ac341b44..ca8761f4 100644 --- a/packages/core/src/highlevel/methods.ts +++ b/packages/core/src/highlevel/methods.ts @@ -1,18 +1,18 @@ /* THIS FILE WAS AUTO-GENERATED */ export { checkPassword } from './methods/auth/check-password.js' export { getPasswordHint } from './methods/auth/get-password-hint.js' -export type { LogOutResult } from './methods/auth/log-out.js' export { logOut } from './methods/auth/log-out.js' +export type { LogOutResult } from './methods/auth/log-out.js' export { recoverPassword } from './methods/auth/recover-password.js' export { resendCode } from './methods/auth/resend-code.js' export { run } from './methods/auth/run.js' export { sendCode } from './methods/auth/send-code.js' export { sendRecoveryCode } from './methods/auth/send-recovery-code.js' -export { signIn } from './methods/auth/sign-in.js' export { signInBot } from './methods/auth/sign-in-bot.js' export { signInQr } from './methods/auth/sign-in-qr.js' -export { start } from './methods/auth/start.js' +export { signIn } from './methods/auth/sign-in.js' export { startTest } from './methods/auth/start-test.js' +export { start } from './methods/auth/start.js' export { isSelfPeer } from './methods/auth/utils.js' export { answerCallbackQuery } from './methods/bots/answer-callback-query.js' export { answerInlineQuery } from './methods/bots/answer-inline-query.js' @@ -34,8 +34,8 @@ export { addChatMembers } from './methods/chats/add-chat-members.js' export { archiveChats } from './methods/chats/archive-chats.js' export { banChatMember } from './methods/chats/ban-chat-member.js' export { createChannel } from './methods/chats/create-channel.js' -export type { CreateGroupResult } from './methods/chats/create-group.js' export { createGroup } from './methods/chats/create-group.js' +export type { CreateGroupResult } from './methods/chats/create-group.js' export { createSupergroup } from './methods/chats/create-supergroup.js' export { deleteChannel } from './methods/chats/delete-channel.js' export { deleteChatPhoto } from './methods/chats/delete-chat-photo.js' @@ -43,11 +43,11 @@ export { deleteGroup } from './methods/chats/delete-group.js' export { deleteHistory } from './methods/chats/delete-history.js' export { deleteUserHistory } from './methods/chats/delete-user-history.js' export { editAdminRights } from './methods/chats/edit-admin-rights.js' -export { getChat } from './methods/chats/get-chat.js' export { getChatEventLog } from './methods/chats/get-chat-event-log.js' export { getChatMember } from './methods/chats/get-chat-member.js' export { getChatMembers } from './methods/chats/get-chat-members.js' export { getChatPreview } from './methods/chats/get-chat-preview.js' +export { getChat } from './methods/chats/get-chat.js' export { getFullChat } from './methods/chats/get-full-chat.js' export { getNearbyChats } from './methods/chats/get-nearby-chats.js' export { getSimilarChannels } from './methods/chats/get-similar-channels.js' @@ -101,22 +101,22 @@ export { uploadMedia } from './methods/files/upload-media.js' export { createForumTopic } from './methods/forums/create-forum-topic.js' export { deleteForumTopicHistory } from './methods/forums/delete-forum-topic-history.js' export { editForumTopic } from './methods/forums/edit-forum-topic.js' -export type { GetForumTopicsOffset } from './methods/forums/get-forum-topics.js' -export { getForumTopics } from './methods/forums/get-forum-topics.js' export { getForumTopicsById } from './methods/forums/get-forum-topics-by-id.js' +export { getForumTopics } from './methods/forums/get-forum-topics.js' +export type { GetForumTopicsOffset } from './methods/forums/get-forum-topics.js' export { iterForumTopics } from './methods/forums/iter-forum-topics.js' export { reorderPinnedForumTopics } from './methods/forums/reorder-pinned-forum-topics.js' -export { toggleForum } from './methods/forums/toggle-forum.js' export { toggleForumTopicClosed } from './methods/forums/toggle-forum-topic-closed.js' export { toggleForumTopicPinned } from './methods/forums/toggle-forum-topic-pinned.js' +export { toggleForum } from './methods/forums/toggle-forum.js' export { toggleGeneralTopicHidden } from './methods/forums/toggle-general-topic-hidden.js' export { createInviteLink } from './methods/invite-links/create-invite-link.js' export { editInviteLink } from './methods/invite-links/edit-invite-link.js' export { exportInviteLink } from './methods/invite-links/export-invite-link.js' -export { getInviteLink } from './methods/invite-links/get-invite-link.js' export { getInviteLinkMembers } from './methods/invite-links/get-invite-link-members.js' -export type { GetInviteLinksOffset } from './methods/invite-links/get-invite-links.js' +export { getInviteLink } from './methods/invite-links/get-invite-link.js' export { getInviteLinks } from './methods/invite-links/get-invite-links.js' +export type { GetInviteLinksOffset } from './methods/invite-links/get-invite-links.js' export { getPrimaryInviteLink } from './methods/invite-links/get-primary-invite-link.js' export { hideAllJoinRequests } from './methods/invite-links/hide-all-join-requests.js' export { hideJoinRequest } from './methods/invite-links/hide-join-request.js' @@ -124,30 +124,30 @@ export { iterInviteLinkMembers } from './methods/invite-links/iter-invite-link-m export { iterInviteLinks } from './methods/invite-links/iter-invite-links.js' export { revokeInviteLink } from './methods/invite-links/revoke-invite-link.js' export { closePoll } from './methods/messages/close-poll.js' -export type { DeleteMessagesParams } from './methods/messages/delete-messages.js' export { deleteMessagesById } from './methods/messages/delete-messages.js' +export type { DeleteMessagesParams } from './methods/messages/delete-messages.js' export { deleteMessages } from './methods/messages/delete-messages.js' export { deleteScheduledMessages } from './methods/messages/delete-scheduled-messages.js' export { editInlineMessage } from './methods/messages/edit-inline-message.js' export { editMessage } from './methods/messages/edit-message.js' -export type { ForwardMessageOptions } from './methods/messages/forward-messages.js' export { forwardMessagesById } from './methods/messages/forward-messages.js' +export type { ForwardMessageOptions } from './methods/messages/forward-messages.js' export { forwardMessages } from './methods/messages/forward-messages.js' export { getAllScheduledMessages } from './methods/messages/get-all-scheduled-messages.js' export { getAvailableMessageEffects } from './methods/messages/get-available-effects.js' export { getCallbackQueryMessage } from './methods/messages/get-callback-query-message.js' export { getDiscussionMessage } from './methods/messages/get-discussion-message.js' export { getFactCheck } from './methods/messages/get-fact-check.js' -export type { GetHistoryOffset } from './methods/messages/get-history.js' export { getHistory } from './methods/messages/get-history.js' +export type { GetHistoryOffset } from './methods/messages/get-history.js' export { getMessageByLink } from './methods/messages/get-message-by-link.js' export { getMessageGroup } from './methods/messages/get-message-group.js' export { getMessageReactionsById } from './methods/messages/get-message-reactions.js' export { getMessageReactions } from './methods/messages/get-message-reactions.js' -export { getMessages } from './methods/messages/get-messages.js' export { getMessagesUnsafe } from './methods/messages/get-messages-unsafe.js' -export type { GetReactionUsersOffset } from './methods/messages/get-reaction-users.js' +export { getMessages } from './methods/messages/get-messages.js' export { getReactionUsers } from './methods/messages/get-reaction-users.js' +export type { GetReactionUsersOffset } from './methods/messages/get-reaction-users.js' export { getReplyTo } from './methods/messages/get-reply-to.js' export { getScheduledMessages } from './methods/messages/get-scheduled-messages.js' export { iterHistory } from './methods/messages/iter-history.js' @@ -157,27 +157,27 @@ export { iterSearchMessages } from './methods/messages/iter-search-messages.js' export { pinMessage } from './methods/messages/pin-message.js' export { readHistory } from './methods/messages/read-history.js' export { readReactions } from './methods/messages/read-reactions.js' -export type { SearchGlobalOffset } from './methods/messages/search-global.js' export { searchGlobal } from './methods/messages/search-global.js' -export type { SearchHashtagOffset } from './methods/messages/search-hashtag.js' +export type { SearchGlobalOffset } from './methods/messages/search-global.js' export { searchHashtag } from './methods/messages/search-hashtag.js' +export type { SearchHashtagOffset } from './methods/messages/search-hashtag.js' export { iterSearchHashtag } from './methods/messages/search-hashtag.js' -export type { SearchMessagesOffset } from './methods/messages/search-messages.js' export { searchMessages } from './methods/messages/search-messages.js' +export type { SearchMessagesOffset } from './methods/messages/search-messages.js' export { answerText } from './methods/messages/send-answer.js' export { answerMedia } from './methods/messages/send-answer.js' export { answerMediaGroup } from './methods/messages/send-answer.js' export { commentText } from './methods/messages/send-comment.js' export { commentMedia } from './methods/messages/send-comment.js' export { commentMediaGroup } from './methods/messages/send-comment.js' -export type { SendCopyParams } from './methods/messages/send-copy.js' -export { sendCopy } from './methods/messages/send-copy.js' -export type { SendCopyGroupParams } from './methods/messages/send-copy-group.js' export { sendCopyGroup } from './methods/messages/send-copy-group.js' -export { sendMedia } from './methods/messages/send-media.js' +export type { SendCopyGroupParams } from './methods/messages/send-copy-group.js' +export { sendCopy } from './methods/messages/send-copy.js' +export type { SendCopyParams } from './methods/messages/send-copy.js' export { sendMediaGroup } from './methods/messages/send-media-group.js' -export type { QuoteParamsFrom } from './methods/messages/send-quote.js' +export { sendMedia } from './methods/messages/send-media.js' export { quoteWithText } from './methods/messages/send-quote.js' +export type { QuoteParamsFrom } from './methods/messages/send-quote.js' export { quoteWithMedia } from './methods/messages/send-quote.js' export { quoteWithMediaGroup } from './methods/messages/send-quote.js' export { sendReaction } from './methods/messages/send-reaction.js' @@ -202,8 +202,8 @@ export { resendPasswordEmail } from './methods/password/password-email.js' export { cancelPasswordEmail } from './methods/password/password-email.js' export { removeCloudPassword } from './methods/password/remove-cloud-password.js' export { applyBoost } from './methods/premium/apply-boost.js' -export type { CanApplyBoostResult } from './methods/premium/can-apply-boost.js' export { canApplyBoost } from './methods/premium/can-apply-boost.js' +export type { CanApplyBoostResult } from './methods/premium/can-apply-boost.js' export { createBusinessChatLink } from './methods/premium/create-business-chat-link.js' export { editBusinessChatLink } from './methods/premium/edit-business-chat-link.js' export { deleteBusinessChatLink } from './methods/premium/edit-business-chat-link.js' @@ -227,8 +227,8 @@ export { moveStickerInSet } from './methods/stickers/move-sticker-in-set.js' export { replaceStickerInSet } from './methods/stickers/replace-sticker-in-set.js' export { setChatStickerSet } from './methods/stickers/set-chat-sticker-set.js' export { setStickerSetThumb } from './methods/stickers/set-sticker-set-thumb.js' -export type { CanSendStoryResult } from './methods/stories/can-send-story.js' export { canSendStory } from './methods/stories/can-send-story.js' +export type { CanSendStoryResult } from './methods/stories/can-send-story.js' export { deleteStories } from './methods/stories/delete-stories.js' export { editStory } from './methods/stories/edit-story.js' export { getAllStories } from './methods/stories/get-all-stories.js' @@ -245,8 +245,8 @@ export { iterProfileStories } from './methods/stories/iter-profile-stories.js' export { iterStoryViewers } from './methods/stories/iter-story-viewers.js' export { readStories } from './methods/stories/read-stories.js' export { reportStory } from './methods/stories/report-story.js' -export { sendStory } from './methods/stories/send-story.js' export { sendStoryReaction } from './methods/stories/send-story-reaction.js' +export { sendStory } from './methods/stories/send-story.js' export { togglePeerStoriesArchived } from './methods/stories/toggle-peer-stories-archived.js' export { toggleStoriesPinned } from './methods/stories/toggle-stories-pinned.js' export { blockUser } from './methods/users/block-user.js' @@ -261,10 +261,10 @@ export { getProfilePhoto } from './methods/users/get-profile-photo.js' export { getProfilePhotos } from './methods/users/get-profile-photos.js' export { getUsers } from './methods/users/get-users.js' export { iterProfilePhotos } from './methods/users/iter-profile-photos.js' +export { resolvePeerMany } from './methods/users/resolve-peer-many.js' export { resolvePeer } from './methods/users/resolve-peer.js' export { resolveUser } from './methods/users/resolve-peer.js' export { resolveChannel } from './methods/users/resolve-peer.js' -export { resolvePeerMany } from './methods/users/resolve-peer-many.js' export { setGlobalTtl } from './methods/users/set-global-ttl.js' export { setMyBirthday } from './methods/users/set-my-birthday.js' export { setMyEmojiStatus } from './methods/users/set-my-emoji-status.js' diff --git a/packages/core/src/highlevel/methods/README.md b/packages/core/src/highlevel/methods/README.md index fcb30f28..bf1c20c4 100644 --- a/packages/core/src/highlevel/methods/README.md +++ b/packages/core/src/highlevel/methods/README.md @@ -65,7 +65,7 @@ function _initializeAwesomeExtension(client: ITelegramClient) { ## `@exported` -Used as a first statement inside an exported function's body to indicate that +Used as a first statement inside an exported function's body to indicate that this exported type should be imported from the client Example: diff --git a/packages/core/src/highlevel/methods/_imports.ts b/packages/core/src/highlevel/methods/_imports.ts index 961b1069..8ca440f9 100644 --- a/packages/core/src/highlevel/methods/_imports.ts +++ b/packages/core/src/highlevel/methods/_imports.ts @@ -1,4 +1,4 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ +/* eslint-disable unused-imports/no-unused-imports */ // @copy import { tdFileId } from '@mtcute/file-id' @@ -37,10 +37,10 @@ import { ChatInviteLink, ChatInviteLinkMember, ChatJoinRequestUpdate, - ChatlistPreview, ChatMember, ChatMemberUpdate, ChatPreview, + ChatlistPreview, ChosenInlineResult, CollectibleInfo, DeleteBusinessMessageUpdate, @@ -77,8 +77,8 @@ import { ParametersSkip2, ParsedUpdate, PeerReaction, - PeersIndex, PeerStories, + PeersIndex, Photo, Poll, PollUpdate, @@ -100,8 +100,8 @@ import { TakeoutSession, TextWithEntities, TypingStatus, - UploadedFile, UploadFileLike, + UploadedFile, User, UserStatusUpdate, UserTypingUpdate, diff --git a/packages/core/src/highlevel/methods/_init.ts b/packages/core/src/highlevel/methods/_init.ts index aa8b0a6e..5e702d14 100644 --- a/packages/core/src/highlevel/methods/_init.ts +++ b/packages/core/src/highlevel/methods/_init.ts @@ -1,30 +1,31 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ - +import type { PartialOnly } from '../../types/index.js' +import { MtUnsupportedError } from '../../types/index.js' +import type { BaseTelegramClientOptions } from '../base.js' +import { BaseTelegramClient } from '../base.js' +import type { TelegramClient } from '../client.js' +import type { ITelegramClient } from '../client.types.js' // @copy -import { MtUnsupportedError, PartialOnly } from '../../types/index.js' -import { BaseTelegramClient, BaseTelegramClientOptions } from '../base.js' -import { TelegramClient } from '../client.js' -import { ITelegramClient } from '../client.types.js' -// @copy -import { ITelegramStorageProvider } from '../storage/provider.js' +import type { ITelegramStorageProvider } from '../storage/provider.js' // @copy import { Conversation } from '../types/conversation.js' // @copy -import { makeParsedUpdateHandler, ParsedUpdateHandlerParams } from '../updates/parsed.js' +import type { ParsedUpdateHandlerParams } from '../updates/parsed.js' +// @copy +import { makeParsedUpdateHandler } from '../updates/parsed.js' // @copy type TelegramClientOptions = ( | (PartialOnly, 'transport' | 'crypto'> & { - /** - * Storage to use for this client. - * - * If a string is passed, it will be used as - * a name for the default platform-specific storage provider to use. - * - * @default `"client.session"` - */ - storage?: string | ITelegramStorageProvider - }) + /** + * Storage to use for this client. + * + * If a string is passed, it will be used as + * a name for the default platform-specific storage provider to use. + * + * @default `"client.session"` + */ + storage?: string | ITelegramStorageProvider + }) | { client: ITelegramClient } ) & { /** diff --git a/packages/core/src/highlevel/methods/auth/check-password.ts b/packages/core/src/highlevel/methods/auth/check-password.ts index 12b1620a..3ee9c721 100644 --- a/packages/core/src/highlevel/methods/auth/check-password.ts +++ b/packages/core/src/highlevel/methods/auth/check-password.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { User } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { User } from '../../types/index.js' + import { _onAuthorization } from './utils.js' /** diff --git a/packages/core/src/highlevel/methods/auth/get-password-hint.ts b/packages/core/src/highlevel/methods/auth/get-password-hint.ts index 7cee79da..a123a375 100644 --- a/packages/core/src/highlevel/methods/auth/get-password-hint.ts +++ b/packages/core/src/highlevel/methods/auth/get-password-hint.ts @@ -1,4 +1,4 @@ -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' /** * Get your Two-Step Verification password hint. @@ -10,5 +10,5 @@ export function getPasswordHint(client: ITelegramClient): Promise .call({ _: 'account.getPassword', }) - .then((res) => res.hint ?? null) + .then(res => res.hint ?? null) } diff --git a/packages/core/src/highlevel/methods/auth/log-out.ts b/packages/core/src/highlevel/methods/auth/log-out.ts index 49630d57..9f49b012 100644 --- a/packages/core/src/highlevel/methods/auth/log-out.ts +++ b/packages/core/src/highlevel/methods/auth/log-out.ts @@ -1,4 +1,4 @@ -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' // @exported export interface LogOutResult { diff --git a/packages/core/src/highlevel/methods/auth/recover-password.ts b/packages/core/src/highlevel/methods/auth/recover-password.ts index 45a30ed0..c7a605a0 100644 --- a/packages/core/src/highlevel/methods/auth/recover-password.ts +++ b/packages/core/src/highlevel/methods/auth/recover-password.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { User } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { User } from '../../types/index.js' + import { _onAuthorization } from './utils.js' /** diff --git a/packages/core/src/highlevel/methods/auth/resend-code.ts b/packages/core/src/highlevel/methods/auth/resend-code.ts index da0c7d23..cba45976 100644 --- a/packages/core/src/highlevel/methods/auth/resend-code.ts +++ b/packages/core/src/highlevel/methods/auth/resend-code.ts @@ -1,5 +1,5 @@ import { assertTypeIs } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { SentCode } from '../../types/auth/sent-code.js' import { normalizePhoneNumber } from '../../utils/misc-utils.js' diff --git a/packages/core/src/highlevel/methods/auth/run.ts b/packages/core/src/highlevel/methods/auth/run.ts index 0409fd23..a1e8e33c 100644 --- a/packages/core/src/highlevel/methods/auth/run.ts +++ b/packages/core/src/highlevel/methods/auth/run.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { User } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { User } from '../../types/index.js' + import { start } from './start.js' /** @@ -21,5 +22,5 @@ export function run( ): void { start(client, params) .then(then) - .catch((err) => client.emitError(err)) + .catch(err => client.emitError(err)) } diff --git a/packages/core/src/highlevel/methods/auth/send-code.ts b/packages/core/src/highlevel/methods/auth/send-code.ts index be5fcf3a..b82a1e3c 100644 --- a/packages/core/src/highlevel/methods/auth/send-code.ts +++ b/packages/core/src/highlevel/methods/auth/send-code.ts @@ -1,7 +1,7 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertTypeIs } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { SentCode } from '../../types/auth/sent-code.js' import { normalizePhoneNumber } from '../../utils/misc-utils.js' diff --git a/packages/core/src/highlevel/methods/auth/send-recovery-code.ts b/packages/core/src/highlevel/methods/auth/send-recovery-code.ts index c6cab6f3..ea660e65 100644 --- a/packages/core/src/highlevel/methods/auth/send-recovery-code.ts +++ b/packages/core/src/highlevel/methods/auth/send-recovery-code.ts @@ -1,4 +1,4 @@ -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' /** * Send a code to email needed to recover your password @@ -10,5 +10,5 @@ export function sendRecoveryCode(client: ITelegramClient): Promise { .call({ _: 'auth.requestPasswordRecovery', }) - .then((res) => res.emailPattern) + .then(res => res.emailPattern) } diff --git a/packages/core/src/highlevel/methods/auth/sign-in-bot.ts b/packages/core/src/highlevel/methods/auth/sign-in-bot.ts index 4af5231f..d10d2334 100644 --- a/packages/core/src/highlevel/methods/auth/sign-in-bot.ts +++ b/packages/core/src/highlevel/methods/auth/sign-in-bot.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { User } from '../../types/peers/user.js' +import type { ITelegramClient } from '../../client.types.js' +import type { User } from '../../types/peers/user.js' + import { _onAuthorization } from './utils.js' /** diff --git a/packages/core/src/highlevel/methods/auth/sign-in-qr.ts b/packages/core/src/highlevel/methods/auth/sign-in-qr.ts index 0b9a1637..660353a8 100644 --- a/packages/core/src/highlevel/methods/auth/sign-in-qr.ts +++ b/packages/core/src/highlevel/methods/auth/sign-in-qr.ts @@ -1,13 +1,16 @@ import { tl } from '@mtcute/tl' import { getPlatform } from '../../../platform.js' -import { MaybePromise } from '../../../types/utils.js' -import { ControllablePromise, createControllablePromise } from '../../../utils/controllable-promise.js' +import type { MaybePromise } from '../../../types/utils.js' +import type { ControllablePromise } from '../../../utils/controllable-promise.js' +import { createControllablePromise } from '../../../utils/controllable-promise.js' import { sleepWithAbort } from '../../../utils/misc-utils.js' import { assertTypeIs } from '../../../utils/type-assertions.js' -import { ITelegramClient, ServerUpdateHandler } from '../../client.types.js' -import { MaybeDynamic, User } from '../../types/index.js' +import type { ITelegramClient, ServerUpdateHandler } from '../../client.types.js' +import type { MaybeDynamic } from '../../types/index.js' +import { User } from '../../types/index.js' import { resolveMaybeDynamic } from '../../utils/misc-utils.js' + import { checkPassword } from './check-password.js' // @available=user @@ -122,7 +125,7 @@ export async function signInQr( ) } catch (e) { if (tl.RpcError.is(e, 'SESSION_PASSWORD_NEEDED') && params.password) { - return handle2fa(params.password) + return await handle2fa(params.password) } throw e @@ -153,7 +156,7 @@ export async function signInQr( ) } catch (e) { if (tl.RpcError.is(e, 'SESSION_PASSWORD_NEEDED') && params.password) { - return handle2fa(params.password) + return await handle2fa(params.password) } throw e diff --git a/packages/core/src/highlevel/methods/auth/sign-in.ts b/packages/core/src/highlevel/methods/auth/sign-in.ts index b03b9cfd..13a7881b 100644 --- a/packages/core/src/highlevel/methods/auth/sign-in.ts +++ b/packages/core/src/highlevel/methods/auth/sign-in.ts @@ -1,6 +1,7 @@ -import { ITelegramClient } from '../../client.types.js' -import { User } from '../../types/peers/user.js' +import type { ITelegramClient } from '../../client.types.js' +import type { User } from '../../types/peers/user.js' import { normalizePhoneNumber } from '../../utils/misc-utils.js' + import { _onAuthorization } from './utils.js' /** diff --git a/packages/core/src/highlevel/methods/auth/start-test.ts b/packages/core/src/highlevel/methods/auth/start-test.ts index 6ea020d5..ec2d53eb 100644 --- a/packages/core/src/highlevel/methods/auth/start-test.ts +++ b/packages/core/src/highlevel/methods/auth/start-test.ts @@ -1,6 +1,7 @@ import { MtArgumentError } from '../../../types/errors.js' -import { ITelegramClient } from '../../client.types.js' -import { User } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { User } from '../../types/index.js' + import { logOut } from './log-out.js' import { start } from './start.js' @@ -42,14 +43,14 @@ export async function startTest( if (params.logout) { try { await logOut(client) - } catch (e) {} + } catch {} } const availableDcs = await client .call({ _: 'help.getConfig', }) - .then((res) => res.dcOptions) + .then(res => res.dcOptions) let phone = params.phone @@ -57,16 +58,16 @@ export async function startTest( if (!phone.match(/^99966\d{5}/)) { throw new MtArgumentError(`${phone} is an invalid test phone number`) } - const id = parseInt(phone[5]) + const id = Number.parseInt(phone[5]) - if (!availableDcs.find((dc) => dc.id === id)) { + if (!availableDcs.find(dc => dc.id === id)) { throw new MtArgumentError(`${phone} has invalid DC ID (${id})`) } } else { let dcId = await client.getPrimaryDcId() if (params.dcId) { - if (!availableDcs.find((dc) => dc.id === params.dcId)) { + if (!availableDcs.find(dc => dc.id === params.dcId)) { throw new MtArgumentError(`DC ID is invalid (${dcId})`) } dcId = params.dcId diff --git a/packages/core/src/highlevel/methods/auth/start.ts b/packages/core/src/highlevel/methods/auth/start.ts index be856665..8a43c764 100644 --- a/packages/core/src/highlevel/methods/auth/start.ts +++ b/packages/core/src/highlevel/methods/auth/start.ts @@ -2,14 +2,15 @@ import { tl } from '@mtcute/tl' import { MtArgumentError, MtcuteError } from '../../../types/errors.js' -import { MaybePromise } from '../../../types/utils.js' -import { ITelegramClient } from '../../client.types.js' -import { SentCode } from '../../types/auth/sent-code.js' -import { User } from '../../types/peers/user.js' -import { MaybeDynamic } from '../../types/utils.js' +import type { MaybePromise } from '../../../types/utils.js' +import type { ITelegramClient } from '../../client.types.js' +import type { SentCode } from '../../types/auth/sent-code.js' +import type { User } from '../../types/peers/user.js' +import type { MaybeDynamic } from '../../types/utils.js' import { normalizePhoneNumber, resolveMaybeDynamic } from '../../utils/misc-utils.js' -import { StringSessionData } from '../../utils/string-session.js' +import type { StringSessionData } from '../../utils/string-session.js' import { getMe } from '../users/get-me.js' + import { checkPassword } from './check-password.js' import { resendCode } from './resend-code.js' import { sendCode } from './send-code.js' @@ -163,7 +164,7 @@ export async function start( throw new MtArgumentError('Either bot token or phone number must be provided') } - return await signInBot(client, botToken) + return signInBot(client, botToken) } try { @@ -219,10 +220,10 @@ export async function start( has2fa = true break } else if ( - e.is('PHONE_CODE_EMPTY') || - e.is('PHONE_CODE_EXPIRED') || - e.is('PHONE_CODE_INVALID') || - e.is('PHONE_CODE_HASH_EMPTY') + e.is('PHONE_CODE_EMPTY') + || e.is('PHONE_CODE_EXPIRED') + || e.is('PHONE_CODE_INVALID') + || e.is('PHONE_CODE_HASH_EMPTY') ) { if (typeof params.code !== 'function') { throw new MtArgumentError('Provided code was invalid') @@ -235,7 +236,9 @@ export async function start( } continue - } else throw e + } else { + throw e + } } // if there was no error, code was valid, so it's either 2fa or signup @@ -265,18 +268,20 @@ export async function start( console.log('Invalid password. Please try again') } continue - } else throw e + } else { + throw e + } } } } if (params.qrCodeHandler) { - return await signInQr(client, { + return signInQr(client, { onUrlUpdated: params.qrCodeHandler, password: params.password, - invalidPasswordCallback: params.invalidCodeCallback ? - () => params.invalidCodeCallback!('password') : - undefined, + invalidPasswordCallback: params.invalidCodeCallback + ? () => params.invalidCodeCallback!('password') + : undefined, abortSignal, }) } diff --git a/packages/core/src/highlevel/methods/auth/utils.ts b/packages/core/src/highlevel/methods/auth/utils.ts index 8e02ec65..45f4834c 100644 --- a/packages/core/src/highlevel/methods/auth/utils.ts +++ b/packages/core/src/highlevel/methods/auth/utils.ts @@ -1,6 +1,6 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { User } from '../../types/peers/user.js' /** @internal */ diff --git a/packages/core/src/highlevel/methods/bots/answer-callback-query.ts b/packages/core/src/highlevel/methods/bots/answer-callback-query.ts index 19a5ea03..78b3aafe 100644 --- a/packages/core/src/highlevel/methods/bots/answer-callback-query.ts +++ b/packages/core/src/highlevel/methods/bots/answer-callback-query.ts @@ -1,8 +1,8 @@ import Long from 'long' import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { CallbackQuery } from '../../types/updates/callback-query.js' +import type { ITelegramClient } from '../../client.types.js' +import type { CallbackQuery } from '../../types/updates/callback-query.js' /** * Send an answer to a callback query. diff --git a/packages/core/src/highlevel/methods/bots/answer-inline-query.ts b/packages/core/src/highlevel/methods/bots/answer-inline-query.ts index 631be8fc..25e20e5a 100644 --- a/packages/core/src/highlevel/methods/bots/answer-inline-query.ts +++ b/packages/core/src/highlevel/methods/bots/answer-inline-query.ts @@ -1,10 +1,10 @@ import Long from 'long' +import type { tl } from '@mtcute/tl' -import { tl } from '@mtcute/tl' - -import { ITelegramClient } from '../../client.types.js' -import { BotInline, InputInlineResult } from '../../types/bots/index.js' -import { InlineQuery } from '../../types/updates/inline-query.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputInlineResult } from '../../types/bots/index.js' +import { BotInline } from '../../types/bots/index.js' +import type { InlineQuery } from '../../types/updates/inline-query.js' /** * Answer an inline query. @@ -114,19 +114,19 @@ export async function answerInlineQuery( gallery: gallery ?? defaultGallery, private: priv, nextOffset, - switchPm: switchPm ? - { + switchPm: switchPm + ? { _: 'inlineBotSwitchPM', text: switchPm.text, startParam: switchPm.parameter, - } : - undefined, - switchWebview: switchWebview ? - { + } + : undefined, + switchWebview: switchWebview + ? { _: 'inlineBotWebView', text: switchWebview.text, url: switchWebview.url, - } : - undefined, + } + : undefined, }) } diff --git a/packages/core/src/highlevel/methods/bots/answer-pre-checkout-query.ts b/packages/core/src/highlevel/methods/bots/answer-pre-checkout-query.ts index 2b4740fe..22f81bb8 100644 --- a/packages/core/src/highlevel/methods/bots/answer-pre-checkout-query.ts +++ b/packages/core/src/highlevel/methods/bots/answer-pre-checkout-query.ts @@ -1,9 +1,8 @@ import Long from 'long' - -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import type { PreCheckoutQuery } from '../../types/updates/pre-checkout-query.js' /** diff --git a/packages/core/src/highlevel/methods/bots/delete-my-commands.ts b/packages/core/src/highlevel/methods/bots/delete-my-commands.ts index 4926ba85..25f2174a 100644 --- a/packages/core/src/highlevel/methods/bots/delete-my-commands.ts +++ b/packages/core/src/highlevel/methods/bots/delete-my-commands.ts @@ -1,7 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' + +import type { ITelegramClient } from '../../client.types.js' +import type { BotCommands } from '../../types/index.js' -import { ITelegramClient } from '../../client.types.js' -import { BotCommands } from '../../types/index.js' import { _normalizeCommandScope } from './normalize-command-scope.js' /** @@ -27,9 +28,9 @@ export async function deleteMyCommands( langCode?: string }, ): Promise { - const scope: tl.TypeBotCommandScope = params?.scope ? - await _normalizeCommandScope(client, params.scope) : - { + const scope: tl.TypeBotCommandScope = params?.scope + ? await _normalizeCommandScope(client, params.scope) + : { _: 'botCommandScopeDefault', } diff --git a/packages/core/src/highlevel/methods/bots/get-bot-info.ts b/packages/core/src/highlevel/methods/bots/get-bot-info.ts index b5ba3777..02906350 100644 --- a/packages/core/src/highlevel/methods/bots/get-bot-info.ts +++ b/packages/core/src/highlevel/methods/bots/get-bot-info.ts @@ -1,7 +1,7 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolveUser } from '../users/resolve-peer.js' /** @@ -28,6 +28,6 @@ export async function getBotInfo( return client.call({ _: 'bots.getBotInfo', bot: bot ? await resolveUser(client, bot) : undefined, - langCode: langCode, + langCode, }) } diff --git a/packages/core/src/highlevel/methods/bots/get-bot-menu-button.ts b/packages/core/src/highlevel/methods/bots/get-bot-menu-button.ts index 9b9fb255..2f251490 100644 --- a/packages/core/src/highlevel/methods/bots/get-bot-menu-button.ts +++ b/packages/core/src/highlevel/methods/bots/get-bot-menu-button.ts @@ -1,14 +1,14 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolveUser } from '../users/resolve-peer.js' /** * Fetches the menu button set for the given user. */ export async function getBotMenuButton(client: ITelegramClient, user: InputPeerLike): Promise { - return await client.call({ + return client.call({ _: 'bots.getBotMenuButton', userId: await resolveUser(client, user), }) diff --git a/packages/core/src/highlevel/methods/bots/get-callback-answer.ts b/packages/core/src/highlevel/methods/bots/get-callback-answer.ts index bb0c30c9..761695f9 100644 --- a/packages/core/src/highlevel/methods/bots/get-callback-answer.ts +++ b/packages/core/src/highlevel/methods/bots/get-callback-answer.ts @@ -1,8 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { getPlatform } from '../../../platform.js' -import { ITelegramClient } from '../../client.types.js' -import { InputMessageId, normalizeInputMessageId } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputMessageId } from '../../types/index.js' +import { normalizeInputMessageId } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** @@ -53,7 +54,7 @@ export async function getCallbackAnswer( const { chatId, message } = normalizeInputMessageId(params) const { data, game, timeout = 10000, fireAndForget } = params - let password: tl.TypeInputCheckPasswordSRP | undefined = undefined + let password: tl.TypeInputCheckPasswordSRP | undefined if (params?.password) { const pwd = await client.call({ _: 'account.getPassword' }) @@ -67,7 +68,7 @@ export async function getCallbackAnswer( msgId: message, data: typeof data === 'string' ? getPlatform().utf8Encode(data) : data, password, - game: game, + game, }, { timeout, throw503: true }, ) diff --git a/packages/core/src/highlevel/methods/bots/get-game-high-scores.ts b/packages/core/src/highlevel/methods/bots/get-game-high-scores.ts index 9efde994..3431095b 100644 --- a/packages/core/src/highlevel/methods/bots/get-game-high-scores.ts +++ b/packages/core/src/highlevel/methods/bots/get-game-high-scores.ts @@ -1,7 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { ITelegramClient } from '../../client.types.js' -import { GameHighScore, InputMessageId, InputPeerLike, normalizeInputMessageId, PeersIndex } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputMessageId, InputPeerLike } from '../../types/index.js' +import { GameHighScore, PeersIndex, normalizeInputMessageId } from '../../types/index.js' import { normalizeInlineId } from '../../utils/inline-utils.js' import { resolvePeer, resolveUser } from '../users/resolve-peer.js' @@ -37,7 +38,7 @@ export async function getGameHighScores( const peers = PeersIndex.from(res) - return res.scores.map((score) => new GameHighScore(score, peers)) + return res.scores.map(score => new GameHighScore(score, peers)) } /** @@ -72,5 +73,5 @@ export async function getInlineGameHighScores( const peers = PeersIndex.from(res) - return res.scores.map((score) => new GameHighScore(score, peers)) + return res.scores.map(score => new GameHighScore(score, peers)) } diff --git a/packages/core/src/highlevel/methods/bots/get-my-commands.ts b/packages/core/src/highlevel/methods/bots/get-my-commands.ts index af933e56..a9e0a360 100644 --- a/packages/core/src/highlevel/methods/bots/get-my-commands.ts +++ b/packages/core/src/highlevel/methods/bots/get-my-commands.ts @@ -1,7 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' + +import type { ITelegramClient } from '../../client.types.js' +import type { BotCommands } from '../../types/index.js' -import { ITelegramClient } from '../../client.types.js' -import { BotCommands } from '../../types/index.js' import { _normalizeCommandScope } from './normalize-command-scope.js' /** @@ -28,9 +29,9 @@ export async function getMyCommands( ): Promise { return client.call({ _: 'bots.getBotCommands', - scope: params?.scope ? - await _normalizeCommandScope(client, params.scope) : - { + scope: params?.scope + ? await _normalizeCommandScope(client, params.scope) + : { _: 'botCommandScopeDefault', }, langCode: params?.langCode ?? '', diff --git a/packages/core/src/highlevel/methods/bots/normalize-command-scope.ts b/packages/core/src/highlevel/methods/bots/normalize-command-scope.ts index 67a931d4..fe03d1f9 100644 --- a/packages/core/src/highlevel/methods/bots/normalize-command-scope.ts +++ b/packages/core/src/highlevel/methods/bots/normalize-command-scope.ts @@ -1,8 +1,8 @@ import { tl } from '@mtcute/tl' import { assertNever } from '../../../types/utils.js' -import { ITelegramClient } from '../../client.types.js' -import { BotCommands } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { BotCommands } from '../../types/index.js' import { resolvePeer, resolveUser } from '../users/resolve-peer.js' /** @internal */ diff --git a/packages/core/src/highlevel/methods/bots/set-bot-info.ts b/packages/core/src/highlevel/methods/bots/set-bot-info.ts index d27462c0..ca259ec8 100644 --- a/packages/core/src/highlevel/methods/bots/set-bot-info.ts +++ b/packages/core/src/highlevel/methods/bots/set-bot-info.ts @@ -1,6 +1,6 @@ import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolveUser } from '../users/resolve-peer.js' /** @@ -36,7 +36,7 @@ export async function setBotInfo( const r = await client.call({ _: 'bots.setBotInfo', bot: bot ? await resolveUser(client, bot) : undefined, - langCode: langCode, + langCode, name, about: bio, description, diff --git a/packages/core/src/highlevel/methods/bots/set-bot-menu-button.ts b/packages/core/src/highlevel/methods/bots/set-bot-menu-button.ts index e1beca7a..41262559 100644 --- a/packages/core/src/highlevel/methods/bots/set-bot-menu-button.ts +++ b/packages/core/src/highlevel/methods/bots/set-bot-menu-button.ts @@ -1,8 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolveUser } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/bots/set-game-score.ts b/packages/core/src/highlevel/methods/bots/set-game-score.ts index 21178ebe..dabe68de 100644 --- a/packages/core/src/highlevel/methods/bots/set-game-score.ts +++ b/packages/core/src/highlevel/methods/bots/set-game-score.ts @@ -1,8 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputMessageId, InputPeerLike, Message, normalizeInputMessageId } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputMessageId, InputPeerLike, Message } from '../../types/index.js' +import { normalizeInputMessageId } from '../../types/index.js' import { normalizeInlineId } from '../../utils/inline-utils.js' import { _findMessageInUpdate } from '../messages/find-in-update.js' import { resolvePeer, resolveUser } from '../users/resolve-peer.js' @@ -101,7 +102,7 @@ export async function setInlineGameScore( userId: user, score, editMessage: !noEdit, - force: force, + force, }, { dcId: id.dcId }, ) diff --git a/packages/core/src/highlevel/methods/bots/set-my-commands.ts b/packages/core/src/highlevel/methods/bots/set-my-commands.ts index a19124b5..f2f862d3 100644 --- a/packages/core/src/highlevel/methods/bots/set-my-commands.ts +++ b/packages/core/src/highlevel/methods/bots/set-my-commands.ts @@ -1,8 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { BotCommands } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { BotCommands } from '../../types/index.js' + import { _normalizeCommandScope } from './normalize-command-scope.js' /** @@ -33,9 +34,9 @@ export async function setMyCommands( langCode?: string }, ): Promise { - const scope: tl.TypeBotCommandScope = params.scope ? - await _normalizeCommandScope(client, params.scope) : - { + const scope: tl.TypeBotCommandScope = params.scope + ? await _normalizeCommandScope(client, params.scope) + : { _: 'botCommandScopeDefault', } diff --git a/packages/core/src/highlevel/methods/bots/set-my-default-rights.ts b/packages/core/src/highlevel/methods/bots/set-my-default-rights.ts index 96cac184..010a5d85 100644 --- a/packages/core/src/highlevel/methods/bots/set-my-default-rights.ts +++ b/packages/core/src/highlevel/methods/bots/set-my-default-rights.ts @@ -1,7 +1,7 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' /** * Sets the default chat permissions for the bot in the supergroup or channel. diff --git a/packages/core/src/highlevel/methods/chats/add-chat-members.ts b/packages/core/src/highlevel/methods/chats/add-chat-members.ts index d4e00429..651f09be 100644 --- a/packages/core/src/highlevel/methods/chats/add-chat-members.ts +++ b/packages/core/src/highlevel/methods/chats/add-chat-members.ts @@ -1,8 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { MaybeArray } from '../../../types/utils.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, MtInvalidPeerTypeError } from '../../types/index.js' +import type { MaybeArray } from '../../../types/utils.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { MtInvalidPeerTypeError } from '../../types/index.js' import { isInputPeerChannel, isInputPeerChat, toInputChannel, toInputUser } from '../../utils/peer-utils.js' import { resolvePeer, resolveUser } from '../users/resolve-peer.js' import { resolvePeerMany } from '../users/resolve-peer-many.js' diff --git a/packages/core/src/highlevel/methods/chats/archive-chats.ts b/packages/core/src/highlevel/methods/chats/archive-chats.ts index 46482d3d..6421ba84 100644 --- a/packages/core/src/highlevel/methods/chats/archive-chats.ts +++ b/packages/core/src/highlevel/methods/chats/archive-chats.ts @@ -1,7 +1,7 @@ -import { MaybeArray } from '../../../types/utils.js' +import type { MaybeArray } from '../../../types/utils.js' import { isPresent } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolvePeerMany } from '../users/resolve-peer-many.js' /** @@ -16,7 +16,7 @@ export async function archiveChats(client: ITelegramClient, chats: MaybeArray ({ + folderPeers: resolvedPeers.filter(isPresent).map(peer => ({ _: 'inputFolderPeer', peer, folderId: 1, diff --git a/packages/core/src/highlevel/methods/chats/ban-chat-member.ts b/packages/core/src/highlevel/methods/chats/ban-chat-member.ts index 41760939..85252af4 100644 --- a/packages/core/src/highlevel/methods/chats/ban-chat-member.ts +++ b/packages/core/src/highlevel/methods/chats/ban-chat-member.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, Message, MtInvalidPeerTypeError } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike, Message } from '../../types/index.js' +import { MtInvalidPeerTypeError } from '../../types/index.js' import { isInputPeerChannel, isInputPeerChat, toInputChannel, toInputUser } from '../../utils/peer-utils.js' import { _findMessageInUpdate } from '../messages/find-in-update.js' import { resolvePeer } from '../users/resolve-peer.js' @@ -53,7 +54,9 @@ export async function banChatMember( chatId: chat.chatId, userId: toInputUser(peer), }) - } else throw new MtInvalidPeerTypeError(chatId, 'chat or channel') + } else { + throw new MtInvalidPeerTypeError(chatId, 'chat or channel') + } return _findMessageInUpdate(client, res, false, !shouldDispatch, true) } diff --git a/packages/core/src/highlevel/methods/chats/batched-queries.ts b/packages/core/src/highlevel/methods/chats/batched-queries.ts index 2e8eeed0..4732be15 100644 --- a/packages/core/src/highlevel/methods/chats/batched-queries.ts +++ b/packages/core/src/highlevel/methods/chats/batched-queries.ts @@ -1,7 +1,7 @@ import { tl } from '@mtcute/tl' import { MtArgumentError } from '../../../types/errors.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { isInputPeerChannel, isInputPeerChat, @@ -9,10 +9,11 @@ import { toInputChannel, toInputUser, } from '../../utils/peer-utils.js' +import type { BatchedQuery } from '../../utils/query-batcher.js' import { batchedQuery } from '../../utils/query-batcher.js' /** @internal */ -export const _getUsersBatched = batchedQuery({ +export const _getUsersBatched: BatchedQuery = batchedQuery({ fetch: (client, items) => client .call({ @@ -21,7 +22,7 @@ export const _getUsersBatched = batchedQuery res.filter((it) => it._ !== 'userEmpty')), + .then(res => res.filter(it => it._ !== 'userEmpty')), inputKey: (item, client) => { switch (item._) { case 'inputUser': @@ -33,7 +34,7 @@ export const _getUsersBatched = batchedQuery item.id, + outputKey: item => item.id, maxBatchSize: 50, maxConcurrent: 3, retrySingleOnError: (items, err) => { @@ -63,29 +64,32 @@ export const _getUsersBatched = batchedQuery({ +export const _getChatsBatched: BatchedQuery = batchedQuery({ fetch: (client, items) => client .call({ _: 'messages.getChats', id: items, }) - .then((res) => res.chats.filter((it): it is tl.RawChat => it._ === 'chat')), - inputKey: (id) => id, - outputKey: (item) => item.id, + .then(res => res.chats.filter((it): it is tl.RawChat => it._ === 'chat')), + inputKey: id => id, + outputKey: item => item.id, maxBatchSize: 50, maxConcurrent: 3, }) /** @internal */ -export const _getChannelsBatched = batchedQuery({ +export const _getChannelsBatched: BatchedQuery< + tl.TypeInputChannel, + tl.RawChannel | tl.RawChannelForbidden +> = batchedQuery({ fetch: (client, items) => client .call({ _: 'channels.getChannels', id: items, }) - .then((res) => + .then(res => res.chats.filter( (it): it is tl.RawChannel | tl.RawChannelForbidden => it._ === 'channel' || it._ === 'channelForbidden', @@ -100,7 +104,7 @@ export const _getChannelsBatched = batchedQuery item.id, + outputKey: item => item.id, maxBatchSize: 50, maxConcurrent: 3, retrySingleOnError: (items, err) => { diff --git a/packages/core/src/highlevel/methods/chats/create-channel.ts b/packages/core/src/highlevel/methods/chats/create-channel.ts index dbbea136..81ecfbdb 100644 --- a/packages/core/src/highlevel/methods/chats/create-channel.ts +++ b/packages/core/src/highlevel/methods/chats/create-channel.ts @@ -1,4 +1,4 @@ -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { Chat } from '../../types/index.js' import { assertIsUpdatesGroup } from '../../updates/utils.js' diff --git a/packages/core/src/highlevel/methods/chats/create-group.ts b/packages/core/src/highlevel/methods/chats/create-group.ts index 1b4b5591..a9801cdd 100644 --- a/packages/core/src/highlevel/methods/chats/create-group.ts +++ b/packages/core/src/highlevel/methods/chats/create-group.ts @@ -1,8 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { MaybeArray } from '../../../types/utils.js' -import { ITelegramClient } from '../../client.types.js' -import { Chat, InputPeerLike } from '../../types/index.js' +import type { MaybeArray } from '../../../types/utils.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { Chat } from '../../types/index.js' import { assertIsUpdatesGroup } from '../../updates/utils.js' import { toInputUser } from '../../utils/peer-utils.js' import { resolvePeerMany } from '../users/resolve-peer-many.js' diff --git a/packages/core/src/highlevel/methods/chats/create-supergroup.ts b/packages/core/src/highlevel/methods/chats/create-supergroup.ts index a11419d0..b2454578 100644 --- a/packages/core/src/highlevel/methods/chats/create-supergroup.ts +++ b/packages/core/src/highlevel/methods/chats/create-supergroup.ts @@ -1,4 +1,4 @@ -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { Chat } from '../../types/index.js' import { assertIsUpdatesGroup } from '../../updates/utils.js' diff --git a/packages/core/src/highlevel/methods/chats/delete-channel.ts b/packages/core/src/highlevel/methods/chats/delete-channel.ts index 8496e31b..43a3d8b2 100644 --- a/packages/core/src/highlevel/methods/chats/delete-channel.ts +++ b/packages/core/src/highlevel/methods/chats/delete-channel.ts @@ -1,5 +1,5 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolveChannel } from '../users/resolve-peer.js' // @alias=deleteSupergroup diff --git a/packages/core/src/highlevel/methods/chats/delete-chat-photo.ts b/packages/core/src/highlevel/methods/chats/delete-chat-photo.ts index 3098803e..5e8b76b9 100644 --- a/packages/core/src/highlevel/methods/chats/delete-chat-photo.ts +++ b/packages/core/src/highlevel/methods/chats/delete-chat-photo.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, MtInvalidPeerTypeError } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { MtInvalidPeerTypeError } from '../../types/index.js' import { isInputPeerChannel, isInputPeerChat, toInputChannel } from '../../utils/peer-utils.js' import { resolvePeer } from '../users/resolve-peer.js' @@ -26,7 +27,9 @@ export async function deleteChatPhoto(client: ITelegramClient, chatId: InputPeer channel: toInputChannel(chat), photo: { _: 'inputChatPhotoEmpty' }, }) - } else throw new MtInvalidPeerTypeError(chatId, 'chat or channel') + } else { + throw new MtInvalidPeerTypeError(chatId, 'chat or channel') + } client.handleClientUpdate(res) } diff --git a/packages/core/src/highlevel/methods/chats/delete-group.ts b/packages/core/src/highlevel/methods/chats/delete-group.ts index 5764c887..b38b7696 100644 --- a/packages/core/src/highlevel/methods/chats/delete-group.ts +++ b/packages/core/src/highlevel/methods/chats/delete-group.ts @@ -1,6 +1,7 @@ import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, MtInvalidPeerTypeError } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { MtInvalidPeerTypeError } from '../../types/index.js' import { isInputPeerChat } from '../../utils/peer-utils.js' import { resolvePeer } from '../users/resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/chats/delete-history.ts b/packages/core/src/highlevel/methods/chats/delete-history.ts index 97d0e4d3..1029630f 100644 --- a/packages/core/src/highlevel/methods/chats/delete-history.ts +++ b/packages/core/src/highlevel/methods/chats/delete-history.ts @@ -1,5 +1,5 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { createDummyUpdate } from '../../updates/utils.js' import { isInputPeerChannel } from '../../utils/peer-utils.js' import { resolvePeer } from '../users/resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/chats/delete-user-history.ts b/packages/core/src/highlevel/methods/chats/delete-user-history.ts index 1ff225fd..d7e7b54d 100644 --- a/packages/core/src/highlevel/methods/chats/delete-user-history.ts +++ b/packages/core/src/highlevel/methods/chats/delete-user-history.ts @@ -1,7 +1,7 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { createDummyUpdate } from '../../updates/utils.js' import { resolveChannel, resolvePeer } from '../users/resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/chats/edit-admin-rights.ts b/packages/core/src/highlevel/methods/chats/edit-admin-rights.ts index 1df177b2..d34df71a 100644 --- a/packages/core/src/highlevel/methods/chats/edit-admin-rights.ts +++ b/packages/core/src/highlevel/methods/chats/edit-admin-rights.ts @@ -1,7 +1,7 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolveChannel, resolveUser } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/chats/get-chat-event-log.ts b/packages/core/src/highlevel/methods/chats/get-chat-event-log.ts index 6dfbc4ae..92cdbe07 100644 --- a/packages/core/src/highlevel/methods/chats/get-chat-event-log.ts +++ b/packages/core/src/highlevel/methods/chats/get-chat-event-log.ts @@ -1,10 +1,11 @@ import Long from 'long' +import type { tl } from '@mtcute/tl' -import { tl } from '@mtcute/tl' - -import { ITelegramClient } from '../../client.types.js' -import { ChatEvent, InputPeerLike, PeersIndex } from '../../types/index.js' -import { InputChatEventFilters, normalizeChatEventFilters } from '../../types/peers/chat-event/filters.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { ChatEvent, PeersIndex } from '../../types/index.js' +import type { InputChatEventFilters } from '../../types/peers/chat-event/filters.js' +import { normalizeChatEventFilters } from '../../types/peers/chat-event/filters.js' import { toInputUser } from '../../utils/peer-utils.js' import { resolveChannel } from '../users/resolve-peer.js' import { resolvePeerMany } from '../users/resolve-peer-many.js' diff --git a/packages/core/src/highlevel/methods/chats/get-chat-member.ts b/packages/core/src/highlevel/methods/chats/get-chat-member.ts index 4c337184..784735b4 100644 --- a/packages/core/src/highlevel/methods/chats/get-chat-member.ts +++ b/packages/core/src/highlevel/methods/chats/get-chat-member.ts @@ -1,8 +1,9 @@ import { tl } from '@mtcute/tl' import { assertTypeIs } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { ChatMember, InputPeerLike, MtInvalidPeerTypeError, PeersIndex } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { ChatMember, MtInvalidPeerTypeError, PeersIndex } from '../../types/index.js' import { isInputPeerChannel, isInputPeerChat, isInputPeerUser, toInputChannel } from '../../utils/peer-utils.js' import { resolvePeer } from '../users/resolve-peer.js' @@ -39,15 +40,15 @@ export async function getChatMember( assertTypeIs('getChatMember (@ messages.getFullChat)', res.fullChat, 'chatFull') - const members = - res.fullChat.participants._ === 'chatParticipantsForbidden' ? [] : res.fullChat.participants.participants + const members + = res.fullChat.participants._ === 'chatParticipantsForbidden' ? [] : res.fullChat.participants.participants const peers = PeersIndex.from(res) for (const m of members) { if ( - (user._ === 'inputPeerSelf' && (peers.user(m.userId) as tl.RawUser).self) || - (user._ === 'inputPeerUser' && m.userId === user.userId) + (user._ === 'inputPeerSelf' && (peers.user(m.userId) as tl.RawUser).self) + || (user._ === 'inputPeerUser' && m.userId === user.userId) ) { return new ChatMember(m, peers) } @@ -72,5 +73,7 @@ export async function getChatMember( throw e } - } else throw new MtInvalidPeerTypeError(chatId, 'chat or channel') + } else { + throw new MtInvalidPeerTypeError(chatId, 'chat or channel') + } } diff --git a/packages/core/src/highlevel/methods/chats/get-chat-members.ts b/packages/core/src/highlevel/methods/chats/get-chat-members.ts index 998672f1..6784e4fb 100644 --- a/packages/core/src/highlevel/methods/chats/get-chat-members.ts +++ b/packages/core/src/highlevel/methods/chats/get-chat-members.ts @@ -1,11 +1,11 @@ import Long from 'long' - -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertNever } from '../../../types/utils.js' import { assertTypeIs } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { ArrayWithTotal, ChatMember, InputPeerLike, MtInvalidPeerTypeError, PeersIndex } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { ArrayWithTotal, InputPeerLike } from '../../types/index.js' +import { ChatMember, MtInvalidPeerTypeError, PeersIndex } from '../../types/index.js' import { makeArrayWithTotal } from '../../utils/index.js' import { isInputPeerChannel, isInputPeerChat, toInputChannel } from '../../utils/peer-utils.js' import { resolvePeer } from '../users/resolve-peer.js' @@ -78,15 +78,15 @@ export async function getChatMembers( assertTypeIs('getChatMember (@ messages.getFullChat)', res.fullChat, 'chatFull') - let members = - res.fullChat.participants._ === 'chatParticipantsForbidden' ? [] : res.fullChat.participants.participants + let members + = res.fullChat.participants._ === 'chatParticipantsForbidden' ? [] : res.fullChat.participants.participants if (offset) members = members.slice(offset) if (limit) members = members.slice(0, limit) const peers = PeersIndex.from(res) - const ret = members.map((m) => new ChatMember(m, peers)) + const ret = members.map(m => new ChatMember(m, peers)) return makeArrayWithTotal(ret, ret.length) } @@ -138,7 +138,7 @@ export async function getChatMembers( const peers = PeersIndex.from(res) - const ret = res.participants.map((i) => new ChatMember(i, peers)) + const ret = res.participants.map(i => new ChatMember(i, peers)) return makeArrayWithTotal(ret, res.count) } diff --git a/packages/core/src/highlevel/methods/chats/get-chat-preview.ts b/packages/core/src/highlevel/methods/chats/get-chat-preview.ts index 07c4f0d7..437afafc 100644 --- a/packages/core/src/highlevel/methods/chats/get-chat-preview.ts +++ b/packages/core/src/highlevel/methods/chats/get-chat-preview.ts @@ -1,5 +1,5 @@ import { MtArgumentError } from '../../../types/errors.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { ChatPreview, MtPeerNotFoundError } from '../../types/index.js' import { INVITE_LINK_REGEX } from '../../utils/peer-utils.js' diff --git a/packages/core/src/highlevel/methods/chats/get-chat.ts b/packages/core/src/highlevel/methods/chats/get-chat.ts index aaa51ccb..6947273c 100644 --- a/packages/core/src/highlevel/methods/chats/get-chat.ts +++ b/packages/core/src/highlevel/methods/chats/get-chat.ts @@ -1,8 +1,10 @@ import { MtArgumentError } from '../../../types/errors.js' -import { ITelegramClient } from '../../client.types.js' -import { Chat, InputPeerLike, MtPeerNotFoundError } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { Chat, MtPeerNotFoundError } from '../../types/index.js' import { INVITE_LINK_REGEX } from '../../utils/peer-utils.js' import { resolvePeer } from '../users/resolve-peer.js' + import { _getRawPeerBatched } from './batched-queries.js' // @available=both diff --git a/packages/core/src/highlevel/methods/chats/get-full-chat.ts b/packages/core/src/highlevel/methods/chats/get-full-chat.ts index 9c6e9a02..320b2fa6 100644 --- a/packages/core/src/highlevel/methods/chats/get-full-chat.ts +++ b/packages/core/src/highlevel/methods/chats/get-full-chat.ts @@ -1,8 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtArgumentError } from '../../../types/errors.js' -import { ITelegramClient } from '../../client.types.js' -import { FullChat, InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { FullChat } from '../../types/index.js' import { INVITE_LINK_REGEX, isInputPeerChannel, @@ -52,14 +53,16 @@ export async function getFullChat(client: ITelegramClient, chatId: InputPeerLike } else if (isInputPeerUser(peer)) { res = await client.call({ _: 'users.getFullUser', - id: toInputUser(peer)!, + id: toInputUser(peer), }) } else if (isInputPeerChat(peer)) { res = await client.call({ _: 'messages.getFullChat', chatId: peer.chatId, }) - } else throw new Error('should not happen') + } else { + throw new Error('should not happen') + } return FullChat._parse(res) } diff --git a/packages/core/src/highlevel/methods/chats/get-nearby-chats.ts b/packages/core/src/highlevel/methods/chats/get-nearby-chats.ts index 169b596f..ca9d25f1 100644 --- a/packages/core/src/highlevel/methods/chats/get-nearby-chats.ts +++ b/packages/core/src/highlevel/methods/chats/get-nearby-chats.ts @@ -1,8 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { getMarkedPeerId } from '../../../utils/peer-utils.js' import { assertTypeIs } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { Chat } from '../../types/index.js' import { assertIsUpdatesGroup } from '../../updates/utils.js' @@ -29,10 +29,10 @@ export async function getNearbyChats(client: ITelegramClient, latitude: number, assertTypeIs('contacts.getLocated (@ .updates[0])', res.updates[0], 'updatePeerLocated') - const chats = res.chats.map((it) => new Chat(it)) + const chats = res.chats.map(it => new Chat(it)) const index: Record = {} - chats.forEach((c) => (index[c.id] = c)) + chats.forEach(c => (index[c.id] = c)) res.updates[0].peers.forEach((peer) => { if (peer._ === 'peerSelfLocated') return diff --git a/packages/core/src/highlevel/methods/chats/get-similar-channels.ts b/packages/core/src/highlevel/methods/chats/get-similar-channels.ts index d5080de1..7cf85ed9 100644 --- a/packages/core/src/highlevel/methods/chats/get-similar-channels.ts +++ b/packages/core/src/highlevel/methods/chats/get-similar-channels.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { ArrayWithTotal, Chat, InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { ArrayWithTotal, InputPeerLike } from '../../types/index.js' +import { Chat } from '../../types/index.js' import { makeArrayWithTotal } from '../../utils/misc-utils.js' import { resolveChannel } from '../users/resolve-peer.js' @@ -22,7 +23,7 @@ export async function getSimilarChannels( channel: await resolveChannel(client, channel), }) - const parsed = res.chats.map((chat) => new Chat(chat)) + const parsed = res.chats.map(chat => new Chat(chat)) switch (res._) { case 'messages.chatsSlice': diff --git a/packages/core/src/highlevel/methods/chats/iter-chat-event-log.ts b/packages/core/src/highlevel/methods/chats/iter-chat-event-log.ts index ed324bf2..d56d9176 100644 --- a/packages/core/src/highlevel/methods/chats/iter-chat-event-log.ts +++ b/packages/core/src/highlevel/methods/chats/iter-chat-event-log.ts @@ -1,13 +1,13 @@ import Long from 'long' +import type { tl } from '@mtcute/tl' -import { tl } from '@mtcute/tl' - -import { ITelegramClient } from '../../client.types.js' -import { ChatEvent, InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { ChatEvent, InputPeerLike } from '../../types/index.js' import { normalizeChatEventFilters } from '../../types/peers/chat-event/filters.js' import { toInputUser } from '../../utils/peer-utils.js' import { resolveChannel } from '../users/resolve-peer.js' import { resolvePeerMany } from '../users/resolve-peer-many.js' + import { getChatEventLog } from './get-chat-event-log.js' /** diff --git a/packages/core/src/highlevel/methods/chats/iter-chat-members.ts b/packages/core/src/highlevel/methods/chats/iter-chat-members.ts index 7ea0ba00..86395d5a 100644 --- a/packages/core/src/highlevel/methods/chats/iter-chat-members.ts +++ b/packages/core/src/highlevel/methods/chats/iter-chat-members.ts @@ -1,7 +1,8 @@ -import { ITelegramClient } from '../../client.types.js' -import { ChatMember, InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { ChatMember, InputPeerLike } from '../../types/index.js' import { isInputPeerChat } from '../../utils/peer-utils.js' import { resolvePeer } from '../users/resolve-peer.js' + import { getChatMembers } from './get-chat-members.js' /** diff --git a/packages/core/src/highlevel/methods/chats/join-chat.ts b/packages/core/src/highlevel/methods/chats/join-chat.ts index c0eb6d14..7c3902df 100644 --- a/packages/core/src/highlevel/methods/chats/join-chat.ts +++ b/packages/core/src/highlevel/methods/chats/join-chat.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { Chat, InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { Chat } from '../../types/index.js' import { assertIsUpdatesGroup } from '../../updates/utils.js' import { INVITE_LINK_REGEX } from '../../utils/peer-utils.js' import { resolveChannel } from '../users/resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/chats/kick-chat-member.ts b/packages/core/src/highlevel/methods/chats/kick-chat-member.ts index c858582a..0b3e1140 100644 --- a/packages/core/src/highlevel/methods/chats/kick-chat-member.ts +++ b/packages/core/src/highlevel/methods/chats/kick-chat-member.ts @@ -1,8 +1,9 @@ import { sleepWithAbort } from '../../../utils/misc-utils.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, Message } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike, Message } from '../../types/index.js' import { isInputPeerChannel } from '../../utils/peer-utils.js' import { resolvePeer } from '../users/resolve-peer.js' + import { banChatMember } from './ban-chat-member.js' import { unbanChatMember } from './unban-chat-member.js' diff --git a/packages/core/src/highlevel/methods/chats/leave-chat.ts b/packages/core/src/highlevel/methods/chats/leave-chat.ts index ddb89538..0116a33b 100644 --- a/packages/core/src/highlevel/methods/chats/leave-chat.ts +++ b/packages/core/src/highlevel/methods/chats/leave-chat.ts @@ -1,7 +1,9 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, MtInvalidPeerTypeError } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { MtInvalidPeerTypeError } from '../../types/index.js' import { isInputPeerChannel, isInputPeerChat, toInputChannel } from '../../utils/peer-utils.js' import { resolvePeer } from '../users/resolve-peer.js' + import { deleteHistory } from './delete-history.js' /** @@ -38,5 +40,7 @@ export async function leaveChat( if (params?.clear) { await deleteHistory(client, chat) } - } else throw new MtInvalidPeerTypeError(chatId, 'chat or channel') + } else { + throw new MtInvalidPeerTypeError(chatId, 'chat or channel') + } } diff --git a/packages/core/src/highlevel/methods/chats/mark-chat-unread.ts b/packages/core/src/highlevel/methods/chats/mark-chat-unread.ts index eb491dd4..06a6761b 100644 --- a/packages/core/src/highlevel/methods/chats/mark-chat-unread.ts +++ b/packages/core/src/highlevel/methods/chats/mark-chat-unread.ts @@ -1,6 +1,6 @@ import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/chats/open-chat.ts b/packages/core/src/highlevel/methods/chats/open-chat.ts index e6e8635a..5a15695e 100644 --- a/packages/core/src/highlevel/methods/chats/open-chat.ts +++ b/packages/core/src/highlevel/methods/chats/open-chat.ts @@ -1,5 +1,5 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/peers/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/peers/index.js' import { isInputPeerChannel } from '../../utils/peer-utils.js' import { getPeerDialogs } from '../dialogs/get-peer-dialogs.js' import { resolvePeer } from '../users/resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/chats/reorder-usernames.ts b/packages/core/src/highlevel/methods/chats/reorder-usernames.ts index 9a217aae..0bf51d69 100644 --- a/packages/core/src/highlevel/methods/chats/reorder-usernames.ts +++ b/packages/core/src/highlevel/methods/chats/reorder-usernames.ts @@ -1,6 +1,6 @@ import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { isInputPeerChannel, isInputPeerUser, toInputChannel, toInputUser } from '../../utils/index.js' import { isSelfPeer } from '../auth/utils.js' import { resolvePeer } from '../users/resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/chats/restrict-chat-member.ts b/packages/core/src/highlevel/methods/chats/restrict-chat-member.ts index a9544506..0fa68df2 100644 --- a/packages/core/src/highlevel/methods/chats/restrict-chat-member.ts +++ b/packages/core/src/highlevel/methods/chats/restrict-chat-member.ts @@ -1,7 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, MtInvalidPeerTypeError } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { MtInvalidPeerTypeError } from '../../types/index.js' import { normalizeDate } from '../../utils/misc-utils.js' import { isInputPeerChannel, toInputChannel } from '../../utils/peer-utils.js' import { resolvePeer } from '../users/resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/chats/save-draft.ts b/packages/core/src/highlevel/methods/chats/save-draft.ts index 73dc7d18..a89ce6c0 100644 --- a/packages/core/src/highlevel/methods/chats/save-draft.ts +++ b/packages/core/src/highlevel/methods/chats/save-draft.ts @@ -1,7 +1,7 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/chats/set-chat-color.ts b/packages/core/src/highlevel/methods/chats/set-chat-color.ts index 247db161..7b55f417 100644 --- a/packages/core/src/highlevel/methods/chats/set-chat-color.ts +++ b/packages/core/src/highlevel/methods/chats/set-chat-color.ts @@ -1,9 +1,10 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtTypeAssertionError } from '../../../types/errors.js' import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, MtInvalidPeerTypeError } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { MtInvalidPeerTypeError } from '../../types/index.js' import { isInputPeerChannel, isInputPeerUser, toInputChannel } from '../../utils/index.js' import { isSelfPeer } from '../auth/utils.js' import { resolvePeer } from '../users/resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/chats/set-chat-default-permissions.ts b/packages/core/src/highlevel/methods/chats/set-chat-default-permissions.ts index 576f8b7f..b4496cee 100644 --- a/packages/core/src/highlevel/methods/chats/set-chat-default-permissions.ts +++ b/packages/core/src/highlevel/methods/chats/set-chat-default-permissions.ts @@ -1,7 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { ITelegramClient } from '../../client.types.js' -import { Chat, InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { Chat } from '../../types/index.js' import { assertIsUpdatesGroup } from '../../updates/utils.js' import { resolvePeer } from '../users/resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/chats/set-chat-description.ts b/packages/core/src/highlevel/methods/chats/set-chat-description.ts index df01fbb7..b175bc78 100644 --- a/packages/core/src/highlevel/methods/chats/set-chat-description.ts +++ b/packages/core/src/highlevel/methods/chats/set-chat-description.ts @@ -1,6 +1,6 @@ import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/chats/set-chat-photo.ts b/packages/core/src/highlevel/methods/chats/set-chat-photo.ts index ef90a111..30ae8814 100644 --- a/packages/core/src/highlevel/methods/chats/set-chat-photo.ts +++ b/packages/core/src/highlevel/methods/chats/set-chat-photo.ts @@ -2,8 +2,9 @@ import { tdFileId } from '@mtcute/file-id' import { tl } from '@mtcute/tl' import { MtArgumentError } from '../../../types/errors.js' -import { ITelegramClient } from '../../client.types.js' -import { InputFileLike, InputPeerLike, isUploadedFile, MtInvalidPeerTypeError } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputFileLike, InputPeerLike } from '../../types/index.js' +import { MtInvalidPeerTypeError, isUploadedFile } from '../../types/index.js' import { fileIdToInputPhoto } from '../../utils/convert-file-id.js' import { isInputPeerChannel, isInputPeerChat, toInputChannel } from '../../utils/peer-utils.js' import { uploadFile } from '../files/upload-file.js' @@ -41,7 +42,7 @@ export async function setChatPhoto( throw new MtInvalidPeerTypeError(chatId, 'chat or channel') } - let photo: tl.TypeInputChatPhoto | undefined = undefined + let photo: tl.TypeInputChatPhoto | undefined let inputFile: tl.TypeInputFile @@ -67,7 +68,9 @@ export async function setChatPhoto( _: 'inputChatPhoto', id: media.id, } - } else throw new MtArgumentError("Chat photo can't be InputMedia") + } else { + throw new MtArgumentError("Chat photo can't be InputMedia") + } } else if (isUploadedFile(media)) { inputFile = media.inputFile } else if (typeof media === 'object' && tl.isAnyInputFile(media)) { diff --git a/packages/core/src/highlevel/methods/chats/set-chat-title.ts b/packages/core/src/highlevel/methods/chats/set-chat-title.ts index d44ffc6d..3b70758e 100644 --- a/packages/core/src/highlevel/methods/chats/set-chat-title.ts +++ b/packages/core/src/highlevel/methods/chats/set-chat-title.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, MtInvalidPeerTypeError } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { MtInvalidPeerTypeError } from '../../types/index.js' import { isInputPeerChannel, isInputPeerChat, toInputChannel } from '../../utils/peer-utils.js' import { resolvePeer } from '../users/resolve-peer.js' @@ -27,7 +28,9 @@ export async function setChatTitle(client: ITelegramClient, chatId: InputPeerLik channel: toInputChannel(chat), title, }) - } else throw new MtInvalidPeerTypeError(chatId, 'chat or channel') + } else { + throw new MtInvalidPeerTypeError(chatId, 'chat or channel') + } client.handleClientUpdate(res) } diff --git a/packages/core/src/highlevel/methods/chats/set-chat-ttl.ts b/packages/core/src/highlevel/methods/chats/set-chat-ttl.ts index 1c87130a..ffb5cd60 100644 --- a/packages/core/src/highlevel/methods/chats/set-chat-ttl.ts +++ b/packages/core/src/highlevel/methods/chats/set-chat-ttl.ts @@ -1,5 +1,5 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/chats/set-chat-username.ts b/packages/core/src/highlevel/methods/chats/set-chat-username.ts index 99313f42..47e166dd 100644 --- a/packages/core/src/highlevel/methods/chats/set-chat-username.ts +++ b/packages/core/src/highlevel/methods/chats/set-chat-username.ts @@ -1,6 +1,6 @@ import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolveChannel } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/chats/set-slow-mode.ts b/packages/core/src/highlevel/methods/chats/set-slow-mode.ts index b3052861..e059441a 100644 --- a/packages/core/src/highlevel/methods/chats/set-slow-mode.ts +++ b/packages/core/src/highlevel/methods/chats/set-slow-mode.ts @@ -1,5 +1,5 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolveChannel } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/chats/toggle-content-protection.ts b/packages/core/src/highlevel/methods/chats/toggle-content-protection.ts index 70a6b6c5..8b4b1a5b 100644 --- a/packages/core/src/highlevel/methods/chats/toggle-content-protection.ts +++ b/packages/core/src/highlevel/methods/chats/toggle-content-protection.ts @@ -1,5 +1,5 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/chats/toggle-fragment-username.ts b/packages/core/src/highlevel/methods/chats/toggle-fragment-username.ts index e55fede5..9dc8b7a1 100644 --- a/packages/core/src/highlevel/methods/chats/toggle-fragment-username.ts +++ b/packages/core/src/highlevel/methods/chats/toggle-fragment-username.ts @@ -1,6 +1,6 @@ import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { isInputPeerChannel, isInputPeerUser, toInputChannel, toInputUser } from '../../utils/index.js' import { isSelfPeer } from '../auth/utils.js' import { resolvePeer } from '../users/resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/chats/toggle-join-requests.ts b/packages/core/src/highlevel/methods/chats/toggle-join-requests.ts index 45d28d0f..25c3cde3 100644 --- a/packages/core/src/highlevel/methods/chats/toggle-join-requests.ts +++ b/packages/core/src/highlevel/methods/chats/toggle-join-requests.ts @@ -1,5 +1,5 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolveChannel } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/chats/toggle-join-to-send.ts b/packages/core/src/highlevel/methods/chats/toggle-join-to-send.ts index d7ca9237..75b2ae84 100644 --- a/packages/core/src/highlevel/methods/chats/toggle-join-to-send.ts +++ b/packages/core/src/highlevel/methods/chats/toggle-join-to-send.ts @@ -1,5 +1,5 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolveChannel } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/chats/unarchive-chats.ts b/packages/core/src/highlevel/methods/chats/unarchive-chats.ts index 63ec7500..163f3c80 100644 --- a/packages/core/src/highlevel/methods/chats/unarchive-chats.ts +++ b/packages/core/src/highlevel/methods/chats/unarchive-chats.ts @@ -1,8 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { MaybeArray } from '../../../types/utils.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { MaybeArray } from '../../../types/utils.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/chats/unban-chat-member.ts b/packages/core/src/highlevel/methods/chats/unban-chat-member.ts index 66c8ef09..c32879ac 100644 --- a/packages/core/src/highlevel/methods/chats/unban-chat-member.ts +++ b/packages/core/src/highlevel/methods/chats/unban-chat-member.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, MtInvalidPeerTypeError } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { MtInvalidPeerTypeError } from '../../types/index.js' import { isInputPeerChannel, isInputPeerChat, toInputChannel } from '../../utils/peer-utils.js' import { resolvePeer } from '../users/resolve-peer.js' @@ -40,5 +41,7 @@ export async function unbanChatMember( client.handleClientUpdate(res) } else if (isInputPeerChat(chat)) { // no-op // - } else throw new MtInvalidPeerTypeError(chatId, 'chat or channel') + } else { + throw new MtInvalidPeerTypeError(chatId, 'chat or channel') + } } diff --git a/packages/core/src/highlevel/methods/contacts/add-contact.ts b/packages/core/src/highlevel/methods/contacts/add-contact.ts index eed9f33b..d752d922 100644 --- a/packages/core/src/highlevel/methods/contacts/add-contact.ts +++ b/packages/core/src/highlevel/methods/contacts/add-contact.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, User } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { User } from '../../types/index.js' import { assertIsUpdatesGroup } from '../../updates/utils.js' import { resolveUser } from '../users/resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/contacts/delete-contacts.ts b/packages/core/src/highlevel/methods/contacts/delete-contacts.ts index 8d033ae4..418ab84f 100644 --- a/packages/core/src/highlevel/methods/contacts/delete-contacts.ts +++ b/packages/core/src/highlevel/methods/contacts/delete-contacts.ts @@ -1,6 +1,7 @@ -import { MaybeArray } from '../../../types/utils.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, MtInvalidPeerTypeError, User } from '../../types/index.js' +import type { MaybeArray } from '../../../types/utils.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { MtInvalidPeerTypeError, User } from '../../types/index.js' import { assertIsUpdatesGroup } from '../../updates/utils.js' import { toInputUser } from '../../utils/peer-utils.js' import { resolvePeerMany } from '../users/resolve-peer-many.js' @@ -31,5 +32,5 @@ export async function deleteContacts(client: ITelegramClient, userIds: MaybeArra client.handleClientUpdate(res) - return res.users.map((user) => new User(user)) + return res.users.map(user => new User(user)) } diff --git a/packages/core/src/highlevel/methods/contacts/get-contacts.ts b/packages/core/src/highlevel/methods/contacts/get-contacts.ts index 90c18e5a..8503495e 100644 --- a/packages/core/src/highlevel/methods/contacts/get-contacts.ts +++ b/packages/core/src/highlevel/methods/contacts/get-contacts.ts @@ -1,7 +1,7 @@ import Long from 'long' import { assertTypeIs } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { User } from '../../types/index.js' /** @@ -14,5 +14,5 @@ export async function getContacts(client: ITelegramClient): Promise { }) assertTypeIs('getContacts', res, 'contacts.contacts') - return res.users.map((user) => new User(user)) + return res.users.map(user => new User(user)) } diff --git a/packages/core/src/highlevel/methods/contacts/import-contacts.ts b/packages/core/src/highlevel/methods/contacts/import-contacts.ts index 16d1a397..9901c728 100644 --- a/packages/core/src/highlevel/methods/contacts/import-contacts.ts +++ b/packages/core/src/highlevel/methods/contacts/import-contacts.ts @@ -1,9 +1,8 @@ import Long from 'long' +import type { tl } from '@mtcute/tl' -import { tl } from '@mtcute/tl' - -import { PartialOnly } from '../../../types/utils.js' -import { ITelegramClient } from '../../client.types.js' +import type { PartialOnly } from '../../../types/utils.js' +import type { ITelegramClient } from '../../client.types.js' /** * Import contacts to your Telegram contacts list. @@ -16,13 +15,13 @@ export async function importContacts( ): Promise { let seq = Long.ZERO - const contactsNorm: tl.RawInputPhoneContact[] = contacts.map((input) => ({ + const contactsNorm: tl.RawInputPhoneContact[] = contacts.map(input => ({ _: 'inputPhoneContact', clientId: (seq = seq.add(1)), ...input, })) - return await client.call({ + return client.call({ _: 'contacts.importContacts', contacts: contactsNorm, }) diff --git a/packages/core/src/highlevel/methods/dialogs/create-folder.ts b/packages/core/src/highlevel/methods/dialogs/create-folder.ts index 0af75281..17ec13a3 100644 --- a/packages/core/src/highlevel/methods/dialogs/create-folder.ts +++ b/packages/core/src/highlevel/methods/dialogs/create-folder.ts @@ -1,8 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { PartialExcept } from '../../../types/utils.js' +import type { PartialExcept } from '../../../types/utils.js' import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' + import { getFolders } from './get-folders.js' /** diff --git a/packages/core/src/highlevel/methods/dialogs/delete-folder.ts b/packages/core/src/highlevel/methods/dialogs/delete-folder.ts index 68baafc7..20ac3e24 100644 --- a/packages/core/src/highlevel/methods/dialogs/delete-folder.ts +++ b/packages/core/src/highlevel/methods/dialogs/delete-folder.ts @@ -1,7 +1,7 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' /** * Delete a folder by its ID diff --git a/packages/core/src/highlevel/methods/dialogs/edit-folder.ts b/packages/core/src/highlevel/methods/dialogs/edit-folder.ts index c83e9d67..d69bacf7 100644 --- a/packages/core/src/highlevel/methods/dialogs/edit-folder.ts +++ b/packages/core/src/highlevel/methods/dialogs/edit-folder.ts @@ -1,8 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtArgumentError } from '../../../types/errors.js' import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' + import { getFolders } from './get-folders.js' /** @@ -33,7 +34,7 @@ export async function editFolder( } if (typeof folder === 'number' || typeof folder === 'string') { const old = await getFolders(client) - const found = old.filters.find((it) => it._ === 'dialogFilter' && (it.id === folder || it.title === folder)) + const found = old.filters.find(it => it._ === 'dialogFilter' && (it.id === folder || it.title === folder)) if (!found) { throw new MtArgumentError(`Could not find a folder ${folder}`) diff --git a/packages/core/src/highlevel/methods/dialogs/find-dialogs.ts b/packages/core/src/highlevel/methods/dialogs/find-dialogs.ts index e45ac3d8..5d89d3d9 100644 --- a/packages/core/src/highlevel/methods/dialogs/find-dialogs.ts +++ b/packages/core/src/highlevel/methods/dialogs/find-dialogs.ts @@ -1,10 +1,11 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { MaybeArray } from '../../../types/utils.js' -import { ITelegramClient } from '../../client.types.js' +import type { MaybeArray } from '../../../types/utils.js' +import type { ITelegramClient } from '../../client.types.js' import { MtPeerNotFoundError } from '../../types/errors.js' -import { Dialog } from '../../types/messages/dialog.js' +import type { Dialog } from '../../types/messages/dialog.js' import { resolvePeerMany } from '../users/resolve-peer-many.js' + import { getPeerDialogs } from './get-peer-dialogs.js' import { iterDialogs } from './iter-dialogs.js' @@ -65,7 +66,7 @@ export async function findDialogs(client: ITelegramClient, peers: MaybeArray(peers.length) + const ret: Dialog[] = Array.from({ length: peers.length }) // populate found dialogs for (const [idx, origIdx] of foundIdxToOriginalIdx) { diff --git a/packages/core/src/highlevel/methods/dialogs/find-folder.ts b/packages/core/src/highlevel/methods/dialogs/find-folder.ts index f7c02b1b..21a28705 100644 --- a/packages/core/src/highlevel/methods/dialogs/find-folder.ts +++ b/packages/core/src/highlevel/methods/dialogs/find-folder.ts @@ -1,7 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtArgumentError } from '../../../types/errors.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' + import { getFolders } from './get-folders.js' /** diff --git a/packages/core/src/highlevel/methods/dialogs/get-chatlist-preview.ts b/packages/core/src/highlevel/methods/dialogs/get-chatlist-preview.ts index 0af5d9f8..7c0c3af8 100644 --- a/packages/core/src/highlevel/methods/dialogs/get-chatlist-preview.ts +++ b/packages/core/src/highlevel/methods/dialogs/get-chatlist-preview.ts @@ -1,4 +1,4 @@ -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { ChatlistPreview } from '../../types/index.js' /** diff --git a/packages/core/src/highlevel/methods/dialogs/get-folders.ts b/packages/core/src/highlevel/methods/dialogs/get-folders.ts index 6913ef40..d4ee1e9e 100644 --- a/packages/core/src/highlevel/methods/dialogs/get-folders.ts +++ b/packages/core/src/highlevel/methods/dialogs/get-folders.ts @@ -1,8 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtArgumentError } from '../../../types/errors.js' -import { ITelegramClient } from '../../client.types.js' -import { InputDialogFolder } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputDialogFolder } from '../../types/index.js' /** * Get list of folders. diff --git a/packages/core/src/highlevel/methods/dialogs/get-peer-dialogs.ts b/packages/core/src/highlevel/methods/dialogs/get-peer-dialogs.ts index 438565b8..63d6047b 100644 --- a/packages/core/src/highlevel/methods/dialogs/get-peer-dialogs.ts +++ b/packages/core/src/highlevel/methods/dialogs/get-peer-dialogs.ts @@ -1,8 +1,8 @@ -import { MaybeArray } from '../../../types/utils.js' +import type { MaybeArray } from '../../../types/utils.js' import { isPresent } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { Dialog } from '../../types/messages/dialog.js' -import { InputPeerLike } from '../../types/peers/index.js' +import type { InputPeerLike } from '../../types/peers/index.js' import { resolvePeerMany } from '../users/resolve-peer-many.js' /** @@ -15,8 +15,8 @@ export async function getPeerDialogs(client: ITelegramClient, peers: MaybeArray< const res = await client.call({ _: 'messages.getPeerDialogs', - peers: await resolvePeerMany(client, peers).then((peers) => - peers.filter(isPresent).map((it) => ({ + peers: await resolvePeerMany(client, peers).then(peers => + peers.filter(isPresent).map(it => ({ _: 'inputDialogPeer', peer: it, })), diff --git a/packages/core/src/highlevel/methods/dialogs/iter-dialogs.ts b/packages/core/src/highlevel/methods/dialogs/iter-dialogs.ts index 12096356..b1655f45 100644 --- a/packages/core/src/highlevel/methods/dialogs/iter-dialogs.ts +++ b/packages/core/src/highlevel/methods/dialogs/iter-dialogs.ts @@ -1,11 +1,12 @@ import Long from 'long' - -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtArgumentError } from '../../../types/errors.js' -import { ITelegramClient } from '../../client.types.js' -import { Dialog, InputDialogFolder } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputDialogFolder } from '../../types/index.js' +import { Dialog } from '../../types/index.js' import { normalizeDate } from '../../utils/misc-utils.js' + import { _normalizeInputFolder } from './get-folders.js' /** @@ -97,7 +98,7 @@ export async function* iterDialogs( * a wrong folder if you have multiple with the same title. * * Also note that fetching dialogs in a folder is - * *orders of magnitudes* slower than normal because + * orders of magnitudes* slower than normal because * of Telegram API limitations - we have to fetch all dialogs * and filter the ones we need manually. If possible, * use {@link Dialog.filterFolder} instead. @@ -190,7 +191,7 @@ export async function* iterDialogs( res.dialogs.forEach((dialog: tl.Mutable) => (dialog.pinned = true)) - yield* Dialog.parseTlDialogs(res) + yield * Dialog.parseTlDialogs(res) } if (pinned === 'only' || remaining <= 0) { @@ -220,7 +221,7 @@ export async function* iterDialogs( peers, }) - yield* Dialog.parseTlDialogs(res) + yield * Dialog.parseTlDialogs(res) } return @@ -236,7 +237,7 @@ export async function* iterDialogs( } const res = await client.call({ _: 'messages.getPeerDialogs', - peers: localFilters.pinnedPeers.map((peer) => ({ + peers: localFilters.pinnedPeers.map(peer => ({ _: 'inputDialogPeer' as const, peer, })), @@ -258,7 +259,7 @@ export async function* iterDialogs( folderId: archived === 'exclude' ? 0 : 1, }) } - if (res) yield* Dialog.parseTlDialogs(res, limit) + if (res) yield * Dialog.parseTlDialogs(res, limit) return } @@ -266,11 +267,11 @@ export async function* iterDialogs( let current = 0 if ( - localFilters?.pinnedPeers.length && - pinned === 'include' && - offsetId === 0 && - offsetDate === 0 && - offsetPeer._ === 'inputPeerEmpty' + localFilters?.pinnedPeers.length + && pinned === 'include' + && offsetId === 0 + && offsetDate === 0 + && offsetPeer._ === 'inputPeerEmpty' ) { const res = await fetchPinnedDialogsFromFolder() diff --git a/packages/core/src/highlevel/methods/dialogs/join-chatlist.ts b/packages/core/src/highlevel/methods/dialogs/join-chatlist.ts index 5061bfe9..13e79e33 100644 --- a/packages/core/src/highlevel/methods/dialogs/join-chatlist.ts +++ b/packages/core/src/highlevel/methods/dialogs/join-chatlist.ts @@ -1,12 +1,13 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtTypeAssertionError } from '../../../types/errors.js' -import { MaybeArray } from '../../../types/utils.js' +import type { MaybeArray } from '../../../types/utils.js' import { assertTypeIs, isPresent } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { assertIsUpdatesGroup } from '../../updates/utils.js' import { resolvePeerMany } from '../users/resolve-peer-many.js' + import { getChatlistPreview } from './get-chatlist-preview.js' /** @@ -32,7 +33,7 @@ export async function joinChatlist( peers = all.filter(isPresent) } else { const preview = await getChatlistPreview(client, link) - peers = preview.chats.filter((it) => !it.isUnavailable).map((it) => it.inputPeer) + peers = preview.chats.filter(it => !it.isUnavailable).map(it => it.inputPeer) } const res = await client.call({ @@ -44,7 +45,7 @@ export async function joinChatlist( assertIsUpdatesGroup('joinChatlist', res) client.handleClientUpdate(res) - const filter = res.updates.find((it) => it._ === 'updateDialogFilter') as tl.RawUpdateDialogFilter + const filter = res.updates.find(it => it._ === 'updateDialogFilter') as tl.RawUpdateDialogFilter if (!filter?.filter) { throw new MtTypeAssertionError('joinChatlist', 'updateDialogFilter', 'nothing') diff --git a/packages/core/src/highlevel/methods/dialogs/set-folders-order.ts b/packages/core/src/highlevel/methods/dialogs/set-folders-order.ts index 4a78e3e6..b1307acf 100644 --- a/packages/core/src/highlevel/methods/dialogs/set-folders-order.ts +++ b/packages/core/src/highlevel/methods/dialogs/set-folders-order.ts @@ -1,5 +1,5 @@ import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' /** * Reorder folders diff --git a/packages/core/src/highlevel/methods/files/download-buffer.ts b/packages/core/src/highlevel/methods/files/download-buffer.ts index 9b1e0754..1dc3e9a5 100644 --- a/packages/core/src/highlevel/methods/files/download-buffer.ts +++ b/packages/core/src/highlevel/methods/files/download-buffer.ts @@ -1,6 +1,8 @@ import { concatBuffers } from '../../../utils/buffer-utils.js' -import { ITelegramClient } from '../../client.types.js' -import { FileDownloadLocation, FileDownloadParameters, FileLocation } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { FileDownloadLocation, FileDownloadParameters } from '../../types/index.js' +import { FileLocation } from '../../types/index.js' + import { downloadAsIterable } from './download-iterable.js' /** diff --git a/packages/core/src/highlevel/methods/files/download-file.ts b/packages/core/src/highlevel/methods/files/download-file.ts index b2169553..3d6eac01 100644 --- a/packages/core/src/highlevel/methods/files/download-file.ts +++ b/packages/core/src/highlevel/methods/files/download-file.ts @@ -1,7 +1,7 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ +/* eslint-disable unused-imports/no-unused-vars */ -import { ITelegramClient } from '../../client.types.js' -import { FileDownloadLocation, FileDownloadParameters } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { FileDownloadLocation, FileDownloadParameters } from '../../types/index.js' // @available=both /** diff --git a/packages/core/src/highlevel/methods/files/download-iterable.ts b/packages/core/src/highlevel/methods/files/download-iterable.ts index 72c46d9a..ecb81c8d 100644 --- a/packages/core/src/highlevel/methods/files/download-iterable.ts +++ b/packages/core/src/highlevel/methods/files/download-iterable.ts @@ -1,12 +1,13 @@ import { parseFileId } from '@mtcute/file-id' import { tl } from '@mtcute/tl' -import { ConnectionKind } from '../../../network/network-manager.js' +import type { ConnectionKind } from '../../../network/network-manager.js' import { getPlatform } from '../../../platform.js' import { MtArgumentError, MtUnsupportedError } from '../../../types/errors.js' import { ConditionVariable } from '../../../utils/condition-variable.js' -import { ITelegramClient } from '../../client.types.js' -import { FileDownloadLocation, FileDownloadParameters, FileLocation } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { FileDownloadLocation, FileDownloadParameters } from '../../types/index.js' +import { FileLocation } from '../../types/index.js' import { fileIdToInputFileLocation, fileIdToInputWebFileLocation } from '../../utils/convert-file-id.js' import { determinePartSize } from '../../utils/file-utils.js' @@ -64,7 +65,9 @@ export async function* downloadAsIterable( } else { location = fileIdToInputFileLocation(parsed) } - } else location = input + } else { + location = input + } const isWeb = tl.isAnyInputWebFileLocation(location) @@ -143,7 +146,9 @@ export async function* downloadAsIterable( // todo: implement someday // see: https://github.com/LonamiWebs/Telethon/blob/0e8bd8248cc649637b7c392616887c50986427a0/telethon/client/downloads.py#L99 throw new MtUnsupportedError('File ref expired!') - } else throw e + } else { + throw e + } } if (result._ === 'upload.fileCdnRedirect') { @@ -173,7 +178,7 @@ export async function* downloadAsIterable( } } - let error: unknown = undefined + let error: unknown void Promise.all(Array.from({ length: Math.min(poolSize * REQUESTS_PER_CONNECTION, numChunks) }, downloadChunk)) .catch((e) => { client.log.debug('download workers errored: %e', e) @@ -199,7 +204,6 @@ export async function* downloadAsIterable( while (position < limitBytes) { await nextChunkCv.wait() - // eslint-disable-next-line @typescript-eslint/no-throw-literal if (error) throw error while (nextChunkIdx in buffer) { diff --git a/packages/core/src/highlevel/methods/files/download-node-stream.ts b/packages/core/src/highlevel/methods/files/download-node-stream.ts index 49ba6ad7..71c9ee94 100644 --- a/packages/core/src/highlevel/methods/files/download-node-stream.ts +++ b/packages/core/src/highlevel/methods/files/download-node-stream.ts @@ -1,7 +1,7 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ +/* eslint-disable unused-imports/no-unused-vars */ -import { ITelegramClient } from '../../client.types.js' -import { FileDownloadLocation, FileDownloadParameters } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { FileDownloadLocation, FileDownloadParameters } from '../../types/index.js' // @available=both /** diff --git a/packages/core/src/highlevel/methods/files/download-stream.ts b/packages/core/src/highlevel/methods/files/download-stream.ts index a0235f67..f4fdf277 100644 --- a/packages/core/src/highlevel/methods/files/download-stream.ts +++ b/packages/core/src/highlevel/methods/files/download-stream.ts @@ -1,6 +1,8 @@ -import { ITelegramClient } from '../../client.types.js' -import { FileDownloadLocation, FileDownloadParameters, FileLocation } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { FileDownloadLocation, FileDownloadParameters } from '../../types/index.js' +import { FileLocation } from '../../types/index.js' import { bufferToStream } from '../../utils/stream-utils.js' + import { downloadAsIterable } from './download-iterable.js' /** @@ -34,7 +36,7 @@ export function downloadAsStream( } controller.close() - })().catch((e) => controller.error(e)) + })().catch(e => controller.error(e)) }, cancel() { cancel.abort() diff --git a/packages/core/src/highlevel/methods/files/normalize-file-to-document.ts b/packages/core/src/highlevel/methods/files/normalize-file-to-document.ts index a10ae664..26dc3172 100644 --- a/packages/core/src/highlevel/methods/files/normalize-file-to-document.ts +++ b/packages/core/src/highlevel/methods/files/normalize-file-to-document.ts @@ -1,8 +1,9 @@ import { tl } from '@mtcute/tl' import { assertTypeIs } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputFileLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputFileLike } from '../../types/index.js' + import { _normalizeInputMedia } from './normalize-input-media.js' /** diff --git a/packages/core/src/highlevel/methods/files/normalize-input-file.ts b/packages/core/src/highlevel/methods/files/normalize-input-file.ts index 82b2a79a..d41db7e8 100644 --- a/packages/core/src/highlevel/methods/files/normalize-input-file.ts +++ b/packages/core/src/highlevel/methods/files/normalize-input-file.ts @@ -2,8 +2,10 @@ import { tdFileId } from '@mtcute/file-id' import { tl } from '@mtcute/tl' import { MtArgumentError } from '../../../types/errors.js' -import { ITelegramClient } from '../../client.types.js' -import { InputFileLike, isUploadedFile } from '../../types/files/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputFileLike } from '../../types/files/index.js' +import { isUploadedFile } from '../../types/files/index.js' + import { uploadFile } from './upload-file.js' /** diff --git a/packages/core/src/highlevel/methods/files/normalize-input-media.ts b/packages/core/src/highlevel/methods/files/normalize-input-media.ts index ac32ba7e..99db6e83 100644 --- a/packages/core/src/highlevel/methods/files/normalize-input-media.ts +++ b/packages/core/src/highlevel/methods/files/normalize-input-media.ts @@ -1,20 +1,20 @@ import Long from 'long' - import { parseFileId, tdFileId } from '@mtcute/file-id' import { tl } from '@mtcute/tl' import { getPlatform } from '../../../platform.js' import { assertTypeIs } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { isUploadedFile } from '../../types/files/uploaded-file.js' -import { UploadFileLike } from '../../types/files/utils.js' -import { InputMediaLike } from '../../types/media/input-media/types.js' +import type { UploadFileLike } from '../../types/files/utils.js' +import type { InputMediaLike } from '../../types/media/input-media/types.js' import { inputTextToTl } from '../../types/misc/entities.js' import { fileIdToInputDocument, fileIdToInputPhoto } from '../../utils/convert-file-id.js' import { normalizeDate } from '../../utils/misc-utils.js' import { encodeWaveform } from '../../utils/voice-utils.js' import { _normalizeInputText } from '../misc/normalize-text.js' import { resolvePeer } from '../users/resolve-peer.js' + import { _normalizeInputFile } from './normalize-input-file.js' import { uploadFile } from './upload-file.js' @@ -112,13 +112,13 @@ export async function _normalizeInputMedia( return { _: 'inputMediaGame', id: - typeof media.game === 'string' ? - { + typeof media.game === 'string' + ? { _: 'inputGameShortName', botId: { _: 'inputUserSelf' }, shortName: media.game, - } : - media.game, + } + : media.game, } } @@ -128,15 +128,15 @@ export async function _normalizeInputMedia( title: media.title, description: media.description, photo: - typeof media.photo === 'string' ? - { + typeof media.photo === 'string' + ? { _: 'inputWebDocument', url: media.photo, mimeType: 'image/jpeg', size: 0, attributes: [], - } : - media.photo, + } + : media.photo, invoice: media.invoice, payload: media.payload, provider: media.token, @@ -145,9 +145,9 @@ export async function _normalizeInputMedia( data: JSON.stringify(media.providerData), }, startParam: media.startParam, - extendedMedia: media.extendedMedia ? - await _normalizeInputMedia(client, media.extendedMedia, params) : - undefined, + extendedMedia: media.extendedMedia + ? await _normalizeInputMedia(client, media.extendedMedia, params) + : undefined, } } @@ -163,9 +163,9 @@ export async function _normalizeInputMedia( } }) - let correct: Uint8Array[] | undefined = undefined - let solution: string | undefined = undefined - let solutionEntities: tl.TypeMessageEntity[] | undefined = undefined + let correct: Uint8Array[] | undefined + let solution: string | undefined + let solutionEntities: tl.TypeMessageEntity[] | undefined if (media.type === 'quiz') { let input = media.correct @@ -225,7 +225,7 @@ export async function _normalizeInputMedia( let medias: tl.TypeInputMedia[] if (Array.isArray(media.media)) { - medias = await Promise.all(media.media.map((m) => _normalizeInputMedia(client, m, params))) + medias = await Promise.all(media.media.map(m => _normalizeInputMedia(client, m, params))) } else { medias = [await _normalizeInputMedia(client, media.media, params)] } @@ -237,8 +237,8 @@ export async function _normalizeInputMedia( } } - let inputFile: tl.TypeInputFile | undefined = undefined - let thumb: tl.TypeInputFile | undefined = undefined + let inputFile: tl.TypeInputFile | undefined + let thumb: tl.TypeInputFile | undefined let mime = 'application/octet-stream' const upload = async (file: UploadFileLike): Promise => { @@ -331,9 +331,9 @@ export async function _normalizeInputMedia( return uploadMediaIfNeeded( { _: - parsed.type === tdFileId.FileType.Photo ? - 'inputMediaPhotoExternal' : - 'inputMediaDocumentExternal', + parsed.type === tdFileId.FileType.Photo + ? 'inputMediaPhotoExternal' + : 'inputMediaDocumentExternal', url: parsed.location.url, }, parsed.type === tdFileId.FileType.Photo, diff --git a/packages/core/src/highlevel/methods/files/upload-file.ts b/packages/core/src/highlevel/methods/files/upload-file.ts index eb74837d..8ed1d269 100644 --- a/packages/core/src/highlevel/methods/files/upload-file.ts +++ b/packages/core/src/highlevel/methods/files/upload-file.ts @@ -1,11 +1,11 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { getPlatform } from '../../../platform.js' import { MtArgumentError } from '../../../types/errors.js' import { randomLong } from '../../../utils/long-utils.js' -import { ITelegramClient } from '../../client.types.js' -import { UploadedFile, UploadFileLike } from '../../types/index.js' -import { guessFileMime, MIME_TO_EXTENSION } from '../../utils/file-type.js' +import type { ITelegramClient } from '../../client.types.js' +import type { UploadFileLike, UploadedFile } from '../../types/index.js' +import { MIME_TO_EXTENSION, guessFileMime } from '../../utils/file-type.js' import { determinePartSize, isProbablyPlainText } from '../../utils/file-utils.js' import { bufferToStream, createChunkedReader, streamToBuffer } from '../../utils/stream-utils.js' @@ -141,8 +141,8 @@ export async function uploadFile( } if (HAS_RESPONSE && file instanceof Response) { - const length = parseInt(file.headers.get('content-length') || '0') - if (!isNaN(length) && length) fileSize = length + const length = Number.parseInt(file.headers.get('content-length') || '0') + if (!Number.isNaN(length) && length) fileSize = length fileMime = file.headers.get('content-type')?.split(';')[0] @@ -272,15 +272,15 @@ export async function uploadFile( } // why - const request = isBig ? - ({ + const request = isBig + ? ({ _: 'upload.saveBigFilePart', fileId, filePart: thisIdx, fileTotalParts: partCount, bytes: part, - } satisfies tl.upload.RawSaveBigFilePartRequest) : - ({ + } satisfies tl.upload.RawSaveBigFilePartRequest) + : ({ _: 'upload.saveFilePart', fileId, filePart: thisIdx, diff --git a/packages/core/src/highlevel/methods/files/upload-media.ts b/packages/core/src/highlevel/methods/files/upload-media.ts index f8485640..ac8e4008 100644 --- a/packages/core/src/highlevel/methods/files/upload-media.ts +++ b/packages/core/src/highlevel/methods/files/upload-media.ts @@ -1,10 +1,12 @@ import { MtArgumentError } from '../../../types/errors.js' import { assertNever } from '../../../types/utils.js' import { assertTypeIs, assertTypeIsNot } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputMediaLike, InputPeerLike, MessageMedia, Photo, RawDocument } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputMediaLike, InputPeerLike, MessageMedia, RawDocument } from '../../types/index.js' +import { Photo } from '../../types/index.js' import { parseDocument } from '../../types/media/document-utils.js' import { resolvePeer } from '../users/resolve-peer.js' + import { _normalizeInputMedia } from './normalize-input-media.js' /** @@ -56,9 +58,9 @@ export async function uploadMedia( const res = await client.call({ _: 'messages.uploadMedia', - peer: params.peer ? - await resolvePeer(client, params.peer) : - { + peer: params.peer + ? await resolvePeer(client, params.peer) + : { _: 'inputPeerSelf', }, media: normMedia, diff --git a/packages/core/src/highlevel/methods/forums/create-forum-topic.ts b/packages/core/src/highlevel/methods/forums/create-forum-topic.ts index d4efcd6f..f0c7b386 100644 --- a/packages/core/src/highlevel/methods/forums/create-forum-topic.ts +++ b/packages/core/src/highlevel/methods/forums/create-forum-topic.ts @@ -1,8 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { randomLong } from '../../../utils/long-utils.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, Message } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike, Message } from '../../types/index.js' import { _findMessageInUpdate } from '../messages/find-in-update.js' import { resolveChannel, resolvePeer } from '../users/resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/forums/delete-forum-topic-history.ts b/packages/core/src/highlevel/methods/forums/delete-forum-topic-history.ts index f4f3f271..f5a14472 100644 --- a/packages/core/src/highlevel/methods/forums/delete-forum-topic-history.ts +++ b/packages/core/src/highlevel/methods/forums/delete-forum-topic-history.ts @@ -1,5 +1,5 @@ import { assertTypeIsNot } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import type { ForumTopic, InputPeerLike } from '../../types/index.js' import { createDummyUpdate } from '../../updates/utils.js' import { resolveChannel } from '../users/resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/forums/edit-forum-topic.ts b/packages/core/src/highlevel/methods/forums/edit-forum-topic.ts index 298ddf58..263d0094 100644 --- a/packages/core/src/highlevel/methods/forums/edit-forum-topic.ts +++ b/packages/core/src/highlevel/methods/forums/edit-forum-topic.ts @@ -1,8 +1,7 @@ import Long from 'long' +import type { tl } from '@mtcute/tl' -import { tl } from '@mtcute/tl' - -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import type { ForumTopic, InputPeerLike, Message } from '../../types/index.js' import { _findMessageInUpdate } from '../messages/find-in-update.js' import { resolveChannel } from '../users/resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/forums/get-forum-topics-by-id.ts b/packages/core/src/highlevel/methods/forums/get-forum-topics-by-id.ts index 6aeb85c4..2511219d 100644 --- a/packages/core/src/highlevel/methods/forums/get-forum-topics-by-id.ts +++ b/packages/core/src/highlevel/methods/forums/get-forum-topics-by-id.ts @@ -1,6 +1,7 @@ -import { MaybeArray } from '../../../types/utils.js' -import { ITelegramClient } from '../../client.types.js' -import { ForumTopic, InputPeerLike } from '../../types/index.js' +import type { MaybeArray } from '../../../types/utils.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { ForumTopic } from '../../types/index.js' import { resolveChannel } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/forums/get-forum-topics.ts b/packages/core/src/highlevel/methods/forums/get-forum-topics.ts index b31c48f1..56087478 100644 --- a/packages/core/src/highlevel/methods/forums/get-forum-topics.ts +++ b/packages/core/src/highlevel/methods/forums/get-forum-topics.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { ArrayPaginated, ForumTopic, InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { ArrayPaginated, InputPeerLike } from '../../types/index.js' +import { ForumTopic } from '../../types/index.js' import { makeArrayPaginated } from '../../utils/index.js' import { resolveChannel } from '../users/resolve-peer.js' @@ -64,13 +65,13 @@ export async function getForumTopics( const topics = ForumTopic.parseTlForumTopics(res) const last = topics[topics.length - 1] - const next = last ? - { + const next = last + ? { date: res.orderByCreateDate ? last.raw.date : last.lastMessage.raw.date, id: last.raw.topMessage, topic: last.raw.id, - } : - undefined + } + : undefined return makeArrayPaginated(topics, res.count, next) } diff --git a/packages/core/src/highlevel/methods/forums/iter-forum-topics.ts b/packages/core/src/highlevel/methods/forums/iter-forum-topics.ts index 79906afe..78acc4b9 100644 --- a/packages/core/src/highlevel/methods/forums/iter-forum-topics.ts +++ b/packages/core/src/highlevel/methods/forums/iter-forum-topics.ts @@ -1,6 +1,7 @@ -import { ITelegramClient } from '../../client.types.js' -import { ForumTopic, InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { ForumTopic, InputPeerLike } from '../../types/index.js' import { resolveChannel } from '../users/resolve-peer.js' + import { getForumTopics } from './get-forum-topics.js' /** diff --git a/packages/core/src/highlevel/methods/forums/reorder-pinned-forum-topics.ts b/packages/core/src/highlevel/methods/forums/reorder-pinned-forum-topics.ts index 5c840979..2b5ff497 100644 --- a/packages/core/src/highlevel/methods/forums/reorder-pinned-forum-topics.ts +++ b/packages/core/src/highlevel/methods/forums/reorder-pinned-forum-topics.ts @@ -1,4 +1,4 @@ -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import type { ForumTopic, InputPeerLike } from '../../types/index.js' import { resolveChannel } from '../users/resolve-peer.js' @@ -28,7 +28,7 @@ export async function reorderPinnedForumTopics( await client.call({ _: 'channels.reorderPinnedForumTopics', channel: await resolveChannel(client, chatId), - order: order.map((it) => (typeof it === 'number' ? it : it.id)), + order: order.map(it => (typeof it === 'number' ? it : it.id)), force, }) } diff --git a/packages/core/src/highlevel/methods/forums/toggle-forum-topic-closed.ts b/packages/core/src/highlevel/methods/forums/toggle-forum-topic-closed.ts index 3e49d3c0..0837d367 100644 --- a/packages/core/src/highlevel/methods/forums/toggle-forum-topic-closed.ts +++ b/packages/core/src/highlevel/methods/forums/toggle-forum-topic-closed.ts @@ -1,4 +1,4 @@ -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import type { ForumTopic, InputPeerLike, Message } from '../../types/index.js' import { _findMessageInUpdate } from '../messages/find-in-update.js' import { resolveChannel } from '../users/resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/forums/toggle-forum-topic-pinned.ts b/packages/core/src/highlevel/methods/forums/toggle-forum-topic-pinned.ts index 2f9dd0ea..8089e6d3 100644 --- a/packages/core/src/highlevel/methods/forums/toggle-forum-topic-pinned.ts +++ b/packages/core/src/highlevel/methods/forums/toggle-forum-topic-pinned.ts @@ -1,5 +1,5 @@ -import { ITelegramClient } from '../../client.types.js' -import { ForumTopic, InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { ForumTopic, InputPeerLike } from '../../types/index.js' import { resolveChannel } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/forums/toggle-forum.ts b/packages/core/src/highlevel/methods/forums/toggle-forum.ts index 845b32b7..53c38eb5 100644 --- a/packages/core/src/highlevel/methods/forums/toggle-forum.ts +++ b/packages/core/src/highlevel/methods/forums/toggle-forum.ts @@ -1,5 +1,5 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolveChannel } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/forums/toggle-general-topic-hidden.ts b/packages/core/src/highlevel/methods/forums/toggle-general-topic-hidden.ts index 45670897..b97ac07c 100644 --- a/packages/core/src/highlevel/methods/forums/toggle-general-topic-hidden.ts +++ b/packages/core/src/highlevel/methods/forums/toggle-general-topic-hidden.ts @@ -1,5 +1,5 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, Message } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike, Message } from '../../types/index.js' import { _findMessageInUpdate } from '../messages/find-in-update.js' import { resolveChannel } from '../users/resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/invite-links/create-invite-link.ts b/packages/core/src/highlevel/methods/invite-links/create-invite-link.ts index 0ac56e0b..d068b015 100644 --- a/packages/core/src/highlevel/methods/invite-links/create-invite-link.ts +++ b/packages/core/src/highlevel/methods/invite-links/create-invite-link.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { ChatInviteLink, InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { ChatInviteLink } from '../../types/index.js' import { normalizeDate } from '../../utils/misc-utils.js' import { resolvePeer } from '../users/resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/invite-links/edit-invite-link.ts b/packages/core/src/highlevel/methods/invite-links/edit-invite-link.ts index 3df68628..b19683d6 100644 --- a/packages/core/src/highlevel/methods/invite-links/edit-invite-link.ts +++ b/packages/core/src/highlevel/methods/invite-links/edit-invite-link.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { ChatInviteLink, InputPeerLike, PeersIndex } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { ChatInviteLink, PeersIndex } from '../../types/index.js' import { normalizeDate } from '../../utils/misc-utils.js' import { resolvePeer } from '../users/resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/invite-links/export-invite-link.ts b/packages/core/src/highlevel/methods/invite-links/export-invite-link.ts index 209ad3fb..662bf72d 100644 --- a/packages/core/src/highlevel/methods/invite-links/export-invite-link.ts +++ b/packages/core/src/highlevel/methods/invite-links/export-invite-link.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { ChatInviteLink, InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { ChatInviteLink } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/invite-links/get-invite-link-members.ts b/packages/core/src/highlevel/methods/invite-links/get-invite-link-members.ts index 5b4e473e..cd37a292 100644 --- a/packages/core/src/highlevel/methods/invite-links/get-invite-link-members.ts +++ b/packages/core/src/highlevel/methods/invite-links/get-invite-link-members.ts @@ -1,7 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { ITelegramClient } from '../../client.types.js' -import { ArrayPaginated, ChatInviteLink, ChatInviteLinkMember, InputPeerLike, PeersIndex } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { ArrayPaginated, ChatInviteLink, InputPeerLike } from '../../types/index.js' +import { ChatInviteLinkMember, PeersIndex } from '../../types/index.js' import { makeArrayPaginated, normalizeDate, toInputUser } from '../../utils/index.js' import { resolvePeer } from '../users/resolve-peer.js' @@ -52,7 +53,7 @@ export async function getInviteLinkMembers( */ requestedSearch?: string }, -): Promise> { +): Promise> { const peer = await resolvePeer(client, chatId) if (!params) params = {} @@ -75,15 +76,15 @@ export async function getInviteLinkMembers( const peers = PeersIndex.from(res) - const members = res.importers.map((it) => new ChatInviteLinkMember(it, peers)) + const members = res.importers.map(it => new ChatInviteLinkMember(it, peers)) const last = members[members.length - 1] - const nextOffset = last ? - { + const nextOffset = last + ? { date: last.raw.date, user: toInputUser(last.user.inputPeer), - } : - undefined + } + : undefined return makeArrayPaginated(members, res.count, nextOffset) } diff --git a/packages/core/src/highlevel/methods/invite-links/get-invite-link.ts b/packages/core/src/highlevel/methods/invite-links/get-invite-link.ts index c7dfca86..0f132e5b 100644 --- a/packages/core/src/highlevel/methods/invite-links/get-invite-link.ts +++ b/packages/core/src/highlevel/methods/invite-links/get-invite-link.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { ChatInviteLink, InputPeerLike, PeersIndex } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { ChatInviteLink, PeersIndex } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/invite-links/get-invite-links.ts b/packages/core/src/highlevel/methods/invite-links/get-invite-links.ts index a2f135e2..67bb0299 100644 --- a/packages/core/src/highlevel/methods/invite-links/get-invite-links.ts +++ b/packages/core/src/highlevel/methods/invite-links/get-invite-links.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { ArrayPaginated, ChatInviteLink, InputPeerLike, PeersIndex } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { ArrayPaginated, InputPeerLike } from '../../types/index.js' +import { ChatInviteLink, PeersIndex } from '../../types/index.js' import { makeArrayPaginated } from '../../utils/index.js' import { resolvePeer, resolveUser } from '../users/resolve-peer.js' @@ -65,15 +66,15 @@ export async function getInviteLinks( const peers = PeersIndex.from(res) - const links = res.invites.map((it) => new ChatInviteLink(it, peers)) + const links = res.invites.map(it => new ChatInviteLink(it, peers)) const last = links[links.length - 1] - const nextOffset = last ? - { + const nextOffset = last + ? { date: last.raw.date, link: last.raw.link, - } : - undefined + } + : undefined return makeArrayPaginated(links, res.count, nextOffset) } diff --git a/packages/core/src/highlevel/methods/invite-links/get-primary-invite-link.ts b/packages/core/src/highlevel/methods/invite-links/get-primary-invite-link.ts index 2100ffae..28133db4 100644 --- a/packages/core/src/highlevel/methods/invite-links/get-primary-invite-link.ts +++ b/packages/core/src/highlevel/methods/invite-links/get-primary-invite-link.ts @@ -1,6 +1,7 @@ import { MtTypeAssertionError } from '../../../types/errors.js' -import { ITelegramClient } from '../../client.types.js' -import { ChatInviteLink, InputPeerLike, PeersIndex } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { ChatInviteLink, PeersIndex } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/invite-links/hide-all-join-requests.ts b/packages/core/src/highlevel/methods/invite-links/hide-all-join-requests.ts index ff765938..7edf4ede 100644 --- a/packages/core/src/highlevel/methods/invite-links/hide-all-join-requests.ts +++ b/packages/core/src/highlevel/methods/invite-links/hide-all-join-requests.ts @@ -1,4 +1,4 @@ -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import type { ChatInviteLink, InputPeerLike } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/invite-links/hide-join-request.ts b/packages/core/src/highlevel/methods/invite-links/hide-join-request.ts index 2d1870b1..a344c60d 100644 --- a/packages/core/src/highlevel/methods/invite-links/hide-join-request.ts +++ b/packages/core/src/highlevel/methods/invite-links/hide-join-request.ts @@ -1,5 +1,5 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolvePeer, resolveUser } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/invite-links/iter-invite-link-members.ts b/packages/core/src/highlevel/methods/invite-links/iter-invite-link-members.ts index a4213b38..ab3faaa8 100644 --- a/packages/core/src/highlevel/methods/invite-links/iter-invite-link-members.ts +++ b/packages/core/src/highlevel/methods/invite-links/iter-invite-link-members.ts @@ -1,6 +1,7 @@ -import { ITelegramClient } from '../../client.types.js' -import { ChatInviteLinkMember, InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { ChatInviteLinkMember, InputPeerLike } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' + import { getInviteLinkMembers } from './get-invite-link-members.js' /** diff --git a/packages/core/src/highlevel/methods/invite-links/iter-invite-links.ts b/packages/core/src/highlevel/methods/invite-links/iter-invite-links.ts index 96acb43c..6774a61c 100644 --- a/packages/core/src/highlevel/methods/invite-links/iter-invite-links.ts +++ b/packages/core/src/highlevel/methods/invite-links/iter-invite-links.ts @@ -1,6 +1,7 @@ -import { ITelegramClient } from '../../client.types.js' -import { ChatInviteLink, InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { ChatInviteLink, InputPeerLike } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' + import { getInviteLinks } from './get-invite-links.js' /** diff --git a/packages/core/src/highlevel/methods/invite-links/revoke-invite-link.ts b/packages/core/src/highlevel/methods/invite-links/revoke-invite-link.ts index da9f5891..bfbd3284 100644 --- a/packages/core/src/highlevel/methods/invite-links/revoke-invite-link.ts +++ b/packages/core/src/highlevel/methods/invite-links/revoke-invite-link.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { ChatInviteLink, InputPeerLike, PeersIndex } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { ChatInviteLink, PeersIndex } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/messages/_business-connection.ts b/packages/core/src/highlevel/methods/messages/_business-connection.ts index 0282e4f0..a2a0388a 100644 --- a/packages/core/src/highlevel/methods/messages/_business-connection.ts +++ b/packages/core/src/highlevel/methods/messages/_business-connection.ts @@ -1,16 +1,16 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { RpcCallOptions } from '../../../network/network-manager.js' -import { MustEqual } from '../../../types/utils.js' +import type { RpcCallOptions } from '../../../network/network-manager.js' +import type { MustEqual } from '../../../types/utils.js' import { LruMap } from '../../../utils/lru-map.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { getBusinessConnection } from '../premium/get-business-connection.js' // temporary solution // todo – rework once we have either a more generic caching solution const DC_MAP_SYMBOL = Symbol('dcMap') -const getDcMap = (client: ITelegramClient): LruMap => { +function getDcMap(client: ITelegramClient): LruMap { const client_ = client as typeof client & { [DC_MAP_SYMBOL]?: LruMap } if (!client_[DC_MAP_SYMBOL]) { @@ -44,7 +44,7 @@ export async function _maybeInvokeWithBusinessConnection const dcId = dcMap.get(businessConnectionId)! - // eslint-disable-next-line @typescript-eslint/no-unsafe-return + // eslint-disable-next-line ts/no-unsafe-return return client.call( { _: 'invokeWithBusinessConnection', diff --git a/packages/core/src/highlevel/methods/messages/close-poll.ts b/packages/core/src/highlevel/methods/messages/close-poll.ts index 0b5977ab..87a2d1ce 100644 --- a/packages/core/src/highlevel/methods/messages/close-poll.ts +++ b/packages/core/src/highlevel/methods/messages/close-poll.ts @@ -2,8 +2,9 @@ import Long from 'long' import { MtTypeAssertionError } from '../../../types/errors.js' import { assertTypeIs } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputMessageId, normalizeInputMessageId, PeersIndex, Poll } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputMessageId } from '../../types/index.js' +import { PeersIndex, Poll, normalizeInputMessageId } from '../../types/index.js' import { assertIsUpdatesGroup } from '../../updates/utils.js' import { resolvePeer } from '../users/resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/messages/delete-messages.ts b/packages/core/src/highlevel/methods/messages/delete-messages.ts index e158a7f5..a7b74159 100644 --- a/packages/core/src/highlevel/methods/messages/delete-messages.ts +++ b/packages/core/src/highlevel/methods/messages/delete-messages.ts @@ -1,10 +1,11 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, Message } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike, Message } from '../../types/index.js' import { createDummyUpdate } from '../../updates/utils.js' import { isInputPeerChannel, toInputChannel } from '../../utils/peer-utils.js' import { resolvePeer } from '../users/resolve-peer.js' + import { deleteScheduledMessages } from './delete-scheduled-messages.js' // @exported diff --git a/packages/core/src/highlevel/methods/messages/delete-scheduled-messages.ts b/packages/core/src/highlevel/methods/messages/delete-scheduled-messages.ts index 9a5d9961..7526d702 100644 --- a/packages/core/src/highlevel/methods/messages/delete-scheduled-messages.ts +++ b/packages/core/src/highlevel/methods/messages/delete-scheduled-messages.ts @@ -1,5 +1,5 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/messages/edit-inline-message.ts b/packages/core/src/highlevel/methods/messages/edit-inline-message.ts index 3ea82e81..8309dea7 100644 --- a/packages/core/src/highlevel/methods/messages/edit-inline-message.ts +++ b/packages/core/src/highlevel/methods/messages/edit-inline-message.ts @@ -1,7 +1,8 @@ import { tl } from '@mtcute/tl' -import { ITelegramClient } from '../../client.types.js' -import { BotKeyboard, InputMediaLike, InputText, ReplyMarkup } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputMediaLike, InputText, ReplyMarkup } from '../../types/index.js' +import { BotKeyboard } from '../../types/index.js' import { normalizeInlineId } from '../../utils/inline-utils.js' import { _normalizeInputMedia } from '../files/normalize-input-media.js' import { _normalizeInputText } from '../misc/normalize-text.js' @@ -63,9 +64,9 @@ export async function editInlineMessage( progressCallback?: (uploaded: number, total: number) => void }, ): Promise { - let content: string | undefined = undefined + let content: string | undefined let entities: tl.TypeMessageEntity[] | undefined - let media: tl.TypeInputMedia | undefined = undefined + let media: tl.TypeInputMedia | undefined const id = normalizeInlineId(params.messageId) diff --git a/packages/core/src/highlevel/methods/messages/edit-message.ts b/packages/core/src/highlevel/methods/messages/edit-message.ts index 34035e5b..4fefd8bf 100644 --- a/packages/core/src/highlevel/methods/messages/edit-message.ts +++ b/packages/core/src/highlevel/methods/messages/edit-message.ts @@ -1,18 +1,21 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { ITelegramClient } from '../../client.types.js' -import { - BotKeyboard, +import type { ITelegramClient } from '../../client.types.js' +import type { InputMediaLike, InputMessageId, InputText, Message, - normalizeInputMessageId, ReplyMarkup, } from '../../types/index.js' +import { + BotKeyboard, + normalizeInputMessageId, +} from '../../types/index.js' import { _normalizeInputMedia } from '../files/normalize-input-media.js' import { _normalizeInputText } from '../misc/normalize-text.js' import { resolvePeer } from '../users/resolve-peer.js' + import { _maybeInvokeWithBusinessConnection } from './_business-connection.js' import { _findMessageInUpdate } from './find-in-update.js' @@ -81,9 +84,9 @@ export async function editMessage( }, ): Promise { const { chatId, message } = normalizeInputMessageId(params) - let content: string | undefined = undefined + let content: string | undefined let entities: tl.TypeMessageEntity[] | undefined - let media: tl.TypeInputMedia | undefined = undefined + let media: tl.TypeInputMedia | undefined if (params.media) { media = await _normalizeInputMedia(client, params.media, params) diff --git a/packages/core/src/highlevel/methods/messages/find-in-update.ts b/packages/core/src/highlevel/methods/messages/find-in-update.ts index 38a6b2d4..885a1a4d 100644 --- a/packages/core/src/highlevel/methods/messages/find-in-update.ts +++ b/packages/core/src/highlevel/methods/messages/find-in-update.ts @@ -1,8 +1,7 @@ -/* eslint-disable max-params,no-lonely-if */ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtTypeAssertionError } from '../../../types/errors.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { Message } from '../../types/messages/index.js' import { PeersIndex } from '../../types/peers/index.js' import { assertIsUpdatesGroup } from '../../updates/utils.js' @@ -60,10 +59,10 @@ export function _findMessageInUpdate( if ( !( ( - u._ === 'updateEditMessage' || - u._ === 'updateEditChannelMessage' || - u._ === 'updateBotEditBusinessMessage' || - u._ === 'updateBotNewBusinessMessage' + u._ === 'updateEditMessage' + || u._ === 'updateEditChannelMessage' + || u._ === 'updateBotEditBusinessMessage' + || u._ === 'updateBotNewBusinessMessage' ) // for whatever reason ) ) { @@ -72,11 +71,11 @@ export function _findMessageInUpdate( } else { if ( !( - u._ === 'updateNewMessage' || - u._ === 'updateNewChannelMessage' || - u._ === 'updateNewScheduledMessage' || - u._ === 'updateQuickReplyMessage' || - u._ === 'updateBotNewBusinessMessage' + u._ === 'updateNewMessage' + || u._ === 'updateNewChannelMessage' + || u._ === 'updateNewScheduledMessage' + || u._ === 'updateQuickReplyMessage' + || u._ === 'updateBotNewBusinessMessage' ) ) { continue diff --git a/packages/core/src/highlevel/methods/messages/forward-messages.ts b/packages/core/src/highlevel/methods/messages/forward-messages.ts index 88a80924..62f300c3 100644 --- a/packages/core/src/highlevel/methods/messages/forward-messages.ts +++ b/packages/core/src/highlevel/methods/messages/forward-messages.ts @@ -1,10 +1,12 @@ import { MtArgumentError } from '../../../types/errors.js' import { randomLong } from '../../../utils/long-utils.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, Message, PeersIndex } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { Message, PeersIndex } from '../../types/index.js' import { assertIsUpdatesGroup } from '../../updates/utils.js' import { normalizeDate } from '../../utils/misc-utils.js' import { resolvePeer } from '../users/resolve-peer.js' + import { _normalizeQuickReplyShortcut } from './send-common.js' // @exported @@ -151,6 +153,6 @@ export async function forwardMessages( return forwardMessagesById(client, { ...rest, fromChatId: messages[0].chat.inputPeer, - messages: messages.map((it) => it.id), + messages: messages.map(it => it.id), }) } diff --git a/packages/core/src/highlevel/methods/messages/get-all-scheduled-messages.ts b/packages/core/src/highlevel/methods/messages/get-all-scheduled-messages.ts index dd14daf5..b6216adc 100644 --- a/packages/core/src/highlevel/methods/messages/get-all-scheduled-messages.ts +++ b/packages/core/src/highlevel/methods/messages/get-all-scheduled-messages.ts @@ -1,8 +1,9 @@ import Long from 'long' import { assertTypeIsNot } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, Message, PeersIndex } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { Message, PeersIndex } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/messages/get-available-effects.ts b/packages/core/src/highlevel/methods/messages/get-available-effects.ts index d82c6df9..ef110ae1 100644 --- a/packages/core/src/highlevel/methods/messages/get-available-effects.ts +++ b/packages/core/src/highlevel/methods/messages/get-available-effects.ts @@ -1,8 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { LongMap } from '../../../utils/long-utils.js' import { assertTypeIsNot } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { MessageEffect } from '../../types/index.js' // @available=user @@ -24,5 +24,5 @@ export async function getAvailableMessageEffects(client: ITelegramClient): Promi documentsMap.set(doc.id, doc) } - return res.effects.map((effect) => new MessageEffect(effect, documentsMap)) + return res.effects.map(effect => new MessageEffect(effect, documentsMap)) } diff --git a/packages/core/src/highlevel/methods/messages/get-callback-query-message.ts b/packages/core/src/highlevel/methods/messages/get-callback-query-message.ts index 83872c7f..eb5d7d2a 100644 --- a/packages/core/src/highlevel/methods/messages/get-callback-query-message.ts +++ b/packages/core/src/highlevel/methods/messages/get-callback-query-message.ts @@ -1,9 +1,10 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertTypeIsNot } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { Message } from '../../types/messages/message.js' -import { InputPeerLike, PeersIndex } from '../../types/peers/index.js' +import type { InputPeerLike } from '../../types/peers/index.js' +import { PeersIndex } from '../../types/peers/index.js' import type { CallbackQuery } from '../../types/updates/callback-query.js' import { isInputPeerChannel, toInputChannel } from '../../utils/peer-utils.js' import { resolvePeer } from '../users/resolve-peer.js' @@ -16,13 +17,13 @@ import { resolvePeer } from '../users/resolve-peer.js' export async function getCallbackQueryMessage( client: ITelegramClient, id: - | CallbackQuery - | tl.RawUpdateBotCallbackQuery - | { - messageId: number - queryId: tl.Long - peer: InputPeerLike - }, + | CallbackQuery + | tl.RawUpdateBotCallbackQuery + | { + messageId: number + queryId: tl.Long + peer: InputPeerLike + }, ): Promise { let msgId: number let queryId: tl.Long @@ -51,13 +52,13 @@ export async function getCallbackQueryMessage( const isChannel = isInputPeerChannel(peer) const res = await client.call( - isChannel ? - { + isChannel + ? { _: 'channels.getMessages', id: [inputMessage], channel: toInputChannel(peer), - } : - { + } + : { _: 'messages.getMessages', id: [inputMessage], }, diff --git a/packages/core/src/highlevel/methods/messages/get-discussion-message.ts b/packages/core/src/highlevel/methods/messages/get-discussion-message.ts index 31a53b4e..0cd02af2 100644 --- a/packages/core/src/highlevel/methods/messages/get-discussion-message.ts +++ b/packages/core/src/highlevel/methods/messages/get-discussion-message.ts @@ -1,8 +1,10 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { ITelegramClient } from '../../client.types.js' -import { InputMessageId, Message, normalizeInputMessageId } from '../../types/messages/index.js' -import { InputPeerLike, PeersIndex } from '../../types/peers/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputMessageId } from '../../types/messages/index.js' +import { Message, normalizeInputMessageId } from '../../types/messages/index.js' +import type { InputPeerLike } from '../../types/peers/index.js' +import { PeersIndex } from '../../types/peers/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** @internal */ @@ -25,7 +27,7 @@ export async function _getDiscussionMessage( } const msg = res.messages[0] - const chat = res.chats.find((it) => it.id === (msg.peerId as tl.RawPeerChannel).channelId)! as tl.RawChannel + const chat = res.chats.find(it => it.id === (msg.peerId as tl.RawPeerChannel).channelId)! as tl.RawChannel return [ { diff --git a/packages/core/src/highlevel/methods/messages/get-fact-check.ts b/packages/core/src/highlevel/methods/messages/get-fact-check.ts index 321b86e0..3d462c17 100644 --- a/packages/core/src/highlevel/methods/messages/get-fact-check.ts +++ b/packages/core/src/highlevel/methods/messages/get-fact-check.ts @@ -1,6 +1,6 @@ -import { MaybeArray } from '../../../types/utils.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { MaybeArray } from '../../../types/utils.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { FactCheck } from '../../types/messages/fact-check.js' import { resolvePeer } from '../users/resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/messages/get-history.ts b/packages/core/src/highlevel/methods/messages/get-history.ts index 29aecff4..3a1063b0 100644 --- a/packages/core/src/highlevel/methods/messages/get-history.ts +++ b/packages/core/src/highlevel/methods/messages/get-history.ts @@ -1,10 +1,10 @@ import Long from 'long' - -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertTypeIsNot } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { ArrayPaginated, InputPeerLike, Message, PeersIndex } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { ArrayPaginated, InputPeerLike } from '../../types/index.js' +import { Message, PeersIndex } from '../../types/index.js' import { makeArrayPaginated } from '../../utils/index.js' import { resolvePeer } from '../users/resolve-peer.js' @@ -119,17 +119,17 @@ export async function getHistory( assertTypeIsNot('getHistory', res, 'messages.messagesNotModified') const peers = PeersIndex.from(res) - const msgs = res.messages.filter((msg) => msg._ !== 'messageEmpty').map((msg) => new Message(msg, peers)) + const msgs = res.messages.filter(msg => msg._ !== 'messageEmpty').map(msg => new Message(msg, peers)) if (reverse) msgs.reverse() const last = msgs[msgs.length - 1] - const next = last ? - { + const next = last + ? { id: last.id + (reverse ? 1 : 0), date: last.raw.date, - } : - undefined + } + : undefined return makeArrayPaginated(msgs, (res as tl.messages.RawMessagesSlice).count ?? msgs.length, next) } diff --git a/packages/core/src/highlevel/methods/messages/get-message-by-link.ts b/packages/core/src/highlevel/methods/messages/get-message-by-link.ts index 5adb6415..cca9f110 100644 --- a/packages/core/src/highlevel/methods/messages/get-message-by-link.ts +++ b/packages/core/src/highlevel/methods/messages/get-message-by-link.ts @@ -1,9 +1,10 @@ import { MtArgumentError } from '../../../types/errors.js' import { links } from '../../../utils/links/index.js' import { toggleChannelIdMark } from '../../../utils/peer-utils.js' -import { ITelegramClient } from '../../client.types.js' -import { Message } from '../../types/messages/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { Message } from '../../types/messages/index.js' import { resolvePeer } from '../users/resolve-peer.js' + import { _getDiscussionMessage } from './get-discussion-message.js' import { getMessages } from './get-messages.js' diff --git a/packages/core/src/highlevel/methods/messages/get-message-group.ts b/packages/core/src/highlevel/methods/messages/get-message-group.ts index 7ed26ec3..f9395cf2 100644 --- a/packages/core/src/highlevel/methods/messages/get-message-group.ts +++ b/packages/core/src/highlevel/methods/messages/get-message-group.ts @@ -1,9 +1,11 @@ import { MtArgumentError } from '../../../types/errors.js' import { isPresent } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputMessageId, Message, normalizeInputMessageId } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputMessageId, Message } from '../../types/index.js' +import { normalizeInputMessageId } from '../../types/index.js' import { isInputPeerChannel } from '../../utils/peer-utils.js' import { resolvePeer } from '../users/resolve-peer.js' + import { getMessages } from './get-messages.js' /** @@ -32,9 +34,9 @@ export async function getMessageGroup(client: ITelegramClient, params: InputMess } const messages = await getMessages(client, chatId, ids) - const groupedId = messages.find((it) => it?.id === message)!.groupedId + const groupedId = messages.find(it => it?.id === message)!.groupedId if (!groupedId) throw new MtArgumentError('This message is not grouped') - return messages.filter(isPresent).filter((it) => it.groupedId?.eq(groupedId)) + return messages.filter(isPresent).filter(it => it.groupedId?.eq(groupedId)) } diff --git a/packages/core/src/highlevel/methods/messages/get-message-reactions.ts b/packages/core/src/highlevel/methods/messages/get-message-reactions.ts index 36bd1f85..1a73945d 100644 --- a/packages/core/src/highlevel/methods/messages/get-message-reactions.ts +++ b/packages/core/src/highlevel/methods/messages/get-message-reactions.ts @@ -1,7 +1,8 @@ import { getMarkedPeerId } from '../../../utils/peer-utils.js' import { assertTypeIs } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, Message, MessageReactions, PeersIndex } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike, Message } from '../../types/index.js' +import { MessageReactions, PeersIndex } from '../../types/index.js' import { assertIsUpdatesGroup } from '../../updates/utils.js' import { resolvePeer } from '../users/resolve-peer.js' @@ -46,7 +47,7 @@ export async function getMessageReactionsById( index[update.msgId] = new MessageReactions(update.msgId, getMarkedPeerId(update.peer), update.reactions, peers) } - return messages.map((messageId) => index[messageId] ?? null) + return messages.map(messageId => index[messageId] ?? null) } /** @@ -69,6 +70,6 @@ export async function getMessageReactions( return getMessageReactionsById( client, messages[0].chat.inputPeer, - messages.map((it) => it.id), + messages.map(it => it.id), ) } diff --git a/packages/core/src/highlevel/methods/messages/get-messages-unsafe.ts b/packages/core/src/highlevel/methods/messages/get-messages-unsafe.ts index b69cf050..578a09e4 100644 --- a/packages/core/src/highlevel/methods/messages/get-messages-unsafe.ts +++ b/packages/core/src/highlevel/methods/messages/get-messages-unsafe.ts @@ -1,8 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { MaybeArray } from '../../../types/utils.js' +import type { MaybeArray } from '../../../types/utils.js' import { assertTypeIsNot } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { Message, PeersIndex } from '../../types/index.js' /** @@ -16,7 +16,7 @@ import { Message, PeersIndex } from '../../types/index.js' * returned at that position. * * @param messageIds Messages IDs - * @param [fromReply=false] + * @param [fromReply] * Whether the reply to a given message should be fetched * (i.e. `getMessages(msg.chat.id, msg.id, true).id === msg.replyToMessageId`) */ @@ -28,7 +28,7 @@ export async function getMessagesUnsafe( if (!Array.isArray(messageIds)) messageIds = [messageIds] const type = fromReply ? 'inputMessageReplyTo' : 'inputMessageID' - const ids: tl.TypeInputMessage[] = messageIds.map((it) => ({ + const ids: tl.TypeInputMessage[] = messageIds.map(it => ({ _: type, id: it, })) diff --git a/packages/core/src/highlevel/methods/messages/get-messages.ts b/packages/core/src/highlevel/methods/messages/get-messages.ts index 969a0ca1..19d8da58 100644 --- a/packages/core/src/highlevel/methods/messages/get-messages.ts +++ b/packages/core/src/highlevel/methods/messages/get-messages.ts @@ -1,10 +1,11 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { MaybeArray } from '../../../types/utils.js' +import type { MaybeArray } from '../../../types/utils.js' import { assertTypeIsNot } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { Message } from '../../types/messages/index.js' -import { InputPeerLike, PeersIndex } from '../../types/peers/index.js' +import type { InputPeerLike } from '../../types/peers/index.js' +import { PeersIndex } from '../../types/peers/index.js' import { isInputPeerChannel, toInputChannel } from '../../utils/peer-utils.js' import { resolvePeer } from '../users/resolve-peer.js' @@ -17,7 +18,7 @@ import { resolvePeer } from '../users/resolve-peer.js' * * @param chatId Chat's marked ID, its username, phone or `"me"` or `"self"` * @param messageIds Messages IDs - * @param [fromReply=false] + * @param [fromReply] * Whether the reply to a given message should be fetched * (i.e. `getMessages(msg.chat.id, msg.id, true).id === msg.replyToMessageId`) */ @@ -31,7 +32,7 @@ export async function getMessages( if (!Array.isArray(messageIds)) messageIds = [messageIds] const type = fromReply ? 'inputMessageReplyTo' : 'inputMessageID' - const ids: tl.TypeInputMessage[] = messageIds.map((it) => ({ + const ids: tl.TypeInputMessage[] = messageIds.map(it => ({ _: type, id: it, })) @@ -39,13 +40,13 @@ export async function getMessages( const isChannel = isInputPeerChannel(peer) const res = await client.call( - isChannel ? - { + isChannel + ? { _: 'channels.getMessages', id: ids, channel: toInputChannel(peer), - } : - { + } + : { _: 'messages.getMessages', id: ids, }, @@ -55,7 +56,7 @@ export async function getMessages( const peers = PeersIndex.from(res) - let selfId: number | null | undefined = undefined + let selfId: number | null | undefined return res.messages.map((msg) => { if (msg._ === 'messageEmpty') return null diff --git a/packages/core/src/highlevel/methods/messages/get-reaction-users.ts b/packages/core/src/highlevel/methods/messages/get-reaction-users.ts index 4c7753dd..f346b736 100644 --- a/packages/core/src/highlevel/methods/messages/get-reaction-users.ts +++ b/packages/core/src/highlevel/methods/messages/get-reaction-users.ts @@ -1,12 +1,14 @@ -import { ITelegramClient } from '../../client.types.js' -import { +import type { ITelegramClient } from '../../client.types.js' +import type { ArrayPaginated, InputMessageId, InputReaction, - normalizeInputMessageId, - normalizeInputReaction, +} from '../../types/index.js' +import { PeerReaction, PeersIndex, + normalizeInputMessageId, + normalizeInputReaction, } from '../../types/index.js' import { makeArrayPaginated } from '../../utils/index.js' import { resolvePeer } from '../users/resolve-peer.js' @@ -59,7 +61,7 @@ export async function getReactionUsers( const peers = PeersIndex.from(res) return makeArrayPaginated( - res.reactions.map((it) => new PeerReaction(it, peers)), + res.reactions.map(it => new PeerReaction(it, peers)), res.count, res.nextOffset, ) diff --git a/packages/core/src/highlevel/methods/messages/get-reply-to.ts b/packages/core/src/highlevel/methods/messages/get-reply-to.ts index caac3236..f930df97 100644 --- a/packages/core/src/highlevel/methods/messages/get-reply-to.ts +++ b/packages/core/src/highlevel/methods/messages/get-reply-to.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { Message } from '../../types/messages/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { Message } from '../../types/messages/index.js' + import { getMessages } from './get-messages.js' import { getMessagesUnsafe } from './get-messages-unsafe.js' diff --git a/packages/core/src/highlevel/methods/messages/get-scheduled-messages.ts b/packages/core/src/highlevel/methods/messages/get-scheduled-messages.ts index 24f6df23..64bc2053 100644 --- a/packages/core/src/highlevel/methods/messages/get-scheduled-messages.ts +++ b/packages/core/src/highlevel/methods/messages/get-scheduled-messages.ts @@ -1,7 +1,8 @@ -import { MaybeArray } from '../../../types/utils.js' +import type { MaybeArray } from '../../../types/utils.js' import { assertTypeIsNot } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, Message, PeersIndex } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { Message, PeersIndex } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/messages/iter-history.ts b/packages/core/src/highlevel/methods/messages/iter-history.ts index 6bb80793..7f486372 100644 --- a/packages/core/src/highlevel/methods/messages/iter-history.ts +++ b/packages/core/src/highlevel/methods/messages/iter-history.ts @@ -1,6 +1,7 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, Message } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike, Message } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' + import { getHistory } from './get-history.js' /** diff --git a/packages/core/src/highlevel/methods/messages/iter-reaction-users.ts b/packages/core/src/highlevel/methods/messages/iter-reaction-users.ts index 7bb8c556..22071e61 100644 --- a/packages/core/src/highlevel/methods/messages/iter-reaction-users.ts +++ b/packages/core/src/highlevel/methods/messages/iter-reaction-users.ts @@ -1,6 +1,8 @@ -import { ITelegramClient } from '../../client.types.js' -import { normalizeInputMessageId, normalizeInputReaction, PeerReaction } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { PeerReaction } from '../../types/index.js' +import { normalizeInputMessageId, normalizeInputReaction } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' + import { getReactionUsers } from './get-reaction-users.js' /** diff --git a/packages/core/src/highlevel/methods/messages/iter-search-global.ts b/packages/core/src/highlevel/methods/messages/iter-search-global.ts index b431cf42..5c20806c 100644 --- a/packages/core/src/highlevel/methods/messages/iter-search-global.ts +++ b/packages/core/src/highlevel/methods/messages/iter-search-global.ts @@ -1,6 +1,8 @@ -import { ITelegramClient } from '../../client.types.js' -import { Message, SearchFilters } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { Message } from '../../types/index.js' +import { SearchFilters } from '../../types/index.js' import { normalizeDate } from '../../utils/index.js' + import { searchGlobal } from './search-global.js' /** diff --git a/packages/core/src/highlevel/methods/messages/iter-search-messages.ts b/packages/core/src/highlevel/methods/messages/iter-search-messages.ts index cc5dd005..9a345fe0 100644 --- a/packages/core/src/highlevel/methods/messages/iter-search-messages.ts +++ b/packages/core/src/highlevel/methods/messages/iter-search-messages.ts @@ -1,7 +1,9 @@ -import { ITelegramClient } from '../../client.types.js' -import { Message, SearchFilters } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { Message } from '../../types/index.js' +import { SearchFilters } from '../../types/index.js' import { normalizeDate } from '../../utils/misc-utils.js' import { resolvePeer } from '../users/resolve-peer.js' + import { searchMessages } from './search-messages.js' /** diff --git a/packages/core/src/highlevel/methods/messages/pin-message.ts b/packages/core/src/highlevel/methods/messages/pin-message.ts index da8e15b1..49ab8ece 100644 --- a/packages/core/src/highlevel/methods/messages/pin-message.ts +++ b/packages/core/src/highlevel/methods/messages/pin-message.ts @@ -1,6 +1,8 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputMessageId, Message, normalizeInputMessageId } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputMessageId, Message } from '../../types/index.js' +import { normalizeInputMessageId } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' + import { _findMessageInUpdate } from './find-in-update.js' /** diff --git a/packages/core/src/highlevel/methods/messages/read-history.ts b/packages/core/src/highlevel/methods/messages/read-history.ts index 279e7bd7..4ee4d127 100644 --- a/packages/core/src/highlevel/methods/messages/read-history.ts +++ b/packages/core/src/highlevel/methods/messages/read-history.ts @@ -1,6 +1,6 @@ import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { createDummyUpdate } from '../../updates/utils.js' import { isInputPeerChannel, toInputChannel } from '../../utils/peer-utils.js' import { resolvePeer } from '../users/resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/messages/read-reactions.ts b/packages/core/src/highlevel/methods/messages/read-reactions.ts index adf448e9..3303fba0 100644 --- a/packages/core/src/highlevel/methods/messages/read-reactions.ts +++ b/packages/core/src/highlevel/methods/messages/read-reactions.ts @@ -1,5 +1,5 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { createDummyUpdate } from '../../updates/utils.js' import { resolvePeer } from '../users/resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/messages/search-global.ts b/packages/core/src/highlevel/methods/messages/search-global.ts index 40265b44..07b2dd97 100644 --- a/packages/core/src/highlevel/methods/messages/search-global.ts +++ b/packages/core/src/highlevel/methods/messages/search-global.ts @@ -1,8 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertTypeIsNot } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { ArrayPaginated, Message, PeersIndex, SearchFilters } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { ArrayPaginated } from '../../types/index.js' +import { Message, PeersIndex, SearchFilters } from '../../types/index.js' import { makeArrayPaginated, normalizeDate } from '../../utils/index.js' // @exported @@ -99,17 +100,17 @@ export async function searchGlobal( assertTypeIsNot('searchGlobal', res, 'messages.messagesNotModified') const peers = PeersIndex.from(res) - const msgs = res.messages.filter((msg) => msg._ !== 'messageEmpty').map((msg) => new Message(msg, peers)) + const msgs = res.messages.filter(msg => msg._ !== 'messageEmpty').map(msg => new Message(msg, peers)) const last = msgs[msgs.length - 1] - const next = last ? - { + const next = last + ? { rate: (res as tl.messages.RawMessagesSlice).nextRate ?? last.raw.date, peer: last.chat.inputPeer, id: last.id, - } : - undefined + } + : undefined return makeArrayPaginated(msgs, (res as tl.messages.RawMessagesSlice).count ?? msgs.length, next) } diff --git a/packages/core/src/highlevel/methods/messages/search-hashtag.ts b/packages/core/src/highlevel/methods/messages/search-hashtag.ts index e0d6c15e..3f275087 100644 --- a/packages/core/src/highlevel/methods/messages/search-hashtag.ts +++ b/packages/core/src/highlevel/methods/messages/search-hashtag.ts @@ -1,9 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertTypeIsNot } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { Message, PeersIndex } from '../../types/index.js' -import { ArrayPaginated } from '../../types/utils.js' +import type { ArrayPaginated } from '../../types/utils.js' import { makeArrayPaginated } from '../../utils/misc-utils.js' // @exported @@ -49,16 +49,16 @@ export async function searchHashtag( assertTypeIsNot('searchHashtag', res, 'messages.messagesNotModified') const peers = PeersIndex.from(res) - const msgs = res.messages.filter((msg) => msg._ !== 'messageEmpty').map((msg) => new Message(msg, peers)) + const msgs = res.messages.filter(msg => msg._ !== 'messageEmpty').map(msg => new Message(msg, peers)) const last = msgs[msgs.length - 1] - const next = last ? - { + const next = last + ? { rate: (res as tl.messages.RawMessagesSlice).nextRate ?? last.raw.date, peer: last.chat.inputPeer, id: last.id, - } : - undefined + } + : undefined return makeArrayPaginated(msgs, (res as tl.messages.RawMessagesSlice).count ?? msgs.length, next) } diff --git a/packages/core/src/highlevel/methods/messages/search-messages.ts b/packages/core/src/highlevel/methods/messages/search-messages.ts index 977909b6..a1a92981 100644 --- a/packages/core/src/highlevel/methods/messages/search-messages.ts +++ b/packages/core/src/highlevel/methods/messages/search-messages.ts @@ -1,10 +1,10 @@ import Long from 'long' - -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertTypeIsNot } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { ArrayPaginated, InputPeerLike, Message, PeersIndex, SearchFilters } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { ArrayPaginated, InputPeerLike } from '../../types/index.js' +import { Message, PeersIndex, SearchFilters } from '../../types/index.js' import { makeArrayPaginated, normalizeDate } from '../../utils/misc-utils.js' import { resolvePeer } from '../users/resolve-peer.js' @@ -154,7 +154,7 @@ export async function searchMessages( const peers = PeersIndex.from(res) - const msgs = res.messages.filter((msg) => msg._ !== 'messageEmpty').map((msg) => new Message(msg, peers)) + const msgs = res.messages.filter(msg => msg._ !== 'messageEmpty').map(msg => new Message(msg, peers)) const last = msgs[msgs.length - 1] const next = last ? last.id : undefined diff --git a/packages/core/src/highlevel/methods/messages/send-answer.ts b/packages/core/src/highlevel/methods/messages/send-answer.ts index 1b63c147..d07229ca 100644 --- a/packages/core/src/highlevel/methods/messages/send-answer.ts +++ b/packages/core/src/highlevel/methods/messages/send-answer.ts @@ -1,6 +1,7 @@ -import { ITelegramClient } from '../../client.types.js' -import { Message } from '../../types/messages/message.js' -import { ParametersSkip2 } from '../../types/utils.js' +import type { ITelegramClient } from '../../client.types.js' +import type { Message } from '../../types/messages/message.js' +import type { ParametersSkip2 } from '../../types/utils.js' + import { sendMedia } from './send-media.js' import { sendMediaGroup } from './send-media-group.js' import { sendText } from './send-text.js' diff --git a/packages/core/src/highlevel/methods/messages/send-comment.ts b/packages/core/src/highlevel/methods/messages/send-comment.ts index e61dc532..de93616b 100644 --- a/packages/core/src/highlevel/methods/messages/send-comment.ts +++ b/packages/core/src/highlevel/methods/messages/send-comment.ts @@ -1,7 +1,8 @@ import { MtArgumentError } from '../../../types/errors.js' -import { ITelegramClient } from '../../client.types.js' -import { Message } from '../../types/messages/message.js' -import { ParametersSkip2 } from '../../types/utils.js' +import type { ITelegramClient } from '../../client.types.js' +import type { Message } from '../../types/messages/message.js' +import type { ParametersSkip2 } from '../../types/utils.js' + import { sendMedia } from './send-media.js' import { sendMediaGroup } from './send-media-group.js' import { replyMedia, replyMediaGroup, replyText } from './send-reply.js' diff --git a/packages/core/src/highlevel/methods/messages/send-common.ts b/packages/core/src/highlevel/methods/messages/send-common.ts index ccfc0d21..76a42cb6 100644 --- a/packages/core/src/highlevel/methods/messages/send-common.ts +++ b/packages/core/src/highlevel/methods/messages/send-common.ts @@ -1,16 +1,16 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtArgumentError } from '../../../types/errors.js' import { getMarkedPeerId } from '../../../utils/peer-utils.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { MtMessageNotFoundError } from '../../types/errors.js' -import { Message } from '../../types/messages/message.js' -import { TextWithEntities } from '../../types/misc/entities.js' -import { InputPeerLike } from '../../types/peers/index.js' +import type { Message } from '../../types/messages/message.js' +import type { TextWithEntities } from '../../types/misc/entities.js' +import type { InputPeerLike } from '../../types/peers/index.js' import { normalizeDate, normalizeMessageId } from '../../utils/index.js' import { _getPeerChainId } from '../misc/chain-id.js' -import { _normalizeInputText } from '../misc/normalize-text.js' import { resolvePeer } from '../users/resolve-peer.js' + import { _getDiscussionMessage } from './get-discussion-message.js' import { getMessages } from './get-messages.js' @@ -156,7 +156,13 @@ export async function _processCommonSendParameters( client: ITelegramClient, chatId: InputPeerLike, params: CommonSendParams, -) { +): Promise<{ + peer: tl.TypeInputPeer + replyTo: tl.TypeInputReplyTo | undefined + scheduleDate: number | undefined + quickReplyShortcut: tl.TypeInputQuickReplyShortcut | undefined + chainId: string + }> { let peer = await resolvePeer(client, chatId) let replyTo = normalizeMessageId(params.replyTo) @@ -182,7 +188,7 @@ export async function _processCommonSendParameters( throw new MtArgumentError('replyTo/commentTo and replyToStory cannot be used together') } - let tlReplyTo: tl.TypeInputReplyTo | undefined = undefined + let tlReplyTo: tl.TypeInputReplyTo | undefined if (replyTo) { tlReplyTo = { @@ -201,10 +207,10 @@ export async function _processCommonSendParameters( } } - let scheduleDate: number | undefined = undefined + let scheduleDate: number | undefined if (params.schedule === 'online') { - scheduleDate = 0x7ffffffe + scheduleDate = 0x7FFFFFFE } else if (params.schedule) { scheduleDate = normalizeDate(params.schedule) } diff --git a/packages/core/src/highlevel/methods/messages/send-copy-group.ts b/packages/core/src/highlevel/methods/messages/send-copy-group.ts index 6b295a4b..317f2cbc 100644 --- a/packages/core/src/highlevel/methods/messages/send-copy-group.ts +++ b/packages/core/src/highlevel/methods/messages/send-copy-group.ts @@ -1,13 +1,14 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtArgumentError } from '../../../types/errors.js' import { isPresent } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { Message } from '../../types/messages/message.js' -import { InputPeerLike } from '../../types/peers/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { Message } from '../../types/messages/message.js' +import type { InputPeerLike } from '../../types/peers/index.js' import { resolvePeer } from '../users/resolve-peer.js' + import { getMessages } from './get-messages.js' -import { CommonSendParams } from './send-common.js' +import type { CommonSendParams } from './send-common.js' import { sendMediaGroup } from './send-media-group.js' // @exported @@ -24,14 +25,14 @@ export interface SendCopyGroupParams extends CommonSendParams { export async function sendCopyGroup( client: ITelegramClient, params: SendCopyGroupParams & - ( - | { - /** Source chat ID */ - fromChatId: InputPeerLike - /** Message IDs to forward */ - messages: number[] - } - | { messages: Message[] } + ( + | { + /** Source chat ID */ + fromChatId: InputPeerLike + /** Message IDs to forward */ + messages: number[] + } + | { messages: Message[] } ), ): Promise { const { toChatId, ...rest } = params @@ -41,7 +42,7 @@ export async function sendCopyGroup( if ('fromChatId' in params) { const fromPeer = await resolvePeer(client, params.fromChatId) - msgs = await getMessages(client, fromPeer, params.messages).then((r) => r.filter(isPresent)) + msgs = await getMessages(client, fromPeer, params.messages).then(r => r.filter(isPresent)) } else { msgs = params.messages } diff --git a/packages/core/src/highlevel/methods/messages/send-copy.ts b/packages/core/src/highlevel/methods/messages/send-copy.ts index d6ffd771..5996559c 100644 --- a/packages/core/src/highlevel/methods/messages/send-copy.ts +++ b/packages/core/src/highlevel/methods/messages/send-copy.ts @@ -1,10 +1,12 @@ import { MtArgumentError } from '../../../types/errors.js' import { getMarkedPeerId } from '../../../utils/peer-utils.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, InputText, Message, MtMessageNotFoundError, ReplyMarkup } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike, InputText, Message, ReplyMarkup } from '../../types/index.js' +import { MtMessageNotFoundError } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' + import { getMessages } from './get-messages.js' -import { CommonSendParams } from './send-common.js' +import type { CommonSendParams } from './send-common.js' import { sendMedia } from './send-media.js' import { sendText } from './send-text.js' @@ -36,14 +38,14 @@ export interface SendCopyParams extends CommonSendParams { export async function sendCopy( client: ITelegramClient, params: SendCopyParams & - ( - | { - /** Source chat ID */ - fromChatId: InputPeerLike - /** Message ID to forward */ - message: number - } - | { message: Message } + ( + | { + /** Source chat ID */ + fromChatId: InputPeerLike + /** Message ID to forward */ + message: number + } + | { message: Message } ), ): Promise { const { toChatId, ...rest } = params diff --git a/packages/core/src/highlevel/methods/messages/send-media-group.ts b/packages/core/src/highlevel/methods/messages/send-media-group.ts index fcf6fec3..394b21dd 100644 --- a/packages/core/src/highlevel/methods/messages/send-media-group.ts +++ b/packages/core/src/highlevel/methods/messages/send-media-group.ts @@ -1,17 +1,19 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { randomLong } from '../../../utils/long-utils.js' -import { ITelegramClient } from '../../client.types.js' -import { InputMediaLike } from '../../types/media/input-media/types.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputMediaLike } from '../../types/media/input-media/types.js' import { Message } from '../../types/messages/message.js' -import { InputPeerLike, PeersIndex } from '../../types/peers/index.js' +import type { InputPeerLike } from '../../types/peers/index.js' +import { PeersIndex } from '../../types/peers/index.js' import { assertIsUpdatesGroup } from '../../updates/utils.js' import { _normalizeInputMedia } from '../files/normalize-input-media.js' import { _normalizeInputText } from '../misc/normalize-text.js' import { resolvePeer } from '../users/resolve-peer.js' + import { _maybeInvokeWithBusinessConnection } from './_business-connection.js' -import { _getDiscussionMessage } from './get-discussion-message.js' -import { _processCommonSendParameters, CommonSendParams } from './send-common.js' +import type { CommonSendParams } from './send-common.js' +import { _processCommonSendParameters } from './send-common.js' /** * Send a group of media. @@ -129,7 +131,7 @@ export async function sendMediaGroup( (u): u is tl.RawUpdateNewMessage | tl.RawUpdateNewChannelMessage | tl.RawUpdateNewScheduledMessage => u._ === 'updateNewMessage' || u._ === 'updateNewChannelMessage' || u._ === 'updateNewScheduledMessage', ) - .map((u) => new Message(u.message, peers, u._ === 'updateNewScheduledMessage')) + .map(u => new Message(u.message, peers, u._ === 'updateNewScheduledMessage')) return msgs } diff --git a/packages/core/src/highlevel/methods/messages/send-media.ts b/packages/core/src/highlevel/methods/messages/send-media.ts index da7254c3..76c9fb07 100644 --- a/packages/core/src/highlevel/methods/messages/send-media.ts +++ b/packages/core/src/highlevel/methods/messages/send-media.ts @@ -1,17 +1,19 @@ import { randomLong } from '../../../utils/long-utils.js' -import { ITelegramClient } from '../../client.types.js' -import { BotKeyboard, ReplyMarkup } from '../../types/bots/keyboards/index.js' -import { InputMediaLike } from '../../types/media/input-media/types.js' -import { Message } from '../../types/messages/message.js' -import { InputText } from '../../types/misc/entities.js' -import { InputPeerLike } from '../../types/peers/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { ReplyMarkup } from '../../types/bots/keyboards/index.js' +import { BotKeyboard } from '../../types/bots/keyboards/index.js' +import type { InputMediaLike } from '../../types/media/input-media/types.js' +import type { Message } from '../../types/messages/message.js' +import type { InputText } from '../../types/misc/entities.js' +import type { InputPeerLike } from '../../types/peers/index.js' import { _normalizeInputMedia } from '../files/normalize-input-media.js' import { _normalizeInputText } from '../misc/normalize-text.js' import { resolvePeer } from '../users/resolve-peer.js' + import { _maybeInvokeWithBusinessConnection } from './_business-connection.js' import { _findMessageInUpdate } from './find-in-update.js' -import { _getDiscussionMessage } from './get-discussion-message.js' -import { _processCommonSendParameters, CommonSendParams } from './send-common.js' +import type { CommonSendParams } from './send-common.js' +import { _processCommonSendParameters } from './send-common.js' /** * Send a single media (a photo or a document-based media) diff --git a/packages/core/src/highlevel/methods/messages/send-quote.ts b/packages/core/src/highlevel/methods/messages/send-quote.ts index caa4eb47..a7225d8c 100644 --- a/packages/core/src/highlevel/methods/messages/send-quote.ts +++ b/packages/core/src/highlevel/methods/messages/send-quote.ts @@ -1,10 +1,11 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtArgumentError } from '../../../types/errors.js' -import { ITelegramClient } from '../../client.types.js' -import { Message } from '../../types/messages/message.js' -import { TextWithEntities } from '../../types/misc/entities.js' -import { InputPeerLike } from '../../types/peers/peer.js' +import type { ITelegramClient } from '../../client.types.js' +import type { Message } from '../../types/messages/message.js' +import type { TextWithEntities } from '../../types/misc/entities.js' +import type { InputPeerLike } from '../../types/peers/peer.js' + import { sendMedia } from './send-media.js' import { sendMediaGroup } from './send-media-group.js' import { sendText } from './send-text.js' diff --git a/packages/core/src/highlevel/methods/messages/send-reaction.ts b/packages/core/src/highlevel/methods/messages/send-reaction.ts index c781b02e..f3013b19 100644 --- a/packages/core/src/highlevel/methods/messages/send-reaction.ts +++ b/packages/core/src/highlevel/methods/messages/send-reaction.ts @@ -1,14 +1,17 @@ -import { MaybeArray } from '../../../types/utils.js' -import { ITelegramClient } from '../../client.types.js' -import { +import type { MaybeArray } from '../../../types/utils.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputMessageId, InputReaction, Message, +} from '../../types/index.js' +import { normalizeInputMessageId, normalizeInputReaction, } from '../../types/index.js' import { assertIsUpdatesGroup } from '../../updates/utils.js' import { resolvePeer } from '../users/resolve-peer.js' + import { _findMessageInUpdate } from './find-in-update.js' /** diff --git a/packages/core/src/highlevel/methods/messages/send-reply.ts b/packages/core/src/highlevel/methods/messages/send-reply.ts index 2f64b325..d4e0cdcd 100644 --- a/packages/core/src/highlevel/methods/messages/send-reply.ts +++ b/packages/core/src/highlevel/methods/messages/send-reply.ts @@ -1,6 +1,7 @@ -import { ITelegramClient } from '../../client.types.js' -import { Message } from '../../types/messages/message.js' -import { ParametersSkip2 } from '../../types/utils.js' +import type { ITelegramClient } from '../../client.types.js' +import type { Message } from '../../types/messages/message.js' +import type { ParametersSkip2 } from '../../types/utils.js' + import { sendMedia } from './send-media.js' import { sendMediaGroup } from './send-media-group.js' import { sendText } from './send-text.js' diff --git a/packages/core/src/highlevel/methods/messages/send-scheduled.ts b/packages/core/src/highlevel/methods/messages/send-scheduled.ts index 3b3777a5..f0963f4c 100644 --- a/packages/core/src/highlevel/methods/messages/send-scheduled.ts +++ b/packages/core/src/highlevel/methods/messages/send-scheduled.ts @@ -1,8 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { MaybeArray } from '../../../types/utils.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, Message, PeersIndex } from '../../types/index.js' +import type { MaybeArray } from '../../../types/utils.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { Message, PeersIndex } from '../../types/index.js' import { assertIsUpdatesGroup } from '../../updates/utils.js' import { resolvePeer } from '../users/resolve-peer.js' @@ -39,7 +40,7 @@ export async function sendScheduled( (u): u is Extract => u._ === 'updateNewMessage' || u._ === 'updateNewChannelMessage', ) - .map((u) => new Message(u.message, peers)) + .map(u => new Message(u.message, peers)) return msgs } diff --git a/packages/core/src/highlevel/methods/messages/send-text.test.ts b/packages/core/src/highlevel/methods/messages/send-text.test.ts index e9320e94..d79d0780 100644 --- a/packages/core/src/highlevel/methods/messages/send-text.test.ts +++ b/packages/core/src/highlevel/methods/messages/send-text.test.ts @@ -1,9 +1,9 @@ import Long from 'long' import { describe, expect, it } from 'vitest' - -import { createStub, StubTelegramClient } from '@mtcute/test' +import { StubTelegramClient, createStub } from '@mtcute/test' import { toggleChannelIdMark } from '../../../utils/peer-utils.js' + import { sendText } from './send-text.js' const stubUser = createStub('user', { @@ -22,7 +22,7 @@ describe('sendText', () => { await client.registerPeers(stubUser) - client.respondWith('messages.sendMessage', (req) => + client.respondWith('messages.sendMessage', req => createStub('updates', { users: [stubUser], updates: [ @@ -45,8 +45,7 @@ describe('sendText', () => { }), }, ], - }), - ) + })) await client.with(async () => { const msg = await sendText(client, stubUser.id, 'test') @@ -64,7 +63,7 @@ describe('sendText', () => { await client.registerPeers(stubChannel, stubUser) - client.respondWith('messages.sendMessage', (req) => + client.respondWith('messages.sendMessage', req => createStub('updates', { users: [stubUser], chats: [stubChannel], @@ -88,8 +87,7 @@ describe('sendText', () => { }), }, ], - }), - ) + })) await client.with(async () => { const markedChannelId = toggleChannelIdMark(stubChannel.id) @@ -119,8 +117,7 @@ describe('sendText', () => { createStub('updateShortSentMessage', { id: 123, out: true, - }), - ) + })) await client.with(async () => { const msg = await sendText(client, stubUser.id, 'test') diff --git a/packages/core/src/highlevel/methods/messages/send-text.ts b/packages/core/src/highlevel/methods/messages/send-text.ts index 78281b86..c6ef394b 100644 --- a/packages/core/src/highlevel/methods/messages/send-text.ts +++ b/packages/core/src/highlevel/methods/messages/send-text.ts @@ -1,22 +1,25 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtTypeAssertionError } from '../../../types/errors.js' import { randomLong } from '../../../utils/long-utils.js' import { getMarkedPeerId } from '../../../utils/peer-utils.js' -import { ITelegramClient } from '../../client.types.js' -import { BotKeyboard, ReplyMarkup } from '../../types/bots/keyboards/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { ReplyMarkup } from '../../types/bots/keyboards/index.js' +import { BotKeyboard } from '../../types/bots/keyboards/index.js' import { Message } from '../../types/messages/message.js' -import { InputText } from '../../types/misc/entities.js' -import { InputPeerLike, PeersIndex } from '../../types/peers/index.js' +import type { InputText } from '../../types/misc/entities.js' +import type { InputPeerLike } from '../../types/peers/index.js' +import { PeersIndex } from '../../types/peers/index.js' import { createDummyUpdate } from '../../updates/utils.js' import { inputPeerToPeer } from '../../utils/peer-utils.js' import { _getRawPeerBatched } from '../chats/batched-queries.js' import { _normalizeInputText } from '../misc/normalize-text.js' import { resolvePeer } from '../users/resolve-peer.js' + import { _maybeInvokeWithBusinessConnection } from './_business-connection.js' import { _findMessageInUpdate } from './find-in-update.js' -import { _getDiscussionMessage } from './get-discussion-message.js' -import { _processCommonSendParameters, CommonSendParams } from './send-common.js' +import type { CommonSendParams } from './send-common.js' +import { _processCommonSendParameters } from './send-common.js' /** * Send a text message diff --git a/packages/core/src/highlevel/methods/messages/send-typing.ts b/packages/core/src/highlevel/methods/messages/send-typing.ts index f4dcfbf2..86b9a108 100644 --- a/packages/core/src/highlevel/methods/messages/send-typing.ts +++ b/packages/core/src/highlevel/methods/messages/send-typing.ts @@ -1,10 +1,11 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertNever } from '../../../types/utils.js' import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, TypingStatus } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike, TypingStatus } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' + import { _maybeInvokeWithBusinessConnection } from './_business-connection.js' /** diff --git a/packages/core/src/highlevel/methods/messages/send-vote.ts b/packages/core/src/highlevel/methods/messages/send-vote.ts index 4327b5ac..a5cbd377 100644 --- a/packages/core/src/highlevel/methods/messages/send-vote.ts +++ b/packages/core/src/highlevel/methods/messages/send-vote.ts @@ -1,11 +1,13 @@ import { MtArgumentError, MtTypeAssertionError } from '../../../types/errors.js' -import { MaybeArray } from '../../../types/utils.js' +import type { MaybeArray } from '../../../types/utils.js' import { getMarkedPeerId } from '../../../utils/peer-utils.js' import { assertTypeIs } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputMessageId, MtMessageNotFoundError, normalizeInputMessageId, PeersIndex, Poll } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputMessageId } from '../../types/index.js' +import { MtMessageNotFoundError, PeersIndex, Poll, normalizeInputMessageId } from '../../types/index.js' import { assertIsUpdatesGroup } from '../../updates/utils.js' import { resolvePeer } from '../users/resolve-peer.js' + import { getMessages } from './get-messages.js' /** @@ -31,9 +33,9 @@ export async function sendVote( const peer = await resolvePeer(client, chatId) - let poll: Poll | undefined = undefined + let poll: Poll | undefined - if (options.some((it) => typeof it === 'number')) { + if (options.some(it => typeof it === 'number')) { const [msg] = await getMessages(client, peer, message) if (!msg) { diff --git a/packages/core/src/highlevel/methods/messages/translate-message.ts b/packages/core/src/highlevel/methods/messages/translate-message.ts index c61b6cbc..66d283ea 100644 --- a/packages/core/src/highlevel/methods/messages/translate-message.ts +++ b/packages/core/src/highlevel/methods/messages/translate-message.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputMessageId, normalizeInputMessageId, TextWithEntities } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputMessageId, TextWithEntities } from '../../types/index.js' +import { normalizeInputMessageId } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/messages/translate-text.ts b/packages/core/src/highlevel/methods/messages/translate-text.ts index 22b5706c..3cfe8f2b 100644 --- a/packages/core/src/highlevel/methods/messages/translate-text.ts +++ b/packages/core/src/highlevel/methods/messages/translate-text.ts @@ -1,6 +1,6 @@ import { MtTypeAssertionError } from '../../../types/errors.js' -import { ITelegramClient } from '../../client.types.js' -import { InputText, TextWithEntities } from '../../types/misc/entities.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputText, TextWithEntities } from '../../types/misc/entities.js' import { _normalizeInputText } from '../misc/normalize-text.js' /** diff --git a/packages/core/src/highlevel/methods/messages/unpin-all-messages.ts b/packages/core/src/highlevel/methods/messages/unpin-all-messages.ts index ad1ede20..136712cd 100644 --- a/packages/core/src/highlevel/methods/messages/unpin-all-messages.ts +++ b/packages/core/src/highlevel/methods/messages/unpin-all-messages.ts @@ -1,5 +1,5 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { createDummyUpdate } from '../../updates/utils.js' import { isInputPeerChannel } from '../../utils/peer-utils.js' import { resolvePeer } from '../users/resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/messages/unpin-message.ts b/packages/core/src/highlevel/methods/messages/unpin-message.ts index 04b940fd..2100ffd0 100644 --- a/packages/core/src/highlevel/methods/messages/unpin-message.ts +++ b/packages/core/src/highlevel/methods/messages/unpin-message.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputMessageId, normalizeInputMessageId } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputMessageId } from '../../types/index.js' +import { normalizeInputMessageId } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/misc/chain-id.ts b/packages/core/src/highlevel/methods/misc/chain-id.ts index c9a786fb..fe9c58fb 100644 --- a/packages/core/src/highlevel/methods/misc/chain-id.ts +++ b/packages/core/src/highlevel/methods/misc/chain-id.ts @@ -1,7 +1,7 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { getMarkedPeerId } from '../../../utils/peer-utils.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' /** @internal */ export function _getPeerChainId(client: ITelegramClient, peer: tl.TypeInputPeer, prefix = 'peer') { diff --git a/packages/core/src/highlevel/methods/misc/get-collectible-info.ts b/packages/core/src/highlevel/methods/misc/get-collectible-info.ts index 4410dcf0..f6425c5d 100644 --- a/packages/core/src/highlevel/methods/misc/get-collectible-info.ts +++ b/packages/core/src/highlevel/methods/misc/get-collectible-info.ts @@ -1,4 +1,4 @@ -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { CollectibleInfo } from '../../types/misc/collectible-info.js' import { normalizePhoneNumber } from '../../utils/misc-utils.js' @@ -14,12 +14,12 @@ export async function getCollectibleInfo( const res = await client.call({ _: 'fragment.getCollectibleInfo', collectible: - kind === 'phone' ? - { + kind === 'phone' + ? { _: 'inputCollectiblePhone', phone: normalizePhoneNumber(item), - } : - { + } + : { _: 'inputCollectibleUsername', username: item, }, diff --git a/packages/core/src/highlevel/methods/misc/init-takeout-session.ts b/packages/core/src/highlevel/methods/misc/init-takeout-session.ts index 4df278db..d339faa2 100644 --- a/packages/core/src/highlevel/methods/misc/init-takeout-session.ts +++ b/packages/core/src/highlevel/methods/misc/init-takeout-session.ts @@ -1,6 +1,6 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { TakeoutSession } from '../../types/index.js' /** diff --git a/packages/core/src/highlevel/methods/misc/normalize-privacy-rules.ts b/packages/core/src/highlevel/methods/misc/normalize-privacy-rules.ts index d09fb4eb..de399601 100644 --- a/packages/core/src/highlevel/methods/misc/normalize-privacy-rules.ts +++ b/packages/core/src/highlevel/methods/misc/normalize-privacy-rules.ts @@ -1,8 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { isPresent } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPrivacyRule } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPrivacyRule } from '../../types/index.js' import { toInputUser } from '../../utils/index.js' import { resolvePeerMany } from '../users/resolve-peer-many.js' diff --git a/packages/core/src/highlevel/methods/misc/normalize-text.ts b/packages/core/src/highlevel/methods/misc/normalize-text.ts index 4ef135aa..d9c7e566 100644 --- a/packages/core/src/highlevel/methods/misc/normalize-text.ts +++ b/packages/core/src/highlevel/methods/misc/normalize-text.ts @@ -1,7 +1,7 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { ITelegramClient } from '../../client.types.js' -import { InputText } from '../../types/misc/entities.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputText } from '../../types/misc/entities.js' import { resolveUser } from '../users/resolve-peer.js' const empty: [string, undefined] = ['', undefined] diff --git a/packages/core/src/highlevel/methods/misc/with-params.ts b/packages/core/src/highlevel/methods/misc/with-params.ts index 248254b2..52bfb4ce 100644 --- a/packages/core/src/highlevel/methods/misc/with-params.ts +++ b/packages/core/src/highlevel/methods/misc/with-params.ts @@ -1,7 +1,7 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { RpcCallOptions } from '../../../network/index.js' -import { ITelegramClient } from '../../client.types.js' +import type { RpcCallOptions } from '../../../network/index.js' +import type { ITelegramClient } from '../../client.types.js' // @skip /** diff --git a/packages/core/src/highlevel/methods/password/change-cloud-password.ts b/packages/core/src/highlevel/methods/password/change-cloud-password.ts index 102e4daf..b6e7188f 100644 --- a/packages/core/src/highlevel/methods/password/change-cloud-password.ts +++ b/packages/core/src/highlevel/methods/password/change-cloud-password.ts @@ -1,5 +1,5 @@ import { MtArgumentError } from '../../../types/errors.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' /** * Change your 2FA password diff --git a/packages/core/src/highlevel/methods/password/enable-cloud-password.ts b/packages/core/src/highlevel/methods/password/enable-cloud-password.ts index 518eecf4..fa862a10 100644 --- a/packages/core/src/highlevel/methods/password/enable-cloud-password.ts +++ b/packages/core/src/highlevel/methods/password/enable-cloud-password.ts @@ -1,6 +1,6 @@ import { MtArgumentError } from '../../../types/errors.js' import { assertTypeIs } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' /** * Enable 2FA password on your account diff --git a/packages/core/src/highlevel/methods/password/password-email.ts b/packages/core/src/highlevel/methods/password/password-email.ts index a721a418..d49be66d 100644 --- a/packages/core/src/highlevel/methods/password/password-email.ts +++ b/packages/core/src/highlevel/methods/password/password-email.ts @@ -1,5 +1,5 @@ import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' /** * Verify an email to use as 2FA recovery method diff --git a/packages/core/src/highlevel/methods/password/remove-cloud-password.ts b/packages/core/src/highlevel/methods/password/remove-cloud-password.ts index e9936207..a2a2b952 100644 --- a/packages/core/src/highlevel/methods/password/remove-cloud-password.ts +++ b/packages/core/src/highlevel/methods/password/remove-cloud-password.ts @@ -1,5 +1,5 @@ import { MtArgumentError } from '../../../types/errors.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' /** * Remove 2FA password from your account diff --git a/packages/core/src/highlevel/methods/premium/apply-boost.ts b/packages/core/src/highlevel/methods/premium/apply-boost.ts index 59851546..c54a757e 100644 --- a/packages/core/src/highlevel/methods/premium/apply-boost.ts +++ b/packages/core/src/highlevel/methods/premium/apply-boost.ts @@ -1,5 +1,5 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/premium/can-apply-boost.ts b/packages/core/src/highlevel/methods/premium/can-apply-boost.ts index 71148135..db1b6524 100644 --- a/packages/core/src/highlevel/methods/premium/can-apply-boost.ts +++ b/packages/core/src/highlevel/methods/premium/can-apply-boost.ts @@ -1,13 +1,14 @@ -import { ITelegramClient } from '../../client.types.js' -import { Chat } from '../../types/index.js' -import { BoostSlot } from '../../types/premium/boost-slot.js' +import type { ITelegramClient } from '../../client.types.js' +import type { Chat } from '../../types/index.js' +import type { BoostSlot } from '../../types/premium/boost-slot.js' + import { getMyBoostSlots } from './get-my-boost-slots.js' // @exported export type CanApplyBoostResult = - | { can: true; replace?: Chat[]; slots: BoostSlot[] } - | { can: false; reason: 'need_premium'; slots: BoostSlot[] } - | { can: false; reason: 'no_slots'; slots: BoostSlot[] } + | { can: true, replace?: Chat[], slots: BoostSlot[] } + | { can: false, reason: 'need_premium', slots: BoostSlot[] } + | { can: false, reason: 'no_slots', slots: BoostSlot[] } /** * Check if the current user can apply boost to some channel @@ -28,16 +29,16 @@ export async function canApplyBoost(client: ITelegramClient): Promise !it.occupied) + const emptySlots = myBoosts.filter(it => !it.occupied) if (emptySlots.length > 0) { return { can: true, slots: myBoosts } } - const replaceableSlots = myBoosts.filter((it) => it.cooldownUntil === null) + const replaceableSlots = myBoosts.filter(it => it.cooldownUntil === null) if (replaceableSlots.length) { - return { can: true, replace: replaceableSlots.map((it) => it.chat!), slots: myBoosts } + return { can: true, replace: replaceableSlots.map(it => it.chat!), slots: myBoosts } } return { can: false, reason: 'no_slots', slots: myBoosts } diff --git a/packages/core/src/highlevel/methods/premium/create-business-chat-link.ts b/packages/core/src/highlevel/methods/premium/create-business-chat-link.ts index dfb7ad5d..89f455d4 100644 --- a/packages/core/src/highlevel/methods/premium/create-business-chat-link.ts +++ b/packages/core/src/highlevel/methods/premium/create-business-chat-link.ts @@ -1,5 +1,5 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputText } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputText } from '../../types/index.js' import { BusinessChatLink } from '../../types/premium/business-chat-link.js' import { _normalizeInputText } from '../misc/normalize-text.js' diff --git a/packages/core/src/highlevel/methods/premium/edit-business-chat-link.ts b/packages/core/src/highlevel/methods/premium/edit-business-chat-link.ts index 3ef74722..3fc89b61 100644 --- a/packages/core/src/highlevel/methods/premium/edit-business-chat-link.ts +++ b/packages/core/src/highlevel/methods/premium/edit-business-chat-link.ts @@ -1,6 +1,6 @@ import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputText } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputText } from '../../types/index.js' import { BusinessChatLink } from '../../types/premium/business-chat-link.js' import { _normalizeInputText } from '../misc/normalize-text.js' diff --git a/packages/core/src/highlevel/methods/premium/get-boost-stats.ts b/packages/core/src/highlevel/methods/premium/get-boost-stats.ts index 4324def0..dd85c783 100644 --- a/packages/core/src/highlevel/methods/premium/get-boost-stats.ts +++ b/packages/core/src/highlevel/methods/premium/get-boost-stats.ts @@ -1,5 +1,5 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { BoostStats } from '../../types/premium/boost-stats.js' import { resolvePeer } from '../users/resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/premium/get-boosts.ts b/packages/core/src/highlevel/methods/premium/get-boosts.ts index e920063f..814b4fe9 100644 --- a/packages/core/src/highlevel/methods/premium/get-boosts.ts +++ b/packages/core/src/highlevel/methods/premium/get-boosts.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { ArrayPaginated, InputPeerLike, PeersIndex } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { ArrayPaginated, InputPeerLike } from '../../types/index.js' +import { PeersIndex } from '../../types/index.js' import { Boost } from '../../types/premium/boost.js' import { makeArrayPaginated } from '../../utils/index.js' import { resolvePeer } from '../users/resolve-peer.js' @@ -36,7 +37,7 @@ export async function getBoosts( const peers = PeersIndex.from(res) return makeArrayPaginated( - res.boosts.map((it) => new Boost(it, peers)), + res.boosts.map(it => new Boost(it, peers)), res.count, res.nextOffset, ) diff --git a/packages/core/src/highlevel/methods/premium/get-business-chat-links.ts b/packages/core/src/highlevel/methods/premium/get-business-chat-links.ts index 039481fe..50cd0267 100644 --- a/packages/core/src/highlevel/methods/premium/get-business-chat-links.ts +++ b/packages/core/src/highlevel/methods/premium/get-business-chat-links.ts @@ -1,4 +1,4 @@ -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { BusinessChatLink } from '../../types/premium/business-chat-link.js' // @available=user @@ -8,5 +8,5 @@ import { BusinessChatLink } from '../../types/premium/business-chat-link.js' export async function getBusinessChatLinks(client: ITelegramClient): Promise { const res = await client.call({ _: 'account.getBusinessChatLinks' }) - return res.links.map((x) => new BusinessChatLink(x)) + return res.links.map(x => new BusinessChatLink(x)) } diff --git a/packages/core/src/highlevel/methods/premium/get-business-connection.ts b/packages/core/src/highlevel/methods/premium/get-business-connection.ts index 296c92d4..86957674 100644 --- a/packages/core/src/highlevel/methods/premium/get-business-connection.ts +++ b/packages/core/src/highlevel/methods/premium/get-business-connection.ts @@ -1,5 +1,5 @@ import { assertTypeIs } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { PeersIndex } from '../../types/peers/peers-index.js' import { BusinessConnection } from '../../types/premium/business-connection.js' import { assertIsUpdatesGroup } from '../../updates/utils.js' diff --git a/packages/core/src/highlevel/methods/premium/get-my-boost-slots.ts b/packages/core/src/highlevel/methods/premium/get-my-boost-slots.ts index e7a57c76..719d8de2 100644 --- a/packages/core/src/highlevel/methods/premium/get-my-boost-slots.ts +++ b/packages/core/src/highlevel/methods/premium/get-my-boost-slots.ts @@ -1,4 +1,4 @@ -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { PeersIndex } from '../../types/index.js' import { BoostSlot } from '../../types/premium/boost-slot.js' @@ -15,5 +15,5 @@ export async function getMyBoostSlots(client: ITelegramClient): Promise new BoostSlot(it, peers)) + return res.myBoosts.map(it => new BoostSlot(it, peers)) } diff --git a/packages/core/src/highlevel/methods/premium/iter-boosters.ts b/packages/core/src/highlevel/methods/premium/iter-boosters.ts index fa6a4b31..30e9fe64 100644 --- a/packages/core/src/highlevel/methods/premium/iter-boosters.ts +++ b/packages/core/src/highlevel/methods/premium/iter-boosters.ts @@ -1,7 +1,8 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' -import { Boost } from '../../types/premium/boost.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import type { Boost } from '../../types/premium/boost.js' import { resolvePeer } from '../users/resolve-peer.js' + import { getBoosts } from './get-boosts.js' /** diff --git a/packages/core/src/highlevel/methods/premium/set-business-intro.ts b/packages/core/src/highlevel/methods/premium/set-business-intro.ts index 1bd8a830..dfdcef63 100644 --- a/packages/core/src/highlevel/methods/premium/set-business-intro.ts +++ b/packages/core/src/highlevel/methods/premium/set-business-intro.ts @@ -1,13 +1,14 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertTrue, assertTypeIs } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputFileLike, InputMediaSticker } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputFileLike, InputMediaSticker } from '../../types/index.js' import { _normalizeFileToDocument } from '../files/normalize-file-to-document.js' import { _normalizeInputMedia } from '../files/normalize-input-media.js' -const isInputMediaSticker = (media: unknown): media is InputMediaSticker => - typeof media === 'object' && media !== null && 'type' in media && media.type === 'sticker' +function isInputMediaSticker(media: unknown): media is InputMediaSticker { + return typeof media === 'object' && media !== null && 'type' in media && media.type === 'sticker' +} // @available=user /** @@ -34,7 +35,7 @@ export async function setBusinessIntro( sticker?: InputMediaSticker | InputFileLike | tl.TypeInputDocument } | null, ): Promise { - let tlIntro: tl.TypeInputBusinessIntro | undefined = undefined + let tlIntro: tl.TypeInputBusinessIntro | undefined if (intro) { let sticker: tl.TypeInputDocument | undefined diff --git a/packages/core/src/highlevel/methods/premium/set-business-work-hours.ts b/packages/core/src/highlevel/methods/premium/set-business-work-hours.ts index 8474e428..e6309916 100644 --- a/packages/core/src/highlevel/methods/premium/set-business-work-hours.ts +++ b/packages/core/src/highlevel/methods/premium/set-business-work-hours.ts @@ -1,8 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { BusinessWorkHoursDay, businessWorkHoursDaysToRaw } from '../../types/premium/business-work-hours.js' +import type { ITelegramClient } from '../../client.types.js' +import type { BusinessWorkHoursDay } from '../../types/premium/business-work-hours.js' +import { businessWorkHoursDaysToRaw } from '../../types/premium/business-work-hours.js' // @available=user /** @@ -12,23 +13,23 @@ export async function setBusinessWorkHours( client: ITelegramClient, params: | ({ - /** Timezone in which the hours are defined */ - timezone: string - } & ( - | { - /** - * Business work intervals, per-day (like available in {@link BusinessWorkHours.days}) - */ - hours: ReadonlyArray - } - | { - /** Business work intervals, raw intervals */ - intervals: tl.TypeBusinessWeeklyOpen[] - } + /** Timezone in which the hours are defined */ + timezone: string + } & ( + | { + /** + * Business work intervals, per-day (like available in {@link BusinessWorkHours.days}) + */ + hours: ReadonlyArray + } + | { + /** Business work intervals, raw intervals */ + intervals: tl.TypeBusinessWeeklyOpen[] + } )) - | null, + | null, ): Promise { - let businessWorkHours: tl.TypeBusinessWorkHours | undefined = undefined + let businessWorkHours: tl.TypeBusinessWorkHours | undefined if (params) { let weeklyOpen: tl.TypeBusinessWeeklyOpen[] diff --git a/packages/core/src/highlevel/methods/stickers/_utils.ts b/packages/core/src/highlevel/methods/stickers/_utils.ts index e446b78e..65b5acb9 100644 --- a/packages/core/src/highlevel/methods/stickers/_utils.ts +++ b/packages/core/src/highlevel/methods/stickers/_utils.ts @@ -1,7 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { ITelegramClient } from '../../client.types.js' -import { InputStickerSetItem, MASK_POSITION_POINT_TO_TL } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputStickerSetItem } from '../../types/index.js' +import { MASK_POSITION_POINT_TO_TL } from '../../types/index.js' import { _normalizeFileToDocument } from '../files/normalize-file-to-document.js' /** @@ -19,14 +20,14 @@ export async function _normalizeInputStickerSetItem( _: 'inputStickerSetItem', document: await _normalizeFileToDocument(client, sticker.file, params ?? {}), emoji: sticker.emojis, - maskCoords: sticker.maskPosition ? - { + maskCoords: sticker.maskPosition + ? { _: 'maskCoords', n: MASK_POSITION_POINT_TO_TL[sticker.maskPosition.point], x: sticker.maskPosition.x, y: sticker.maskPosition.y, zoom: sticker.maskPosition.scale, - } : - undefined, + } + : undefined, } } diff --git a/packages/core/src/highlevel/methods/stickers/add-sticker-to-set.ts b/packages/core/src/highlevel/methods/stickers/add-sticker-to-set.ts index e94ba0e3..7ba2b33d 100644 --- a/packages/core/src/highlevel/methods/stickers/add-sticker-to-set.ts +++ b/packages/core/src/highlevel/methods/stickers/add-sticker-to-set.ts @@ -1,11 +1,13 @@ -import { ITelegramClient } from '../../client.types.js' -import { +import type { ITelegramClient } from '../../client.types.js' +import type { InputStickerSet, InputStickerSetItem, - normalizeInputStickerSet, - StickerSet, } from '../../types/index.js' -import { _normalizeFileToDocument } from '../files/normalize-file-to-document.js' +import { + StickerSet, + normalizeInputStickerSet, +} from '../../types/index.js' + import { _normalizeInputStickerSetItem } from './_utils.js' /** diff --git a/packages/core/src/highlevel/methods/stickers/create-sticker-set.ts b/packages/core/src/highlevel/methods/stickers/create-sticker-set.ts index 2c86201b..bc5e5862 100644 --- a/packages/core/src/highlevel/methods/stickers/create-sticker-set.ts +++ b/packages/core/src/highlevel/methods/stickers/create-sticker-set.ts @@ -1,16 +1,19 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { ITelegramClient } from '../../client.types.js' -import { +import type { ITelegramClient } from '../../client.types.js' +import type { InputFileLike, InputPeerLike, InputStickerSetItem, - StickerSet, StickerSourceType, StickerType, } from '../../types/index.js' +import { + StickerSet, +} from '../../types/index.js' import { _normalizeFileToDocument } from '../files/normalize-file-to-document.js' import { resolveUser } from '../users/resolve-peer.js' + import { _normalizeInputStickerSetItem } from './_utils.js' /** diff --git a/packages/core/src/highlevel/methods/stickers/delete-sticker-from-set.ts b/packages/core/src/highlevel/methods/stickers/delete-sticker-from-set.ts index 0d83108f..2eabc0de 100644 --- a/packages/core/src/highlevel/methods/stickers/delete-sticker-from-set.ts +++ b/packages/core/src/highlevel/methods/stickers/delete-sticker-from-set.ts @@ -1,7 +1,7 @@ import { tdFileId } from '@mtcute/file-id' -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { StickerSet } from '../../types/index.js' import { fileIdToInputDocument } from '../../utils/convert-file-id.js' diff --git a/packages/core/src/highlevel/methods/stickers/get-custom-emojis.ts b/packages/core/src/highlevel/methods/stickers/get-custom-emojis.ts index 2ef7ed34..478fe78a 100644 --- a/packages/core/src/highlevel/methods/stickers/get-custom-emojis.ts +++ b/packages/core/src/highlevel/methods/stickers/get-custom-emojis.ts @@ -1,11 +1,11 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtTypeAssertionError } from '../../../types/errors.js' -import { MaybeArray } from '../../../types/utils.js' +import type { MaybeArray } from '../../../types/utils.js' import { LongSet } from '../../../utils/long-utils.js' import { assertTypeIs } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { Message, Sticker } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { Message, Sticker } from '../../types/index.js' import { parseDocument } from '../../types/media/document-utils.js' /** diff --git a/packages/core/src/highlevel/methods/stickers/get-installed-stickers.ts b/packages/core/src/highlevel/methods/stickers/get-installed-stickers.ts index 05691085..27040646 100644 --- a/packages/core/src/highlevel/methods/stickers/get-installed-stickers.ts +++ b/packages/core/src/highlevel/methods/stickers/get-installed-stickers.ts @@ -1,7 +1,7 @@ import Long from 'long' import { assertTypeIs } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { StickerSet } from '../../types/index.js' /** @@ -19,5 +19,5 @@ export async function getInstalledStickers(client: ITelegramClient): Promise new StickerSet(set)) + return res.sets.map(set => new StickerSet(set)) } diff --git a/packages/core/src/highlevel/methods/stickers/get-my-sticker-sets.ts b/packages/core/src/highlevel/methods/stickers/get-my-sticker-sets.ts index 25e492f1..12540349 100644 --- a/packages/core/src/highlevel/methods/stickers/get-my-sticker-sets.ts +++ b/packages/core/src/highlevel/methods/stickers/get-my-sticker-sets.ts @@ -1,8 +1,8 @@ import Long from 'long' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { StickerSet } from '../../types/misc/sticker-set.js' -import { ArrayPaginated } from '../../types/utils.js' +import type { ArrayPaginated } from '../../types/utils.js' import { makeArrayPaginated } from '../../utils/misc-utils.js' // @available=user @@ -24,7 +24,7 @@ export async function getMyStickerSets( limit: params?.limit ?? 100, }) - const items = res.sets.map((x) => new StickerSet(x)) + const items = res.sets.map(x => new StickerSet(x)) return makeArrayPaginated(items, res.count, items[items.length - 1]?.brief.id) } diff --git a/packages/core/src/highlevel/methods/stickers/get-sticker-set.ts b/packages/core/src/highlevel/methods/stickers/get-sticker-set.ts index b18321dd..7a448173 100644 --- a/packages/core/src/highlevel/methods/stickers/get-sticker-set.ts +++ b/packages/core/src/highlevel/methods/stickers/get-sticker-set.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputStickerSet, normalizeInputStickerSet, StickerSet } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputStickerSet } from '../../types/index.js' +import { StickerSet, normalizeInputStickerSet } from '../../types/index.js' /** * Get a sticker set and stickers inside of it. diff --git a/packages/core/src/highlevel/methods/stickers/move-sticker-in-set.ts b/packages/core/src/highlevel/methods/stickers/move-sticker-in-set.ts index 0b4642d3..b82a2efc 100644 --- a/packages/core/src/highlevel/methods/stickers/move-sticker-in-set.ts +++ b/packages/core/src/highlevel/methods/stickers/move-sticker-in-set.ts @@ -1,7 +1,7 @@ import { tdFileId } from '@mtcute/file-id' -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { StickerSet } from '../../types/index.js' import { fileIdToInputDocument } from '../../utils/convert-file-id.js' diff --git a/packages/core/src/highlevel/methods/stickers/replace-sticker-in-set.ts b/packages/core/src/highlevel/methods/stickers/replace-sticker-in-set.ts index b3809046..ad4b6356 100644 --- a/packages/core/src/highlevel/methods/stickers/replace-sticker-in-set.ts +++ b/packages/core/src/highlevel/methods/stickers/replace-sticker-in-set.ts @@ -1,9 +1,11 @@ import { tdFileId } from '@mtcute/file-id' -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { ITelegramClient } from '../../client.types.js' -import { InputStickerSetItem, StickerSet } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputStickerSetItem } from '../../types/index.js' +import { StickerSet } from '../../types/index.js' import { fileIdToInputDocument } from '../../utils/convert-file-id.js' + import { _normalizeInputStickerSetItem } from './_utils.js' // @available=both diff --git a/packages/core/src/highlevel/methods/stickers/set-chat-sticker-set.ts b/packages/core/src/highlevel/methods/stickers/set-chat-sticker-set.ts index 0199322b..40bc2e16 100644 --- a/packages/core/src/highlevel/methods/stickers/set-chat-sticker-set.ts +++ b/packages/core/src/highlevel/methods/stickers/set-chat-sticker-set.ts @@ -1,6 +1,7 @@ import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, InputStickerSet, normalizeInputStickerSet } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike, InputStickerSet } from '../../types/index.js' +import { normalizeInputStickerSet } from '../../types/index.js' import { resolveChannel } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/stickers/set-sticker-set-thumb.ts b/packages/core/src/highlevel/methods/stickers/set-sticker-set-thumb.ts index 82922d10..60f0fcdd 100644 --- a/packages/core/src/highlevel/methods/stickers/set-sticker-set-thumb.ts +++ b/packages/core/src/highlevel/methods/stickers/set-sticker-set-thumb.ts @@ -1,7 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { ITelegramClient } from '../../client.types.js' -import { InputFileLike, InputStickerSet, normalizeInputStickerSet, StickerSet } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputFileLike, InputStickerSet } from '../../types/index.js' +import { StickerSet, normalizeInputStickerSet } from '../../types/index.js' import { _normalizeFileToDocument } from '../files/normalize-file-to-document.js' /** diff --git a/packages/core/src/highlevel/methods/stories/can-send-story.ts b/packages/core/src/highlevel/methods/stories/can-send-story.ts index 34fd33cf..25f42cdc 100644 --- a/packages/core/src/highlevel/methods/stories/can-send-story.ts +++ b/packages/core/src/highlevel/methods/stories/can-send-story.ts @@ -1,7 +1,7 @@ import { tl } from '@mtcute/tl' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' // @exported diff --git a/packages/core/src/highlevel/methods/stories/delete-stories.ts b/packages/core/src/highlevel/methods/stories/delete-stories.ts index c3fed166..4489ee54 100644 --- a/packages/core/src/highlevel/methods/stories/delete-stories.ts +++ b/packages/core/src/highlevel/methods/stories/delete-stories.ts @@ -1,6 +1,6 @@ -import { MaybeArray } from '../../../types/utils.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { MaybeArray } from '../../../types/utils.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/stories/edit-story.ts b/packages/core/src/highlevel/methods/stories/edit-story.ts index 70a6c04b..487ca322 100644 --- a/packages/core/src/highlevel/methods/stories/edit-story.ts +++ b/packages/core/src/highlevel/methods/stories/edit-story.ts @@ -1,11 +1,12 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { ITelegramClient } from '../../client.types.js' -import { InputMediaLike, InputPeerLike, InputPrivacyRule, InputText, Story } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputMediaLike, InputPeerLike, InputPrivacyRule, InputText, Story } from '../../types/index.js' import { _normalizeInputMedia } from '../files/normalize-input-media.js' import { _normalizePrivacyRules } from '../misc/normalize-privacy-rules.js' import { _normalizeInputText } from '../misc/normalize-text.js' import { resolvePeer } from '../users/resolve-peer.js' + import { _findStoryInUpdate } from './find-in-update.js' /** @@ -53,9 +54,9 @@ export async function editStory( ): Promise { const { id, peer = 'me', interactiveElements } = params - let caption: string | undefined = undefined + let caption: string | undefined let entities: tl.TypeMessageEntity[] | undefined - let media: tl.TypeInputMedia | undefined = undefined + let media: tl.TypeInputMedia | undefined if (params.media) { media = await _normalizeInputMedia(client, params.media) diff --git a/packages/core/src/highlevel/methods/stories/find-in-update.ts b/packages/core/src/highlevel/methods/stories/find-in-update.ts index 8f0f6644..04d745c0 100644 --- a/packages/core/src/highlevel/methods/stories/find-in-update.ts +++ b/packages/core/src/highlevel/methods/stories/find-in-update.ts @@ -1,8 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtTypeAssertionError } from '../../../types/errors.js' import { assertTypeIs, hasValueAtKey } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { PeersIndex, Story } from '../../types/index.js' import { assertIsUpdatesGroup } from '../../updates/utils.js' diff --git a/packages/core/src/highlevel/methods/stories/get-all-stories.ts b/packages/core/src/highlevel/methods/stories/get-all-stories.ts index da22f9a1..870a3ed0 100644 --- a/packages/core/src/highlevel/methods/stories/get-all-stories.ts +++ b/packages/core/src/highlevel/methods/stories/get-all-stories.ts @@ -1,5 +1,5 @@ import { assertTypeIsNot } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { AllStories } from '../../types/index.js' /** diff --git a/packages/core/src/highlevel/methods/stories/get-peer-stories.ts b/packages/core/src/highlevel/methods/stories/get-peer-stories.ts index 90f88b90..e96068d8 100644 --- a/packages/core/src/highlevel/methods/stories/get-peer-stories.ts +++ b/packages/core/src/highlevel/methods/stories/get-peer-stories.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, PeersIndex, PeerStories } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { PeerStories, PeersIndex } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/stories/get-profile-stories.ts b/packages/core/src/highlevel/methods/stories/get-profile-stories.ts index e3f21672..b91ae4ec 100644 --- a/packages/core/src/highlevel/methods/stories/get-profile-stories.ts +++ b/packages/core/src/highlevel/methods/stories/get-profile-stories.ts @@ -1,6 +1,7 @@ import { assertTypeIs } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { ArrayPaginated, InputPeerLike, PeersIndex, Story } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { ArrayPaginated, InputPeerLike } from '../../types/index.js' +import { PeersIndex, Story } from '../../types/index.js' import { makeArrayPaginated } from '../../utils/index.js' import { resolvePeer } from '../users/resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/stories/get-stories-by-id.ts b/packages/core/src/highlevel/methods/stories/get-stories-by-id.ts index b079dfd6..be8856c6 100644 --- a/packages/core/src/highlevel/methods/stories/get-stories-by-id.ts +++ b/packages/core/src/highlevel/methods/stories/get-stories-by-id.ts @@ -1,7 +1,8 @@ -import { MaybeArray } from '../../../types/utils.js' +import type { MaybeArray } from '../../../types/utils.js' import { assertTypeIs } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, PeersIndex, Story } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { PeersIndex, Story } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/stories/get-stories-interactions.ts b/packages/core/src/highlevel/methods/stories/get-stories-interactions.ts index 090b74c5..bec479ba 100644 --- a/packages/core/src/highlevel/methods/stories/get-stories-interactions.ts +++ b/packages/core/src/highlevel/methods/stories/get-stories-interactions.ts @@ -1,6 +1,7 @@ -import { MaybeArray } from '../../../types/utils.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, PeersIndex, StoryInteractions } from '../../types/index.js' +import type { MaybeArray } from '../../../types/utils.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { PeersIndex, StoryInteractions } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** @@ -23,7 +24,7 @@ export async function getStoriesInteractions( const peers = PeersIndex.from(res) - const infos = res.views.map((it) => new StoryInteractions(it, peers)) + const infos = res.views.map(it => new StoryInteractions(it, peers)) return infos } diff --git a/packages/core/src/highlevel/methods/stories/get-story-link.ts b/packages/core/src/highlevel/methods/stories/get-story-link.ts index ed44704e..120ccb16 100644 --- a/packages/core/src/highlevel/methods/stories/get-story-link.ts +++ b/packages/core/src/highlevel/methods/stories/get-story-link.ts @@ -1,5 +1,5 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** @@ -21,5 +21,5 @@ export async function getStoryLink( peer: await resolvePeer(client, peerId), id: storyId, }) - .then((r) => r.link) + .then(r => r.link) } diff --git a/packages/core/src/highlevel/methods/stories/get-story-viewers.ts b/packages/core/src/highlevel/methods/stories/get-story-viewers.ts index 317c5426..58a91cb4 100644 --- a/packages/core/src/highlevel/methods/stories/get-story-viewers.ts +++ b/packages/core/src/highlevel/methods/stories/get-story-viewers.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, StoryViewersList } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { StoryViewersList } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/stories/hide-my-stories-views.ts b/packages/core/src/highlevel/methods/stories/hide-my-stories-views.ts index c552744b..5ba018bb 100644 --- a/packages/core/src/highlevel/methods/stories/hide-my-stories-views.ts +++ b/packages/core/src/highlevel/methods/stories/hide-my-stories-views.ts @@ -1,6 +1,6 @@ import { MtTypeAssertionError } from '../../../types/errors.js' import { hasValueAtKey } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { StoriesStealthMode } from '../../types/stories/stealth-mode.js' import { assertIsUpdatesGroup } from '../../updates/utils.js' diff --git a/packages/core/src/highlevel/methods/stories/increment-stories-views.ts b/packages/core/src/highlevel/methods/stories/increment-stories-views.ts index e91f24d9..4fc46577 100644 --- a/packages/core/src/highlevel/methods/stories/increment-stories-views.ts +++ b/packages/core/src/highlevel/methods/stories/increment-stories-views.ts @@ -1,7 +1,7 @@ -import { MaybeArray } from '../../../types/utils.js' +import type { MaybeArray } from '../../../types/utils.js' import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/stories/iter-all-stories.ts b/packages/core/src/highlevel/methods/stories/iter-all-stories.ts index 27da69a3..286cb089 100644 --- a/packages/core/src/highlevel/methods/stories/iter-all-stories.ts +++ b/packages/core/src/highlevel/methods/stories/iter-all-stories.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { PeerStories } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { PeerStories } from '../../types/index.js' + import { getAllStories } from './get-all-stories.js' /** diff --git a/packages/core/src/highlevel/methods/stories/iter-profile-stories.ts b/packages/core/src/highlevel/methods/stories/iter-profile-stories.ts index 7632b64b..2a0cb825 100644 --- a/packages/core/src/highlevel/methods/stories/iter-profile-stories.ts +++ b/packages/core/src/highlevel/methods/stories/iter-profile-stories.ts @@ -1,6 +1,7 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, Story } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike, Story } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' + import { getProfileStories } from './get-profile-stories.js' /** diff --git a/packages/core/src/highlevel/methods/stories/iter-story-viewers.ts b/packages/core/src/highlevel/methods/stories/iter-story-viewers.ts index 9c2110a8..d3d8e780 100644 --- a/packages/core/src/highlevel/methods/stories/iter-story-viewers.ts +++ b/packages/core/src/highlevel/methods/stories/iter-story-viewers.ts @@ -1,6 +1,7 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, StoryViewer } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike, StoryViewer } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' + import { getStoryViewers } from './get-story-viewers.js' /** diff --git a/packages/core/src/highlevel/methods/stories/read-stories.ts b/packages/core/src/highlevel/methods/stories/read-stories.ts index 94fd40d9..4086425a 100644 --- a/packages/core/src/highlevel/methods/stories/read-stories.ts +++ b/packages/core/src/highlevel/methods/stories/read-stories.ts @@ -1,5 +1,5 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/stories/report-story.ts b/packages/core/src/highlevel/methods/stories/report-story.ts index 682e87a4..3ec9c594 100644 --- a/packages/core/src/highlevel/methods/stories/report-story.ts +++ b/packages/core/src/highlevel/methods/stories/report-story.ts @@ -1,9 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { MaybeArray } from '../../../types/utils.js' +import type { MaybeArray } from '../../../types/utils.js' import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/stories/send-story-reaction.ts b/packages/core/src/highlevel/methods/stories/send-story-reaction.ts index b44a1c1a..d41e108b 100644 --- a/packages/core/src/highlevel/methods/stories/send-story-reaction.ts +++ b/packages/core/src/highlevel/methods/stories/send-story-reaction.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, InputReaction, normalizeInputReaction } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike, InputReaction } from '../../types/index.js' +import { normalizeInputReaction } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/stories/send-story.ts b/packages/core/src/highlevel/methods/stories/send-story.ts index 87457ba2..67f946c4 100644 --- a/packages/core/src/highlevel/methods/stories/send-story.ts +++ b/packages/core/src/highlevel/methods/stories/send-story.ts @@ -1,12 +1,13 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { randomLong } from '../../../utils/long-utils.js' -import { ITelegramClient } from '../../client.types.js' -import { InputMediaLike, InputPeerLike, InputPrivacyRule, InputText, Story } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputMediaLike, InputPeerLike, InputPrivacyRule, InputText, Story } from '../../types/index.js' import { _normalizeInputMedia } from '../files/normalize-input-media.js' import { _normalizePrivacyRules } from '../misc/normalize-privacy-rules.js' import { _normalizeInputText } from '../misc/normalize-text.js' import { resolvePeer } from '../users/resolve-peer.js' + import { _findStoryInUpdate } from './find-in-update.js' /** @@ -78,9 +79,9 @@ export async function sendStory( } const inputMedia = await _normalizeInputMedia(client, media) - const privacyRules = params.privacyRules ? - await _normalizePrivacyRules(client, params.privacyRules) : - [{ _: 'inputPrivacyValueAllowAll' } as const] + const privacyRules = params.privacyRules + ? await _normalizePrivacyRules(client, params.privacyRules) + : [{ _: 'inputPrivacyValueAllowAll' } as const] const [caption, entities] = await _normalizeInputText( client, diff --git a/packages/core/src/highlevel/methods/stories/toggle-peer-stories-archived.ts b/packages/core/src/highlevel/methods/stories/toggle-peer-stories-archived.ts index 00419c79..364fbc0d 100644 --- a/packages/core/src/highlevel/methods/stories/toggle-peer-stories-archived.ts +++ b/packages/core/src/highlevel/methods/stories/toggle-peer-stories-archived.ts @@ -1,6 +1,6 @@ import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/stories/toggle-stories-pinned.ts b/packages/core/src/highlevel/methods/stories/toggle-stories-pinned.ts index 1dbf803c..63eadf68 100644 --- a/packages/core/src/highlevel/methods/stories/toggle-stories-pinned.ts +++ b/packages/core/src/highlevel/methods/stories/toggle-stories-pinned.ts @@ -1,6 +1,6 @@ -import { MaybeArray } from '../../../types/utils.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { MaybeArray } from '../../../types/utils.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { resolvePeer } from '../users/resolve-peer.js' /** @@ -31,7 +31,7 @@ export async function toggleStoriesPinned( ): Promise { const { ids, pinned, peer = 'me' } = params - return await client.call({ + return client.call({ _: 'stories.togglePinned', peer: await resolvePeer(client, peer), id: Array.isArray(ids) ? ids : [ids], diff --git a/packages/core/src/highlevel/methods/users/block-user.ts b/packages/core/src/highlevel/methods/users/block-user.ts index 11c6274a..ea2280e0 100644 --- a/packages/core/src/highlevel/methods/users/block-user.ts +++ b/packages/core/src/highlevel/methods/users/block-user.ts @@ -1,6 +1,7 @@ import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' + import { resolvePeer } from './resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/users/delete-profile-photos.ts b/packages/core/src/highlevel/methods/users/delete-profile-photos.ts index 656af894..7886b6e5 100644 --- a/packages/core/src/highlevel/methods/users/delete-profile-photos.ts +++ b/packages/core/src/highlevel/methods/users/delete-profile-photos.ts @@ -1,7 +1,7 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { MaybeArray } from '../../../types/utils.js' -import { ITelegramClient } from '../../client.types.js' +import type { MaybeArray } from '../../../types/utils.js' +import type { ITelegramClient } from '../../client.types.js' import { fileIdToInputPhoto } from '../../utils/convert-file-id.js' /** diff --git a/packages/core/src/highlevel/methods/users/edit-close-friends.ts b/packages/core/src/highlevel/methods/users/edit-close-friends.ts index 5859650d..641e3ff5 100644 --- a/packages/core/src/highlevel/methods/users/edit-close-friends.ts +++ b/packages/core/src/highlevel/methods/users/edit-close-friends.ts @@ -1,7 +1,8 @@ import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' import { toInputUser } from '../../utils/index.js' + import { resolvePeerMany } from './resolve-peer-many.js' /** @@ -26,7 +27,7 @@ export async function editCloseFriendsRaw(client: ITelegramClient, ids: number[] export async function editCloseFriends(client: ITelegramClient, ids: InputPeerLike[]): Promise { const r = await client.call({ _: 'contacts.editCloseFriends', - id: await resolvePeerMany(client, ids, toInputUser).then((r) => + id: await resolvePeerMany(client, ids, toInputUser).then(r => r.map((u) => { if ('userId' in u) return u.userId diff --git a/packages/core/src/highlevel/methods/users/get-common-chats.ts b/packages/core/src/highlevel/methods/users/get-common-chats.ts index f4ac1fb1..bedfb59e 100644 --- a/packages/core/src/highlevel/methods/users/get-common-chats.ts +++ b/packages/core/src/highlevel/methods/users/get-common-chats.ts @@ -1,5 +1,7 @@ -import { ITelegramClient } from '../../client.types.js' -import { Chat, InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { Chat } from '../../types/index.js' + import { resolveUser } from './resolve-peer.js' /** @@ -16,5 +18,5 @@ export async function getCommonChats(client: ITelegramClient, userId: InputPeerL maxId: 0, limit: 100, }) - .then((res) => res.chats.map((it) => new Chat(it))) + .then(res => res.chats.map(it => new Chat(it))) } diff --git a/packages/core/src/highlevel/methods/users/get-global-ttl.ts b/packages/core/src/highlevel/methods/users/get-global-ttl.ts index bdfc1f62..8781a519 100644 --- a/packages/core/src/highlevel/methods/users/get-global-ttl.ts +++ b/packages/core/src/highlevel/methods/users/get-global-ttl.ts @@ -1,4 +1,4 @@ -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' /** * Gets the current default value of the Time-To-Live setting, applied to all new chats. @@ -8,5 +8,5 @@ export async function getGlobalTtl(client: ITelegramClient): Promise { .call({ _: 'messages.getDefaultHistoryTTL', }) - .then((r) => r.period) + .then(r => r.period) } diff --git a/packages/core/src/highlevel/methods/users/get-me.ts b/packages/core/src/highlevel/methods/users/get-me.ts index ee44317d..88492242 100644 --- a/packages/core/src/highlevel/methods/users/get-me.ts +++ b/packages/core/src/highlevel/methods/users/get-me.ts @@ -1,5 +1,5 @@ import { assertTypeIs } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { User } from '../../types/index.js' /** diff --git a/packages/core/src/highlevel/methods/users/get-my-username.ts b/packages/core/src/highlevel/methods/users/get-my-username.ts index 1f78faa9..ff06f099 100644 --- a/packages/core/src/highlevel/methods/users/get-my-username.ts +++ b/packages/core/src/highlevel/methods/users/get-my-username.ts @@ -1,4 +1,4 @@ -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' /** * Get currently authorized user's username. @@ -7,5 +7,5 @@ import { ITelegramClient } from '../../client.types.js' * does not call any API methods. */ export async function getMyUsername(client: ITelegramClient): Promise { - return client.storage.self.fetch().then((self) => self?.usernames[0] ?? null) + return client.storage.self.fetch().then(self => self?.usernames[0] ?? null) } diff --git a/packages/core/src/highlevel/methods/users/get-profile-photo.ts b/packages/core/src/highlevel/methods/users/get-profile-photo.ts index 5be3e22d..3258c84e 100644 --- a/packages/core/src/highlevel/methods/users/get-profile-photo.ts +++ b/packages/core/src/highlevel/methods/users/get-profile-photo.ts @@ -1,8 +1,10 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertTypeIs } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, Photo } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { Photo } from '../../types/index.js' + import { resolveUser } from './resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/users/get-profile-photos.ts b/packages/core/src/highlevel/methods/users/get-profile-photos.ts index 63806884..3c05e1ac 100644 --- a/packages/core/src/highlevel/methods/users/get-profile-photos.ts +++ b/packages/core/src/highlevel/methods/users/get-profile-photos.ts @@ -1,11 +1,12 @@ import Long from 'long' - -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertTypeIs } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { ArrayPaginated, InputPeerLike, Photo } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { ArrayPaginated, InputPeerLike } from '../../types/index.js' +import { Photo } from '../../types/index.js' import { makeArrayPaginated } from '../../utils/index.js' + import { resolveUser } from './resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/users/get-users.test.ts b/packages/core/src/highlevel/methods/users/get-users.test.ts index f1a780c3..8d4d48d6 100644 --- a/packages/core/src/highlevel/methods/users/get-users.test.ts +++ b/packages/core/src/highlevel/methods/users/get-users.test.ts @@ -1,10 +1,10 @@ import Long from 'long' import { beforeAll, describe, expect, it } from 'vitest' - -import { createStub, StubTelegramClient } from '@mtcute/test' +import { StubTelegramClient, createStub } from '@mtcute/test' import { assertTypeIs } from '../../../utils/type-assertions.js' import { User } from '../../types/index.js' + import { getUsers } from './get-users.js' describe('getUsers', () => { @@ -17,8 +17,7 @@ describe('getUsers', () => { if (it.userId === 1) return { _: 'userEmpty', id: 1 } return createStub('user', { id: it.userId, accessHash: Long.ZERO }) - }), - ) + })) beforeAll(async () => { await client.registerPeers( diff --git a/packages/core/src/highlevel/methods/users/get-users.ts b/packages/core/src/highlevel/methods/users/get-users.ts index 2b1e6a63..ccd9027f 100644 --- a/packages/core/src/highlevel/methods/users/get-users.ts +++ b/packages/core/src/highlevel/methods/users/get-users.ts @@ -1,8 +1,10 @@ -import { MaybeArray } from '../../../types/utils.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, User } from '../../types/index.js' +import type { MaybeArray } from '../../../types/utils.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' +import { User } from '../../types/index.js' import { toInputUser } from '../../utils/peer-utils.js' import { _getUsersBatched } from '../chats/batched-queries.js' + import { resolveUser } from './resolve-peer.js' import { resolvePeerMany } from './resolve-peer-many.js' @@ -25,7 +27,7 @@ export async function getUsers(client: ITelegramClient, ids: MaybeArray _getUsersBatched(client, peer))) + const res = await Promise.all(inputPeers.map(peer => _getUsersBatched(client, peer))) - return res.map((it) => (it ? new User(it) : null)) + return res.map(it => (it ? new User(it) : null)) } diff --git a/packages/core/src/highlevel/methods/users/iter-profile-photos.ts b/packages/core/src/highlevel/methods/users/iter-profile-photos.ts index 50d5a62f..302f2618 100644 --- a/packages/core/src/highlevel/methods/users/iter-profile-photos.ts +++ b/packages/core/src/highlevel/methods/users/iter-profile-photos.ts @@ -1,5 +1,6 @@ -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike, Photo } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike, Photo } from '../../types/index.js' + import { getProfilePhotos } from './get-profile-photos.js' import { resolveUser } from './resolve-peer.js' diff --git a/packages/core/src/highlevel/methods/users/resolve-peer-many.ts b/packages/core/src/highlevel/methods/users/resolve-peer-many.ts index fad09570..97a46cb9 100644 --- a/packages/core/src/highlevel/methods/users/resolve-peer-many.ts +++ b/packages/core/src/highlevel/methods/users/resolve-peer-many.ts @@ -1,9 +1,10 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { ConditionVariable } from '../../../utils/condition-variable.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { MtPeerNotFoundError } from '../../types/errors.js' -import { InputPeerLike } from '../../types/peers/index.js' +import type { InputPeerLike } from '../../types/peers/index.js' + import { resolvePeer } from './resolve-peer.js' /** @@ -53,7 +54,7 @@ export async function resolvePeerMany( if (peerIds.length < limit) { // no point in using async pool for + peerIds.map(it => resolvePeer(client, it).catch((e) => { if (e instanceof MtPeerNotFoundError) { return null @@ -90,7 +91,9 @@ export async function resolvePeerMany( } catch (e) { if (e instanceof MtPeerNotFoundError) { buffer[idx] = null - } else throw e + } else { + throw e + } } if (nextIdx === idx) { @@ -102,7 +105,7 @@ export async function resolvePeerMany( } } - let error: unknown = undefined + let error: unknown void Promise.all(Array.from({ length: limit }, (_, i) => fetchNext(i))).catch((e) => { client.log.debug('resolvePeerMany errored: %e', e) error = e @@ -112,7 +115,6 @@ export async function resolvePeerMany( while (nextIdx < peerIds.length) { await cv.wait() - // eslint-disable-next-line @typescript-eslint/no-throw-literal if (error) throw error while (nextIdx in buffer) { diff --git a/packages/core/src/highlevel/methods/users/resolve-peer.test.ts b/packages/core/src/highlevel/methods/users/resolve-peer.test.ts index ac1aedfb..5a6f2d74 100644 --- a/packages/core/src/highlevel/methods/users/resolve-peer.test.ts +++ b/packages/core/src/highlevel/methods/users/resolve-peer.test.ts @@ -1,9 +1,9 @@ import Long from 'long' import { describe, expect, it, vi } from 'vitest' - -import { createStub, StubTelegramClient } from '@mtcute/test' +import { StubTelegramClient, createStub } from '@mtcute/test' import { Chat, MtPeerNotFoundError, User } from '../../types/index.js' + import { resolvePeer } from './resolve-peer.js' describe('resolvePeer', () => { diff --git a/packages/core/src/highlevel/methods/users/resolve-peer.ts b/packages/core/src/highlevel/methods/users/resolve-peer.ts index f7da7cea..77a2442d 100644 --- a/packages/core/src/highlevel/methods/users/resolve-peer.ts +++ b/packages/core/src/highlevel/methods/users/resolve-peer.ts @@ -1,12 +1,11 @@ import Long from 'long' - import { tl } from '@mtcute/tl' import { MtTypeAssertionError } from '../../../types/errors.js' import { getMarkedPeerId, parseMarkedPeerId, toggleChannelIdMark } from '../../../utils/peer-utils.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { MtPeerNotFoundError } from '../../types/errors.js' -import { InputPeerLike } from '../../types/peers/index.js' +import type { InputPeerLike } from '../../types/peers/index.js' import { toInputChannel, toInputPeer, toInputUser } from '../../utils/peer-utils.js' // @available=both @@ -72,7 +71,9 @@ export async function resolvePeer( } catch (e) { if (tl.RpcError.is(e, 'PHONE_NOT_OCCUPIED')) { throw new MtPeerNotFoundError(`Peer with phone number ${peerId} was not found`) - } else throw e + } else { + throw e + } } } else { // username @@ -89,14 +90,16 @@ export async function resolvePeer( } catch (e) { if (tl.RpcError.is(e, 'USERNAME_NOT_OCCUPIED')) { throw new MtPeerNotFoundError(`Peer with username ${peerId} was not found`) - } else throw e + } else { + throw e + } } } if (res.peer._ === 'peerUser') { const id = res.peer.userId - const found = res.users.find((it) => it.id === id) + const found = res.users.find(it => it.id === id) if (found && found._ === 'user') { if (!found.accessHash) { @@ -116,7 +119,7 @@ export async function resolvePeer( } } else if (res.peer._ === 'peerChannel') { const id = res.peer.channelId - const found = res.chats.find((it) => it.id === id) + const found = res.chats.find(it => it.id === id) if (found) { if (!(found._ === 'channel' || found._ === 'channelForbidden')) { diff --git a/packages/core/src/highlevel/methods/users/set-global-ttl.ts b/packages/core/src/highlevel/methods/users/set-global-ttl.ts index 5b68fdba..0e6bc02e 100644 --- a/packages/core/src/highlevel/methods/users/set-global-ttl.ts +++ b/packages/core/src/highlevel/methods/users/set-global-ttl.ts @@ -1,5 +1,5 @@ import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' /** * Changes the current default value of the Time-To-Live setting, diff --git a/packages/core/src/highlevel/methods/users/set-my-birthday.ts b/packages/core/src/highlevel/methods/users/set-my-birthday.ts index 2154dec5..9477a730 100644 --- a/packages/core/src/highlevel/methods/users/set-my-birthday.ts +++ b/packages/core/src/highlevel/methods/users/set-my-birthday.ts @@ -1,5 +1,5 @@ import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' // @available=user /** @@ -18,12 +18,12 @@ export async function setMyBirthday( ): Promise { const res = await client.call({ _: 'account.updateBirthday', - birthday: birthday ? - { + birthday: birthday + ? { _: 'birthday', ...birthday, - } : - undefined, + } + : undefined, }) assertTrue('account.updateBirthday', res) diff --git a/packages/core/src/highlevel/methods/users/set-my-emoji-status.ts b/packages/core/src/highlevel/methods/users/set-my-emoji-status.ts index e6fe644c..b62d8de8 100644 --- a/packages/core/src/highlevel/methods/users/set-my-emoji-status.ts +++ b/packages/core/src/highlevel/methods/users/set-my-emoji-status.ts @@ -1,7 +1,7 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { normalizeDate } from '../../utils/index.js' /** diff --git a/packages/core/src/highlevel/methods/users/set-my-profile-photo.ts b/packages/core/src/highlevel/methods/users/set-my-profile-photo.ts index 5b92f400..f351d84e 100644 --- a/packages/core/src/highlevel/methods/users/set-my-profile-photo.ts +++ b/packages/core/src/highlevel/methods/users/set-my-profile-photo.ts @@ -2,8 +2,9 @@ import { tdFileId } from '@mtcute/file-id' import { tl } from '@mtcute/tl' import { MtArgumentError } from '../../../types/errors.js' -import { ITelegramClient } from '../../client.types.js' -import { InputFileLike, Photo } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputFileLike } from '../../types/index.js' +import { Photo } from '../../types/index.js' import { fileIdToInputPhoto } from '../../utils/convert-file-id.js' import { _normalizeInputFile } from '../files/normalize-input-file.js' diff --git a/packages/core/src/highlevel/methods/users/set-my-username.ts b/packages/core/src/highlevel/methods/users/set-my-username.ts index 15a2bb2f..ca05c499 100644 --- a/packages/core/src/highlevel/methods/users/set-my-username.ts +++ b/packages/core/src/highlevel/methods/users/set-my-username.ts @@ -1,4 +1,4 @@ -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { User } from '../../types/index.js' /** diff --git a/packages/core/src/highlevel/methods/users/set-offline.ts b/packages/core/src/highlevel/methods/users/set-offline.ts index d4e09717..eac75ee9 100644 --- a/packages/core/src/highlevel/methods/users/set-offline.ts +++ b/packages/core/src/highlevel/methods/users/set-offline.ts @@ -1,4 +1,4 @@ -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' /** * Change user status to offline or online diff --git a/packages/core/src/highlevel/methods/users/unblock-user.ts b/packages/core/src/highlevel/methods/users/unblock-user.ts index 35a07a15..e845e6c9 100644 --- a/packages/core/src/highlevel/methods/users/unblock-user.ts +++ b/packages/core/src/highlevel/methods/users/unblock-user.ts @@ -1,6 +1,7 @@ import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' -import { InputPeerLike } from '../../types/index.js' +import type { ITelegramClient } from '../../client.types.js' +import type { InputPeerLike } from '../../types/index.js' + import { resolvePeer } from './resolve-peer.js' /** diff --git a/packages/core/src/highlevel/methods/users/update-profile.ts b/packages/core/src/highlevel/methods/users/update-profile.ts index 6e8a60ec..97f875cc 100644 --- a/packages/core/src/highlevel/methods/users/update-profile.ts +++ b/packages/core/src/highlevel/methods/users/update-profile.ts @@ -1,4 +1,4 @@ -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { User } from '../../types/index.js' /** diff --git a/packages/core/src/highlevel/storage/provider.ts b/packages/core/src/highlevel/storage/provider.ts index a1ab11d8..675abf29 100644 --- a/packages/core/src/highlevel/storage/provider.ts +++ b/packages/core/src/highlevel/storage/provider.ts @@ -1,6 +1,7 @@ -import { IMtStorageProvider } from '../../storage/provider.js' -import { IPeersRepository } from './repository/peers.js' -import { IReferenceMessagesRepository } from './repository/ref-messages.js' +import type { IMtStorageProvider } from '../../storage/provider.js' + +import type { IPeersRepository } from './repository/peers.js' +import type { IReferenceMessagesRepository } from './repository/ref-messages.js' export interface ITelegramStorageProvider extends IMtStorageProvider { readonly peers: IPeersRepository diff --git a/packages/core/src/highlevel/storage/repository/peers.ts b/packages/core/src/highlevel/storage/repository/peers.ts index 7ec1c598..f94cad76 100644 --- a/packages/core/src/highlevel/storage/repository/peers.ts +++ b/packages/core/src/highlevel/storage/repository/peers.ts @@ -1,6 +1,6 @@ -import { MaybePromise } from '../../../types/utils.js' +import type { MaybePromise } from '../../../types/utils.js' -// eslint-disable-next-line @typescript-eslint/no-namespace +// eslint-disable-next-line ts/no-namespace export namespace IPeersRepository { /** Information about a cached peer */ export interface PeerInfo { @@ -24,14 +24,14 @@ export namespace IPeersRepository { } export interface IPeersRepository { - /** Store the given peer*/ - store(peer: IPeersRepository.PeerInfo): MaybePromise + /** Store the given peer */ + store: (peer: IPeersRepository.PeerInfo) => MaybePromise /** Find a peer by their `id` */ - getById(id: number): MaybePromise + getById: (id: number) => MaybePromise /** Find a peer by their username (where `usernames` includes `username`) */ - getByUsername(username: string): MaybePromise + getByUsername: (username: string) => MaybePromise /** Find a peer by their `phone` */ - getByPhone(phone: string): MaybePromise + getByPhone: (phone: string) => MaybePromise - deleteAll(): MaybePromise + deleteAll: () => MaybePromise } diff --git a/packages/core/src/highlevel/storage/repository/ref-messages.ts b/packages/core/src/highlevel/storage/repository/ref-messages.ts index fbf77117..f93636fd 100644 --- a/packages/core/src/highlevel/storage/repository/ref-messages.ts +++ b/packages/core/src/highlevel/storage/repository/ref-messages.ts @@ -1,8 +1,8 @@ -import { MaybePromise } from '../../../types/utils.js' +import type { MaybePromise } from '../../../types/utils.js' export interface IReferenceMessagesRepository { /** Store a reference message */ - store(peerId: number, chatId: number, msgId: number): MaybePromise + store: (peerId: number, chatId: number, msgId: number) => MaybePromise /** * Get the reference message for the given `peerId`. * @@ -10,13 +10,13 @@ export interface IReferenceMessagesRepository { * the one with the highest `msgId` should be returned, but this is not * really important. */ - getByPeer(peerId: number): MaybePromise<[number, number] | null> + getByPeer: (peerId: number) => MaybePromise<[number, number] | null> /** * Delete reference messages given the `chatId` * where `msgId` is one of `msgIds` */ - delete(chatId: number, msgIds: number[]): MaybePromise - deleteByPeer(peerId: number): MaybePromise - deleteAll(): MaybePromise + delete: (chatId: number, msgIds: number[]) => MaybePromise + deleteByPeer: (peerId: number) => MaybePromise + deleteAll: () => MaybePromise } diff --git a/packages/core/src/highlevel/storage/service/current-user.ts b/packages/core/src/highlevel/storage/service/current-user.ts index 6b9a9a32..9d3cf159 100644 --- a/packages/core/src/highlevel/storage/service/current-user.ts +++ b/packages/core/src/highlevel/storage/service/current-user.ts @@ -1,8 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { TlBinaryReader, TlBinaryWriter, TlSerializationCounter } from '@mtcute/tl-runtime' -import { IKeyValueRepository } from '../../../storage/repository/key-value.js' -import { BaseService, ServiceOptions } from '../../../storage/service/base.js' +import type { IKeyValueRepository } from '../../../storage/repository/key-value.js' +import type { ServiceOptions } from '../../../storage/service/base.js' +import { BaseService } from '../../../storage/service/base.js' import { MtArgumentError } from '../../../types/index.js' import { assertTypeIs } from '../../../utils/type-assertions.js' import { extractUsernames } from '../../utils/peer-utils.js' @@ -143,7 +144,7 @@ export class CurrentUserService extends BaseService { return this._cached } - async update(params: { username?: string; usernames?: string[]; isPremium?: boolean }): Promise { + async update(params: { username?: string, usernames?: string[], isPremium?: boolean }): Promise { const info = await this.fetch() if (!info) return diff --git a/packages/core/src/highlevel/storage/service/peers.ts b/packages/core/src/highlevel/storage/service/peers.ts index 0a3b9273..4ede9210 100644 --- a/packages/core/src/highlevel/storage/service/peers.ts +++ b/packages/core/src/highlevel/storage/service/peers.ts @@ -1,14 +1,15 @@ import Long from 'long' +import type { tl } from '@mtcute/tl' -import { tl } from '@mtcute/tl' - -import { BaseService, ServiceOptions } from '../../../storage/service/base.js' +import type { ServiceOptions } from '../../../storage/service/base.js' +import { BaseService } from '../../../storage/service/base.js' import { longFromFastString, longToFastString } from '../../../utils/long-utils.js' import { LruMap } from '../../../utils/lru-map.js' import { getAllPeersFrom, parseMarkedPeerId, toggleChannelIdMark } from '../../../utils/peer-utils.js' import { extractUsernames } from '../../utils/peer-utils.js' -import { IPeersRepository } from '../repository/peers.js' -import { RefMessagesService } from './ref-messages.js' +import type { IPeersRepository } from '../repository/peers.js' + +import type { RefMessagesService } from './ref-messages.js' interface CacheItem { peer: tl.TypeInputPeer @@ -61,7 +62,7 @@ export class PeersService extends BaseService { this._cache = new LruMap(options.cacheSize ?? 100) } - async updatePeersFrom(obj: tl.TlObject | tl.TlObject[]) { + async updatePeersFrom(obj: tl.TlObject | tl.TlObject[]): Promise { let count = 0 for (const peer of getAllPeersFrom(obj)) { diff --git a/packages/core/src/highlevel/storage/service/ref-messages.ts b/packages/core/src/highlevel/storage/service/ref-messages.ts index 67d32d08..e25315f9 100644 --- a/packages/core/src/highlevel/storage/service/ref-messages.ts +++ b/packages/core/src/highlevel/storage/service/ref-messages.ts @@ -1,6 +1,7 @@ -import { BaseService, ServiceOptions } from '../../../storage/service/base.js' +import type { ServiceOptions } from '../../../storage/service/base.js' +import { BaseService } from '../../../storage/service/base.js' import { LruMap } from '../../../utils/lru-map.js' -import { IReferenceMessagesRepository } from '../repository/ref-messages.js' +import type { IReferenceMessagesRepository } from '../repository/ref-messages.js' export interface RefMessagesServiceOptions { cacheSize?: number diff --git a/packages/core/src/highlevel/storage/service/updates.ts b/packages/core/src/highlevel/storage/service/updates.ts index 621339ca..d35d2776 100644 --- a/packages/core/src/highlevel/storage/service/updates.ts +++ b/packages/core/src/highlevel/storage/service/updates.ts @@ -1,5 +1,6 @@ -import { IKeyValueRepository } from '../../../storage/repository/key-value.js' -import { BaseService, ServiceOptions } from '../../../storage/service/base.js' +import type { IKeyValueRepository } from '../../../storage/repository/key-value.js' +import type { ServiceOptions } from '../../../storage/service/base.js' +import { BaseService } from '../../../storage/service/base.js' import { dataViewFromBuffer } from '../../../utils/buffer-utils.js' const KV_PTS = 'updates_pts' diff --git a/packages/core/src/highlevel/storage/storage.ts b/packages/core/src/highlevel/storage/storage.ts index 863b202f..3c330e55 100644 --- a/packages/core/src/highlevel/storage/storage.ts +++ b/packages/core/src/highlevel/storage/storage.ts @@ -1,10 +1,13 @@ -import { ServiceOptions } from '../../storage/service/base.js' -import { StorageManager } from '../../storage/storage.js' -import { PublicPart } from '../../types/utils.js' -import { ITelegramStorageProvider } from './provider.js' +import type { ServiceOptions } from '../../storage/service/base.js' +import type { StorageManager } from '../../storage/storage.js' +import type { PublicPart } from '../../types/utils.js' + +import type { ITelegramStorageProvider } from './provider.js' import { CurrentUserService } from './service/current-user.js' -import { PeersService, PeersServiceOptions } from './service/peers.js' -import { RefMessagesService, RefMessagesServiceOptions } from './service/ref-messages.js' +import type { PeersServiceOptions } from './service/peers.js' +import { PeersService } from './service/peers.js' +import type { RefMessagesServiceOptions } from './service/ref-messages.js' +import { RefMessagesService } from './service/ref-messages.js' import { UpdatesStateService } from './service/updates.js' interface TelegramStorageManagerOptions { @@ -20,9 +23,9 @@ export interface TelegramStorageManagerExtraOptions { export class TelegramStorageManager { private provider - readonly updates + readonly updates: UpdatesStateService readonly self: PublicPart - readonly refMsgs + readonly refMsgs: RefMessagesService readonly peers: PublicPart constructor( @@ -53,7 +56,7 @@ export class TelegramStorageManager { ) } - async clear(withAuthKeys = false) { + async clear(withAuthKeys = false): Promise { await this.provider.peers.deleteAll() await this.provider.refMessages.deleteAll() await this.mt.clear(withAuthKeys) diff --git a/packages/core/src/highlevel/types/auth/sent-code.ts b/packages/core/src/highlevel/types/auth/sent-code.ts index 54ccd7b4..caef7659 100644 --- a/packages/core/src/highlevel/types/auth/sent-code.ts +++ b/packages/core/src/highlevel/types/auth/sent-code.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' @@ -39,18 +39,18 @@ const nextCodeMap: Record = { * - `success`: Code is not needed, you're already logged in (only for future auth tokens) */ export type SentCodeDeliveryType = - | 'app' - | 'sms' - | 'call' - | 'flash_call' - | 'missed_call' - | 'email' - | 'email_required' - | 'fragment' - | 'firebase' - | 'sms_word' - | 'sms_phrase' - | 'success' + | 'app' + | 'sms' + | 'call' + | 'flash_call' + | 'missed_call' + | 'email' + | 'email_required' + | 'fragment' + | 'firebase' + | 'sms_word' + | 'sms_phrase' + | 'success' /** * Type describing next code delivery type. diff --git a/packages/core/src/highlevel/types/bots/command-scope/inner.ts b/packages/core/src/highlevel/types/bots/command-scope/inner.ts index 5f84cd65..e0c8fe0b 100644 --- a/packages/core/src/highlevel/types/bots/command-scope/inner.ts +++ b/packages/core/src/highlevel/types/bots/command-scope/inner.ts @@ -1,6 +1,6 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { InputPeerLike } from '../../peers/index.js' +import type { InputPeerLike } from '../../peers/index.js' /** * Intermediate bot scope, that is converted to @@ -9,15 +9,15 @@ import { InputPeerLike } from '../../peers/index.js' * Used to avoid manually resolving peers. */ export type IntermediateScope = - | { - type: 'peer' | 'peer_admins' - peer: InputPeerLike - } - | { - type: 'member' - chat: InputPeerLike - user: InputPeerLike - } + | { + type: 'peer' | 'peer_admins' + peer: InputPeerLike + } + | { + type: 'member' + chat: InputPeerLike + user: InputPeerLike + } /** * Default commands scope. diff --git a/packages/core/src/highlevel/types/bots/game-high-score.ts b/packages/core/src/highlevel/types/bots/game-high-score.ts index 89a21611..af3d4753 100644 --- a/packages/core/src/highlevel/types/bots/game-high-score.ts +++ b/packages/core/src/highlevel/types/bots/game-high-score.ts @@ -1,8 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' -import { PeersIndex } from '../peers/peers-index.js' +import type { PeersIndex } from '../peers/peers-index.js' import { User } from '../peers/user.js' /** diff --git a/packages/core/src/highlevel/types/bots/inline-message/factories.ts b/packages/core/src/highlevel/types/bots/inline-message/factories.ts index a12fb671..e233beff 100644 --- a/packages/core/src/highlevel/types/bots/inline-message/factories.ts +++ b/packages/core/src/highlevel/types/bots/inline-message/factories.ts @@ -1,12 +1,13 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertNever } from '../../../../types/utils.js' -import { ITelegramClient } from '../../../client.types.js' +import type { ITelegramClient } from '../../../client.types.js' import { _normalizeInputText } from '../../../methods/misc/normalize-text.js' -import { InputText } from '../../../types/misc/entities.js' -import { InputMediaGeoLive } from '../../media/index.js' +import type { InputText } from '../../../types/misc/entities.js' +import type { InputMediaGeoLive } from '../../media/index.js' import { BotKeyboard } from '../keyboards/index.js' -import { + +import type { InputInlineMessage, InputInlineMessageContact, InputInlineMessageGame, diff --git a/packages/core/src/highlevel/types/bots/inline-message/index.ts b/packages/core/src/highlevel/types/bots/inline-message/index.ts index edfa35a1..ec854d6b 100644 --- a/packages/core/src/highlevel/types/bots/inline-message/index.ts +++ b/packages/core/src/highlevel/types/bots/inline-message/index.ts @@ -1,5 +1,5 @@ -export * from './types.js' - import * as BotInlineMessage from './factories.js' +export * from './types.js' + export { BotInlineMessage } diff --git a/packages/core/src/highlevel/types/bots/inline-message/types.ts b/packages/core/src/highlevel/types/bots/inline-message/types.ts index a2b28e87..c5d301ae 100644 --- a/packages/core/src/highlevel/types/bots/inline-message/types.ts +++ b/packages/core/src/highlevel/types/bots/inline-message/types.ts @@ -1,12 +1,12 @@ -import { +import type { InputMediaContact, InputMediaGeo, InputMediaGeoLive, InputMediaVenue, InputMediaWebpage, } from '../../media/index.js' -import { InputText } from '../../misc/entities.js' -import { ReplyMarkup } from '../index.js' +import type { InputText } from '../../misc/entities.js' +import type { ReplyMarkup } from '../index.js' /** * Inline message containing only text @@ -137,11 +137,11 @@ export interface InputInlineMessageWebpage extends InputMediaWebpage { } export type InputInlineMessage = - | InputInlineMessageText - | InputInlineMessageMedia - | InputInlineMessageGeo - | InputInlineMessageGeoLive - | InputInlineMessageVenue - | InputInlineMessageGame - | InputInlineMessageContact - | InputInlineMessageWebpage + | InputInlineMessageText + | InputInlineMessageMedia + | InputInlineMessageGeo + | InputInlineMessageGeoLive + | InputInlineMessageVenue + | InputInlineMessageGame + | InputInlineMessageContact + | InputInlineMessageWebpage diff --git a/packages/core/src/highlevel/types/bots/inline-result/factories.ts b/packages/core/src/highlevel/types/bots/inline-result/factories.ts index 2745945e..35e41cbd 100644 --- a/packages/core/src/highlevel/types/bots/inline-result/factories.ts +++ b/packages/core/src/highlevel/types/bots/inline-result/factories.ts @@ -1,11 +1,12 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtArgumentError } from '../../../../types/errors.js' -import { ITelegramClient } from '../../../client.types.js' +import type { ITelegramClient } from '../../../client.types.js' import { fileIdToInputDocument, fileIdToInputPhoto } from '../../../utils/convert-file-id.js' import { extractFileName } from '../../../utils/file-utils.js' import { BotInlineMessage } from '../inline-message/index.js' -import { + +import type { InputInlineResult, InputInlineResultArticle, InputInlineResultAudio, @@ -291,7 +292,7 @@ export async function _convertToTl( } if (obj.description) { - message += '\n' + obj.description + message += `\n${obj.description}` } sendMessage = { @@ -309,15 +310,15 @@ export async function _convertToTl( description: obj.description, url: obj.hideUrl ? undefined : obj.url, content: - obj.url && obj.hideUrl ? - { + obj.url && obj.hideUrl + ? { _: 'inputWebDocument', url: obj.url, mimeType: 'text/html', size: 0, attributes: [], - } : - undefined, + } + : undefined, thumb: typeof obj.thumb === 'string' ? normalizeThumb(obj) : obj.thumb, sendMessage, }) @@ -408,7 +409,7 @@ export async function _convertToTl( } } - let media: tl.TypeInputWebDocument | tl.TypeInputDocument | tl.TypeInputPhoto | undefined = undefined + let media: tl.TypeInputWebDocument | tl.TypeInputDocument | tl.TypeInputPhoto | undefined if (obj.type !== 'geo' && obj.type !== 'venue' && obj.type !== 'contact') { if (typeof obj.media === 'string') { @@ -419,26 +420,30 @@ export async function _convertToTl( } let mime: string - if (obj.type === 'video') mime = 'video/mp4' - else if (obj.type === 'audio') { + if (obj.type === 'video') { + mime = 'video/mp4' + } else if (obj.type === 'audio') { mime = obj.mime ?? 'audio/mpeg' } else if (obj.type === 'gif') { mime = obj.mime ?? 'video/mp4' - } else if (obj.type === 'voice') mime = 'audio/ogg' - else if (obj.type === 'file') { + } else if (obj.type === 'voice') { + mime = 'audio/ogg' + } else if (obj.type === 'file') { if (!obj.mime) { throw new MtArgumentError('MIME type must be specified for file inline result') } mime = obj.mime - } else mime = 'image/jpeg' + } else { + mime = 'image/jpeg' + } const attributes: tl.TypeDocumentAttribute[] = [] if ( - (obj.type === 'video' || obj.type === 'gif' || obj.type === 'photo') && - obj.width && - obj.height + (obj.type === 'video' || obj.type === 'gif' || obj.type === 'photo') + && obj.width + && obj.height ) { if (obj.type !== 'photo' && obj.duration) { attributes.push({ @@ -486,8 +491,8 @@ export async function _convertToTl( } } - let title: string | undefined = undefined - let description: string | undefined = undefined + let title: string | undefined + let description: string | undefined // incredible hacks by durov team. // i honestly don't understand why didn't they just @@ -526,7 +531,7 @@ export async function _convertToTl( continue } - if (media._ === 'inputPhoto') { + if (media._ === 'inputPhoto' || media._ === 'inputPhotoEmpty') { items.push({ _: 'inputBotInlineResultPhoto', id: obj.id, diff --git a/packages/core/src/highlevel/types/bots/inline-result/types.ts b/packages/core/src/highlevel/types/bots/inline-result/types.ts index f5cc2a80..285f76b4 100644 --- a/packages/core/src/highlevel/types/bots/inline-result/types.ts +++ b/packages/core/src/highlevel/types/bots/inline-result/types.ts @@ -1,6 +1,6 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { InputInlineMessage } from '../inline-message/types.js' +import type { InputInlineMessage } from '../inline-message/types.js' export interface BaseInputInlineResult { /** @@ -487,15 +487,15 @@ export interface InputInlineResultContact extends BaseInputInlineResult { } export type InputInlineResult = - | InputInlineResultArticle - | InputInlineResultGif - | InputInlineResultVideo - | InputInlineResultAudio - | InputInlineResultVoice - | InputInlineResultPhoto - | InputInlineResultSticker - | InputInlineResultFile - | InputInlineResultGeo - | InputInlineResultVenue - | InputInlineResultGame - | InputInlineResultContact + | InputInlineResultArticle + | InputInlineResultGif + | InputInlineResultVideo + | InputInlineResultAudio + | InputInlineResultVoice + | InputInlineResultPhoto + | InputInlineResultSticker + | InputInlineResultFile + | InputInlineResultGeo + | InputInlineResultVenue + | InputInlineResultGame + | InputInlineResultContact diff --git a/packages/core/src/highlevel/types/bots/keyboards/builder.test.ts b/packages/core/src/highlevel/types/bots/keyboards/builder.test.ts index ac7988fe..a804be6a 100644 --- a/packages/core/src/highlevel/types/bots/keyboards/builder.test.ts +++ b/packages/core/src/highlevel/types/bots/keyboards/builder.test.ts @@ -70,7 +70,7 @@ describe('BotKeyboardBuilder', () => { builder.push({ _: 'keyboardButton', text: '1' }) builder.push(() => ({ _: 'keyboardButton', text: '2' })) - builder.push(1 > 1 && { _: 'keyboardButton', text: '3' }) + builder.push(0 > 1 && { _: 'keyboardButton', text: '3' }) expect(builder.asInline()).toEqual({ type: 'inline', @@ -106,7 +106,7 @@ describe('BotKeyboardBuilder', () => { builder.append({ _: 'keyboardButton', text: '1' }) builder.append(() => ({ _: 'keyboardButton', text: '2' })) - builder.append(1 > 1 && { _: 'keyboardButton', text: '3' }) + builder.append(0 > 1 && { _: 'keyboardButton', text: '3' }) expect(builder.asInline()).toEqual({ type: 'inline', diff --git a/packages/core/src/highlevel/types/bots/keyboards/builder.ts b/packages/core/src/highlevel/types/bots/keyboards/builder.ts index dbf7aae7..0c521bff 100644 --- a/packages/core/src/highlevel/types/bots/keyboards/builder.ts +++ b/packages/core/src/highlevel/types/bots/keyboards/builder.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import type { InlineKeyboardMarkup, ReplyKeyboardMarkup } from './types.js' @@ -69,8 +69,8 @@ export class BotKeyboardBuilder { if (!btn) return this if ( - this._buttons.length && - (this.maxRowWidth === null || force || this._buttons[this._buttons.length - 1].length < this.maxRowWidth) + this._buttons.length + && (this.maxRowWidth === null || force || this._buttons[this._buttons.length - 1].length < this.maxRowWidth) ) { this._buttons[this._buttons.length - 1].push(btn) } else { diff --git a/packages/core/src/highlevel/types/bots/keyboards/factories.ts b/packages/core/src/highlevel/types/bots/keyboards/factories.ts index 78249f96..0f48134a 100644 --- a/packages/core/src/highlevel/types/bots/keyboards/factories.ts +++ b/packages/core/src/highlevel/types/bots/keyboards/factories.ts @@ -3,8 +3,9 @@ import { tl } from '@mtcute/tl' import { getPlatform } from '../../../../platform.js' import { assertNever } from '../../../../types/utils.js' import { toInputUser } from '../../../utils/peer-utils.js' + import { BotKeyboardBuilder } from './builder.js' -import { +import type { InlineKeyboardMarkup, ReplyKeyboardForceReply, ReplyKeyboardHide, @@ -363,7 +364,7 @@ export function findButton( /** @internal */ export function _rowsTo2d(rows: tl.RawKeyboardButtonRow[]): tl.TypeKeyboardButton[][] { - return rows.map((it) => it.buttons) + return rows.map(it => it.buttons) } /** @internal */ @@ -371,13 +372,13 @@ export function _2dToRows(arr: tl.TypeKeyboardButton[][], inline: boolean): tl.R return arr.map((row) => { if (!inline) { // le cringe - row = row.map((btn) => - btn._ === 'keyboardButtonWebView' ? - { + row = row.map(btn => + btn._ === 'keyboardButtonWebView' + ? { ...btn, _: 'keyboardButtonSimpleWebView', - } : - btn, + } + : btn, ) } diff --git a/packages/core/src/highlevel/types/bots/keyboards/index.ts b/packages/core/src/highlevel/types/bots/keyboards/index.ts index 1d2db182..4520ed86 100644 --- a/packages/core/src/highlevel/types/bots/keyboards/index.ts +++ b/packages/core/src/highlevel/types/bots/keyboards/index.ts @@ -1,6 +1,7 @@ +import * as BotKeyboard from './factories.js' + export * from './builder.js' export * from './types.js' -import * as BotKeyboard from './factories.js' export { /** diff --git a/packages/core/src/highlevel/types/bots/keyboards/keyboards.test.ts b/packages/core/src/highlevel/types/bots/keyboards/keyboards.test.ts index 93912cc1..f460a7c7 100644 --- a/packages/core/src/highlevel/types/bots/keyboards/keyboards.test.ts +++ b/packages/core/src/highlevel/types/bots/keyboards/keyboards.test.ts @@ -1,6 +1,5 @@ import { describe, expect, it } from 'vitest' - -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { BotKeyboard } from './index.js' @@ -20,7 +19,7 @@ describe('findButton', () => { }) it('should find buttons by predicate', () => { - expect(BotKeyboard.findButton(kb, (s) => s._ === 'keyboardButton')).toEqual({ + expect(BotKeyboard.findButton(kb, s => s._ === 'keyboardButton')).toEqual({ _: 'keyboardButton', text: 'aaa', }) diff --git a/packages/core/src/highlevel/types/bots/keyboards/types.ts b/packages/core/src/highlevel/types/bots/keyboards/types.ts index 48f73917..95823e9f 100644 --- a/packages/core/src/highlevel/types/bots/keyboards/types.ts +++ b/packages/core/src/highlevel/types/bots/keyboards/types.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' /** * Reply keyboard markup @@ -39,8 +39,8 @@ export interface InlineKeyboardMarkup { } export type ReplyMarkup = - | ReplyKeyboardMarkup - | ReplyKeyboardHide - | ReplyKeyboardForceReply - | InlineKeyboardMarkup - | tl.TypeReplyMarkup + | ReplyKeyboardMarkup + | ReplyKeyboardHide + | ReplyKeyboardForceReply + | InlineKeyboardMarkup + | tl.TypeReplyMarkup diff --git a/packages/core/src/highlevel/types/calls/discard-reason.ts b/packages/core/src/highlevel/types/calls/discard-reason.ts index 839e7b8a..1bf5f5a7 100644 --- a/packages/core/src/highlevel/types/calls/discard-reason.ts +++ b/packages/core/src/highlevel/types/calls/discard-reason.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertNever } from '../../../types/utils.js' diff --git a/packages/core/src/highlevel/types/conversation.ts b/packages/core/src/highlevel/types/conversation.ts index e1e7e1e6..d1c4a643 100644 --- a/packages/core/src/highlevel/types/conversation.ts +++ b/packages/core/src/highlevel/types/conversation.ts @@ -1,22 +1,24 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtArgumentError, MtTimeoutError } from '../../types/errors.js' -import { MaybePromise } from '../../types/utils.js' +import type { MaybePromise } from '../../types/utils.js' import { AsyncLock } from '../../utils/async-lock.js' -import { ControllablePromise, createControllablePromise } from '../../utils/controllable-promise.js' +import type { ControllablePromise } from '../../utils/controllable-promise.js' +import { createControllablePromise } from '../../utils/controllable-promise.js' import { Deque } from '../../utils/deque.js' import { getMarkedPeerId } from '../../utils/peer-utils.js' -import { ITelegramClient } from '../client.types.js' +import type { ITelegramClient } from '../client.types.js' import { getPeerDialogs } from '../methods/dialogs/get-peer-dialogs.js' import { readHistory } from '../methods/messages/read-history.js' import { sendMedia } from '../methods/messages/send-media.js' import { sendMediaGroup } from '../methods/messages/send-media-group.js' import { sendText } from '../methods/messages/send-text.js' import { resolvePeer } from '../methods/users/resolve-peer.js' + import type { Message } from './messages/message.js' import type { InputPeerLike } from './peers/index.js' import type { HistoryReadUpdate, ParsedUpdate } from './updates/index.js' -import { ParametersSkip2 } from './utils.js' +import type { ParametersSkip2 } from './utils.js' interface QueuedHandler { promise: ControllablePromise @@ -64,7 +66,6 @@ export class Conversation { readonly chat: InputPeerLike, ) { if (!(CONVERSATION_SYMBOL in client)) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any (client as any)[CONVERSATION_SYMBOL] = { pendingConversations: new Map(), hasConversations: false, @@ -73,7 +74,6 @@ export class Conversation { } private static _getState(client: ITelegramClient): ConversationsState { - // eslint-disable-next-line @typescript-eslint/no-explicit-any return (client as any)[CONVERSATION_SYMBOL] as ConversationsState } @@ -279,7 +279,7 @@ export class Conversation { markRead({ message, clearMentions = true, - }: { message?: number | null; clearMentions?: boolean } = {}): Promise { + }: { message?: number | null, clearMentions?: boolean } = {}): Promise { if (!this._started) { throw new MtArgumentError("Conversation hasn't started yet") } @@ -319,7 +319,6 @@ export class Conversation { this.stop() - // eslint-disable-next-line @typescript-eslint/no-throw-literal if (err) throw err return res! @@ -329,7 +328,7 @@ export class Conversation { * Wait for a new message in the conversation * * @param filter Filter for the handler. You can use any filter you can use for dispatcher - * @param [timeout=15000] Timeout for the handler in ms. Pass `null` to disable. + * @param [timeout] Timeout for the handler in ms. Pass `null` to disable. * When the timeout is reached, `MtTimeoutError` is thrown. */ waitForNewMessage( @@ -342,12 +341,12 @@ export class Conversation { const promise = createControllablePromise() - let timer: NodeJS.Timeout | undefined = undefined + let timer: NodeJS.Timeout | undefined if (timeout !== null) { timer = setTimeout(() => { promise.reject(new MtTimeoutError(timeout)) - this._queuedNewMessage.removeBy((it) => it.promise === promise) + this._queuedNewMessage.removeBy(it => it.promise === promise) }, timeout) } @@ -394,9 +393,9 @@ export class Conversation { ): Promise { const msgId = params?.message ?? this._lastMessage ?? 0 - const pred = filter ? - (msg: Message) => (msg.id > msgId ? filter(msg) : false) : - (msg: Message) => msg.id > msgId + const pred = filter + ? (msg: Message) => (msg.id > msgId ? filter(msg) : false) + : (msg: Message) => msg.id > msgId return this.waitForNewMessage(pred, params?.timeout) } @@ -434,9 +433,9 @@ export class Conversation { throw new MtArgumentError('Provide message for which to wait for reply for') } - const pred = filter ? - (msg: Message) => (msg.replyToMessage?.id === msgId ? filter(msg) : false) : - (msg: Message) => msg.replyToMessage?.id === msgId + const pred = filter + ? (msg: Message) => (msg.replyToMessage?.id === msgId ? filter(msg) : false) + : (msg: Message) => msg.replyToMessage?.id === msgId return this.waitForNewMessage(pred, params?.timeout) } @@ -483,7 +482,7 @@ export class Conversation { const promise = createControllablePromise() - let timer: NodeJS.Timeout | undefined = undefined + let timer: NodeJS.Timeout | undefined const timeout = params?.timeout if (timeout) { @@ -531,7 +530,7 @@ export class Conversation { const promise = createControllablePromise() - let timer: NodeJS.Timeout | undefined = undefined + let timer: NodeJS.Timeout | undefined if (timeout !== null) { timer = setTimeout(() => { diff --git a/packages/core/src/highlevel/types/errors.ts b/packages/core/src/highlevel/types/errors.ts index f2e93fe6..3bab0437 100644 --- a/packages/core/src/highlevel/types/errors.ts +++ b/packages/core/src/highlevel/types/errors.ts @@ -1,5 +1,6 @@ import { MtcuteError } from '../../types/errors.js' -import { InputPeerLike } from './peers/index.js' + +import type { InputPeerLike } from './peers/index.js' /** * Could not find a peer by the provided information @@ -15,7 +16,7 @@ export class MtMessageNotFoundError extends MtcuteError { readonly messageId: number, readonly context?: string, ) { - super(`Message${context ? ' ' + context : ''} ${messageId} not found in ${peerId}`) + super(`Message${context ? ` ${context}` : ''} ${messageId} not found in ${peerId}`) } } diff --git a/packages/core/src/highlevel/types/files/file-location.ts b/packages/core/src/highlevel/types/files/file-location.ts index e3745137..bab016c3 100644 --- a/packages/core/src/highlevel/types/files/file-location.ts +++ b/packages/core/src/highlevel/types/files/file-location.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' @@ -21,10 +21,10 @@ export class FileLocation { * first time downloading the file. */ readonly location: - | tl.TypeInputFileLocation - | tl.TypeInputWebFileLocation - | Uint8Array - | (() => tl.TypeInputFileLocation | tl.TypeInputWebFileLocation | Uint8Array), + | tl.TypeInputFileLocation + | tl.TypeInputWebFileLocation + | Uint8Array + | (() => tl.TypeInputFileLocation | tl.TypeInputWebFileLocation | Uint8Array), /** * File size in bytes, when available */ diff --git a/packages/core/src/highlevel/types/files/uploaded-file.ts b/packages/core/src/highlevel/types/files/uploaded-file.ts index e594f7b2..8c6b142e 100644 --- a/packages/core/src/highlevel/types/files/uploaded-file.ts +++ b/packages/core/src/highlevel/types/files/uploaded-file.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' /** * Describes a file uploaded to the Telegram servers diff --git a/packages/core/src/highlevel/types/files/utils.ts b/packages/core/src/highlevel/types/files/utils.ts index a339fc21..15f4b107 100644 --- a/packages/core/src/highlevel/types/files/utils.ts +++ b/packages/core/src/highlevel/types/files/utils.ts @@ -1,9 +1,10 @@ -import { tdFileId } from '@mtcute/file-id' -import { tl } from '@mtcute/tl' +import type { tdFileId } from '@mtcute/file-id' +import type { tl } from '@mtcute/tl' -import { AnyToNever } from '../../../types/utils.js' -import { FileLocation } from './file-location.js' -import { UploadedFile } from './uploaded-file.js' +import type { AnyToNever } from '../../../types/utils.js' + +import type { FileLocation } from './file-location.js' +import type { UploadedFile } from './uploaded-file.js' /** * Describes types that can be used in {@link TelegramClient.uploadFile} @@ -20,16 +21,16 @@ import { UploadedFile } from './uploaded-file.js' * - `Response` (from `window.fetch`) */ export type UploadFileLike = - | URL - | Uint8Array - | File - | Blob - | string - | AnyToNever - | AnyToNever> - | AnyToNever - | AnyToNever - | AnyToNever + | URL + | Uint8Array + | File + | Blob + | string + | AnyToNever + | AnyToNever> + | AnyToNever + | AnyToNever + | AnyToNever // AnyToNever in the above type ensures we don't make the entire type `any` // if some of the types are not available in the current environment @@ -55,11 +56,11 @@ export type UploadFileLike = * - `td.RawFullRemoteFileLocation` (parsed File ID) */ export type InputFileLike = - | UploadFileLike - | UploadedFile - | tl.TypeInputFile - | tl.TypeInputMedia - | tdFileId.RawFullRemoteFileLocation + | UploadFileLike + | UploadedFile + | tl.TypeInputFile + | tl.TypeInputMedia + | tdFileId.RawFullRemoteFileLocation /** * File location which should be downloaded. diff --git a/packages/core/src/highlevel/types/files/web-document.ts b/packages/core/src/highlevel/types/files/web-document.ts index 786c7467..6752956d 100644 --- a/packages/core/src/highlevel/types/files/web-document.ts +++ b/packages/core/src/highlevel/types/files/web-document.ts @@ -1,10 +1,11 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtArgumentError } from '../../../types/errors.js' import { makeInspectable } from '../../utils/index.js' + import { FileLocation } from './file-location.js' -const STUB_LOCATION = () => { +function STUB_LOCATION(): never { throw new MtArgumentError('This web document is not downloadable through Telegram') } @@ -21,13 +22,13 @@ const STUB_LOCATION = () => { export class WebDocument extends FileLocation { constructor(readonly raw: tl.TypeWebDocument) { super( - raw._ === 'webDocument' ? - { + raw._ === 'webDocument' + ? { _: 'inputWebFileLocation', url: raw.url, accessHash: raw.accessHash, - } : - STUB_LOCATION, + } + : STUB_LOCATION, raw.size, ) this.raw = raw diff --git a/packages/core/src/highlevel/types/media/audio.ts b/packages/core/src/highlevel/types/media/audio.ts index d2dd8764..abfca025 100644 --- a/packages/core/src/highlevel/types/media/audio.ts +++ b/packages/core/src/highlevel/types/media/audio.ts @@ -1,8 +1,9 @@ import { tdFileId } from '@mtcute/file-id' -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' + import { RawDocument } from './document.js' /** diff --git a/packages/core/src/highlevel/types/media/contact.ts b/packages/core/src/highlevel/types/media/contact.ts index be15062b..aa793519 100644 --- a/packages/core/src/highlevel/types/media/contact.ts +++ b/packages/core/src/highlevel/types/media/contact.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' diff --git a/packages/core/src/highlevel/types/media/dice.ts b/packages/core/src/highlevel/types/media/dice.ts index a1e86238..34102aa8 100644 --- a/packages/core/src/highlevel/types/media/dice.ts +++ b/packages/core/src/highlevel/types/media/dice.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' diff --git a/packages/core/src/highlevel/types/media/document-utils.ts b/packages/core/src/highlevel/types/media/document-utils.ts index 382ac415..883537a3 100644 --- a/packages/core/src/highlevel/types/media/document-utils.ts +++ b/packages/core/src/highlevel/types/media/document-utils.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { Audio } from './audio.js' import { Document } from './document.js' @@ -9,17 +9,17 @@ import { Voice } from './voice.js' export type ParsedDocument = Sticker | Voice | Audio | Video | Document /** @internal */ -export function parseSticker(doc: tl.RawDocument) { +export function parseSticker(doc: tl.RawDocument): Sticker | undefined { const stickerAttr = doc.attributes.find( - (a) => a._ === 'documentAttributeSticker' || a._ === 'documentAttributeCustomEmoji', + a => a._ === 'documentAttributeSticker' || a._ === 'documentAttributeCustomEmoji', ) if (stickerAttr) { const sz = doc.attributes.find( - (it) => it._ === 'documentAttributeImageSize' || it._ === 'documentAttributeVideo', - )! as tl.RawDocumentAttributeImageSize | tl.RawDocumentAttributeVideo + it => it._ === 'documentAttributeImageSize' || it._ === 'documentAttributeVideo', + )! - return new Sticker(doc, stickerAttr as tl.RawDocumentAttributeSticker | tl.RawDocumentAttributeCustomEmoji, sz) + return new Sticker(doc, stickerAttr, sz) } } diff --git a/packages/core/src/highlevel/types/media/document.ts b/packages/core/src/highlevel/types/media/document.ts index b751e6d3..8b66274b 100644 --- a/packages/core/src/highlevel/types/media/document.ts +++ b/packages/core/src/highlevel/types/media/document.ts @@ -1,10 +1,11 @@ import { tdFileId as td, toFileId, toUniqueFileId } from '@mtcute/file-id' -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { getPlatform } from '../../../platform.js' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' import { FileLocation } from '../files/index.js' + import { Thumbnail } from './thumbnail.js' /** @@ -36,9 +37,9 @@ export abstract class RawDocument extends FileLocation { * attributes. */ get fileName(): string | null { - const attr = this.raw.attributes.find((it) => it._ === 'documentAttributeFilename') + const attr = this.raw.attributes.find(it => it._ === 'documentAttributeFilename') - return attr ? (attr as tl.RawDocumentAttributeFilename).fileName : null + return attr?.fileName ?? null } /** @@ -63,8 +64,8 @@ export abstract class RawDocument extends FileLocation { get thumbnails(): ReadonlyArray { const arr: Thumbnail[] = [] - this.raw.thumbs?.forEach((sz) => arr.push(new Thumbnail(this.raw, sz))) - this.raw.videoThumbs?.forEach((sz) => arr.push(new Thumbnail(this.raw, sz))) + this.raw.thumbs?.forEach(sz => arr.push(new Thumbnail(this.raw, sz))) + this.raw.videoThumbs?.forEach(sz => arr.push(new Thumbnail(this.raw, sz))) return arr } diff --git a/packages/core/src/highlevel/types/media/extended-media.ts b/packages/core/src/highlevel/types/media/extended-media.ts index b918a320..a1ede88e 100644 --- a/packages/core/src/highlevel/types/media/extended-media.ts +++ b/packages/core/src/highlevel/types/media/extended-media.ts @@ -1,7 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/inspectable.js' import { memoizeGetters } from '../../utils/memoize.js' + import { Thumbnail } from './thumbnail.js' export class ExtendedMediaPreview { diff --git a/packages/core/src/highlevel/types/media/game.ts b/packages/core/src/highlevel/types/media/game.ts index 3da8867e..8ef4f8ac 100644 --- a/packages/core/src/highlevel/types/media/game.ts +++ b/packages/core/src/highlevel/types/media/game.ts @@ -1,7 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' + import { Photo } from './photo.js' import { Video } from './video.js' @@ -53,9 +54,7 @@ export class Game { get animation(): Video | null { if (this.game.document?._ !== 'document') return null - const attr = this.game.document.attributes.find((it) => it._ === 'documentAttributeVideo') as - | tl.RawDocumentAttributeVideo - | undefined + const attr = this.game.document.attributes.find(it => it._ === 'documentAttributeVideo') if (!attr) { return null diff --git a/packages/core/src/highlevel/types/media/input-media/factories.ts b/packages/core/src/highlevel/types/media/input-media/factories.ts index 8129b220..4aff4a26 100644 --- a/packages/core/src/highlevel/types/media/input-media/factories.ts +++ b/packages/core/src/highlevel/types/media/input-media/factories.ts @@ -1,7 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { InputFileLike } from '../../files/utils.js' -import { +import type { InputFileLike } from '../../files/utils.js' + +import type { CaptionMixin, InputMediaAudio, InputMediaAuto, diff --git a/packages/core/src/highlevel/types/media/input-media/index.ts b/packages/core/src/highlevel/types/media/input-media/index.ts index e2d20543..e50835a0 100644 --- a/packages/core/src/highlevel/types/media/input-media/index.ts +++ b/packages/core/src/highlevel/types/media/input-media/index.ts @@ -1,3 +1,4 @@ import * as InputMedia from './factories.js' + export * from './types.js' export { InputMedia } diff --git a/packages/core/src/highlevel/types/media/input-media/types.ts b/packages/core/src/highlevel/types/media/input-media/types.ts index b5e22c9b..4ed3a556 100644 --- a/packages/core/src/highlevel/types/media/input-media/types.ts +++ b/packages/core/src/highlevel/types/media/input-media/types.ts @@ -1,10 +1,10 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { MaybeArray } from '../../../../types/utils.js' -import { InputText } from '../../../types/misc/entities.js' -import { InputFileLike } from '../../files/index.js' -import { InputPeerLike } from '../../peers/index.js' -import { VenueSource } from '../venue.js' +import type { MaybeArray } from '../../../../types/utils.js' +import type { InputText } from '../../../types/misc/entities.js' +import type { InputFileLike } from '../../files/index.js' +import type { InputPeerLike } from '../../peers/index.js' +import type { VenueSource } from '../venue.js' export interface CaptionMixin { /** @@ -602,23 +602,23 @@ export interface InputMediaPaidMedia extends CaptionMixin { * @link InputMedia */ export type InputMediaLike = - | InputMediaAudio - | InputMediaVoice - | InputMediaDocument - | InputMediaPhoto - | InputMediaVideo - | InputMediaAuto - | InputMediaSticker - | InputMediaVenue - | InputMediaGeo - | InputMediaGeoLive - | InputMediaDice - | InputMediaContact - | InputMediaGame - | InputMediaInvoice - | InputMediaPoll - | InputMediaQuiz - | InputMediaStory - | InputMediaWebpage - | InputMediaPaidMedia - | tl.TypeInputMedia + | InputMediaAudio + | InputMediaVoice + | InputMediaDocument + | InputMediaPhoto + | InputMediaVideo + | InputMediaAuto + | InputMediaSticker + | InputMediaVenue + | InputMediaGeo + | InputMediaGeoLive + | InputMediaDice + | InputMediaContact + | InputMediaGame + | InputMediaInvoice + | InputMediaPoll + | InputMediaQuiz + | InputMediaStory + | InputMediaWebpage + | InputMediaPaidMedia + | tl.TypeInputMedia diff --git a/packages/core/src/highlevel/types/media/invoice.ts b/packages/core/src/highlevel/types/media/invoice.ts index 398dca90..2e6c8168 100644 --- a/packages/core/src/highlevel/types/media/invoice.ts +++ b/packages/core/src/highlevel/types/media/invoice.ts @@ -1,10 +1,11 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtArgumentError } from '../../../types/errors.js' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' import { WebDocument } from '../files/web-document.js' import type { MessageMedia } from '../messages/message-media.js' + import { ExtendedMediaPreview } from './extended-media.js' /** @@ -23,7 +24,7 @@ export class Invoice { constructor( readonly raw: tl.RawMessageMediaInvoice, - private readonly _extendedMedia?: MessageMedia, + private readonly _extendedMedia?: MessageMedia | undefined, ) {} /** diff --git a/packages/core/src/highlevel/types/media/location.ts b/packages/core/src/highlevel/types/media/location.ts index b09ed6d1..ba8f0a20 100644 --- a/packages/core/src/highlevel/types/media/location.ts +++ b/packages/core/src/highlevel/types/media/location.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' import { FileLocation } from '../files/index.js' diff --git a/packages/core/src/highlevel/types/media/paid-media.ts b/packages/core/src/highlevel/types/media/paid-media.ts index 3b82752b..37208258 100644 --- a/packages/core/src/highlevel/types/media/paid-media.ts +++ b/packages/core/src/highlevel/types/media/paid-media.ts @@ -1,8 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/inspectable.js' import { memoizeGetters } from '../../utils/memoize.js' -import { MessageMedia } from '../messages/message-media.js' +import type { MessageMedia } from '../messages/message-media.js' + import { ExtendedMediaPreview } from './extended-media.js' export class PaidMedia { @@ -64,7 +65,7 @@ export class PaidMedia { return { _: 'inputMediaPaidMedia', starsAmount: this.raw.starsAmount, - extendedMedia: this._extendedMedia.map((m) => m!.inputMedia), + extendedMedia: this._extendedMedia.map(m => m!.inputMedia), } } } diff --git a/packages/core/src/highlevel/types/media/photo.ts b/packages/core/src/highlevel/types/media/photo.ts index 7e7d411a..160e464e 100644 --- a/packages/core/src/highlevel/types/media/photo.ts +++ b/packages/core/src/highlevel/types/media/photo.ts @@ -1,9 +1,10 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtArgumentError } from '../../../types/errors.js' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' import { FileLocation } from '../files/index.js' + import { Thumbnail } from './thumbnail.js' /** @@ -22,7 +23,7 @@ export class Photo extends FileLocation { constructor( readonly raw: tl.RawPhoto, - readonly media?: tl.RawMessageMediaPhoto, + readonly media?: tl.RawMessageMediaPhoto | undefined, ) { const location = { _: 'inputPhotoFileLocation', @@ -37,9 +38,7 @@ export class Photo extends FileLocation { let bestSize: tl.RawPhotoSize | tl.RawPhotoSizeProgressive - const progressive = raw.sizes.find((it) => it._ === 'photoSizeProgressive') as - | tl.RawPhotoSizeProgressive - | undefined + const progressive = raw.sizes.find(it => it._ === 'photoSizeProgressive') if (progressive) { location.thumbSize = progressive.type @@ -93,7 +92,7 @@ export class Photo extends FileLocation { * Whether this photo is an animated profile picture */ get isAnimatedAvatar(): boolean { - return Boolean(this.raw.videoSizes?.some((s) => s._ === 'videoSize' && s.type === 'u')) + return Boolean(this.raw.videoSizes?.some(s => s._ === 'videoSize' && s.type === 'u')) } /** @@ -101,7 +100,7 @@ export class Photo extends FileLocation { */ get isMarkupAvatar(): boolean { return Boolean( - this.raw.videoSizes?.some((s) => s._ === 'videoSizeEmojiMarkup' || s._ === 'videoSizeStickerMarkup'), + this.raw.videoSizes?.some(s => s._ === 'videoSizeEmojiMarkup' || s._ === 'videoSizeStickerMarkup'), ) } @@ -122,8 +121,8 @@ export class Photo extends FileLocation { * represented by the current object. */ get thumbnails(): ReadonlyArray { - const res = this.raw.sizes.map((sz) => new Thumbnail(this.raw, sz)) - this.raw.videoSizes?.forEach((sz) => res.push(new Thumbnail(this.raw, sz))) + const res = this.raw.sizes.map(sz => new Thumbnail(this.raw, sz)) + this.raw.videoSizes?.forEach(sz => res.push(new Thumbnail(this.raw, sz))) return res } @@ -138,7 +137,7 @@ export class Photo extends FileLocation { * @param type Thumbnail type */ getThumbnail(type: string): Thumbnail | null { - return this.thumbnails.find((it) => it.type === type) ?? null + return this.thumbnails.find(it => it.type === type) ?? null } /** diff --git a/packages/core/src/highlevel/types/media/poll.ts b/packages/core/src/highlevel/types/media/poll.ts index 3efeb751..472f26d6 100644 --- a/packages/core/src/highlevel/types/media/poll.ts +++ b/packages/core/src/highlevel/types/media/poll.ts @@ -1,17 +1,17 @@ import Long from 'long' - -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' import { MessageEntity } from '../messages/message-entity.js' -import { PeersIndex } from '../peers/peers-index.js' +import type { PeersIndex } from '../peers/peers-index.js' export class PollAnswer { constructor( readonly raw: tl.TypePollAnswer, - readonly result?: tl.TypePollAnswerVoters, + readonly result?: tl.RawPollAnswerVoters | undefined, ) {} + /** * Answer text */ @@ -23,7 +23,7 @@ export class PollAnswer { * Format entities for {@link text}, currently may only contain custom emojis */ get textEntities(): ReadonlyArray { - return this.raw.text.entities.map((ent) => new MessageEntity(ent, this.raw.text.text)) + return this.raw.text.entities.map(ent => new MessageEntity(ent, this.raw.text.text)) } /** @@ -38,7 +38,7 @@ export class PollAnswer { * Number of people who has chosen this result. * If not available (i.e. not voted yet) * - * @default `0` + * @default */ get voters(): number { return this.result?.voters ?? 0 @@ -55,7 +55,7 @@ export class PollAnswer { * Whether this answer is correct (for quizzes). * Not available before choosing an answer * - * @default `false` + * @default */ get correct(): boolean { return Boolean(this.result?.correct) @@ -71,7 +71,7 @@ export class Poll { constructor( readonly raw: tl.TypePoll, readonly _peers: PeersIndex, - readonly results?: tl.TypePollResults, + readonly results?: tl.RawPollResults | undefined, ) {} /** @@ -92,7 +92,7 @@ export class Poll { * Format entities for {@link question} (currently may only contain custom emojis) */ get questionEntities(): ReadonlyArray { - return this.raw.question.entities.map((ent) => new MessageEntity(ent, this.raw.question.text)) + return this.raw.question.entities.map(ent => new MessageEntity(ent, this.raw.question.text)) } /** diff --git a/packages/core/src/highlevel/types/media/sticker.ts b/packages/core/src/highlevel/types/media/sticker.ts index 8a5f2604..692940d8 100644 --- a/packages/core/src/highlevel/types/media/sticker.ts +++ b/packages/core/src/highlevel/types/media/sticker.ts @@ -1,9 +1,10 @@ import { tdFileId } from '@mtcute/file-id' -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtArgumentError } from '../../../types/errors.js' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' + import { RawDocument } from './document.js' export const MASK_POSITION_POINT_TO_TL = { @@ -71,7 +72,7 @@ export class Sticker extends RawDocument { constructor( doc: tl.RawDocument, readonly attr: tl.RawDocumentAttributeSticker | tl.RawDocumentAttributeCustomEmoji, - readonly attr2?: tl.RawDocumentAttributeImageSize | tl.RawDocumentAttributeVideo, + readonly attr2?: tl.RawDocumentAttributeImageSize | tl.RawDocumentAttributeVideo | undefined, ) { super(doc) } @@ -95,7 +96,7 @@ export class Sticker extends RawDocument { * (has premium fullscreen animation) */ get isPremiumSticker(): boolean { - return Boolean(this.raw.videoThumbs?.some((s) => s._ === 'videoSize' && s.type === 'f')) + return Boolean(this.raw.videoThumbs?.some(s => s._ === 'videoSize' && s.type === 'f')) } /** diff --git a/packages/core/src/highlevel/types/media/story.ts b/packages/core/src/highlevel/types/media/story.ts index 845f5613..52e0c949 100644 --- a/packages/core/src/highlevel/types/media/story.ts +++ b/packages/core/src/highlevel/types/media/story.ts @@ -1,8 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/inspectable.js' -import { parsePeer, Peer } from '../peers/peer.js' -import { PeersIndex } from '../peers/peers-index.js' +import type { Peer } from '../peers/peer.js' +import { parsePeer } from '../peers/peer.js' +import type { PeersIndex } from '../peers/peers-index.js' import { Story } from '../stories/story.js' /** diff --git a/packages/core/src/highlevel/types/media/thumbnail.ts b/packages/core/src/highlevel/types/media/thumbnail.ts index 74b62bfa..3bfd54d7 100644 --- a/packages/core/src/highlevel/types/media/thumbnail.ts +++ b/packages/core/src/highlevel/types/media/thumbnail.ts @@ -1,7 +1,6 @@ import Long from 'long' - import { tdFileId as td, toFileId, toUniqueFileId } from '@mtcute/file-id' -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { getPlatform } from '../../../platform.js' import { MtArgumentError, MtTypeAssertionError } from '../../../types/errors.js' @@ -77,14 +76,14 @@ export class Thumbnail extends FileLocation { switch (sz._) { case 'photoStrippedSize': location = strippedPhotoToJpg(sz.bytes) - width = height = NaN + width = height = Number.NaN size = location.length break case 'photoPathSize': { // try to find documentAttributeImageSize - const imageSize = media._ === 'document' ? - media.attributes.find((it) => it._ === 'documentAttributeImageSize') as tl.RawDocumentAttributeImageSize : - undefined + const imageSize = media._ === 'document' + ? media.attributes.find(it => it._ === 'documentAttributeImageSize') as tl.RawDocumentAttributeImageSize + : undefined // lazily location = () => svgPathToFile(this._path!, imageSize) @@ -102,7 +101,7 @@ export class Thumbnail extends FileLocation { location = () => { throw new MtArgumentError('Cannot download thumbnail with emoji/sticker markup, try other size') } - width = height = NaN + width = height = Number.NaN size = Infinity break default: @@ -198,8 +197,8 @@ export class Thumbnail extends FileLocation { */ get fileId(): string { if ( - (this.raw._ !== 'photoSize' && this.raw._ !== 'photoSizeProgressive' && this.raw._ !== 'videoSize') || - this._media._ === 'messageExtendedMediaPreview' // just for type safety + (this.raw._ !== 'photoSize' && this.raw._ !== 'photoSizeProgressive' && this.raw._ !== 'videoSize') + || this._media._ === 'messageExtendedMediaPreview' // just for type safety ) { throw new MtArgumentError(`Cannot generate a file ID for "${this.type}"`) } @@ -245,8 +244,8 @@ export class Thumbnail extends FileLocation { */ get uniqueFileId(): string { if ( - (this.raw._ !== 'photoSize' && this.raw._ !== 'photoSizeProgressive' && this.raw._ !== 'videoSize') || - this._media._ === 'messageExtendedMediaPreview' // just for type safety + (this.raw._ !== 'photoSize' && this.raw._ !== 'photoSizeProgressive' && this.raw._ !== 'videoSize') + || this._media._ === 'messageExtendedMediaPreview' // just for type safety ) { throw new MtArgumentError(`Cannot generate a unique file ID for "${this.type}"`) } diff --git a/packages/core/src/highlevel/types/media/venue.ts b/packages/core/src/highlevel/types/media/venue.ts index 374e57ad..05628856 100644 --- a/packages/core/src/highlevel/types/media/venue.ts +++ b/packages/core/src/highlevel/types/media/venue.ts @@ -1,8 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertTypeIs } from '../../../utils/type-assertions.js' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' + import { Location } from './location.js' export interface VenueSource { diff --git a/packages/core/src/highlevel/types/media/video.ts b/packages/core/src/highlevel/types/media/video.ts index 382599a0..718fcd05 100644 --- a/packages/core/src/highlevel/types/media/video.ts +++ b/packages/core/src/highlevel/types/media/video.ts @@ -1,8 +1,9 @@ import { tdFileId } from '@mtcute/file-id' -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' + import { RawDocument } from './document.js' /** @@ -23,7 +24,7 @@ export class Video extends RawDocument { constructor( doc: tl.RawDocument, readonly attr: tl.RawDocumentAttributeVideo | tl.RawDocumentAttributeImageSize, - readonly media?: tl.RawMessageMediaDocument, + readonly media?: tl.RawMessageMediaDocument | undefined, ) { super(doc) } @@ -57,8 +58,8 @@ export class Video extends RawDocument { */ get isAnimation(): boolean { return ( - this.attr._ === 'documentAttributeImageSize' || - this.raw.attributes.some((it) => it._ === 'documentAttributeAnimated') + this.attr._ === 'documentAttributeImageSize' + || this.raw.attributes.some(it => it._ === 'documentAttributeAnimated') ) } diff --git a/packages/core/src/highlevel/types/media/voice.ts b/packages/core/src/highlevel/types/media/voice.ts index 006995bd..3b5efb5c 100644 --- a/packages/core/src/highlevel/types/media/voice.ts +++ b/packages/core/src/highlevel/types/media/voice.ts @@ -1,9 +1,10 @@ import { tdFileId } from '@mtcute/file-id' -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' import { decodeWaveform } from '../../utils/voice-utils.js' + import { RawDocument } from './document.js' /** diff --git a/packages/core/src/highlevel/types/media/web-page.ts b/packages/core/src/highlevel/types/media/web-page.ts index 456fee51..15d12271 100644 --- a/packages/core/src/highlevel/types/media/web-page.ts +++ b/packages/core/src/highlevel/types/media/web-page.ts @@ -1,9 +1,10 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtArgumentError } from '../../../types/errors.js' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' -import { RawDocument } from './document.js' + +import type { RawDocument } from './document.js' import { parseDocument } from './document-utils.js' import { Photo } from './photo.js' diff --git a/packages/core/src/highlevel/types/messages/dialog.ts b/packages/core/src/highlevel/types/messages/dialog.ts index d8d4027f..f852c718 100644 --- a/packages/core/src/highlevel/types/messages/dialog.ts +++ b/packages/core/src/highlevel/types/messages/dialog.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { getMarkedPeerId } from '../../../utils/peer-utils.js' import { assertTypeIsNot, hasValueAtKey } from '../../../utils/type-assertions.js' @@ -6,6 +6,7 @@ import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' import { Chat } from '../peers/chat.js' import { PeersIndex } from '../peers/peers-index.js' + import { DraftMessage } from './draft-message.js' import { Message } from './message.js' @@ -48,7 +49,7 @@ export class Dialog { messages.set(getMarkedPeerId(msg.peerId), msg) }) - const arr = dialogs.dialogs.filter(hasValueAtKey('_', 'dialog')).map((it) => new Dialog(it, peers, messages)) + const arr = dialogs.dialogs.filter(hasValueAtKey('_', 'dialog')).map(it => new Dialog(it, peers, messages)) if (limit) { return arr.slice(0, limit) @@ -70,10 +71,10 @@ export class Dialog { index[getMarkedPeerId(peer)] = true }) - return dialogs.filter((i) => index[i.chat.id]) + return dialogs.filter(i => index[i.chat.id]) } - return dialogs.filter((i) => i.isPinned) + return dialogs.filter(i => i.isPinned) } /** diff --git a/packages/core/src/highlevel/types/messages/draft-message.ts b/packages/core/src/highlevel/types/messages/draft-message.ts index c5c36bec..fb3e5d84 100644 --- a/packages/core/src/highlevel/types/messages/draft-message.ts +++ b/packages/core/src/highlevel/types/messages/draft-message.ts @@ -1,7 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' + import { MessageEntity } from './message-entity.js' /** diff --git a/packages/core/src/highlevel/types/messages/fact-check.ts b/packages/core/src/highlevel/types/messages/fact-check.ts index 24ab5682..77b11746 100644 --- a/packages/core/src/highlevel/types/messages/fact-check.ts +++ b/packages/core/src/highlevel/types/messages/fact-check.ts @@ -1,7 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/inspectable.js' import { memoizeGetters } from '../../utils/memoize.js' + import { MessageEntity } from './message-entity.js' /** diff --git a/packages/core/src/highlevel/types/messages/input-message-id.ts b/packages/core/src/highlevel/types/messages/input-message-id.ts index a1f64489..f11451b8 100644 --- a/packages/core/src/highlevel/types/messages/input-message-id.ts +++ b/packages/core/src/highlevel/types/messages/input-message-id.ts @@ -1,4 +1,5 @@ import type { InputPeerLike } from '../peers/index.js' + import type { Message } from './message.js' /** @@ -6,13 +7,16 @@ import type { Message } from './message.js' * * Either a message object (in `message` field), or a chat ID and a message ID */ -export type InputMessageId = { chatId: InputPeerLike; message: number } | { message: Message } +export type InputMessageId = { chatId: InputPeerLike, message: number } | { message: Message } /** Remove {@link InputMessageId} type from the given type */ export type OmitInputMessageId = Omit /** @internal */ -export function normalizeInputMessageId(id: InputMessageId) { +export function normalizeInputMessageId(id: InputMessageId): { + chatId: InputPeerLike + message: number +} { if ('chatId' in id) return id return { chatId: id.message.chat.inputPeer, message: id.message.id } diff --git a/packages/core/src/highlevel/types/messages/message-action.ts b/packages/core/src/highlevel/types/messages/message-action.ts index 37d99ae5..577daa49 100644 --- a/packages/core/src/highlevel/types/messages/message-action.ts +++ b/packages/core/src/highlevel/types/messages/message-action.ts @@ -1,9 +1,12 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { getMarkedPeerId } from '../../../utils/peer-utils.js' -import { _callDiscardReasonFromTl, CallDiscardReason } from '../calls/index.js' +import type { CallDiscardReason } from '../calls/index.js' +import { _callDiscardReasonFromTl } from '../calls/index.js' import { Photo } from '../media/photo.js' -import { parsePeer, Peer } from '../peers/peer.js' +import type { Peer } from '../peers/peer.js' +import { parsePeer } from '../peers/peer.js' + import type { Message } from './message.js' /** Group was created */ @@ -495,51 +498,51 @@ export interface ActionStarsGifted { } export type MessageAction = - | ActionChatCreated - | ActionChannelCreated - | ActionChatMigrateTo - | ActionChannelMigrateFrom - | ActionMessagePinned - | ActionHistoryCleared - | ActionGameScore - | ActionContactJoined - | ActionTitleChanged - | ActionPhotoChanged - | ActionPhotoDeleted - | ActionUsersAdded - | ActionUserLeft - | ActionUserRemoved - | ActionUserJoinedLink - | ActionPaymentReceived - | ActionPaymentSent - | ActionCall - | ActionScreenshotTaken - | ActionBotAllowed - | ActionGeoProximity - | ActionGroupCallStarted - | ActionGroupCallEnded - | ActionGroupCallScheduled - | ActionGroupInvite - | ActionTtlChanged - | ActionTopicCreated - | ActionTopicEdited - | ActionCustom - | ActionThemeChanged - | ActionUserJoinedApproved - | ActionWebviewDataSent - | ActionWebviewDataReceived - | ActionPremiumGifted - | ActionPhotoSuggested - | ActionPeerSent - | ActionPeerChosen - | ActionWallpaperChanged - | ActionGiftCode - | ActionGiveawayStarted - | ActionGiveawayEnded - | ActionBoostApply - | ActionPaymentRefunded - | ActionStarsGifted - | null + | ActionChatCreated + | ActionChannelCreated + | ActionChatMigrateTo + | ActionChannelMigrateFrom + | ActionMessagePinned + | ActionHistoryCleared + | ActionGameScore + | ActionContactJoined + | ActionTitleChanged + | ActionPhotoChanged + | ActionPhotoDeleted + | ActionUsersAdded + | ActionUserLeft + | ActionUserRemoved + | ActionUserJoinedLink + | ActionPaymentReceived + | ActionPaymentSent + | ActionCall + | ActionScreenshotTaken + | ActionBotAllowed + | ActionGeoProximity + | ActionGroupCallStarted + | ActionGroupCallEnded + | ActionGroupCallScheduled + | ActionGroupInvite + | ActionTtlChanged + | ActionTopicCreated + | ActionTopicEdited + | ActionCustom + | ActionThemeChanged + | ActionUserJoinedApproved + | ActionWebviewDataSent + | ActionWebviewDataReceived + | ActionPremiumGifted + | ActionPhotoSuggested + | ActionPeerSent + | ActionPeerChosen + | ActionWallpaperChanged + | ActionGiftCode + | ActionGiveawayStarted + | ActionGiveawayEnded + | ActionBoostApply + | ActionPaymentRefunded + | ActionStarsGifted + | null /** @internal */ export function _messageActionFromTl(this: Message, act: tl.TypeMessageAction): MessageAction { @@ -745,12 +748,12 @@ export function _messageActionFromTl(this: Message, act: tl.TypeMessageAction): currency: act.currency, amount: act.amount.toNumber(), months: act.months, - crypto: act.cryptoAmount ? - { + crypto: act.cryptoAmount + ? { currency: act.cryptoCurrency!, amount: act.cryptoAmount.toNumber(), - } : - undefined, + } + : undefined, } case 'messageActionSuggestProfilePhoto': return { @@ -767,7 +770,7 @@ export function _messageActionFromTl(this: Message, act: tl.TypeMessageAction): return { type: 'peer_chosen', buttonId: act.buttonId, - peers: act.peers.map((it) => parsePeer(it, this._peers)), + peers: act.peers.map(it => parsePeer(it, this._peers)), } case 'messageActionSetChatWallPaper': return { diff --git a/packages/core/src/highlevel/types/messages/message-effect.ts b/packages/core/src/highlevel/types/messages/message-effect.ts index d7d63f62..ed775837 100644 --- a/packages/core/src/highlevel/types/messages/message-effect.ts +++ b/packages/core/src/highlevel/types/messages/message-effect.ts @@ -1,11 +1,11 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtTypeAssertionError } from '../../../types/errors.js' -import { LongMap } from '../../../utils/long-utils.js' +import type { LongMap } from '../../../utils/long-utils.js' import { makeInspectable } from '../../utils/inspectable.js' import { memoizeGetters } from '../../utils/memoize.js' import { parseSticker } from '../media/document-utils.js' -import { Sticker } from '../media/sticker.js' +import type { Sticker } from '../media/sticker.js' export class MessageEffect { constructor( diff --git a/packages/core/src/highlevel/types/messages/message-entity.ts b/packages/core/src/highlevel/types/messages/message-entity.ts index f46ef382..89d8a1a3 100644 --- a/packages/core/src/highlevel/types/messages/message-entity.ts +++ b/packages/core/src/highlevel/types/messages/message-entity.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' @@ -24,29 +24,29 @@ import { memoizeGetters } from '../../utils/memoize.js' * - 'emoji': A custom emoji. `.emojiId` contains the emoji ID. */ export type MessageEntityParams = - | { - kind: - | 'mention' - | 'hashtag' - | 'cashtag' - | 'bot_command' - | 'url' - | 'email' - | 'phone_number' - | 'bold' - | 'italic' - | 'underline' - | 'strikethrough' - | 'spoiler' - | 'code' - | 'bank_card' - | 'unknown' - } - | { kind: 'blockquote'; collapsible: boolean } - | { kind: 'pre'; language?: string } - | { kind: 'text_link'; url: string } - | { kind: 'text_mention'; userId: number } - | { kind: 'emoji'; emojiId: tl.Long } + | { + kind: + | 'mention' + | 'hashtag' + | 'cashtag' + | 'bot_command' + | 'url' + | 'email' + | 'phone_number' + | 'bold' + | 'italic' + | 'underline' + | 'strikethrough' + | 'spoiler' + | 'code' + | 'bank_card' + | 'unknown' + } + | { kind: 'blockquote', collapsible: boolean } + | { kind: 'pre', language?: string } + | { kind: 'text_link', url: string } + | { kind: 'text_mention', userId: number } + | { kind: 'emoji', emojiId: tl.Long } /** * Kind of the entity. For more information, see {@link MessageEntityParams} @@ -67,7 +67,7 @@ export class MessageEntity { * * Since JS strings are UTF-16, you can use this as-is */ - get offset() { + get offset(): number { return this.raw.offset } @@ -76,7 +76,7 @@ export class MessageEntity { * * Since JS strings are UTF-16, you can use this as-is */ - get length() { + get length(): number { return this.raw.length } @@ -154,7 +154,7 @@ export class MessageEntity { */ is( kind: T, - ): this is MessageEntity & { params: Extract; kind: T } { + ): this is MessageEntity & { params: Extract, kind: T } { return this.params.kind === kind } } diff --git a/packages/core/src/highlevel/types/messages/message-forward.ts b/packages/core/src/highlevel/types/messages/message-forward.ts index ad30dfce..335dcf43 100644 --- a/packages/core/src/highlevel/types/messages/message-forward.ts +++ b/packages/core/src/highlevel/types/messages/message-forward.ts @@ -1,12 +1,12 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtTypeAssertionError } from '../../../types/errors.js' import { makeInspectable } from '../../utils/inspectable.js' import { memoizeGetters } from '../../utils/memoize.js' import { Chat } from '../peers/chat.js' -import { parsePeer, PeerSender } from '../peers/peer.js' -import { PeersIndex } from '../peers/peers-index.js' -import { _messageMediaFromTl } from './message-media.js' +import type { PeerSender } from '../peers/peer.js' +import { parsePeer } from '../peers/peer.js' +import type { PeersIndex } from '../peers/peers-index.js' /** * Information about forwarded message origin diff --git a/packages/core/src/highlevel/types/messages/message-media.ts b/packages/core/src/highlevel/types/messages/message-media.ts index 046a3939..c0e93edb 100644 --- a/packages/core/src/highlevel/types/messages/message-media.ts +++ b/packages/core/src/highlevel/types/messages/message-media.ts @@ -1,10 +1,10 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtTypeAssertionError } from '../../../types/errors.js' -import { Audio } from '../media/audio.js' +import type { Audio } from '../media/audio.js' import { Contact } from '../media/contact.js' import { Dice } from '../media/dice.js' -import { Document } from '../media/document.js' +import type { Document } from '../media/document.js' import { parseDocument } from '../media/document-utils.js' import { Game } from '../media/game.js' import { Invoice } from '../media/invoice.js' @@ -12,34 +12,34 @@ import { LiveLocation, Location } from '../media/location.js' import { PaidMedia } from '../media/paid-media.js' import { Photo } from '../media/photo.js' import { Poll } from '../media/poll.js' -import { Sticker } from '../media/sticker.js' +import type { Sticker } from '../media/sticker.js' import { MediaStory } from '../media/story.js' import { Venue } from '../media/venue.js' -import { Video } from '../media/video.js' -import { Voice } from '../media/voice.js' +import type { Video } from '../media/video.js' +import type { Voice } from '../media/voice.js' import { WebPage } from '../media/web-page.js' -import { PeersIndex } from '../peers/peers-index.js' +import type { PeersIndex } from '../peers/peers-index.js' /** A media inside of a {@link Message} */ export type MessageMedia = - | Photo - | Dice - | Contact - | Audio - | Voice - | Sticker - | Document - | Video - | Location - | LiveLocation - | Game - | WebPage - | Venue - | Poll - | Invoice - | MediaStory - | PaidMedia - | null + | Photo + | Dice + | Contact + | Audio + | Voice + | Sticker + | Document + | Video + | Location + | LiveLocation + | Game + | WebPage + | Venue + | Poll + | Invoice + | MediaStory + | PaidMedia + | null export type MessageMediaType = Exclude['type'] // todo: successful_payment, connected_website @@ -84,8 +84,8 @@ export function _messageMediaFromTl(peers: PeersIndex | null, m: tl.TypeMessageM return new Poll(m.poll, peers, m.results) case 'messageMediaInvoice': { - const extended = - m.extendedMedia?._ === 'messageExtendedMedia' ? _messageMediaFromTl(peers, m.extendedMedia.media) : null + const extended + = m.extendedMedia?._ === 'messageExtendedMedia' ? _messageMediaFromTl(peers, m.extendedMedia.media) : null return new Invoice(m, extended) } diff --git a/packages/core/src/highlevel/types/messages/message-reactions.ts b/packages/core/src/highlevel/types/messages/message-reactions.ts index a8438e71..c4da4b24 100644 --- a/packages/core/src/highlevel/types/messages/message-reactions.ts +++ b/packages/core/src/highlevel/types/messages/message-reactions.ts @@ -1,8 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' -import { PeersIndex } from '../peers/index.js' +import type { PeersIndex } from '../peers/index.js' import { PeerReaction } from '../reactions/peer-reaction.js' import { ReactionCount } from '../reactions/reaction-count.js' @@ -30,7 +30,7 @@ export class MessageReactions { * Reactions on the message, along with their counts */ get reactions(): ReactionCount[] { - return this.raw.results.map((it) => new ReactionCount(it)) + return this.raw.results.map(it => new ReactionCount(it)) } /** @@ -38,7 +38,7 @@ export class MessageReactions { * To get a full list of users, use {@link getUsers} */ get recentReactions(): PeerReaction[] { - return this.raw.recentReactions?.map((reaction) => new PeerReaction(reaction, this._peers)) ?? [] + return this.raw.recentReactions?.map(reaction => new PeerReaction(reaction, this._peers)) ?? [] } } diff --git a/packages/core/src/highlevel/types/messages/message-replies.ts b/packages/core/src/highlevel/types/messages/message-replies.ts index 7f7b6547..602794f7 100644 --- a/packages/core/src/highlevel/types/messages/message-replies.ts +++ b/packages/core/src/highlevel/types/messages/message-replies.ts @@ -1,10 +1,11 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { getMarkedPeerId } from '../../../utils/peer-utils.js' import { makeInspectable } from '../../utils/inspectable.js' import { memoizeGetters } from '../../utils/memoize.js' -import { parsePeer, Peer } from '../peers/peer.js' -import { PeersIndex } from '../peers/peers-index.js' +import type { Peer } from '../peers/peer.js' +import { parsePeer } from '../peers/peer.js' +import type { PeersIndex } from '../peers/peers-index.js' /** * Information about replies to a message @@ -66,7 +67,7 @@ export class MessageRepliesInfo { * Last few commenters to the post (usually 3) */ get repliers(): Peer[] { - return this.raw.recentRepliers?.map((it) => parsePeer(it, this._peers)) ?? [] + return this.raw.recentRepliers?.map(it => parsePeer(it, this._peers)) ?? [] } } diff --git a/packages/core/src/highlevel/types/messages/message.ts b/packages/core/src/highlevel/types/messages/message.ts index 79c3a50e..8183f9e1 100644 --- a/packages/core/src/highlevel/types/messages/message.ts +++ b/packages/core/src/highlevel/types/messages/message.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtArgumentError } from '../../../types/errors.js' import { assertNever } from '../../../types/utils.js' @@ -6,17 +6,22 @@ import { getMarkedPeerId, toggleChannelIdMark } from '../../../utils/peer-utils. import { assertTypeIsNot } from '../../../utils/type-assertions.js' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' -import { BotKeyboard, ReplyMarkup } from '../bots/keyboards/index.js' -import { TextWithEntities } from '../misc/index.js' +import type { ReplyMarkup } from '../bots/keyboards/index.js' +import { BotKeyboard } from '../bots/keyboards/index.js' +import type { TextWithEntities } from '../misc/index.js' import { Chat } from '../peers/chat.js' -import { parsePeer, Peer } from '../peers/peer.js' -import { PeersIndex } from '../peers/peers-index.js' +import type { Peer } from '../peers/peer.js' +import { parsePeer } from '../peers/peer.js' +import type { PeersIndex } from '../peers/peers-index.js' import { User } from '../peers/user.js' + import { FactCheck } from './fact-check.js' -import { _messageActionFromTl, MessageAction } from './message-action.js' +import type { MessageAction } from './message-action.js' +import { _messageActionFromTl } from './message-action.js' import { MessageEntity } from './message-entity.js' import { MessageForwardInfo } from './message-forward.js' -import { _messageMediaFromTl, MessageMedia } from './message-media.js' +import type { MessageMedia } from './message-media.js' +import { _messageMediaFromTl } from './message-media.js' import { MessageReactions } from './message-reactions.js' import { MessageRepliesInfo } from './message-replies.js' import { RepliedMessageInfo } from './replied-message.js' @@ -247,10 +252,10 @@ export class Message { const fwd = this.raw.fwdFrom return Boolean( - this.chat.chatType === 'supergroup' && - fwd.savedFromMsgId && - fwd.savedFromPeer?._ === 'peerChannel' && - getMarkedPeerId(fwd.savedFromPeer) !== getMarkedPeerId(this.raw.peerId), + this.chat.chatType === 'supergroup' + && fwd.savedFromMsgId + && fwd.savedFromPeer?._ === 'peerChannel' + && getMarkedPeerId(fwd.savedFromPeer) !== getMarkedPeerId(this.raw.peerId), ) } diff --git a/packages/core/src/highlevel/types/messages/replied-message.ts b/packages/core/src/highlevel/types/messages/replied-message.ts index a011086a..0127970d 100644 --- a/packages/core/src/highlevel/types/messages/replied-message.ts +++ b/packages/core/src/highlevel/types/messages/replied-message.ts @@ -1,14 +1,16 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtTypeAssertionError } from '../../../types/errors.js' import { makeInspectable } from '../../utils/inspectable.js' import { memoizeGetters } from '../../utils/memoize.js' import { Chat } from '../peers/chat.js' -import { PeerSender } from '../peers/peer.js' -import { PeersIndex } from '../peers/peers-index.js' +import type { PeerSender } from '../peers/peer.js' +import type { PeersIndex } from '../peers/peers-index.js' import { User } from '../peers/user.js' + import { MessageEntity } from './message-entity.js' -import { _messageMediaFromTl, MessageMedia } from './message-media.js' +import type { MessageMedia } from './message-media.js' +import { _messageMediaFromTl } from './message-media.js' /** * Origin of the replied-to message @@ -178,7 +180,7 @@ export class RepliedMessageInfo { /** Message entities contained in the quote */ get quoteEntities(): MessageEntity[] { - return this.raw.quoteEntities?.map((e) => new MessageEntity(e)) ?? [] + return this.raw.quoteEntities?.map(e => new MessageEntity(e)) ?? [] } /** diff --git a/packages/core/src/highlevel/types/misc/app-config.ts b/packages/core/src/highlevel/types/misc/app-config.ts index 8dfbe9f8..a118ddca 100644 --- a/packages/core/src/highlevel/types/misc/app-config.ts +++ b/packages/core/src/highlevel/types/misc/app-config.ts @@ -1,5 +1,4 @@ // This file is generated automatically, do not modify! -/* eslint-disable */ export interface AppConfigSchema { /** diff --git a/packages/core/src/highlevel/types/misc/collectible-info.ts b/packages/core/src/highlevel/types/misc/collectible-info.ts index d5634391..37d961d9 100644 --- a/packages/core/src/highlevel/types/misc/collectible-info.ts +++ b/packages/core/src/highlevel/types/misc/collectible-info.ts @@ -1,6 +1,5 @@ -import Long from 'long' - -import { tl } from '@mtcute/tl' +import type Long from 'long' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/inspectable.js' diff --git a/packages/core/src/highlevel/types/misc/entities.ts b/packages/core/src/highlevel/types/misc/entities.ts index 8e9631a7..b4375cec 100644 --- a/packages/core/src/highlevel/types/misc/entities.ts +++ b/packages/core/src/highlevel/types/misc/entities.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' /** * Formatted text with entities diff --git a/packages/core/src/highlevel/types/misc/input-privacy-rule/allow.ts b/packages/core/src/highlevel/types/misc/input-privacy-rule/allow.ts index 8b779ebe..061ac2ad 100644 --- a/packages/core/src/highlevel/types/misc/input-privacy-rule/allow.ts +++ b/packages/core/src/highlevel/types/misc/input-privacy-rule/allow.ts @@ -1,8 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { MaybeArray } from '../../../../types/utils.js' -import { InputPeerLike } from '../../peers/peer.js' -import { InputPrivacyRuleChatParticipants, InputPrivacyRuleUsers } from './types.js' +import type { MaybeArray } from '../../../../types/utils.js' +import type { InputPeerLike } from '../../peers/peer.js' + +import type { InputPrivacyRuleChatParticipants, InputPrivacyRuleUsers } from './types.js' /** Allow all users */ export const all: tl.RawInputPrivacyValueAllowAll = { _: 'inputPrivacyValueAllowAll' } diff --git a/packages/core/src/highlevel/types/misc/input-privacy-rule/disallow.ts b/packages/core/src/highlevel/types/misc/input-privacy-rule/disallow.ts index 07bbb2ef..bd0e3888 100644 --- a/packages/core/src/highlevel/types/misc/input-privacy-rule/disallow.ts +++ b/packages/core/src/highlevel/types/misc/input-privacy-rule/disallow.ts @@ -1,8 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { MaybeArray } from '../../../../types/utils.js' -import { InputPeerLike } from '../../peers/peer.js' -import { InputPrivacyRuleChatParticipants, InputPrivacyRuleUsers } from './types.js' +import type { MaybeArray } from '../../../../types/utils.js' +import type { InputPeerLike } from '../../peers/peer.js' + +import type { InputPrivacyRuleChatParticipants, InputPrivacyRuleUsers } from './types.js' /** Disallow all users */ export const all: tl.RawInputPrivacyValueDisallowAll = { _: 'inputPrivacyValueDisallowAll' } diff --git a/packages/core/src/highlevel/types/misc/input-privacy-rule/types.ts b/packages/core/src/highlevel/types/misc/input-privacy-rule/types.ts index 4881b30e..85bc06a1 100644 --- a/packages/core/src/highlevel/types/misc/input-privacy-rule/types.ts +++ b/packages/core/src/highlevel/types/misc/input-privacy-rule/types.ts @@ -1,6 +1,6 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { InputPeerLike } from '../../peers/peer.js' +import type { InputPeerLike } from '../../peers/peer.js' export interface InputPrivacyRuleUsers { allow: boolean diff --git a/packages/core/src/highlevel/types/misc/sticker-set.ts b/packages/core/src/highlevel/types/misc/sticker-set.ts index b0ca4b25..875bd066 100644 --- a/packages/core/src/highlevel/types/misc/sticker-set.ts +++ b/packages/core/src/highlevel/types/misc/sticker-set.ts @@ -5,9 +5,10 @@ import { LongMap } from '../../../utils/long-utils.js' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' import { MtEmptyError } from '../errors.js' -import { InputFileLike } from '../files/index.js' +import type { InputFileLike } from '../files/index.js' import { parseSticker } from '../media/document-utils.js' -import { MaskPosition, Sticker, StickerSourceType, StickerType, Thumbnail } from '../media/index.js' +import type { MaskPosition, Sticker, StickerSourceType, StickerType } from '../media/index.js' +import { Thumbnail } from '../media/index.js' /** * Input sticker set. @@ -28,20 +29,20 @@ import { MaskPosition, Sticker, StickerSourceType, StickerType, Thumbnail } from * - `"default_channel_statuses"` - Default custom emoji status stickerset for channels */ export type InputStickerSet = - | tl.TypeInputStickerSet - | { dice: string } - | { - system: - | 'animated' - | 'animated_animations' - | 'premium_gifts' - | 'generic_animations' - | 'default_statuses' - | 'default_topic_icons' - | 'default_channel_statuses' - } - | StickerSet - | string + | tl.TypeInputStickerSet + | { dice: string } + | { + system: + | 'animated' + | 'animated_animations' + | 'premium_gifts' + | 'generic_animations' + | 'default_statuses' + | 'default_topic_icons' + | 'default_channel_statuses' + } + | StickerSet + | string export function normalizeInputStickerSet(input: InputStickerSet): tl.TypeInputStickerSet { if (typeof input === 'string') { @@ -274,9 +275,9 @@ export class StickerSet { case 'stickerSetCovered': return [parseStickerOrThrow(this.cover.cover as tl.RawDocument)] case 'stickerSetMultiCovered': - return this.cover.covers.map((it) => parseStickerOrThrow(it as tl.RawDocument)) + return this.cover.covers.map(it => parseStickerOrThrow(it as tl.RawDocument)) case 'stickerSetFullCovered': - return this.cover.documents.map((it) => parseStickerOrThrow(it as tl.RawDocument)) + return this.cover.documents.map(it => parseStickerOrThrow(it as tl.RawDocument)) case 'stickerSetNoCovered': return [] } @@ -289,7 +290,7 @@ export class StickerSet { * (i.e. first sticker should be used as thumbnail) */ get thumbnails(): ReadonlyArray { - return this.brief.thumbs?.map((sz) => new Thumbnail(this.brief, sz)) ?? [] + return this.brief.thumbs?.map(sz => new Thumbnail(this.brief, sz)) ?? [] } /** @@ -302,7 +303,7 @@ export class StickerSet { * @param type Thumbnail type */ getThumbnail(type: string): Thumbnail | null { - return this.thumbnails.find((it) => it.type === type) ?? null + return this.thumbnails.find(it => it.type === type) ?? null } /** @@ -313,7 +314,7 @@ export class StickerSet { * In case this object does not contain info about stickers (i.e. {@link isFull} = false) */ getStickersByEmoji(emoji: string): StickerInfo[] { - return this.stickers.filter((it) => it.alt === emoji || it.emoji.includes(emoji)) + return this.stickers.filter(it => it.alt === emoji || it.emoji.includes(emoji)) } private _getInputDocument(idx: number): tl.TypeInputDocument { diff --git a/packages/core/src/highlevel/types/misc/takeout-session.ts b/packages/core/src/highlevel/types/misc/takeout-session.ts index 137d2cd9..5b705fdb 100644 --- a/packages/core/src/highlevel/types/misc/takeout-session.ts +++ b/packages/core/src/highlevel/types/misc/takeout-session.ts @@ -1,9 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { RpcCallOptions } from '../../../network/network-manager.js' -import { MustEqual } from '../../../types/utils.js' +import type { RpcCallOptions } from '../../../network/network-manager.js' +import type { MustEqual } from '../../../types/utils.js' import { assertTrue } from '../../../utils/type-assertions.js' -import { ITelegramClient } from '../../client.types.js' +import type { ITelegramClient } from '../../client.types.js' import { makeInspectable } from '../../utils/index.js' /** @@ -35,13 +35,12 @@ export class TakeoutSession { message: MustEqual, params?: RpcCallOptions, ): Promise { - // eslint-disable-next-line @typescript-eslint/no-unsafe-return + // eslint-disable-next-line ts/no-unsafe-return return this.client.call( { _: 'invokeWithTakeout', takeoutId: this.id, query: message, - // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any, params, ) @@ -65,21 +64,21 @@ export class TakeoutSession { * Returning `true` will use takeout session, `false` will not. */ createProxy(predicate?: (obj: tl.TlObject) => boolean): ITelegramClient { - const boundCall: TakeoutSession['call'] = predicate ? - (obj, params) => { + const boundCall: TakeoutSession['call'] = predicate + ? (obj, params) => { if (predicate(obj)) { return this.call(obj, params) } return this.client.call(obj, params) - } : - this.call.bind(this) + } + : this.call.bind(this) return new Proxy(this.client, { get(target, prop, receiver) { if (prop === 'call') return boundCall - // eslint-disable-next-line @typescript-eslint/no-unsafe-return + // eslint-disable-next-line ts/no-unsafe-return return Reflect.get(target, prop, receiver) }, }) diff --git a/packages/core/src/highlevel/types/peers/chat-colors.ts b/packages/core/src/highlevel/types/peers/chat-colors.ts index 66872463..c6ea8123 100644 --- a/packages/core/src/highlevel/types/peers/chat-colors.ts +++ b/packages/core/src/highlevel/types/peers/chat-colors.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/inspectable.js' @@ -8,7 +8,7 @@ import { makeInspectable } from '../../utils/inspectable.js' export class ChatColors { constructor( private readonly _peerId: number, - readonly raw?: tl.RawPeerColor, + readonly raw?: tl.RawPeerColor | undefined, ) {} /** diff --git a/packages/core/src/highlevel/types/peers/chat-event/actions.ts b/packages/core/src/highlevel/types/peers/chat-event/actions.ts index cbfced39..27d14bbd 100644 --- a/packages/core/src/highlevel/types/peers/chat-event/actions.ts +++ b/packages/core/src/highlevel/types/peers/chat-event/actions.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { toggleChannelIdMark } from '../../../../utils/peer-utils.js' import { assertTypeIs } from '../../../../utils/type-assertions.js' @@ -9,7 +9,7 @@ import { ChatLocation } from '../chat-location.js' import { ChatMember } from '../chat-member.js' import { ChatPermissions } from '../chat-permissions.js' import { ForumTopic } from '../forum-topic.js' -import { PeersIndex } from '../peers-index.js' +import type { PeersIndex } from '../peers-index.js' import { User } from '../user.js' /** A user has joined the channel (in the case of big groups, info of the user that has joined isn't shown) */ @@ -356,43 +356,43 @@ export interface ChatActionTopicDeleted { /** Chat event action (`null` if unsupported) */ export type ChatAction = - | ChatActionUserJoined - | ChatActionUserLeft - | ChatActionUserInvited - | ChatActionTitleChanged - | ChatActionDescriptionChanged - | ChatActionUsernameChanged - | ChatActionUsernamesChanged - | ChatActionPhotoChanged - | ChatActionInvitesToggled - | ChatActionSignaturesToggled - | ChatActionMessagePinned - | ChatActionMessageEdited - | ChatActionMessageDeleted - | ChatActionUserPermissionsChanged - | ChatActionUserAdminPermissionsChanged - | ChatActionStickersetChanged - | ChatActionHistoryToggled - | ChatActionDefaultPermissionsChanged - | ChatActionPollStopped - | ChatActionLinkedChatChanged - | ChatActionLocationChanged - | ChatActionSlowModeChanged - | ChatActionCallStarted - | ChatActionCallEnded - | ChatActionCallSettingChanged - | ChatActionUserJoinedInvite - | ChatActionInviteLinkDeleted - | ChatActionInviteLinkEdited - | ChatActionInviteLinkRevoked - | ChatActionUserJoinedApproved - | ChatActionTtlChanged - | ChatActionNoForwardsToggled - | ChatActionForumToggled - | ChatActionTopicCreated - | ChatActionTopicEdited - | ChatActionTopicDeleted - | null + | ChatActionUserJoined + | ChatActionUserLeft + | ChatActionUserInvited + | ChatActionTitleChanged + | ChatActionDescriptionChanged + | ChatActionUsernameChanged + | ChatActionUsernamesChanged + | ChatActionPhotoChanged + | ChatActionInvitesToggled + | ChatActionSignaturesToggled + | ChatActionMessagePinned + | ChatActionMessageEdited + | ChatActionMessageDeleted + | ChatActionUserPermissionsChanged + | ChatActionUserAdminPermissionsChanged + | ChatActionStickersetChanged + | ChatActionHistoryToggled + | ChatActionDefaultPermissionsChanged + | ChatActionPollStopped + | ChatActionLinkedChatChanged + | ChatActionLocationChanged + | ChatActionSlowModeChanged + | ChatActionCallStarted + | ChatActionCallEnded + | ChatActionCallSettingChanged + | ChatActionUserJoinedInvite + | ChatActionInviteLinkDeleted + | ChatActionInviteLinkEdited + | ChatActionInviteLinkRevoked + | ChatActionUserJoinedApproved + | ChatActionTtlChanged + | ChatActionNoForwardsToggled + | ChatActionForumToggled + | ChatActionTopicCreated + | ChatActionTopicEdited + | ChatActionTopicDeleted + | null /** @internal */ export function _actionFromTl(e: tl.TypeChannelAdminLogEventAction, peers: PeersIndex): ChatAction { diff --git a/packages/core/src/highlevel/types/peers/chat-event/filters.ts b/packages/core/src/highlevel/types/peers/chat-event/filters.ts index 9bb21c98..9278e051 100644 --- a/packages/core/src/highlevel/types/peers/chat-event/filters.ts +++ b/packages/core/src/highlevel/types/peers/chat-event/filters.ts @@ -1,7 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { assertNever, MaybeArray } from '../../../../types/utils.js' -import { ChatAction } from './actions.js' +import type { MaybeArray } from '../../../../types/utils.js' +import { assertNever } from '../../../../types/utils.js' + +import type { ChatAction } from './actions.js' export interface ChatEventFilters { serverFilter?: tl.TypeChannelAdminLogEventsFilter @@ -9,10 +11,10 @@ export interface ChatEventFilters { } export type InputChatEventFilters = - | ChatEventFilters - | tl.TypeChannelAdminLogEventsFilter - | MaybeArray['type']> - | undefined + | ChatEventFilters + | tl.TypeChannelAdminLogEventsFilter + | MaybeArray['type']> + | undefined /** @internal */ export function normalizeChatEventFilters(input: InputChatEventFilters): ChatEventFilters { diff --git a/packages/core/src/highlevel/types/peers/chat-event/index.ts b/packages/core/src/highlevel/types/peers/chat-event/index.ts index 718cb7e7..0e4ec22d 100644 --- a/packages/core/src/highlevel/types/peers/chat-event/index.ts +++ b/packages/core/src/highlevel/types/peers/chat-event/index.ts @@ -1,10 +1,12 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../../utils/index.js' import { memoizeGetters } from '../../../utils/memoize.js' -import { PeersIndex } from '../peers-index.js' +import type { PeersIndex } from '../peers-index.js' import { User } from '../user.js' -import { _actionFromTl, ChatAction } from './actions.js' + +import type { ChatAction } from './actions.js' +import { _actionFromTl } from './actions.js' export * from './actions.js' export type { ChatEventFilters, InputChatEventFilters } from './filters.js' diff --git a/packages/core/src/highlevel/types/peers/chat-invite-link-member.ts b/packages/core/src/highlevel/types/peers/chat-invite-link-member.ts index e2cac291..034a13de 100644 --- a/packages/core/src/highlevel/types/peers/chat-invite-link-member.ts +++ b/packages/core/src/highlevel/types/peers/chat-invite-link-member.ts @@ -1,8 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' -import { PeersIndex } from './peers-index.js' + +import type { PeersIndex } from './peers-index.js' import { User } from './user.js' export class ChatInviteLinkMember { diff --git a/packages/core/src/highlevel/types/peers/chat-invite-link.ts b/packages/core/src/highlevel/types/peers/chat-invite-link.ts index 1400853b..55617fe8 100644 --- a/packages/core/src/highlevel/types/peers/chat-invite-link.ts +++ b/packages/core/src/highlevel/types/peers/chat-invite-link.ts @@ -1,11 +1,13 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertTypeIsNot } from '../../../utils/type-assertions.js' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' -import { PeersIndex } from './index.js' + import { User } from './user.js' +import type { PeersIndex } from './index.js' + /** * An invite link */ @@ -14,7 +16,7 @@ export class ChatInviteLink { constructor( raw: tl.TypeExportedChatInvite, - readonly _peers?: PeersIndex, + readonly _peers?: PeersIndex | undefined, ) { assertTypeIsNot('ChatInviteLink', raw, 'chatInvitePublicJoinRequests') diff --git a/packages/core/src/highlevel/types/peers/chat-location.ts b/packages/core/src/highlevel/types/peers/chat-location.ts index 9de0f0ac..de279513 100644 --- a/packages/core/src/highlevel/types/peers/chat-location.ts +++ b/packages/core/src/highlevel/types/peers/chat-location.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' diff --git a/packages/core/src/highlevel/types/peers/chat-member.ts b/packages/core/src/highlevel/types/peers/chat-member.ts index 92269535..423c7a7b 100644 --- a/packages/core/src/highlevel/types/peers/chat-member.ts +++ b/packages/core/src/highlevel/types/peers/chat-member.ts @@ -1,12 +1,14 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertTypeIs } from '../../../utils/type-assertions.js' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' + import { ChatPermissions } from './chat-permissions.js' -import { PeersIndex } from './index.js' import { User } from './user.js' +import type { PeersIndex } from './index.js' + /** * Status of the member: * - `creator`: user is the creator of the chat diff --git a/packages/core/src/highlevel/types/peers/chat-permissions.ts b/packages/core/src/highlevel/types/peers/chat-permissions.ts index e4c6b252..2f77dde1 100644 --- a/packages/core/src/highlevel/types/peers/chat-permissions.ts +++ b/packages/core/src/highlevel/types/peers/chat-permissions.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' diff --git a/packages/core/src/highlevel/types/peers/chat-photo.ts b/packages/core/src/highlevel/types/peers/chat-photo.ts index dc297ea1..bbc6463a 100644 --- a/packages/core/src/highlevel/types/peers/chat-photo.ts +++ b/packages/core/src/highlevel/types/peers/chat-photo.ts @@ -1,7 +1,6 @@ import Long from 'long' - import { tdFileId, toFileId, toUniqueFileId } from '@mtcute/file-id' -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { getPlatform } from '../../../platform.js' import { MtArgumentError } from '../../../types/errors.js' @@ -74,7 +73,7 @@ export class ChatPhotoSize extends FileLocation { source: { _: 'dialogPhoto', big: this.big, - id: id, + id, accessHash: hash, }, }, @@ -88,12 +87,10 @@ export class ChatPhotoSize extends FileLocation { return toUniqueFileId(getPlatform(), tdFileId.FileType.ProfilePhoto, { _: 'photo', id: this.obj.photoId, - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + // eslint-disable-next-line ts/no-unsafe-assignment source: { _: 'dialogPhoto', big: this.big, - // will be looked into in MTQ-37 - // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any, }) } diff --git a/packages/core/src/highlevel/types/peers/chat-preview.ts b/packages/core/src/highlevel/types/peers/chat-preview.ts index b47255fd..1e788ccf 100644 --- a/packages/core/src/highlevel/types/peers/chat-preview.ts +++ b/packages/core/src/highlevel/types/peers/chat-preview.ts @@ -1,8 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' import { Photo } from '../media/photo.js' + import { User } from './user.js' /** @@ -70,7 +71,7 @@ export class ChatPreview { * ordered before others. */ get someMembers(): ReadonlyArray { - return this.invite.participants?.map((it) => new User(it)) ?? [] + return this.invite.participants?.map(it => new User(it)) ?? [] } /** diff --git a/packages/core/src/highlevel/types/peers/chat.ts b/packages/core/src/highlevel/types/peers/chat.ts index 4248b766..51779e13 100644 --- a/packages/core/src/highlevel/types/peers/chat.ts +++ b/packages/core/src/highlevel/types/peers/chat.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtArgumentError, MtTypeAssertionError } from '../../../types/errors.js' import { getMarkedPeerId } from '../../../utils/peer-utils.js' @@ -6,10 +6,11 @@ import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' import { MessageEntity } from '../messages/message-entity.js' import { EmojiStatus } from '../reactions/emoji-status.js' + import { ChatColors } from './chat-colors.js' import { ChatPermissions } from './chat-permissions.js' import { ChatPhoto } from './chat-photo.js' -import { PeersIndex } from './peers-index.js' +import type { PeersIndex } from './peers-index.js' import { User } from './user.js' /** @@ -306,8 +307,8 @@ export class Chat { if (!('usernames' in this.peer)) return null return ( - this.peer.usernames ?? - (this.peer.username ? [{ _: 'username', username: this.peer.username, active: true }] : null) + this.peer.usernames + ?? (this.peer.username ? [{ _: 'username', username: this.peer.username, active: true }] : null) ) } @@ -335,7 +336,7 @@ export class Chat { get displayName(): string { if (this.peer._ === 'user') { if (this.peer.lastName) { - return this.peer.firstName + ' ' + this.peer.lastName + return `${this.peer.firstName} ${this.peer.lastName}` } return this.peer.firstName ?? 'Deleted Account' @@ -352,9 +353,9 @@ export class Chat { */ get photo(): ChatPhoto | null { if ( - !('photo' in this.peer) || - !this.peer.photo || - (this.peer.photo._ !== 'userProfilePhoto' && this.peer.photo._ !== 'chatPhoto') + !('photo' in this.peer) + || !this.peer.photo + || (this.peer.photo._ !== 'userProfilePhoto' && this.peer.photo._ !== 'chatPhoto') ) { return null } diff --git a/packages/core/src/highlevel/types/peers/chatlist-preview.ts b/packages/core/src/highlevel/types/peers/chatlist-preview.ts index 3fadfbf9..d45b3ef6 100644 --- a/packages/core/src/highlevel/types/peers/chatlist-preview.ts +++ b/packages/core/src/highlevel/types/peers/chatlist-preview.ts @@ -1,7 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/inspectable.js' import { memoizeGetters } from '../../utils/memoize.js' + import { Chat } from './chat.js' import { PeersIndex } from './peers-index.js' @@ -44,7 +45,7 @@ export class ChatlistPreview { peers = [...this.raw.alreadyPeers, ...this.raw.missingPeers] } - return peers.map((peer) => Chat._parseFromPeer(peer, this.peers)) + return peers.map(peer => Chat._parseFromPeer(peer, this.peers)) } } diff --git a/packages/core/src/highlevel/types/peers/forum-topic.ts b/packages/core/src/highlevel/types/peers/forum-topic.ts index e5409126..3b543b84 100644 --- a/packages/core/src/highlevel/types/peers/forum-topic.ts +++ b/packages/core/src/highlevel/types/peers/forum-topic.ts @@ -1,25 +1,27 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { hasValueAtKey } from '../../../utils/type-assertions.js' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' import { MtMessageNotFoundError } from '../errors.js' import { DraftMessage, Message } from '../messages/index.js' -import { parsePeer, Peer } from './peer.js' + +import type { Peer } from './peer.js' +import { parsePeer } from './peer.js' import { PeersIndex } from './peers-index.js' export class ForumTopic { - static COLOR_BLUE = 0x6fb9f0 - static COLOR_YELLOW = 0xffd67e - static COLOR_PURPLE = 0xcb86db - static COLOR_GREEN = 0x8eee98 - static COLOR_PINK = 0xff93b2 - static COLOR_RED = 0xfb6f5f + static COLOR_BLUE = 0x6FB9F0 + static COLOR_YELLOW = 0xFFD67E + static COLOR_PURPLE = 0xCB86DB + static COLOR_GREEN = 0x8EEE98 + static COLOR_PINK = 0xFF93B2 + static COLOR_RED = 0xFB6F5F constructor( readonly raw: tl.RawForumTopic, readonly _peers: PeersIndex, - readonly _messages?: Map, + readonly _messages?: Map | undefined, ) {} static parseTlForumTopics(topics: tl.messages.TypeForumTopics): ForumTopic[] { @@ -32,7 +34,7 @@ export class ForumTopic { messages.set(msg.id, msg) }) - return topics.topics.filter(hasValueAtKey('_', 'forumTopic')).map((it) => new ForumTopic(it, peers, messages)) + return topics.topics.filter(hasValueAtKey('_', 'forumTopic')).map(it => new ForumTopic(it, peers, messages)) } /** diff --git a/packages/core/src/highlevel/types/peers/full-chat.ts b/packages/core/src/highlevel/types/peers/full-chat.ts index 18ba1563..0d3ba02f 100644 --- a/packages/core/src/highlevel/types/peers/full-chat.ts +++ b/packages/core/src/highlevel/types/peers/full-chat.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtTypeAssertionError } from '../../../types/errors.js' import { makeInspectable } from '../../utils/inspectable.js' @@ -6,6 +6,7 @@ import { memoizeGetters } from '../../utils/memoize.js' import { Photo } from '../media/photo.js' import { StickerSet } from '../misc/sticker-set.js' import { BusinessAccount } from '../premium/business-account.js' + import { Chat } from './chat.js' import { ChatInviteLink } from './chat-invite-link.js' import { ChatLocation } from './chat-location.js' @@ -74,7 +75,7 @@ export class FullChat extends Chat { get fullPhoto(): Photo | null { if (!this.fullPeer) return null - let photo: tl.TypePhoto | undefined = undefined + let photo: tl.TypePhoto | undefined switch (this.fullPeer._) { case 'userFull': diff --git a/packages/core/src/highlevel/types/peers/peer.ts b/packages/core/src/highlevel/types/peers/peer.ts index 1169d33a..a87b4b05 100644 --- a/packages/core/src/highlevel/types/peers/peer.ts +++ b/packages/core/src/highlevel/types/peers/peer.ts @@ -1,7 +1,7 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { Chat } from './chat.js' -import { PeersIndex } from './peers-index.js' +import type { PeersIndex } from './peers-index.js' import { User } from './user.js' /** @@ -23,13 +23,13 @@ export type PeerType = 'user' | 'bot' | 'group' | 'channel' | 'supergroup' * > that new IDs *will* still fit into int53, meaning JS integers are fine. */ export type InputPeerLike = - | string - | number - | tl.TypePeer - | tl.TypeInputPeer - | tl.TypeInputUser - | tl.TypeInputChannel - | { inputPeer: tl.TypeInputPeer } + | string + | number + | tl.TypePeer + | tl.TypeInputPeer + | tl.TypeInputUser + | tl.TypeInputChannel + | { inputPeer: tl.TypeInputPeer } /** * Peer (a user or a chat) diff --git a/packages/core/src/highlevel/types/peers/peers-index.test.ts b/packages/core/src/highlevel/types/peers/peers-index.test.ts index 238cdb2e..8fac5dd8 100644 --- a/packages/core/src/highlevel/types/peers/peers-index.test.ts +++ b/packages/core/src/highlevel/types/peers/peers-index.test.ts @@ -1,8 +1,8 @@ import { describe, expect, it } from 'vitest' - import { createStub } from '@mtcute/test' import { MtArgumentError } from '../../../types/errors.js' + import { PeersIndex } from './peers-index.js' describe('PeersIndex', () => { diff --git a/packages/core/src/highlevel/types/peers/peers-index.ts b/packages/core/src/highlevel/types/peers/peers-index.ts index 898b1891..8bf9e32f 100644 --- a/packages/core/src/highlevel/types/peers/peers-index.ts +++ b/packages/core/src/highlevel/types/peers/peers-index.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtArgumentError } from '../../../types/errors.js' @@ -12,7 +12,7 @@ export class PeersIndex { hasMin = false - static from(obj: { users?: tl.TypeUser[]; chats?: tl.TypeChat[] }): PeersIndex { + static from(obj: { users?: tl.TypeUser[], chats?: tl.TypeChat[] }): PeersIndex { const index = new PeersIndex() obj.users?.forEach((user) => { diff --git a/packages/core/src/highlevel/types/peers/typing-status.ts b/packages/core/src/highlevel/types/peers/typing-status.ts index 76ce9051..eecc14bf 100644 --- a/packages/core/src/highlevel/types/peers/typing-status.ts +++ b/packages/core/src/highlevel/types/peers/typing-status.ts @@ -24,21 +24,21 @@ * - `interaction_seen`: User is watching a previously sent emoji interaction */ export type TypingStatus = - | 'typing' - | 'cancel' - | 'record_video' - | 'upload_video' - | 'record_voice' - | 'upload_voice' - | 'upload_photo' - | 'upload_document' - | 'geo' - | 'contact' - | 'game' - | 'record_round' - | 'upload_round' - | 'speak_call' - | 'history_import' - | 'sticker' - | 'interaction' - | 'interaction_seen' + | 'typing' + | 'cancel' + | 'record_video' + | 'upload_video' + | 'record_voice' + | 'upload_voice' + | 'upload_photo' + | 'upload_document' + | 'geo' + | 'contact' + | 'game' + | 'record_round' + | 'upload_round' + | 'speak_call' + | 'history_import' + | 'sticker' + | 'interaction' + | 'interaction_seen' diff --git a/packages/core/src/highlevel/types/peers/user.test.ts b/packages/core/src/highlevel/types/peers/user.test.ts index a83e473a..b4b7a23e 100644 --- a/packages/core/src/highlevel/types/peers/user.test.ts +++ b/packages/core/src/highlevel/types/peers/user.test.ts @@ -1,9 +1,9 @@ import Long from 'long' import { describe, expect, it } from 'vitest' - import { createStub } from '@mtcute/test' import { MessageEntity } from '../messages/index.js' + import { User } from './user.js' describe('User', () => { diff --git a/packages/core/src/highlevel/types/peers/user.ts b/packages/core/src/highlevel/types/peers/user.ts index 0d2b7833..dd548103 100644 --- a/packages/core/src/highlevel/types/peers/user.ts +++ b/packages/core/src/highlevel/types/peers/user.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtArgumentError } from '../../../types/errors.js' import { assertTypeIs } from '../../../utils/type-assertions.js' @@ -6,6 +6,7 @@ import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' import { MessageEntity } from '../messages/message-entity.js' import { EmojiStatus } from '../reactions/emoji-status.js' + import { ChatColors } from './chat-colors.js' import { ChatPhoto } from './chat-photo.js' @@ -473,7 +474,7 @@ export class User { /** * Create a permanent mention for this user. * - * *Permanent* means that this mention will also + * Permanent* means that this mention will also * contain user's access hash, so even if the user * changes their username or the client forgets * about that user, it can still be mentioned. diff --git a/packages/core/src/highlevel/types/premium/boost-slot.ts b/packages/core/src/highlevel/types/premium/boost-slot.ts index 1a4ea2bb..85fdcf13 100644 --- a/packages/core/src/highlevel/types/premium/boost-slot.ts +++ b/packages/core/src/highlevel/types/premium/boost-slot.ts @@ -1,9 +1,10 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertTypeIs } from '../../../utils/type-assertions.js' import { makeInspectable } from '../../utils/inspectable.js' import { memoizeGetters } from '../../utils/memoize.js' -import { Chat, PeersIndex } from '../peers/index.js' +import type { PeersIndex } from '../peers/index.js' +import { Chat } from '../peers/index.js' /** * Information about a boost slot diff --git a/packages/core/src/highlevel/types/premium/boost-stats.ts b/packages/core/src/highlevel/types/premium/boost-stats.ts index 74c7aa2d..819a16ab 100644 --- a/packages/core/src/highlevel/types/premium/boost-stats.ts +++ b/packages/core/src/highlevel/types/premium/boost-stats.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' diff --git a/packages/core/src/highlevel/types/premium/boost.ts b/packages/core/src/highlevel/types/premium/boost.ts index 8ccccbee..d8090297 100644 --- a/packages/core/src/highlevel/types/premium/boost.ts +++ b/packages/core/src/highlevel/types/premium/boost.ts @@ -1,9 +1,10 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtUnsupportedError } from '../../../types/errors.js' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' -import { PeersIndex, User } from '../peers/index.js' +import type { PeersIndex } from '../peers/index.js' +import { User } from '../peers/index.js' /** * Origin of a boost diff --git a/packages/core/src/highlevel/types/premium/business-account.ts b/packages/core/src/highlevel/types/premium/business-account.ts index 17ba38eb..3acb4311 100644 --- a/packages/core/src/highlevel/types/premium/business-account.ts +++ b/packages/core/src/highlevel/types/premium/business-account.ts @@ -1,7 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/inspectable.js' import { memoizeGetters } from '../../utils/memoize.js' + import { BusinessIntro } from './business-intro.js' import { BusinessLocation } from './business-location.js' import { BusinessWorkHours } from './business-work-hours.js' diff --git a/packages/core/src/highlevel/types/premium/business-chat-link.ts b/packages/core/src/highlevel/types/premium/business-chat-link.ts index 8a7135d7..8e94b840 100644 --- a/packages/core/src/highlevel/types/premium/business-chat-link.ts +++ b/packages/core/src/highlevel/types/premium/business-chat-link.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/inspectable.js' import { memoizeGetters } from '../../utils/memoize.js' @@ -22,7 +22,7 @@ export class BusinessChatLink { /** Entities for the text */ get entities(): MessageEntity[] { - return this.raw.entities?.map((x) => new MessageEntity(x)) ?? [] + return this.raw.entities?.map(x => new MessageEntity(x)) ?? [] } /** Custom title for the link */ diff --git a/packages/core/src/highlevel/types/premium/business-connection.ts b/packages/core/src/highlevel/types/premium/business-connection.ts index 354e1c75..46677218 100644 --- a/packages/core/src/highlevel/types/premium/business-connection.ts +++ b/packages/core/src/highlevel/types/premium/business-connection.ts @@ -1,8 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/inspectable.js' import { memoizeGetters } from '../../utils/memoize.js' -import { PeersIndex } from '../peers/peers-index.js' +import type { PeersIndex } from '../peers/peers-index.js' import { User } from '../peers/user.js' /** diff --git a/packages/core/src/highlevel/types/premium/business-intro.ts b/packages/core/src/highlevel/types/premium/business-intro.ts index 2a6bea59..d29fdbdd 100644 --- a/packages/core/src/highlevel/types/premium/business-intro.ts +++ b/packages/core/src/highlevel/types/premium/business-intro.ts @@ -1,9 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/inspectable.js' import { memoizeGetters } from '../../utils/memoize.js' import { parseDocument } from '../media/document-utils.js' -import { Sticker } from '../media/sticker.js' +import type { Sticker } from '../media/sticker.js' /** * Information about a "business intro" – text that is displayed diff --git a/packages/core/src/highlevel/types/premium/business-location.ts b/packages/core/src/highlevel/types/premium/business-location.ts index 54f0ca53..166410f9 100644 --- a/packages/core/src/highlevel/types/premium/business-location.ts +++ b/packages/core/src/highlevel/types/premium/business-location.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/inspectable.js' import { memoizeGetters } from '../../utils/memoize.js' diff --git a/packages/core/src/highlevel/types/premium/business-work-hours.test.ts b/packages/core/src/highlevel/types/premium/business-work-hours.test.ts index 9da6a993..f5affa7a 100644 --- a/packages/core/src/highlevel/types/premium/business-work-hours.test.ts +++ b/packages/core/src/highlevel/types/premium/business-work-hours.test.ts @@ -1,5 +1,4 @@ import { describe, expect, it } from 'vitest' - import { createStub } from '@mtcute/test' import { BusinessWorkHours, businessWorkHoursDaysToRaw } from './business-work-hours.js' diff --git a/packages/core/src/highlevel/types/premium/business-work-hours.ts b/packages/core/src/highlevel/types/premium/business-work-hours.ts index 7e599fbb..219184fa 100644 --- a/packages/core/src/highlevel/types/premium/business-work-hours.ts +++ b/packages/core/src/highlevel/types/premium/business-work-hours.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtArgumentError } from '../../../types/errors.js' import { makeInspectable } from '../../utils/inspectable.js' @@ -174,10 +174,10 @@ export class BusinessWorkHours { const interval = day.intervals[0] if ( - interval.startHour === 0 && - interval.startMinute === 0 && - ((interval.endHour === 24 && interval.endMinute === 0) || - (interval.endHour === 23 && interval.endMinute === 59)) + interval.startHour === 0 + && interval.startMinute === 0 + && ((interval.endHour === 24 && interval.endMinute === 0) + || (interval.endHour === 23 && interval.endMinute === 59)) ) { (day as tl.Mutable).is24h = true } diff --git a/packages/core/src/highlevel/types/reactions/emoji-status.ts b/packages/core/src/highlevel/types/reactions/emoji-status.ts index cea50467..0a6e12f4 100644 --- a/packages/core/src/highlevel/types/reactions/emoji-status.ts +++ b/packages/core/src/highlevel/types/reactions/emoji-status.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' diff --git a/packages/core/src/highlevel/types/reactions/peer-reaction.ts b/packages/core/src/highlevel/types/reactions/peer-reaction.ts index 61753d25..d5515293 100644 --- a/packages/core/src/highlevel/types/reactions/peer-reaction.ts +++ b/packages/core/src/highlevel/types/reactions/peer-reaction.ts @@ -1,12 +1,14 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { getMarkedPeerId } from '../../../utils/peer-utils.js' import { assertTypeIs } from '../../../utils/type-assertions.js' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' -import { PeersIndex } from '../peers/peers-index.js' +import type { PeersIndex } from '../peers/peers-index.js' import { User } from '../peers/user.js' -import { ReactionEmoji, toReactionEmoji } from './types.js' + +import type { ReactionEmoji } from './types.js' +import { toReactionEmoji } from './types.js' /** * Reactions of a user to a message diff --git a/packages/core/src/highlevel/types/reactions/reaction-count.ts b/packages/core/src/highlevel/types/reactions/reaction-count.ts index 09b6e1a4..44913b40 100644 --- a/packages/core/src/highlevel/types/reactions/reaction-count.ts +++ b/packages/core/src/highlevel/types/reactions/reaction-count.ts @@ -1,7 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' -import { ReactionEmoji, toReactionEmoji } from './types.js' + +import type { ReactionEmoji } from './types.js' +import { toReactionEmoji } from './types.js' /** * Reaction count diff --git a/packages/core/src/highlevel/types/reactions/types.ts b/packages/core/src/highlevel/types/reactions/types.ts index f3ef305d..b6cdfb8f 100644 --- a/packages/core/src/highlevel/types/reactions/types.ts +++ b/packages/core/src/highlevel/types/reactions/types.ts @@ -1,6 +1,5 @@ import Long from 'long' - -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtTypeAssertionError } from '../../../types/errors.js' diff --git a/packages/core/src/highlevel/types/stories/all-stories.ts b/packages/core/src/highlevel/types/stories/all-stories.ts index bafc4fd7..3935d167 100644 --- a/packages/core/src/highlevel/types/stories/all-stories.ts +++ b/packages/core/src/highlevel/types/stories/all-stories.ts @@ -1,8 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' import { PeersIndex } from '../peers/index.js' + import { PeerStories } from './peer-stories.js' import { StoriesStealthMode } from './stealth-mode.js' @@ -13,7 +14,7 @@ import { StoriesStealthMode } from './stealth-mode.js' */ export class AllStories { /** Peers index */ - readonly _peers + readonly _peers: PeersIndex constructor( /** Raw TL object */ readonly raw: tl.stories.RawAllStories, @@ -38,7 +39,7 @@ export class AllStories { /** Peers with their stories */ get peerStories(): PeerStories[] { - return this.raw.peerStories.map((it) => new PeerStories(it, this._peers)) + return this.raw.peerStories.map(it => new PeerStories(it, this._peers)) } /** Stealth mode info */ diff --git a/packages/core/src/highlevel/types/stories/interactive/base.ts b/packages/core/src/highlevel/types/stories/interactive/base.ts index ea96429b..ddf3afc8 100644 --- a/packages/core/src/highlevel/types/stories/interactive/base.ts +++ b/packages/core/src/highlevel/types/stories/interactive/base.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' export abstract class StoryInteractiveArea { abstract type: string diff --git a/packages/core/src/highlevel/types/stories/interactive/channel-post.ts b/packages/core/src/highlevel/types/stories/interactive/channel-post.ts index a0c62fd5..3e2dbdd4 100644 --- a/packages/core/src/highlevel/types/stories/interactive/channel-post.ts +++ b/packages/core/src/highlevel/types/stories/interactive/channel-post.ts @@ -1,9 +1,10 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../../utils/index.js' import { memoizeGetters } from '../../../utils/memoize.js' import { Chat } from '../../peers/chat.js' -import { PeersIndex } from '../../peers/peers-index.js' +import type { PeersIndex } from '../../peers/peers-index.js' + import { StoryInteractiveArea } from './base.js' /** diff --git a/packages/core/src/highlevel/types/stories/interactive/index.ts b/packages/core/src/highlevel/types/stories/interactive/index.ts index 086ca4e7..1020382a 100644 --- a/packages/core/src/highlevel/types/stories/interactive/index.ts +++ b/packages/core/src/highlevel/types/stories/interactive/index.ts @@ -1,7 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtTypeAssertionError } from '../../../../types/errors.js' -import { PeersIndex } from '../../peers/index.js' +import type { PeersIndex } from '../../peers/index.js' + import { StoryInteractiveChannelPost } from './channel-post.js' import { StoryInteractiveLocation } from './location.js' import { StoryInteractiveReaction } from './reaction.js' @@ -20,12 +21,12 @@ export { } export type StoryInteractiveElement = - | StoryInteractiveReaction - | StoryInteractiveLocation - | StoryInteractiveVenue - | StoryInteractiveChannelPost - | StoryInteractiveUrl - | StoryInteractiveWeather + | StoryInteractiveReaction + | StoryInteractiveLocation + | StoryInteractiveVenue + | StoryInteractiveChannelPost + | StoryInteractiveUrl + | StoryInteractiveWeather export function _storyInteractiveElementFromTl(raw: tl.TypeMediaArea, peers: PeersIndex): StoryInteractiveElement { switch (raw._) { diff --git a/packages/core/src/highlevel/types/stories/interactive/input.ts b/packages/core/src/highlevel/types/stories/interactive/input.ts index 89892ca0..3b11c9ce 100644 --- a/packages/core/src/highlevel/types/stories/interactive/input.ts +++ b/packages/core/src/highlevel/types/stories/interactive/input.ts @@ -1,9 +1,9 @@ import Long from 'long' +import type { tl } from '@mtcute/tl' -import { tl } from '@mtcute/tl' - -import { VenueSource } from '../../media/index.js' -import { InputReaction, normalizeInputReaction } from '../../reactions/index.js' +import type { VenueSource } from '../../media/index.js' +import type { InputReaction } from '../../reactions/index.js' +import { normalizeInputReaction } from '../../reactions/index.js' /** * Constructor for interactive story elements. @@ -18,7 +18,7 @@ import { InputReaction, normalizeInputReaction } from '../../reactions/index.js' export class StoryElement { private constructor(private _position: tl.RawMediaAreaCoordinates) {} - static at(params: { x: number; y: number; width: number; height: number; rotation?: number }) { + static at(params: { x: number, y: number, width: number, height: number, rotation?: number }): StoryElement { return new StoryElement({ _: 'mediaAreaCoordinates', x: params.x, diff --git a/packages/core/src/highlevel/types/stories/interactive/location.ts b/packages/core/src/highlevel/types/stories/interactive/location.ts index 2108e3c1..466da18f 100644 --- a/packages/core/src/highlevel/types/stories/interactive/location.ts +++ b/packages/core/src/highlevel/types/stories/interactive/location.ts @@ -1,9 +1,10 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertTypeIs } from '../../../../utils/type-assertions.js' import { makeInspectable } from '../../../utils/index.js' import { memoizeGetters } from '../../../utils/memoize.js' import { Location } from '../../media/location.js' + import { StoryInteractiveArea } from './base.js' /** diff --git a/packages/core/src/highlevel/types/stories/interactive/reaction.ts b/packages/core/src/highlevel/types/stories/interactive/reaction.ts index 51facf4e..92a38bfc 100644 --- a/packages/core/src/highlevel/types/stories/interactive/reaction.ts +++ b/packages/core/src/highlevel/types/stories/interactive/reaction.ts @@ -1,7 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../../utils/index.js' -import { ReactionEmoji, toReactionEmoji } from '../../reactions/index.js' +import type { ReactionEmoji } from '../../reactions/index.js' +import { toReactionEmoji } from '../../reactions/index.js' + import { StoryInteractiveArea } from './base.js' /** diff --git a/packages/core/src/highlevel/types/stories/interactive/url.ts b/packages/core/src/highlevel/types/stories/interactive/url.ts index c76db4cf..fa7201fb 100644 --- a/packages/core/src/highlevel/types/stories/interactive/url.ts +++ b/packages/core/src/highlevel/types/stories/interactive/url.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { StoryInteractiveArea } from './base.js' diff --git a/packages/core/src/highlevel/types/stories/interactive/venue.ts b/packages/core/src/highlevel/types/stories/interactive/venue.ts index 1845c1b4..d4c188ad 100644 --- a/packages/core/src/highlevel/types/stories/interactive/venue.ts +++ b/packages/core/src/highlevel/types/stories/interactive/venue.ts @@ -1,10 +1,11 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertTypeIs } from '../../../../utils/type-assertions.js' import { makeInspectable } from '../../../utils/index.js' import { memoizeGetters } from '../../../utils/memoize.js' import { Location } from '../../media/location.js' -import { VenueSource } from '../../media/venue.js' +import type { VenueSource } from '../../media/venue.js' + import { StoryInteractiveArea } from './base.js' /** diff --git a/packages/core/src/highlevel/types/stories/interactive/weather.ts b/packages/core/src/highlevel/types/stories/interactive/weather.ts index 270b554e..3e0354ee 100644 --- a/packages/core/src/highlevel/types/stories/interactive/weather.ts +++ b/packages/core/src/highlevel/types/stories/interactive/weather.ts @@ -1,6 +1,7 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../../utils/index.js' + import { StoryInteractiveArea } from './base.js' /** diff --git a/packages/core/src/highlevel/types/stories/peer-stories.ts b/packages/core/src/highlevel/types/stories/peer-stories.ts index 8216d623..d566f0a9 100644 --- a/packages/core/src/highlevel/types/stories/peer-stories.ts +++ b/packages/core/src/highlevel/types/stories/peer-stories.ts @@ -1,9 +1,11 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertTypeIs } from '../../../utils/type-assertions.js' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' -import { parsePeer, Peer, PeersIndex } from '../peers/index.js' +import type { Peer, PeersIndex } from '../peers/index.js' +import { parsePeer } from '../peers/index.js' + import { Story } from './story.js' export class PeerStories { diff --git a/packages/core/src/highlevel/types/stories/stealth-mode.ts b/packages/core/src/highlevel/types/stories/stealth-mode.ts index a56cfb1a..ace72150 100644 --- a/packages/core/src/highlevel/types/stories/stealth-mode.ts +++ b/packages/core/src/highlevel/types/stories/stealth-mode.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' diff --git a/packages/core/src/highlevel/types/stories/story-interactions.ts b/packages/core/src/highlevel/types/stories/story-interactions.ts index 2ba88aca..1490b017 100644 --- a/packages/core/src/highlevel/types/stories/story-interactions.ts +++ b/packages/core/src/highlevel/types/stories/story-interactions.ts @@ -1,8 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' -import { PeersIndex } from '../peers/peers-index.js' +import type { PeersIndex } from '../peers/peers-index.js' import { User } from '../peers/user.js' import { ReactionCount } from '../reactions/reaction-count.js' @@ -47,14 +47,14 @@ export class StoryInteractions { get reactions(): ReactionCount[] { if (!this.raw.reactions) return [] - return this.raw.reactions.map((it) => new ReactionCount(it)) + return this.raw.reactions.map(it => new ReactionCount(it)) } /** * List of users who have recently viewed this story. */ get recentViewers(): User[] { - return this.raw.recentViewers?.map((it) => new User(this._peers.user(it))) ?? [] + return this.raw.recentViewers?.map(it => new User(this._peers.user(it))) ?? [] } } diff --git a/packages/core/src/highlevel/types/stories/story-viewer.ts b/packages/core/src/highlevel/types/stories/story-viewer.ts index 75e9e21d..e822e913 100644 --- a/packages/core/src/highlevel/types/stories/story-viewer.ts +++ b/packages/core/src/highlevel/types/stories/story-viewer.ts @@ -1,11 +1,14 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtTypeAssertionError } from '../../../types/errors.js' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' import { Message } from '../messages/index.js' -import { parsePeer, Peer, PeersIndex, User } from '../peers/index.js' -import { ReactionEmoji, toReactionEmoji } from '../reactions/index.js' +import type { Peer } from '../peers/index.js' +import { PeersIndex, User, parsePeer } from '../peers/index.js' +import type { ReactionEmoji } from '../reactions/index.js' +import { toReactionEmoji } from '../reactions/index.js' + import { Story } from './story.js' /** diff --git a/packages/core/src/highlevel/types/stories/story.ts b/packages/core/src/highlevel/types/stories/story.ts index 948e0696..d58192ff 100644 --- a/packages/core/src/highlevel/types/stories/story.ts +++ b/packages/core/src/highlevel/types/stories/story.ts @@ -1,15 +1,18 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtUnsupportedError } from '../../../types/errors.js' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' import { parseDocument } from '../media/document-utils.js' import { Photo } from '../media/photo.js' -import { Video } from '../media/video.js' +import type { Video } from '../media/video.js' import { MessageEntity } from '../messages/message-entity.js' -import { PeersIndex } from '../peers/index.js' -import { ReactionEmoji, toReactionEmoji } from '../reactions/index.js' -import { _storyInteractiveElementFromTl, StoryInteractiveElement } from './interactive/index.js' +import type { PeersIndex } from '../peers/index.js' +import type { ReactionEmoji } from '../reactions/index.js' +import { toReactionEmoji } from '../reactions/index.js' + +import type { StoryInteractiveElement } from './interactive/index.js' +import { _storyInteractiveElementFromTl } from './interactive/index.js' import { StoryInteractions } from './story-interactions.js' /** @@ -141,7 +144,7 @@ export class Story { get interactiveElements(): StoryInteractiveElement[] { if (!this.raw.mediaAreas) return [] - return this.raw.mediaAreas.map((it) => _storyInteractiveElementFromTl(it, this._peers)) + return this.raw.mediaAreas.map(it => _storyInteractiveElementFromTl(it, this._peers)) } /** diff --git a/packages/core/src/highlevel/types/updates/bot-chat-join-request.ts b/packages/core/src/highlevel/types/updates/bot-chat-join-request.ts index 0f359199..00fde360 100644 --- a/packages/core/src/highlevel/types/updates/bot-chat-join-request.ts +++ b/packages/core/src/highlevel/types/updates/bot-chat-join-request.ts @@ -1,9 +1,10 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { getBarePeerId, getMarkedPeerId } from '../../../utils/peer-utils.js' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' -import { Chat, ChatInviteLink, PeersIndex, User } from '../peers/index.js' +import type { PeersIndex } from '../peers/index.js' +import { Chat, ChatInviteLink, User } from '../peers/index.js' /** * This update is sent when a user requests to join a chat diff --git a/packages/core/src/highlevel/types/updates/bot-reaction.ts b/packages/core/src/highlevel/types/updates/bot-reaction.ts index 56ec38d8..c553d9a0 100644 --- a/packages/core/src/highlevel/types/updates/bot-reaction.ts +++ b/packages/core/src/highlevel/types/updates/bot-reaction.ts @@ -1,12 +1,14 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/inspectable.js' import { memoizeGetters } from '../../utils/memoize.js' import { Chat } from '../peers/chat.js' -import { parsePeer, Peer } from '../peers/peer.js' -import { PeersIndex } from '../peers/peers-index.js' +import type { Peer } from '../peers/peer.js' +import { parsePeer } from '../peers/peer.js' +import type { PeersIndex } from '../peers/peers-index.js' import { ReactionCount } from '../reactions/reaction-count.js' -import { InputReaction, toReactionEmoji } from '../reactions/types.js' +import type { InputReaction } from '../reactions/types.js' +import { toReactionEmoji } from '../reactions/types.js' /** * A reaction to a message was changed by a user. @@ -54,14 +56,14 @@ export class BotReactionUpdate { * List of reactions before the change */ get before(): InputReaction[] { - return this.raw.oldReactions.map((it) => toReactionEmoji(it)) + return this.raw.oldReactions.map(it => toReactionEmoji(it)) } /** * List of reactions after the change */ get after(): InputReaction[] { - return this.raw.newReactions.map((it) => toReactionEmoji(it)) + return this.raw.newReactions.map(it => toReactionEmoji(it)) } } @@ -107,7 +109,7 @@ export class BotReactionCountUpdate { * The new list of reactions to the message */ get reactions(): ReactionCount[] { - return this.raw.reactions.map((it) => new ReactionCount(it)) + return this.raw.reactions.map(it => new ReactionCount(it)) } } diff --git a/packages/core/src/highlevel/types/updates/bot-stopped.ts b/packages/core/src/highlevel/types/updates/bot-stopped.ts index 3c99fd64..0af5fba8 100644 --- a/packages/core/src/highlevel/types/updates/bot-stopped.ts +++ b/packages/core/src/highlevel/types/updates/bot-stopped.ts @@ -1,8 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' -import { PeersIndex, User } from '../peers/index.js' +import type { PeersIndex } from '../peers/index.js' +import { User } from '../peers/index.js' /** * A user has stopped or restarted the bot. diff --git a/packages/core/src/highlevel/types/updates/business-message.ts b/packages/core/src/highlevel/types/updates/business-message.ts index d3da40fe..8f95c024 100644 --- a/packages/core/src/highlevel/types/updates/business-message.ts +++ b/packages/core/src/highlevel/types/updates/business-message.ts @@ -1,7 +1,7 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { Message } from '../messages/message.js' -import { PeersIndex } from '../peers/peers-index.js' +import type { PeersIndex } from '../peers/peers-index.js' /** * Update about a new or edited business message. diff --git a/packages/core/src/highlevel/types/updates/callback-query.ts b/packages/core/src/highlevel/types/updates/callback-query.ts index c88577ac..b16fcbf1 100644 --- a/packages/core/src/highlevel/types/updates/callback-query.ts +++ b/packages/core/src/highlevel/types/updates/callback-query.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { getPlatform } from '../../../platform.js' import { MtArgumentError } from '../../../types/errors.js' @@ -7,16 +7,16 @@ import { encodeInlineMessageId } from '../../utils/inline-utils.js' import { memoizeGetters } from '../../utils/memoize.js' import { Message } from '../messages/message.js' import { Chat } from '../peers/chat.js' -import { PeersIndex } from '../peers/peers-index.js' +import type { PeersIndex } from '../peers/peers-index.js' import { User } from '../peers/user.js' /** Base class for callback queries */ class BaseCallbackQuery { constructor( readonly raw: - | tl.RawUpdateBotCallbackQuery - | tl.RawUpdateInlineBotCallbackQuery - | tl.RawUpdateBusinessBotCallbackQuery, + | tl.RawUpdateBotCallbackQuery + | tl.RawUpdateInlineBotCallbackQuery + | tl.RawUpdateBusinessBotCallbackQuery, readonly _peers: PeersIndex, ) {} diff --git a/packages/core/src/highlevel/types/updates/chat-join-request.ts b/packages/core/src/highlevel/types/updates/chat-join-request.ts index fc36c034..7f88e292 100644 --- a/packages/core/src/highlevel/types/updates/chat-join-request.ts +++ b/packages/core/src/highlevel/types/updates/chat-join-request.ts @@ -1,9 +1,10 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { getBarePeerId } from '../../../utils/peer-utils.js' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' -import { PeersIndex, User } from '../peers/index.js' +import type { PeersIndex } from '../peers/index.js' +import { User } from '../peers/index.js' /** * This update is sent when a user requests to join a chat @@ -39,7 +40,7 @@ export class ChatJoinRequestUpdate { * Users who recently requested to join the chat */ get recentRequesters(): User[] { - return this.raw.recentRequesters.map((id) => new User(this._peers.user(id))) + return this.raw.recentRequesters.map(id => new User(this._peers.user(id))) } /** diff --git a/packages/core/src/highlevel/types/updates/chat-member-update.ts b/packages/core/src/highlevel/types/updates/chat-member-update.ts index 177ae32d..93192d0f 100644 --- a/packages/core/src/highlevel/types/updates/chat-member-update.ts +++ b/packages/core/src/highlevel/types/updates/chat-member-update.ts @@ -6,7 +6,7 @@ import { memoizeGetters } from '../../utils/memoize.js' import { Chat } from '../peers/chat.js' import { ChatInviteLink } from '../peers/chat-invite-link.js' import { ChatMember } from '../peers/chat-member.js' -import { PeersIndex } from '../peers/peers-index.js' +import type { PeersIndex } from '../peers/peers-index.js' import { User } from '../peers/user.js' /** @@ -28,21 +28,21 @@ import { User } from '../peers/user.js' * - `other`: Some other event (e.g. change in restrictions, change in admin rights, etc.) */ export type ChatMemberUpdateType = - | 'joined' - | 'added' - | 'left' - | 'kicked' - | 'unkicked' - | 'restricted' - | 'unrestricted' - | 'unrestricted_promoted' - | 'promoted' - | 'demoted' - | 'demoted_restricted' - | 'demoted_kicked' - | 'old_owner' - | 'new_owner' - | 'other' + | 'joined' + | 'added' + | 'left' + | 'kicked' + | 'unkicked' + | 'restricted' + | 'unrestricted' + | 'unrestricted_promoted' + | 'promoted' + | 'demoted' + | 'demoted_restricted' + | 'demoted_kicked' + | 'old_owner' + | 'new_owner' + | 'other' function extractPeerId(raw?: tl.TypeChatParticipant | tl.TypeChannelParticipant) { if (!raw) return 0 diff --git a/packages/core/src/highlevel/types/updates/chosen-inline-result.ts b/packages/core/src/highlevel/types/updates/chosen-inline-result.ts index 5c8e32bd..64747f3b 100644 --- a/packages/core/src/highlevel/types/updates/chosen-inline-result.ts +++ b/packages/core/src/highlevel/types/updates/chosen-inline-result.ts @@ -1,10 +1,11 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' import { encodeInlineMessageId } from '../../utils/inline-utils.js' import { memoizeGetters } from '../../utils/memoize.js' import { Location } from '../media/location.js' -import { PeersIndex, User } from '../peers/index.js' +import type { PeersIndex } from '../peers/index.js' +import { User } from '../peers/index.js' /** * An inline result was chosen by the user and sent to some chat diff --git a/packages/core/src/highlevel/types/updates/delete-business-message-update.ts b/packages/core/src/highlevel/types/updates/delete-business-message-update.ts index c867e31a..9cca7fa5 100644 --- a/packages/core/src/highlevel/types/updates/delete-business-message-update.ts +++ b/packages/core/src/highlevel/types/updates/delete-business-message-update.ts @@ -1,9 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' import { Chat } from '../peers/chat.js' -import { PeersIndex } from '../peers/peers-index.js' +import type { PeersIndex } from '../peers/peers-index.js' /** * One or more messages were deleted from a connected business account diff --git a/packages/core/src/highlevel/types/updates/delete-message-update.ts b/packages/core/src/highlevel/types/updates/delete-message-update.ts index 86b7a404..ca2a6abe 100644 --- a/packages/core/src/highlevel/types/updates/delete-message-update.ts +++ b/packages/core/src/highlevel/types/updates/delete-message-update.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { toggleChannelIdMark } from '../../../utils/peer-utils.js' import { makeInspectable } from '../../utils/index.js' diff --git a/packages/core/src/highlevel/types/updates/delete-story-update.ts b/packages/core/src/highlevel/types/updates/delete-story-update.ts index c163fc6c..e0214230 100644 --- a/packages/core/src/highlevel/types/updates/delete-story-update.ts +++ b/packages/core/src/highlevel/types/updates/delete-story-update.ts @@ -1,6 +1,7 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { parsePeer, Peer, PeersIndex } from '../../types/peers/index.js' +import type { Peer, PeersIndex } from '../../types/peers/index.js' +import { parsePeer } from '../../types/peers/index.js' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' diff --git a/packages/core/src/highlevel/types/updates/history-read-update.ts b/packages/core/src/highlevel/types/updates/history-read-update.ts index 53ecaf1d..fb19a800 100644 --- a/packages/core/src/highlevel/types/updates/history-read-update.ts +++ b/packages/core/src/highlevel/types/updates/history-read-update.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { getMarkedPeerId, toggleChannelIdMark } from '../../../utils/peer-utils.js' import { makeInspectable } from '../../utils/index.js' @@ -6,12 +6,12 @@ import { makeInspectable } from '../../utils/index.js' export class HistoryReadUpdate { constructor( readonly raw: - | tl.RawUpdateReadHistoryInbox - | tl.RawUpdateReadHistoryOutbox - | tl.RawUpdateReadChannelInbox - | tl.RawUpdateReadChannelOutbox - | tl.RawUpdateReadChannelDiscussionInbox - | tl.RawUpdateReadChannelDiscussionOutbox, + | tl.RawUpdateReadHistoryInbox + | tl.RawUpdateReadHistoryOutbox + | tl.RawUpdateReadChannelInbox + | tl.RawUpdateReadChannelOutbox + | tl.RawUpdateReadChannelDiscussionInbox + | tl.RawUpdateReadChannelDiscussionOutbox, ) {} /** diff --git a/packages/core/src/highlevel/types/updates/index.ts b/packages/core/src/highlevel/types/updates/index.ts index dfd630ac..6abb3813 100644 --- a/packages/core/src/highlevel/types/updates/index.ts +++ b/packages/core/src/highlevel/types/updates/index.ts @@ -1,11 +1,11 @@ import type { BusinessConnection, Message } from '../../types/index.js' + import { BotChatJoinRequestUpdate } from './bot-chat-join-request.js' import { BotStoppedUpdate } from './bot-stopped.js' import { BusinessCallbackQuery, CallbackQuery, InlineCallbackQuery } from './callback-query.js' import { ChatJoinRequestUpdate } from './chat-join-request.js' import { ChatMemberUpdate } from './chat-member-update.js' import { InlineQuery } from './inline-query.js' -export type { ChatMemberUpdateType } from './chat-member-update.js' import { BotReactionCountUpdate, BotReactionUpdate } from './bot-reaction.js' import { BusinessMessage } from './business-message.js' import { ChosenInlineResult } from './chosen-inline-result.js' @@ -20,6 +20,8 @@ import { StoryUpdate } from './story-update.js' import { UserStatusUpdate } from './user-status-update.js' import { UserTypingUpdate } from './user-typing-update.js' +export type { ChatMemberUpdateType } from './chat-member-update.js' + export { BotChatJoinRequestUpdate, BotReactionCountUpdate, @@ -47,33 +49,33 @@ export { // begin-codegen export type ParsedUpdate = - | { name: 'new_message'; data: Message } - | { name: 'edit_message'; data: Message } - | { name: 'message_group'; data: Message[] } - | { name: 'delete_message'; data: DeleteMessageUpdate } - | { name: 'chat_member'; data: ChatMemberUpdate } - | { name: 'inline_query'; data: InlineQuery } - | { name: 'chosen_inline_result'; data: ChosenInlineResult } - | { name: 'callback_query'; data: CallbackQuery } - | { name: 'inline_callback_query'; data: InlineCallbackQuery } - | { name: 'business_callback_query'; data: BusinessCallbackQuery } - | { name: 'poll'; data: PollUpdate } - | { name: 'poll_vote'; data: PollVoteUpdate } - | { name: 'user_status'; data: UserStatusUpdate } - | { name: 'user_typing'; data: UserTypingUpdate } - | { name: 'history_read'; data: HistoryReadUpdate } - | { name: 'bot_stopped'; data: BotStoppedUpdate } - | { name: 'bot_chat_join_request'; data: BotChatJoinRequestUpdate } - | { name: 'chat_join_request'; data: ChatJoinRequestUpdate } - | { name: 'pre_checkout_query'; data: PreCheckoutQuery } - | { name: 'story'; data: StoryUpdate } - | { name: 'delete_story'; data: DeleteStoryUpdate } - | { name: 'bot_reaction'; data: BotReactionUpdate } - | { name: 'bot_reaction_count'; data: BotReactionCountUpdate } - | { name: 'business_connection'; data: BusinessConnection } - | { name: 'new_business_message'; data: BusinessMessage } - | { name: 'edit_business_message'; data: BusinessMessage } - | { name: 'business_message_group'; data: BusinessMessage[] } - | { name: 'delete_business_message'; data: DeleteBusinessMessageUpdate } + | { name: 'new_message', data: Message } + | { name: 'edit_message', data: Message } + | { name: 'message_group', data: Message[] } + | { name: 'delete_message', data: DeleteMessageUpdate } + | { name: 'chat_member', data: ChatMemberUpdate } + | { name: 'inline_query', data: InlineQuery } + | { name: 'chosen_inline_result', data: ChosenInlineResult } + | { name: 'callback_query', data: CallbackQuery } + | { name: 'inline_callback_query', data: InlineCallbackQuery } + | { name: 'business_callback_query', data: BusinessCallbackQuery } + | { name: 'poll', data: PollUpdate } + | { name: 'poll_vote', data: PollVoteUpdate } + | { name: 'user_status', data: UserStatusUpdate } + | { name: 'user_typing', data: UserTypingUpdate } + | { name: 'history_read', data: HistoryReadUpdate } + | { name: 'bot_stopped', data: BotStoppedUpdate } + | { name: 'bot_chat_join_request', data: BotChatJoinRequestUpdate } + | { name: 'chat_join_request', data: ChatJoinRequestUpdate } + | { name: 'pre_checkout_query', data: PreCheckoutQuery } + | { name: 'story', data: StoryUpdate } + | { name: 'delete_story', data: DeleteStoryUpdate } + | { name: 'bot_reaction', data: BotReactionUpdate } + | { name: 'bot_reaction_count', data: BotReactionCountUpdate } + | { name: 'business_connection', data: BusinessConnection } + | { name: 'new_business_message', data: BusinessMessage } + | { name: 'edit_business_message', data: BusinessMessage } + | { name: 'business_message_group', data: BusinessMessage[] } + | { name: 'delete_business_message', data: DeleteBusinessMessageUpdate } // end-codegen diff --git a/packages/core/src/highlevel/types/updates/inline-query.ts b/packages/core/src/highlevel/types/updates/inline-query.ts index c98a17de..feaa5a6b 100644 --- a/packages/core/src/highlevel/types/updates/inline-query.ts +++ b/packages/core/src/highlevel/types/updates/inline-query.ts @@ -1,9 +1,10 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' import { Location } from '../media/location.js' -import { PeersIndex, PeerType, User } from '../peers/index.js' +import type { PeerType, PeersIndex } from '../peers/index.js' +import { User } from '../peers/index.js' const PEER_TYPE_MAP: Record = { inlineQueryPeerTypeBroadcast: 'channel', diff --git a/packages/core/src/highlevel/types/updates/parse-update.ts b/packages/core/src/highlevel/types/updates/parse-update.ts index 5baa26db..5779211f 100644 --- a/packages/core/src/highlevel/types/updates/parse-update.ts +++ b/packages/core/src/highlevel/types/updates/parse-update.ts @@ -1,6 +1,9 @@ -/* eslint-disable @typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-argument */ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' +import type { + ParsedUpdate, + PeersIndex, +} from '../index.js' import { BotChatJoinRequestUpdate, BotReactionCountUpdate, @@ -20,8 +23,6 @@ import { InlineCallbackQuery, InlineQuery, Message, - ParsedUpdate, - PeersIndex, PollUpdate, PollVoteUpdate, PreCheckoutQuery, diff --git a/packages/core/src/highlevel/types/updates/poll-update.ts b/packages/core/src/highlevel/types/updates/poll-update.ts index 692cdcc2..c261de37 100644 --- a/packages/core/src/highlevel/types/updates/poll-update.ts +++ b/packages/core/src/highlevel/types/updates/poll-update.ts @@ -1,9 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' import { Poll } from '../media/poll.js' -import { PeersIndex } from '../peers/peers-index.js' +import type { PeersIndex } from '../peers/peers-index.js' /** * Poll state has changed (stopped, somebody @@ -57,7 +57,7 @@ export class PollUpdate { id: this.raw.pollId, question: { _: 'textWithEntities', text: '', entities: [] }, answers: - this.raw.results.results?.map((res) => ({ + this.raw.results.results?.map(res => ({ _: 'pollAnswer', text: { _: 'textWithEntities', text: '', entities: [] }, option: res.option, diff --git a/packages/core/src/highlevel/types/updates/poll-vote.ts b/packages/core/src/highlevel/types/updates/poll-vote.ts index 182dc143..4bbea659 100644 --- a/packages/core/src/highlevel/types/updates/poll-vote.ts +++ b/packages/core/src/highlevel/types/updates/poll-vote.ts @@ -1,9 +1,10 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtUnsupportedError } from '../../../types/errors.js' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' -import { parsePeer, Peer, PeersIndex } from '../peers/index.js' +import type { Peer, PeersIndex } from '../peers/index.js' +import { parsePeer } from '../peers/index.js' /** * Some user has voted in a public poll. diff --git a/packages/core/src/highlevel/types/updates/pre-checkout-query.ts b/packages/core/src/highlevel/types/updates/pre-checkout-query.ts index d46c1b58..a0dfdf06 100644 --- a/packages/core/src/highlevel/types/updates/pre-checkout-query.ts +++ b/packages/core/src/highlevel/types/updates/pre-checkout-query.ts @@ -1,8 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' -import { PeersIndex, User } from '../peers/index.js' +import type { PeersIndex } from '../peers/index.js' +import { User } from '../peers/index.js' export class PreCheckoutQuery { constructor( diff --git a/packages/core/src/highlevel/types/updates/story-update.ts b/packages/core/src/highlevel/types/updates/story-update.ts index 88738273..eb209f5b 100644 --- a/packages/core/src/highlevel/types/updates/story-update.ts +++ b/packages/core/src/highlevel/types/updates/story-update.ts @@ -1,7 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { assertTypeIs } from '../../../utils/type-assertions.js' -import { parsePeer, Peer, PeersIndex } from '../../types/peers/index.js' +import type { Peer, PeersIndex } from '../../types/peers/index.js' +import { parsePeer } from '../../types/peers/index.js' import { Story } from '../../types/stories/index.js' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' diff --git a/packages/core/src/highlevel/types/updates/user-status-update.ts b/packages/core/src/highlevel/types/updates/user-status-update.ts index bac4d0a2..50a546f6 100644 --- a/packages/core/src/highlevel/types/updates/user-status-update.ts +++ b/packages/core/src/highlevel/types/updates/user-status-update.ts @@ -1,8 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { makeInspectable } from '../../utils/index.js' import { memoizeGetters } from '../../utils/memoize.js' -import { User, UserStatus } from '../peers/index.js' +import type { UserStatus } from '../peers/index.js' +import { User } from '../peers/index.js' /** * User status has changed diff --git a/packages/core/src/highlevel/types/updates/user-typing-update.ts b/packages/core/src/highlevel/types/updates/user-typing-update.ts index 08c237d9..2689102b 100644 --- a/packages/core/src/highlevel/types/updates/user-typing-update.ts +++ b/packages/core/src/highlevel/types/updates/user-typing-update.ts @@ -1,10 +1,10 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { BasicPeerType } from '../../../types/peers.js' +import type { BasicPeerType } from '../../../types/peers.js' import { assertNever } from '../../../types/utils.js' import { getBarePeerId, toggleChannelIdMark } from '../../../utils/peer-utils.js' import { makeInspectable } from '../../utils/index.js' -import { TypingStatus } from '../peers/index.js' +import type { TypingStatus } from '../peers/index.js' /** * User's typing status has changed. diff --git a/packages/core/src/highlevel/types/utils.ts b/packages/core/src/highlevel/types/utils.ts index 02d13044..aee3aea1 100644 --- a/packages/core/src/highlevel/types/utils.ts +++ b/packages/core/src/highlevel/types/utils.ts @@ -1,10 +1,9 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import { MaybePromise } from '../../types/utils.js' +import type { MaybePromise } from '../../types/utils.js' export type MaybeDynamic = MaybePromise | (() => MaybePromise) export type ArrayWithTotal = T[] & { total: number } -export type ArrayPaginated = T[] & { total: number; next?: Offset } +export type ArrayPaginated = T[] & { total: number, next?: Offset } export type ParametersSkip1 = T extends (a: any, ...args: infer P) => any ? P : never export type ParametersSkip2 = T extends (a: any, b: any, ...args: infer P) => any ? P : never diff --git a/packages/core/src/highlevel/updates/manager.ts b/packages/core/src/highlevel/updates/manager.ts index e419564e..716bc7cf 100644 --- a/packages/core/src/highlevel/updates/manager.ts +++ b/packages/core/src/highlevel/updates/manager.ts @@ -1,24 +1,28 @@ -/* eslint-disable max-depth,max-params */ import { tl } from '@mtcute/tl' import { MtArgumentError } from '../../types/errors.js' -import { assertNever, MaybePromise } from '../../types/utils.js' +import type { MaybePromise } from '../../types/utils.js' +import { assertNever } from '../../types/utils.js' +import type { + Logger, +} from '../../utils/index.js' import { AsyncLock, ConditionVariable, Deque, EarlyTimer, + SortedLinkedList, getBarePeerId, getMarkedPeerId, parseMarkedPeerId, - SortedLinkedList, - toggleChannelIdMark, toInputChannel, + toggleChannelIdMark, } from '../../utils/index.js' -import { BaseTelegramClient } from '../base.js' -import { CurrentUserInfo } from '../storage/service/current-user.js' +import type { BaseTelegramClient } from '../base.js' +import type { CurrentUserInfo } from '../storage/service/current-user.js' import { PeersIndex } from '../types/peers/peers-index.js' -import { PendingUpdate, PendingUpdateContainer, RawUpdateHandler, UpdatesManagerParams } from './types.js' + +import type { PendingUpdate, PendingUpdateContainer, RawUpdateHandler, UpdatesManagerParams } from './types.js' import { createDummyUpdatesContainer, extractChannelIdFromUpdate, @@ -88,26 +92,32 @@ const UPDATES_TOO_LONG = { _: 'updatesTooLong' } as const // todo: fix docs export class UpdatesManager { updatesLoopActive = false - updatesLoopCv = new ConditionVariable() + updatesLoopCv: ConditionVariable = new ConditionVariable() - postponedTimer = new EarlyTimer() + postponedTimer: EarlyTimer = new EarlyTimer() hasTimedoutPostponed = false - pendingUpdateContainers = new SortedLinkedList((a, b) => a.seqStart - b.seqStart) - pendingPtsUpdates = new SortedLinkedList((a, b) => a.ptsBefore! - b.ptsBefore!) - pendingPtsUpdatesPostponed = new SortedLinkedList((a, b) => a.ptsBefore! - b.ptsBefore!) - pendingQtsUpdates = new SortedLinkedList((a, b) => a.qtsBefore! - b.qtsBefore!) - pendingQtsUpdatesPostponed = new SortedLinkedList((a, b) => a.qtsBefore! - b.qtsBefore!) - pendingUnorderedUpdates = new Deque() + pendingUpdateContainers: SortedLinkedList + = new SortedLinkedList((a, b) => a.seqStart - b.seqStart) - noDispatchEnabled + pendingPtsUpdates: SortedLinkedList = new SortedLinkedList((a, b) => a.ptsBefore! - b.ptsBefore!) + pendingPtsUpdatesPostponed: SortedLinkedList + = new SortedLinkedList((a, b) => a.ptsBefore! - b.ptsBefore!) + + pendingQtsUpdates: SortedLinkedList = new SortedLinkedList((a, b) => a.qtsBefore! - b.qtsBefore!) + pendingQtsUpdatesPostponed: SortedLinkedList + = new SortedLinkedList((a, b) => a.qtsBefore! - b.qtsBefore!) + + pendingUnorderedUpdates: Deque = new Deque() + + noDispatchEnabled: boolean // channel id or 0 => msg id - noDispatchMsg = new Map>() + noDispatchMsg: Map> = new Map() // channel id or 0 => pts - noDispatchPts = new Map>() - noDispatchQts = new Set() + noDispatchPts: Map> = new Map() + noDispatchQts: Set = new Set() - lock = new AsyncLock() + lock: AsyncLock = new AsyncLock() // rpsIncoming?: RpsMeter // rpsProcessing?: RpsMeter @@ -128,19 +138,19 @@ export class UpdatesManager { // whether to catch up channels from the locally stored pts catchingUp = false - catchUpOnStart + catchUpOnStart: boolean - cpts = new Map() - cptsMod = new Map() - channelDiffTimeouts = new Map() - channelsOpened = new Map() + cpts: Map = new Map() + cptsMod: Map = new Map() + channelDiffTimeouts: Map = new Map() + channelsOpened: Map = new Map() - log + log: Logger private _handler: RawUpdateHandler = () => {} private _onCatchingUp: (catchingUp: boolean) => void = () => {} - // eslint-disable-next-line @typescript-eslint/ban-types + // eslint-disable-next-line ts/no-unsafe-function-type private _channelPtsLimit: Extract auth?: CurrentUserInfo | null // todo: do we need a local copy? @@ -188,13 +198,13 @@ export class UpdatesManager { this._onCatchingUp = handler } - destroy() { + destroy(): void { this.stopLoop() } notifyLoggedIn(self: CurrentUserInfo): void { this.auth = self - this.startLoop().catch((err) => this.client.emitError(err)) + this.startLoop().catch(err => this.client.emitError(err)) } notifyLoggedOut(): void { @@ -237,7 +247,7 @@ export class UpdatesManager { this.updatesLoopActive = true clearInterval(this.keepAliveInterval) this.keepAliveInterval = setInterval(this._onKeepAlive, KEEP_ALIVE_INTERVAL) - this._loop().catch((err) => this.client.emitError(err)) + this._loop().catch(err => this.client.emitError(err)) if (this.catchUpOnStart) { this.catchUp() @@ -398,7 +408,7 @@ export class UpdatesManager { return true } - ////////////////////////////////////////////// IMPLEMENTATION ////////////////////////////////////////////// + /// /////////////////////////////////////////// IMPLEMENTATION ////////////////////////////////////////////// async _fetchUpdatesState(): Promise { const { client, lock, log } = this @@ -644,8 +654,8 @@ export class UpdatesManager { if (msg._ !== 'messageService') { if ( - msg.fwdFrom && - (!(await fetchPeer(msg.fwdFrom.fromId)) || !(await fetchPeer(msg.fwdFrom.savedFromPeer))) + msg.fwdFrom + && (!(await fetchPeer(msg.fwdFrom.fromId)) || !(await fetchPeer(msg.fwdFrom.savedFromPeer))) ) { return missing } @@ -853,9 +863,9 @@ export class UpdatesManager { }) if (diff.timeout) { - lastTimeout = this.params.overrideOpenChatTimeout ? - this.params.overrideOpenChatTimeout(diff) : - diff.timeout + lastTimeout = this.params.overrideOpenChatTimeout + ? this.params.overrideOpenChatTimeout(diff) + : diff.timeout } if (diff._ === 'updates.channelDifferenceEmpty') { @@ -1115,7 +1125,7 @@ export class UpdatesManager { const { client, log } = this const upd = pending.update - let missing: Set | undefined = undefined + let missing: Set | undefined // it is important to do this before updating pts if (pending.peers.hasMin || pending.peers.empty) { @@ -1224,12 +1234,12 @@ export class UpdatesManager { dcOptions: upd.dcOptions, }) } else { - client.mt.network.config.update(true).catch((err) => client.emitError(err)) + client.mt.network.config.update(true).catch(err => client.emitError(err)) } break } case 'updateConfig': - client.mt.network.config.update(true).catch((err) => client.emitError(err)) + client.mt.network.config.update(true).catch(err => client.emitError(err)) break case 'updateUserName': // todo @@ -1294,12 +1304,12 @@ export class UpdatesManager { // dispatch the update if (this.noDispatchEnabled) { const channelId = pending.channelId ?? 0 - const msgId = - upd._ === 'updateNewMessage' || - upd._ === 'updateNewChannelMessage' || - upd._ === 'updateBotNewBusinessMessage' ? - upd.message.id : - undefined + const msgId + = upd._ === 'updateNewMessage' + || upd._ === 'updateNewChannelMessage' + || upd._ === 'updateBotNewBusinessMessage' + ? upd.message.id + : undefined // we first need to remove it from each index, and then check if it was there const foundByMsgId = msgId && this.noDispatchMsg.get(channelId)?.delete(msgId) @@ -1343,11 +1353,11 @@ export class UpdatesManager { while (this.updatesLoopActive) { if ( !( - pendingUpdateContainers.length || - pendingPtsUpdates.length || - pendingQtsUpdates.length || - pendingUnorderedUpdates.length || - this.hasTimedoutPostponed + pendingUpdateContainers.length + || pendingPtsUpdates.length + || pendingQtsUpdates.length + || pendingUnorderedUpdates.length + || this.hasTimedoutPostponed ) ) { if (this.catchingUp) { @@ -1590,8 +1600,9 @@ export class UpdatesManager { let localPts: number | null = null - if (!pending.channelId) localPts = this.pts! - else if (cpts.has(pending.channelId)) { + if (!pending.channelId) { + localPts = this.pts! + } else if (cpts.has(pending.channelId)) { localPts = cpts.get(pending.channelId)! } else if (this.catchingUp) { // only load stored channel pts in case @@ -1692,8 +1703,9 @@ export class UpdatesManager { let localPts - if (!pending.channelId) localPts = this.pts! - else if (cpts.has(pending.channelId)) { + if (!pending.channelId) { + localPts = this.pts! + } else if (cpts.has(pending.channelId)) { localPts = cpts.get(pending.channelId) } diff --git a/packages/core/src/highlevel/updates/parsed.ts b/packages/core/src/highlevel/updates/parsed.ts index 76bcbaa3..3f3a0ca1 100644 --- a/packages/core/src/highlevel/updates/parsed.ts +++ b/packages/core/src/highlevel/updates/parsed.ts @@ -1,7 +1,8 @@ -import { Message } from '../types/messages/index.js' -import { BusinessMessage, ParsedUpdate } from '../types/updates/index.js' +import type { Message } from '../types/messages/index.js' +import type { BusinessMessage, ParsedUpdate } from '../types/updates/index.js' import { _parseUpdate } from '../types/updates/parse-update.js' -import { RawUpdateHandler } from './types.js' + +import type { RawUpdateHandler } from './types.js' export interface ParsedUpdateHandlerParams { /** diff --git a/packages/core/src/highlevel/updates/types.ts b/packages/core/src/highlevel/updates/types.ts index 616278f4..c825c8c2 100644 --- a/packages/core/src/highlevel/updates/types.ts +++ b/packages/core/src/highlevel/updates/types.ts @@ -1,8 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { AsyncLock, ConditionVariable, Deque, EarlyTimer, Logger, SortedLinkedList } from '../../utils/index.js' -import { CurrentUserInfo } from '../storage/service/current-user.js' -import { PeersIndex } from '../types/peers/peers-index.js' +import type { AsyncLock, ConditionVariable, Deque, EarlyTimer, Logger, SortedLinkedList } from '../../utils/index.js' +import type { CurrentUserInfo } from '../storage/service/current-user.js' +import type { PeersIndex } from '../types/peers/peers-index.js' /** * Function to be called for each update. diff --git a/packages/core/src/highlevel/updates/utils.ts b/packages/core/src/highlevel/updates/utils.ts index 117317c9..78a20343 100644 --- a/packages/core/src/highlevel/updates/utils.ts +++ b/packages/core/src/highlevel/updates/utils.ts @@ -1,7 +1,8 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtTypeAssertionError } from '../../types/errors.js' -import { PeersIndex } from '../types/peers/peers-index.js' +import type { PeersIndex } from '../types/peers/peers-index.js' + import type { PendingUpdate } from './types.js' export function messageToUpdate(message: tl.TypeMessage): tl.TypeUpdate { @@ -31,11 +32,11 @@ export function extractChannelIdFromUpdate(upd: tl.TypeUpdate): number | undefin if ('channelId' in upd) { res = upd.channelId } else if ( - 'message' in upd && - typeof upd.message !== 'string' && - 'peerId' in upd.message && - upd.message.peerId && - 'channelId' in upd.message.peerId + 'message' in upd + && typeof upd.message !== 'string' + && 'peerId' in upd.message + && upd.message.peerId + && 'channelId' in upd.message.peerId ) { res = upd.message.peerId.channelId } @@ -48,7 +49,7 @@ export function extractChannelIdFromUpdate(upd: tl.TypeUpdate): number | undefin export function toPendingUpdate(upd: tl.TypeUpdate, peers: PeersIndex, fromDifference = false): PendingUpdate { const channelId = extractChannelIdFromUpdate(upd) || 0 const pts = 'pts' in upd ? upd.pts : undefined - // eslint-disable-next-line no-nested-ternary + const ptsCount = 'ptsCount' in upd ? upd.ptsCount : pts ? 0 : undefined const qts = 'qts' in upd ? upd.qts : undefined diff --git a/packages/core/src/highlevel/utils/convert-file-id.ts b/packages/core/src/highlevel/utils/convert-file-id.ts index dce6c7e6..6b739f48 100644 --- a/packages/core/src/highlevel/utils/convert-file-id.ts +++ b/packages/core/src/highlevel/utils/convert-file-id.ts @@ -1,14 +1,13 @@ import Long from 'long' - import { parseFileId, tdFileId as td } from '@mtcute/file-id' -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { parseMarkedPeerId } from '../../utils/peer-utils.js' - -import FileType = td.FileType import { getPlatform } from '../../platform.js' import { assertNever } from '../../types/utils.js' +import FileType = td.FileType + const EMPTY_BUFFER = new Uint8Array(0) type FileId = td.RawFullRemoteFileLocation @@ -104,9 +103,9 @@ export function fileIdToInputFileLocation(fileId: string | FileId): tl.TypeInput return { _: - loc.source.fileType === FileType.Photo ? - 'inputPhotoFileLocation' : - 'inputDocumentFileLocation', + loc.source.fileType === FileType.Photo + ? 'inputPhotoFileLocation' + : 'inputDocumentFileLocation', fileReference: fileId.fileReference, id: loc.id, accessHash: loc.accessHash, @@ -223,10 +222,10 @@ export function fileIdToInputDocument(fileId: string | FileId): tl.RawInputDocum if (typeof fileId === 'string') fileId = parseFileId(getPlatform(), fileId) if ( - fileId.location._ !== 'common' || - fileId.type === FileType.Secure || - fileId.type === FileType.SecureRaw || - fileId.type === FileType.Encrypted + fileId.location._ !== 'common' + || fileId.type === FileType.Secure + || fileId.type === FileType.SecureRaw + || fileId.type === FileType.Encrypted ) { throw new td.ConversionError('inputDocument') } diff --git a/packages/core/src/highlevel/utils/entities.test.ts b/packages/core/src/highlevel/utils/entities.test.ts index 9ac4f245..c5c5d608 100644 --- a/packages/core/src/highlevel/utils/entities.test.ts +++ b/packages/core/src/highlevel/utils/entities.test.ts @@ -1,10 +1,9 @@ import { describe, expect, it } from 'vitest' - -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { joinTextWithEntities } from './entities.js' -const createEntity = (offset: number, length: number): tl.TypeMessageEntity => { +function createEntity(offset: number, length: number): tl.TypeMessageEntity { return { _: 'messageEntityBold', offset, diff --git a/packages/core/src/highlevel/utils/entities.ts b/packages/core/src/highlevel/utils/entities.ts index 9325b46f..3eb5f9dd 100644 --- a/packages/core/src/highlevel/utils/entities.ts +++ b/packages/core/src/highlevel/utils/entities.ts @@ -1,6 +1,6 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { TextWithEntities } from '../types/misc/entities.js' +import type { TextWithEntities } from '../types/misc/entities.js' /** * Join multiple text parts with entities into a single text with entities, diff --git a/packages/core/src/highlevel/utils/file-type.test.ts b/packages/core/src/highlevel/utils/file-type.test.ts index a30e4dfc..f0500760 100644 --- a/packages/core/src/highlevel/utils/file-type.test.ts +++ b/packages/core/src/highlevel/utils/file-type.test.ts @@ -1,7 +1,8 @@ import { describe, expect, it } from 'vitest' import { getPlatform } from '../../platform.js' -import { guessFileMime, MIME_TO_EXTENSION } from './file-type.js' + +import { MIME_TO_EXTENSION, guessFileMime } from './file-type.js' const p = getPlatform() diff --git a/packages/core/src/highlevel/utils/file-type.ts b/packages/core/src/highlevel/utils/file-type.ts index 551871aa..299f4e97 100644 --- a/packages/core/src/highlevel/utils/file-type.ts +++ b/packages/core/src/highlevel/utils/file-type.ts @@ -4,39 +4,39 @@ export function guessFileMime(chunk: Uint8Array): string | null { // 2-byte magic numbers const b0 = chunk[0] const b1 = chunk[1] - if (b0 === 0x42 && b1 === 0x4d) return 'image/bmp' - if (b0 === 0x4d && b1 === 0x5a) return 'application/x-msdownload' - if (b0 === 0x1f && (b1 === 0x9d || b1 === 0xa0)) return 'application/x-compress' - if (b0 === 0x1f && b1 === 0x8b) return 'application/gzip' + if (b0 === 0x42 && b1 === 0x4D) return 'image/bmp' + if (b0 === 0x4D && b1 === 0x5A) return 'application/x-msdownload' + if (b0 === 0x1F && (b1 === 0x9D || b1 === 0xA0)) return 'application/x-compress' + if (b0 === 0x1F && b1 === 0x8B) return 'application/gzip' // 3-byte magic numbers const b2 = chunk[2] - if (b0 === 0x42 && b1 === 0x5a && b2 === 0x68) return 'application/x-bzip2' + if (b0 === 0x42 && b1 === 0x5A && b2 === 0x68) return 'application/x-bzip2' if (b0 === 0x49 && b1 === 0x44 && b2 === 0x33) return 'audio/mpeg' // ID3v2 - if (b0 === 0xff && (b1 === 0xfb || b1 === 0xf3 || b1 === 0xf2)) return 'audio/mpeg' + if (b0 === 0xFF && (b1 === 0xFB || b1 === 0xF3 || b1 === 0xF2)) return 'audio/mpeg' // 4-byte magic numbers const b3 = chunk[3] - if (b0 === 0x50 && b1 === 0x4b && b2 === 0x03 && b3 === 0x04) return 'application/zip' + if (b0 === 0x50 && b1 === 0x4B && b2 === 0x03 && b3 === 0x04) return 'application/zip' if (b0 === 0x38 && b1 === 0x42 && b2 === 0x50 && b3 === 0x53) return 'image/vnd.adobe.photoshop' - if (b0 === 0x7f && b1 === 0x45 && b2 === 0x4c && b3 === 0x46) return 'application/x-elf' - if (b0 === 0xfe && b1 === 0xed && b2 === 0xfa && b3 === 0xcf) return 'application/x-mach-binary' - if (b0 === 0x28 && b1 === 0xb5 && b2 === 0x2f && b3 === 0xfd) return 'application/zstd' - if (b0 === 0x66 && b1 === 0x4c && b2 === 0x61 && b3 === 0x43) return 'audio/x-flac' + if (b0 === 0x7F && b1 === 0x45 && b2 === 0x4C && b3 === 0x46) return 'application/x-elf' + if (b0 === 0xFE && b1 === 0xED && b2 === 0xFA && b3 === 0xCF) return 'application/x-mach-binary' + if (b0 === 0x28 && b1 === 0xB5 && b2 === 0x2F && b3 === 0xFD) return 'application/zstd' + if (b0 === 0x66 && b1 === 0x4C && b2 === 0x61 && b3 === 0x43) return 'audio/x-flac' - if (b0 === 0xff && b1 === 0xd8 && b2 === 0xff && (b3 === 0xdb || b3 === 0xe0 || b3 === 0xee || b3 === 0xe1)) { + if (b0 === 0xFF && b1 === 0xD8 && b2 === 0xFF && (b3 === 0xDB || b3 === 0xE0 || b3 === 0xEE || b3 === 0xE1)) { return 'image/jpeg' } // OggS - if (b0 === 0x4f && b1 === 0x67 && b2 === 0x67 && b3 === 0x53) { + if (b0 === 0x4F && b1 === 0x67 && b2 === 0x67 && b3 === 0x53) { // 28-36 bytes: type if (chunk.length > 36) { const type = String.fromCharCode(...chunk.subarray(28, 36)) if (type === 'OpusHead') return 'audio/ogg' // not audio/opus because Telegram is dumb if (type.startsWith('\x80theora')) return 'video/ogg' if (type.startsWith('\x01video')) return 'video/ogg' - if (type.startsWith('\x7fFLAC')) return 'audio/ogg' + if (type.startsWith('\x7FFLAC')) return 'audio/ogg' if (type.startsWith('Speex ')) return 'audio/ogg' if (type.startsWith('\x01vorbis')) return 'audio/ogg' } @@ -46,7 +46,7 @@ export function guessFileMime(chunk: Uint8Array): string | null { // 5-byte magic numbers const b4 = chunk[4] - if (b0 === 0x25 && b1 === 0x50 && b2 === 0x44 && b3 === 0x46 && b4 === 0x2d) return 'application/pdf' + if (b0 === 0x25 && b1 === 0x50 && b2 === 0x44 && b3 === 0x46 && b4 === 0x2D) return 'application/pdf' // 6-byte magic numbers const b5 = chunk[5] @@ -54,7 +54,7 @@ export function guessFileMime(chunk: Uint8Array): string | null { if (b0 === 0x47 && b1 === 0x49 && b2 === 0x46 && b3 === 0x38) { if ((b4 === 0x37 || b4 === 0x39) && b5 === 0x61) return 'image/gif' } - if (b0 === 0x37 && b1 === 0x7a && b2 === 0xbc && b3 === 0xaf && b4 === 0x27 && b5 === 0x1c) { + if (b0 === 0x37 && b1 === 0x7A && b2 === 0xBC && b3 === 0xAF && b4 === 0x27 && b5 === 0x1C) { return 'application/x-7z-compressed' } @@ -63,19 +63,19 @@ export function guessFileMime(chunk: Uint8Array): string | null { const b7 = chunk[7] if ( - b0 === 0x89 && - b1 === 0x50 && - b2 === 0x4e && - b3 === 0x47 && - b4 === 0x0d && - b5 === 0x0a && - b6 === 0x1a && - b7 === 0x0a + b0 === 0x89 + && b1 === 0x50 + && b2 === 0x4E + && b3 === 0x47 + && b4 === 0x0D + && b5 === 0x0A + && b6 === 0x1A + && b7 === 0x0A ) { return 'image/png' } - if (b0 === 0x52 && b1 === 0x61 && b2 === 0x72 && b3 === 0x21 && b4 === 0x1a && b5 === 0x07) { + if (b0 === 0x52 && b1 === 0x61 && b2 === 0x72 && b3 === 0x21 && b4 === 0x1A && b5 === 0x07) { if (b6 === 0x00 || b6 === 0x01) return 'application/x-rar-compressed' } diff --git a/packages/core/src/highlevel/utils/file-utils.test.ts b/packages/core/src/highlevel/utils/file-utils.test.ts index 8f36b2bb..fd5e6aa5 100644 --- a/packages/core/src/highlevel/utils/file-utils.test.ts +++ b/packages/core/src/highlevel/utils/file-utils.test.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from 'vitest' import { getPlatform } from '../../platform.js' + import { extractFileName, inflateSvgPath, @@ -13,22 +14,20 @@ const p = getPlatform() describe('isProbablyPlainText', () => { it('should return true for buffers only containing printable ascii', () => { - expect(isProbablyPlainText(p.utf8Encode('hello this is some ascii text'))).to.be.true - expect(isProbablyPlainText(p.utf8Encode('hello this is some ascii text\nwith unix new lines'))).to.be.true - expect(isProbablyPlainText(p.utf8Encode('hello this is some ascii text\r\nwith windows new lines'))).to.be.true - expect(isProbablyPlainText(p.utf8Encode('hello this is some ascii text\n\twith unix new lines and tabs'))).to.be - .true - expect(isProbablyPlainText(p.utf8Encode('hello this is some ascii text\r\n\twith windows new lines and tabs'))) - .to.be.true + expect(isProbablyPlainText(p.utf8Encode('hello this is some ascii text'))).toEqual(true) + expect(isProbablyPlainText(p.utf8Encode('hello this is some ascii text\nwith unix new lines'))).toEqual(true) + expect(isProbablyPlainText(p.utf8Encode('hello this is some ascii text\r\nwith windows new lines'))).toEqual(true) + expect(isProbablyPlainText(p.utf8Encode('hello this is some ascii text\n\twith unix new lines and tabs'))).toEqual(true) + expect(isProbablyPlainText(p.utf8Encode('hello this is some ascii text\r\n\twith windows new lines and tabs'))).toEqual(true) }) it('should return false for buffers containing some binary data', () => { - expect(isProbablyPlainText(p.utf8Encode('hello this is cedilla: ç'))).to.be.false - expect(isProbablyPlainText(p.utf8Encode('hello this is some ascii text with emojis 🌸'))).to.be.false + expect(isProbablyPlainText(p.utf8Encode('hello this is cedilla: ç'))).toEqual(false) + expect(isProbablyPlainText(p.utf8Encode('hello this is some ascii text with emojis 🌸'))).toEqual(false) // random strings of 16 bytes - expect(isProbablyPlainText(p.hexDecode('717f80f08eb9d88c3931712c0e2be32f'))).to.be.false - expect(isProbablyPlainText(p.hexDecode('20e8e218e54254c813b261432b0330d7'))).to.be.false + expect(isProbablyPlainText(p.hexDecode('717f80f08eb9d88c3931712c0e2be32f'))).toEqual(false) + expect(isProbablyPlainText(p.hexDecode('20e8e218e54254c813b261432b0330d7'))).toEqual(false) }) }) @@ -58,22 +57,22 @@ describe('svgPathToFile', () => { describe('inflateSvgPath', () => { const data = p.hexDecode( - '1a05b302dc5f4446068649064247424a6a4c704550535b5e665e5e4c044a024c' + - '074e06414d80588863935fad74be4704854684518b528581904695498b488b56' + - '965c85438d8191818543894a8f4d834188818a4284498454895d9a6f86074708' + - '8d0146089283a281b48bbfa386078a04880390098490949997ab828a4b984a9d' + - '8490b395aa9949845c485d4a42434b4a4a46848a8792859d4186468c48938182' + - '91a293ac859781af848701818989928b9c849086a785b880816c8071817c814c' + - '0080520081', + '1a05b302dc5f4446068649064247424a6a4c704550535b5e665e5e4c044a024c' + + '074e06414d80588863935fad74be4704854684518b528581904695498b488b56' + + '965c85438d8191818543894a8f4d834188818a4284498454895d9a6f86074708' + + '8d0146089283a281b48bbfa386078a04880390098490949997ab828a4b984a9d' + + '8490b395aa9949845c485d4a42434b4a4a46848a8792859d4186468c48938182' + + '91a293ac859781af848701818989928b9c849086a785b880816c8071817c814c' + + '0080520081', ) - const path = - 'M265,512c-31-4-66,6-96-2-7-2-10-42-12-48-5-16-19-27-30' + - '-38-30-30-124-102-127-146-1-13,0-24,8-35,19-31,45-52,62-74,5-6,4-17,11-18,' + - '5,1,16-6,21-9,11-8,11-22,22-28,5-3,13,1,17,1,5-3,9-10,15-13,3-1,8,1,10-2,4' + - '-9,4-20,9-29,26-47,67-78,131-68,18,3,34,1,52,11,63,35,67,104,83,169,4,16,20,' + - '25,23,43,2,10-11,24-10,29,4,16,51,21,42,25-9,4-28-8-29-10-2-3-11-10-10-6,4,10,' + - '7,18,5,29-1,6-6,12-8,19,1,2,17,34,19,44,5,23,1,47,4,71,1,9,9,18,11,28,4,16,6,39,' + - '5,56,0,1-44,0-49,1-60,1-120,0-180,1z' + const path + = 'M265,512c-31-4-66,6-96-2-7-2-10-42-12-48-5-16-19-27-30' + + '-38-30-30-124-102-127-146-1-13,0-24,8-35,19-31,45-52,62-74,5-6,4-17,11-18,' + + '5,1,16-6,21-9,11-8,11-22,22-28,5-3,13,1,17,1,5-3,9-10,15-13,3-1,8,1,10-2,4' + + '-9,4-20,9-29,26-47,67-78,131-68,18,3,34,1,52,11,63,35,67,104,83,169,4,16,20,' + + '25,23,43,2,10-11,24-10,29,4,16,51,21,42,25-9,4-28-8-29-10-2-3-11-10-10-6,4,10,' + + '7,18,5,29-1,6-6,12-8,19,1,2,17,34,19,44,5,23,1,47,4,71,1,9,9,18,11,28,4,16,6,39,' + + '5,56,0,1-44,0-49,1-60,1-120,0-180,1z' it('should correctly inflate svg path', () => { expect(inflateSvgPath(data)).toEqual(path) @@ -85,71 +84,71 @@ describe('strippedPhotoToJpg', () => { const dataPfp = p.hexDecode('010808b1f2f95fed673451457033ad1f') // photoStrippedSize of a random image const dataPicture = p.hexDecode( - '012728b532aacce4b302d8c1099c74a634718675cb6381f73d3ffd557667d9b5' + - '816f4c28ce69aa58a863238cf62a334590f999042234cbe1986d03eefe14c68e' + - '32847cc00ce709ea7ffad577773f78fe54d6c927f78c3db14ac1ccca91a2ef4f' + - '9d89dd9e53e9455c456072646618e840a28b20bb223275e463b55769b07e4cf1' + - 'c52cedfbb03d38aab9e718356909b2733c839cf5a72dc3646ee6a4bb882c2ac0' + - '70a31c554c1d81f0403eb4d598b5350b8680b03c628aab09ff0044707b1a2a5a' + - '012e016420753cd25b491ac603a723bd14517ba28b46788c5e613f27d2a9cb32' + - 'ceca2353807bd14525b831e6175deccde991eb45145508', + '012728b532aacce4b302d8c1099c74a634718675cb6381f73d3ffd557667d9b5' + + '816f4c28ce69aa58a863238cf62a334590f999042234cbe1986d03eefe14c68e' + + '32847cc00ce709ea7ffad577773f78fe54d6c927f78c3db14ac1ccca91a2ef4f' + + '9d89dd9e53e9455c456072646618e840a28b20bb223275e463b55769b07e4cf1' + + 'c52cedfbb03d38aab9e718356909b2733c839cf5a72dc3646ee6a4bb882c2ac0' + + '70a31c554c1d81f0403eb4d598b5350b8680b03c628aab09ff0044707b1a2a5a' + + '012e016420753cd25b491ac603a723bd14517ba28b46788c5e613f27d2a9cb32' + + 'ceca2353807bd14525b831e6175deccde991eb45145508', ) it('should inflate stripped jpeg (from profile picture)', () => { expect(p.hexEncode(strippedPhotoToJpg(dataPfp))).toMatchInlineSnapshot( - '"ffd8ffe000104a46494600010100000100010000ffdb004300281c1e231e192' + - '82321232d2b28303c64413c37373c7b585d4964918099968f808c8aa0b4e6c3a' + - '0aadaad8a8cc8ffcbdaeef5ffffff9bc1fffffffaffe6fdfff8ffdb0043012b2' + - 'd2d3c353c76414176f8a58ca5f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f' + - '8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8ffc' + - '00011080008000803012200021101031101ffc4001f000001050101010101010' + - '0000000000000000102030405060708090a0bffc400b51000020103030204030' + - '50504040000017d01020300041105122131410613516107227114328191a1082' + - '342b1c11552d1f02433627282090a161718191a25262728292a3435363738393' + - 'a434445464748494a535455565758595a636465666768696a737475767778797' + - 'a838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b' + - '7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae1e2e3e4e5e6e7e8e9eaf' + - '1f2f3f4f5f6f7f8f9faffc4001f0100030101010101010101010000000000000' + - '102030405060708090a0bffc400b511000201020404030407050404000102770' + - '00102031104052131061241510761711322328108144291a1b1c109233352f01' + - '56272d10a162434e125f11718191a262728292a35363738393a4344454647484' + - '94a535455565758595a636465666768696a737475767778797a8283848586878' + - '8898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c' + - '4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae2e3e4e5e6e7e8e9eaf2f3f4f5f6f7f8f' + - '9faffda000c03010002110311003f00b1f2f95fed673451457033ad1fffd9"', + '"ffd8ffe000104a46494600010100000100010000ffdb004300281c1e231e192' + + '82321232d2b28303c64413c37373c7b585d4964918099968f808c8aa0b4e6c3a' + + '0aadaad8a8cc8ffcbdaeef5ffffff9bc1fffffffaffe6fdfff8ffdb0043012b2' + + 'd2d3c353c76414176f8a58ca5f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f' + + '8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8ffc' + + '00011080008000803012200021101031101ffc4001f000001050101010101010' + + '0000000000000000102030405060708090a0bffc400b51000020103030204030' + + '50504040000017d01020300041105122131410613516107227114328191a1082' + + '342b1c11552d1f02433627282090a161718191a25262728292a3435363738393' + + 'a434445464748494a535455565758595a636465666768696a737475767778797' + + 'a838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b' + + '7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae1e2e3e4e5e6e7e8e9eaf' + + '1f2f3f4f5f6f7f8f9faffc4001f0100030101010101010101010000000000000' + + '102030405060708090a0bffc400b511000201020404030407050404000102770' + + '00102031104052131061241510761711322328108144291a1b1c109233352f01' + + '56272d10a162434e125f11718191a262728292a35363738393a4344454647484' + + '94a535455565758595a636465666768696a737475767778797a8283848586878' + + '8898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c' + + '4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae2e3e4e5e6e7e8e9eaf2f3f4f5f6f7f8f' + + '9faffda000c03010002110311003f00b1f2f95fed673451457033ad1fffd9"', ) }) it('should inflate stripped jpeg (from a picture)', () => { expect(p.hexEncode(strippedPhotoToJpg(dataPicture))).toMatchInlineSnapshot( - '"ffd8ffe000104a46494600010100000100010000ffdb004300281c1e231e192' + - '82321232d2b28303c64413c37373c7b585d4964918099968f808c8aa0b4e6c3a' + - '0aadaad8a8cc8ffcbdaeef5ffffff9bc1fffffffaffe6fdfff8ffdb0043012b2' + - 'd2d3c353c76414176f8a58ca5f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f' + - '8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8ffc' + - '00011080027002803012200021101031101ffc4001f000001050101010101010' + - '0000000000000000102030405060708090a0bffc400b51000020103030204030' + - '50504040000017d01020300041105122131410613516107227114328191a1082' + - '342b1c11552d1f02433627282090a161718191a25262728292a3435363738393' + - 'a434445464748494a535455565758595a636465666768696a737475767778797' + - 'a838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b' + - '7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae1e2e3e4e5e6e7e8e9eaf' + - '1f2f3f4f5f6f7f8f9faffc4001f0100030101010101010101010000000000000' + - '102030405060708090a0bffc400b511000201020404030407050404000102770' + - '00102031104052131061241510761711322328108144291a1b1c109233352f01' + - '56272d10a162434e125f11718191a262728292a35363738393a4344454647484' + - '94a535455565758595a636465666768696a737475767778797a8283848586878' + - '8898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c' + - '4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae2e3e4e5e6e7e8e9eaf2f3f4f5f6f7f8f' + - '9faffda000c03010002110311003f00b532aacce4b302d8c1099c74a63471867' + - '5cb6381f73d3ffd557667d9b5816f4c28ce69aa58a863238cf62a334590f9990' + - '42234cbe1986d03eefe14c68e32847cc00ce709ea7ffad577773f78fe54d6c92' + - '7f78c3db14ac1ccca91a2ef4f9d89dd9e53e9455c456072646618e840a28b20b' + - 'b223275e463b55769b07e4cf1c52cedfbb03d38aab9e718356909b2733c839cf' + - '5a72dc3646ee6a4bb882c2ac070a31c554c1d81f0403eb4d598b5350b8680b03' + - 'c628aab09ff0044707b1a2a5a012e016420753cd25b491ac603a723bd14517ba' + - '28b46788c5e613f27d2a9cb32ceca2353807bd14525b831e6175deccde991eb4' + - '5145508ffd9"', + '"ffd8ffe000104a46494600010100000100010000ffdb004300281c1e231e192' + + '82321232d2b28303c64413c37373c7b585d4964918099968f808c8aa0b4e6c3a' + + '0aadaad8a8cc8ffcbdaeef5ffffff9bc1fffffffaffe6fdfff8ffdb0043012b2' + + 'd2d3c353c76414176f8a58ca5f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f' + + '8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8ffc' + + '00011080027002803012200021101031101ffc4001f000001050101010101010' + + '0000000000000000102030405060708090a0bffc400b51000020103030204030' + + '50504040000017d01020300041105122131410613516107227114328191a1082' + + '342b1c11552d1f02433627282090a161718191a25262728292a3435363738393' + + 'a434445464748494a535455565758595a636465666768696a737475767778797' + + 'a838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b' + + '7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae1e2e3e4e5e6e7e8e9eaf' + + '1f2f3f4f5f6f7f8f9faffc4001f0100030101010101010101010000000000000' + + '102030405060708090a0bffc400b511000201020404030407050404000102770' + + '00102031104052131061241510761711322328108144291a1b1c109233352f01' + + '56272d10a162434e125f11718191a262728292a35363738393a4344454647484' + + '94a535455565758595a636465666768696a737475767778797a8283848586878' + + '8898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c' + + '4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae2e3e4e5e6e7e8e9eaf2f3f4f5f6f7f8f' + + '9faffda000c03010002110311003f00b532aacce4b302d8c1099c74a63471867' + + '5cb6381f73d3ffd557667d9b5816f4c28ce69aa58a863238cf62a334590f9990' + + '42234cbe1986d03eefe14c68e32847cc00ce709ea7ffad577773f78fe54d6c92' + + '7f78c3db14ac1ccca91a2ef4f9d89dd9e53e9455c456072646618e840a28b20b' + + 'b223275e463b55769b07e4cf1c52cedfbb03d38aab9e718356909b2733c839cf' + + '5a72dc3646ee6a4bb882c2ac070a31c554c1d81f0403eb4d598b5350b8680b03' + + 'c628aab09ff0044707b1a2a5a012e016420753cd25b491ac603a723bd14517ba' + + '28b46788c5e613f27d2a9cb32ceca2353807bd14525b831e6175deccde991eb4' + + '5145508ffd9"', ) }) }) diff --git a/packages/core/src/highlevel/utils/file-utils.ts b/packages/core/src/highlevel/utils/file-utils.ts index 897febf9..fadd6d70 100644 --- a/packages/core/src/highlevel/utils/file-utils.ts +++ b/packages/core/src/highlevel/utils/file-utils.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { getPlatform } from '../../platform.js' import { MtArgumentError } from '../../types/errors.js' @@ -21,43 +21,44 @@ export function determinePartSize(fileSize: number): number { */ export function isProbablyPlainText(buf: Uint8Array): boolean { return !buf.some( - (it) => + it => !( ( - (it >= 0x20 && it < 0x7f) || // printable ascii range - it === 0x0d || // CR - it === 0x0a || // LF - it === 0x09 + (it >= 0x20 && it < 0x7F) // printable ascii range + || it === 0x0D // CR + || it === 0x0A // LF + || it === 0x09 ) // Tab ), ) } // from https://github.com/telegramdesktop/tdesktop/blob/bec39d89e19670eb436dc794a8f20b657cb87c71/Telegram/SourceFiles/ui/image/image.cpp#L225 -const JPEG_HEADER = () => - getPlatform().hexDecode( - 'ffd8ffe000104a46494600010100000100010000ffdb004300281c1e231e1928' + - '2321232d2b28303c64413c37373c7b585d4964918099968f808c8aa0b4e6c3a0aad' + - 'aad8a8cc8ffcbdaeef5ffffff9bc1fffffffaffe6fdfff8ffdb0043012b2d2d3c35' + - '3c76414176f8a58ca5f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f' + - '8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8ffc0001108000000' + - '0003012200021101031101ffc4001f0000010501010101010100000000000000000' + - '102030405060708090a0bffc400b5100002010303020403050504040000017d0102' + - '0300041105122131410613516107227114328191a1082342b1c11552d1f02433627' + - '282090a161718191a25262728292a3435363738393a434445464748494a53545556' + - '5758595a636465666768696a737475767778797a838485868788898a92939495969' + - '798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c4c5c6c7c8c9cad2d3d4' + - 'd5d6d7d8d9dae1e2e3e4e5e6e7e8e9eaf1f2f3f4f5f6f7f8f9faffc4001f0100030' + - '101010101010101010000000000000102030405060708090a0bffc400b511000201' + - '0204040304070504040001027700010203110405213106124151076171132232810' + - '8144291a1b1c109233352f0156272d10a162434e125f11718191a262728292a3536' + - '3738393a434445464748494a535455565758595a636465666768696a73747576777' + - '8797a82838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5' + - 'b6b7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae2e3e4e5e6e7e8e9eaf2f' + - '3f4f5f6f7f8f9faffda000c03010002110311003f00', +function JPEG_HEADER() { + return getPlatform().hexDecode( + 'ffd8ffe000104a46494600010100000100010000ffdb004300281c1e231e1928' + + '2321232d2b28303c64413c37373c7b585d4964918099968f808c8aa0b4e6c3a0aad' + + 'aad8a8cc8ffcbdaeef5ffffff9bc1fffffffaffe6fdfff8ffdb0043012b2d2d3c35' + + '3c76414176f8a58ca5f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f' + + '8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8f8ffc0001108000000' + + '0003012200021101031101ffc4001f0000010501010101010100000000000000000' + + '102030405060708090a0bffc400b5100002010303020403050504040000017d0102' + + '0300041105122131410613516107227114328191a1082342b1c11552d1f02433627' + + '282090a161718191a25262728292a3435363738393a434445464748494a53545556' + + '5758595a636465666768696a737475767778797a838485868788898a92939495969' + + '798999aa2a3a4a5a6a7a8a9aab2b3b4b5b6b7b8b9bac2c3c4c5c6c7c8c9cad2d3d4' + + 'd5d6d7d8d9dae1e2e3e4e5e6e7e8e9eaf1f2f3f4f5f6f7f8f9faffc4001f0100030' + + '101010101010101010000000000000102030405060708090a0bffc400b511000201' + + '0204040304070504040001027700010203110405213106124151076171132232810' + + '8144291a1b1c109233352f0156272d10a162434e125f11718191a262728292a3536' + + '3738393a434445464748494a535455565758595a636465666768696a73747576777' + + '8797a82838485868788898a92939495969798999aa2a3a4a5a6a7a8a9aab2b3b4b5' + + 'b6b7b8b9bac2c3c4c5c6c7c8c9cad2d3d4d5d6d7d8d9dae2e3e4e5e6e7e8e9eaf2f' + + '3f4f5f6f7f8f9faffda000c03010002110311003f00', ) +} let JPEG_HEADER_BYTES: Uint8Array | null = null -const JPEG_FOOTER = new Uint8Array([0xff, 0xd9]) +const JPEG_FOOTER = new Uint8Array([0xFF, 0xD9]) /** * Convert stripped JPEG (from `photoStrippedSize`) to full JPEG @@ -117,13 +118,13 @@ export function inflateSvgPath(encoded: Uint8Array): string { */ export function svgPathToFile(path: string, size?: tl.RawDocumentAttributeImageSize): Uint8Array { return getPlatform().utf8Encode( - '' + - '` + - '' + - '', + '' + + '` + + `` + + '', ) } diff --git a/packages/core/src/highlevel/utils/inline-utils.test.ts b/packages/core/src/highlevel/utils/inline-utils.test.ts index c628e7c3..e43f4297 100644 --- a/packages/core/src/highlevel/utils/inline-utils.test.ts +++ b/packages/core/src/highlevel/utils/inline-utils.test.ts @@ -1,7 +1,6 @@ import Long from 'long' import { describe, expect, it } from 'vitest' - -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { encodeInlineMessageId, normalizeInlineId, parseInlineMessageId } from './inline-utils.js' diff --git a/packages/core/src/highlevel/utils/inline-utils.ts b/packages/core/src/highlevel/utils/inline-utils.ts index f520ba92..fb57f448 100644 --- a/packages/core/src/highlevel/utils/inline-utils.ts +++ b/packages/core/src/highlevel/utils/inline-utils.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { TlBinaryReader, TlBinaryWriter } from '@mtcute/tl-runtime' import { getPlatform } from '../../platform.js' @@ -60,7 +60,7 @@ export function encodeInlineMessageId(id: tl.TypeInputBotInlineMessageID): strin return getPlatform().base64Encode(writer.result(), true) } -export function normalizeInlineId(id: string | tl.TypeInputBotInlineMessageID) { +export function normalizeInlineId(id: string | tl.TypeInputBotInlineMessageID): tl.TypeInputBotInlineMessageID { if (typeof id === 'string') { return parseInlineMessageId(id) } diff --git a/packages/core/src/highlevel/utils/inspectable.test.ts b/packages/core/src/highlevel/utils/inspectable.test.ts index bf3fa70b..422dabda 100644 --- a/packages/core/src/highlevel/utils/inspectable.test.ts +++ b/packages/core/src/highlevel/utils/inspectable.test.ts @@ -11,6 +11,7 @@ describe('makeInspectable', () => { get foo() { return 1 } + get bar() { return 2 } @@ -44,6 +45,7 @@ describe('makeInspectable', () => { get foo() { return 1 } + bar = 2 } @@ -68,6 +70,7 @@ describe('makeInspectable', () => { get foo() { return 1 } + get bar() { return 2 } @@ -83,6 +86,7 @@ describe('makeInspectable', () => { get foo() { return 1 } + get bar() { throw new Error('whatever') } diff --git a/packages/core/src/highlevel/utils/inspectable.ts b/packages/core/src/highlevel/utils/inspectable.ts index 787f2f6f..91fcbc6d 100644 --- a/packages/core/src/highlevel/utils/inspectable.ts +++ b/packages/core/src/highlevel/utils/inspectable.ts @@ -1,5 +1,5 @@ -/* eslint-disable @typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-assignment */ -/* eslint-disable @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-argument */ +/* eslint-disable ts/no-unsafe-assignment */ +/* eslint-disable ts/no-unsafe-call,ts/no-unsafe-argument */ import Long from 'long' @@ -15,9 +15,9 @@ function getAllGettersNames(obj: T): (keyof T)[] { do { Object.getOwnPropertyNames(obj).forEach((prop) => { if ( - prop !== '__proto__' && - Object.getOwnPropertyDescriptor(obj, prop)?.get && - !getters.includes(prop as any) + prop !== '__proto__' + && Object.getOwnPropertyDescriptor(obj, prop)?.get + && !getters.includes(prop as any) ) { getters.push(prop as any) } @@ -40,14 +40,14 @@ export function makeInspectable( props?: (keyof T)[], hide?: (keyof T)[], ): typeof obj { - const getters: (keyof T)[] = props ? props : [] + const getters: (keyof T)[] = props || [] for (const key of getAllGettersNames(obj.prototype)) { if (!hide || !hide.includes(key)) getters.push(key) } // dirty hack to set name for inspect result - // eslint-disable-next-line @typescript-eslint/no-implied-eval + // eslint-disable-next-line ts/no-implied-eval, no-new-func const proto = new Function(`return function ${obj.name}(){}`)().prototype obj.prototype.toJSON = function () { @@ -67,11 +67,11 @@ export function makeInspectable( } ret[it] = val } catch (e: any) { - ret[it] = 'Error: ' + e.message + ret[it] = `Error: ${e.message}` } }) - // eslint-disable-next-line @typescript-eslint/no-unsafe-return + // eslint-disable-next-line ts/no-unsafe-return return ret } obj.prototype[customInspectSymbol] = obj.prototype.toJSON diff --git a/packages/core/src/highlevel/utils/memoize.ts b/packages/core/src/highlevel/utils/memoize.ts index 5687ec90..09860ad5 100644 --- a/packages/core/src/highlevel/utils/memoize.ts +++ b/packages/core/src/highlevel/utils/memoize.ts @@ -1,6 +1,5 @@ -/* eslint-disable @typescript-eslint/no-unsafe-return,@typescript-eslint/no-unsafe-assignment */ +/* eslint-disable ts/no-unsafe-return,ts/no-unsafe-assignment */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any export function memoizeGetters(cls: new (...args: any[]) => T, fields: (keyof T)[]): typeof cls { for (const field of fields) { const desc = Object.getOwnPropertyDescriptor(cls.prototype, field) diff --git a/packages/core/src/highlevel/utils/misc-utils.ts b/packages/core/src/highlevel/utils/misc-utils.ts index f7cddf25..ddf6070c 100644 --- a/packages/core/src/highlevel/utils/misc-utils.ts +++ b/packages/core/src/highlevel/utils/misc-utils.ts @@ -1,5 +1,5 @@ import { MtArgumentError } from '../../types/errors.js' -import { ArrayPaginated, ArrayWithTotal, MaybeDynamic, Message } from '../types/index.js' +import type { ArrayPaginated, ArrayWithTotal, MaybeDynamic, Message } from '../types/index.js' /** * Normalize phone number by stripping formatting @@ -13,6 +13,7 @@ export function normalizePhoneNumber(phone: string): string { } export async function resolveMaybeDynamic(val: MaybeDynamic): Promise { + // eslint-disable-next-line ts/return-await return val instanceof Function ? await val() : await val } diff --git a/packages/core/src/highlevel/utils/peer-utils.test.ts b/packages/core/src/highlevel/utils/peer-utils.test.ts index eb1e65ba..229784f4 100644 --- a/packages/core/src/highlevel/utils/peer-utils.test.ts +++ b/packages/core/src/highlevel/utils/peer-utils.test.ts @@ -1,8 +1,8 @@ import { describe, expect, it } from 'vitest' - import { createStub } from '@mtcute/test' import { MtInvalidPeerTypeError } from '../types/index.js' + import { inputPeerToPeer, isInputPeerChannel, diff --git a/packages/core/src/highlevel/utils/peer-utils.ts b/packages/core/src/highlevel/utils/peer-utils.ts index 407b2b4f..185c4eec 100644 --- a/packages/core/src/highlevel/utils/peer-utils.ts +++ b/packages/core/src/highlevel/utils/peer-utils.ts @@ -2,10 +2,10 @@ import { tl } from '@mtcute/tl' import { assertNever } from '../../types/utils.js' import { MtInvalidPeerTypeError } from '../types/errors.js' -import { InputPeerLike } from '../types/peers/index.js' +import type { InputPeerLike } from '../types/peers/index.js' -export const INVITE_LINK_REGEX = - /^(?:https?:\/\/)?(?:www\.)?(?:t(?:elegram)?\.(?:org|me|dog)\/(?:joinchat\/|\+))([\w-]+)$/i +export const INVITE_LINK_REGEX: RegExp + = /^(?:https?:\/\/)?(?:www\.)?t(?:elegram)?\.(?:org|me|dog)\/(?:joinchat\/|\+)([\w-]+)$/i // helpers to convert result of `resolvePeer` function @@ -145,8 +145,8 @@ export function inputPeerToPeer(inp: tl.TypeInputPeer): tl.TypePeer { } } -export function extractUsernames(obj: tl.RawUser | tl.RawChannel) { - if (obj.usernames?.length) return obj.usernames.map((x) => x.username.toLowerCase()) +export function extractUsernames(obj: tl.RawUser | tl.RawChannel): string[] { + if (obj.usernames?.length) return obj.usernames.map(x => x.username.toLowerCase()) if (obj.username) return [obj.username.toLowerCase()] return [] diff --git a/packages/core/src/highlevel/utils/query-batcher.test.ts b/packages/core/src/highlevel/utils/query-batcher.test.ts index 3e269230..17b32dad 100644 --- a/packages/core/src/highlevel/utils/query-batcher.test.ts +++ b/packages/core/src/highlevel/utils/query-batcher.test.ts @@ -1,9 +1,9 @@ import { describe, expect, it } from 'vitest' - import { StubTelegramClient } from '@mtcute/test' import { sleep } from '../../utils/misc-utils.js' -import { ITelegramClient } from '../client.types.js' +import type { ITelegramClient } from '../client.types.js' + import { batchedQuery } from './query-batcher.js' describe('batchedQuery', () => { @@ -20,13 +20,13 @@ describe('batchedQuery', () => { log.push(`[end] fetch() ${items.join(', ')}`) - return items.map((it) => it * 2) + return items.map(it => it * 2) } const batched = batchedQuery({ fetch, - inputKey: (it) => it, - outputKey: (it) => it / 2, + inputKey: it => it, + outputKey: it => it / 2, }) const batchedWrapped = async (item: number) => { @@ -90,13 +90,13 @@ describe('batchedQuery', () => { log.push(`[end] fetch() ${items.join(', ')}`) - return items.map((it) => it * 2) + return items.map(it => it * 2) } const batched = batchedQuery({ fetch, - inputKey: (it) => it, - outputKey: (it) => it / 2, + inputKey: it => it, + outputKey: it => it / 2, maxBatchSize: 2, }) @@ -171,13 +171,13 @@ describe('batchedQuery', () => { log.push(`[end] fetch() ${items.join(', ')}`) - return items.map((it) => it * 2) + return items.map(it => it * 2) } const batched = batchedQuery({ fetch, - inputKey: (it) => it, - outputKey: (it) => it / 2, + inputKey: it => it, + outputKey: it => it / 2, maxBatchSize: 2, maxConcurrent: 2, }) @@ -260,13 +260,13 @@ describe('batchedQuery', () => { log.push(`[end] fetch() ${items.join(', ')}`) - return items.map((it) => it * 2) + return items.map(it => it * 2) } const batched = batchedQuery({ fetch, - inputKey: (it) => it, - outputKey: (it) => it / 2, + inputKey: it => it, + outputKey: it => it / 2, maxBatchSize: 2, }) @@ -321,13 +321,13 @@ describe('batchedQuery', () => { log.push(`[end] ${client.log.prefix} fetch() ${items.join(', ')}`) - return items.map((it) => it * 2) + return items.map(it => it * 2) } const batched = batchedQuery({ fetch, - inputKey: (it) => it, - outputKey: (it) => it / 2, + inputKey: it => it, + outputKey: it => it / 2, }) const batchedWrapped = async (item: number, client_ = client) => { @@ -404,13 +404,13 @@ describe('batchedQuery', () => { log.push(`[end] fetch() ${items.join(', ')}`) - return items.filter((it) => it !== 6).map((it) => it * 2) + return items.filter(it => it !== 6).map(it => it * 2) } const batched = batchedQuery({ fetch, - inputKey: (it) => it, - outputKey: (it) => it / 2, + inputKey: it => it, + outputKey: it => it / 2, }) const batchedWrapped = async (item: number) => { @@ -485,13 +485,13 @@ describe('batchedQuery', () => { log.push(`[end] fetch() ${items.join(', ')}`) - return items.map((it) => it * 2) + return items.map(it => it * 2) } const batched = batchedQuery({ fetch, - inputKey: (it) => it, - outputKey: (it) => it / 2, + inputKey: it => it, + outputKey: it => it / 2, maxBatchSize: 2, retrySingleOnError: () => true, }) @@ -552,13 +552,13 @@ describe('batchedQuery', () => { log.push(`[end] fetch() ${items.join(', ')}`) - return items.map((it) => it * 2) + return items.map(it => it * 2) } const batched = batchedQuery({ fetch, - inputKey: (it) => it, - outputKey: (it) => it / 2, + inputKey: it => it, + outputKey: it => it / 2, retrySingleOnError: () => [3, 4], }) diff --git a/packages/core/src/highlevel/utils/query-batcher.ts b/packages/core/src/highlevel/utils/query-batcher.ts index f5c73920..cdbcac84 100644 --- a/packages/core/src/highlevel/utils/query-batcher.ts +++ b/packages/core/src/highlevel/utils/query-batcher.ts @@ -1,17 +1,18 @@ import { Deque } from '../../utils/deque.js' -import { ITelegramClient } from '../client.types.js' +import type { ITelegramClient } from '../client.types.js' type Resolve = (value: T | PromiseLike) => void type Reject = (err?: unknown) => void -type WaitersMap = Map, Reject][]> -interface InternalState { - waiters: WaitersMap - fetchingKeys: Set +type WaitersMap = Map, Reject][]> +interface InternalState { + waiters: WaitersMap + fetchingKeys: Set retryQueue: Deque numRunning: number } +export type BatchedQuery = (client: ITelegramClient, item: T) => Promise // todo: should it be MtClient? /** @@ -23,7 +24,7 @@ interface InternalState { * - "key" - unique identifier of the item, which should be deriveable from both input and output. * used for matching input and output items and deduplicating them. */ -export function batchedQuery(params: { +export function batchedQuery(params: { /** * Fetcher function, taking an array of input items and returning an array of output items. * @@ -33,9 +34,9 @@ export function batchedQuery(params: { fetch: (client: ITelegramClient, items: T[]) => Promise /** Key derivation function for input items */ - inputKey: (item: T, client: ITelegramClient) => K + inputKey: (item: T, client: ITelegramClient) => string | number /** Key derivation function for output items */ - outputKey: (item: U, client: ITelegramClient) => K + outputKey: (item: U, client: ITelegramClient) => string | number /** * Maximum number of items to be passed to the `fetcher` function at once. @@ -64,13 +65,13 @@ export function batchedQuery(params: { * or an array of items for which the query should be retried (waiters for other items will throw `err`). */ retrySingleOnError?: (items: T[], err: unknown) => boolean | T[] -}): (client: ITelegramClient, item: T) => Promise { +}): BatchedQuery { const { inputKey, outputKey, fetch, maxBatchSize = Infinity, maxConcurrent = 1, retrySingleOnError } = params const symbol = Symbol('batchedQueryState') function getState(client_: ITelegramClient) { - const client = client_ as { [symbol]?: InternalState } + const client = client_ as { [symbol]?: InternalState } if (!client[symbol]) { client[symbol] = { @@ -84,7 +85,7 @@ export function batchedQuery(params: { return client[symbol] } - function addWaiter(client: ITelegramClient, waiters: WaitersMap, item: T) { + function addWaiter(client: ITelegramClient, waiters: WaitersMap, item: T) { const key = inputKey(item, client) let arr = waiters.get(key) @@ -99,7 +100,7 @@ export function batchedQuery(params: { }) } - function popWaiters(waiters: WaitersMap, key: K) { + function popWaiters(waiters: WaitersMap, key: string | number) { const arr = waiters.get(key) if (!arr) return [] @@ -108,19 +109,19 @@ export function batchedQuery(params: { return arr } - function startLoops(client: ITelegramClient, state: InternalState) { + function startLoops(client: ITelegramClient, state: InternalState) { for (let i = state.numRunning; i <= maxConcurrent; i++) { processPending(client, state) } } - function processPending(client: ITelegramClient, state: InternalState) { + function processPending(client: ITelegramClient, state: InternalState) { const { waiters, fetchingKeys, retryQueue } = state if (state.numRunning >= maxConcurrent) return const request: T[] = [] - const requestKeys: K[] = [] + const requestKeys: (string | number)[] = [] let isRetryRequest = false if (retryQueue.length > 0) { @@ -149,10 +150,10 @@ export function batchedQuery(params: { state.numRunning += 1 - // eslint-disable-next-line @typescript-eslint/no-floating-promises + // eslint-disable-next-line ts/no-floating-promises fetch(client, request) .then((res) => { - const receivedKeys = new Set() + const receivedKeys = new Set() for (const it of res) { const key = outputKey(it, client) diff --git a/packages/core/src/highlevel/utils/stream-utils.test.ts b/packages/core/src/highlevel/utils/stream-utils.test.ts index 515e733c..1384ec94 100644 --- a/packages/core/src/highlevel/utils/stream-utils.test.ts +++ b/packages/core/src/highlevel/utils/stream-utils.test.ts @@ -14,10 +14,10 @@ describe('createChunkedReader', () => { const reader = createChunkedReader(stream, 4) expect(await reader.read()).to.deep.equal(new Uint8Array([1, 2, 3, 4])) - expect(reader.ended()).to.be.false + expect(reader.ended()).toEqual(false) expect(await reader.read()).to.deep.equal(new Uint8Array([5, 6])) - expect(reader.ended()).to.be.true - expect(await reader.read()).to.be.null + expect(reader.ended()).toEqual(true) + expect(await reader.read()).toEqual(null) }) it('should correctly handle chunks larger than chunkSize', async () => { @@ -31,14 +31,14 @@ describe('createChunkedReader', () => { const reader = createChunkedReader(stream, 2) expect(await reader.read()).to.deep.equal(new Uint8Array([1, 2])) - expect(reader.ended()).to.be.false + expect(reader.ended()).toEqual(false) expect(await reader.read()).to.deep.equal(new Uint8Array([3, 4])) - expect(reader.ended()).to.be.false + expect(reader.ended()).toEqual(false) expect(await reader.read()).to.deep.equal(new Uint8Array([5, 6])) - expect(reader.ended()).to.be.false + expect(reader.ended()).toEqual(false) expect(await reader.read()).to.deep.equal(new Uint8Array([7])) - expect(reader.ended()).to.be.true - expect(await reader.read()).to.be.null + expect(reader.ended()).toEqual(true) + expect(await reader.read()).toEqual(null) }) it('should correctly handle chunks equal to chunkSize', async () => { @@ -52,10 +52,10 @@ describe('createChunkedReader', () => { const reader = createChunkedReader(stream, 3) expect(await reader.read()).to.deep.equal(new Uint8Array([1, 2, 3])) - expect(reader.ended()).to.be.false + expect(reader.ended()).toEqual(false) expect(await reader.read()).to.deep.equal(new Uint8Array([4, 5, 6])) - expect(reader.ended()).to.be.true - expect(await reader.read()).to.be.null + expect(reader.ended()).toEqual(true) + expect(await reader.read()).toEqual(null) }) it('should correctly handle mixed chunks', async () => { @@ -71,13 +71,13 @@ describe('createChunkedReader', () => { const reader = createChunkedReader(stream, 4) expect(await reader.read()).to.deep.equal(new Uint8Array([1, 2, 3, 4])) - expect(reader.ended()).to.be.false + expect(reader.ended()).toEqual(false) expect(await reader.read()).to.deep.equal(new Uint8Array([5, 6, 7, 8])) - expect(reader.ended()).to.be.false + expect(reader.ended()).toEqual(false) expect(await reader.read()).to.deep.equal(new Uint8Array([9, 10, 11, 12])) - expect(reader.ended()).to.be.false + expect(reader.ended()).toEqual(false) expect(await reader.read()).to.deep.equal(new Uint8Array([13, 14])) - expect(reader.ended()).to.be.true - expect(await reader.read()).to.be.null + expect(reader.ended()).toEqual(true) + expect(await reader.read()).toEqual(null) }) }) diff --git a/packages/core/src/highlevel/utils/stream-utils.ts b/packages/core/src/highlevel/utils/stream-utils.ts index 2299e0fb..123347f8 100644 --- a/packages/core/src/highlevel/utils/stream-utils.ts +++ b/packages/core/src/highlevel/utils/stream-utils.ts @@ -24,14 +24,17 @@ export async function streamToBuffer(stream: ReadableStream): Promis return concatBuffers(chunks) } -export function createChunkedReader(stream: ReadableStream, chunkSize: number) { +export function createChunkedReader(stream: ReadableStream, chunkSize: number): { + ended: () => boolean + read: () => Promise +} { const reader = stream.getReader() const lock = new AsyncLock() const buffer: Uint8Array[] = [] let bufferLength = 0 - let next: Uint8Array | undefined = undefined + let next: Uint8Array | undefined let first = true async function readInner(): Promise { diff --git a/packages/core/src/highlevel/utils/string-session.test.ts b/packages/core/src/highlevel/utils/string-session.test.ts index 97d0f485..e96dec5c 100644 --- a/packages/core/src/highlevel/utils/string-session.test.ts +++ b/packages/core/src/highlevel/utils/string-session.test.ts @@ -1,8 +1,7 @@ import { describe, expect, it } from 'vitest' -import { __tlWriterMap } from '@mtcute/tl/binary/writer.js' - import { defaultProductionDc } from '../../utils/dcs.js' + import { readStringSession, writeStringSession } from './string-session.js' const stubAuthKey = new Uint8Array(32) diff --git a/packages/core/src/highlevel/utils/string-session.ts b/packages/core/src/highlevel/utils/string-session.ts index 0cfc0155..424f8a64 100644 --- a/packages/core/src/highlevel/utils/string-session.ts +++ b/packages/core/src/highlevel/utils/string-session.ts @@ -2,8 +2,9 @@ import { TlBinaryReader, TlBinaryWriter } from '@mtcute/tl-runtime' import { getPlatform } from '../../platform.js' import { MtArgumentError } from '../../types/index.js' -import { BasicDcOption, DcOptions, parseBasicDcOption, serializeBasicDcOption } from '../../utils/dcs.js' -import { CurrentUserInfo } from '../storage/service/current-user.js' +import type { BasicDcOption, DcOptions } from '../../utils/dcs.js' +import { parseBasicDcOption, serializeBasicDcOption } from '../../utils/dcs.js' +import type { CurrentUserInfo } from '../storage/service/current-user.js' export interface StringSessionData { version: number @@ -131,7 +132,7 @@ export function readStringSession(data: string): StringSessionData { primaryDc = primaryDc_ primaryMediaDc = primaryMediaDc_ } else { - throw new Error() // unreachable + throw new Error('unreachable') } let self: CurrentUserInfo | null = null diff --git a/packages/core/src/highlevel/utils/voice-utils.test.ts b/packages/core/src/highlevel/utils/voice-utils.test.ts index fd759f01..deb92651 100644 --- a/packages/core/src/highlevel/utils/voice-utils.test.ts +++ b/packages/core/src/highlevel/utils/voice-utils.test.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from 'vitest' import { getPlatform } from '../../platform.js' + import { decodeWaveform, encodeWaveform } from './voice-utils.js' const p = getPlatform() @@ -10,15 +11,111 @@ describe('decodeWaveform', () => { expect( decodeWaveform( p.hexDecode( - '0000104210428c310821a51463cc39072184524a4aa9b51663acb5e69c7bef41' + - '08618c514a39e7a494d65aadb5f75e8c31ce396badf7de9cf3debbf7feff0f', + '0000104210428c310821a51463cc39072184524a4aa9b51663acb5e69c7bef41' + + '08618c514a39e7a494d65aadb5f75e8c31ce396badf7de9cf3debbf7feff0f', ), ), ).toEqual([ - 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 10, 10, 10, - 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, - 19, 20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 24, 24, 25, 25, 25, 26, 26, 26, 27, 27, 27, 28, - 28, 28, 29, 29, 29, 30, 30, 30, 31, 31, 31, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 2, + 2, + 2, + 3, + 3, + 3, + 4, + 4, + 4, + 5, + 5, + 5, + 6, + 6, + 6, + 7, + 7, + 7, + 8, + 8, + 8, + 8, + 9, + 9, + 9, + 10, + 10, + 10, + 11, + 11, + 11, + 12, + 12, + 12, + 13, + 13, + 13, + 14, + 14, + 14, + 15, + 15, + 15, + 16, + 16, + 16, + 16, + 17, + 17, + 17, + 18, + 18, + 18, + 19, + 19, + 19, + 20, + 20, + 20, + 21, + 21, + 21, + 22, + 22, + 22, + 23, + 23, + 23, + 24, + 24, + 24, + 24, + 25, + 25, + 25, + 26, + 26, + 26, + 27, + 27, + 27, + 28, + 28, + 28, + 29, + 29, + 29, + 30, + 30, + 30, + 31, + 31, + 31, ]) }) }) @@ -28,15 +125,111 @@ describe('encodeWaveform', () => { expect( p.hexEncode( encodeWaveform([ - 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 10, - 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 18, - 18, 18, 19, 19, 19, 20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 24, 24, 25, 25, 25, 26, - 26, 26, 27, 27, 27, 28, 28, 28, 29, 29, 29, 30, 30, 30, 31, 31, 31, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 2, + 2, + 2, + 3, + 3, + 3, + 4, + 4, + 4, + 5, + 5, + 5, + 6, + 6, + 6, + 7, + 7, + 7, + 8, + 8, + 8, + 8, + 9, + 9, + 9, + 10, + 10, + 10, + 11, + 11, + 11, + 12, + 12, + 12, + 13, + 13, + 13, + 14, + 14, + 14, + 15, + 15, + 15, + 16, + 16, + 16, + 16, + 17, + 17, + 17, + 18, + 18, + 18, + 19, + 19, + 19, + 20, + 20, + 20, + 21, + 21, + 21, + 22, + 22, + 22, + 23, + 23, + 23, + 24, + 24, + 24, + 24, + 25, + 25, + 25, + 26, + 26, + 26, + 27, + 27, + 27, + 28, + 28, + 28, + 29, + 29, + 29, + 30, + 30, + 30, + 31, + 31, + 31, ]), ), ).toEqual( - '0000104210428c310821a51463cc39072184524a4aa9b51663acb5e69c7bef41' + - '08618c514a39e7a494d65aadb5f75e8c31ce396badf7de9cf3debbf7feff0f', + '0000104210428c310821a51463cc39072184524a4aa9b51663acb5e69c7bef41' + + '08618c514a39e7a494d65aadb5f75e8c31ce396badf7de9cf3debbf7feff0f', ) }) }) diff --git a/packages/core/src/highlevel/worker/app-config.ts b/packages/core/src/highlevel/worker/app-config.ts index cea8564a..79e67ff9 100644 --- a/packages/core/src/highlevel/worker/app-config.ts +++ b/packages/core/src/highlevel/worker/app-config.ts @@ -1,10 +1,11 @@ -import { PublicPart } from '../../types/utils.js' -import { AppConfigManager } from '../managers/app-config-manager.js' -import { WorkerInvoker } from './invoker.js' +import type { PublicPart } from '../../types/utils.js' +import type { AppConfigManager } from '../managers/app-config-manager.js' + +import type { WorkerInvoker } from './invoker.js' export class AppConfigManagerProxy implements PublicPart { readonly get: AppConfigManager['get'] - readonly getField + readonly getField: AppConfigManager['getField'] constructor(readonly invoker: WorkerInvoker) { const bind = invoker.makeBinder('app-config') diff --git a/packages/core/src/highlevel/worker/errors.ts b/packages/core/src/highlevel/worker/errors.ts index 288f15d0..34e84f96 100644 --- a/packages/core/src/highlevel/worker/errors.ts +++ b/packages/core/src/highlevel/worker/errors.ts @@ -2,11 +2,11 @@ import { tl } from '@mtcute/tl' import { MtArgumentError, - MtcuteError, MtSecurityError, MtTimeoutError, MtTypeAssertionError, MtUnsupportedError, + MtcuteError, } from '../../types/errors.js' import { MtEmptyError, MtInvalidPeerTypeError, MtMessageNotFoundError, MtPeerNotFoundError } from '../types/errors.js' @@ -53,13 +53,21 @@ export function serializeError(error: unknown): SerializedError { } else if (ctor === tl.RpcError) { res.name = 'RpcError' res.custom = { ...error } - } else if (ctor === MtArgumentError) res.name = 'MtArgumentError' - else if (ctor === MtSecurityError) res.name = 'MtSecurityError' - else if (ctor === MtUnsupportedError) res.name = 'MtUnsupportedError' - else if (ctor === MtPeerNotFoundError) res.name = 'MtPeerNotFoundError' - else if (ctor === MtInvalidPeerTypeError) res.name = 'MtInvalidPeerTypeError' - else if (ctor === MtEmptyError) res.name = 'MtEmptyError' - else if (ctor instanceof MtcuteError) res.name = 'MtcuteError' + } else if (ctor === MtArgumentError) { + res.name = 'MtArgumentError' + } else if (ctor === MtSecurityError) { + res.name = 'MtSecurityError' + } else if (ctor === MtUnsupportedError) { + res.name = 'MtUnsupportedError' + } else if (ctor === MtPeerNotFoundError) { + res.name = 'MtPeerNotFoundError' + } else if (ctor === MtInvalidPeerTypeError) { + res.name = 'MtInvalidPeerTypeError' + } else if (ctor === MtEmptyError) { + res.name = 'MtEmptyError' + } else if (ctor instanceof MtcuteError) { + res.name = 'MtcuteError' + } return res } @@ -69,7 +77,7 @@ export function deserializeError(error: SerializedError): Error { switch (error.name) { case 'MtTypeAssertionError': { - const custom = error.custom as { context: string; expected: string; actual: string } + const custom = error.custom as { context: string, expected: string, actual: string } err2 = new MtTypeAssertionError(custom.context, custom.expected, custom.actual) break @@ -81,7 +89,7 @@ export function deserializeError(error: SerializedError): Error { break } case 'MtMessageNotFoundError': { - const custom = error.custom as { peerId: number; messageId: number; context?: string } + const custom = error.custom as { peerId: number, messageId: number, context?: string } err2 = new MtMessageNotFoundError(custom.peerId, custom.messageId, custom.context) break diff --git a/packages/core/src/highlevel/worker/invoker.ts b/packages/core/src/highlevel/worker/invoker.ts index 6656e72c..fcdc566c 100644 --- a/packages/core/src/highlevel/worker/invoker.ts +++ b/packages/core/src/highlevel/worker/invoker.ts @@ -1,6 +1,9 @@ -import { ControllablePromise, createControllablePromise } from '../../utils/controllable-promise.js' +import type { ControllablePromise } from '../../utils/controllable-promise.js' +import { createControllablePromise } from '../../utils/controllable-promise.js' + import { deserializeError } from './errors.js' -import { deserializeResult, SendFn, serializeResult, WorkerInboundMessage, WorkerOutboundMessage } from './protocol.js' +import type { SendFn, WorkerInboundMessage, WorkerOutboundMessage } from './protocol.js' +import { deserializeResult, serializeResult } from './protocol.js' export type InvokeTarget = Extract['target'] @@ -44,7 +47,7 @@ export class WorkerInvoker { } invokeVoid(target: InvokeTarget, method: string, args: unknown[]): void { - // eslint-disable-next-line @typescript-eslint/no-floating-promises + // eslint-disable-next-line ts/no-floating-promises this._invoke(target, method, args, true) } @@ -54,7 +57,7 @@ export class WorkerInvoker { return this._invoke(target, method, args, false, abortSignal) as Promise } - handleResult(msg: Extract) { + handleResult(msg: Extract): void { const promise = this._pending.get(msg.id) if (!promise) return diff --git a/packages/core/src/highlevel/worker/port.ts b/packages/core/src/highlevel/worker/port.ts index 61637adb..2f90d3ff 100644 --- a/packages/core/src/highlevel/worker/port.ts +++ b/packages/core/src/highlevel/worker/port.ts @@ -1,14 +1,16 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { RpcCallOptions } from '../../network/network-manager.js' -import { MustEqual } from '../../types/utils.js' +import type { RpcCallOptions } from '../../network/network-manager.js' +import type { MustEqual } from '../../types/utils.js' import { LogManager } from '../../utils/logger.js' -import { ConnectionState, ITelegramClient, ServerUpdateHandler } from '../client.types.js' +import type { ConnectionState, ITelegramClient, ServerUpdateHandler } from '../client.types.js' import { PeersIndex } from '../types/peers/peers-index.js' -import { RawUpdateHandler } from '../updates/types.js' +import type { RawUpdateHandler } from '../updates/types.js' + import { AppConfigManagerProxy } from './app-config.js' import { WorkerInvoker } from './invoker.js' -import { ClientMessageHandler, deserializeResult, SendFn, SomeWorker, WorkerCustomMethods } from './protocol.js' +import type { ClientMessageHandler, SendFn, SomeWorker, WorkerCustomMethods } from './protocol.js' +import { deserializeResult } from './protocol.js' import { TelegramStorageProxy } from './storage.js' export interface TelegramWorkerPortOptions { @@ -16,36 +18,36 @@ export interface TelegramWorkerPortOptions { } export abstract class TelegramWorkerPort implements ITelegramClient { - readonly log + readonly log: LogManager private _connection private _invoker - readonly storage - readonly appConfig + readonly storage: TelegramStorageProxy + readonly appConfig: AppConfigManagerProxy // bound methods - readonly prepare + readonly prepare: ITelegramClient['prepare'] private _connect - readonly close - readonly notifyLoggedIn - readonly notifyLoggedOut - readonly notifyChannelOpened - readonly notifyChannelClosed - readonly importSession - readonly exportSession - readonly handleClientUpdate - readonly getApiCrenetials - readonly getPoolSize - readonly getPrimaryDcId - readonly changePrimaryDc - readonly computeSrpParams - readonly computeNewPasswordHash - readonly startUpdatesLoop - readonly stopUpdatesLoop + readonly close: ITelegramClient['close'] + readonly notifyLoggedIn: ITelegramClient['notifyLoggedIn'] + readonly notifyLoggedOut: ITelegramClient['notifyLoggedOut'] + readonly notifyChannelOpened: ITelegramClient['notifyChannelOpened'] + readonly notifyChannelClosed: ITelegramClient['notifyChannelClosed'] + readonly importSession: ITelegramClient['importSession'] + readonly exportSession: ITelegramClient['exportSession'] + readonly handleClientUpdate: ITelegramClient['handleClientUpdate'] + readonly getApiCrenetials: ITelegramClient['getApiCrenetials'] + readonly getPoolSize: ITelegramClient['getPoolSize'] + readonly getPrimaryDcId: ITelegramClient['getPrimaryDcId'] + readonly changePrimaryDc: ITelegramClient['changePrimaryDc'] + readonly computeSrpParams: ITelegramClient['computeSrpParams'] + readonly computeNewPasswordHash: ITelegramClient['computeNewPasswordHash'] + readonly startUpdatesLoop: ITelegramClient['startUpdatesLoop'] + readonly stopUpdatesLoop: ITelegramClient['stopUpdatesLoop'] private _abortController = new AbortController() - readonly stopSignal = this._abortController.signal + readonly stopSignal: AbortSignal = this._abortController.signal constructor(readonly options: TelegramWorkerPortOptions) { this.log = new LogManager('worker') @@ -109,6 +111,7 @@ export abstract class TelegramWorkerPort imp onError(handler: (err: unknown) => void): void { this._errorHandler = handler } + emitError(err: unknown): void { this._errorHandler(err) } diff --git a/packages/core/src/highlevel/worker/protocol.ts b/packages/core/src/highlevel/worker/protocol.ts index 3a8aa7fe..b4a6d5e0 100644 --- a/packages/core/src/highlevel/worker/protocol.ts +++ b/packages/core/src/highlevel/worker/protocol.ts @@ -1,52 +1,53 @@ -import Long from 'long' import type { Worker as NodeWorker } from 'node:worker_threads' -import { tl } from '@mtcute/tl' +import Long from 'long' +import type { tl } from '@mtcute/tl' -import { ConnectionState } from '../client.types.js' -import { SerializedError } from './errors.js' +import type { ConnectionState } from '../client.types.js' + +import type { SerializedError } from './errors.js' export type WorkerInboundMessage = - | { - type: 'invoke' - id: number - target: 'custom' | 'client' | 'storage' | 'storage-self' | 'storage-peers' | 'app-config' - method: string - args: SerializedResult - void: boolean - withAbort: boolean - } - | { - type: 'abort' - id: number - } + | { + type: 'invoke' + id: number + target: 'custom' | 'client' | 'storage' | 'storage-self' | 'storage-peers' | 'app-config' + method: string + args: SerializedResult + void: boolean + withAbort: boolean + } + | { + type: 'abort' + id: number + } export type WorkerOutboundMessage = - | { type: 'server_update'; update: SerializedResult } - | { - type: 'update' - update: SerializedResult - users: SerializedResult> - chats: SerializedResult> - hasMin: boolean - } - | { type: 'error'; error: unknown } - | { type: 'stop' } - | { type: 'conn_state'; state: ConnectionState } - | { - type: 'log' - color: number - level: number - tag: string - fmt: string - args: unknown[] - } - | { - type: 'result' - id: number - result?: SerializedResult - error?: SerializedError - } + | { type: 'server_update', update: SerializedResult } + | { + type: 'update' + update: SerializedResult + users: SerializedResult> + chats: SerializedResult> + hasMin: boolean + } + | { type: 'error', error: unknown } + | { type: 'stop' } + | { type: 'conn_state', state: ConnectionState } + | { + type: 'log' + color: number + level: number + tag: string + fmt: string + args: unknown[] + } + | { + type: 'result' + id: number + result?: SerializedResult + error?: SerializedError + } export type SomeWorker = NodeWorker | Worker | SharedWorker @@ -56,10 +57,9 @@ export type ClientMessageHandler = (message: WorkerOutboundMessage) => void export type RespondFn = (message: WorkerOutboundMessage) => void export type WorkerMessageHandler = (message: WorkerInboundMessage, respond: RespondFn) => void -// eslint-disable-next-line @typescript-eslint/no-explicit-any export type WorkerCustomMethods = Record Promise> -export type SerializedResult = { __serialized__: T } +export interface SerializedResult { __serialized__: T } export function serializeResult(result: T): SerializedResult { if (ArrayBuffer.isView(result)) return result as unknown as SerializedResult @@ -82,7 +82,6 @@ export function serializeResult(result: T): SerializedResult { for (const [key, value] of Object.entries(result)) { if (Long.isLong(value)) { - // eslint-disable-next-line newResult[key] = { __type: 'long', low: value.low, @@ -90,7 +89,6 @@ export function serializeResult(result: T): SerializedResult { unsigned: value.unsigned, } } else if (typeof value === 'object') { - // eslint-disable-next-line newResult[key] = serializeResult(value) } else { newResult[key] = value @@ -112,7 +110,7 @@ export function deserializeResult(result: SerializedResult): T { if (result instanceof Map) { for (const [key, value] of result.entries()) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + // eslint-disable-next-line ts/no-unsafe-argument result.set(key, deserializeResult(value)) } @@ -122,10 +120,8 @@ export function deserializeResult(result: SerializedResult): T { if (result && typeof result === 'object') { for (const [key, value] of Object.entries(result)) { if (value && typeof value === 'object' && (value as Record).__type === 'long') { - // eslint-disable-next-line ;(result as any)[key] = Long.fromValue(value as unknown as Long) } else if (typeof value === 'object') { - // eslint-disable-next-line ;(result as any)[key] = deserializeResult(value as SerializedResult) } } diff --git a/packages/core/src/highlevel/worker/storage.ts b/packages/core/src/highlevel/worker/storage.ts index 4d07f754..ac2475b1 100644 --- a/packages/core/src/highlevel/worker/storage.ts +++ b/packages/core/src/highlevel/worker/storage.ts @@ -1,11 +1,12 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtArgumentError } from '../../types/errors.js' -import { PublicPart } from '../../types/utils.js' +import type { PublicPart } from '../../types/utils.js' import type { CurrentUserInfo, CurrentUserService } from '../storage/service/current-user.js' import type { PeersService } from '../storage/service/peers.js' -import { TelegramStorageManager } from '../storage/storage.js' -import { WorkerInvoker } from './invoker.js' +import type { TelegramStorageManager } from '../storage/storage.js' + +import type { WorkerInvoker } from './invoker.js' class CurrentUserServiceProxy implements PublicPart { private _store @@ -59,12 +60,12 @@ class CurrentUserServiceProxy implements PublicPart { } class PeersServiceProxy implements PublicPart { - readonly updatePeersFrom - readonly store - readonly getById - readonly getByPhone - readonly getByUsername - readonly getCompleteById + readonly updatePeersFrom: PeersService['updatePeersFrom'] + readonly store: PeersService['store'] + readonly getById: PeersService['getById'] + readonly getByPhone: PeersService['getByPhone'] + readonly getByUsername: PeersService['getByUsername'] + readonly getCompleteById: PeersService['getCompleteById'] constructor(private _invoker: WorkerInvoker) { const bind = this._invoker.makeBinder('storage-peers') @@ -79,10 +80,10 @@ class PeersServiceProxy implements PublicPart { } export class TelegramStorageProxy implements PublicPart { - readonly self - readonly peers + readonly self: CurrentUserServiceProxy + readonly peers: PeersServiceProxy - readonly clear + readonly clear: TelegramStorageManager['clear'] constructor(private _invoker: WorkerInvoker) { const bind = this._invoker.makeBinder('storage') diff --git a/packages/core/src/highlevel/worker/worker.ts b/packages/core/src/highlevel/worker/worker.ts index d7ca9d45..c2acaa55 100644 --- a/packages/core/src/highlevel/worker/worker.ts +++ b/packages/core/src/highlevel/worker/worker.ts @@ -1,14 +1,17 @@ -import { BaseTelegramClient } from '../base.js' +import type { BaseTelegramClient } from '../base.js' + import { serializeError } from './errors.js' -import { - deserializeResult, +import type { RespondFn, SerializedResult, - serializeResult, WorkerCustomMethods, WorkerInboundMessage, WorkerMessageHandler, } from './protocol.js' +import { + deserializeResult, + serializeResult, +} from './protocol.js' export interface TelegramWorkerOptions { client: BaseTelegramClient @@ -21,7 +24,7 @@ export abstract class TelegramWorker { abstract registerWorker(handler: WorkerMessageHandler): RespondFn - readonly pendingAborts = new Map() + readonly pendingAborts: Map = new Map() constructor(readonly params: TelegramWorkerOptions) { this.broadcast = this.registerWorker((message, respond) => { @@ -52,13 +55,13 @@ export abstract class TelegramWorker { fmt, args, }) - client.onError((err) => + client.onError(err => this.broadcast({ type: 'error', error: err, }), ) - client.onConnectionState((state) => + client.onConnectionState(state => this.broadcast({ type: 'conn_state', state, @@ -77,7 +80,7 @@ export abstract class TelegramWorker { }), ) } else { - client.onServerUpdate((update) => + client.onServerUpdate(update => this.broadcast({ type: 'server_update', update: serializeResult(update), @@ -87,7 +90,6 @@ export abstract class TelegramWorker { } private onInvoke(msg: Extract, respond: RespondFn) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any let target: any switch (msg.target) { @@ -121,7 +123,7 @@ export abstract class TelegramWorker { } } - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + // eslint-disable-next-line ts/no-unsafe-assignment const method = target[msg.method] if (!method) { @@ -151,7 +153,7 @@ export abstract class TelegramWorker { args = deserializeResult(msg.args) } - // eslint-disable-next-line @typescript-eslint/no-unsafe-call + // eslint-disable-next-line ts/no-unsafe-call Promise.resolve(method.apply(target, args)) .then((res) => { if (msg.withAbort) { diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 564cca66..59dd8e6e 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -1,3 +1,5 @@ +import Long from 'long' + export * from './highlevel/index.js' export * from './network/index.js' export * from './storage/index.js' @@ -6,6 +8,5 @@ export * from './utils/peer-utils.js' /** @hidden */ export { mtp, tl } from '@mtcute/tl' -import Long from 'long' /** @hidden */ export { Long } diff --git a/packages/core/src/network/auth-key.test.ts b/packages/core/src/network/auth-key.test.ts index 0f61d742..9ee31e7b 100644 --- a/packages/core/src/network/auth-key.test.ts +++ b/packages/core/src/network/auth-key.test.ts @@ -1,14 +1,14 @@ import Long from 'long' import { describe, expect, it, vi } from 'vitest' - import { defaultTestCryptoProvider } from '@mtcute/test' -import { +import type { TlBinaryReader, TlReaderMap, } from '@mtcute/tl-runtime' import { getPlatform } from '../platform.js' import { LogManager } from '../utils/index.js' + import { AuthKey } from './auth-key.js' const authKey = new Uint8Array(256) @@ -30,10 +30,10 @@ describe('AuthKey', () => { return key } - const msgId = Long.fromBits(0xbeef1234, 0x1234beef, true) + const msgId = Long.fromBits(0xBEEF1234, 0x1234BEEF, true) const seqNo = 777 - const serverSalt = Long.fromBits(0xdeadbeef, 0xbeefdead) - const sessionId = Long.fromBits(0xfeedbeef, 0xbeeffeed) + const serverSalt = Long.fromBits(0xDEADBEEF, 0xBEEFDEAD) + const sessionId = Long.fromBits(0xFEEDBEEF, 0xBEEFFEED) function writeMessage(body: Uint8Array) { const buf = new Uint8Array(16 + body.length) @@ -64,9 +64,9 @@ describe('AuthKey', () => { const msg = key.encryptMessage(message, serverSalt, sessionId) expect(p.hexEncode(msg)).toEqual( - '40fa5bb7cb56a895f6f5a88914892aadf87c68031cc953ba29d68e118021f329' + - 'be386a620d49f3ad3a50c60dcef3733f214e8cefa3e403c11d193637d4971dc1' + - '5db7f74b26fd16cb0e8fee30bf7e3f68858fe82927e2cd06', + '40fa5bb7cb56a895f6f5a88914892aadf87c68031cc953ba29d68e118021f329' + + 'be386a620d49f3ad3a50c60dcef3733f214e8cefa3e403c11d193637d4971dc1' + + '5db7f74b26fd16cb0e8fee30bf7e3f68858fe82927e2cd06', ) }) @@ -77,7 +77,8 @@ describe('AuthKey', () => { return new Promise<[Long, number, TlBinaryReader]>((resolve, reject) => { // in this method, errors are not thrown but rather logged vi.spyOn(key.log, 'warn').mockImplementation((msg, ...fmt) => - reject(`${msg} : ${fmt.map((it) => JSON.stringify(it)).join(' ')}`), + // eslint-disable-next-line prefer-promise-reject-errors + reject(`${msg} : ${fmt.map(it => JSON.stringify(it)).join(' ')}`), ) key.decryptMessage(message, sessionId, (...args) => resolve(args)) @@ -86,9 +87,9 @@ describe('AuthKey', () => { it('should decrypt a message', async () => { const message = p.hexDecode( - '40fa5bb7cb56a8950c394b884f1529efc42fea22d972fea650a714ce6d2d1bdb' + - '3d98ff5929b8768c401771a69795f36a7e720dcafac2efbccd0ba368e8a7f48b' + - '07362cac1a32ffcabe188b51a36cc4d54e1d0633cf9eaf35', + '40fa5bb7cb56a8950c394b884f1529efc42fea22d972fea650a714ce6d2d1bdb' + + '3d98ff5929b8768c401771a69795f36a7e720dcafac2efbccd0ba368e8a7f48b' + + '07362cac1a32ffcabe188b51a36cc4d54e1d0633cf9eaf35', ) const [decMsgId, decSeqNo, data] = await decrypt(message) @@ -100,10 +101,10 @@ describe('AuthKey', () => { it('should decrypt a message with padding', async () => { const message = p.hexDecode( - '40fa5bb7cb56a8950c394b884f1529efc42fea22d972fea650a714ce6d2d1bdb' + - '3d98ff5929b8768c401771a69795f36a7e720dcafac2efbccd0ba368e8a7f48b' + - '07362cac1a32ffcabe188b51a36cc4d54e1d0633cf9eaf35' + - 'deadbeef', // some padding (e.g. from padded transport), + '40fa5bb7cb56a8950c394b884f1529efc42fea22d972fea650a714ce6d2d1bdb' + + '3d98ff5929b8768c401771a69795f36a7e720dcafac2efbccd0ba368e8a7f48b' + + '07362cac1a32ffcabe188b51a36cc4d54e1d0633cf9eaf35' + + 'deadbeef', // some padding (e.g. from padded transport), ) const [decMsgId, decSeqNo, data] = await decrypt(message) @@ -115,9 +116,9 @@ describe('AuthKey', () => { it('should ignore messages with invalid message key', async () => { const message = p.hexDecode( - '40fa5bb7cb56a8950000000000000000000000000000000050a714ce6d2d1bdb' + - '3d98ff5929b8768c401771a69795f36a7e720dcafac2efbccd0ba368e8a7f48b' + - '07362cac1a32ffcabe188b51a36cc4d54e1d0633cf9eaf35', + '40fa5bb7cb56a8950000000000000000000000000000000050a714ce6d2d1bdb' + + '3d98ff5929b8768c401771a69795f36a7e720dcafac2efbccd0ba368e8a7f48b' + + '07362cac1a32ffcabe188b51a36cc4d54e1d0633cf9eaf35', ) await expect(() => decrypt(message)).rejects.toThrow('message with invalid messageKey') @@ -125,9 +126,9 @@ describe('AuthKey', () => { it('should ignore messages with invalid session_id', async () => { const message = p.hexDecode( - '40fa5bb7cb56a895a986a7e97f4e90aa2769b5e702c6e86f5e1e82c6ff0c6829' + - '2521a2ba9704fa37fb341d895cf32662c6cf47ba31cbf27c30d5c03f6c2930f4' + - '30fd8858b836b73fe32d4a95b8ebcdbc9ca8908f7964c40a', + '40fa5bb7cb56a895a986a7e97f4e90aa2769b5e702c6e86f5e1e82c6ff0c6829' + + '2521a2ba9704fa37fb341d895cf32662c6cf47ba31cbf27c30d5c03f6c2930f4' + + '30fd8858b836b73fe32d4a95b8ebcdbc9ca8908f7964c40a', ) await expect(() => decrypt(message)).rejects.toThrow('message with invalid sessionId') @@ -135,14 +136,14 @@ describe('AuthKey', () => { it('should ignore messages with invalid length', async () => { const messageTooLong = p.hexDecode( - '40fa5bb7cb56a8950d19412233dd5d24be697c73274e08fbe515cf65e0c5f70c' + - 'ad75fd2badc18c9f999f287351144eeb1cfcaa9bea33ef5058999ad96a498306' + - '08d2859425685a55b21fab413bfabc42ec5da283853b28c0', + '40fa5bb7cb56a8950d19412233dd5d24be697c73274e08fbe515cf65e0c5f70c' + + 'ad75fd2badc18c9f999f287351144eeb1cfcaa9bea33ef5058999ad96a498306' + + '08d2859425685a55b21fab413bfabc42ec5da283853b28c0', ) const messageUnaligned = p.hexDecode( - '40fa5bb7cb56a8957b4e4bec561eee4a5a1025bc8a35d3d0c79a3685d2b90ff0' + - '5f638e9c42c9fd9448b0ce8e7d49e7ea1ce458e47b825b5c7fd8ddf5b4fded46' + - '2a4bcc02f3ff2e89de6764d6d219f575e457fdcf8c163cdf', + '40fa5bb7cb56a8957b4e4bec561eee4a5a1025bc8a35d3d0c79a3685d2b90ff0' + + '5f638e9c42c9fd9448b0ce8e7d49e7ea1ce458e47b825b5c7fd8ddf5b4fded46' + + '2a4bcc02f3ff2e89de6764d6d219f575e457fdcf8c163cdf', ) await expect(() => decrypt(messageTooLong)).rejects.toThrow('message with invalid length: %d > %d') @@ -153,8 +154,8 @@ describe('AuthKey', () => { it('should ignore messages with invalid padding', async () => { const message = p.hexDecode( - '40fa5bb7cb56a895133671d1c637a9836e2c64b4d1a0521d8a25a6416fd4dc9e' + - '79f9478fb837703cc9efa0a19d12143c2a26e57cb4bc64d7bc972dd8f19c53c590cc258162f44afc', + '40fa5bb7cb56a895133671d1c637a9836e2c64b4d1a0521d8a25a6416fd4dc9e' + + '79f9478fb837703cc9efa0a19d12143c2a26e57cb4bc64d7bc972dd8f19c53c590cc258162f44afc', ) await expect(() => decrypt(message)).rejects.toThrow('message with invalid padding size') diff --git a/packages/core/src/network/auth-key.ts b/packages/core/src/network/auth-key.ts index 6e858ffa..e55ea4a9 100644 --- a/packages/core/src/network/auth-key.ts +++ b/packages/core/src/network/auth-key.ts @@ -1,11 +1,12 @@ -import Long from 'long' - -import { tl } from '@mtcute/tl' -import { TlBinaryReader, TlReaderMap } from '@mtcute/tl-runtime' +import type Long from 'long' +import type { tl } from '@mtcute/tl' +import type { TlReaderMap } from '@mtcute/tl-runtime' +import { TlBinaryReader } from '@mtcute/tl-runtime' import { MtcuteError } from '../types/errors.js' import { createAesIgeForMessage } from '../utils/crypto/mtproto.js' -import { buffersEqual, concatBuffers, dataViewFromBuffer, ICryptoProvider, Logger } from '../utils/index.js' +import type { ICryptoProvider, Logger } from '../utils/index.js' +import { buffersEqual, concatBuffers, dataViewFromBuffer } from '../utils/index.js' export class AuthKey { ready = false diff --git a/packages/core/src/network/authorization.ts b/packages/core/src/network/authorization.ts index b8e83224..cf11d21e 100644 --- a/packages/core/src/network/authorization.ts +++ b/packages/core/src/network/authorization.ts @@ -1,7 +1,6 @@ import Long from 'long' - import { mtp } from '@mtcute/tl' -import { TlPublicKey } from '@mtcute/tl/binary/rsa-keys.js' +import type { TlPublicKey } from '@mtcute/tl/binary/rsa-keys.js' import { TlBinaryReader, TlBinaryWriter, TlSerializationCounter } from '@mtcute/tl-runtime' import { MtArgumentError, MtSecurityError, MtTypeAssertionError } from '../types/index.js' @@ -10,18 +9,19 @@ import { findKeyByFingerprints } from '../utils/crypto/keys.js' import { millerRabin } from '../utils/crypto/miller-rabin.js' import { generateKeyAndIvFromNonce } from '../utils/crypto/mtproto.js' import { xorBuffer, xorBufferInPlace } from '../utils/crypto/utils.js' -import { bigIntModPow, bigIntToBuffer, bufferToBigInt, ICryptoProvider, Logger } from '../utils/index.js' +import type { ICryptoProvider, Logger } from '../utils/index.js' +import { bigIntModPow, bigIntToBuffer, bufferToBigInt } from '../utils/index.js' import { mtpAssertTypeIs } from '../utils/type-assertions.js' -import { SessionConnection } from './session-connection.js' + +import type { SessionConnection } from './session-connection.js' // Heavily based on code from https://github.com/LonamiWebs/Telethon/blob/master/telethon/network/authenticator.py // see https://core.telegram.org/mtproto/security_guidelines // const DH_SAFETY_RANGE = bigInt[2].pow(2048 - 64) const DH_SAFETY_RANGE = 2n ** (2048n - 64n) -const KNOWN_DH_PRIME = - // eslint-disable-next-line max-len - 0xc71caeb9c6b1c9048e6c522f70f13f73980d40238e3e21c14934d037563d930f48198a0aa7c14058229493d22530f4dbfa336f6e0ac925139543aed44cce7c3720fd51f69458705ac68cd4fe6b6b13abdc9746512969328454f18faf8c595f642477fe96bb2a941d5bcd1d4ac8cc49880708fa9b378e3c4f3a9060bee67cf9a4a4a695811051907e162753b56b0f6b410dba74d8a84b2a14b3144e0ef1284754fd17ed950d5965b4b9dd46582db1178d169c6bc465b0d6ff9ca3928fef5b9ae4e418fc15e83ebea0f87fa9ff5eed70050ded2849f47bf959d956850ce929851f0d8115f635b105ee2e4e15d04b2454bf6f4fadf034b10403119cd8e3b92fcc5bn +// eslint-disable-next-line style/max-len +const KNOWN_DH_PRIME = 0xC71CAEB9C6B1C9048E6C522F70F13F73980D40238E3E21C14934D037563D930F48198A0AA7C14058229493D22530F4DBFA336F6E0AC925139543AED44CCE7C3720FD51F69458705AC68CD4FE6B6B13ABDC9746512969328454F18FAF8C595F642477FE96BB2A941D5BCD1D4AC8CC49880708FA9B378E3C4F3A9060BEE67CF9A4A4A695811051907E162753B56B0F6B410DBA74D8A84B2A14B3144E0EF1284754FD17ED950D5965B4B9DD46582DB1178D169C6BC465B0D6FF9CA3928FEF5B9AE4E418FC15E83EBEA0F87FA9FF5EED70050DED2849F47BF959D956850CE929851F0D8115F635B105EE2E4E15D04B2454BF6F4FADF034B10403119CD8E3B92FCC5Bn const TWO_POW_2047 = 2n ** 2047n const TWO_POW_2048 = 2n ** 2048n @@ -39,7 +39,7 @@ function checkDhPrime(crypto: ICryptoProvider, log: Logger, dhPrime: bigint, g: return } - let checkedPrime = checkedPrimesCache.find((x) => x.prime === dhPrime) + let checkedPrime = checkedPrimesCache.find(x => x.prime === dhPrime) if (!checkedPrime) { if (dhPrime <= TWO_POW_2047 || dhPrime >= TWO_POW_2048) { @@ -190,7 +190,6 @@ export async function doAuthorization( crypto: ICryptoProvider, expiresIn?: number, ): Promise<[Uint8Array, Long, number]> { - // eslint-disable-next-line dot-notation const session = connection['_session'] const readerMap = session._readerMap const writerMap = session._writerMap @@ -238,7 +237,7 @@ export async function doAuthorization( throw new MtSecurityError('Step 1: invalid nonce from server') } - const serverKeys = resPq.serverPublicKeyFingerprints.map((it) => it.toUnsigned().toString(16)) + const serverKeys = resPq.serverPublicKeyFingerprints.map(it => it.toUnsigned().toString(16)) log.debug('received PQ, keys: %j', serverKeys) // Step 2: DH exchange @@ -246,7 +245,7 @@ export async function doAuthorization( if (!publicKey) { throw new MtSecurityError( - 'Step 2: Could not find server public key with any of these fingerprints: ' + serverKeys.join(', '), + `Step 2: Could not find server public key with any of these fingerprints: ${serverKeys.join(', ')}`, ) } log.debug('found server key, fp = %s, old = %s', publicKey.fingerprint, publicKey.old) @@ -277,9 +276,9 @@ export async function doAuthorization( } const pqInnerData = TlBinaryWriter.serializeObject(writerMap, _pqInnerData) - const encryptedData = publicKey.old ? - rsaEncrypt(pqInnerData, crypto, publicKey) : - rsaPad(pqInnerData, crypto, publicKey) + const encryptedData = publicKey.old + ? rsaEncrypt(pqInnerData, crypto, publicKey) + : rsaPad(pqInnerData, crypto, publicKey) log.debug('requesting DH params') @@ -325,10 +324,10 @@ export async function doAuthorization( mtpAssertTypeIs('auth step 3', serverDhInner, 'mt_server_DH_inner_data') if (!buffersEqual(serverDhInner.nonce, nonce)) { - throw Error('Step 3: invalid nonce from server') + throw new Error('Step 3: invalid nonce from server') } if (!buffersEqual(serverDhInner.serverNonce, resPq.serverNonce)) { - throw Error('Step 3: invalid server nonce from server') + throw new Error('Step 3: invalid server nonce from server') } const dhPrime = bufferToBigInt(serverDhInner.dhPrime) @@ -429,7 +428,7 @@ export async function doAuthorization( continue } - if (dhGen._ !== 'mt_dh_gen_ok') throw new Error() // unreachable + if (dhGen._ !== 'mt_dh_gen_ok') throw new Error('unreachable') const expectedHash = crypto.sha1(concatBuffers([newNonce, new Uint8Array([1]), authKeyAuxHash])) diff --git a/packages/core/src/network/client.ts b/packages/core/src/network/client.ts index f60ff5aa..3720ec72 100644 --- a/packages/core/src/network/client.ts +++ b/packages/core/src/network/client.ts @@ -1,31 +1,36 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import EventEmitter from 'events' +import EventEmitter from 'node:events' -import { mtp, tl } from '@mtcute/tl' +import type { mtp } from '@mtcute/tl' +import { tl } from '@mtcute/tl' import { __tlReaderMap as defaultReaderMap } from '@mtcute/tl/binary/reader.js' import { __tlWriterMap as defaultWriterMap } from '@mtcute/tl/binary/writer.js' -import { TlReaderMap, TlWriterMap } from '@mtcute/tl-runtime' +import type { TlReaderMap, TlWriterMap } from '@mtcute/tl-runtime' -import { IMtStorageProvider } from '../storage/provider.js' -import { StorageManager, StorageManagerExtraOptions } from '../storage/storage.js' -import { MustEqual } from '../types/index.js' -import { - asyncResettable, +import type { IMtStorageProvider } from '../storage/provider.js' +import type { StorageManagerExtraOptions } from '../storage/storage.js' +import { StorageManager } from '../storage/storage.js' +import type { MustEqual } from '../types/index.js' +import type { DcOptions, + ICryptoProvider, + Logger, +} from '../utils/index.js' +import { + LogManager, + asyncResettable, defaultProductionDc, defaultProductionIpv6Dc, defaultTestDc, defaultTestIpv6Dc, - ICryptoProvider, isTlRpcError, - Logger, - LogManager, } from '../utils/index.js' + import { ConfigManager } from './config-manager.js' -import { NetworkManager, NetworkManagerExtraParams, RpcCallOptions } from './network-manager.js' -import { PersistentConnectionParams } from './persistent-connection.js' -import { ReconnectionStrategy } from './reconnection.js' -import { TransportFactory } from './transports/index.js' +import type { NetworkManagerExtraParams, RpcCallOptions } from './network-manager.js' +import { NetworkManager } from './network-manager.js' +import type { PersistentConnectionParams } from './persistent-connection.js' +import type { ReconnectionStrategy } from './reconnection.js' +import type { TransportFactory } from './transports/index.js' /** Options for {@link MtClient} */ export interface MtClientOptions { @@ -199,7 +204,7 @@ export class MtClient extends EventEmitter { /** TL writers map used by the client */ readonly _writerMap: TlWriterMap - readonly _config = new ConfigManager(async () => { + readonly _config: ConfigManager = new ConfigManager(async () => { const res = await this.call({ _: 'help.getConfig' }) if (isTlRpcError(res)) throw new Error(`Failed to get config: ${res.errorMessage}`) @@ -274,8 +279,8 @@ export class MtClient extends EventEmitter { enableErrorReporting: params.enableErrorReporting ?? false, onUsable: () => this.emit('usable'), onConnecting: () => this.emit('connecting'), - onNetworkChanged: (connected) => this.emit('networkChanged', connected), - onUpdate: (upd) => this.emit('update', upd), + onNetworkChanged: connected => this.emit('networkChanged', connected), + onUpdate: upd => this.emit('update', upd), stopSignal: this.stopSignal, ...params.network, }, @@ -308,7 +313,7 @@ export class MtClient extends EventEmitter { * * Call {@link connect} to actually connect. */ - prepare() { + prepare(): Promise { return this._prepare.run() } @@ -362,7 +367,6 @@ export class MtClient extends EventEmitter { message: MustEqual, params?: RpcCallOptions, ): Promise { - // eslint-disable-next-line @typescript-eslint/no-unsafe-return return this.network.call(message, params) } diff --git a/packages/core/src/network/config-manager.test.ts b/packages/core/src/network/config-manager.test.ts index ee766963..56ea4bb7 100644 --- a/packages/core/src/network/config-manager.test.ts +++ b/packages/core/src/network/config-manager.test.ts @@ -1,7 +1,6 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' - import { createStub } from '@mtcute/test' -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { ConfigManager } from './config-manager.js' diff --git a/packages/core/src/network/config-manager.ts b/packages/core/src/network/config-manager.ts index fbe03963..839d5e08 100644 --- a/packages/core/src/network/config-manager.ts +++ b/packages/core/src/network/config-manager.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { Reloadable } from '../utils/reloadable.js' @@ -12,7 +12,7 @@ export class ConfigManager extends Reloadable { constructor(update: () => Promise) { super({ reload: update, - getExpiresAt: (data) => data.expires * 1000, + getExpiresAt: data => data.expires * 1000, }) } @@ -36,17 +36,17 @@ export class ConfigManager extends Reloadable { }) if (params.preferMedia && params.preferIpv6) { - const r = options.find((opt) => opt.mediaOnly && opt.ipv6) + const r = options.find(opt => opt.mediaOnly && opt.ipv6) if (r) return r } if (params.preferMedia) { - const r = options.find((opt) => opt.mediaOnly) + const r = options.find(opt => opt.mediaOnly) if (r) return r } if (params.preferIpv6) { - const r = options.find((opt) => opt.ipv6) + const r = options.find(opt => opt.ipv6) if (r) return r } diff --git a/packages/core/src/network/middlewares/default.ts b/packages/core/src/network/middlewares/default.ts index 6a904910..b48f91f1 100644 --- a/packages/core/src/network/middlewares/default.ts +++ b/packages/core/src/network/middlewares/default.ts @@ -1,12 +1,15 @@ -import { RpcCallMiddleware } from '../network-manager.js' -import { floodWaiter, FloodWaiterOptions } from './flood-waiter.js' -import { internalErrorsHandler, InternalErrorsHandlerOptions } from './internal-errors.js' +import type { RpcCallMiddleware } from '../network-manager.js' + +import type { FloodWaiterOptions } from './flood-waiter.js' +import { floodWaiter } from './flood-waiter.js' +import type { InternalErrorsHandlerOptions } from './internal-errors.js' +import { internalErrorsHandler } from './internal-errors.js' export interface BasicMiddlewaresOptions { floodWaiter?: FloodWaiterOptions internalErrors?: InternalErrorsHandlerOptions } -export const basic = (options?: BasicMiddlewaresOptions): RpcCallMiddleware[] => { +export function basic(options?: BasicMiddlewaresOptions): RpcCallMiddleware[] { return [floodWaiter(options?.floodWaiter ?? {}), internalErrorsHandler(options?.internalErrors ?? {})] } diff --git a/packages/core/src/network/middlewares/flood-waiter.ts b/packages/core/src/network/middlewares/flood-waiter.ts index e4bed0da..26e3c2ad 100644 --- a/packages/core/src/network/middlewares/flood-waiter.ts +++ b/packages/core/src/network/middlewares/flood-waiter.ts @@ -1,9 +1,9 @@ -import { mtp } from '@mtcute/tl' +import type { mtp } from '@mtcute/tl' import { combineAbortSignals } from '../../utils/abort-signal.js' import { sleepWithAbort } from '../../utils/misc-utils.js' import { isTlRpcError } from '../../utils/type-assertions.js' -import { RpcCallMiddleware } from '../network-manager.js' +import type { RpcCallMiddleware } from '../network-manager.js' export interface FloodWaiterOptions { /** @@ -87,9 +87,9 @@ export function floodWaiter(options: FloodWaiterOptions): RpcCallMiddleware { const err = res.errorMessage if ( - err.startsWith('FLOOD_WAIT_') || - err.startsWith('SLOWMODE_WAIT_') || - err.startsWith('FLOOD_TEST_PHONE_WAIT_') + err.startsWith('FLOOD_WAIT_') + || err.startsWith('SLOWMODE_WAIT_') + || err.startsWith('FLOOD_TEST_PHONE_WAIT_') ) { let seconds = Number(err.slice(err.lastIndexOf('_') + 1)) diff --git a/packages/core/src/network/middlewares/internal-errors.ts b/packages/core/src/network/middlewares/internal-errors.ts index 3b0e31ea..60b4c58b 100644 --- a/packages/core/src/network/middlewares/internal-errors.ts +++ b/packages/core/src/network/middlewares/internal-errors.ts @@ -4,7 +4,7 @@ import { MtTimeoutError } from '../../types/errors.js' import { combineAbortSignals } from '../../utils/abort-signal.js' import { sleepWithAbort } from '../../utils/misc-utils.js' import { isTlRpcError } from '../../utils/type-assertions.js' -import { RpcCallMiddleware } from '../network-manager.js' +import type { RpcCallMiddleware } from '../network-manager.js' const CLIENT_ERRORS = /* #__PURE__ */ new Set([ tl.RpcError.BAD_REQUEST, @@ -63,6 +63,8 @@ export function internalErrorsHandler(params: InternalErrorsHandlerOptions): Rpc combineAbortSignals(ctx.manager.params.stopSignal, ctx.params?.abortSignal), ) } + + continue } return res diff --git a/packages/core/src/network/middlewares/on-error.ts b/packages/core/src/network/middlewares/on-error.ts index 07c5585f..127a65af 100644 --- a/packages/core/src/network/middlewares/on-error.ts +++ b/packages/core/src/network/middlewares/on-error.ts @@ -1,8 +1,8 @@ -import { mtp } from '@mtcute/tl' +import type { mtp } from '@mtcute/tl' -import { MaybePromise } from '../../types/utils.js' +import type { MaybePromise } from '../../types/utils.js' import { isTlRpcError } from '../../utils/type-assertions.js' -import { RpcCallMiddleware, RpcCallMiddlewareContext } from '../network-manager.js' +import type { RpcCallMiddleware, RpcCallMiddlewareContext } from '../network-manager.js' /** * Middleware that will call `handler` whenever an RPC error happens, diff --git a/packages/core/src/network/middlewares/on-method.ts b/packages/core/src/network/middlewares/on-method.ts index b8430ad4..cebc7ba9 100644 --- a/packages/core/src/network/middlewares/on-method.ts +++ b/packages/core/src/network/middlewares/on-method.ts @@ -1,7 +1,7 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { Middleware } from '../../utils/composer.js' -import { RpcCallMiddleware, RpcCallMiddlewareContext } from '../network-manager.js' +import type { Middleware } from '../../utils/composer.js' +import type { RpcCallMiddleware, RpcCallMiddlewareContext } from '../network-manager.js' /** * Middleware that will call `handler` whenever `method` RPC method is called. @@ -37,9 +37,9 @@ import { RpcCallMiddleware, RpcCallMiddlewareContext } from '../network-manager. export function onMethod( method: T, middleware: Middleware< - Omit & { - request: Extract - }, + Omit & { + request: Extract + }, tl.RpcCallReturn[T] >, ): RpcCallMiddleware { diff --git a/packages/core/src/network/mtproto-session.ts b/packages/core/src/network/mtproto-session.ts index 6630062e..72dedcd1 100644 --- a/packages/core/src/network/mtproto-session.ts +++ b/packages/core/src/network/mtproto-session.ts @@ -1,23 +1,26 @@ import Long from 'long' - -import { mtp, tl } from '@mtcute/tl' -import { TlBinaryWriter, TlReaderMap, TlSerializationCounter, TlWriterMap } from '@mtcute/tl-runtime' +import type { mtp, tl } from '@mtcute/tl' +import type { TlBinaryWriter, TlReaderMap, TlWriterMap } from '@mtcute/tl-runtime' +import { TlSerializationCounter } from '@mtcute/tl-runtime' import { MtcuteError } from '../types/index.js' -import { - compareLongs, +import type { ControllablePromise, - Deque, - getRandomInt, ICryptoProvider, Logger, +} from '../utils/index.js' +import { + Deque, LongMap, LruSet, - randomLong, SortedArray, + compareLongs, + getRandomInt, + randomLong, } from '../utils/index.js' + import { AuthKey } from './auth-key.js' -import { ServerSaltManager } from './server-salt.js' +import type { ServerSaltManager } from './server-salt.js' export interface PendingRpc { method: string @@ -42,87 +45,87 @@ export interface PendingRpc { } export type PendingMessage = - | { - _: 'rpc' - rpc: PendingRpc - } - | { - _: 'container' - msgIds: Long[] - } - | { - _: 'state' - msgIds: Long[] - containerId: Long - } - | { - _: 'resend' - msgIds: Long[] - containerId: Long - } - | { - _: 'ping' - pingId: Long - containerId: Long - } - | { - _: 'destroy_session' - sessionId: Long - containerId: Long - } - | { - _: 'cancel' - msgId: Long - containerId: Long - } - | { - _: 'future_salts' - containerId: Long - } - | { - _: 'bind' - promise: ControllablePromise - } + | { + _: 'rpc' + rpc: PendingRpc + } + | { + _: 'container' + msgIds: Long[] + } + | { + _: 'state' + msgIds: Long[] + containerId: Long + } + | { + _: 'resend' + msgIds: Long[] + containerId: Long + } + | { + _: 'ping' + pingId: Long + containerId: Long + } + | { + _: 'destroy_session' + sessionId: Long + containerId: Long + } + | { + _: 'cancel' + msgId: Long + containerId: Long + } + | { + _: 'future_salts' + containerId: Long + } + | { + _: 'bind' + promise: ControllablePromise + } /** * Class encapsulating a single MTProto session and storing * all the relevant state */ export class MtprotoSession { - _sessionId = randomLong() + _sessionId: Long = randomLong() _authKey: AuthKey _authKeyTemp: AuthKey _authKeyTempSecondary: AuthKey _timeOffset = 0 - _lastMessageId = Long.ZERO + _lastMessageId: Long = Long.ZERO _seqNo = 0 /// state /// // recent msg ids - recentOutgoingMsgIds = new LruSet(1000, true) - recentIncomingMsgIds = new LruSet(1000, true) + recentOutgoingMsgIds: LruSet = new LruSet(1000, true) + recentIncomingMsgIds: LruSet = new LruSet(1000, true) // queues - queuedRpc = new Deque() + queuedRpc: Deque = new Deque() queuedAcks: Long[] = [] queuedStateReq: Long[] = [] queuedResendReq: Long[] = [] queuedCancelReq: Long[] = [] - getStateSchedule = new SortedArray([], (a, b) => a.getState! - b.getState!) + getStateSchedule: SortedArray = new SortedArray([], (a, b) => a.getState! - b.getState!) - chains = new Map() - chainsPendingFails = new Map>() + chains: Map = new Map() + chainsPendingFails: Map> = new Map() // requests info - pendingMessages = new LongMap() - destroySessionIdToMsgId = new LongMap() + pendingMessages: LongMap = new LongMap() + destroySessionIdToMsgId: LongMap = new LongMap() - lastPingRtt = NaN + lastPingRtt: number = Number.NaN lastPingTime = 0 - lastPingMsgId = Long.ZERO - lastSessionCreatedUid = Long.ZERO + lastPingMsgId: Long = Long.ZERO + lastSessionCreatedUid: Long = Long.ZERO initConnectionCalled = false authorizationPending = false @@ -147,10 +150,10 @@ export class MtprotoSession { get hasPendingMessages(): boolean { return Boolean( - this.queuedRpc.length || - this.queuedAcks.length || - this.queuedStateReq.length || - this.queuedResendReq.length, + this.queuedRpc.length + || this.queuedAcks.length + || this.queuedStateReq.length + || this.queuedResendReq.length, ) } @@ -173,7 +176,7 @@ export class MtprotoSession { this._authKeyTempSecondary.reset() } - updateTimeOffset(offset: number) { + updateTimeOffset(offset: number): void { this.log.debug('time offset updated: %d', offset) this._timeOffset = offset // lastMessageId was generated with (potentially) wrong time @@ -246,7 +249,7 @@ export class MtprotoSession { const timeTicks = Date.now() const timeSec = Math.floor(timeTicks / 1000) - this._timeOffset const timeMSec = timeTicks % 1000 - const random = getRandomInt(0xffff) + const random = getRandomInt(0xFFFF) let messageId = new Long((timeMSec << 21) | (random << 3) | 4, timeSec) @@ -314,9 +317,9 @@ export class MtprotoSession { const messageId = this.getMessageId() const seqNo = this.getSeqNo(isContentRelated) - const length = ArrayBuffer.isView(content) ? - content.length : - TlSerializationCounter.countNeededBytes(writer.objectMap!, content) + const length = ArrayBuffer.isView(content) + ? content.length + : TlSerializationCounter.countNeededBytes(writer.objectMap!, content) writer.long(messageId) writer.int(seqNo) @@ -327,7 +330,7 @@ export class MtprotoSession { return messageId } - onTransportFlood(callback: () => void) { + onTransportFlood(callback: () => void): number | undefined { if (this.current429Timeout) return // already waiting // all active queries must be resent after a timeout diff --git a/packages/core/src/network/multi-session-connection.ts b/packages/core/src/network/multi-session-connection.ts index 7751b83d..5269412e 100644 --- a/packages/core/src/network/multi-session-connection.ts +++ b/packages/core/src/network/multi-session-connection.ts @@ -1,11 +1,14 @@ -import EventEmitter from 'events' +import EventEmitter from 'node:events' -import { mtp, tl } from '@mtcute/tl' +import type { mtp, tl } from '@mtcute/tl' + +import type { Logger } from '../utils/index.js' +import { createControllablePromise } from '../utils/index.js' -import { createControllablePromise, Logger } from '../utils/index.js' import { MtprotoSession } from './mtproto-session.js' -import { SessionConnection, SessionConnectionParams } from './session-connection.js' -import { TransportFactory } from './transports/index.js' +import type { SessionConnectionParams } from './session-connection.js' +import { SessionConnection } from './session-connection.js' +import type { TransportFactory } from './transports/index.js' export class MultiSessionConnection extends EventEmitter { private _log: Logger @@ -29,7 +32,7 @@ export class MultiSessionConnection extends EventEmitter { protected _connections: SessionConnection[] = [] - setCount(count: number, connect = this.params.isMainConnection): void { + setCount(count: number, connect: boolean = this.params.isMainConnection): void { this._count = count this._updateConnections(connect) @@ -160,9 +163,9 @@ export class MultiSessionConnection extends EventEmitter { ) if (this.params.isMainConnection && this.params.isMainDcConnection) { - conn.on('update', (update) => this.emit('update', update)) + conn.on('update', update => this.emit('update', update)) } - conn.on('error', (err) => this.emit('error', err, conn)) + conn.on('error', err => this.emit('error', err, conn)) conn.on('key-change', (key) => { this.emit('key-change', i, key) @@ -173,7 +176,7 @@ export class MultiSessionConnection extends EventEmitter { } }) conn.on('tmp-key-change', (key, expires) => this.emit('tmp-key-change', i, key, expires)) - conn.on('future-salts', (salts) => this.emit('future-salts', salts)) + conn.on('future-salts', salts => this.emit('future-salts', salts)) conn.on('auth-begin', () => { this._log.debug('received auth-begin from connection %d', i) this.emit('auth-begin', i) @@ -191,7 +194,7 @@ export class MultiSessionConnection extends EventEmitter { conn.on('flood-done', () => { this._log.debug('received flood-done from connection %d', i) - this._connections.forEach((it) => it.flushWhenIdle()) + this._connections.forEach(it => it.flushWhenIdle()) }) this._connections.push(conn) @@ -202,8 +205,8 @@ export class MultiSessionConnection extends EventEmitter { _destroyed = false async destroy(): Promise { - await Promise.all(this._connections.map((conn) => conn.destroy())) - this._sessions.forEach((sess) => sess.reset()) + await Promise.all(this._connections.map(conn => conn.destroy())) + this._sessions.forEach(sess => sess.reset()) this.removeAllListeners() this._destroyed = true @@ -320,7 +323,7 @@ export class MultiSessionConnection extends EventEmitter { } changeTransport(factory: TransportFactory): void { - this._connections.forEach((conn) => conn.changeTransport(factory)) + this._connections.forEach(conn => conn.changeTransport(factory)) } getPoolSize(): number { diff --git a/packages/core/src/network/network-manager.ts b/packages/core/src/network/network-manager.ts index c1c2b84a..24daac24 100644 --- a/packages/core/src/network/network-manager.ts +++ b/packages/core/src/network/network-manager.ts @@ -1,20 +1,24 @@ -import { mtp, tl } from '@mtcute/tl' -import { TlReaderMap, TlWriterMap } from '@mtcute/tl-runtime' +import type { mtp, tl } from '@mtcute/tl' +import type { TlReaderMap, TlWriterMap } from '@mtcute/tl-runtime' import { getPlatform } from '../platform.js' -import { StorageManager } from '../storage/storage.js' -import { MtArgumentError, MtcuteError, MtUnsupportedError } from '../types/index.js' -import { ComposedMiddleware, composeMiddlewares, Middleware } from '../utils/composer.js' -import { ControllablePromise, createControllablePromise, DcOptions, ICryptoProvider, Logger } from '../utils/index.js' +import type { StorageManager } from '../storage/storage.js' +import { MtArgumentError, MtUnsupportedError, MtcuteError } from '../types/index.js' +import type { ComposedMiddleware, Middleware } from '../utils/composer.js' +import { composeMiddlewares } from '../utils/composer.js' +import type { ControllablePromise, DcOptions, ICryptoProvider, Logger } from '../utils/index.js' +import { createControllablePromise } from '../utils/index.js' import { assertTypeIs, isTlRpcError } from '../utils/type-assertions.js' -import { ConfigManager } from './config-manager.js' + +import type { ConfigManager } from './config-manager.js' import { basic as defaultMiddlewares } from './middlewares/default.js' import { MultiSessionConnection } from './multi-session-connection.js' -import { PersistentConnectionParams } from './persistent-connection.js' -import { defaultReconnectionStrategy, ReconnectionStrategy } from './reconnection.js' +import type { PersistentConnectionParams } from './persistent-connection.js' +import type { ReconnectionStrategy } from './reconnection.js' +import { defaultReconnectionStrategy } from './reconnection.js' import { ServerSaltManager } from './server-salt.js' -import { SessionConnection, SessionConnectionParams } from './session-connection.js' -import { TransportFactory } from './transports/index.js' +import type { SessionConnection, SessionConnectionParams } from './session-connection.js' +import type { TransportFactory } from './transports/index.js' export type ConnectionKind = 'main' | 'upload' | 'download' | 'downloadSmall' @@ -452,7 +456,7 @@ export class DcConnectionManager { this.main.setCount(count) } - async destroy() { + async destroy(): Promise { await this.main.destroy() await this.upload.destroy() await this.download.destroy() @@ -465,15 +469,15 @@ export class DcConnectionManager { * Class that manages all connections to Telegram servers. */ export class NetworkManager { - readonly _log - readonly _storage + readonly _log: Logger + readonly _storage: StorageManager readonly _initConnectionParams: tl.RawInitConnectionRequest readonly _transportFactory: TransportFactory readonly _reconnectionStrategy: ReconnectionStrategy readonly _connectionCount: ConnectionCountDelegate - protected readonly _dcConnections = new Map() + protected readonly _dcConnections: Map = new Map() protected _primaryDc?: DcConnectionManager private _updateHandler: (upd: tl.TypeUpdates, fromClient: boolean) => void @@ -807,7 +811,7 @@ export class NetworkManager { let res = await multi.sendRpc(message, params?.timeout, params?.abortSignal, params?.chainId) if (!isTlRpcError(res)) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-return + // eslint-disable-next-line ts/no-unsafe-return return res } @@ -815,9 +819,9 @@ export class NetworkManager { if (manager === this._primaryDc) { if ( - err.startsWith('PHONE_MIGRATE_') || - err.startsWith('NETWORK_MIGRATE_') || - err.startsWith('USER_MIGRATE_') + err.startsWith('PHONE_MIGRATE_') + || err.startsWith('NETWORK_MIGRATE_') + || err.startsWith('USER_MIGRATE_') ) { const newDc = Number(err.slice(err.lastIndexOf('_') + 1)) @@ -849,7 +853,7 @@ export class NetworkManager { res = await multi.sendRpc(message, params?.timeout, params?.abortSignal, params?.chainId) } - // eslint-disable-next-line @typescript-eslint/no-unsafe-return + // eslint-disable-next-line ts/no-unsafe-return return res } @@ -862,7 +866,7 @@ export class NetworkManager { } } - getPoolSize(kind: ConnectionKind, dcId?: number) { + getPoolSize(kind: ConnectionKind, dcId?: number): number { const dc = dcId ? this._dcConnections.get(dcId) : this._primaryDc if (!dc) { @@ -878,7 +882,7 @@ export class NetworkManager { return dc[kind].getPoolSize() } - getPrimaryDcId() { + getPrimaryDcId(): number { if (!this._primaryDc) throw new MtcuteError('Not connected to any DC') return this._primaryDc.dcId diff --git a/packages/core/src/network/persistent-connection.test.ts b/packages/core/src/network/persistent-connection.test.ts index 1a9680eb..9d77b90d 100644 --- a/packages/core/src/network/persistent-connection.test.ts +++ b/packages/core/src/network/persistent-connection.test.ts @@ -1,9 +1,10 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' - -import { createStub, defaultTestCryptoProvider, StubTelegramTransport } from '@mtcute/test' +import { StubTelegramTransport, createStub, defaultTestCryptoProvider } from '@mtcute/test' import { LogManager } from '../utils/index.js' -import { PersistentConnection, PersistentConnectionParams } from './persistent-connection.js' + +import type { PersistentConnectionParams } from './persistent-connection.js' +import { PersistentConnection } from './persistent-connection.js' import { defaultReconnectionStrategy } from './reconnection.js' class FakePersistentConnection extends PersistentConnection { @@ -16,6 +17,7 @@ class FakePersistentConnection extends PersistentConnection { onConnected() { this.onConnectionUsable() } + onError() {} onMessage() {} } diff --git a/packages/core/src/network/persistent-connection.ts b/packages/core/src/network/persistent-connection.ts index 5fd95446..35eb5ee7 100644 --- a/packages/core/src/network/persistent-connection.ts +++ b/packages/core/src/network/persistent-connection.ts @@ -1,9 +1,11 @@ -import EventEmitter from 'events' +import EventEmitter from 'node:events' import { MtcuteError } from '../types/index.js' -import { BasicDcOption, ICryptoProvider, Logger } from '../utils/index.js' -import { ReconnectionStrategy } from './reconnection.js' -import { ITelegramTransport, TransportFactory, TransportState } from './transports/index.js' +import type { BasicDcOption, ICryptoProvider, Logger } from '../utils/index.js' + +import type { ReconnectionStrategy } from './reconnection.js' +import type { ITelegramTransport, TransportFactory } from './transports/index.js' +import { TransportState } from './transports/index.js' export interface PersistentConnectionParams { crypto: ICryptoProvider diff --git a/packages/core/src/network/server-salt.ts b/packages/core/src/network/server-salt.ts index 79e66648..3db7a41d 100644 --- a/packages/core/src/network/server-salt.ts +++ b/packages/core/src/network/server-salt.ts @@ -1,11 +1,10 @@ import Long from 'long' - -import { mtp } from '@mtcute/tl' +import type { mtp } from '@mtcute/tl' export class ServerSaltManager { private _futureSalts: mtp.RawMt_future_salt[] = [] - currentSalt = Long.ZERO + currentSalt: Long = Long.ZERO isFetching = false diff --git a/packages/core/src/network/session-connection.ts b/packages/core/src/network/session-connection.ts index eb528f9f..25074e5e 100644 --- a/packages/core/src/network/session-connection.ts +++ b/packages/core/src/network/session-connection.ts @@ -1,27 +1,30 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -// will be reworked in MTQ-32 import Long from 'long' - -import { mtp, tl } from '@mtcute/tl' -import { TlBinaryReader, TlBinaryWriter, TlReaderMap, TlSerializationCounter, TlWriterMap } from '@mtcute/tl-runtime' +import type { mtp } from '@mtcute/tl' +import { tl } from '@mtcute/tl' +import type { TlReaderMap, TlWriterMap } from '@mtcute/tl-runtime' +import { TlBinaryReader, TlBinaryWriter, TlSerializationCounter } from '@mtcute/tl-runtime' import { getPlatform } from '../platform.js' -import { MtArgumentError, MtcuteError, MtTimeoutError } from '../types/index.js' +import { MtArgumentError, MtTimeoutError, MtcuteError } from '../types/index.js' import { createAesIgeForMessageOld } from '../utils/crypto/mtproto.js' -import { - concatBuffers, +import type { ControllablePromise, - createControllablePromise, - EarlyTimer, ICryptoProvider, +} from '../utils/index.js' +import { + EarlyTimer, + concatBuffers, + createControllablePromise, longFromBuffer, randomLong, removeFromLongArray, } from '../utils/index.js' + import { doAuthorization } from './authorization.js' -import { MtprotoSession, PendingMessage, PendingRpc } from './mtproto-session.js' -import { PersistentConnection, PersistentConnectionParams } from './persistent-connection.js' -import { ServerSaltManager } from './server-salt.js' +import type { MtprotoSession, PendingMessage, PendingRpc } from './mtproto-session.js' +import type { PersistentConnectionParams } from './persistent-connection.js' +import { PersistentConnection } from './persistent-connection.js' +import type { ServerSaltManager } from './server-salt.js' import { TransportError } from './transports/abstract.js' export interface SessionConnectionParams extends PersistentConnectionParams { @@ -48,15 +51,15 @@ const GET_STATE_INTERVAL = 1500 // 1.5 seconds // destroy_auth_key#d1435160 = DestroyAuthKeyRes; // const DESTROY_AUTH_KEY = Buffer.from('605134d1', 'hex') // gzip_packed#3072cfa1 packed_data:string = Object; -const GZIP_PACKED_ID = 0x3072cfa1 +const GZIP_PACKED_ID = 0x3072CFA1 // msg_container#73f1f8dc messages:vector<%Message> = MessageContainer; -const MSG_CONTAINER_ID = 0x73f1f8dc +const MSG_CONTAINER_ID = 0x73F1F8DC // rpc_result#f35c6d01 req_msg_id:long result:Object = RpcResult; -const RPC_RESULT_ID = 0xf35c6d01 +const RPC_RESULT_ID = 0xF35C6D01 // rpc_error#2144ca19 error_code:int error_message:string = RpcError; -const RPC_ERROR_ID = 0x2144ca19 +const RPC_ERROR_ID = 0x2144CA19 // invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X; -const INVOKE_AFTER_MSG_ID = 0xcb9f372d +const INVOKE_AFTER_MSG_ID = 0xCB9F372D const INVOKE_AFTER_MSG_SIZE = 12 // 8 (invokeAfterMsg) + 4 (msg_id) /** @@ -256,7 +259,7 @@ export class SessionConnection extends PersistentConnection { this.emit('error', error) } - protected onConnectionUsable() { + protected onConnectionUsable(): void { super.onConnectionUsable() if (this.params.withUpdates) { @@ -498,7 +501,7 @@ export class SessionConnection extends PersistentConnection { const promise = createControllablePromise() const timeoutId = setTimeout(() => { promise.reject(new MtTimeoutError(timeout)) - this._pendingWaitForUnencrypted = this._pendingWaitForUnencrypted.filter((it) => it[0] !== promise) + this._pendingWaitForUnencrypted = this._pendingWaitForUnencrypted.filter(it => it[0] !== promise) }, timeout) this._pendingWaitForUnencrypted.push([promise, timeoutId]) @@ -615,7 +618,7 @@ export class SessionConnection extends PersistentConnection { this._onBadMsgNotification(messageId, message) break case 'mt_msgs_ack': - message.msgIds.forEach((msgId) => this._onMessageAcked(msgId)) + message.msgIds.forEach(msgId => this._onMessageAcked(msgId)) break case 'mt_new_session_created': this._onNewSessionCreated(message) @@ -680,7 +683,7 @@ export class SessionConnection extends PersistentConnection { try { // eslint-disable-next-line resultType = (message.object() as any)._ - } catch (err) { + } catch { resultType = message.peekUint() } this.log.warn('received rpc_result with %j with req_msg_id = 0', resultType) @@ -694,9 +697,9 @@ export class SessionConnection extends PersistentConnection { let result try { - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + // eslint-disable-next-line ts/no-unsafe-assignment result = message.object() as any - } catch (err) { + } catch { result = '[failed to parse]' } @@ -716,7 +719,8 @@ export class SessionConnection extends PersistentConnection { if (msg._ !== 'rpc') { if (msg._ === 'bind') { this._sendAck(messageId) - msg.promise.resolve(message.object()) + // eslint-disable-next-line ts/no-unsafe-argument + msg.promise.resolve(message.object() as any) return } @@ -726,7 +730,7 @@ export class SessionConnection extends PersistentConnection { try { result = message.object() as mtp.TlObject - } catch (err) { + } catch { this.log.debug('failed to parse rpc_result for cancel request %l, ignoring', reqMsgId) return @@ -762,7 +766,7 @@ export class SessionConnection extends PersistentConnection { if (objectId === GZIP_PACKED_ID) { const inner = this._crypto.gunzip(message.bytes()) - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + // eslint-disable-next-line ts/no-unsafe-assignment result = TlBinaryReader.deserializeObject(this._readerMap, inner) } else { result = message.object(objectId) @@ -916,7 +920,7 @@ export class SessionConnection extends PersistentConnection { case 'container': this.log.debug('received ack for container %l (size = %d)', msgId, msg.msgIds.length) - msg.msgIds.forEach((msgId) => this._onMessageAcked(msgId, true)) + msg.msgIds.forEach(msgId => this._onMessageAcked(msgId, true)) // we no longer need info about the container this._session.pendingMessages.delete(msgId) @@ -991,7 +995,7 @@ export class SessionConnection extends PersistentConnection { switch (msgInfo._) { case 'container': this.log.debug('container %l (size = %d) failed because of %s', msgId, msgInfo.msgIds.length, reason) - msgInfo.msgIds.forEach((msgId) => this._onMessageFailed(msgId, reason, true)) + msgInfo.msgIds.forEach(msgId => this._onMessageFailed(msgId, reason, true)) break case 'ping': this.log.debug('ping (msg_id = %l) failed because of %s', msgId, reason) @@ -1045,7 +1049,7 @@ export class SessionConnection extends PersistentConnection { break case 'bind': this.log.debug('temp key binding request %l failed because of %s, retrying', msgId, reason) - msgInfo.promise.reject(Error(reason)) + msgInfo.promise.reject(new Error(reason)) break case 'future_salts': this.log.debug('future_salts request %l failed because of %s, will retry', msgId, reason) @@ -1495,7 +1499,7 @@ export class SessionConnection extends PersistentConnection { } } - protected _onInactivityTimeout() { + protected _onInactivityTimeout(): void { // we should send all pending acks and other service messages // before dropping the connection // additionally, if we are still waiting for some rpc results, @@ -1534,10 +1538,10 @@ export class SessionConnection extends PersistentConnection { private _flush(): void { if ( - this._disconnectedManually || - !this._session._authKey.ready || - this._isPfsBindingPending || - this._session.current429Timeout + this._disconnectedManually + || !this._session._authKey.ready + || this._isPfsBindingPending + || this._session.current429Timeout ) { this.log.debug( 'skipping flush, connection is not usable (offline = %b, auth key ready = %b, pfs binding pending = %b, 429 timeout = %b)', @@ -1669,7 +1673,7 @@ export class SessionConnection extends PersistentConnection { if (idx > 0) { const toGetState = this._session.getStateSchedule.raw.splice(0, idx) if (!getStateMsgIds) getStateMsgIds = [] - toGetState.forEach((it) => getStateMsgIds!.push(it.msgId!)) + toGetState.forEach(it => getStateMsgIds!.push(it.msgId!)) } if (getStateMsgIds) { @@ -1734,9 +1738,10 @@ export class SessionConnection extends PersistentConnection { const rpcToSend: PendingRpc[] = [] while ( - this._session.queuedRpc.length && - containerSize < 32768 && // 2^15 - containerMessageCount < 1020 + this._session.queuedRpc.length + && containerSize < 32768 // 2^15 + // eslint-disable-next-line no-unmodified-loop-condition + && containerMessageCount < 1020 ) { const msg = this._session.queuedRpc.popFront()! if (msg.cancelled) continue @@ -1993,7 +1998,7 @@ export class SessionConnection extends PersistentConnection { resendMsgId, getFutureSaltsRequest, getFutureSaltsMsgId, - rpcToSend.map((it) => it.method), + rpcToSend.map(it => it.method), useContainer, rootMsgId, ) diff --git a/packages/core/src/network/transports/abstract.ts b/packages/core/src/network/transports/abstract.ts index 94f2be42..d941af0d 100644 --- a/packages/core/src/network/transports/abstract.ts +++ b/packages/core/src/network/transports/abstract.ts @@ -1,9 +1,9 @@ -import EventEmitter from 'events' +import type EventEmitter from 'node:events' -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { MaybePromise } from '../../types/index.js' -import { BasicDcOption, ICryptoProvider, Logger } from '../../utils/index.js' +import type { MaybePromise } from '../../types/index.js' +import type { BasicDcOption, ICryptoProvider, Logger } from '../../utils/index.js' /** Current state of the transport */ export enum TransportState { @@ -91,7 +91,6 @@ export interface IPacketCodec { * (Transport error)[https://core.telegram.org/mtproto/mtproto-transports#transport-errors] is encountered. */ on(event: 'error', handler: (error: Error) => void): void - /** Emitted when a full packet has been processed. */ on(event: 'packet', handler: (packet: Uint8Array) => void): void /** diff --git a/packages/core/src/network/transports/intermediate.test.ts b/packages/core/src/network/transports/intermediate.test.ts index a13e9717..ab98a5d3 100644 --- a/packages/core/src/network/transports/intermediate.test.ts +++ b/packages/core/src/network/transports/intermediate.test.ts @@ -1,5 +1,4 @@ import { describe, expect, it } from 'vitest' - import { defaultTestCryptoProvider, useFakeMathRandom } from '@mtcute/test' import { IntermediatePacketCodec, PaddedIntermediatePacketCodec, TransportError } from '../../index.js' diff --git a/packages/core/src/network/transports/intermediate.ts b/packages/core/src/network/transports/intermediate.ts index 66f93a54..9c75af2c 100644 --- a/packages/core/src/network/transports/intermediate.ts +++ b/packages/core/src/network/transports/intermediate.ts @@ -1,9 +1,12 @@ -import { dataViewFromBuffer, getRandomInt, ICryptoProvider } from '../../utils/index.js' -import { IPacketCodec, TransportError } from './abstract.js' +import type { ICryptoProvider } from '../../utils/index.js' +import { dataViewFromBuffer, getRandomInt } from '../../utils/index.js' + +import type { IPacketCodec } from './abstract.js' +import { TransportError } from './abstract.js' import { StreamedCodec } from './streamed.js' -const TAG = new Uint8Array([0xee, 0xee, 0xee, 0xee]) -const PADDED_TAG = new Uint8Array([0xdd, 0xdd, 0xdd, 0xdd]) +const TAG = new Uint8Array([0xEE, 0xEE, 0xEE, 0xEE]) +const PADDED_TAG = new Uint8Array([0xDD, 0xDD, 0xDD, 0xDD]) /** * Intermediate packet codec. @@ -59,7 +62,7 @@ export class PaddedIntermediatePacketCodec extends IntermediatePacketCodec { } private _crypto!: ICryptoProvider - setup?(crypto: ICryptoProvider) { + setup?(crypto: ICryptoProvider): void { this._crypto = crypto } diff --git a/packages/core/src/network/transports/obfuscated.test.ts b/packages/core/src/network/transports/obfuscated.test.ts index 805b74ff..4dc8d978 100644 --- a/packages/core/src/network/transports/obfuscated.test.ts +++ b/packages/core/src/network/transports/obfuscated.test.ts @@ -1,11 +1,12 @@ import { describe, expect, it, vi } from 'vitest' - import { defaultTestCryptoProvider, u8HexDecode } from '@mtcute/test' import { getPlatform } from '../../platform.js' import { LogManager } from '../../utils/index.js' + import { IntermediatePacketCodec } from './intermediate.js' -import { MtProxyInfo, ObfuscatedPacketCodec } from './obfuscated.js' +import type { MtProxyInfo } from './obfuscated.js' +import { ObfuscatedPacketCodec } from './obfuscated.js' const p = getPlatform() @@ -26,7 +27,7 @@ describe('ObfuscatedPacketCodec', () => { const tag = await codec.tag() expect(p.hexEncode(tag)).toEqual( - 'ff'.repeat(56) + 'fce8ab2203db2bff', // encrypted part + `${'ff'.repeat(56)}fce8ab2203db2bff`, // encrypted part ) }) @@ -44,7 +45,7 @@ describe('ObfuscatedPacketCodec', () => { const tag = await codec.tag() expect(p.hexEncode(tag)).toEqual( - 'ff'.repeat(56) + 'ecec4cbda8bb188b', // encrypted part with dcId = 1 + `${'ff'.repeat(56)}ecec4cbda8bb188b`, // encrypted part with dcId = 1 ) }) @@ -61,7 +62,7 @@ describe('ObfuscatedPacketCodec', () => { const tag = await codec.tag() expect(p.hexEncode(tag)).toEqual( - 'ff'.repeat(56) + 'ecec4cbdb89c188b', // encrypted part with dcId = 10001 + `${'ff'.repeat(56)}ecec4cbdb89c188b`, // encrypted part with dcId = 10001 ) }) @@ -78,7 +79,7 @@ describe('ObfuscatedPacketCodec', () => { const tag = await codec.tag() expect(p.hexEncode(tag)).toEqual( - 'ff'.repeat(56) + 'ecec4cbd5644188b', // encrypted part with dcId = -1 + `${'ff'.repeat(56)}ecec4cbd5644188b`, // encrypted part with dcId = -1 ) }) }) diff --git a/packages/core/src/network/transports/obfuscated.ts b/packages/core/src/network/transports/obfuscated.ts index aaa36512..993fbdcf 100644 --- a/packages/core/src/network/transports/obfuscated.ts +++ b/packages/core/src/network/transports/obfuscated.ts @@ -1,6 +1,7 @@ import { bufferToReversed, concatBuffers, dataViewFromBuffer } from '../../utils/buffer-utils.js' -import { IAesCtr } from '../../utils/index.js' -import { IPacketCodec } from './abstract.js' +import type { IAesCtr } from '../../utils/index.js' + +import type { IPacketCodec } from './abstract.js' import { WrappedCodec } from './wrapped.js' export interface MtProxyInfo { @@ -27,19 +28,19 @@ export class ObfuscatedPacketCodec extends WrappedCodec implements IPacketCodec for (;;) { random = this._crypto.randomBytes(64) - if (random[0] === 0xef) continue + if (random[0] === 0xEF) continue dv = dataViewFromBuffer(random) const firstInt = dv.getUint32(0, true) if ( - firstInt === 0x44414548 || // HEAD - firstInt === 0x54534f50 || // POST - firstInt === 0x20544547 || // GET(space) - firstInt === 0x4954504f || // OPTI - firstInt === 0xdddddddd || // padded intermediate - firstInt === 0xeeeeeeee || // intermediate - firstInt === 0x02010316 // no idea, taken from tdlib + firstInt === 0x44414548 // HEAD + || firstInt === 0x54534F50 // POST + || firstInt === 0x20544547 // GET(space) + || firstInt === 0x4954504F // OPTI + || firstInt === 0xDDDDDDDD // padded intermediate + || firstInt === 0xEEEEEEEE // intermediate + || firstInt === 0x02010316 // no idea, taken from tdlib ) { continue } diff --git a/packages/core/src/network/transports/streamed.ts b/packages/core/src/network/transports/streamed.ts index c5289996..833b6ba6 100644 --- a/packages/core/src/network/transports/streamed.ts +++ b/packages/core/src/network/transports/streamed.ts @@ -1,4 +1,4 @@ -import EventEmitter from 'events' +import EventEmitter from 'node:events' import { concatBuffers } from '../../utils/index.js' @@ -9,7 +9,7 @@ import { concatBuffers } from '../../utils/index.js' * multiple transport packets. */ export abstract class StreamedCodec extends EventEmitter { - protected _stream = new Uint8Array(0) + protected _stream: Uint8Array = new Uint8Array(0) /** * Should return whether a full packet is available diff --git a/packages/core/src/network/transports/wrapped.ts b/packages/core/src/network/transports/wrapped.ts index 539b46fd..6fe52158 100644 --- a/packages/core/src/network/transports/wrapped.ts +++ b/packages/core/src/network/transports/wrapped.ts @@ -1,7 +1,8 @@ -import EventEmitter from 'events' +import EventEmitter from 'node:events' -import { ICryptoProvider, Logger } from '../../utils/index.js' -import { IPacketCodec } from './abstract.js' +import type { ICryptoProvider, Logger } from '../../utils/index.js' + +import type { IPacketCodec } from './abstract.js' export abstract class WrappedCodec extends EventEmitter { protected _crypto!: ICryptoProvider @@ -10,8 +11,8 @@ export abstract class WrappedCodec extends EventEmitter { constructor(inner: IPacketCodec) { super() this._inner = inner - this._inner.on('error', (err) => this.emit('error', err)) - this._inner.on('packet', (buf) => this.emit('packet', buf)) + this._inner.on('error', err => this.emit('error', err)) + this._inner.on('packet', buf => this.emit('packet', buf)) } removeAllListeners(): this { diff --git a/packages/core/src/platform.ts b/packages/core/src/platform.ts index aed2a802..30d480d0 100644 --- a/packages/core/src/platform.ts +++ b/packages/core/src/platform.ts @@ -1,21 +1,22 @@ -import { ITlPlatform, TlBinaryReader, TlBinaryWriter } from '@mtcute/tl-runtime' +import type { ITlPlatform } from '@mtcute/tl-runtime' +import { TlBinaryReader, TlBinaryWriter } from '@mtcute/tl-runtime' -import { UploadFileLike } from './highlevel/types/files/utils.js' +import type { UploadFileLike } from './highlevel/types/files/utils.js' import { MtUnsupportedError } from './types/errors.js' -import { MaybePromise } from './types/index.js' +import type { MaybePromise } from './types/index.js' export interface ICorePlatform extends ITlPlatform { - beforeExit(fn: () => void): () => void - log(color: number, level: number, tag: string, fmt: string, args: unknown[]): void - getDefaultLogLevel(): number | null - getDeviceModel(): string - normalizeFile?(file: UploadFileLike): MaybePromise<{ + beforeExit: (fn: () => void) => () => void + log: (color: number, level: number, tag: string, fmt: string, args: unknown[]) => void + getDefaultLogLevel: () => number | null + getDeviceModel: () => string + normalizeFile?: (file: UploadFileLike) => MaybePromise<{ file?: UploadFileLike fileSize?: number fileName?: string } | null> - onNetworkChanged?(fn: (connected: boolean) => void): () => void - isOnline?(): boolean + onNetworkChanged?: (fn: (connected: boolean) => void) => () => void + isOnline?: () => boolean } // NB: when using with some bundlers (e.g. vite) re-importing this module will not return the same object @@ -39,7 +40,6 @@ export function setPlatform(platform: ICorePlatform): void { TlBinaryReader.platform = platform TlBinaryWriter.platform = platform - // eslint-disable-next-line @typescript-eslint/no-explicit-any ;(globalThis as any)[platformKey] = platform } diff --git a/packages/core/src/storage/driver.ts b/packages/core/src/storage/driver.ts index 496aa975..cb5432c4 100644 --- a/packages/core/src/storage/driver.ts +++ b/packages/core/src/storage/driver.ts @@ -1,5 +1,5 @@ -import { MaybePromise } from '../types/utils.js' -import { Logger } from '../utils/logger.js' +import type { MaybePromise } from '../types/utils.js' +import type { Logger } from '../utils/logger.js' /** * Basic storage driver interface, @@ -14,7 +14,7 @@ export interface IStorageDriver { * May be called more than once, handle this with care * (or use {@link BaseStorageDriver} that handles this for you) */ - load?(): MaybePromise + load?: () => MaybePromise /** * Save session to some external storage. * Should be used to commit pending changes in the session. @@ -24,20 +24,20 @@ export interface IStorageDriver { * It is safe to batch all changes and only commit them here, * unless stated otherwise in the method description */ - save?(): MaybePromise + save?: () => MaybePromise /** * Cleanup session and release all used resources. * * May be called more than once, handle this with care * (or use {@link BaseStorageDriver} that handles this for you) */ - destroy?(): MaybePromise + destroy?: () => MaybePromise /** * Setup the driver, passing the logger instance, * in case your driver needs it */ - setup?(log: Logger): void + setup?: (log: Logger) => void } /** diff --git a/packages/core/src/storage/memory/driver.ts b/packages/core/src/storage/memory/driver.ts index 558db076..c92d86f1 100644 --- a/packages/core/src/storage/memory/driver.ts +++ b/packages/core/src/storage/memory/driver.ts @@ -1,4 +1,4 @@ -import { IStorageDriver } from '../driver.js' +import type { IStorageDriver } from '../driver.js' export class MemoryStorageDriver implements IStorageDriver { readonly states: Map = new Map() @@ -11,5 +11,5 @@ export class MemoryStorageDriver implements IStorageDriver { return this.states.get(repo) as T } - load() {} + load(): void {} } diff --git a/packages/core/src/storage/memory/index.ts b/packages/core/src/storage/memory/index.ts index 8d74e46f..dba91ede 100644 --- a/packages/core/src/storage/memory/index.ts +++ b/packages/core/src/storage/memory/index.ts @@ -1,5 +1,6 @@ -import { ITelegramStorageProvider } from '../../highlevel/storage/provider.js' -import { IMtStorageProvider } from '../provider.js' +import type { ITelegramStorageProvider } from '../../highlevel/storage/provider.js' +import type { IMtStorageProvider } from '../provider.js' + import { MemoryStorageDriver } from './driver.js' import { MemoryAuthKeysRepository } from './repository/auth-keys.js' import { MemoryKeyValueRepository } from './repository/kv.js' @@ -16,9 +17,9 @@ export { MemoryStorageDriver } from './driver.js' * or if you know exactly what you're doing. */ export class MemoryStorage implements IMtStorageProvider, ITelegramStorageProvider { - readonly driver = new MemoryStorageDriver() - readonly kv = new MemoryKeyValueRepository(this.driver) - readonly authKeys = new MemoryAuthKeysRepository(this.driver) - readonly peers = new MemoryPeersRepository(this.driver) - readonly refMessages = new MemoryRefMessagesRepository(this.driver) + readonly driver: MemoryStorageDriver = new MemoryStorageDriver() + readonly kv: MemoryKeyValueRepository = new MemoryKeyValueRepository(this.driver) + readonly authKeys: MemoryAuthKeysRepository = new MemoryAuthKeysRepository(this.driver) + readonly peers: MemoryPeersRepository = new MemoryPeersRepository(this.driver) + readonly refMessages: MemoryRefMessagesRepository = new MemoryRefMessagesRepository(this.driver) } diff --git a/packages/core/src/storage/memory/memory.test.ts b/packages/core/src/storage/memory/memory.test.ts index 03b6a2b8..2046bf75 100644 --- a/packages/core/src/storage/memory/memory.test.ts +++ b/packages/core/src/storage/memory/memory.test.ts @@ -1,5 +1,4 @@ import { describe } from 'vitest' - import { testAuthKeysRepository, testKeyValueRepository, diff --git a/packages/core/src/storage/memory/repository/auth-keys.ts b/packages/core/src/storage/memory/repository/auth-keys.ts index 233184b5..9580b430 100644 --- a/packages/core/src/storage/memory/repository/auth-keys.ts +++ b/packages/core/src/storage/memory/repository/auth-keys.ts @@ -1,5 +1,5 @@ -import { IAuthKeysRepository } from '../../repository/auth-keys.js' -import { MemoryStorageDriver } from '../driver.js' +import type { IAuthKeysRepository } from '../../repository/auth-keys.js' +import type { MemoryStorageDriver } from '../driver.js' interface AuthKeysState { authKeys: Map @@ -8,9 +8,9 @@ interface AuthKeysState { } export class MemoryAuthKeysRepository implements IAuthKeysRepository { - readonly state + readonly state: AuthKeysState constructor(readonly _driver: MemoryStorageDriver) { - this.state = this._driver.getState('authKeys', () => ({ + this.state = this._driver.getState('authKeys', () => ({ authKeys: new Map(), authKeysTemp: new Map(), authKeysTempExpiry: new Map(), diff --git a/packages/core/src/storage/memory/repository/kv.ts b/packages/core/src/storage/memory/repository/kv.ts index fe2fca6f..d4912511 100644 --- a/packages/core/src/storage/memory/repository/kv.ts +++ b/packages/core/src/storage/memory/repository/kv.ts @@ -1,8 +1,8 @@ -import { IKeyValueRepository } from '../../repository/key-value.js' -import { MemoryStorageDriver } from '../driver.js' +import type { IKeyValueRepository } from '../../repository/key-value.js' +import type { MemoryStorageDriver } from '../driver.js' export class MemoryKeyValueRepository implements IKeyValueRepository { - readonly state + readonly state: Map constructor(readonly _driver: MemoryStorageDriver) { this.state = this._driver.getState>('kv', () => new Map()) } diff --git a/packages/core/src/storage/memory/repository/peers.ts b/packages/core/src/storage/memory/repository/peers.ts index 6d2b7eac..e5b5c37f 100644 --- a/packages/core/src/storage/memory/repository/peers.ts +++ b/packages/core/src/storage/memory/repository/peers.ts @@ -1,5 +1,5 @@ -import { IPeersRepository } from '../../../highlevel/storage/repository/peers.js' -import { MemoryStorageDriver } from '../driver.js' +import type { IPeersRepository } from '../../../highlevel/storage/repository/peers.js' +import type { MemoryStorageDriver } from '../driver.js' interface PeersState { entities: Map @@ -8,9 +8,9 @@ interface PeersState { } export class MemoryPeersRepository implements IPeersRepository { - readonly state + readonly state: PeersState constructor(readonly _driver: MemoryStorageDriver) { - this.state = this._driver.getState('peers', () => ({ + this.state = this._driver.getState('peers', () => ({ entities: new Map(), usernameIndex: new Map(), phoneIndex: new Map(), diff --git a/packages/core/src/storage/memory/repository/ref-messages.ts b/packages/core/src/storage/memory/repository/ref-messages.ts index 0cb2b746..13a98b57 100644 --- a/packages/core/src/storage/memory/repository/ref-messages.ts +++ b/packages/core/src/storage/memory/repository/ref-messages.ts @@ -1,14 +1,14 @@ -import { IReferenceMessagesRepository } from '../../../highlevel/storage/repository/ref-messages.js' -import { MemoryStorageDriver } from '../driver.js' +import type { IReferenceMessagesRepository } from '../../../highlevel/storage/repository/ref-messages.js' +import type { MemoryStorageDriver } from '../driver.js' interface RefMessagesState { refs: Map> } export class MemoryRefMessagesRepository implements IReferenceMessagesRepository { - readonly state + readonly state: RefMessagesState constructor(readonly _driver: MemoryStorageDriver) { - this.state = this._driver.getState('refMessages', () => ({ + this.state = this._driver.getState('refMessages', () => ({ refs: new Map(), })) } diff --git a/packages/core/src/storage/provider.ts b/packages/core/src/storage/provider.ts index acd2e783..04e121fb 100644 --- a/packages/core/src/storage/provider.ts +++ b/packages/core/src/storage/provider.ts @@ -1,6 +1,6 @@ -import { IStorageDriver } from './driver.js' -import { IAuthKeysRepository } from './repository/auth-keys.js' -import { IKeyValueRepository } from './repository/key-value.js' +import type { IStorageDriver } from './driver.js' +import type { IAuthKeysRepository } from './repository/auth-keys.js' +import type { IKeyValueRepository } from './repository/key-value.js' export type IStorageProvider = T & { readonly driver: IStorageDriver diff --git a/packages/core/src/storage/repository/auth-keys.ts b/packages/core/src/storage/repository/auth-keys.ts index d8b9ea8a..c1406419 100644 --- a/packages/core/src/storage/repository/auth-keys.ts +++ b/packages/core/src/storage/repository/auth-keys.ts @@ -1,4 +1,4 @@ -import { MaybePromise } from '../../types/utils.js' +import type { MaybePromise } from '../../types/utils.js' export interface IAuthKeysRepository { /** @@ -8,9 +8,9 @@ export interface IAuthKeysRepository { * * **MUST** be applied immediately, without batching */ - set(dc: number, key: Uint8Array | null): MaybePromise + set: (dc: number, key: Uint8Array | null) => MaybePromise /** Get auth_key for the given DC */ - get(dc: number): MaybePromise + get: (dc: number) => MaybePromise /** * Store temp_auth_key for the given DC and idx, @@ -20,13 +20,13 @@ export interface IAuthKeysRepository { * * **MUST** be applied immediately, without batching */ - setTemp(dc: number, idx: number, key: Uint8Array | null, expires: number): MaybePromise + setTemp: (dc: number, idx: number, key: Uint8Array | null, expires: number) => MaybePromise /** * Given the DC id, idx and point in time (in seconds), * return the temp_auth_key that should be used for the next request * (such that `now < key.expires`), or `null` if no such key exists */ - getTemp(dc: number, idx: number, now: number): MaybePromise + getTemp: (dc: number, idx: number, now: number) => MaybePromise /** * Delete all stored auth keys for the given DC, including @@ -34,12 +34,12 @@ export interface IAuthKeysRepository { * * **MUST** be applied immediately, without batching */ - deleteByDc(dc: number): MaybePromise + deleteByDc: (dc: number) => MaybePromise /** * Delete all stored auth keys, including both permanent and temp keys * * **MUST** be applied immediately, without batching */ - deleteAll(): MaybePromise + deleteAll: () => MaybePromise } diff --git a/packages/core/src/storage/repository/key-value.ts b/packages/core/src/storage/repository/key-value.ts index 78d3421b..3e9de397 100644 --- a/packages/core/src/storage/repository/key-value.ts +++ b/packages/core/src/storage/repository/key-value.ts @@ -1,12 +1,12 @@ -import { MaybePromise } from '../../types/utils.js' +import type { MaybePromise } from '../../types/utils.js' export interface IKeyValueRepository { /** Set a key-value pair */ - set(key: string, value: Uint8Array): MaybePromise + set: (key: string, value: Uint8Array) => MaybePromise /** Get a key-value pair */ - get(key: string): MaybePromise + get: (key: string) => MaybePromise /** Delete a key-value pair */ - delete(key: string): MaybePromise + delete: (key: string) => MaybePromise - deleteAll(): MaybePromise + deleteAll: () => MaybePromise } diff --git a/packages/core/src/storage/service/auth-keys.test.ts b/packages/core/src/storage/service/auth-keys.test.ts index f8d8d22d..93fd3ece 100644 --- a/packages/core/src/storage/service/auth-keys.test.ts +++ b/packages/core/src/storage/service/auth-keys.test.ts @@ -1,5 +1,4 @@ import { describe, expect, it, vi } from 'vitest' - import { fakeAuthKeysRepository, fakeKeyValueRepository } from '@mtcute/test' import { AuthKeysService } from './auth-keys.js' diff --git a/packages/core/src/storage/service/auth-keys.ts b/packages/core/src/storage/service/auth-keys.ts index fe743c50..71be03b6 100644 --- a/packages/core/src/storage/service/auth-keys.ts +++ b/packages/core/src/storage/service/auth-keys.ts @@ -1,6 +1,8 @@ -import { IAuthKeysRepository } from '../repository/auth-keys.js' -import { BaseService, ServiceOptions } from './base.js' -import { FutureSaltsService } from './future-salts.js' +import type { IAuthKeysRepository } from '../repository/auth-keys.js' + +import type { ServiceOptions } from './base.js' +import { BaseService } from './base.js' +import type { FutureSaltsService } from './future-salts.js' export class AuthKeysService extends BaseService { constructor( diff --git a/packages/core/src/storage/service/base.ts b/packages/core/src/storage/service/base.ts index 0a04a217..fe28d06f 100644 --- a/packages/core/src/storage/service/base.ts +++ b/packages/core/src/storage/service/base.ts @@ -1,8 +1,9 @@ -import { tl } from '@mtcute/tl' -import { TlBinaryReader, TlBinaryWriter, TlReaderMap, TlWriterMap } from '@mtcute/tl-runtime' +import type { tl } from '@mtcute/tl' +import type { TlReaderMap, TlWriterMap } from '@mtcute/tl-runtime' +import { TlBinaryReader, TlBinaryWriter } from '@mtcute/tl-runtime' -import { Logger } from '../../utils/logger.js' -import { IStorageDriver } from '../driver.js' +import type { Logger } from '../../utils/logger.js' +import type { IStorageDriver } from '../driver.js' export interface ServiceOptions { driver: IStorageDriver @@ -31,7 +32,7 @@ export class BaseService { protected _deserializeTl(data: Uint8Array): tl.TlObject | null { try { return TlBinaryReader.deserializeObject(this._readerMap, data) - } catch (e) { + } catch { return null } } diff --git a/packages/core/src/storage/service/default-dcs.ts b/packages/core/src/storage/service/default-dcs.ts index c204b436..ccf00ed1 100644 --- a/packages/core/src/storage/service/default-dcs.ts +++ b/packages/core/src/storage/service/default-dcs.ts @@ -1,6 +1,9 @@ -import { DcOptions, parseBasicDcOption, serializeBasicDcOption } from '../../utils/dcs.js' -import { IKeyValueRepository } from '../repository/key-value.js' -import { BaseService, ServiceOptions } from './base.js' +import type { DcOptions } from '../../utils/dcs.js' +import { parseBasicDcOption, serializeBasicDcOption } from '../../utils/dcs.js' +import type { IKeyValueRepository } from '../repository/key-value.js' + +import type { ServiceOptions } from './base.js' +import { BaseService } from './base.js' const KV_MAIN = 'dc_main' const KV_MEDIA = 'dc_media' @@ -18,9 +21,11 @@ export class DefaultDcsService extends BaseService { async store(dcs: DcOptions): Promise { if (this._cached) { if ( - this._cached.main === dcs.main && - this._cached.media === dcs.media - ) return + this._cached.main === dcs.main + && this._cached.media === dcs.media + ) { + return + } } this._cached = dcs diff --git a/packages/core/src/storage/service/future-salts.ts b/packages/core/src/storage/service/future-salts.ts index 0eec7202..11ed604d 100644 --- a/packages/core/src/storage/service/future-salts.ts +++ b/packages/core/src/storage/service/future-salts.ts @@ -1,8 +1,10 @@ -import { mtp } from '@mtcute/tl' +import type { mtp } from '@mtcute/tl' import { TlBinaryReader, TlBinaryWriter } from '@mtcute/tl-runtime' -import { IKeyValueRepository } from '../repository/key-value.js' -import { BaseService, ServiceOptions } from './base.js' +import type { IKeyValueRepository } from '../repository/key-value.js' + +import type { ServiceOptions } from './base.js' +import { BaseService } from './base.js' const KV_PREFIX = 'salts:' diff --git a/packages/core/src/storage/service/updates.test.ts b/packages/core/src/storage/service/updates.test.ts index ad8c9bcf..7c908e59 100644 --- a/packages/core/src/storage/service/updates.test.ts +++ b/packages/core/src/storage/service/updates.test.ts @@ -1,8 +1,8 @@ import { describe, expect, it, vi } from 'vitest' - import { fakeKeyValueRepository } from '@mtcute/test' import { UpdatesStateService } from '../../highlevel/storage/service/updates.js' + import { testServiceOptions } from './utils.test-utils.js' describe('updates state service', () => { diff --git a/packages/core/src/storage/service/utils.test-utils.ts b/packages/core/src/storage/service/utils.test-utils.ts index f5c9e133..abd40a43 100644 --- a/packages/core/src/storage/service/utils.test-utils.ts +++ b/packages/core/src/storage/service/utils.test-utils.ts @@ -3,7 +3,8 @@ import { __tlWriterMap } from '@mtcute/tl/binary/writer.js' import { LogManager } from '../../utils/logger.js' import { MemoryStorageDriver } from '../memory/driver.js' -import { ServiceOptions } from './base.js' + +import type { ServiceOptions } from './base.js' export function testServiceOptions(): ServiceOptions { const logger = new LogManager() diff --git a/packages/core/src/storage/sqlite/driver.ts b/packages/core/src/storage/sqlite/driver.ts index b6478fc8..323f3fde 100644 --- a/packages/core/src/storage/sqlite/driver.ts +++ b/packages/core/src/storage/sqlite/driver.ts @@ -1,6 +1,7 @@ import { getPlatform } from '../../platform.js' import { BaseStorageDriver } from '../driver.js' -import { ISqliteDatabase, ISqliteStatement } from './types.js' + +import type { ISqliteDatabase, ISqliteStatement } from './types.js' const MIGRATIONS_TABLE_NAME = 'mtcute_migrations' const MIGRATIONS_TABLE_SQL = ` @@ -124,7 +125,7 @@ export abstract class BaseSqliteStorageDriver extends BaseStorageDriver { abstract _createDatabase(): ISqliteDatabase - _load(): void { + async _load(): Promise { this.db = this._createDatabase() this._runMany = this.db.transaction((stmts: [ISqliteStatement, unknown[]][]) => { diff --git a/packages/core/src/storage/sqlite/index.ts b/packages/core/src/storage/sqlite/index.ts index 038ef9f8..fc9de33c 100644 --- a/packages/core/src/storage/sqlite/index.ts +++ b/packages/core/src/storage/sqlite/index.ts @@ -1,5 +1,6 @@ -import { ITelegramStorageProvider } from '../../highlevel/storage/provider.js' -import { IMtStorageProvider } from '../provider.js' +import type { ITelegramStorageProvider } from '../../highlevel/storage/provider.js' +import type { IMtStorageProvider } from '../provider.js' + import { BaseSqliteStorageDriver } from './driver.js' import { SqliteAuthKeysRepository } from './repository/auth-keys.js' import { SqliteKeyValueRepository } from './repository/kv.js' @@ -10,10 +11,10 @@ export { BaseSqliteStorageDriver } export * from './types.js' export class BaseSqliteStorage implements IMtStorageProvider, ITelegramStorageProvider { - readonly authKeys - readonly kv - readonly refMessages - readonly peers + readonly authKeys: SqliteAuthKeysRepository + readonly kv: SqliteKeyValueRepository + readonly refMessages: SqliteRefMessagesRepository + readonly peers: SqlitePeersRepository constructor(readonly driver: BaseSqliteStorageDriver) { this.authKeys = new SqliteAuthKeysRepository(this.driver) diff --git a/packages/core/src/storage/sqlite/repository/auth-keys.ts b/packages/core/src/storage/sqlite/repository/auth-keys.ts index 147f8898..3280b545 100644 --- a/packages/core/src/storage/sqlite/repository/auth-keys.ts +++ b/packages/core/src/storage/sqlite/repository/auth-keys.ts @@ -1,6 +1,6 @@ -import { IAuthKeysRepository } from '../../repository/auth-keys.js' -import { BaseSqliteStorageDriver } from '../driver.js' -import { ISqliteStatement } from '../types.js' +import type { IAuthKeysRepository } from '../../repository/auth-keys.js' +import type { BaseSqliteStorageDriver } from '../driver.js' +import type { ISqliteStatement } from '../types.js' interface AuthKeyDto { dc: number diff --git a/packages/core/src/storage/sqlite/repository/kv.ts b/packages/core/src/storage/sqlite/repository/kv.ts index 713249b1..bf692cdc 100644 --- a/packages/core/src/storage/sqlite/repository/kv.ts +++ b/packages/core/src/storage/sqlite/repository/kv.ts @@ -3,11 +3,11 @@ import { __tlWriterMap } from '@mtcute/tl/binary/writer.js' import { CurrentUserService } from '../../../highlevel/storage/service/current-user.js' import { UpdatesStateService } from '../../../highlevel/storage/service/updates.js' -import { IKeyValueRepository } from '../../repository/key-value.js' -import { ServiceOptions } from '../../service/base.js' +import type { IKeyValueRepository } from '../../repository/key-value.js' +import type { ServiceOptions } from '../../service/base.js' import { DefaultDcsService } from '../../service/default-dcs.js' -import { BaseSqliteStorageDriver } from '../driver.js' -import { ISqliteStatement } from '../types.js' +import type { BaseSqliteStorageDriver } from '../driver.js' +import type { ISqliteStatement } from '../types.js' interface KeyValueDto { key: string @@ -33,12 +33,11 @@ export class SqliteKeyValueRepository implements IKeyValueRepository { // awkward dependencies, unsafe code, awful crutches // all in the name of backwards compatibility - /* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any */ - /* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-floating-promises */ - /* eslint-disable @typescript-eslint/no-unsafe-argument */ + /* eslint-disable ts/no-unsafe-assignment, ts/no-floating-promises */ + /* eslint-disable ts/no-unsafe-argument */ _driver.registerLegacyMigration('kv', (db) => { // fetch all values from the old table - const all = db.prepare('select key, value from kv').all() as { key: string; value: string }[] + const all = db.prepare('select key, value from kv').all() as { key: string, value: string }[] const obj: Record = {} for (const { key, value } of all) { @@ -52,7 +51,6 @@ export class SqliteKeyValueRepository implements IKeyValueRepository { driver: this._driver, readerMap: __tlReaderMap, writerMap: __tlWriterMap, - // eslint-disable-next-line dot-notation log: this._driver['_log'], } @@ -85,9 +83,8 @@ export class SqliteKeyValueRepository implements IKeyValueRepository { new DefaultDcsService(this, options).store(obj.def_dc) } }) - /* eslint-enable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any */ - /* eslint-enable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-floating-promises */ - /* eslint-enable @typescript-eslint/no-unsafe-argument */ + /* eslint-enable ts/no-unsafe-assignment, ts/no-floating-promises */ + /* eslint-enable ts/no-unsafe-argument */ } private _set!: ISqliteStatement diff --git a/packages/core/src/storage/sqlite/repository/peers.ts b/packages/core/src/storage/sqlite/repository/peers.ts index 19fa3f78..770978e5 100644 --- a/packages/core/src/storage/sqlite/repository/peers.ts +++ b/packages/core/src/storage/sqlite/repository/peers.ts @@ -1,7 +1,7 @@ -import { IPeersRepository } from '../../../highlevel/storage/repository/peers.js' +import type { IPeersRepository } from '../../../highlevel/storage/repository/peers.js' import { MtcuteError } from '../../../types/errors.js' -import { BaseSqliteStorageDriver } from '../driver.js' -import { ISqliteStatement } from '../types.js' +import type { BaseSqliteStorageDriver } from '../driver.js' +import type { ISqliteStatement } from '../types.js' interface PeerDto { id: number diff --git a/packages/core/src/storage/sqlite/repository/ref-messages.ts b/packages/core/src/storage/sqlite/repository/ref-messages.ts index 0311adea..ff5591e6 100644 --- a/packages/core/src/storage/sqlite/repository/ref-messages.ts +++ b/packages/core/src/storage/sqlite/repository/ref-messages.ts @@ -1,6 +1,6 @@ -import { IReferenceMessagesRepository } from '../../../highlevel/storage/repository/ref-messages.js' -import { BaseSqliteStorageDriver } from '../driver.js' -import { ISqliteStatement } from '../types.js' +import type { IReferenceMessagesRepository } from '../../../highlevel/storage/repository/ref-messages.js' +import type { BaseSqliteStorageDriver } from '../driver.js' +import type { ISqliteStatement } from '../types.js' interface ReferenceMessageDto { peer_id: number diff --git a/packages/core/src/storage/sqlite/types.ts b/packages/core/src/storage/sqlite/types.ts index 6527835d..a0bad8a2 100644 --- a/packages/core/src/storage/sqlite/types.ts +++ b/packages/core/src/storage/sqlite/types.ts @@ -6,17 +6,16 @@ * that are used by mtcute. */ export interface ISqliteDatabase { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - transaction any>(fn: F): F + transaction: any>(fn: F) => F - prepare(sql: string): ISqliteStatement + prepare: (sql: string) => ISqliteStatement - exec(sql: string): void - close(): void + exec: (sql: string) => void + close: () => void } export interface ISqliteStatement { - run(...params: BindParameters): void - get(...params: BindParameters): unknown - all(...params: BindParameters): unknown[] + run: (...params: BindParameters) => void + get: (...params: BindParameters) => unknown + all: (...params: BindParameters) => unknown[] } diff --git a/packages/core/src/storage/storage.ts b/packages/core/src/storage/storage.ts index 9c3e014f..11b3dde9 100644 --- a/packages/core/src/storage/storage.ts +++ b/packages/core/src/storage/storage.ts @@ -1,13 +1,15 @@ -import { TlReaderMap, TlWriterMap } from '@mtcute/tl-runtime' +import type { TlReaderMap, TlWriterMap } from '@mtcute/tl-runtime' import { getPlatform } from '../platform.js' import { asyncResettable } from '../utils/index.js' -import { Logger } from '../utils/logger.js' -import { IMtStorageProvider } from './provider.js' +import type { Logger } from '../utils/logger.js' + +import type { IMtStorageProvider } from './provider.js' import { AuthKeysService } from './service/auth-keys.js' -import { ServiceOptions } from './service/base.js' +import type { ServiceOptions } from './service/base.js' import { DefaultDcsService } from './service/default-dcs.js' import { FutureSaltsService } from './service/future-salts.js' +import type { IStorageDriver } from './driver.js' interface StorageManagerOptions { provider: IMtStorageProvider @@ -40,12 +42,12 @@ export interface StorageManagerExtraOptions { } export class StorageManager { - readonly provider - readonly driver - readonly log - readonly dcs - readonly salts - readonly keys + readonly provider: IMtStorageProvider + readonly driver: IStorageDriver + readonly log: Logger + readonly dcs: DefaultDcsService + readonly salts: FutureSaltsService + readonly keys: AuthKeysService constructor(readonly options: StorageManagerOptions & StorageManagerExtraOptions) { this.provider = this.options.provider @@ -71,12 +73,13 @@ export class StorageManager { if (this.options.cleanup ?? true) { this._cleanupRestore = getPlatform().beforeExit(() => { - this._destroy().catch((err) => this.log.error('cleanup error: %e', err)) + this._destroy().catch(err => this.log.error('cleanup error: %e', err)) }) } await this.driver.load?.() }) + load(): Promise { return this._load.run() } @@ -85,7 +88,7 @@ export class StorageManager { await this.driver.save?.() } - async clear(withAuthKeys = false) { + async clear(withAuthKeys = false): Promise { if (withAuthKeys) { await this.provider.authKeys.deleteAll() } diff --git a/packages/core/src/types/utils.ts b/packages/core/src/types/utils.ts index 2f58e50f..510aa230 100644 --- a/packages/core/src/types/utils.ts +++ b/packages/core/src/types/utils.ts @@ -1,7 +1,6 @@ export type MaybePromise = T | Promise export type PartialExcept = Partial> & Pick export type PartialOnly = Partial> & Omit -// eslint-disable-next-line @typescript-eslint/no-explicit-any export type AnyToNever = any extends T ? never : T export type MaybeArray = T | T[] @@ -10,7 +9,6 @@ export type MustEqual = (() => T) extends () => V ? ((() => V) extends () export type PublicPart = { [K in keyof T]: T[K] } -// eslint-disable-next-line @typescript-eslint/no-unused-vars -export function assertNever(x: never): never { +export function assertNever(_: never): never { throw new Error('Illegal state') } diff --git a/packages/core/src/utils/async-lock.test.ts b/packages/core/src/utils/async-lock.test.ts index 54e879c1..9b566b7f 100644 --- a/packages/core/src/utils/async-lock.test.ts +++ b/packages/core/src/utils/async-lock.test.ts @@ -13,8 +13,7 @@ describe('AsyncLock', () => { lock.with(async () => { await sleep(10 - idx) log.push(idx) - }), - ), + })), ) expect(log).toEqual([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) diff --git a/packages/core/src/utils/async-lock.ts b/packages/core/src/utils/async-lock.ts index 53586c90..87fb24c5 100644 --- a/packages/core/src/utils/async-lock.ts +++ b/packages/core/src/utils/async-lock.ts @@ -35,10 +35,9 @@ export class AsyncLock { return this.acquire() .then(() => func()) - .catch((e) => void (err = e)) + .catch(e => void (err = e)) .then(() => { this.release() - // eslint-disable-next-line @typescript-eslint/no-throw-literal if (err) throw err }) } diff --git a/packages/core/src/utils/bigint-utils.test.ts b/packages/core/src/utils/bigint-utils.test.ts index 6697763a..0b1e28f3 100644 --- a/packages/core/src/utils/bigint-utils.test.ts +++ b/packages/core/src/utils/bigint-utils.test.ts @@ -1,8 +1,8 @@ import { describe, expect, it } from 'vitest' - import { defaultTestCryptoProvider } from '@mtcute/test' import { getPlatform } from '../platform.js' + import { bigIntBitLength, bigIntGcd, @@ -30,20 +30,20 @@ describe('bigIntBitLength', () => { describe('bigIntToBuffer', () => { it('should handle writing to BE', () => { - expect([...bigIntToBuffer(BigInt('10495708'), 0, false)]).eql([0xa0, 0x26, 0xdc]) - expect([...bigIntToBuffer(BigInt('10495708'), 4, false)]).eql([0x00, 0xa0, 0x26, 0xdc]) - expect([...bigIntToBuffer(BigInt('10495708'), 8, false)]).eql([0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x26, 0xdc]) - expect([...bigIntToBuffer(BigInt('3038102549'), 4, false)]).eql([0xb5, 0x15, 0xc4, 0x15]) + expect([...bigIntToBuffer(BigInt('10495708'), 0, false)]).eql([0xA0, 0x26, 0xDC]) + expect([...bigIntToBuffer(BigInt('10495708'), 4, false)]).eql([0x00, 0xA0, 0x26, 0xDC]) + expect([...bigIntToBuffer(BigInt('10495708'), 8, false)]).eql([0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x26, 0xDC]) + expect([...bigIntToBuffer(BigInt('3038102549'), 4, false)]).eql([0xB5, 0x15, 0xC4, 0x15]) expect([...bigIntToBuffer(BigInt('9341376580368336208'), 8, false)]).eql([ ...p.hexDecode('81A33C81D2020550'), ]) }) it('should handle writing to LE', () => { - expect([...bigIntToBuffer(BigInt('10495708'), 0, true)]).eql([0xdc, 0x26, 0xa0]) - expect([...bigIntToBuffer(BigInt('10495708'), 4, true)]).eql([0xdc, 0x26, 0xa0, 0x00]) - expect([...bigIntToBuffer(BigInt('10495708'), 8, true)]).eql([0xdc, 0x26, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00]) - expect([...bigIntToBuffer(BigInt('3038102549'), 4, true)]).eql([0x15, 0xc4, 0x15, 0xb5]) + expect([...bigIntToBuffer(BigInt('10495708'), 0, true)]).eql([0xDC, 0x26, 0xA0]) + expect([...bigIntToBuffer(BigInt('10495708'), 4, true)]).eql([0xDC, 0x26, 0xA0, 0x00]) + expect([...bigIntToBuffer(BigInt('10495708'), 8, true)]).eql([0xDC, 0x26, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00]) + expect([...bigIntToBuffer(BigInt('3038102549'), 4, true)]).eql([0x15, 0xC4, 0x15, 0xB5]) expect([...bigIntToBuffer(BigInt('9341376580368336208'), 8, true)]).eql([ ...p.hexDecode('81A33C81D2020550').reverse(), ]) @@ -64,15 +64,15 @@ describe('bigIntToBuffer', () => { describe('bufferToBigInt', () => { it('should handle reading BE', () => { - expect(bufferToBigInt(new Uint8Array([0xa0, 0x26, 0xdc]), false).toString()).eq('10495708') - expect(bufferToBigInt(new Uint8Array([0x00, 0xa0, 0x26, 0xdc]), false).toString()).eq('10495708') - expect(bufferToBigInt(new Uint8Array([0xb5, 0x15, 0xc4, 0x15]), false).toString()).eq('3038102549') + expect(bufferToBigInt(new Uint8Array([0xA0, 0x26, 0xDC]), false).toString()).eq('10495708') + expect(bufferToBigInt(new Uint8Array([0x00, 0xA0, 0x26, 0xDC]), false).toString()).eq('10495708') + expect(bufferToBigInt(new Uint8Array([0xB5, 0x15, 0xC4, 0x15]), false).toString()).eq('3038102549') }) it('should handle reading LE', () => { - expect(bufferToBigInt(new Uint8Array([0xdc, 0x26, 0xa0]), true).toString()).eq('10495708') - expect(bufferToBigInt(new Uint8Array([0xdc, 0x26, 0xa0, 0x00]), true).toString()).eq('10495708') - expect(bufferToBigInt(new Uint8Array([0x15, 0xc4, 0x15, 0xb5]), true).toString()).eq('3038102549') + expect(bufferToBigInt(new Uint8Array([0xDC, 0x26, 0xA0]), true).toString()).eq('10495708') + expect(bufferToBigInt(new Uint8Array([0xDC, 0x26, 0xA0, 0x00]), true).toString()).eq('10495708') + expect(bufferToBigInt(new Uint8Array([0x15, 0xC4, 0x15, 0xB5]), true).toString()).eq('3038102549') }) it('should handle large integers', () => { diff --git a/packages/core/src/utils/bigint-utils.ts b/packages/core/src/utils/bigint-utils.ts index 5328257d..950739a2 100644 --- a/packages/core/src/utils/bigint-utils.ts +++ b/packages/core/src/utils/bigint-utils.ts @@ -1,10 +1,10 @@ import { bufferToReversed } from './buffer-utils.js' -import { ICryptoProvider } from './crypto/abstract.js' +import type { ICryptoProvider } from './crypto/abstract.js' /** * Get the minimum number of bits required to represent a number */ -export function bigIntBitLength(n: bigint) { +export function bigIntBitLength(n: bigint): number { // not the fastest way, but at least not .toString(2) and not too complex // taken from: https://stackoverflow.com/a/76616288/22656950 @@ -38,13 +38,13 @@ export function bigIntToBuffer(value: bigint, length = 0, le = false): Uint8Arra // it is faster to work with 64-bit words than with bytes directly for (let i = 0; i < dv.byteLength; i += 8) { - dv.setBigUint64(i, value & 0xffffffffffffffffn, true) + dv.setBigUint64(i, value & 0xFFFFFFFFFFFFFFFFn, true) value >>= 64n } if (unaligned > 0) { for (let i = length - unaligned; i < length; i++) { - u8[i] = Number(value & 0xffn) + u8[i] = Number(value & 0xFFn) value >>= 8n } } diff --git a/packages/core/src/utils/binary/asn1-parser.ts b/packages/core/src/utils/binary/asn1-parser.ts index 12218a23..8bb460d6 100644 --- a/packages/core/src/utils/binary/asn1-parser.ts +++ b/packages/core/src/utils/binary/asn1-parser.ts @@ -7,7 +7,7 @@ import { getPlatform } from '../../platform.js' * In fact just strips begin/end tags and parses the rest as Base64 */ export function parsePemContents(pem: string): Uint8Array { - return getPlatform().base64Decode(pem.replace(/^-----(BEGIN|END)( RSA)? PUBLIC KEY-----$|\n/gm, '')) + return getPlatform().base64Decode(pem.replace(/^-----(?:BEGIN|END)(?: RSA)? PUBLIC KEY-----$|\n/gm, '')) } // based on https://git.coolaj86.com/coolaj86/asn1-parser.js/src/branch/master/asn1-parser.js @@ -32,18 +32,18 @@ const EDEEP = `element nested over ${EDEEPN} layers deep (probably a malformed f // Bit String (0x03) and Octet String (0x04) may be values or containers // Sometimes Bit String is used as a container (RSA Pub Spki) const CTYPES: Record = { - '48': true, - '49': true, - '160': true, - '161': true, + 48: true, + 49: true, + 160: true, + 161: true, } const VTYPES: Record = { - '1': true, - '2': true, - '5': true, - '6': true, - '12': true, - '130': true, + 1: true, + 2: true, + 5: true, + 6: true, + 12: true, + 130: true, } /** @@ -64,9 +64,9 @@ export function parseAsn1(data: Uint8Array): Asn1Object { // Determine how many bytes the length uses, and what it is if (0x80 & asn1.length) { - asn1.lengthSize = 0x7f & asn1.length + asn1.lengthSize = 0x7F & asn1.length // I think that buf->hex->int solves the problem of Endianness... not sure - asn1.length = parseInt(getPlatform().hexEncode(buf.subarray(index, index + asn1.lengthSize)), 16) + asn1.length = Number.parseInt(getPlatform().hexEncode(buf.subarray(index, index + asn1.lengthSize)), 16) index += asn1.lengthSize } @@ -95,8 +95,8 @@ export function parseAsn1(data: Uint8Array): Asn1Object { if (index > 2 + asn1.lengthSize + asn1.length) { throw new Error( - `Parse error: child value length (${child.length}) is ` + - `greater than remaining parent length (${asn1.length - index} = ${asn1.length} - ${index})`, + `Parse error: child value length (${child.length}) is ` + + `greater than remaining parent length (${asn1.length - index} = ${asn1.length} - ${index})`, ) } asn1.children.push(child) @@ -129,7 +129,7 @@ export function parseAsn1(data: Uint8Array): Asn1Object { // (and return child array size to zero) try { return parseChildren(true) - } catch (e) { + } catch { if (asn1.children) asn1.children.length = 0 return asn1 diff --git a/packages/core/src/utils/buffer-utils.test.ts b/packages/core/src/utils/buffer-utils.test.ts index 8bf7203c..b18d5e72 100644 --- a/packages/core/src/utils/buffer-utils.test.ts +++ b/packages/core/src/utils/buffer-utils.test.ts @@ -1,16 +1,16 @@ import { afterEach, describe, expect, it, vi } from 'vitest' -import { buffersEqual, bufferToReversed, cloneBuffer, concatBuffers } from './buffer-utils.js' +import { bufferToReversed, buffersEqual, cloneBuffer, concatBuffers } from './buffer-utils.js' describe('buffersEqual', () => { it('should return true for equal buffers', () => { - expect(buffersEqual(new Uint8Array([]), new Uint8Array([]))).is.true - expect(buffersEqual(new Uint8Array([1, 2, 3]), new Uint8Array([1, 2, 3]))).is.true + expect(buffersEqual(new Uint8Array([]), new Uint8Array([]))).toEqual(true) + expect(buffersEqual(new Uint8Array([1, 2, 3]), new Uint8Array([1, 2, 3]))).toEqual(true) }) it('should return false for non-equal buffers', () => { - expect(buffersEqual(new Uint8Array([1]), new Uint8Array([]))).is.false - expect(buffersEqual(new Uint8Array([1, 2, 3]), new Uint8Array([1, 2, 4]))).is.false + expect(buffersEqual(new Uint8Array([1]), new Uint8Array([]))).toEqual(false) + expect(buffersEqual(new Uint8Array([1, 2, 3]), new Uint8Array([1, 2, 4]))).toEqual(false) }) }) @@ -20,8 +20,8 @@ describe('cloneBuffer', () => { const copy = cloneBuffer(orig) expect([...copy]).eql([1, 2, 3]) - orig[0] = 0xff - expect(copy[0]).not.eql(0xff) + orig[0] = 0xFF + expect(copy[0]).not.eql(0xFF) }) it('should clone buffer partially', () => { @@ -29,8 +29,8 @@ describe('cloneBuffer', () => { const copy = cloneBuffer(orig, 1, 4) expect([...copy]).eql([2, 3, 4]) - orig[0] = 0xff - expect(copy[0]).not.eql(0xff) + orig[0] = 0xFF + expect(copy[0]).not.eql(0xFF) }) }) @@ -46,8 +46,8 @@ describe('concatBuffers', () => { const buf2 = new Uint8Array([4, 5, 6]) const buf = concatBuffers([buf1, buf2]) - buf[0] = 0xff - expect(buf1[0]).not.eql(0xff) + buf[0] = 0xFF + expect(buf1[0]).not.eql(0xFF) }) it('should work without native Buffer', () => { @@ -56,7 +56,7 @@ describe('concatBuffers', () => { const buf2 = new Uint8Array([4, 5, 6]) const buf = concatBuffers([buf1, buf2]) - buf1[0] = 0xff + buf1[0] = 0xFF expect([...buf]).eql([1, 2, 3, 4, 5, 6]) }) @@ -81,7 +81,7 @@ describe('bufferToReversed', () => { const buf1 = new Uint8Array([1, 2, 3]) const buf2 = bufferToReversed(buf1) - buf2[0] = 0xff + buf2[0] = 0xFF expect([...buf1]).eql([1, 2, 3]) }) }) diff --git a/packages/core/src/utils/buffer-utils.ts b/packages/core/src/utils/buffer-utils.ts index 47cd8a4f..f143b786 100644 --- a/packages/core/src/utils/buffer-utils.ts +++ b/packages/core/src/utils/buffer-utils.ts @@ -21,7 +21,7 @@ export function buffersEqual(a: Uint8Array, b: Uint8Array): boolean { * @param start Start offset * @param end End offset */ -export function cloneBuffer(buf: Uint8Array, start = 0, end = buf.length): Uint8Array { +export function cloneBuffer(buf: Uint8Array, start = 0, end: number = buf.length): Uint8Array { const ret = new Uint8Array(end - start) ret.set(buf.subarray(start, end)) @@ -67,7 +67,7 @@ export function dataViewFromBuffer(buf: Uint8Array): DataView { /** * Reverse a buffer (or a part of it) into a new buffer */ -export function bufferToReversed(buf: Uint8Array, start = 0, end = buf.length): Uint8Array { +export function bufferToReversed(buf: Uint8Array, start = 0, end: number = buf.length): Uint8Array { const len = end - start const ret = new Uint8Array(len) diff --git a/packages/core/src/utils/composer.test.ts b/packages/core/src/utils/composer.test.ts index 9fa79ad4..ba22c970 100644 --- a/packages/core/src/utils/composer.test.ts +++ b/packages/core/src/utils/composer.test.ts @@ -1,7 +1,7 @@ -/* eslint-disable @typescript-eslint/require-await */ import { describe, expect, it } from 'vitest' -import { composeMiddlewares, Middleware } from './composer.js' +import type { Middleware } from './composer.js' +import { composeMiddlewares } from './composer.js' describe('composeMiddlewares', () => { it('should compose middlewares', async () => { @@ -28,6 +28,7 @@ describe('composeMiddlewares', () => { ] const composed = composeMiddlewares(middlewares, async (res) => { + // eslint-disable-next-line ts/no-use-before-define result = res }) @@ -147,7 +148,7 @@ describe('composeMiddlewares', () => { try { await next(2) - } catch (e) { + } catch { trace.push('caught error') } diff --git a/packages/core/src/utils/composer.ts b/packages/core/src/utils/composer.ts index 5c4037b9..8e233620 100644 --- a/packages/core/src/utils/composer.ts +++ b/packages/core/src/utils/composer.ts @@ -15,6 +15,7 @@ export function composeMiddlewares( const fn = middlewares[i] if (!fn) return final(ctx) + // eslint-disable-next-line ts/no-use-before-define return fn(ctx, boundDispatches[i + 1]) } diff --git a/packages/core/src/utils/controllable-promise.ts b/packages/core/src/utils/controllable-promise.ts index a5b4bf08..73b24c2a 100644 --- a/packages/core/src/utils/controllable-promise.ts +++ b/packages/core/src/utils/controllable-promise.ts @@ -2,8 +2,8 @@ * A promise that can be resolved or rejected from outside. */ export type ControllablePromise = Promise & { - resolve(val: T): void - reject(err?: unknown): void + resolve: (val: T) => void + reject: (err?: unknown) => void } /** diff --git a/packages/core/src/utils/crypto/abstract.ts b/packages/core/src/utils/crypto/abstract.ts index 69bef57f..bcf8223e 100644 --- a/packages/core/src/utils/crypto/abstract.ts +++ b/packages/core/src/utils/crypto/abstract.ts @@ -1,54 +1,55 @@ -import { MaybePromise } from '../../types/index.js' +import type { MaybePromise } from '../../types/index.js' + import { factorizePQSync } from './factorization.js' export interface IEncryptionScheme { - encrypt(data: Uint8Array): Uint8Array - decrypt(data: Uint8Array): Uint8Array + encrypt: (data: Uint8Array) => Uint8Array + decrypt: (data: Uint8Array) => Uint8Array } export interface IAesCtr { - process(data: Uint8Array): Uint8Array - close?(): void + process: (data: Uint8Array) => Uint8Array + close?: () => void } export interface ICryptoProvider { - initialize?(): MaybePromise + initialize?: () => MaybePromise - sha1(data: Uint8Array): Uint8Array + sha1: (data: Uint8Array) => Uint8Array - sha256(data: Uint8Array): Uint8Array + sha256: (data: Uint8Array) => Uint8Array - pbkdf2( + pbkdf2: ( password: Uint8Array, salt: Uint8Array, iterations: number, keylen?: number, // = 64 algo?: string, // sha1 or sha512 (default sha512) - ): MaybePromise + ) => MaybePromise - hmacSha256(data: Uint8Array, key: Uint8Array): MaybePromise + hmacSha256: (data: Uint8Array, key: Uint8Array) => MaybePromise - createAesCtr(key: Uint8Array, iv: Uint8Array, encrypt: boolean): IAesCtr + createAesCtr: (key: Uint8Array, iv: Uint8Array, encrypt: boolean) => IAesCtr - createAesIge(key: Uint8Array, iv: Uint8Array): IEncryptionScheme + createAesIge: (key: Uint8Array, iv: Uint8Array) => IEncryptionScheme - factorizePQ(pq: Uint8Array): MaybePromise<[Uint8Array, Uint8Array]> + factorizePQ: (pq: Uint8Array) => MaybePromise<[Uint8Array, Uint8Array]> - gzip(data: Uint8Array, maxSize: number): Uint8Array | null - gunzip(data: Uint8Array): Uint8Array + gzip: (data: Uint8Array, maxSize: number) => Uint8Array | null + gunzip: (data: Uint8Array) => Uint8Array - randomFill(buf: Uint8Array): void - randomBytes(size: number): Uint8Array + randomFill: (buf: Uint8Array) => void + randomBytes: (size: number) => Uint8Array } export abstract class BaseCryptoProvider { abstract randomFill(buf: Uint8Array): void - factorizePQ(pq: Uint8Array) { + factorizePQ(pq: Uint8Array): [Uint8Array, Uint8Array] { return factorizePQSync(this as unknown as ICryptoProvider, pq) } - randomBytes(size: number) { + randomBytes(size: number): Uint8Array { const buf = new Uint8Array(size) this.randomFill(buf) diff --git a/packages/core/src/utils/crypto/factorization.test.ts b/packages/core/src/utils/crypto/factorization.test.ts index b38377a5..36879ea5 100644 --- a/packages/core/src/utils/crypto/factorization.test.ts +++ b/packages/core/src/utils/crypto/factorization.test.ts @@ -1,8 +1,8 @@ import { describe, expect, it } from 'vitest' - import { defaultCryptoProvider } from '@mtcute/test' import { bigIntToBuffer, bufferToBigInt } from '../bigint-utils.js' + import { factorizePQSync } from './factorization.js' describe('prime factorization', () => { diff --git a/packages/core/src/utils/crypto/factorization.ts b/packages/core/src/utils/crypto/factorization.ts index bbae08ff..c07f9712 100644 --- a/packages/core/src/utils/crypto/factorization.ts +++ b/packages/core/src/utils/crypto/factorization.ts @@ -6,7 +6,8 @@ import { bufferToBigInt, randomBigIntInRange, } from '../bigint-utils.js' -import { ICryptoProvider } from './abstract.js' + +import type { ICryptoProvider } from './abstract.js' /** * Factorize `p*q` to `p` and `q` synchronously using Brent-Pollard rho algorithm diff --git a/packages/core/src/utils/crypto/keys.test.ts b/packages/core/src/utils/crypto/keys.test.ts index 8aa6f680..908474c6 100644 --- a/packages/core/src/utils/crypto/keys.test.ts +++ b/packages/core/src/utils/crypto/keys.test.ts @@ -1,5 +1,4 @@ import { beforeAll, describe, expect, it } from 'vitest' - import { defaultCryptoProvider } from '@mtcute/test' import { findKeyByFingerprints, parsePublicKey } from '../index.js' diff --git a/packages/core/src/utils/crypto/keys.ts b/packages/core/src/utils/crypto/keys.ts index d79fd10c..d18010b8 100644 --- a/packages/core/src/utils/crypto/keys.ts +++ b/packages/core/src/utils/crypto/keys.ts @@ -1,11 +1,12 @@ -import Long from 'long' - -import { __publicKeyIndex as keysIndex, TlPublicKey } from '@mtcute/tl/binary/rsa-keys.js' +import type Long from 'long' +import type { TlPublicKey } from '@mtcute/tl/binary/rsa-keys.js' +import { __publicKeyIndex as keysIndex } from '@mtcute/tl/binary/rsa-keys.js' import { TlBinaryWriter } from '@mtcute/tl-runtime' import { getPlatform } from '../../platform.js' import { parseAsn1, parsePemContents } from '../binary/asn1-parser.js' -import { ICryptoProvider } from './abstract.js' + +import type { ICryptoProvider } from './abstract.js' /** * Parse PEM-encoded RSA public key information into modulus and exponent diff --git a/packages/core/src/utils/crypto/miller-rabin.test.ts b/packages/core/src/utils/crypto/miller-rabin.test.ts index 4c80d4a0..46512536 100644 --- a/packages/core/src/utils/crypto/miller-rabin.test.ts +++ b/packages/core/src/utils/crypto/miller-rabin.test.ts @@ -1,12 +1,11 @@ import { describe, expect, it } from 'vitest' - import { defaultCryptoProvider } from '@mtcute/test' import { millerRabin } from './miller-rabin.js' describe( 'miller-rabin test', - function () { + () => { // miller-rabin factorization relies on RNG, so we should use a real random number generator const c = defaultCryptoProvider @@ -135,9 +134,9 @@ describe( ) // dh_prime used by telegram, as seen in https://core.telegram.org/mtproto/security_guidelines - const telegramDhPrime = - 'C7 1C AE B9 C6 B1 C9 04 8E 6C 52 2F 70 F1 3F 73 98 0D 40 23 8E 3E 21 C1 49 34 D0 37 56 3D 93 0F 48 19 8A 0A A7 C1 40 58 22 94 93 D2 25 30 F4 DB FA 33 6F 6E 0A C9 25 13 95 43 AE D4 4C CE 7C 37 20 FD 51 F6 94 58 70 5A C6 8C D4 FE 6B 6B 13 AB DC 97 46 51 29 69 32 84 54 F1 8F AF 8C 59 5F 64 24 77 FE 96 BB 2A 94 1D 5B CD 1D 4A C8 CC 49 88 07 08 FA 9B 37 8E 3C 4F 3A 90 60 BE E6 7C F9 A4 A4 A6 95 81 10 51 90 7E 16 27 53 B5 6B 0F 6B 41 0D BA 74 D8 A8 4B 2A 14 B3 14 4E 0E F1 28 47 54 FD 17 ED 95 0D 59 65 B4 B9 DD 46 58 2D B1 17 8D 16 9C 6B C4 65 B0 D6 FF 9C A3 92 8F EF 5B 9A E4 E4 18 FC 15 E8 3E BE A0 F8 7F A9 FF 5E ED 70 05 0D ED 28 49 F4 7B F9 59 D9 56 85 0C E9 29 85 1F 0D 81 15 F6 35 B1 05 EE 2E 4E 15 D0 4B 24 54 BF 6F 4F AD F0 34 B1 04 03 11 9C D8 E3 B9 2F CC 5B' - testMillerRabin(BigInt('0x' + telegramDhPrime.replace(/ /g, '')), true) + const telegramDhPrime + = 'C7 1C AE B9 C6 B1 C9 04 8E 6C 52 2F 70 F1 3F 73 98 0D 40 23 8E 3E 21 C1 49 34 D0 37 56 3D 93 0F 48 19 8A 0A A7 C1 40 58 22 94 93 D2 25 30 F4 DB FA 33 6F 6E 0A C9 25 13 95 43 AE D4 4C CE 7C 37 20 FD 51 F6 94 58 70 5A C6 8C D4 FE 6B 6B 13 AB DC 97 46 51 29 69 32 84 54 F1 8F AF 8C 59 5F 64 24 77 FE 96 BB 2A 94 1D 5B CD 1D 4A C8 CC 49 88 07 08 FA 9B 37 8E 3C 4F 3A 90 60 BE E6 7C F9 A4 A4 A6 95 81 10 51 90 7E 16 27 53 B5 6B 0F 6B 41 0D BA 74 D8 A8 4B 2A 14 B3 14 4E 0E F1 28 47 54 FD 17 ED 95 0D 59 65 B4 B9 DD 46 58 2D B1 17 8D 16 9C 6B C4 65 B0 D6 FF 9C A3 92 8F EF 5B 9A E4 E4 18 FC 15 E8 3E BE A0 F8 7F A9 FF 5E ED 70 05 0D ED 28 49 F4 7B F9 59 D9 56 85 0C E9 29 85 1F 0D 81 15 F6 35 B1 05 EE 2E 4E 15 D0 4B 24 54 BF 6F 4F AD F0 34 B1 04 03 11 9C D8 E3 B9 2F CC 5B' + testMillerRabin(BigInt(`0x${telegramDhPrime.replace(/ /g, '')}`), true) }) }, { timeout: 10000 }, diff --git a/packages/core/src/utils/crypto/miller-rabin.ts b/packages/core/src/utils/crypto/miller-rabin.ts index ad0c24eb..c151ff2f 100644 --- a/packages/core/src/utils/crypto/miller-rabin.ts +++ b/packages/core/src/utils/crypto/miller-rabin.ts @@ -1,5 +1,6 @@ import { bigIntBitLength, bigIntModPow, randomBigIntBits, twoMultiplicity } from '../bigint-utils.js' -import { ICryptoProvider } from './abstract.js' + +import type { ICryptoProvider } from './abstract.js' export function millerRabin(crypto: ICryptoProvider, n: bigint, rounds = 20): boolean { // small numbers: 0, 1 are not prime, 2, 3 are prime diff --git a/packages/core/src/utils/crypto/mtproto.test.ts b/packages/core/src/utils/crypto/mtproto.test.ts index 8df669a2..f276a5ea 100644 --- a/packages/core/src/utils/crypto/mtproto.test.ts +++ b/packages/core/src/utils/crypto/mtproto.test.ts @@ -1,9 +1,9 @@ import { beforeEach, describe, expect, it, vi } from 'vitest' - import { defaultTestCryptoProvider, u8HexDecode } from '@mtcute/test' import { getPlatform } from '../../platform.js' import { concatBuffers } from '../index.js' + import { createAesIgeForMessage, createAesIgeForMessageOld, generateKeyAndIvFromNonce } from './mtproto.js' const p = getPlatform() diff --git a/packages/core/src/utils/crypto/mtproto.ts b/packages/core/src/utils/crypto/mtproto.ts index 27f80e36..ae1e9417 100644 --- a/packages/core/src/utils/crypto/mtproto.ts +++ b/packages/core/src/utils/crypto/mtproto.ts @@ -1,5 +1,6 @@ import { concatBuffers } from '../buffer-utils.js' -import { ICryptoProvider, IEncryptionScheme } from './abstract.js' + +import type { ICryptoProvider, IEncryptionScheme } from './abstract.js' /** * Generate AES key and IV from nonces as defined by MTProto. diff --git a/packages/core/src/utils/crypto/password.test.ts b/packages/core/src/utils/crypto/password.test.ts index 97c80f95..c5622989 100644 --- a/packages/core/src/utils/crypto/password.test.ts +++ b/packages/core/src/utils/crypto/password.test.ts @@ -1,10 +1,10 @@ import Long from 'long' import { describe, expect, it } from 'vitest' - import { defaultTestCryptoProvider } from '@mtcute/test' -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { getPlatform } from '../../platform.js' + import { computeNewPasswordHash, computePasswordHash, computeSrpParams } from './index.js' const p = getPlatform() @@ -16,14 +16,14 @@ const fakeAlgo: tl.RawPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA25 salt2: p.hexDecode('6c619bb0786dc4ed1bf211d23f6e4065'), g: 3, p: p.hexDecode( - 'c71caeb9c6b1c9048e6c522f70f13f73980d40238e3e21c14934d037563d930f' + - '48198a0aa7c14058229493d22530f4dbfa336f6e0ac925139543aed44cce7c37' + - '20fd51f69458705ac68cd4fe6b6b13abdc9746512969328454f18faf8c595f64' + - '2477fe96bb2a941d5bcd1d4ac8cc49880708fa9b378e3c4f3a9060bee67cf9a4' + - 'a4a695811051907e162753b56b0f6b410dba74d8a84b2a14b3144e0ef1284754' + - 'fd17ed950d5965b4b9dd46582db1178d169c6bc465b0d6ff9ca3928fef5b9ae4' + - 'e418fc15e83ebea0f87fa9ff5eed70050ded2849f47bf959d956850ce929851f' + - '0d8115f635b105ee2e4e15d04b2454bf6f4fadf034b10403119cd8e3b92fcc5b', + 'c71caeb9c6b1c9048e6c522f70f13f73980d40238e3e21c14934d037563d930f' + + '48198a0aa7c14058229493d22530f4dbfa336f6e0ac925139543aed44cce7c37' + + '20fd51f69458705ac68cd4fe6b6b13abdc9746512969328454f18faf8c595f64' + + '2477fe96bb2a941d5bcd1d4ac8cc49880708fa9b378e3c4f3a9060bee67cf9a4' + + 'a4a695811051907e162753b56b0f6b410dba74d8a84b2a14b3144e0ef1284754' + + 'fd17ed950d5965b4b9dd46582db1178d169c6bc465b0d6ff9ca3928fef5b9ae4' + + 'e418fc15e83ebea0f87fa9ff5eed70050ded2849f47bf959d956850ce929851f' + + '0d8115f635b105ee2e4e15d04b2454bf6f4fadf034b10403119cd8e3b92fcc5b', ), } const fakeRequest: tl.account.RawPassword = { @@ -33,14 +33,14 @@ const fakeRequest: tl.account.RawPassword = { hasPassword: true, currentAlgo: fakeAlgo, srpB: p.hexDecode( - '1476a7b5991d7f028bbee33b3455cad3f2cd0eb3737409fcce92fa7d4cd5c733' + - 'ec6d2cb3454e587d4c17eda2fd7ef9a57327215f38292cc8bd5dc77d3e1d31cd' + - 'dae2652f8347c4b0093f7c78242f70e6cc13137ee7acc257a49855a63113db8f' + - '163992b9101551f3b6f7eb5d196cee3647c359553b1bcbe82ba8933c0fb1ac35' + - '0243c535b8e634613e1f626ba8a6d141ef957c859e71a117b557c0298bfbb107' + - 'c91f71f5b4275fded58289aa1e87c612f44b7aa0b5e0de7def4458f58db80019' + - 'd2e7b181eb66dc270374af2d160dd0c53edd677b2701694d71ea8718c49df6a9' + - 'dbe2cbae051ffc1986336cd26f11a8ab426dfe0813d7b3f4eedf4e34182ccc3a', + '1476a7b5991d7f028bbee33b3455cad3f2cd0eb3737409fcce92fa7d4cd5c733' + + 'ec6d2cb3454e587d4c17eda2fd7ef9a57327215f38292cc8bd5dc77d3e1d31cd' + + 'dae2652f8347c4b0093f7c78242f70e6cc13137ee7acc257a49855a63113db8f' + + '163992b9101551f3b6f7eb5d196cee3647c359553b1bcbe82ba8933c0fb1ac35' + + '0243c535b8e634613e1f626ba8a6d141ef957c859e71a117b557c0298bfbb107' + + 'c91f71f5b4275fded58289aa1e87c612f44b7aa0b5e0de7def4458f58db80019' + + 'd2e7b181eb66dc270374af2d160dd0c53edd677b2701694d71ea8718c49df6a9' + + 'dbe2cbae051ffc1986336cd26f11a8ab426dfe0813d7b3f4eedf4e34182ccc3a', ), srpId: Long.fromBits(-2046015018, 875006452), newAlgo: { @@ -49,14 +49,14 @@ const fakeRequest: tl.account.RawPassword = { salt2: p.hexDecode('6c619bb0786dc4ed1bf211d23f6e4065'), g: 3, p: p.hexDecode( - 'c71caeb9c6b1c9048e6c522f70f13f73980d40238e3e21c14934d037563d930f' + - '48198a0aa7c14058229493d22530f4dbfa336f6e0ac925139543aed44cce7c37' + - '20fd51f69458705ac68cd4fe6b6b13abdc9746512969328454f18faf8c595f64' + - '2477fe96bb2a941d5bcd1d4ac8cc49880708fa9b378e3c4f3a9060bee67cf9a4' + - 'a4a695811051907e162753b56b0f6b410dba74d8a84b2a14b3144e0ef1284754' + - 'fd17ed950d5965b4b9dd46582db1178d169c6bc465b0d6ff9ca3928fef5b9ae4' + - 'e418fc15e83ebea0f87fa9ff5eed70050ded2849f47bf959d956850ce929851f' + - '0d8115f635b105ee2e4e15d04b2454bf6f4fadf034b10403119cd8e3b92fcc5b', + 'c71caeb9c6b1c9048e6c522f70f13f73980d40238e3e21c14934d037563d930f' + + '48198a0aa7c14058229493d22530f4dbfa336f6e0ac925139543aed44cce7c37' + + '20fd51f69458705ac68cd4fe6b6b13abdc9746512969328454f18faf8c595f64' + + '2477fe96bb2a941d5bcd1d4ac8cc49880708fa9b378e3c4f3a9060bee67cf9a4' + + 'a4a695811051907e162753b56b0f6b410dba74d8a84b2a14b3144e0ef1284754' + + 'fd17ed950d5965b4b9dd46582db1178d169c6bc465b0d6ff9ca3928fef5b9ae4' + + 'e418fc15e83ebea0f87fa9ff5eed70050ded2849f47bf959d956850ce929851f' + + '0d8115f635b105ee2e4e15d04b2454bf6f4fadf034b10403119cd8e3b92fcc5b', ), }, newSecureAlgo: { @@ -80,14 +80,14 @@ describe('SRP', () => { const hash = await computeNewPasswordHash(crypto, fakeAlgo, '123qwe') expect(p.hexEncode(hash)).toEqual( - '2540539ceeffd4543cd845bf319b8392e6b17bf7cf26bafcf6282ce9ae795368' + - '4ff49469c2863b17e6d65ddb16ae6f60bc07cc254c00e5ba389292f6cea0b3aa' + - 'c459d1d08984d65319df8c5d124042169bbe2ab8c0c93bc7178827f2ea84e7c3' + - 'a4f2660099fb6a4c38984c914283d3015278369521a4b81ecf927669b8c89746' + - 'ef49ec7b019af7f3addc746362f298d96409bef4677b9c3d8e5b5afe7a44c0bc' + - '130ebc7a79b5d5980966d88d3d9eba511b101b0703abd86df7410cd120edad12' + - '2a7a3ccad92d906dbf6f43bba13555bafb626b45551275f3626a4ae26a14908d' + - '38d640680e501f52bd08a0e3ff9d9185eebdae890c167459449b2c205b3ecde4', + '2540539ceeffd4543cd845bf319b8392e6b17bf7cf26bafcf6282ce9ae795368' + + '4ff49469c2863b17e6d65ddb16ae6f60bc07cc254c00e5ba389292f6cea0b3aa' + + 'c459d1d08984d65319df8c5d124042169bbe2ab8c0c93bc7178827f2ea84e7c3' + + 'a4f2660099fb6a4c38984c914283d3015278369521a4b81ecf927669b8c89746' + + 'ef49ec7b019af7f3addc746362f298d96409bef4677b9c3d8e5b5afe7a44c0bc' + + '130ebc7a79b5d5980966d88d3d9eba511b101b0703abd86df7410cd120edad12' + + '2a7a3ccad92d906dbf6f43bba13555bafb626b45551275f3626a4ae26a14908d' + + '38d640680e501f52bd08a0e3ff9d9185eebdae890c167459449b2c205b3ecde4', ) }) @@ -97,14 +97,14 @@ describe('SRP', () => { expect(params.srpId).toEqual(fakeRequest.srpId) expect(p.hexEncode(params.A)).toEqual( - '363976f55edb57cc5cc0c4aaca9b7539eff98a43a93fa84be34860d18ac3a80f' + - 'ffd57c4617896ff667677d0552a079eb189d25d147ec96edd4495c946a18652d' + - '31d78eede40a8b29da340c19b32ccac78f8482406e392102c03d850d1db87223' + - '2c144bfacadb58856971aafb70ca3aac4efa7f73977ddc50dfc0a2c76c0ac950' + - '728d58b8480fa89c701703855148fadd885aaf1ca313ae3a3b2942de58a9a6fb' + - '9e3e65c7ac7a1b7f4e6aa4742b957f81927bd8cc761b76f90229dec34d6f15d3' + - '4fa454aa69d9219d9c5fa3625f5c6f1ac03892a70aa17269c76cd9bf2949a961' + - 'fad2a71e5fa961824b32db037130c7e9aad4c1e9f02ebc5b832622f98b59597e', + '363976f55edb57cc5cc0c4aaca9b7539eff98a43a93fa84be34860d18ac3a80f' + + 'ffd57c4617896ff667677d0552a079eb189d25d147ec96edd4495c946a18652d' + + '31d78eede40a8b29da340c19b32ccac78f8482406e392102c03d850d1db87223' + + '2c144bfacadb58856971aafb70ca3aac4efa7f73977ddc50dfc0a2c76c0ac950' + + '728d58b8480fa89c701703855148fadd885aaf1ca313ae3a3b2942de58a9a6fb' + + '9e3e65c7ac7a1b7f4e6aa4742b957f81927bd8cc761b76f90229dec34d6f15d3' + + '4fa454aa69d9219d9c5fa3625f5c6f1ac03892a70aa17269c76cd9bf2949a961' + + 'fad2a71e5fa961824b32db037130c7e9aad4c1e9f02ebc5b832622f98b59597e', ) expect(p.hexEncode(params.M1)).toEqual('25a91b21c634ad670a144165a9829192d152e131a716f676abc48cd817f508c6') }) diff --git a/packages/core/src/utils/crypto/password.ts b/packages/core/src/utils/crypto/password.ts index 89c8bd59..3a41d341 100644 --- a/packages/core/src/utils/crypto/password.ts +++ b/packages/core/src/utils/crypto/password.ts @@ -1,11 +1,12 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { getPlatform } from '../../platform.js' import { MtSecurityError, MtUnsupportedError } from '../../types/errors.js' import { bigIntModPow, bigIntToBuffer, bufferToBigInt } from '../bigint-utils.js' import { concatBuffers } from '../buffer-utils.js' import { assertTypeIs } from '../type-assertions.js' -import { ICryptoProvider } from './abstract.js' + +import type { ICryptoProvider } from './abstract.js' import { xorBuffer } from './utils.js' /** @@ -72,8 +73,8 @@ export async function computeSrpParams( ): Promise { // nice naming thx durov if ( - !request.currentAlgo || - request.currentAlgo._ !== 'passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow' + !request.currentAlgo + || request.currentAlgo._ !== 'passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow' ) { throw new MtUnsupportedError(`Unknown algo ${request.currentAlgo?._}`) } diff --git a/packages/core/src/utils/crypto/utils.test.ts b/packages/core/src/utils/crypto/utils.test.ts index 529668f9..2f874a83 100644 --- a/packages/core/src/utils/crypto/utils.test.ts +++ b/packages/core/src/utils/crypto/utils.test.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from 'vitest' import { getPlatform } from '../../platform.js' + import { xorBuffer, xorBufferInPlace } from './utils.js' const p = getPlatform() diff --git a/packages/core/src/utils/deque.test.ts b/packages/core/src/utils/deque.test.ts index 62be647f..da8df267 100644 --- a/packages/core/src/utils/deque.test.ts +++ b/packages/core/src/utils/deque.test.ts @@ -143,7 +143,7 @@ describe('Deque', () => { d.pushBack(4) d.pushBack(5) - d.removeBy((it) => it >= 2) + d.removeBy(it => it >= 2) expect(d.toArray()).eql([1, 3, 4, 5]) }) diff --git a/packages/core/src/utils/deque.ts b/packages/core/src/utils/deque.ts index 10c8205f..c8016936 100644 --- a/packages/core/src/utils/deque.ts +++ b/packages/core/src/utils/deque.ts @@ -24,8 +24,8 @@ export class Deque { protected _capacity: number constructor( - readonly maxLength = Infinity, - minCapacity = maxLength === Infinity ? MIN_INITIAL_CAPACITY : maxLength, + readonly maxLength: number = Infinity, + minCapacity: number = maxLength === Infinity ? MIN_INITIAL_CAPACITY : maxLength, ) { let capacity = minCapacity @@ -51,7 +51,7 @@ export class Deque { this._capacity = capacity } - protected _resize() { + protected _resize(): void { const p = this._head const n = this._capacity const r = n - p // number of elements to the right of the head diff --git a/packages/core/src/utils/error-reporting.ts b/packages/core/src/utils/error-reporting.ts index ce009a50..ccf61d5c 100644 --- a/packages/core/src/utils/error-reporting.ts +++ b/packages/core/src/utils/error-reporting.ts @@ -1,12 +1,12 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' -import { Logger } from './logger.js' +import type { Logger } from './logger.js' export function reportUnknownError(log: Logger, error: tl.RpcError, method: string): void { if (typeof fetch !== 'function') return fetch(`https://rpc.pwrtelegram.xyz/?code=${error.code}&method=${method}&error=${error.text}`) - .then((r) => r.json()) + .then(r => r.json()) .then((r) => { if (r.ok) { log.info('telerpc responded with error info for %s: %s', error.text, r.result) diff --git a/packages/core/src/utils/function-utils.ts b/packages/core/src/utils/function-utils.ts index 9844ec5d..9126bb22 100644 --- a/packages/core/src/utils/function-utils.ts +++ b/packages/core/src/utils/function-utils.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ export type ThrottledFunction = (() => void) & { reset: () => void } @@ -40,7 +39,12 @@ export function throttle(func: () => void, delay: number): ThrottledFunction { return res } -export function asyncResettable Promise>(func: T) { +export function asyncResettable Promise>(func: T): { + run: T + finished: () => boolean + wait: () => Promise | null + reset: () => void +} { let runningPromise: Promise | null = null let finished = false @@ -51,7 +55,7 @@ export function asyncResettable Promise>(func: return runningPromise } - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + // eslint-disable-next-line ts/no-unsafe-argument runningPromise = func(...args) void runningPromise.then(() => { runningPromise = null diff --git a/packages/core/src/utils/links/bots.test.ts b/packages/core/src/utils/links/bots.test.ts index 9115eeb5..81f9c285 100644 --- a/packages/core/src/utils/links/bots.test.ts +++ b/packages/core/src/utils/links/bots.test.ts @@ -1,9 +1,8 @@ -/* eslint-disable @typescript-eslint/no-unsafe-call */ import { describe, expect, it } from 'vitest' import { links } from './index.js' -describe('Deep links', function () { +describe('Deep links', () => { describe('Bot start links', () => { it('should generate t.me/username?start=parameter links', () => { expect(links.botStart({ username: 'username', parameter: 'parameter' })).eq( diff --git a/packages/core/src/utils/links/bots.ts b/packages/core/src/utils/links/bots.ts index 72a5f845..aa339f86 100644 --- a/packages/core/src/utils/links/bots.ts +++ b/packages/core/src/utils/links/bots.ts @@ -1,6 +1,9 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { isPresent } from '../type-assertions.js' +import { assertNever } from '../../types/utils.js' + +import type { Deeplink } from './common.js' import { deeplinkBuilder } from './common.js' /** @@ -8,12 +11,12 @@ import { deeplinkBuilder } from './common.js' * * Used to link to bots with a start parameter */ -export const botStart = deeplinkBuilder<{ +export const botStart: Deeplink<{ /** Bot username */ username: string /** Start parameter */ parameter: string -}>({ +}> = /* #__PURE__ */ deeplinkBuilder({ internalBuild: ({ username, parameter }) => ['resolve', { domain: username, start: parameter }], internalParse: (path, query) => { if (path !== 'resolve') return null @@ -76,6 +79,9 @@ function normalizeBotAdmin(rights?: BotAdminRight[]): string | undefined { return 'edit_stories' case 'deleteStories': return 'delete_stories' + default: + assertNever(it) + return '' } }) .join('+') @@ -132,14 +138,14 @@ function parseBotAdmin(rights: string | null): BotAdminRight[] | undefined { * Note that the user is still free to choose which rights to grant, and * whether to grant them at all. */ -export const botAddToGroup = deeplinkBuilder<{ +export const botAddToGroup: Deeplink<{ /** Bot username */ bot: string /** If specified, the client will call `/start parameter` on the bot once the bot has been added */ parameter?: string /** Admin rights to request */ admin?: BotAdminRight[] -}>({ +}> = /* #__PURE__ */ deeplinkBuilder({ internalBuild: ({ bot, parameter, admin }) => [ 'resolve', { domain: bot, startgroup: parameter ?? true, admin: normalizeBotAdmin(admin) }, @@ -188,12 +194,12 @@ export const botAddToGroup = deeplinkBuilder<{ * Note that the user is still free to choose which rights to grant, and * whether to grant them at all. */ -export const botAddToChannel = deeplinkBuilder<{ +export const botAddToChannel: Deeplink<{ /** Bot username */ bot: string /** Admin rights to request */ admin?: BotAdminRight[] -}>({ +}> = /* #__PURE__ */ deeplinkBuilder({ internalBuild: ({ bot, admin }) => [ 'resolve', { domain: bot, startchannel: true, admin: normalizeBotAdmin(admin) }, @@ -235,12 +241,12 @@ export const botAddToChannel = deeplinkBuilder<{ * * Used to share games. */ -export const botGame = deeplinkBuilder<{ +export const botGame: Deeplink<{ /** Bot username */ bot: string /** Game short name */ game: string -}>({ +}> = /* #__PURE__ */ deeplinkBuilder({ internalBuild: ({ bot, game }) => ['resolve', { domain: bot, game }], internalParse: (path, query) => { if (path !== 'resolve') return null @@ -275,14 +281,14 @@ export const botGame = deeplinkBuilder<{ * and a single bot can offer multiple named web apps, distinguished by * their `short_name`. */ -export const botWebApp = deeplinkBuilder<{ +export const botWebApp: Deeplink<{ /** Bot username */ bot: string /** App short name */ app: string /** Parameter to be passed by the client to messages.requestAppWebView as `start_param` */ parameter?: string -}>({ +}> = /* #__PURE__ */ deeplinkBuilder({ internalBuild: ({ bot, app, parameter }) => ['resolve', { domain: bot, appname: app, startapp: parameter }], internalParse: (path, query) => { if (path !== 'resolve') return null diff --git a/packages/core/src/utils/links/calls.ts b/packages/core/src/utils/links/calls.ts index 05bb6b3f..a69b85de 100644 --- a/packages/core/src/utils/links/calls.ts +++ b/packages/core/src/utils/links/calls.ts @@ -1,3 +1,4 @@ +import type { Deeplink } from './common.js' import { deeplinkBuilder } from './common.js' /** @@ -6,7 +7,7 @@ import { deeplinkBuilder } from './common.js' * Used to join video/voice chats in groups, and livestreams in channels. * Such links are generated using phone.exportGroupCallInvite. */ -export const videoChat = deeplinkBuilder<{ +export const videoChat: Deeplink<{ username: string /** * Invite hash exported if the `can_self_unmute` flag is set when calling `phone.exportGroupCallInvite`: @@ -15,7 +16,7 @@ export const videoChat = deeplinkBuilder<{ */ inviteHash?: string isLivestream?: boolean -}>({ +}> = /* #__PURE__ */ deeplinkBuilder({ internalBuild: ({ username, inviteHash, isLivestream }) => [ 'resolve', { diff --git a/packages/core/src/utils/links/chat.test.ts b/packages/core/src/utils/links/chat.test.ts index 1dea1a09..071afab2 100644 --- a/packages/core/src/utils/links/chat.test.ts +++ b/packages/core/src/utils/links/chat.test.ts @@ -1,9 +1,8 @@ -/* eslint-disable @typescript-eslint/no-unsafe-call */ import { describe, expect, it } from 'vitest' import { links } from './index.js' -describe('Deep links', function () { +describe('Deep links', () => { describe('Chat invite links', () => { it('should generate t.me/+hash links', () => { expect(links.chatInvite({ hash: 'hash' })).eq('https://t.me/+hash') diff --git a/packages/core/src/utils/links/chat.ts b/packages/core/src/utils/links/chat.ts index 8f9920c1..6cddde1d 100644 --- a/packages/core/src/utils/links/chat.ts +++ b/packages/core/src/utils/links/chat.ts @@ -1,4 +1,4 @@ -/* eslint-disable indent,func-call-spacing */ +import type { Deeplink } from './common.js' import { deeplinkBuilder } from './common.js' /** @@ -6,7 +6,7 @@ import { deeplinkBuilder } from './common.js' * * Used to invite users to private groups and channels */ -export const chatInvite = deeplinkBuilder<{ hash: string }>({ +export const chatInvite: Deeplink<{ hash: string }> = /* #__PURE__ */ deeplinkBuilder({ internalBuild: ({ hash }) => ['join', { invite: hash }], internalParse: (path, query) => { if (path !== 'join') return null @@ -18,10 +18,10 @@ export const chatInvite = deeplinkBuilder<{ hash: string }>({ }, externalBuild: ({ hash }) => [`+${hash}`, null], externalParse: (path) => { - const m = path.match(/^(?:\+|joinchat\/)([a-zA-Z0-9_-]+)$/) + const m = path.match(/^(?:\+|joinchat\/)([\w-]+)$/) if (!m) return null - if (m[1].match(/^[0-9]+$/)) { + if (m[1].match(/^\d+$/)) { // phone number return null } @@ -33,7 +33,7 @@ export const chatInvite = deeplinkBuilder<{ hash: string }>({ /** * Chat folder links */ -export const chatFolder = deeplinkBuilder<{ slug: string }>({ +export const chatFolder: Deeplink<{ slug: string }> = /* #__PURE__ */ deeplinkBuilder({ internalBuild: ({ slug }) => ['addlist', { slug }], internalParse: (path, query) => { if (path !== 'addlist') return null @@ -63,7 +63,7 @@ function parseMediaTimestamp(timestamp: string) { return Number(m[1]) * 60 + Number(m[2]) } - if ((m = timestamp.match(/^(?:(\d+)h)?(?:(\d{1,2})m)?(?:(\d{1,2})s)$/))) { + if ((m = timestamp.match(/^(?:(\d+)h)?(?:(\d{1,2})m)?(\d{1,2})s$/))) { return (Number(m[1]) || 0) * 3600 + (Number(m[2]) || 0) * 60 + (Number(m[3]) || 0) } @@ -77,32 +77,31 @@ function parseMediaTimestamp(timestamp: string) { * * Note: `channelId` is a non-marked channel ID */ -export const message = deeplinkBuilder< - ({ username: string } | { channelId: number }) & { - /** Message ID */ - id: number - /** Thread ID */ - threadId?: number +export const message: Deeplink<({ username: string } | { channelId: number }) & { + /** Message ID */ + id: number + /** Thread ID */ + threadId?: number - /** - * For comments, `id` will contain the message ID of the channel message that started - * the comment section and this field will contain the message ID of the comment in - * the discussion group. - */ - commentId?: number + /** + * For comments, `id` will contain the message ID of the channel message that started + * the comment section and this field will contain the message ID of the comment in + * the discussion group. + */ + commentId?: number - /** - * Timestamp at which to start playing the media file present - * in the body or in the webpage preview of the message - */ - mediaTimestamp?: number + /** + * Timestamp at which to start playing the media file present + * in the body or in the webpage preview of the message + */ + mediaTimestamp?: number - /** - * Whether this is a link to a specific message in the album or to the entire album - */ - single?: boolean - } ->({ + /** + * Whether this is a link to a specific message in the album or to the entire album + */ + single?: boolean +} +> = /* #__PURE__ */ deeplinkBuilder({ internalBuild: (params) => { const common = { post: params.id, @@ -171,7 +170,7 @@ export const message = deeplinkBuilder< if (chunks.length < 2) return null const id = Number(chunks[chunks.length - 1]) - if (isNaN(id)) return null + if (Number.isNaN(id)) return null const common = { id, @@ -182,7 +181,7 @@ export const message = deeplinkBuilder< if (chunks[0] === 'c') { const channelId = Number(chunks[1]) - if (isNaN(channelId)) return null + if (Number.isNaN(channelId)) return null return { channelId, diff --git a/packages/core/src/utils/links/common.ts b/packages/core/src/utils/links/common.ts index 0d4a8ce2..346eca77 100644 --- a/packages/core/src/utils/links/common.ts +++ b/packages/core/src/utils/links/common.ts @@ -28,7 +28,7 @@ interface BuildDeeplinkOptions { externalParse?: (path: string, query: URLSearchParams) => T | null } -export type Deeplink = { +export interface Deeplink { (options: T & CommonDeeplinkOptions): string parse: (url: string) => T | null } diff --git a/packages/core/src/utils/links/index.ts b/packages/core/src/utils/links/index.ts index a78c5c5b..11b56d0f 100644 --- a/packages/core/src/utils/links/index.ts +++ b/packages/core/src/utils/links/index.ts @@ -1,2 +1,3 @@ import * as links from './bundle.js' + export { links } diff --git a/packages/core/src/utils/links/misc.test.ts b/packages/core/src/utils/links/misc.test.ts index 75f459ac..f04ec147 100644 --- a/packages/core/src/utils/links/misc.test.ts +++ b/packages/core/src/utils/links/misc.test.ts @@ -1,9 +1,8 @@ -/* eslint-disable @typescript-eslint/no-unsafe-call */ import { describe, expect, it } from 'vitest' import { links } from './index.js' -describe('Deep links', function () { +describe('Deep links', () => { describe('Video chat links', () => { it('should generate t.me/username?videochat links', () => { expect(links.videoChat({ username: 'username' })).eq('https://t.me/username?videochat') diff --git a/packages/core/src/utils/links/misc.ts b/packages/core/src/utils/links/misc.ts index 8904cfe1..1932c35a 100644 --- a/packages/core/src/utils/links/misc.ts +++ b/packages/core/src/utils/links/misc.ts @@ -1,3 +1,4 @@ +import type { Deeplink } from './common.js' import { deeplinkBuilder } from './common.js' /** @@ -5,7 +6,7 @@ import { deeplinkBuilder } from './common.js' * * Used to share a prepared message and URL into a chosen chat's text field. */ -export const share = deeplinkBuilder<{ url: string; text?: string }>({ +export const share: Deeplink<{ url: string, text?: string }> = /* #__PURE__ */ deeplinkBuilder({ internalBuild: ({ url, text }) => ['msg_url', { url, text }], internalParse: (path, query) => { if (path !== 'msg_url') return null @@ -35,7 +36,7 @@ export const share = deeplinkBuilder<{ url: string; text?: string }>({ * * Used by users to boost channels, granting them the ability to post stories. */ -export const boost = deeplinkBuilder<{ username: string } | { channelId: number }>({ +export const boost: Deeplink<{ username: string } | { channelId: number }> = /* #__PURE__ */ deeplinkBuilder({ internalBuild: (params) => { if ('username' in params) { return ['boost', { domain: params.username }] @@ -54,7 +55,7 @@ export const boost = deeplinkBuilder<{ username: string } | { channelId: number const channelId = Number(query.get('channel')) - if (!isNaN(channelId)) { + if (!Number.isNaN(channelId)) { return { channelId: Number(channelId) } } @@ -72,7 +73,7 @@ export const boost = deeplinkBuilder<{ username: string } | { channelId: number if (path.startsWith('c/')) { const channelId = Number(path.slice(2)) - if (isNaN(channelId)) return null + if (Number.isNaN(channelId)) return null return { channelId } } @@ -86,7 +87,7 @@ export const boost = deeplinkBuilder<{ username: string } | { channelId: number /** * Link to a shared folder (chat list) */ -export const folder = deeplinkBuilder<{ slug: string }>({ +export const folder: Deeplink<{ slug: string }> = /* #__PURE__ */ deeplinkBuilder({ // tg://addlist?slug=XXX internalBuild: ({ slug }) => ['addlist', { slug }], internalParse: (path, query) => { diff --git a/packages/core/src/utils/links/proxy.test.ts b/packages/core/src/utils/links/proxy.test.ts index 8e1de46b..26570109 100644 --- a/packages/core/src/utils/links/proxy.test.ts +++ b/packages/core/src/utils/links/proxy.test.ts @@ -1,9 +1,8 @@ -/* eslint-disable @typescript-eslint/no-unsafe-call */ import { describe, expect, it } from 'vitest' import { links } from './index.js' -describe('Deep links', function () { +describe('Deep links', () => { describe('MTProxy links', () => { it('should generate t.me/proxy links', () => { expect( diff --git a/packages/core/src/utils/links/proxy.ts b/packages/core/src/utils/links/proxy.ts index 8bef20dd..c0cc42de 100644 --- a/packages/core/src/utils/links/proxy.ts +++ b/packages/core/src/utils/links/proxy.ts @@ -1,15 +1,16 @@ +import type { Deeplink } from './common.js' import { deeplinkBuilder } from './common.js' /** * MTProxy links */ -export const mtproxy = deeplinkBuilder<{ +export const mtproxy: Deeplink<{ server: string port: number secret: string -}>({ - internalBuild: (params) => ['proxy', params], - externalBuild: (params) => ['proxy', params], +}> = /* #__PURE__ */ deeplinkBuilder({ + internalBuild: params => ['proxy', params], + externalBuild: params => ['proxy', params], internalParse: (path, query) => { if (path !== 'proxy') return null @@ -17,7 +18,7 @@ export const mtproxy = deeplinkBuilder<{ const port = Number(query.get('port')) const secret = query.get('secret') - if (!server || isNaN(port) || !secret) return null + if (!server || Number.isNaN(port) || !secret) return null return { server, port, secret } }, @@ -28,7 +29,7 @@ export const mtproxy = deeplinkBuilder<{ const port = Number(query.get('port')) const secret = query.get('secret') - if (!server || isNaN(port) || !secret) return null + if (!server || Number.isNaN(port) || !secret) return null return { server, port, secret } }, @@ -37,14 +38,14 @@ export const mtproxy = deeplinkBuilder<{ /** * Socks5 proxy links */ -export const socks5 = deeplinkBuilder<{ +export const socks5: Deeplink<{ server: string port: number user?: string pass?: string -}>({ - internalBuild: (params) => ['socks', params], - externalBuild: (params) => ['socks', params], +}> = /* #__PURE__ */ deeplinkBuilder({ + internalBuild: params => ['socks', params], + externalBuild: params => ['socks', params], internalParse: (path, query) => { if (path !== 'socks') return null @@ -53,7 +54,7 @@ export const socks5 = deeplinkBuilder<{ const user = query.get('user') const pass = query.get('pass') - if (!server || isNaN(port)) return null + if (!server || Number.isNaN(port)) return null return { server, port, user: user || undefined, pass: pass || undefined } }, @@ -65,7 +66,7 @@ export const socks5 = deeplinkBuilder<{ const user = query.get('user') const pass = query.get('pass') - if (!server || isNaN(port)) return null + if (!server || Number.isNaN(port)) return null return { server, port, user: user || undefined, pass: pass || undefined } }, diff --git a/packages/core/src/utils/links/stickers.ts b/packages/core/src/utils/links/stickers.ts index a29edc3a..8d637d8e 100644 --- a/packages/core/src/utils/links/stickers.ts +++ b/packages/core/src/utils/links/stickers.ts @@ -1,3 +1,4 @@ +import type { Deeplink } from './common.js' import { deeplinkBuilder } from './common.js' /** @@ -5,10 +6,10 @@ import { deeplinkBuilder } from './common.js' * * Used to import stickersets or custom emoji stickersets */ -export const stickerset = deeplinkBuilder<{ +export const stickerset: Deeplink<{ slug: string emoji?: boolean -}>({ +}> = /* #__PURE__ */ deeplinkBuilder({ internalBuild: ({ slug, emoji }) => [emoji ? 'addemoji' : 'addstickers', { set: slug }], internalParse: (path, query) => { if (path !== 'addstickers' && path !== 'addemoji') return null diff --git a/packages/core/src/utils/links/user.test.ts b/packages/core/src/utils/links/user.test.ts index 14014416..abd4f934 100644 --- a/packages/core/src/utils/links/user.test.ts +++ b/packages/core/src/utils/links/user.test.ts @@ -1,9 +1,8 @@ -/* eslint-disable @typescript-eslint/no-unsafe-call */ import { describe, expect, it } from 'vitest' import { links } from './index.js' -describe('Deep links', function () { +describe('Deep links', () => { describe('Public username links', () => { it('should generate t.me/username links', () => { expect(links.publicUsername({ username: 'username' })).eq('https://t.me/username') diff --git a/packages/core/src/utils/links/user.ts b/packages/core/src/utils/links/user.ts index 39363fa6..5f56a4b1 100644 --- a/packages/core/src/utils/links/user.ts +++ b/packages/core/src/utils/links/user.ts @@ -1,3 +1,4 @@ +import type { Deeplink } from './common.js' import { deeplinkBuilder } from './common.js' /** @@ -5,7 +6,7 @@ import { deeplinkBuilder } from './common.js' * * Used to link to public users, groups and channels */ -export const publicUsername = deeplinkBuilder<{ username: string }>({ +export const publicUsername: Deeplink<{ username: string }> = /* #__PURE__ */ deeplinkBuilder({ internalBuild: ({ username }) => ['resolve', { domain: username }], internalParse: (path, query) => { if (path !== 'resolve') return null @@ -36,7 +37,7 @@ export const publicUsername = deeplinkBuilder<{ username: string }>({ * and they have an expiration date, specified by the expires field of the exportedContactToken * constructor returned by contacts.exportContactToken. */ -export const temporaryProfile = deeplinkBuilder<{ token: string }>({ +export const temporaryProfile: Deeplink<{ token: string }> = /* #__PURE__ */ deeplinkBuilder({ internalBuild: ({ token }) => ['contact', { token }], internalParse: (path, query) => { if (path !== 'contact') return null @@ -60,7 +61,7 @@ export const temporaryProfile = deeplinkBuilder<{ token: string }>({ * * Used to link to public and private users by their phone number. */ -export const phoneNumber = deeplinkBuilder<{ phone: string }>({ +export const phoneNumber: Deeplink<{ phone: string }> = /* #__PURE__ */ deeplinkBuilder({ internalBuild: ({ phone }) => ['resolve', { phone }], internalParse: (path, query) => { if (path !== 'resolve') return null diff --git a/packages/core/src/utils/logger.test.ts b/packages/core/src/utils/logger.test.ts index 10c7d128..3ed825b7 100644 --- a/packages/core/src/utils/logger.test.ts +++ b/packages/core/src/utils/logger.test.ts @@ -1,6 +1,5 @@ import Long from 'long' import { describe, expect, it, vi } from 'vitest' - import { tl } from '@mtcute/tl' import { LogManager } from './logger.js' @@ -10,7 +9,7 @@ describe('logger', () => { const mgr = new LogManager() mgr.level = LogManager.INFO - const spy = vi.fn>() + const spy = vi.fn() mgr.handler = spy return [mgr, spy] as const @@ -46,7 +45,7 @@ describe('logger', () => { const test1 = mgr.create('test1') const test2 = mgr.create('test2') - mgr.filter((tag) => tag === 'test1') + mgr.filter(tag => tag === 'test1') test1.info('test1 info') test2.info('test2 info') diff --git a/packages/core/src/utils/logger.ts b/packages/core/src/utils/logger.ts index 393a9464..93519db5 100644 --- a/packages/core/src/utils/logger.ts +++ b/packages/core/src/utils/logger.ts @@ -1,10 +1,12 @@ import { tl } from '@mtcute/tl' +import type { ICorePlatform } from '../platform.js' import { getPlatform } from '../platform.js' + import { isTlRpcError } from './type-assertions.js' const DEFAULT_LOG_LEVEL = 2 -const FORMATTER_RE = /%[a-zA-Z]/g +const FORMATTER_RE = /%[a-z]/gi /** * Logger created by {@link LogManager} @@ -32,7 +34,7 @@ export class Logger { getPrefix(): string { let s = '' - // eslint-disable-next-line @typescript-eslint/no-this-alias + // eslint-disable-next-line ts/no-this-alias let obj: Logger | undefined = this while (obj) { @@ -45,18 +47,17 @@ export class Logger { log(level: number, fmt: string, ...args: unknown[]): void { if (level > this.mgr.level) return - // eslint-disable-next-line dot-notation if (!this.mgr['_filter'](this.tag)) return // custom formatters if ( - fmt.includes('%h') || - fmt.includes('%b') || - fmt.includes('%j') || - fmt.includes('%J') || - fmt.includes('%l') || - fmt.includes('%L') || - fmt.includes('%e') + fmt.includes('%h') + || fmt.includes('%b') + || fmt.includes('%j') + || fmt.includes('%J') + || fmt.includes('%l') + || fmt.includes('%L') + || fmt.includes('%e') ) { let idx = 0 fmt = fmt.replace(FORMATTER_RE, (m) => { @@ -80,20 +81,20 @@ export class Logger { return JSON.stringify(val, (k, v) => { if ( - ArrayBuffer.isView(v) || - (typeof v === 'object' && v.type === 'Buffer' && Array.isArray(v.data)) // todo: how can we do this better? + ArrayBuffer.isView(v) + || (typeof v === 'object' && v.type === 'Buffer' && Array.isArray(v.data)) // todo: how can we do this better? ) { // eslint-disable-next-line let str = v.data ? Buffer.from(v.data as number[]).toString('hex') : this.mgr.platform.hexEncode(v) if (str.length > 300) { - str = str.slice(0, 300) + '...' + str = `${str.slice(0, 300)}...` } return str } - // eslint-disable-next-line @typescript-eslint/no-unsafe-return + // eslint-disable-next-line ts/no-unsafe-return return v }) } @@ -127,11 +128,11 @@ export class Logger { this.mgr.handler(this.color, level, this.tag, this.getPrefix() + fmt, args) } - readonly error = this.log.bind(this, LogManager.ERROR) - readonly warn = this.log.bind(this, LogManager.WARN) - readonly info = this.log.bind(this, LogManager.INFO) - readonly debug = this.log.bind(this, LogManager.DEBUG) - readonly verbose = this.log.bind(this, LogManager.VERBOSE) + readonly error: (fmt: string, ...args: unknown[]) => void = this.log.bind(this, LogManager.ERROR) + readonly warn: (fmt: string, ...args: unknown[]) => void = this.log.bind(this, LogManager.WARN) + readonly info: (fmt: string, ...args: unknown[]) => void = this.log.bind(this, LogManager.INFO) + readonly debug: (fmt: string, ...args: unknown[]) => void = this.log.bind(this, LogManager.DEBUG) + readonly verbose: (fmt: string, ...args: unknown[]) => void = this.log.bind(this, LogManager.VERBOSE) /** * Create a {@link Logger} with the given tag @@ -158,15 +159,14 @@ export class LogManager extends Logger { static DEBUG = 4 static VERBOSE = 5 - readonly platform + readonly platform: ICorePlatform level: number - handler + handler: (color: number, level: number, tag: string, fmt: string, args: unknown[]) => void constructor(tag = 'base') { // workaround because we cant pass this to super - // eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-argument + // eslint-disable-next-line ts/no-unsafe-argument super(null as any, tag) - // eslint-disable-next-line @typescript-eslint/no-explicit-any ;(this as any).mgr = this this.platform = getPlatform() diff --git a/packages/core/src/utils/long-utils.test.ts b/packages/core/src/utils/long-utils.test.ts index f5d0784d..9bf25852 100644 --- a/packages/core/src/utils/long-utils.test.ts +++ b/packages/core/src/utils/long-utils.test.ts @@ -2,10 +2,10 @@ import Long from 'long' import { describe, expect, it } from 'vitest' import { - longFromBuffer, - longFromFastString, LongMap, LongSet, + longFromBuffer, + longFromFastString, longToFastString, randomLong, removeFromLongArray, diff --git a/packages/core/src/utils/long-utils.ts b/packages/core/src/utils/long-utils.ts index e68ac392..8036a8d7 100644 --- a/packages/core/src/utils/long-utils.ts +++ b/packages/core/src/utils/long-utils.ts @@ -9,8 +9,8 @@ import { getRandomInt } from './misc-utils.js' * @param unsigned Whether the number should be unsigned */ export function randomLong(unsigned = false): Long { - const lo = getRandomInt(0xffffffff) - const hi = getRandomInt(0xffffffff) + const lo = getRandomInt(0xFFFFFFFF) + const hi = getRandomInt(0xFFFFFFFF) return new Long(lo, hi, unsigned) } @@ -94,11 +94,11 @@ export function longFromFastString(val: string, unsigned = false): Long { const parts = val.split('|') if (parts.length !== 2) throw new Error(`Invalid long fast string: ${val}`) - const low = parseInt(parts[0]) - const high = parseInt(parts[1]) + const low = Number.parseInt(parts[0]) + const high = Number.parseInt(parts[1]) - if (isNaN(low) || isNaN(high)) { - throw new Error(`Invalid long fast string: ${val}`) + if (Number.isNaN(low) || Number.isNaN(high)) { + throw new TypeError(`Invalid long fast string: ${val}`) } return new Long(low, high, unsigned) @@ -159,23 +159,23 @@ export class LongSet { return this._set.size } - add(val: Long) { + add(val: Long): void { this._set.add(longToFastString(val)) } - delete(val: Long) { + delete(val: Long): void { this._set.delete(longToFastString(val)) } - has(val: Long) { + has(val: Long): boolean { return this._set.has(longToFastString(val)) } - clear() { + clear(): void { this._set.clear() } - toArray() { + toArray(): Long[] { const arr: Long[] = [] for (const v of this._set) { diff --git a/packages/core/src/utils/lru-map.test.ts b/packages/core/src/utils/lru-map.test.ts index 8a8859b7..c0c8797e 100644 --- a/packages/core/src/utils/lru-map.test.ts +++ b/packages/core/src/utils/lru-map.test.ts @@ -71,43 +71,4 @@ describe('LruMap', () => { expect(lru.get('third')).toEqual(undefined) }) - - // it('Map backend', () => { - // const lru = new LruMap(2) - // - // lru.set('first', 1) - // expect(lru.has('first')).true - // expect(lru.has('second')).false - // expect(lru.get('first')).eq(1) - // - // lru.set('first', 42) - // expect(lru.has('first')).true - // expect(lru.has('second')).false - // expect(lru.get('first')).eq(42) - // - // lru.set('second', 2) - // expect(lru.has('first')).true - // expect(lru.has('second')).true - // expect(lru.get('first')).eq(42) - // expect(lru.get('second')).eq(2) - // - // lru.set('third', 3) - // expect(lru.has('first')).false - // expect(lru.has('second')).true - // expect(lru.has('third')).true - // expect(lru.get('first')).eq(undefined) - // expect(lru.get('second')).eq(2) - // expect(lru.get('third')).eq(3) - // - // lru.get('second') // update lru so that last = third - // lru.set('fourth', 4) - // expect(lru.has('first')).false - // expect(lru.has('second')).true - // expect(lru.has('third')).false - // expect(lru.has('fourth')).true - // expect(lru.get('first')).eq(undefined) - // expect(lru.get('second')).eq(2) - // expect(lru.get('third')).eq(undefined) - // expect(lru.get('fourth')).eq(4) - // }) }) diff --git a/packages/core/src/utils/lru-map.ts b/packages/core/src/utils/lru-map.ts index 944112b5..39d5301f 100644 --- a/packages/core/src/utils/lru-map.ts +++ b/packages/core/src/utils/lru-map.ts @@ -1,5 +1,5 @@ -/* eslint-disable @typescript-eslint/no-explicit-any,@typescript-eslint/no-unsafe-assignment */ -/* eslint-disable @typescript-eslint/no-unsafe-argument */ +/* eslint-disable ts/no-unsafe-assignment */ +/* eslint-disable ts/no-unsafe-argument */ // ^^ because of performance reasons import { LongMap } from './long-utils.js' diff --git a/packages/core/src/utils/lru-set.test.ts b/packages/core/src/utils/lru-set.test.ts index 23d05490..7285e06f 100644 --- a/packages/core/src/utils/lru-set.test.ts +++ b/packages/core/src/utils/lru-set.test.ts @@ -9,7 +9,7 @@ describe('LruSet', () => { const set = new LruSet(2) set.add('first') - expect(set.has('first')).true + expect(set.has('first')).toEqual(true) }) it('when =capacity items are added, they are all in the set', () => { @@ -18,8 +18,8 @@ describe('LruSet', () => { set.add('first') set.add('second') - expect(set.has('first')).true - expect(set.has('second')).true + expect(set.has('first')).toEqual(true) + expect(set.has('second')).toEqual(true) }) it('when >capacity items are added, only the last are in the set', () => { @@ -29,9 +29,9 @@ describe('LruSet', () => { set.add('second') set.add('third') - expect(set.has('first')).false - expect(set.has('second')).true - expect(set.has('third')).true + expect(set.has('first')).toEqual(false) + expect(set.has('second')).toEqual(true) + expect(set.has('third')).toEqual(true) }) it('when the same added is while not eliminated, it is ignored', () => { @@ -42,9 +42,9 @@ describe('LruSet', () => { set.add('first') set.add('third') - expect(set.has('first')).false - expect(set.has('second')).true - expect(set.has('third')).true + expect(set.has('first')).toEqual(false) + expect(set.has('second')).toEqual(true) + expect(set.has('third')).toEqual(true) }) }) @@ -53,7 +53,7 @@ describe('LruSet', () => { const set = new LruSet(2, true) set.add(Long.fromNumber(1)) - expect(set.has(Long.fromNumber(1))).true + expect(set.has(Long.fromNumber(1))).toEqual(true) }) it('when =capacity items are added, they are all in the set', () => { @@ -62,8 +62,8 @@ describe('LruSet', () => { set.add(Long.fromNumber(1)) set.add(Long.fromNumber(2)) - expect(set.has(Long.fromNumber(1))).true - expect(set.has(Long.fromNumber(2))).true + expect(set.has(Long.fromNumber(1))).toEqual(true) + expect(set.has(Long.fromNumber(2))).toEqual(true) }) it('when >capacity items are added, only the last are in the set', () => { @@ -73,9 +73,9 @@ describe('LruSet', () => { set.add(Long.fromNumber(2)) set.add(Long.fromNumber(3)) - expect(set.has(Long.fromNumber(1))).false - expect(set.has(Long.fromNumber(2))).true - expect(set.has(Long.fromNumber(3))).true + expect(set.has(Long.fromNumber(1))).toEqual(false) + expect(set.has(Long.fromNumber(2))).toEqual(true) + expect(set.has(Long.fromNumber(3))).toEqual(true) }) it('when the same added is while not eliminated, it is ignored', () => { @@ -86,9 +86,9 @@ describe('LruSet', () => { set.add(Long.fromNumber(1)) set.add(Long.fromNumber(3)) - expect(set.has(Long.fromNumber(1))).false - expect(set.has(Long.fromNumber(2))).true - expect(set.has(Long.fromNumber(3))).true + expect(set.has(Long.fromNumber(1))).toEqual(false) + expect(set.has(Long.fromNumber(2))).toEqual(true) + expect(set.has(Long.fromNumber(3))).toEqual(true) }) }) }) diff --git a/packages/core/src/utils/lru-set.ts b/packages/core/src/utils/lru-set.ts index 6d8a5d28..d80bab0a 100644 --- a/packages/core/src/utils/lru-set.ts +++ b/packages/core/src/utils/lru-set.ts @@ -1,7 +1,6 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable @typescript-eslint/no-unsafe-argument */ +/* eslint-disable ts/no-unsafe-argument */ // ^^ because of performance reasons -import Long from 'long' +import type Long from 'long' import { LongSet } from './long-utils.js' @@ -34,18 +33,19 @@ export class LruSet { this._set = forLong ? new LongSet() : new Set() } - clear() { + clear(): void { this._first = this._last = undefined this._set.clear() } - add(val: T) { + add(val: T): void { if (this._set.has(val as any)) return if (!this._first) this._first = { v: val } - if (!this._last) this._last = this._first - else { + if (!this._last) { + this._last = this._first + } else { this._last.n = { v: val } this._last = this._last.n } @@ -59,7 +59,7 @@ export class LruSet { } } - has(val: T) { + has(val: T): boolean { return this._set.has(val as any) } } diff --git a/packages/core/src/utils/misc-utils.ts b/packages/core/src/utils/misc-utils.ts index 3467604b..0891509d 100644 --- a/packages/core/src/utils/misc-utils.ts +++ b/packages/core/src/utils/misc-utils.ts @@ -3,11 +3,10 @@ * * @param ms Number of ms to sleep */ -export const sleep = (ms: number): Promise => new Promise((resolve) => setTimeout(resolve, ms)) +export const sleep = (ms: number): Promise => new Promise(resolve => setTimeout(resolve, ms)) export function sleepWithAbort(ms: number, signal: AbortSignal): Promise { return new Promise((resolve, reject) => { - // eslint-disable-next-line prefer-const let timeout: NodeJS.Timeout const onAbort = () => { diff --git a/packages/core/src/utils/peer-utils.test.ts b/packages/core/src/utils/peer-utils.test.ts index bddc86f6..cce0da3f 100644 --- a/packages/core/src/utils/peer-utils.test.ts +++ b/packages/core/src/utils/peer-utils.test.ts @@ -1,6 +1,5 @@ import Long from 'long' import { describe, expect, it } from 'vitest' - import { createStub } from '@mtcute/test' import { @@ -88,7 +87,7 @@ describe('getAllPeersFrom', () => { const stubChat = createStub('chat', { id: 789 }) const stubChannel = createStub('channel', { id: 101112 }) - /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument */ + /* eslint-disable ts/no-unsafe-argument */ it('should find all peers from objects containing users/chats fields', () => { expect([...getAllPeersFrom({ users: [], chats: [] } as any)]).toEqual([]) expect([ @@ -134,5 +133,5 @@ describe('getAllPeersFrom', () => { expect([...getAllPeersFrom({ users: [123, 456], chats: [123, 456] } as any)]).toEqual([]) }) - /* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument */ + /* eslint-enable ts/no-unsafe-argument */ }) diff --git a/packages/core/src/utils/peer-utils.ts b/packages/core/src/utils/peer-utils.ts index be896a2c..51f5479c 100644 --- a/packages/core/src/utils/peer-utils.ts +++ b/packages/core/src/utils/peer-utils.ts @@ -1,7 +1,7 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtArgumentError, MtUnsupportedError } from '../types/errors.js' -import { BasicPeerType } from '../types/peers.js' +import type { BasicPeerType } from '../types/peers.js' // src: https://github.com/tdlib/td/blob/master/td/telegram/DialogId.h const ZERO_CHANNEL_ID = -1000000000000 @@ -45,7 +45,7 @@ export function getBarePeerId(peer: tl.TypePeer): number { /** * Get the marked (non-bare) ID from a {@link tl.TypePeer} * - * *Mark* is bot API compatible, which is: + * Mark* is bot API compatible, which is: * - ID stays the same for users * - ID is negated for chats * - ID is negated and `-1e12` is subtracted for channels @@ -125,7 +125,7 @@ export function* getAllPeersFrom(obj: tl.TlObject | tl.TlObject[]): Iterable { const data = await this.params.reload(this._data) this.setData(data) - this._listeners.forEach((cb) => cb(data)) + this._listeners.forEach(cb => cb(data)) }) get isStale(): boolean { diff --git a/packages/core/src/utils/tl-json.ts b/packages/core/src/utils/tl-json.ts index ea3cf500..b93fc7a5 100644 --- a/packages/core/src/utils/tl-json.ts +++ b/packages/core/src/utils/tl-json.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import { MtArgumentError } from '../types/errors.js' diff --git a/packages/core/src/utils/type-assertions.test.ts b/packages/core/src/utils/type-assertions.test.ts index e1fd6166..e721860b 100644 --- a/packages/core/src/utils/type-assertions.test.ts +++ b/packages/core/src/utils/type-assertions.test.ts @@ -65,16 +65,14 @@ describe('assertTypeIs', () => { }) it('should throw for incorrect types', () => { - // eslint-disable-next-line expect(() => assertTypeIs('peerUser', { _: 'peerChannel', channelId: 1 } as any, 'peerUser')).toThrow() - // eslint-disable-next-line + expect(() => mtpAssertTypeIs('peerUser', { _: 'mt_rpc_answer_unknown' } as any, 'peerUser')).toThrow() }) }) describe('assertTypeIsNot', () => { it('should not throw for correct types', () => { - // eslint-disable-next-line assertTypeIsNot('peerUser', { _: 'peerChannel', channelId: 1 } as any, 'peerUser') }) diff --git a/packages/core/src/utils/type-assertions.ts b/packages/core/src/utils/type-assertions.ts index c28ed805..51d7bdee 100644 --- a/packages/core/src/utils/type-assertions.ts +++ b/packages/core/src/utils/type-assertions.ts @@ -1,4 +1,4 @@ -import { mtp, tl } from '@mtcute/tl' +import type { mtp, tl } from '@mtcute/tl' import { MtTypeAssertionError } from '../types/errors.js' @@ -66,7 +66,7 @@ export function assertTypeIsNot( expectedNot: K, ): asserts obj is Exclude> { if (obj._ === expectedNot) { - throw new MtTypeAssertionError(context, 'not ' + expectedNot, obj._) + throw new MtTypeAssertionError(context, `not ${expectedNot}`, obj._) } } diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index e24e47cd..5b7b44b7 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -1,15 +1,15 @@ { - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "./dist/esm", - "rootDir": "./src", - }, - "include": [ - "./src", - ], - "references": [ - { "path": "../tl" }, - { "path": "../tl-runtime" }, - { "path": "../test" }, - ] + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist/esm" + }, + "references": [ + { "path": "../tl" }, + { "path": "../tl-runtime" }, + { "path": "../test" } + ], + "include": [ + "./src" + ] } diff --git a/packages/create-bot/package.json b/packages/create-bot/package.json index 63746dc1..b1703b45 100644 --- a/packages/create-bot/package.json +++ b/packages/create-bot/package.json @@ -1,30 +1,30 @@ { - "name": "@mtcute/create-bot", - "private": true, - "version": "0.16.4", - "description": "Bot starter kit for mtcute", - "author": "alina sireneva ", - "license": "MIT", - "type": "module", - "scripts": { - "build": "pnpm run -w build-package create-bot", - "run": "ts-node-esm src/main.ts", - "run:deno": "node scripts/generate-import-map.js && deno run --import-map=./scripts/import-map.json -A --unstable-sloppy-imports src/main.ts" - }, - "bin": { - "create-bot": "./src/main.js" - }, - "dependencies": { - "colorette": "2.0.20", - "cross-spawn": "7.0.3", - "glob": "10.2.6", - "handlebars": "4.7.8", - "inquirer": "9.2.11", - "openurl": "1.1.1" - }, - "devDependencies": { - "@types/cross-spawn": "^6.0.6", - "@types/inquirer": "^9.0.6", - "@types/openurl": "^1.0.3" - } + "name": "@mtcute/create-bot", + "type": "module", + "version": "0.16.4", + "private": true, + "description": "Bot starter kit for mtcute", + "author": "alina sireneva ", + "license": "MIT", + "bin": { + "create-bot": "./src/main.js" + }, + "scripts": { + "build": "pnpm run -w build-package create-bot", + "run": "tsx src/main.ts", + "run:deno": "node scripts/generate-import-map.js && deno run --import-map=./scripts/import-map.json -A --unstable-sloppy-imports src/main.ts" + }, + "dependencies": { + "colorette": "2.0.20", + "cross-spawn": "7.0.3", + "glob": "11.0.0", + "handlebars": "4.7.8", + "inquirer": "9.2.11", + "openurl": "1.1.1" + }, + "devDependencies": { + "@types/cross-spawn": "^6.0.6", + "@types/inquirer": "^9.0.6", + "@types/openurl": "^1.0.3" + } } diff --git a/packages/create-bot/scripts/generate-import-map.js b/packages/create-bot/scripts/generate-import-map.js index 888ffe95..73d9485e 100644 --- a/packages/create-bot/scripts/generate-import-map.js +++ b/packages/create-bot/scripts/generate-import-map.js @@ -1,4 +1,4 @@ -import * as fs from 'fs' +import * as fs from 'node:fs' const packageJson = JSON.parse(fs.readFileSync(new URL('../package.json', import.meta.url))) diff --git a/packages/create-bot/src/cli.ts b/packages/create-bot/src/cli.ts index b84cdb56..5ce5e743 100644 --- a/packages/create-bot/src/cli.ts +++ b/packages/create-bot/src/cli.ts @@ -2,11 +2,12 @@ import * as colors from 'colorette' import inquirer from 'inquirer' import { open } from 'openurl' -import { readConfig, UserConfigPersisted, writeConfig } from './config.js' +import type { UserConfigPersisted } from './config.js' +import { readConfig, writeConfig } from './config.js' import { TELEGRAM_APPS_PAGE } from './constants.js' import { getFeatureChoices } from './features/cli.js' -import { MtcuteFeature } from './features/types.js' -import { PackageManager } from './package-manager.js' +import type { MtcuteFeature } from './features/types.js' +import type { PackageManager } from './package-manager.js' interface UserConfigAnswers { reuse?: boolean @@ -49,7 +50,7 @@ export async function askForConfigPersisted(): Promise { setTimeout(() => { try { open(TELEGRAM_APPS_PAGE) - } catch (e) {} + } catch {} }, 1000) return [ @@ -121,7 +122,7 @@ export async function askForConfig(packageManager: PackageManager): Promise { } } -export async function writeConfig(config: UserConfigPersisted) { +export async function writeConfig(config: UserConfigPersisted): Promise { const filePath = getConfigFilePath() await fs.mkdir(path.dirname(filePath), { recursive: true }) diff --git a/packages/create-bot/src/dependencies.ts b/packages/create-bot/src/dependencies.ts index ea15c4a5..9fdde598 100644 --- a/packages/create-bot/src/dependencies.ts +++ b/packages/create-bot/src/dependencies.ts @@ -1,9 +1,9 @@ import { join } from 'node:path' -import { UserConfig } from './cli.js' +import type { UserConfig } from './cli.js' import { MtcuteFeature } from './features/types.js' import { fetchAllLatestVersionsJsr } from './jsr.js' -import { getInstallCommand, PackageManager } from './package-manager.js' +import { PackageManager, getInstallCommand } from './package-manager.js' import { exec } from './utils.js' export interface DependenciesList { @@ -11,7 +11,7 @@ export interface DependenciesList { devDepdenencies: string[] } -export function buildDependenciesList(config: UserConfig) { +export function buildDependenciesList(config: UserConfig): DependenciesList { const dependencies = [] const devDepdenencies = [] @@ -57,7 +57,7 @@ export function buildDependenciesList(config: UserConfig) { } } -export async function installDependencies(cwd: string, config: UserConfig) { +export async function installDependencies(cwd: string, config: UserConfig): Promise { const { dependencies, devDepdenencies } = buildDependenciesList(config) if (config.packageManager === PackageManager.Deno) { diff --git a/packages/create-bot/src/features/cli.ts b/packages/create-bot/src/features/cli.ts index 9f4058f3..ba4c67a6 100644 --- a/packages/create-bot/src/features/cli.ts +++ b/packages/create-bot/src/features/cli.ts @@ -1,6 +1,7 @@ -import { CheckboxChoiceOptions } from 'inquirer' +import type { CheckboxChoiceOptions } from 'inquirer' import { PackageManager } from '../package-manager.js' + import { MtcuteFeature } from './types.js' export function getFeatureChoices(packageMananger: PackageManager): CheckboxChoiceOptions[] { diff --git a/packages/create-bot/src/main.ts b/packages/create-bot/src/main.ts index 9956d274..2a0fe48b 100644 --- a/packages/create-bot/src/main.ts +++ b/packages/create-bot/src/main.ts @@ -1,13 +1,14 @@ #!/usr/bin/env node -import * as colors from 'colorette' import { basename, dirname, join } from 'node:path' import process from 'node:process' import { fileURLToPath } from 'node:url' +import * as colors from 'colorette' + import { askForConfig } from './cli.js' import { installDependencies } from './dependencies.js' import { MtcuteFeature } from './features/types.js' -import { getExecCommand, getPackageManager, PackageManager } from './package-manager.js' +import { PackageManager, getExecCommand, getPackageManager } from './package-manager.js' import { runTemplater } from './templater.js' import { exec } from './utils.js' @@ -32,7 +33,7 @@ const config = await askForConfig(packageManager) config.name = basename(projectName) let outDir = process.env.TARGET_DIR || projectName -if (!outDir.match(/^([A-Za-z]:)?[/\\]/)) { +if (!outDir.match(/^(?:[A-Z]:)?[/\\]/i)) { // assume it's a relative path outDir = join(process.cwd(), outDir) } diff --git a/packages/create-bot/src/package-manager.ts b/packages/create-bot/src/package-manager.ts index f5419c9b..8a9741e2 100644 --- a/packages/create-bot/src/package-manager.ts +++ b/packages/create-bot/src/package-manager.ts @@ -1,6 +1,7 @@ -import * as colors from 'colorette' import process from 'node:process' +import * as colors from 'colorette' + export function getPackageManagerVersion(): [string, string] | null { if (typeof Deno !== 'undefined') { return null @@ -56,7 +57,7 @@ export function getPackageManager(): PackageManager { } } -export function getInstallCommand(params: { mgr: PackageManager; packages: string[]; dev?: boolean }): string[] { +export function getInstallCommand(params: { mgr: PackageManager, packages: string[], dev?: boolean }): string[] { const { mgr, packages, dev } = params const exec: string[] = [mgr] @@ -84,7 +85,7 @@ export function getInstallCommand(params: { mgr: PackageManager; packages: strin return exec } -export function getExecCommand(mgr: PackageManager, ...cmd: string[]) { +export function getExecCommand(mgr: PackageManager, ...cmd: string[]): string[] { switch (mgr) { case PackageManager.Npm: return ['npx', ...cmd] @@ -99,7 +100,7 @@ export function getExecCommand(mgr: PackageManager, ...cmd: string[]) { } } -export function packageManagerToRuntime(mgr: PackageManager) { +export function packageManagerToRuntime(mgr: PackageManager): 'node' | 'bun' | 'deno' { switch (mgr) { case PackageManager.Npm: case PackageManager.Yarn: diff --git a/packages/create-bot/src/templater.ts b/packages/create-bot/src/templater.ts index 16bb508c..dcbc707b 100644 --- a/packages/create-bot/src/templater.ts +++ b/packages/create-bot/src/templater.ts @@ -1,25 +1,26 @@ -import * as glob from 'glob' -import Handlebars from 'handlebars' import { promises as fs } from 'node:fs' import * as path from 'node:path' +import * as glob from 'glob' +import Handlebars from 'handlebars' + import type { UserConfig } from './cli.js' -import { MtcuteFeature } from './features/types.js' +import type { MtcuteFeature } from './features/types.js' import { getPackageManagerVersion, packageManagerToRuntime } from './package-manager.js' const templater = Handlebars.create() const NOEMIT_HEADER = '/* DO NOT EMIT */' templater.registerHelper({ - emit_if: (cond) => (cond ? '' : NOEMIT_HEADER), - emit_unless: (cond) => (cond ? NOEMIT_HEADER : ''), + emit_if: cond => (cond ? '' : NOEMIT_HEADER), + emit_unless: cond => (cond ? NOEMIT_HEADER : ''), eq: (v1, v2) => v1 === v2, ne: (v1, v2) => v1 !== v2, lt: (v1, v2) => v1 < v2, gt: (v1, v2) => v1 > v2, lte: (v1, v2) => v1 <= v2, gte: (v1, v2) => v1 >= v2, - not: (v) => !v, + not: v => !v, and(...args) { return Array.prototype.every.call(args, Boolean) }, @@ -46,7 +47,6 @@ export async function runTemplaterForFile(file: string, config: UserConfig): Pro return acc }, - // eslint-disable-next-line @typescript-eslint/prefer-reduce-type-parameter {} as Record, ), }) diff --git a/packages/create-bot/src/utils.ts b/packages/create-bot/src/utils.ts index d4bb7d9b..46df61e7 100644 --- a/packages/create-bot/src/utils.ts +++ b/packages/create-bot/src/utils.ts @@ -1,9 +1,9 @@ import * as colors from 'colorette' import { spawn } from 'cross-spawn' -export function exec(cwd: string, ...cmd: string[]) { +export function exec(cwd: string, ...cmd: string[]): Promise { return new Promise((resolve, reject) => { - console.log(`${colors.blue('$')} ${cmd.map((it) => (it.includes(' ') ? JSON.stringify(it) : it)).join(' ')}`) + console.log(`${colors.blue('$')} ${cmd.map(it => (it.includes(' ') ? JSON.stringify(it) : it)).join(' ')}`) const proc = spawn(cmd[0], cmd.slice(1), { stdio: 'inherit', diff --git a/packages/create-bot/template/package.json.hbs b/packages/create-bot/template/package.json.hbs index 5576e2c5..5b75fd6e 100644 --- a/packages/create-bot/template/package.json.hbs +++ b/packages/create-bot/template/package.json.hbs @@ -11,7 +11,6 @@ {{#if features.linters}} "lint": "eslint .", "lint:fix": "eslint --fix .", - "format": "prettier --write \"src/**/*.ts\"", {{/if}} {{#if (eq runtime "bun")}} {{#if features.typescript}} diff --git a/packages/create-bot/tsconfig.json b/packages/create-bot/tsconfig.json index 04e9fb30..8439751c 100644 --- a/packages/create-bot/tsconfig.json +++ b/packages/create-bot/tsconfig.json @@ -1,9 +1,9 @@ { - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "./dist" - }, - "include": [ - "./src" - ] + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "./dist" + }, + "include": [ + "./src" + ] } diff --git a/packages/crypto-node/README.md b/packages/crypto-node/README.md index fab03468..10bdf2a6 100644 --- a/packages/crypto-node/README.md +++ b/packages/crypto-node/README.md @@ -29,4 +29,4 @@ const tg = new TelegramClient({ ## Benchmarks -See https://github.com/mtcute/benchmarks \ No newline at end of file +See https://github.com/mtcute/benchmarks diff --git a/packages/crypto-node/build.config.cjs b/packages/crypto-node/build.config.cjs index fa1e79df..9151f652 100644 --- a/packages/crypto-node/build.config.cjs +++ b/packages/crypto-node/build.config.cjs @@ -1,10 +1,10 @@ -const crypto = require('crypto') -const path = require('path') -const fs = require('fs') -const cp = require('child_process') -const { Readable } = require('stream') +const crypto = require('node:crypto') +const path = require('node:path') +const fs = require('node:fs') +const cp = require('node:child_process') +const { Readable } = require('node:stream') -const git = require('../../scripts/git-utils') +let git const GITHUB_TOKEN = process.env.GITHUB_TOKEN let SKIP_PREBUILT = process.env.BUILD_FOR_DOCS === '1' @@ -15,7 +15,7 @@ if (!GITHUB_TOKEN && !SKIP_PREBUILT) { } const GITHUB_HEADERS = { - Authorization: `Bearer ${GITHUB_TOKEN}`, + 'Authorization': `Bearer ${GITHUB_TOKEN}`, 'Content-Type': 'application/json', 'X-GitHub-Api-Version': '2022-11-28', } @@ -23,22 +23,22 @@ const API_PREFIX = 'https://api.github.com/repos/mtcute/mtcute/actions/workflows const PLATFORMS = ['ubuntu', 'macos', 'windows'] async function findArtifactsByHash(hash) { - const runs = await fetch(`${API_PREFIX}/runs?per_page=100`, { headers: GITHUB_HEADERS }).then((r) => r.json()) + const runs = await fetch(`${API_PREFIX}/runs?per_page=100`, { headers: GITHUB_HEADERS }).then(r => r.json()) for (const run of runs.workflow_runs) { if (run.conclusion !== 'success' || run.status !== 'completed') continue const artifacts = await fetch(`${run.url}/artifacts`, { headers: GITHUB_HEADERS }) - .then((r) => r.json()) - .then((r) => r.artifacts) + .then(r => r.json()) + .then(r => r.artifacts) for (const it of artifacts) { if (it.expired) continue const parts = it.name.split('-') - if (parts[0] === 'prebuilt' && - PLATFORMS.includes(parts[1]) && - parts[3] === hash) { + if (parts[0] === 'prebuilt' + && PLATFORMS.includes(parts[1]) + && parts[3] === hash) { return artifacts } } @@ -64,16 +64,16 @@ async function runWorkflow(commit, hash) { // wait for the workflow to finish // github api is awesome and doesn't return the run id, so let's just assume it's the last one - await new Promise((resolve) => setTimeout(resolve, 5000)) + await new Promise(resolve => setTimeout(resolve, 5000)) const runsRes = await fetch(`${API_PREFIX}/runs`, { headers: GITHUB_HEADERS, - }).then((r) => r.json()) + }).then(r => r.json()) let run = runsRes.workflow_runs[0] while (run.status === 'queued' || run.status === 'in_progress') { - await new Promise((resolve) => setTimeout(resolve, 5000)) - run = await fetch(run.url, { headers: GITHUB_HEADERS }).then((r) => r.json()) + await new Promise(resolve => setTimeout(resolve, 5000)) + run = await fetch(run.url, { headers: GITHUB_HEADERS }).then(r => r.json()) } if (run.status !== 'completed') { @@ -86,16 +86,16 @@ async function runWorkflow(commit, hash) { // fetch artifacts const artifacts = await fetch(`${run.url}/artifacts`, { headers: GITHUB_HEADERS }) - .then((r) => r.json()) - .then((r) => r.artifacts) + .then(r => r.json()) + .then(r => r.artifacts) // validate their names for (const it of artifacts) { const parts = it.name.split('-') - if (parts[0] !== 'prebuilt' || - !PLATFORMS.includes(parts[1]) || - parts[3] !== hash) { + if (parts[0] !== 'prebuilt' + || !PLATFORMS.includes(parts[1]) + || parts[3] !== hash) { throw new Error(`Invalid artifact name: ${it.name}`) } } @@ -151,6 +151,8 @@ async function extractArtifacts(artifacts) { module.exports = ({ fs, glob, path, packageDir, outDir }) => ({ async final() { + // eslint-disable-next-line import/no-relative-packages + git = await import('../../scripts/git-utils.js') const libDir = path.join(packageDir, 'lib') if (!SKIP_PREBUILT) { diff --git a/packages/crypto-node/package.json b/packages/crypto-node/package.json index 762abadd..57c78342 100644 --- a/packages/crypto-node/package.json +++ b/packages/crypto-node/package.json @@ -1,30 +1,30 @@ { - "name": "@mtcute/crypto-node", - "version": "0.16.2", - "description": "Native crypto implementation for NodeJS", - "author": "alina sireneva ", - "private": true, - "license": "MIT", - "type": "module", - "sideEffects": false, - "scripts": { - "build": "pnpm run -w build-package crypto-node", - "install": "node-gyp-build", - "rebuild": "node-gyp configure && node-gyp -j 16 rebuild", - "clean": "node-gyp clean" - }, - "keepScripts": [ - "install" - ], - "exports": { - ".": "./src/index.ts", - "./native.js": "./src/native.cjs" - }, - "dependencies": { - "@mtcute/node": "workspace:^", - "node-gyp-build": "4.8.1" - }, - "devDependencies": { - "@mtcute/test": "workspace:^" - } + "name": "@mtcute/crypto-node", + "type": "module", + "version": "0.16.2", + "private": true, + "description": "Native crypto implementation for NodeJS", + "author": "alina sireneva ", + "license": "MIT", + "sideEffects": false, + "exports": { + ".": "./src/index.ts", + "./native.js": "./src/native.cjs" + }, + "scripts": { + "build": "pnpm run -w build-package crypto-node", + "install": "node-gyp-build", + "rebuild": "node-gyp configure && node-gyp -j 16 rebuild", + "clean": "node-gyp clean" + }, + "keepScripts": [ + "install" + ], + "dependencies": { + "@mtcute/node": "workspace:^", + "node-gyp-build": "4.8.1" + }, + "devDependencies": { + "@mtcute/test": "workspace:^" + } } diff --git a/packages/crypto-node/src/index.ts b/packages/crypto-node/src/index.ts index 570ffbc1..6f192873 100644 --- a/packages/crypto-node/src/index.ts +++ b/packages/crypto-node/src/index.ts @@ -1,8 +1,8 @@ -import { BaseNodeCryptoProvider, IEncryptionScheme } from '@mtcute/node/utils.js' +import type { IEncryptionScheme } from '@mtcute/node/utils.js' +import { BaseNodeCryptoProvider } from '@mtcute/node/utils.js' import { native } from './native.cjs' -// eslint-disable-next-line camelcase const { ige256_decrypt, ige256_encrypt } = native /** diff --git a/packages/crypto-node/src/native.cjs b/packages/crypto-node/src/native.cjs index c46a9aa2..227931b4 100644 --- a/packages/crypto-node/src/native.cjs +++ b/packages/crypto-node/src/native.cjs @@ -1,3 +1,4 @@ +// eslint-disable-next-line node/no-path-concat const native = require('node-gyp-build')(`${__dirname}/..`) module.exports = { native } diff --git a/packages/crypto-node/src/native.d.cts b/packages/crypto-node/src/native.d.cts index 131cd7c4..8aa793d2 100644 --- a/packages/crypto-node/src/native.d.cts +++ b/packages/crypto-node/src/native.d.cts @@ -1,4 +1,4 @@ export const native: { - ige256_encrypt(data: Uint8Array, key: Uint8Array, iv: Uint8Array): Uint8Array - ige256_decrypt(data: Uint8Array, key: Uint8Array, iv: Uint8Array): Uint8Array + ige256_encrypt: (data: Uint8Array, key: Uint8Array, iv: Uint8Array) => Uint8Array + ige256_decrypt: (data: Uint8Array, key: Uint8Array, iv: Uint8Array) => Uint8Array } diff --git a/packages/crypto-node/tests/node-native-crypto.test.ts b/packages/crypto-node/tests/node-native-crypto.test.ts index 9f271f4d..570a0ea1 100644 --- a/packages/crypto-node/tests/node-native-crypto.test.ts +++ b/packages/crypto-node/tests/node-native-crypto.test.ts @@ -1,5 +1,4 @@ import { describe } from 'vitest' - import { testCryptoProvider } from '@mtcute/test' if (import.meta.env.TEST_ENV === 'node' || import.meta.env.TEST_ENV === 'bun') { diff --git a/packages/crypto-node/tests/tsconfig.json b/packages/crypto-node/tests/tsconfig.json index 23b6b033..ba289afc 100644 --- a/packages/crypto-node/tests/tsconfig.json +++ b/packages/crypto-node/tests/tsconfig.json @@ -1,9 +1,9 @@ { - "extends": "../../../tsconfig.json", - "include": [ - "." - ], - "references": [ - { "path": "../" } - ] + "extends": "../../../tsconfig.json", + "references": [ + { "path": "../" } + ], + "include": [ + "." + ] } diff --git a/packages/crypto-node/tsconfig.json b/packages/crypto-node/tsconfig.json index 6a5497ee..3b5437ec 100644 --- a/packages/crypto-node/tsconfig.json +++ b/packages/crypto-node/tsconfig.json @@ -1,13 +1,13 @@ { - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "./dist/esm", - "rootDir": "./src" - }, - "include": [ - "./src", - ], - "references": [ - { "path": "../core" } - ] + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist/esm" + }, + "references": [ + { "path": "../core" } + ], + "include": [ + "./src" + ] } diff --git a/packages/deno/package.json b/packages/deno/package.json index 69df2c8f..00eb5ee6 100644 --- a/packages/deno/package.json +++ b/packages/deno/package.json @@ -1,31 +1,31 @@ { - "name": "@mtcute/deno", - "private": true, - "version": "0.16.6", - "description": "Meta-package for Deno", - "author": "alina sireneva ", - "license": "MIT", - "main": "src/index.ts", - "type": "module", - "sideEffects": false, - "scripts": { - "docs": "typedoc", - "build": "pnpm run -w build-package deno" - }, - "exports": { - ".": "./src/index.ts", - "./utils.js": "./src/utils.ts", - "./methods.js": "./src/methods.ts" - }, - "dependencies": { - "@mtcute/core": "workspace:^", - "@mtcute/wasm": "workspace:^", - "@mtcute/markdown-parser": "workspace:^", - "@mtcute/html-parser": "workspace:^", - "@db/sqlite": "npm:@jsr/db__sqlite@0.11.1", - "@std/io": "npm:@jsr/std__io@0.223.0" - }, - "devDependencies": { - "@mtcute/test": "workspace:^" - } + "name": "@mtcute/deno", + "type": "module", + "version": "0.16.6", + "private": true, + "description": "Meta-package for Deno", + "author": "alina sireneva ", + "license": "MIT", + "sideEffects": false, + "exports": { + ".": "./src/index.ts", + "./utils.js": "./src/utils.ts", + "./methods.js": "./src/methods.ts" + }, + "main": "src/index.ts", + "scripts": { + "docs": "typedoc", + "build": "pnpm run -w build-package deno" + }, + "dependencies": { + "@db/sqlite": "npm:@jsr/db__sqlite@0.11.1", + "@mtcute/core": "workspace:^", + "@mtcute/html-parser": "workspace:^", + "@mtcute/markdown-parser": "workspace:^", + "@mtcute/wasm": "workspace:^", + "@std/io": "npm:@jsr/std__io@0.223.0" + }, + "devDependencies": { + "@mtcute/test": "workspace:^" + } } diff --git a/packages/deno/src/client.ts b/packages/deno/src/client.ts index dbf1d523..07158e74 100644 --- a/packages/deno/src/client.ts +++ b/packages/deno/src/client.ts @@ -1,12 +1,15 @@ -import { createInterface, Interface as RlInterface } from 'node:readline' +import type { Interface as RlInterface } from 'node:readline' +import { createInterface } from 'node:readline' import { Readable, Writable } from 'node:stream' -import { FileDownloadLocation, FileDownloadParameters, ITelegramStorageProvider, PartialOnly, User } from '@mtcute/core' +import type { FileDownloadLocation, FileDownloadParameters, ITelegramStorageProvider, PartialOnly, User } from '@mtcute/core' +import type { + BaseTelegramClientOptions as BaseTelegramClientOptionsBase, + TelegramClientOptions, +} from '@mtcute/core/client.js' import { BaseTelegramClient as BaseTelegramClientBase, - BaseTelegramClientOptions as BaseTelegramClientOptionsBase, TelegramClient as TelegramClientBase, - TelegramClientOptions, } from '@mtcute/core/client.js' import { setPlatform } from '@mtcute/core/platform.js' @@ -48,9 +51,9 @@ export class BaseTelegramClient extends BaseTelegramClientBase { transport: () => new TcpTransport(), ...opts, storage: - typeof opts.storage === 'string' ? - new SqliteStorage(opts.storage) : - opts.storage ?? new SqliteStorage('client.session'), + typeof opts.storage === 'string' + ? new SqliteStorage(opts.storage) + : opts.storage ?? new SqliteStorage('client.session'), }) } } @@ -93,7 +96,7 @@ export class TelegramClient extends TelegramClientBase { }) } - return new Promise((res) => this._rl?.question(text, res)) + return new Promise(res => this._rl?.question(text, res)) } close(): Promise { @@ -133,7 +136,7 @@ export class TelegramClient extends TelegramClientBase { this.start(params) .then(then) - .catch((err) => this.emitError(err)) + .catch(err => this.emitError(err)) } downloadToFile( diff --git a/packages/deno/src/methods/download-file.ts b/packages/deno/src/methods/download-file.ts index fc2adf48..972af343 100644 --- a/packages/deno/src/methods/download-file.ts +++ b/packages/deno/src/methods/download-file.ts @@ -1,6 +1,6 @@ -import { FileDownloadLocation, FileDownloadParameters, FileLocation, ITelegramClient } from '@mtcute/core' +import type { FileDownloadLocation, FileDownloadParameters, ITelegramClient } from '@mtcute/core' +import { FileLocation } from '@mtcute/core' import { downloadAsIterable } from '@mtcute/core/methods.js' - import { writeAll } from '@std/io/write-all' /** diff --git a/packages/deno/src/platform.ts b/packages/deno/src/platform.ts index aaff526a..24bccea4 100644 --- a/packages/deno/src/platform.ts +++ b/packages/deno/src/platform.ts @@ -1,4 +1,4 @@ -import { ICorePlatform } from '@mtcute/core/platform.js' +import type { ICorePlatform } from '@mtcute/core/platform.js' import { base64Decode, base64Encode } from './common-internals-web/base64.js' import { hexDecode, hexEncode } from './common-internals-web/hex.js' @@ -17,9 +17,9 @@ export class DenoPlatform implements ICorePlatform { } getDefaultLogLevel(): number | null { - const envLogLevel = parseInt(Deno.env.get('MTCUTE_LOG_LEVEL') ?? '') + const envLogLevel = Number.parseInt(Deno.env.get('MTCUTE_LOG_LEVEL') ?? '') - if (!isNaN(envLogLevel)) { + if (!Number.isNaN(envLogLevel)) { return envLogLevel } diff --git a/packages/deno/src/sqlite/driver.ts b/packages/deno/src/sqlite/driver.ts index 5fe03fdd..64686318 100644 --- a/packages/deno/src/sqlite/driver.ts +++ b/packages/deno/src/sqlite/driver.ts @@ -1,10 +1,9 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import { BaseSqliteStorageDriver, ISqliteDatabase, ISqliteStatement } from '@mtcute/core' - -import { Logger } from '../utils.js' - +import type { ISqliteDatabase, ISqliteStatement } from '@mtcute/core' +import { BaseSqliteStorageDriver } from '@mtcute/core' import type { BindParameters, Database as TDatabase, Statement as TStatement } from '@db/sqlite' +import type { Logger } from '../utils.js' + let Database: typeof import('@db/sqlite').Database export interface SqliteStorageDriverOptions { @@ -84,7 +83,7 @@ class WrappedDatabase implements ISqliteDatabase { export class SqliteStorageDriver extends BaseSqliteStorageDriver { constructor( readonly filename = ':memory:', - readonly params?: SqliteStorageDriverOptions, + readonly params?: SqliteStorageDriverOptions | undefined, ) { super() } @@ -95,7 +94,7 @@ export class SqliteStorageDriver extends BaseSqliteStorageDriver { // in case the user doesn't use sqlite storage Database = (await import('@db/sqlite')).Database } - super._load() + await super._load() } _createDatabase(): ISqliteDatabase { diff --git a/packages/deno/src/sqlite/index.ts b/packages/deno/src/sqlite/index.ts index 882b228d..f4fbb33c 100644 --- a/packages/deno/src/sqlite/index.ts +++ b/packages/deno/src/sqlite/index.ts @@ -1,13 +1,14 @@ import { BaseSqliteStorage } from '@mtcute/core' -import { SqliteStorageDriver, SqliteStorageDriverOptions } from './driver.js' +import type { SqliteStorageDriverOptions } from './driver.js' +import { SqliteStorageDriver } from './driver.js' export { SqliteStorageDriver } from './driver.js' export class SqliteStorage extends BaseSqliteStorage { constructor( readonly filename = ':memory:', - readonly params?: SqliteStorageDriverOptions, + readonly params?: SqliteStorageDriverOptions | undefined, ) { super(new SqliteStorageDriver(filename, params)) } diff --git a/packages/deno/src/sqlite/sqlite.test.ts b/packages/deno/src/sqlite/sqlite.test.ts index 499fd46d..fc5ec5fd 100644 --- a/packages/deno/src/sqlite/sqlite.test.ts +++ b/packages/deno/src/sqlite/sqlite.test.ts @@ -1,5 +1,4 @@ import { afterAll, beforeAll, describe } from 'vitest' - import { LogManager } from '@mtcute/core/utils.js' import { testAuthKeysRepository, diff --git a/packages/deno/src/utils/crypto.test.ts b/packages/deno/src/utils/crypto.test.ts index 4095b5e2..27a54e58 100644 --- a/packages/deno/src/utils/crypto.test.ts +++ b/packages/deno/src/utils/crypto.test.ts @@ -1,5 +1,4 @@ import { describe } from 'vitest' - import { testCryptoProvider } from '@mtcute/test' if (import.meta.env.TEST_ENV === 'deno') { diff --git a/packages/deno/src/utils/crypto.ts b/packages/deno/src/utils/crypto.ts index 9c08a6ed..77844bca 100644 --- a/packages/deno/src/utils/crypto.ts +++ b/packages/deno/src/utils/crypto.ts @@ -2,13 +2,14 @@ import { Buffer } from 'node:buffer' import { createCipheriv, createHash, createHmac, pbkdf2 } from 'node:crypto' import { deflateSync, gunzipSync } from 'node:zlib' -import { BaseCryptoProvider, IAesCtr, ICryptoProvider, IEncryptionScheme } from '@mtcute/core/utils.js' +import type { IAesCtr, ICryptoProvider, IEncryptionScheme } from '@mtcute/core/utils.js' +import { BaseCryptoProvider } from '@mtcute/core/utils.js' import { getWasmUrl, ige256Decrypt, ige256Encrypt, initSync } from '@mtcute/wasm' // node:crypto is properly implemented in deno, so we can just use it // largely just copy-pasting from @mtcute/node -const toUint8Array = (buf: Buffer | Uint8Array): Uint8Array => { +function toUint8Array(buf: Buffer | Uint8Array): Uint8Array { if (!Buffer.isBuffer(buf)) return buf return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength) @@ -16,8 +17,7 @@ const toUint8Array = (buf: Buffer | Uint8Array): Uint8Array => { export class DenoCryptoProvider extends BaseCryptoProvider implements ICryptoProvider { async initialize(): Promise { - // eslint-disable-next-line no-restricted-globals - const wasm = await fetch(getWasmUrl()).then((res) => res.arrayBuffer()) + const wasm = await fetch(getWasmUrl()).then(res => res.arrayBuffer()) initSync(wasm) } @@ -40,8 +40,7 @@ export class DenoCryptoProvider extends BaseCryptoProvider implements ICryptoPro ): Promise { return new Promise((resolve, reject) => pbkdf2(password, salt, iterations, keylen, algo, (err: Error | null, buf: Uint8Array) => - err !== null ? reject(err) : resolve(toUint8Array(buf)), - ), + err !== null ? reject(err) : resolve(toUint8Array(buf))), ) } @@ -77,7 +76,6 @@ export class DenoCryptoProvider extends BaseCryptoProvider implements ICryptoPro }), ) // hot path, avoid additional runtime checks - // eslint-disable-next-line @typescript-eslint/no-explicit-any } catch (e: any) { if (e.code === 'ERR_BUFFER_TOO_LARGE') { return null @@ -91,7 +89,7 @@ export class DenoCryptoProvider extends BaseCryptoProvider implements ICryptoPro return toUint8Array(gunzipSync(data)) } - randomFill(buf: Uint8Array) { + randomFill(buf: Uint8Array): void { crypto.getRandomValues(buf) } } diff --git a/packages/deno/src/utils/normalize-file.ts b/packages/deno/src/utils/normalize-file.ts index 7e5b10e8..c10dc7ce 100644 --- a/packages/deno/src/utils/normalize-file.ts +++ b/packages/deno/src/utils/normalize-file.ts @@ -3,10 +3,14 @@ import { stat } from 'node:fs/promises' import { basename } from 'node:path' import { Readable as NodeReadable } from 'node:stream' -import { UploadFileLike } from '@mtcute/core' +import type { UploadFileLike } from '@mtcute/core' import { extractFileName } from '@mtcute/core/utils.js' -export async function normalizeFile(file: UploadFileLike) { +export async function normalizeFile(file: UploadFileLike): Promise<{ + file: UploadFileLike + fileName?: string | undefined + fileSize?: number +} | null> { if (typeof file === 'string') { const fd = await Deno.open(file, { read: true }) @@ -31,7 +35,7 @@ export async function normalizeFile(file: UploadFileLike) { // while these are not Deno-specific, they still may happen if (file instanceof ReadStream) { const fileName = basename(file.path.toString()) - const fileSize = await stat(file.path.toString()).then((stat) => stat.size) + const fileSize = await stat(file.path.toString()).then(stat => stat.size) return { file: NodeReadable.toWeb(file) as unknown as ReadableStream, diff --git a/packages/deno/src/utils/tcp.ts b/packages/deno/src/utils/tcp.ts index f1a3faab..0695aed5 100644 --- a/packages/deno/src/utils/tcp.ts +++ b/packages/deno/src/utils/tcp.ts @@ -1,8 +1,8 @@ import EventEmitter from 'node:events' -import { IntermediatePacketCodec, IPacketCodec, ITelegramTransport, MtcuteError, TransportState } from '@mtcute/core' -import { BasicDcOption, ICryptoProvider, Logger } from '@mtcute/core/utils.js' - +import type { IPacketCodec, ITelegramTransport } from '@mtcute/core' +import { IntermediatePacketCodec, MtcuteError, TransportState } from '@mtcute/core' +import type { BasicDcOption, ICryptoProvider, Logger } from '@mtcute/core/utils.js' import { writeAll } from '@std/io/write-all' /** @@ -42,7 +42,7 @@ export abstract class BaseTcpTransport extends EventEmitter implements ITelegram return this._currentDc } - // eslint-disable-next-line @typescript-eslint/no-unused-vars + // eslint-disable-next-line unused-imports/no-unused-vars connect(dc: BasicDcOption, testMode: boolean): void { if (this._state !== TransportState.Idle) { throw new MtcuteError('Transport is not IDLE') @@ -50,8 +50,8 @@ export abstract class BaseTcpTransport extends EventEmitter implements ITelegram if (!this.packetCodecInitialized) { this._packetCodec.setup?.(this._crypto, this.log) - this._packetCodec.on('error', (err) => this.emit('error', err)) - this._packetCodec.on('packet', (buf) => this.emit('message', buf)) + this._packetCodec.on('error', err => this.emit('error', err)) + this._packetCodec.on('packet', buf => this.emit('message', buf)) this.packetCodecInitialized = true } @@ -134,5 +134,5 @@ export abstract class BaseTcpTransport extends EventEmitter implements ITelegram } export class TcpTransport extends BaseTcpTransport { - _packetCodec = new IntermediatePacketCodec() + _packetCodec: IntermediatePacketCodec = new IntermediatePacketCodec() } diff --git a/packages/deno/src/worker.ts b/packages/deno/src/worker.ts index facc7363..dfa2782d 100644 --- a/packages/deno/src/worker.ts +++ b/packages/deno/src/worker.ts @@ -1,16 +1,18 @@ import { setPlatform } from '@mtcute/core/platform.js' -import { +import type { ClientMessageHandler, RespondFn, SendFn, SomeWorker, - TelegramWorker as TelegramWorkerBase, TelegramWorkerOptions, - TelegramWorkerPort as TelegramWorkerPortBase, TelegramWorkerPortOptions, WorkerCustomMethods, WorkerMessageHandler, } from '@mtcute/core/worker.js' +import { + TelegramWorker as TelegramWorkerBase, + TelegramWorkerPort as TelegramWorkerPortBase, +} from '@mtcute/core/worker.js' import { DenoPlatform } from './platform.js' @@ -52,7 +54,7 @@ export class TelegramWorkerPort extends TelegramW const send: SendFn = worker.postMessage.bind(worker) const messageHandler = (ev: MessageEvent) => { - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + // eslint-disable-next-line ts/no-unsafe-argument handler(ev.data) } diff --git a/packages/deno/tsconfig.json b/packages/deno/tsconfig.json index 66079ea1..b73c9d7d 100644 --- a/packages/deno/tsconfig.json +++ b/packages/deno/tsconfig.json @@ -1,16 +1,16 @@ { - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "./dist", - "rootDir": "./src", - }, - "include": [ - "./src", - ], - "references": [ - { "path": "../core" }, - { "path": "../dispatcher" }, - { "path": "../html-parser" }, - { "path": "../markdown-parser" } - ] + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist" + }, + "references": [ + { "path": "../core" }, + { "path": "../dispatcher" }, + { "path": "../html-parser" }, + { "path": "../markdown-parser" } + ], + "include": [ + "./src" + ] } diff --git a/packages/dispatcher/README.md b/packages/dispatcher/README.md index 543399ea..ac82765a 100644 --- a/packages/dispatcher/README.md +++ b/packages/dispatcher/README.md @@ -1,6 +1,6 @@ # @mtcute/dispatcher -📖 [API Reference](https://ref.mtcute.dev/modules/_mtcute_dispatcher.html) +📖 [API Reference](https://ref.mtcute.dev/modules/_mtcute_dispatcher.html) 🧐 [Guide](https://mtcute.dev/guide/dispatcher/intro.html) Dispatcher and bot framework based on @mtcute/core. @@ -23,4 +23,4 @@ const dp = Dispatcher.for(tg) dp.onNewMessage(async (msg) => { await msg.replyText('Hello world!') }) -``` \ No newline at end of file +``` diff --git a/packages/dispatcher/package.json b/packages/dispatcher/package.json index 0a51e4c7..cfc0a900 100644 --- a/packages/dispatcher/package.json +++ b/packages/dispatcher/package.json @@ -1,22 +1,22 @@ { - "name": "@mtcute/dispatcher", - "private": true, - "version": "0.16.0", - "description": "Updates dispatcher and bot framework for @mtcute/client", - "author": "alina sireneva ", - "license": "MIT", - "type": "module", - "sideEffects": false, - "exports": "./src/index.ts", - "scripts": { - "build": "pnpm run -w build-package dispatcher", - "gen-updates": "node ./scripts/generate.cjs" - }, - "dependencies": { - "@mtcute/core": "workspace:^", - "events": "3.2.0" - }, - "devDependencies": { - "@mtcute/test": "workspace:^" - } + "name": "@mtcute/dispatcher", + "type": "module", + "version": "0.16.0", + "private": true, + "description": "Updates dispatcher and bot framework for @mtcute/client", + "author": "alina sireneva ", + "license": "MIT", + "sideEffects": false, + "exports": "./src/index.ts", + "scripts": { + "build": "pnpm run -w build-package dispatcher", + "gen-updates": "node ./scripts/generate.cjs" + }, + "dependencies": { + "@mtcute/core": "workspace:^", + "events": "3.2.0" + }, + "devDependencies": { + "@mtcute/test": "workspace:^" + } } diff --git a/packages/dispatcher/scripts/generate.cjs b/packages/dispatcher/scripts/generate.cjs index 197b4ecb..8b647938 100644 --- a/packages/dispatcher/scripts/generate.cjs +++ b/packages/dispatcher/scripts/generate.cjs @@ -1,4 +1,4 @@ -const { types, toSentence, replaceSections, formatFile } = require('../../core/scripts/generate-updates.cjs') +const { types, toSentence, replaceSections } = require('../../core/scripts/generate-updates.cjs') function generateHandler() { const lines = [] @@ -8,9 +8,9 @@ function generateHandler() { types.forEach((type) => { lines.push( - `export type ${type.handlerTypeName}Handler = ParsedUpdateHandler<` + - `'${type.typeName}', T${type.state ? ', S' : ''}>`, + `export type ${type.handlerTypeName}Handler = ParsedUpdateHandler<` + + `'${type.typeName}', T${type.state ? ', S' : ''}>`, ) names.push(`${type.handlerTypeName}Handler`) }) @@ -19,7 +19,7 @@ function generateHandler() { 'handler.ts', { codegen: - lines.join('\n') + '\n\nexport type UpdateHandler = \n' + names.map((i) => ` | ${i}\n`).join(''), + `${lines.join('\n')}\n\nexport type UpdateHandler = \n${names.map(i => ` | ${i}\n`).join('')}`, }, __dirname, ) @@ -44,8 +44,8 @@ function generateDispatcher() { }['callback'], group?: number): void ${ - type.state ? - ` + type.state + ? ` /** * Register ${toSentence(type)} with a filter * @@ -60,8 +60,8 @@ ${ }, Mod>, State extends never ? never : UpdateState>['callback'], group?: number ): void - ` : - '' + ` + : '' } /** @@ -89,14 +89,14 @@ ${ replaceSections( 'dispatcher.ts', { - codegen: lines.join('\n'), + 'codegen': lines.join('\n'), 'codegen-imports': - 'import {\n' + + `import {\n${ imports .sort() - .map((i) => ` ${i},\n`) - .join('') + - "} from './handler.js'", + .map(i => ` ${i},\n`) + .join('') + }} from './handler.js'`, }, __dirname, ) @@ -105,9 +105,6 @@ ${ async function main() { generateHandler() generateDispatcher() - - await formatFile('handler.ts', __dirname) - await formatFile('dispatcher.ts', __dirname) } module.exports = { types, toSentence } diff --git a/packages/dispatcher/src/callback-data-builder.test.ts b/packages/dispatcher/src/callback-data-builder.test.ts index 8e631bdd..9de9d7d2 100644 --- a/packages/dispatcher/src/callback-data-builder.test.ts +++ b/packages/dispatcher/src/callback-data-builder.test.ts @@ -1,11 +1,10 @@ import { describe, expect, it } from 'vitest' - import { CallbackQuery, MtArgumentError, PeersIndex } from '@mtcute/core' import { getPlatform } from '@mtcute/core/platform.js' import { createStub } from '@mtcute/test' import { CallbackDataBuilder } from './callback-data-builder.js' -import { UpdateFilter } from './filters/index.js' +import type { UpdateFilter } from './filters/index.js' describe('CallbackDataBuilder', () => { it('should correctly build data', () => { diff --git a/packages/dispatcher/src/callback-data-builder.ts b/packages/dispatcher/src/callback-data-builder.ts index a55eec57..ed970d54 100644 --- a/packages/dispatcher/src/callback-data-builder.ts +++ b/packages/dispatcher/src/callback-data-builder.ts @@ -1,13 +1,15 @@ -import { +import type { BusinessCallbackQuery, CallbackQuery, InlineCallbackQuery, MaybeArray, MaybePromise, +} from '@mtcute/core' +import { MtArgumentError, } from '@mtcute/core' -import { UpdateFilter } from './filters/types.js' +import type { UpdateFilter } from './filters/types.js' /** * Callback data builder, inspired by [aiogram](https://github.com/aiogram/aiogram). @@ -38,10 +40,10 @@ export class CallbackDataBuilder { * @param obj Object containing the data */ build(obj: Record): string { - const ret = - this.prefix + - this.sep + - this._fields + const ret + = this.prefix + + this.sep + + this._fields .map((f) => { const val = obj[f] @@ -115,16 +117,16 @@ export class CallbackDataBuilder { filter( params: | (( - upd: Update, - parsed: Record, - ) => MaybePromise>> | boolean>) + upd: Update, + parsed: Record, + ) => MaybePromise>> | boolean>) | Partial>> = {}, ): UpdateFilter< - Update, - { - match: Record - } - > { + Update, + { + match: Record + } + > { if (typeof params === 'function') { return async (query) => { if (!query.dataStr) return false @@ -155,7 +157,9 @@ export class CallbackDataBuilder { for (const matcher of matchers) { if (typeof matcher === 'string') { if (value !== matcher) return false - } else if (!matcher.test(value)) return false + } else if (!matcher.test(value)) { + return false + } } } @@ -181,7 +185,7 @@ export class CallbackDataBuilder { const value = params[field] if (Array.isArray(value)) { - parts.push(`(${value.map((i) => (typeof i === 'string' ? i : i.source)).join('|')})`) + parts.push(`(${value.map(i => (typeof i === 'string' ? i : i.source)).join('|')})`) } else { // noinspection SuspiciousTypeOfGuard parts.push(typeof value === 'string' ? value : (value as RegExp).source) @@ -192,8 +196,9 @@ export class CallbackDataBuilder { return (query) => { const m = query.dataStr?.match(regex) - if (!m) return false - ;( + if (!m) { + return false + }( query as Update & { match: Record } diff --git a/packages/dispatcher/src/context/base.ts b/packages/dispatcher/src/context/base.ts index 65173b09..f2b0f7f5 100644 --- a/packages/dispatcher/src/context/base.ts +++ b/packages/dispatcher/src/context/base.ts @@ -1,5 +1,5 @@ -import { ParsedUpdate } from '@mtcute/core' -import { TelegramClient } from '@mtcute/core/client.js' +import type { ParsedUpdate } from '@mtcute/core' +import type { TelegramClient } from '@mtcute/core/client.js' export type UpdateContext = T & { client: TelegramClient diff --git a/packages/dispatcher/src/context/business-message.ts b/packages/dispatcher/src/context/business-message.ts index 92ff060d..68428f7c 100644 --- a/packages/dispatcher/src/context/business-message.ts +++ b/packages/dispatcher/src/context/business-message.ts @@ -1,13 +1,14 @@ -import { BusinessMessage, OmitInputMessageId, ParametersSkip1 } from '@mtcute/core' -import { TelegramClient } from '@mtcute/core/client.js' -import { +import type { Message, OmitInputMessageId, ParametersSkip1, Sticker } from '@mtcute/core' +import { BusinessMessage } from '@mtcute/core' +import type { TelegramClient } from '@mtcute/core/client.js' +import type { DeleteMessagesParams, ForwardMessageOptions, SendCopyGroupParams, SendCopyParams, } from '@mtcute/core/methods.js' -import { UpdateContext } from './base.js' +import type { UpdateContext } from './base.js' /** * Context of a business message related update. @@ -39,17 +40,17 @@ export class BusinessMessageContext extends BusinessMessage implements UpdateCon const msg = Array.isArray(message) ? message[message.length - 1] : message super(msg.update, msg._peers) - this.messages = Array.isArray(message) ? message.map((it) => new BusinessMessageContext(client, it)) : [this] + this.messages = Array.isArray(message) ? message.map(it => new BusinessMessageContext(client, it)) : [this] this.isMessageGroup = Array.isArray(message) } /** Get all custom emojis contained in this message (message group), if any */ - getCustomEmojis() { + getCustomEmojis(): Promise { return this.client.getCustomEmojisFromMessages(this.messages) } /** Send a text message to the same chat (and topic, if applicable) as a given message */ - answerText(...params: ParametersSkip1) { + answerText(...params: ParametersSkip1): Promise { const [send, params_ = {}] = params params_.businessConnectionId = this.update.connectionId @@ -57,7 +58,7 @@ export class BusinessMessageContext extends BusinessMessage implements UpdateCon } /** Send a media to the same chat (and topic, if applicable) as a given message */ - answerMedia(...params: ParametersSkip1) { + answerMedia(...params: ParametersSkip1): Promise { const [send, params_ = {}] = params params_.businessConnectionId = this.update.connectionId @@ -65,7 +66,7 @@ export class BusinessMessageContext extends BusinessMessage implements UpdateCon } /** Send a media group to the same chat (and topic, if applicable) as a given message */ - answerMediaGroup(...params: ParametersSkip1) { + answerMediaGroup(...params: ParametersSkip1): Promise { const [send, params_ = {}] = params params_.businessConnectionId = this.update.connectionId @@ -73,7 +74,7 @@ export class BusinessMessageContext extends BusinessMessage implements UpdateCon } /** Send a text message in reply to this message */ - replyText(...params: ParametersSkip1) { + replyText(...params: ParametersSkip1): Promise { const [send, params_ = {}] = params params_.businessConnectionId = this.update.connectionId @@ -81,7 +82,7 @@ export class BusinessMessageContext extends BusinessMessage implements UpdateCon } /** Send a media in reply to this message */ - replyMedia(...params: ParametersSkip1) { + replyMedia(...params: ParametersSkip1): Promise { const [send, params_ = {}] = params params_.businessConnectionId = this.update.connectionId @@ -89,7 +90,7 @@ export class BusinessMessageContext extends BusinessMessage implements UpdateCon } /** Send a media group in reply to this message */ - replyMediaGroup(...params: ParametersSkip1) { + replyMediaGroup(...params: ParametersSkip1): Promise { const [send, params_ = {}] = params params_.businessConnectionId = this.update.connectionId @@ -97,37 +98,37 @@ export class BusinessMessageContext extends BusinessMessage implements UpdateCon } /** Send a text message in reply to this message */ - quoteWithText(params: Parameters[1]) { + quoteWithText(params: Parameters[1]): Promise { params.businessConnectionId = this.update.connectionId return this.client.quoteWithText(this, params) } /** Send a media in reply to this message */ - quoteWithMedia(params: Parameters[1]) { + quoteWithMedia(params: Parameters[1]): Promise { params.businessConnectionId = this.update.connectionId return this.client.quoteWithMedia(this, params) } /** Send a media group in reply to this message */ - quoteWithMediaGroup(params: Parameters[1]) { + quoteWithMediaGroup(params: Parameters[1]): Promise { params.businessConnectionId = this.update.connectionId return this.client.quoteWithMediaGroup(this, params) } /** Delete this message (message group) */ - delete(params?: DeleteMessagesParams) { + delete(params?: DeleteMessagesParams): Promise { return this.client.deleteMessagesById( this.chat.inputPeer, - this.messages.map((it) => it.id), + this.messages.map(it => it.id), params, ) } /** Pin this message */ - pin(params?: OmitInputMessageId[0]>) { + pin(params?: OmitInputMessageId[0]>): Promise { return this.client.pinMessage({ chatId: this.chat.inputPeer, message: this.id, @@ -136,7 +137,7 @@ export class BusinessMessageContext extends BusinessMessage implements UpdateCon } /** Unpin this message */ - unpin() { + unpin(): Promise { return this.client.unpinMessage({ chatId: this.chat.inputPeer, message: this.id, @@ -144,7 +145,7 @@ export class BusinessMessageContext extends BusinessMessage implements UpdateCon } /** Edit this message */ - edit(params: OmitInputMessageId[0]>) { + edit(params: OmitInputMessageId[0]>): Promise { return this.client.editMessage({ chatId: this.chat.inputPeer, message: this.id, @@ -153,16 +154,16 @@ export class BusinessMessageContext extends BusinessMessage implements UpdateCon } /** Forward this message (message group) */ - forwardTo(params: ForwardMessageOptions) { + forwardTo(params: ForwardMessageOptions): Promise { return this.client.forwardMessagesById({ fromChatId: this.chat.inputPeer, - messages: this.messages.map((it) => it.id), + messages: this.messages.map(it => it.id), ...params, }) } /** Send a copy of this message (message group) */ - copy(params: SendCopyParams & SendCopyGroupParams) { + copy(params: SendCopyParams & SendCopyGroupParams): Promise { if (this.isMessageGroup) { return this.client.sendCopyGroup({ messages: this.messages, @@ -177,7 +178,7 @@ export class BusinessMessageContext extends BusinessMessage implements UpdateCon } /** React to this message */ - react(params: OmitInputMessageId[0]>) { + react(params: OmitInputMessageId[0]>): Promise { return this.client.sendReaction({ chatId: this.chat.inputPeer, message: this.id, diff --git a/packages/dispatcher/src/context/callback-query.ts b/packages/dispatcher/src/context/callback-query.ts index 385befa1..b92edd0e 100644 --- a/packages/dispatcher/src/context/callback-query.ts +++ b/packages/dispatcher/src/context/callback-query.ts @@ -1,7 +1,8 @@ -import { BusinessCallbackQuery, CallbackQuery, InlineCallbackQuery, MaybePromise, Message } from '@mtcute/core' -import { TelegramClient } from '@mtcute/core/client.js' +import type { MaybePromise, Message } from '@mtcute/core' +import { BusinessCallbackQuery, CallbackQuery, InlineCallbackQuery } from '@mtcute/core' +import type { TelegramClient } from '@mtcute/core/client.js' -import { UpdateContext } from './base.js' +import type { UpdateContext } from './base.js' /** * Context of a callback query update. @@ -19,7 +20,7 @@ export class CallbackQueryContext extends CallbackQuery implements UpdateContext } /** Answer to this callback query */ - answer(params: Parameters[1]) { + answer(params: Parameters[1]): Promise { return this.client.answerCallbackQuery(this.id, params) } @@ -36,7 +37,7 @@ export class CallbackQueryContext extends CallbackQuery implements UpdateContext /** * Edit the message that contained the callback button that was clicked. */ - async editMessage(params: Omit[0], 'messageId'>) { + async editMessage(params: Omit[0], 'messageId'>): Promise { return this.client.editMessage({ chatId: this.raw.peer, message: this.raw.msgId, @@ -47,7 +48,9 @@ export class CallbackQueryContext extends CallbackQuery implements UpdateContext /** * Shortcut for getting the message and editing it. */ - async editMessageWith(handler: (msg: Message) => MaybePromise[0]>) { + async editMessageWith( + handler: (msg: Message) => MaybePromise[0]>, + ): Promise { const msg = await this.getMessage() if (!msg) return @@ -74,14 +77,14 @@ export class InlineCallbackQueryContext extends InlineCallbackQuery implements U } /** Answer to this callback query */ - answer(params: Parameters[1]) { + answer(params: Parameters[1]): Promise { return this.client.answerCallbackQuery(this.id, params) } /** * Edit the message that contained the callback button that was clicked. */ - async editMessage(params: Omit[0], 'messageId'>) { + async editMessage(params: Omit[0], 'messageId'>): Promise { return this.client.editInlineMessage({ messageId: this.raw.msgId, ...params, @@ -107,14 +110,14 @@ export class BusinessCallbackQueryContext } /** Answer to this callback query */ - answer(params: Parameters[1]) { + answer(params: Parameters[1]): Promise { return this.client.answerCallbackQuery(this.id, params) } /** * Edit the message that contained the callback button that was clicked. */ - async editMessage(params: Omit[0], 'messageId'>) { + async editMessage(params: Omit[0], 'messageId'>): Promise { return this.client.editMessage({ message: this.message, businessConnectionId: this.connectionId, diff --git a/packages/dispatcher/src/context/chat-join-request.ts b/packages/dispatcher/src/context/chat-join-request.ts index b635d5a8..4f2d73e5 100644 --- a/packages/dispatcher/src/context/chat-join-request.ts +++ b/packages/dispatcher/src/context/chat-join-request.ts @@ -1,7 +1,7 @@ import { BotChatJoinRequestUpdate } from '@mtcute/core' -import { TelegramClient } from '@mtcute/core/client.js' +import type { TelegramClient } from '@mtcute/core/client.js' -import { UpdateContext } from './base.js' +import type { UpdateContext } from './base.js' /** * Context of a chat join request update (for bots). diff --git a/packages/dispatcher/src/context/chosen-inline-result.ts b/packages/dispatcher/src/context/chosen-inline-result.ts index 20707243..9df5d2be 100644 --- a/packages/dispatcher/src/context/chosen-inline-result.ts +++ b/packages/dispatcher/src/context/chosen-inline-result.ts @@ -1,7 +1,7 @@ import { ChosenInlineResult, MtArgumentError } from '@mtcute/core' -import { TelegramClient } from '@mtcute/core/client.js' +import type { TelegramClient } from '@mtcute/core/client.js' -import { UpdateContext } from './base.js' +import type { UpdateContext } from './base.js' /** * Context of a chosen inline result update. diff --git a/packages/dispatcher/src/context/inline-query.ts b/packages/dispatcher/src/context/inline-query.ts index 1060e0a5..6d24134a 100644 --- a/packages/dispatcher/src/context/inline-query.ts +++ b/packages/dispatcher/src/context/inline-query.ts @@ -1,7 +1,8 @@ -import { InlineQuery, ParametersSkip1 } from '@mtcute/core' -import { TelegramClient } from '@mtcute/core/client.js' +import type { ParametersSkip1 } from '@mtcute/core' +import { InlineQuery } from '@mtcute/core' +import type { TelegramClient } from '@mtcute/core/client.js' -import { UpdateContext } from './base.js' +import type { UpdateContext } from './base.js' /** * Context of an inline query update. @@ -19,7 +20,7 @@ export class InlineQueryContext extends InlineQuery implements UpdateContext) { + answer(...params: ParametersSkip1): Promise { return this.client.answerInlineQuery(this.id, ...params) } } diff --git a/packages/dispatcher/src/context/message.ts b/packages/dispatcher/src/context/message.ts index 72f20857..f8c06d33 100644 --- a/packages/dispatcher/src/context/message.ts +++ b/packages/dispatcher/src/context/message.ts @@ -1,8 +1,14 @@ -import { Message, MtPeerNotFoundError, OmitInputMessageId, ParametersSkip1, Peer } from '@mtcute/core' -import { TelegramClient } from '@mtcute/core/client.js' -import { DeleteMessagesParams, ForwardMessageOptions, SendCopyGroupParams, SendCopyParams } from '@mtcute/core/methods.js' +import type { OmitInputMessageId, ParametersSkip1, Peer, Sticker } from '@mtcute/core' +import { Message, MtPeerNotFoundError } from '@mtcute/core' +import type { TelegramClient } from '@mtcute/core/client.js' +import type { + DeleteMessagesParams, + ForwardMessageOptions, + SendCopyGroupParams, + SendCopyParams, +} from '@mtcute/core/methods.js' -import { UpdateContext } from './base.js' +import type { UpdateContext } from './base.js' /** * Context of a message-related update. @@ -34,7 +40,7 @@ export class MessageContext extends Message implements UpdateContext { const msg = Array.isArray(message) ? message[message.length - 1] : message super(msg.raw, msg._peers, msg.isScheduled) - this.messages = Array.isArray(message) ? message.map((it) => new MessageContext(client, it)) : [this] + this.messages = Array.isArray(message) ? message.map(it => new MessageContext(client, it)) : [this] this.isMessageGroup = Array.isArray(message) } @@ -62,91 +68,91 @@ export class MessageContext extends Message implements UpdateContext { } /** Get a message that this message is a reply to */ - getReplyTo() { + getReplyTo(): Promise { return this.client.getReplyTo(this) } /** If this is a channel post, get its automatic forward in the discussion group */ - getDiscussionMessage() { + getDiscussionMessage(): Promise { return this.client.getDiscussionMessage({ chatId: this.chat.inputPeer, message: this.id }) } /** Get all custom emojis contained in this message (message group), if any */ - getCustomEmojis() { + getCustomEmojis(): Promise { return this.client.getCustomEmojisFromMessages(this.messages) } /** Send a text message to the same chat (and topic, if applicable) as a given message */ - answerText(...params: ParametersSkip1) { + answerText(...params: ParametersSkip1): Promise { return this.client.answerText(this, ...params) } /** Send a media to the same chat (and topic, if applicable) as a given message */ - answerMedia(...params: ParametersSkip1) { + answerMedia(...params: ParametersSkip1): Promise { return this.client.answerMedia(this, ...params) } /** Send a media group to the same chat (and topic, if applicable) as a given message */ - answerMediaGroup(...params: ParametersSkip1) { + answerMediaGroup(...params: ParametersSkip1): Promise { return this.client.answerMediaGroup(this, ...params) } /** Send a text message in reply to this message */ - replyText(...params: ParametersSkip1) { + replyText(...params: ParametersSkip1): Promise { return this.client.replyText(this, ...params) } /** Send a media in reply to this message */ - replyMedia(...params: ParametersSkip1) { + replyMedia(...params: ParametersSkip1): Promise { return this.client.replyMedia(this, ...params) } /** Send a media group in reply to this message */ - replyMediaGroup(...params: ParametersSkip1) { + replyMediaGroup(...params: ParametersSkip1): Promise { return this.client.replyMediaGroup(this, ...params) } /** Send a text message in reply to this message */ - quoteWithText(params: Parameters[1]) { + quoteWithText(params: Parameters[1]): Promise { return this.client.quoteWithText(this, params) } /** Send a media in reply to this message */ - quoteWithMedia(params: Parameters[1]) { + quoteWithMedia(params: Parameters[1]): Promise { return this.client.quoteWithMedia(this, params) } /** Send a media group in reply to this message */ - quoteWithMediaGroup(params: Parameters[1]) { + quoteWithMediaGroup(params: Parameters[1]): Promise { return this.client.quoteWithMediaGroup(this, params) } /** Send a text as a comment to this message */ - commentText(...params: ParametersSkip1) { + commentText(...params: ParametersSkip1): Promise { return this.client.commentText(this, ...params) } /** Send a media as a comment to this message */ - commentMedia(...params: ParametersSkip1) { + commentMedia(...params: ParametersSkip1): Promise { return this.client.commentMedia(this, ...params) } /** Send a media group as a comment to this message */ - commentMediaGroup(...params: ParametersSkip1) { + commentMediaGroup(...params: ParametersSkip1): Promise { return this.client.commentMediaGroup(this, ...params) } /** Delete this message (message group) */ - delete(params?: DeleteMessagesParams) { + delete(params?: DeleteMessagesParams): Promise { return this.client.deleteMessagesById( this.chat.inputPeer, - this.messages.map((it) => it.id), + this.messages.map(it => it.id), params, ) } /** Pin this message */ - pin(params?: OmitInputMessageId[0]>) { + pin(params?: OmitInputMessageId[0]>): Promise { return this.client.pinMessage({ chatId: this.chat.inputPeer, message: this.id, @@ -155,7 +161,7 @@ export class MessageContext extends Message implements UpdateContext { } /** Unpin this message */ - unpin() { + unpin(): Promise { return this.client.unpinMessage({ chatId: this.chat.inputPeer, message: this.id, @@ -163,7 +169,7 @@ export class MessageContext extends Message implements UpdateContext { } /** Edit this message */ - edit(params: OmitInputMessageId[0]>) { + edit(params: OmitInputMessageId[0]>): Promise { return this.client.editMessage({ chatId: this.chat.inputPeer, message: this.id, @@ -172,16 +178,16 @@ export class MessageContext extends Message implements UpdateContext { } /** Forward this message (message group) */ - forwardTo(params: ForwardMessageOptions) { + forwardTo(params: ForwardMessageOptions): Promise { return this.client.forwardMessagesById({ fromChatId: this.chat.inputPeer, - messages: this.messages.map((it) => it.id), + messages: this.messages.map(it => it.id), ...params, }) } /** Send a copy of this message (message group) */ - copy(params: SendCopyParams & SendCopyGroupParams) { + copy(params: SendCopyParams & SendCopyGroupParams): Promise | Promise { if (this.isMessageGroup) { return this.client.sendCopyGroup({ messages: this.messages, @@ -196,7 +202,9 @@ export class MessageContext extends Message implements UpdateContext { } /** React to this message */ - react(params: OmitInputMessageId[0]>) { + react( + params: OmitInputMessageId[0]>, + ): Promise { return this.client.sendReaction({ chatId: this.chat.inputPeer, message: this.id, diff --git a/packages/dispatcher/src/context/parse.ts b/packages/dispatcher/src/context/parse.ts index acf8ef40..769d2cf4 100644 --- a/packages/dispatcher/src/context/parse.ts +++ b/packages/dispatcher/src/context/parse.ts @@ -1,7 +1,24 @@ -import { ParsedUpdate } from '@mtcute/core' -import { TelegramClient } from '@mtcute/core/client.js' +import type { + BotReactionCountUpdate, + BotReactionUpdate, + BotStoppedUpdate, + BusinessConnection, + ChatJoinRequestUpdate, + ChatMemberUpdate, + DeleteBusinessMessageUpdate, + DeleteMessageUpdate, + DeleteStoryUpdate, + HistoryReadUpdate, + ParsedUpdate, + PollUpdate, + PollVoteUpdate, + StoryUpdate, + UserStatusUpdate, + UserTypingUpdate, +} from '@mtcute/core' +import type { TelegramClient } from '@mtcute/core/client.js' -import { UpdateContextDistributed } from './base.js' +import type { UpdateContextDistributed } from './base.js' import { BusinessMessageContext } from './business-message.js' import { BusinessCallbackQueryContext, CallbackQueryContext, InlineCallbackQueryContext } from './callback-query.js' import { ChatJoinRequestUpdateContext } from './chat-join-request.js' @@ -10,8 +27,36 @@ import { InlineQueryContext } from './inline-query.js' import { MessageContext } from './message.js' import { PreCheckoutQueryContext } from './pre-checkout-query.js' +export type UpdateContextType = + | MessageContext + | InlineQueryContext + | ChosenInlineResultContext + | CallbackQueryContext + | InlineCallbackQueryContext + | BusinessCallbackQueryContext + | ChatJoinRequestUpdateContext + | PreCheckoutQueryContext + | BusinessMessageContext + | UpdateContextDistributed< + | DeleteMessageUpdate + | ChatMemberUpdate + | PollUpdate + | PollVoteUpdate + | UserStatusUpdate + | UserTypingUpdate + | HistoryReadUpdate + | BotStoppedUpdate + | ChatJoinRequestUpdate + | StoryUpdate + | DeleteStoryUpdate + | BotReactionUpdate + | BotReactionCountUpdate + | BusinessConnection + | DeleteBusinessMessageUpdate + > + /** @internal */ -export function _parsedUpdateToContext(client: TelegramClient, update: ParsedUpdate) { +export function _parsedUpdateToContext(client: TelegramClient, update: ParsedUpdate): UpdateContextType { switch (update.name) { case 'new_message': case 'edit_message': @@ -43,5 +88,3 @@ export function _parsedUpdateToContext(client: TelegramClient, update: ParsedUpd return _update } - -export type UpdateContextType = ReturnType diff --git a/packages/dispatcher/src/context/pre-checkout-query.ts b/packages/dispatcher/src/context/pre-checkout-query.ts index 9a824810..e0fbe14c 100644 --- a/packages/dispatcher/src/context/pre-checkout-query.ts +++ b/packages/dispatcher/src/context/pre-checkout-query.ts @@ -1,7 +1,7 @@ import { PreCheckoutQuery } from '@mtcute/core' -import { TelegramClient } from '@mtcute/core/client.js' +import type { TelegramClient } from '@mtcute/core/client.js' -import { UpdateContext } from './base.js' +import type { UpdateContext } from './base.js' /** * Context of a pre-checkout query update diff --git a/packages/dispatcher/src/context/scene-transition.ts b/packages/dispatcher/src/context/scene-transition.ts index bc9249af..0695eb44 100644 --- a/packages/dispatcher/src/context/scene-transition.ts +++ b/packages/dispatcher/src/context/scene-transition.ts @@ -4,7 +4,7 @@ import { makeInspectable } from '@mtcute/core/utils.js' import { BusinessMessageContext } from './business-message.js' import { CallbackQueryContext, InlineCallbackQueryContext } from './callback-query.js' import { MessageContext } from './message.js' -import { UpdateContextType } from './parse.js' +import type { UpdateContextType } from './parse.js' /** Update which is dispatched whenever scene is entered or exited */ export class SceneTransitionContext { diff --git a/packages/dispatcher/src/dispatcher.ts b/packages/dispatcher/src/dispatcher.ts index ee97e938..5bc51720 100644 --- a/packages/dispatcher/src/dispatcher.ts +++ b/packages/dispatcher/src/dispatcher.ts @@ -1,9 +1,9 @@ -/* eslint-disable @typescript-eslint/unified-signatures,@typescript-eslint/no-unsafe-assignment */ -/* eslint-disable @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-call,max-depth,dot-notation */ -/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types */ +/* eslint-disable ts/no-unsafe-assignment */ +/* eslint-disable ts/no-unsafe-argument */ +/* eslint-disable ts/no-empty-object-type */ // ^^ will be looked into in MTQ-29 -import { +import type { BotReactionCountUpdate, BotReactionUpdate, BotStoppedUpdate, @@ -15,21 +15,23 @@ import { DeleteStoryUpdate, HistoryReadUpdate, MaybePromise, - MtArgumentError, ParsedUpdate, PeersIndex, PollUpdate, PollVoteUpdate, StoryUpdate, - tl, UserStatusUpdate, UserTypingUpdate, + tl, } from '@mtcute/core' -import { TelegramClient } from '@mtcute/core/client.js' - -import { UpdateContext } from './context/base.js' -import { BusinessMessageContext } from './context/business-message.js' import { + MtArgumentError, +} from '@mtcute/core' +import type { TelegramClient } from '@mtcute/core/client.js' + +import type { UpdateContext } from './context/base.js' +import type { BusinessMessageContext } from './context/business-message.js' +import type { BusinessCallbackQueryContext, CallbackQueryContext, ChatJoinRequestUpdateContext, @@ -39,11 +41,12 @@ import { MessageContext, PreCheckoutQueryContext, } from './context/index.js' -import { _parsedUpdateToContext, UpdateContextType } from './context/parse.js' +import type { UpdateContextType } from './context/parse.js' +import { _parsedUpdateToContext } from './context/parse.js' import { SceneTransitionContext } from './context/scene-transition.js' -import { filters, UpdateFilter } from './filters/index.js' +import type { UpdateFilter, filters } from './filters/index.js' // begin-codegen-imports -import { +import type { BotChatJoinRequestHandler, BotReactionCountUpdateHandler, BotReactionUpdateHandler, @@ -76,8 +79,9 @@ import { UserTypingHandler, } from './handler.js' // end-codegen-imports -import { PropagationAction } from './propagation.js' -import { defaultStateKeyDelegate, IStateStorageProvider, StateKeyDelegate, UpdateState } from './state/index.js' +import type { PropagationAction } from './propagation.js' +import type { IStateStorageProvider, StateKeyDelegate } from './state/index.js' +import { UpdateState, defaultStateKeyDelegate } from './state/index.js' import { StateService } from './state/service.js' export interface DispatcherParams { @@ -323,7 +327,7 @@ export class Dispatcher { // order does not matter in the dispatcher, // so we can handle each update in its own task - this.dispatchRawUpdateNow(update, peers).catch((err) => this._client!.emitError(err)) + this.dispatchRawUpdateNow(update, peers).catch(err => this._client!.emitError(err)) } /** @@ -355,7 +359,9 @@ export class Dispatcher { if (!h.check || (await h.check(this._client, update, peers))) { result = await h.callback(this._client, update, peers) handled = true - } else continue + } else { + continue + } switch (result) { case 'continue': @@ -393,7 +399,7 @@ export class Dispatcher { // order does not matter in the dispatcher, // so we can handle each update in its own task - this.dispatchUpdateNow(update).catch((err) => this._client!.emitError(err)) + this.dispatchUpdateNow(update).catch(err => this._client!.emitError(err)) } /** @@ -423,15 +429,15 @@ export class Dispatcher { if (parsedScene === undefined) { if ( - this._storage && - this._scenes && - (update.name === 'new_message' || - update.name === 'edit_message' || - update.name === 'callback_query' || - update.name === 'message_group' || - update.name === 'new_business_message' || - update.name === 'edit_business_message' || - update.name === 'business_message_group') + this._storage + && this._scenes + && (update.name === 'new_message' + || update.name === 'edit_message' + || update.name === 'callback_query' + || update.name === 'message_group' + || update.name === 'new_business_message' + || update.name === 'edit_business_message' + || update.name === 'business_message_group') ) { // no need to fetch scene if there are no registered scenes @@ -466,14 +472,14 @@ export class Dispatcher { if (parsedState === undefined) { if ( - this._storage && - (update.name === 'new_message' || - update.name === 'edit_message' || - update.name === 'callback_query' || - update.name === 'message_group' || - update.name === 'new_business_message' || - update.name === 'edit_business_message' || - update.name === 'business_message_group') + this._storage + && (update.name === 'new_message' + || update.name === 'edit_message' + || update.name === 'callback_query' + || update.name === 'message_group' + || update.name === 'new_business_message' + || update.name === 'edit_business_message' + || update.name === 'business_message_group') ) { if (!parsedContext) parsedContext = _parsedUpdateToContext(this._client, update) const key = await this._stateKeyDelegate!(parsedContext as any) @@ -482,8 +488,8 @@ export class Dispatcher { let customKey if ( - !this._customStateKeyDelegate || - (customKey = await this._customStateKeyDelegate(parsedContext as any)) + !this._customStateKeyDelegate + || (customKey = await this._customStateKeyDelegate(parsedContext as any)) ) { parsedState = new UpdateState( this._storage, @@ -530,7 +536,9 @@ export class Dispatcher { if (!h.check || (await h.check(parsedContext as any, parsedState as never))) { result = await h.callback(parsedContext as any, parsedState as never) handled = true - } else continue + } else { + continue + } if (parsedState && this._scenes) { // check if scene transition was made @@ -559,6 +567,7 @@ export class Dispatcher { const scene = parsedState.scene const dp = scene ? nextDp._scenes!.get(scene)! : nextDp._parent! + // eslint-disable-next-line ts/return-await return dp._dispatchUpdateNowImpl(update, undefined, scene, true) } } @@ -583,6 +592,7 @@ export class Dispatcher { const scene = parsedState.scene const dp = scene ? this._scenes!.get(scene)! : this._parent! + // eslint-disable-next-line ts/return-await return dp._dispatchUpdateNowImpl(update, undefined, scene, true) } } @@ -765,10 +775,10 @@ export class Dispatcher { private _prepareChild(child: Dispatcher): void { if (child._client) { throw new MtArgumentError( - 'Provided dispatcher is ' + - (child._parent ? - 'already a child. Use parent.removeChild() before calling addChild()' : - 'already bound to a client. Use unbind() before calling addChild()'), + `Provided dispatcher is ${ + child._parent + ? 'already a child. Use parent.removeChild() before calling addChild()' + : 'already bound to a client. Use unbind() before calling addChild()'}`, ) } @@ -1070,7 +1080,7 @@ export class Dispatcher { if (typeof handler === 'number' || typeof handler === 'undefined') { this.addUpdateHandler( { - name: name, + name, callback: filter, } as UpdateHandler, handler, diff --git a/packages/dispatcher/src/filters/bots.test.ts b/packages/dispatcher/src/filters/bots.test.ts index 6982af5a..2f9bc722 100644 --- a/packages/dispatcher/src/filters/bots.test.ts +++ b/packages/dispatcher/src/filters/bots.test.ts @@ -1,19 +1,21 @@ import { describe, expect, it } from 'vitest' - -import { Message, PeersIndex, tl } from '@mtcute/core' -import { createStub, StubTelegramClient } from '@mtcute/test' +import type { tl } from '@mtcute/core' +import { Message, PeersIndex } from '@mtcute/core' +import { StubTelegramClient, createStub } from '@mtcute/test' import { MessageContext } from '../index.js' + import { command, deeplink } from './bots.js' const peers = new PeersIndex() peers.users.set(1, createStub('user', { id: 1 })) peers.chats.set(1, createStub('channel', { id: 1 })) -const createMessageContext = (partial: Partial) => - new MessageContext( +function createMessageContext(partial: Partial) { + return new MessageContext( StubTelegramClient.full(), // eslint-disable-line new Message(createStub('message', partial), peers, false), ) +} describe('filters.command', () => { const getParsedCommand = (text: string, ...params: Parameters) => { @@ -89,7 +91,7 @@ describe('filters.deeplink', () => { expect(deeplink('bar')(ctx)).toEqual(false) expect(deeplink('foo')(ctx)).toEqual(true) - // eslint-disable-next-line + expect((ctx as any).command).toEqual(['start', 'foo']) }) @@ -100,7 +102,7 @@ describe('filters.deeplink', () => { }) expect(deeplink(/^foo_(\d+)$/)(ctx)).toEqual(true) - // eslint-disable-next-line + expect((ctx as any).command).toEqual(['start', 'foo_123', '123']) }) @@ -111,7 +113,7 @@ describe('filters.deeplink', () => { }) expect(deeplink(['foo', 'bar'])(ctx)).toEqual(true) - // eslint-disable-next-line + expect((ctx as any).command).toEqual(['start', 'foo']) }) @@ -122,7 +124,7 @@ describe('filters.deeplink', () => { }) expect(deeplink([/foo/, /bar/])(ctx)).toEqual(true) - // eslint-disable-next-line + expect((ctx as any).command).toEqual(['start', 'foo']) }) diff --git a/packages/dispatcher/src/filters/bots.ts b/packages/dispatcher/src/filters/bots.ts index fd61ea50..95bfe291 100644 --- a/packages/dispatcher/src/filters/bots.ts +++ b/packages/dispatcher/src/filters/bots.ts @@ -1,10 +1,11 @@ -import { MaybeArray, MaybePromise, Message } from '@mtcute/core' +import type { Chat, MaybeArray, MaybePromise, Message } from '@mtcute/core' + +import type { BusinessMessageContext } from '../context/business-message.js' +import type { MessageContext } from '../context/message.js' -import { BusinessMessageContext } from '../context/business-message.js' -import { MessageContext } from '../context/message.js' import { chat } from './chat.js' import { and, or } from './logic.js' -import { UpdateFilter } from './types.js' +import type { Modify, UpdateFilter } from './types.js' /** * Filter messages that call the given command(s).. @@ -22,20 +23,17 @@ import { UpdateFilter } from './types.js' * Can be `null` to disable prefixes altogether * @param caseSensitive */ -export const command = ( - commands: MaybeArray, - { - prefixes = '/', - caseSensitive = false, - }: { - prefixes?: MaybeArray | null - caseSensitive?: boolean - } = {}, -): UpdateFilter => { +export function command(commands: MaybeArray, { + prefixes = '/', + caseSensitive = false, +}: { + prefixes?: MaybeArray | null + caseSensitive?: boolean +} = {}): UpdateFilter { if (!Array.isArray(commands)) commands = [commands] if (!caseSensitive) { - commands = commands.map((i) => (typeof i === 'string' ? i.toLowerCase() : i)) + commands = commands.map(i => (typeof i === 'string' ? i.toLowerCase() : i)) } const argumentsRe = /(["'])(.*?)(? + command: string[] + } +> = and(chat('private'), command('start')) /** * Shorthand filter that matches /start commands * sent in groups (i.e. using `?startgroup` parameter). */ -export const startGroup = and(or(chat('supergroup'), chat('group')), command('start')) +export const startGroup: UpdateFilter< + MessageContext | BusinessMessageContext, + { + chat: Modify + command: string[] + }, + never +> = and(or(chat('supergroup'), chat('group')), command('start')) -const deeplinkBase = - (base: UpdateFilter) => - ( - params: MaybeArray, - ): UpdateFilter => { - if (!Array.isArray(params)) { - return and(start, (_msg: Message) => { - const msg = _msg as Message & { command: string[] } - - if (msg.command.length !== 2) return false - - const p = msg.command[1] - if (typeof params === 'string' && p === params) return true - - const m = p.match(params) - if (!m) return false - - msg.command.push(...m.slice(1)) - - return true - }) - } - - return and(base, (_msg: Message) => { +function deeplinkBase(base: UpdateFilter) { + return ( + params: MaybeArray, + ): UpdateFilter => { + if (!Array.isArray(params)) { + return and(start, (_msg: Message) => { const msg = _msg as Message & { command: string[] } if (msg.command.length !== 2) return false const p = msg.command[1] + if (typeof params === 'string' && p === params) return true - for (const param of params) { - if (typeof param === 'string' && p === param) return true + const m = p.match(params) + if (!m) return false - const m = p.match(param) - if (!m) continue + msg.command.push(...m.slice(1)) - msg.command.push(...m.slice(1)) - - return true - } - - return false + return true }) } + return and(base, (_msg: Message) => { + const msg = _msg as Message & { command: string[] } + + if (msg.command.length !== 2) return false + + const p = msg.command[1] + + for (const param of params) { + if (typeof param === 'string' && p === param) return true + + const m = p.match(param) + if (!m) continue + + msg.command.push(...m.slice(1)) + + return true + } + + return false + }) + } +} + /** * Filter for deep links (i.e. `/start `). * * If the parameter is a regex, groups are added to `msg.command`, * meaning that the first group is available in `msg.command[2]`. */ -export const deeplink = deeplinkBase(start) +export const deeplink: (params: MaybeArray) => UpdateFilter< + MessageContext | BusinessMessageContext, + { command: string[] } +> = deeplinkBase(start) /** * Filter for group deep links (i.e. `/start `). @@ -166,4 +184,7 @@ export const deeplink = deeplinkBase(start) * If the parameter is a regex, groups are added to `msg.command`, * meaning that the first group is available in `msg.command[2]`. */ -export const deeplinkGroup = deeplinkBase(startGroup) +export const deeplinkGroup: (params: MaybeArray) => UpdateFilter< + MessageContext | BusinessMessageContext, + { command: string[] } +> = deeplinkBase(startGroup) diff --git a/packages/dispatcher/src/filters/chat.ts b/packages/dispatcher/src/filters/chat.ts index 6a170660..6da26bbc 100644 --- a/packages/dispatcher/src/filters/chat.ts +++ b/packages/dispatcher/src/filters/chat.ts @@ -1,4 +1,4 @@ -import { +import type { BotChatJoinRequestUpdate, BusinessMessage, Chat, @@ -13,31 +13,29 @@ import { UserTypingUpdate, } from '@mtcute/core' -import { UpdateContextDistributed } from '../context/base.js' -import { EmptyObject, Modify, UpdateFilter } from './types.js' +import type { UpdateContextDistributed } from '../context/base.js' + +import type { EmptyObject, Modify, UpdateFilter } from './types.js' /** * Filter updates by type of the chat where they happened */ -export const chat = - ( - type: T, - ): UpdateFilter< - Obj, - { - chat: Modify - } & (Obj extends Message - ? T extends 'private' | 'bot' | 'group' - ? { - sender: User - } - : EmptyObject - : EmptyObject) - > => - (msg) => - msg.chat.chatType === type +export function chat(type: T): UpdateFilter< + Obj, + { + chat: Modify + } & (Obj extends Message + ? T extends 'private' | 'bot' | 'group' + ? { + sender: User + } + : EmptyObject + : EmptyObject) +> { + return msg => + msg.chat.chatType === type +} -// prettier-ignore /** * Filter updates by marked chat ID(s) or username(s) * @@ -48,21 +46,21 @@ export const chat = */ export const chatId: { (id: MaybeArray): UpdateFilter> (id: MaybeArray): UpdateFilter> } = (id) => { const indexId = new Set() @@ -86,8 +84,8 @@ export const chatId: { const peer = upd.peer return peer.type === 'chat' && ( - indexId.has(peer.id) || - Boolean(peer.usernames?.some((u) => indexUsername.has(u.username))) + indexId.has(peer.id) + || Boolean(peer.usernames?.some(u => indexUsername.has(u.username))) ) } case 'history_read': @@ -100,8 +98,8 @@ export const chatId: { const chat = upd.chat - return (matchSelf && chat.isSelf) || - indexId.has(chat.id) || - Boolean(chat.usernames?.some((u) => indexUsername.has(u.username))) + return (matchSelf && chat.isSelf) + || indexId.has(chat.id) + || Boolean(chat.usernames?.some(u => indexUsername.has(u.username))) } } diff --git a/packages/dispatcher/src/filters/group.ts b/packages/dispatcher/src/filters/group.ts index a9ee5056..53b88d49 100644 --- a/packages/dispatcher/src/filters/group.ts +++ b/packages/dispatcher/src/filters/group.ts @@ -1,8 +1,9 @@ -import { MaybePromise, Message } from '@mtcute/core' +import type { MaybePromise, Message } from '@mtcute/core' -import { BusinessMessageContext } from '../context/business-message.js' -import { MessageContext } from '../context/message.js' -import { Modify, UpdateFilter } from './types.js' +import type { BusinessMessageContext } from '../context/business-message.js' +import type { MessageContext } from '../context/message.js' + +import type { Modify, UpdateFilter } from './types.js' /** * For message groups, apply a filter to every message in the group. @@ -21,7 +22,7 @@ export function every( messages: Modify[] }, State -> { + > { return (ctx, state) => { let i = 0 const upds = ctx.messages @@ -59,7 +60,6 @@ export function every( * @returns */ export function some( - // eslint-disable-next-line filter: UpdateFilter, // eslint-disable-next-line ): UpdateFilter { diff --git a/packages/dispatcher/src/filters/index.ts b/packages/dispatcher/src/filters/index.ts index 3cb8bb92..d67c351e 100644 --- a/packages/dispatcher/src/filters/index.ts +++ b/packages/dispatcher/src/filters/index.ts @@ -1,4 +1,6 @@ import * as filters from './bundle.js' + import UpdateFilter = filters.UpdateFilter + export { filters } export type { UpdateFilter } diff --git a/packages/dispatcher/src/filters/logic.ts b/packages/dispatcher/src/filters/logic.ts index f06c91f0..76dfaee9 100644 --- a/packages/dispatcher/src/filters/logic.ts +++ b/packages/dispatcher/src/filters/logic.ts @@ -1,9 +1,6 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -// ^^ will be looked into in MTQ-29 +import type { MaybePromise } from '@mtcute/core' -import { MaybePromise } from '@mtcute/core' - -import { ExtractBaseMany, ExtractMod, Invert, UnionToIntersection, UpdateFilter } from './types.js' +import type { ExtractBaseMany, ExtractMod, Invert, UnionToIntersection, UpdateFilter } from './types.js' /** * Filter that matches any update @@ -30,7 +27,7 @@ export function not( if (typeof res === 'boolean') return !res - return res.then((r) => !r) + return res.then(r => !r) } } diff --git a/packages/dispatcher/src/filters/message.ts b/packages/dispatcher/src/filters/message.ts index f73c9272..4f8e1e27 100644 --- a/packages/dispatcher/src/filters/message.ts +++ b/packages/dispatcher/src/filters/message.ts @@ -1,114 +1,129 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -// ^^ will be looked into in MTQ-29 -import { - _RepliedMessageAssertionsByOrigin, +import type { + Audio, + Contact, + Dice, + Document, + Game, + Invoice, + LiveLocation, + Location, MaybeArray, Message, MessageAction, MessageMediaType, Peer, - RawDocument, - RawLocation, + Photo, + Poll, RepliedMessageInfo, RepliedMessageOrigin, Sticker, StickerSourceType, StickerType, User, + Venue, Video, + Voice, + WebPage, + _RepliedMessageAssertionsByOrigin, +} from '@mtcute/core' +import { + RawDocument, + RawLocation, } from '@mtcute/core' -import { BusinessMessageContext } from '../context/business-message.js' -import { MessageContext } from '../index.js' -import { Modify, UpdateFilter } from './types.js' +import type { BusinessMessageContext } from '../context/business-message.js' +import type { MessageContext } from '../index.js' + +import type { Modify, UpdateFilter } from './types.js' /** * Filter incoming messages. * * Messages sent to yourself (i.e. Saved Messages) are also "incoming" */ -export const incoming: UpdateFilter = (msg) => !msg.isOutgoing +export const incoming: UpdateFilter = msg => !msg.isOutgoing /** * Filter outgoing messages. * * Messages sent to yourself (i.e. Saved Messages) are **not** "outgoing" */ -export const outgoing: UpdateFilter = (msg) => msg.isOutgoing +export const outgoing: UpdateFilter = msg => msg.isOutgoing /** * Filter for scheduled messages */ -export const scheduled: UpdateFilter = (msg) => msg.isScheduled +export const scheduled: UpdateFilter = msg => msg.isScheduled /** * Filter messages that are replies to some other message */ -export const reply: UpdateFilter = (msg) => msg.replyToMessage !== null +export const reply: UpdateFilter = msg => msg.replyToMessage !== null /** * Filter messages that are replies with the given origin type */ -export const replyOrigin = - ( - origin: T, - ): UpdateFilter< - Message, - { - replyToMessage: Modify - } - > => - (msg) => - msg.replyToMessage?.originIs(origin) ?? false // originIs does additional checks +export function replyOrigin(origin: T): UpdateFilter< + Message, + { + replyToMessage: Modify + } +> { + return msg => + msg.replyToMessage?.originIs(origin) ?? false +} // originIs does additional checks /** * Filter messages containing some media */ -export const media: UpdateFilter }> = (msg) => msg.media !== null +export const media: UpdateFilter }> = msg => msg.media !== null /** * Filter messages containing media of given type */ -export const mediaOf = - (type: T): UpdateFilter }> => - (msg) => - msg.media?.type === type +export function mediaOf(type: T): UpdateFilter< + Message, + { media: Extract } +> { + return msg => + msg.media?.type === type +} /** Filter messages containing a photo */ -export const photo = mediaOf('photo') +export const photo: UpdateFilter = mediaOf('photo') /** Filter messages containing a dice */ -export const dice = mediaOf('dice') +export const dice: UpdateFilter = mediaOf('dice') /** Filter messages containing a contact */ -export const contact = mediaOf('contact') +export const contact: UpdateFilter = mediaOf('contact') /** Filter messages containing an audio file */ -export const audio = mediaOf('audio') +export const audio: UpdateFilter = mediaOf('audio') /** Filter messages containing a voice message (audio-only) */ -export const voice = mediaOf('voice') +export const voice: UpdateFilter = mediaOf('voice') /** Filter messages containing a sticker */ -export const sticker = mediaOf('sticker') +export const sticker: UpdateFilter = mediaOf('sticker') /** Filter messages containing a document (a file) */ -export const document = mediaOf('document') +export const document: UpdateFilter = mediaOf('document') /** Filter messages containing any video (videos, round messages and animations) */ -export const anyVideo = mediaOf('video') +export const anyVideo: UpdateFilter = mediaOf('video') /** Filter messages containing a static location */ -export const location = mediaOf('location') +export const location: UpdateFilter = mediaOf('location') /** Filter messages containing a live location */ -export const liveLocation = mediaOf('live_location') +export const liveLocation: UpdateFilter = mediaOf('live_location') /** Filter messages containing a game */ -export const game = mediaOf('game') +export const game: UpdateFilter = mediaOf('game') /** Filter messages containing a web page */ -export const webpage = mediaOf('webpage') +export const webpage: UpdateFilter = mediaOf('webpage') /** Filter messages containing a venue */ -export const venue = mediaOf('venue') +export const venue: UpdateFilter = mediaOf('venue') /** Filter messages containing a poll */ -export const poll = mediaOf('poll') +export const poll: UpdateFilter = mediaOf('poll') /** Filter messages containing an invoice */ -export const invoice = mediaOf('invoice') +export const invoice: UpdateFilter = mediaOf('invoice') /** * Filter messages containing any location (live or static). */ -export const anyLocation: UpdateFilter = (msg) => msg.media instanceof RawLocation +export const anyLocation: UpdateFilter = msg => msg.media instanceof RawLocation /** * Filter messages containing a document @@ -116,7 +131,7 @@ export const anyLocation: UpdateFilter = (msg) => * This will also match media like audio, video, voice * that also use Documents */ -export const anyDocument: UpdateFilter = (msg) => msg.media instanceof RawDocument +export const anyDocument: UpdateFilter = msg => msg.media instanceof RawDocument /** * Filter messages containing a simple video. @@ -134,7 +149,7 @@ export const video: UpdateFilter< } > } -> = (msg) => msg.media?.type === 'video' && !msg.media.isAnimation && !msg.media.isRound +> = msg => msg.media?.type === 'video' && !msg.media.isAnimation && !msg.media.isRound /** * Filter messages containing an animation. @@ -153,7 +168,7 @@ export const animation: UpdateFilter< } > } -> = (msg) => msg.media?.type === 'video' && msg.media.isAnimation && !msg.media.isRound +> = msg => msg.media?.type === 'video' && msg.media.isAnimation && !msg.media.isRound /** * Filter messages containing a round message (aka video note). @@ -169,23 +184,23 @@ export const roundMessage: UpdateFilter< } > } -> = (msg) => msg.media?.type === 'video' && !msg.media.isAnimation && msg.media.isRound +> = msg => msg.media?.type === 'video' && !msg.media.isAnimation && msg.media.isRound /** * Filter messages containing a sticker by its type */ -export const stickerByType = - (type: StickerType): UpdateFilter => - (msg) => - msg.media?.type === 'sticker' && msg.media.stickerType === type +export function stickerByType(type: StickerType): UpdateFilter { + return msg => + msg.media?.type === 'sticker' && msg.media.stickerType === type +} /** * Filter messages containing a sticker by its source file type */ -export const stickerBySourceType = - (type: StickerSourceType): UpdateFilter => - (msg) => - msg.media?.type === 'sticker' && msg.media.sourceType === type +export function stickerBySourceType(type: StickerSourceType): UpdateFilter { + return msg => + msg.media?.type === 'sticker' && msg.media.sourceType === type +} /** * Filter text-only messages non-service messages @@ -196,19 +211,17 @@ export const text: UpdateFilter< media: null isService: false } -> = (msg) => msg.media === null && !msg.isService +> = msg => msg.media === null && !msg.isService /** * Filter service messages */ -export const service: UpdateFilter = (msg) => msg.isService +export const service: UpdateFilter = msg => msg.isService /** * Filter service messages by action type */ -export const action = ['type']>( - type: MaybeArray, -): UpdateFilter< +export function action['type']>(type: MaybeArray): UpdateFilter< Message, { action: Extract @@ -216,23 +229,24 @@ export const action = ['type']>( ? User : Peer } -> => { +> { if (Array.isArray(type)) { const index: Partial> = {} - type.forEach((it) => (index[it] = true)) + type.forEach(it => (index[it] = true)) - return (msg) => (msg.action?.type as any) in index + return msg => (msg.action?.type as any) in index } - return (msg) => msg.action?.type === type + return msg => msg.action?.type === type } -export const sender = - ( - type: T, - ): UpdateFilter }> => - (msg) => - msg.sender.type === type +export function sender(type: T): UpdateFilter< + Message, + { sender: Extract } +> { + return msg => + msg.sender.type === type +} /** * Filter that matches messages that are replies to some other message that can be fetched @@ -240,41 +254,45 @@ export const sender = * * Optionally, you can pass a filter that will be applied to the replied message. */ -export const replyTo = - ( - filter?: UpdateFilter, - ): UpdateFilter Promise }, State> => - async (msg, state) => { - if (!msg.replyToMessage?.id) return false +export function replyTo( + filter?: UpdateFilter, +): UpdateFilter< + MessageContext | BusinessMessageContext, + { getReplyTo: () => Promise }, + State + > { + return async (msg, state) => { + if (!msg.replyToMessage?.id) return false - const reply = msg._name === 'new_message' ? await msg.getReplyTo() : msg.replyTo - if (!reply) return false + const reply = msg._name === 'new_message' ? await msg.getReplyTo() : msg.replyTo + if (!reply) return false - if (msg._name === 'new_message') { - msg.getReplyTo = () => Promise.resolve(reply) - } - - if (!filter) return true - - return filter(reply, state) + if (msg._name === 'new_message') { + msg.getReplyTo = () => Promise.resolve(reply) } + if (!filter) return true + + return filter(reply, state) + } +} + /** * Middleware-like filter that will fetch the sender of the message * and make it available to further filters, as well as the handler itself. */ -export const withCompleteSender = - ( - filter?: UpdateFilter, - ): UpdateFilter => - async (msg, state) => { - try { - await msg.getCompleteSender() - } catch (e) { - return false - } - - if (!filter) return true - - return filter(msg, state) +export function withCompleteSender( + filter?: UpdateFilter, +): UpdateFilter { + return async (msg, state) => { + try { + await msg.getCompleteSender() + } catch { + return false } + + if (!filter) return true + + return filter(msg, state) + } +} diff --git a/packages/dispatcher/src/filters/state.ts b/packages/dispatcher/src/filters/state.ts index 6cce030a..0a2936da 100644 --- a/packages/dispatcher/src/filters/state.ts +++ b/packages/dispatcher/src/filters/state.ts @@ -1,7 +1,6 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import { MaybePromise } from '@mtcute/core' +import type { MaybePromise } from '@mtcute/core' -import { UpdateFilter } from './types.js' +import type { UpdateFilter } from './types.js' /** * Create a filter for the cases when the state is empty @@ -20,10 +19,8 @@ export const stateEmpty: UpdateFilter = async (upd, state) => { * * @param predicate State predicate */ -export const state = ( - predicate: (state: T) => MaybePromise, - // eslint-disable-next-line @typescript-eslint/ban-types -): UpdateFilter => { +// eslint-disable-next-line ts/no-empty-object-type +export function state(predicate: (state: T) => MaybePromise): UpdateFilter { return async (upd, state) => { if (!state) return false const data = await state.get() diff --git a/packages/dispatcher/src/filters/text.ts b/packages/dispatcher/src/filters/text.ts index 51b87b9a..c9ac6bc1 100644 --- a/packages/dispatcher/src/filters/text.ts +++ b/packages/dispatcher/src/filters/text.ts @@ -1,4 +1,4 @@ -import { +import type { BusinessCallbackQuery, BusinessMessage, CallbackQuery, @@ -8,17 +8,18 @@ import { Message, } from '@mtcute/core' -import { UpdateContextDistributed } from '../context/base.js' -import { UpdateFilter } from './types.js' +import type { UpdateContextDistributed } from '../context/base.js' + +import type { UpdateFilter } from './types.js' type UpdatesWithText = UpdateContextDistributed< - | Message - | BusinessMessage - | InlineQuery - | ChosenInlineResult - | CallbackQuery - | InlineCallbackQuery - | BusinessCallbackQuery + | Message + | BusinessMessage + | InlineQuery + | ChosenInlineResult + | CallbackQuery + | InlineCallbackQuery + | BusinessCallbackQuery > function extractText(obj: UpdatesWithText): string | null { @@ -51,23 +52,23 @@ function extractText(obj: UpdatesWithText): string | null { * * @param regex Regex to be matched */ -export const regex = - (regex: RegExp): UpdateFilter => - (obj) => { - const txt = extractText(obj) - if (!txt) return false +export function regex(regex: RegExp): UpdateFilter { + return (obj) => { + const txt = extractText(obj) + if (!txt) return false - const m = txt.match(regex) + const m = txt.match(regex) - if (m) { - (obj as typeof obj & { match: RegExpMatchArray }).match = m + if (m) { + (obj as typeof obj & { match: RegExpMatchArray }).match = m - return true - } - - return false + return true } + return false + } +} + /** * Filter objects which contain the exact text given * - for `Message`, `Message.text` is used @@ -78,14 +79,14 @@ export const regex = * @param str String to be matched * @param ignoreCase Whether string case should be ignored */ -export const equals = (str: string, ignoreCase = false): UpdateFilter => { +export function equals(str: string, ignoreCase = false): UpdateFilter { if (ignoreCase) { str = str.toLowerCase() - return (obj) => extractText(obj)?.toLowerCase() === str + return obj => extractText(obj)?.toLowerCase() === str } - return (obj) => extractText(obj) === str + return obj => extractText(obj) === str } /** @@ -98,7 +99,7 @@ export const equals = (str: string, ignoreCase = false): UpdateFilter => { +export function contains(str: string, ignoreCase = false): UpdateFilter { if (ignoreCase) { str = str.toLowerCase() @@ -126,7 +127,7 @@ export const contains = (str: string, ignoreCase = false): UpdateFilter => { +export function startsWith(str: string, ignoreCase = false): UpdateFilter { if (ignoreCase) { str = str.toLowerCase() @@ -154,7 +155,7 @@ export const startsWith = (str: string, ignoreCase = false): UpdateFilter => { +export function endsWith(str: string, ignoreCase = false): UpdateFilter { if (ignoreCase) { str = str.toLowerCase() diff --git a/packages/dispatcher/src/filters/types.ts b/packages/dispatcher/src/filters/types.ts index 85c723a7..8704e5e5 100644 --- a/packages/dispatcher/src/filters/types.ts +++ b/packages/dispatcher/src/filters/types.ts @@ -1,10 +1,6 @@ -/* eslint-disable @typescript-eslint/ban-types */ -/* eslint-disable @typescript-eslint/no-explicit-any */ -// ^^ will be looked into in MTQ-29 +import type { MaybePromise } from '@mtcute/core' -import { MaybePromise } from '@mtcute/core' - -import { UpdateState } from '../state/update-state.js' +import type { UpdateState } from '../state/update-state.js' /** * Type describing a primitive filter, which is a function taking some `Base` * and a {@link TelegramClient}, checking it against some condition @@ -74,7 +70,7 @@ import { UpdateState } from '../state/update-state.js' * > like `and`, `or`, etc. Those are meant to be inferred by the compiler! */ // we need the second parameter because it carries meta information -// eslint-disable-next-line @typescript-eslint/no-unused-vars +// eslint-disable-next-line unused-imports/no-unused-vars, ts/no-empty-object-type export type UpdateFilter = ( update: Base, state?: UpdateState, diff --git a/packages/dispatcher/src/filters/updates.ts b/packages/dispatcher/src/filters/updates.ts index 9fef1534..2e7d1509 100644 --- a/packages/dispatcher/src/filters/updates.ts +++ b/packages/dispatcher/src/filters/updates.ts @@ -1,6 +1,6 @@ -import { ChatMemberUpdate, ChatMemberUpdateType, MaybeArray, UserStatus, UserStatusUpdate } from '@mtcute/core' +import type { ChatMemberUpdate, ChatMemberUpdateType, MaybeArray, UserStatus, UserStatusUpdate } from '@mtcute/core' -import { UpdateFilter } from './types.js' +import type { UpdateFilter } from './types.js' /** * Create a filter for {@link ChatMemberUpdate} by update type @@ -14,12 +14,12 @@ export const chatMember: { } = (types: MaybeArray): UpdateFilter => { if (Array.isArray(types)) { const index: Partial> = {} - types.forEach((typ) => (index[typ] = true)) + types.forEach(typ => (index[typ] = true)) - return (upd) => upd.type in index + return upd => upd.type in index } - return (upd) => upd.type === types + return upd => upd.type === types } /** @@ -43,16 +43,16 @@ export const userStatus: { } = (statuses: MaybeArray): UpdateFilter => { if (Array.isArray(statuses)) { const index: Partial> = {} - statuses.forEach((typ) => (index[typ] = true)) + statuses.forEach(typ => (index[typ] = true)) - return (upd) => upd.status in index + return upd => upd.status in index } - return (upd) => upd.status === statuses + return upd => upd.status === statuses } /** * Create a filter for {@link ChatMemberUpdate} for updates * regarding current user */ -export const chatMemberSelf: UpdateFilter = (upd) => upd.isSelf +export const chatMemberSelf: UpdateFilter = upd => upd.isSelf diff --git a/packages/dispatcher/src/filters/user.ts b/packages/dispatcher/src/filters/user.ts index f2e591d5..89080085 100644 --- a/packages/dispatcher/src/filters/user.ts +++ b/packages/dispatcher/src/filters/user.ts @@ -1,4 +1,4 @@ -import { +import type { BotChatJoinRequestUpdate, BusinessCallbackQuery, BusinessMessage, @@ -13,26 +13,28 @@ import { Message, PollVoteUpdate, StoryUpdate, - User, UserStatusUpdate, UserTypingUpdate, } from '@mtcute/core' +import { + User, +} from '@mtcute/core' -import { UpdateContextDistributed } from '../context/base.js' -import { UpdateFilter } from './types.js' +import type { UpdateContextDistributed } from '../context/base.js' + +import type { UpdateFilter } from './types.js' /** * Filter messages generated by yourself (including Saved Messages) */ -export const me: UpdateFilter = (msg) => +export const me: UpdateFilter = msg => (msg.sender.type === 'user' && msg.sender.isSelf) || msg.isOutgoing /** * Filter messages sent by bots */ -export const bot: UpdateFilter = (msg) => msg.sender.constructor === User && msg.sender.isBot +export const bot: UpdateFilter = msg => msg.sender.constructor === User && msg.sender.isBot -// prettier-ignore /** * Filter updates by user ID(s) or username(s) * @@ -40,35 +42,35 @@ export const bot: UpdateFilter = (msg) => msg.sender. */ export const userId: { (id: MaybeArray): UpdateFilter> (id: MaybeArray): UpdateFilter> } = (id) => { const indexId = new Set() @@ -94,16 +96,16 @@ export const userId: { case 'edit_business_message': { const sender = upd.sender - return (matchSelf && sender.isSelf) || - indexId.has(sender.id) || - indexUsername.has(sender.username!) + return (matchSelf && sender.isSelf) + || indexId.has(sender.id) + || indexUsername.has(sender.username!) } case 'user_status': case 'user_typing': { const id = upd.userId - return (matchSelf && id === upd.client.storage.self.getCached()?.userId) || - indexId.has(id) + return (matchSelf && id === upd.client.storage.self.getCached()?.userId) + || indexId.has(id) } case 'poll_vote': case 'story': @@ -111,24 +113,24 @@ export const userId: { const peer = upd.peer if (peer.type !== 'user') return false - return (matchSelf && peer.isSelf) || - indexId.has(peer.id) || - Boolean(peer.usernames?.some((u) => indexUsername.has(u.username))) + return (matchSelf && peer.isSelf) + || indexId.has(peer.id) + || Boolean(peer.usernames?.some(u => indexUsername.has(u.username))) } case 'history_read': { const id = upd.chatId - return (matchSelf && id === upd.client.storage.self.getCached()?.userId) || - indexId.has(id) + return (matchSelf && id === upd.client.storage.self.getCached()?.userId) + || indexId.has(id) } } const user = upd.user return ( - (matchSelf && user.isSelf) || - indexId.has(user.id) || - Boolean(user.usernames?.some((u) => indexUsername.has(u.username))) + (matchSelf && user.isSelf) + || indexId.has(user.id) + || Boolean(user.usernames?.some(u => indexUsername.has(u.username))) ) } } diff --git a/packages/dispatcher/src/handler.ts b/packages/dispatcher/src/handler.ts index 3ac77bed..bfe784f7 100644 --- a/packages/dispatcher/src/handler.ts +++ b/packages/dispatcher/src/handler.ts @@ -1,4 +1,4 @@ -import { +import type { BotReactionCountUpdate, BotReactionUpdate, BotStoppedUpdate, @@ -14,14 +14,14 @@ import { PollUpdate, PollVoteUpdate, StoryUpdate, - tl, UserStatusUpdate, UserTypingUpdate, + tl, } from '@mtcute/core' -import { TelegramClient } from '@mtcute/core/client.js' +import type { TelegramClient } from '@mtcute/core/client.js' -import { UpdateContext } from './context/base.js' -import { +import type { UpdateContext } from './context/base.js' +import type { BusinessCallbackQueryContext, BusinessMessageContext, CallbackQueryContext, @@ -32,7 +32,7 @@ import { MessageContext, PreCheckoutQueryContext, } from './context/index.js' -import { PropagationAction } from './propagation.js' +import type { PropagationAction } from './propagation.js' export interface BaseUpdateHandler { name: Name @@ -123,34 +123,34 @@ export type DeleteBusinessMessageHandler export type UpdateHandler = - | RawUpdateHandler - | NewMessageHandler - | EditMessageHandler - | MessageGroupHandler - | DeleteMessageHandler - | ChatMemberUpdateHandler - | InlineQueryHandler - | ChosenInlineResultHandler - | CallbackQueryHandler - | InlineCallbackQueryHandler - | BusinessCallbackQueryHandler - | PollUpdateHandler - | PollVoteHandler - | UserStatusUpdateHandler - | UserTypingHandler - | HistoryReadHandler - | BotStoppedHandler - | BotChatJoinRequestHandler - | ChatJoinRequestHandler - | PreCheckoutQueryHandler - | StoryUpdateHandler - | DeleteStoryHandler - | BotReactionUpdateHandler - | BotReactionCountUpdateHandler - | BusinessConnectionUpdateHandler - | NewBusinessMessageHandler - | EditBusinessMessageHandler - | BusinessMessageGroupHandler - | DeleteBusinessMessageHandler + | RawUpdateHandler + | NewMessageHandler + | EditMessageHandler + | MessageGroupHandler + | DeleteMessageHandler + | ChatMemberUpdateHandler + | InlineQueryHandler + | ChosenInlineResultHandler + | CallbackQueryHandler + | InlineCallbackQueryHandler + | BusinessCallbackQueryHandler + | PollUpdateHandler + | PollVoteHandler + | UserStatusUpdateHandler + | UserTypingHandler + | HistoryReadHandler + | BotStoppedHandler + | BotChatJoinRequestHandler + | ChatJoinRequestHandler + | PreCheckoutQueryHandler + | StoryUpdateHandler + | DeleteStoryHandler + | BotReactionUpdateHandler + | BotReactionCountUpdateHandler + | BusinessConnectionUpdateHandler + | NewBusinessMessageHandler + | EditBusinessMessageHandler + | BusinessMessageGroupHandler + | DeleteBusinessMessageHandler // end-codegen diff --git a/packages/dispatcher/src/state/key.ts b/packages/dispatcher/src/state/key.ts index 4b63838a..589c955a 100644 --- a/packages/dispatcher/src/state/key.ts +++ b/packages/dispatcher/src/state/key.ts @@ -1,7 +1,8 @@ -import { assertNever, MaybePromise, Peer } from '@mtcute/core' +import type { MaybePromise, Peer } from '@mtcute/core' +import { assertNever } from '@mtcute/core' -import { BusinessMessageContext } from '../context/business-message.js' -import { CallbackQueryContext, MessageContext } from '../context/index.js' +import type { BusinessMessageContext } from '../context/business-message.js' +import type { CallbackQueryContext, MessageContext } from '../context/index.js' /** * Function that determines how the state key is derived. diff --git a/packages/dispatcher/src/state/provider.ts b/packages/dispatcher/src/state/provider.ts index 7ec35aac..f5125423 100644 --- a/packages/dispatcher/src/state/provider.ts +++ b/packages/dispatcher/src/state/provider.ts @@ -1,6 +1,6 @@ -import { IStorageProvider } from '@mtcute/core' +import type { IStorageProvider } from '@mtcute/core' -import { IStateRepository } from './repository.js' +import type { IStateRepository } from './repository.js' export type IStateStorageProvider = IStorageProvider<{ state: IStateRepository diff --git a/packages/dispatcher/src/state/providers/memory.ts b/packages/dispatcher/src/state/providers/memory.ts index d72a521c..78b1f858 100644 --- a/packages/dispatcher/src/state/providers/memory.ts +++ b/packages/dispatcher/src/state/providers/memory.ts @@ -1,7 +1,8 @@ -import { MaybePromise, MemoryStorageDriver } from '@mtcute/core' +import type { MaybePromise } from '@mtcute/core' +import { MemoryStorageDriver } from '@mtcute/core' -import { IStateStorageProvider } from '../provider.js' -import { IStateRepository } from '../repository.js' +import type { IStateStorageProvider } from '../provider.js' +import type { IStateRepository } from '../repository.js' interface StateDto { value: string @@ -14,8 +15,8 @@ interface RateLimitDto { } class MemoryStateRepository implements IStateRepository { - readonly state - readonly rl + readonly state: Map + readonly rl: Map constructor(readonly _driver: MemoryStorageDriver) { this.state = this._driver.getState>('dispatcher_fsm', () => new Map()) this.rl = this._driver.getState>('rl', () => new Map()) @@ -98,7 +99,7 @@ class MemoryStateRepository implements IStateRepository { } export class MemoryStateStorage implements IStateStorageProvider { - readonly state + readonly state: MemoryStateRepository constructor(readonly driver: MemoryStorageDriver = new MemoryStorageDriver()) { this.state = new MemoryStateRepository(this.driver) diff --git a/packages/dispatcher/src/state/providers/sqlite.ts b/packages/dispatcher/src/state/providers/sqlite.ts index 1273c07e..3646c98c 100644 --- a/packages/dispatcher/src/state/providers/sqlite.ts +++ b/packages/dispatcher/src/state/providers/sqlite.ts @@ -1,7 +1,7 @@ -import { BaseSqliteStorage, BaseSqliteStorageDriver, ISqliteStatement, MaybePromise } from '@mtcute/core' +import type { BaseSqliteStorage, BaseSqliteStorageDriver, ISqliteStatement, MaybePromise } from '@mtcute/core' -import { IStateStorageProvider } from '../provider.js' -import { IStateRepository } from '../repository.js' +import type { IStateStorageProvider } from '../provider.js' +import type { IStateRepository } from '../repository.js' interface StateDto { value: string @@ -116,12 +116,12 @@ class SqliteStateRepository implements IStateRepository { } export class SqliteStateStorage implements IStateStorageProvider { - readonly state + readonly state: SqliteStateRepository constructor(readonly driver: BaseSqliteStorageDriver) { this.state = new SqliteStateRepository(driver) } - static from(provider: BaseSqliteStorage) { + static from(provider: BaseSqliteStorage): SqliteStateStorage { return new SqliteStateStorage(provider.driver) } } diff --git a/packages/dispatcher/src/state/repository.ts b/packages/dispatcher/src/state/repository.ts index d4b395f4..189a4ccc 100644 --- a/packages/dispatcher/src/state/repository.ts +++ b/packages/dispatcher/src/state/repository.ts @@ -1,4 +1,4 @@ -import { MaybePromise } from '@mtcute/core' +import type { MaybePromise } from '@mtcute/core' /** * Interface for FSM storage for the dispatcher. @@ -19,7 +19,7 @@ export interface IStateRepository { * * @param key Key of the state, as defined by {@link StateKeyDelegate} */ - getState(key: string, now: number): MaybePromise + getState: (key: string, now: number) => MaybePromise /** * Save state to the storage @@ -28,21 +28,21 @@ export interface IStateRepository { * @param state String representing the state * @param ttl TTL for the state, in seconds */ - setState(key: string, state: string, ttl?: number): MaybePromise + setState: (key: string, state: string, ttl?: number) => MaybePromise /** * Delete state from the storage * * @param key Key of the state, as defined by {@link StateKeyDelegate} */ - deleteState(key: string): MaybePromise + deleteState: (key: string) => MaybePromise /** * Clean up expired states and rate limits. * * @param now Current unix time in ms */ - vacuum(now: number): MaybePromise + vacuum: (now: number) => MaybePromise /** * Get information about a rate limit. @@ -57,12 +57,12 @@ export interface IStateRepository { * @returns Tuple containing the number of remaining and * unix time in ms when the user can try again */ - getRateLimit(key: string, now: number, limit: number, window: number): MaybePromise<[number, number]> + getRateLimit: (key: string, now: number, limit: number, window: number) => MaybePromise<[number, number]> /** * Reset a rate limit. * * @param key Key of the rate limit */ - resetRateLimit(key: string): MaybePromise + resetRateLimit: (key: string) => MaybePromise } diff --git a/packages/dispatcher/src/state/service.ts b/packages/dispatcher/src/state/service.ts index da74b227..719b9867 100644 --- a/packages/dispatcher/src/state/service.ts +++ b/packages/dispatcher/src/state/service.ts @@ -1,6 +1,7 @@ -import { asyncResettable, LruMap } from '@mtcute/core/utils.js' +import { LruMap, asyncResettable } from '@mtcute/core/utils.js' +import type { MaybePromise } from '@mtcute/core' -import { IStateStorageProvider } from './provider.js' +import type { IStateStorageProvider } from './provider.js' const makeCurrentSceneKey = (key: string) => `$current_scene_${key}` @@ -15,14 +16,15 @@ export class StateService { await this.provider.driver.load?.() this._loaded = true }) - async load() { + + async load(): Promise { await this._load.run() this._vacuumTimer = setInterval(() => { Promise.resolve(this.provider.state.vacuum(Date.now())).catch(() => {}) }, 300_000) } - async destroy() { + async destroy(): Promise { await this.provider.driver.save?.() await this.provider.driver.destroy?.() clearInterval(this._vacuumTimer) @@ -67,11 +69,11 @@ export class StateService { return this.deleteState(makeCurrentSceneKey(key)) } - getRateLimit(key: string, limit: number, window: number) { + getRateLimit(key: string, limit: number, window: number): MaybePromise<[number, number]> { return this.provider.state.getRateLimit(key, Date.now(), limit, window) } - resetRateLimit(key: string) { + resetRateLimit(key: string): MaybePromise { return this.provider.state.resetRateLimit(key) } } diff --git a/packages/dispatcher/src/state/update-state.ts b/packages/dispatcher/src/state/update-state.ts index 8e983b6f..49a7f5c6 100644 --- a/packages/dispatcher/src/state/update-state.ts +++ b/packages/dispatcher/src/state/update-state.ts @@ -1,10 +1,9 @@ -/* eslint-disable dot-notation */ -/* eslint-disable @typescript-eslint/no-explicit-any */ import { MtArgumentError, MtcuteError } from '@mtcute/core' import { sleep } from '@mtcute/core/utils.js' import type { Dispatcher } from '../dispatcher.js' -import { StateService } from './service.js' + +import type { StateService } from './service.js' /** * Error thrown by `.rateLimit()` @@ -59,9 +58,10 @@ export class UpdateState { } private _updateLocalKey(): void { - if (!this._scoped) this._localKey = this._localKeyBase - else { - this._localKey = this._scene ? this._scene + '_' + this._localKeyBase : this._localKeyBase + if (!this._scoped) { + this._localKey = this._localKeyBase + } else { + this._localKey = this._scene ? `${this._scene}_${this._localKeyBase}` : this._localKeyBase } } diff --git a/packages/dispatcher/src/wizard.ts b/packages/dispatcher/src/wizard.ts index 02844a12..1fb9ef5d 100644 --- a/packages/dispatcher/src/wizard.ts +++ b/packages/dispatcher/src/wizard.ts @@ -1,9 +1,11 @@ -import { MaybePromise } from '@mtcute/core' +import type { MaybePromise } from '@mtcute/core' -import { MessageContext } from './context/message.js' -import { Dispatcher, DispatcherParams } from './dispatcher.js' +import type { MessageContext } from './context/message.js' +import type { DispatcherParams } from './dispatcher.js' +import { Dispatcher } from './dispatcher.js' +import type { UpdateFilter } from './filters/index.js' import { filters } from './filters/index.js' -import { UpdateState } from './state/update-state.js' +import type { UpdateState } from './state/update-state.js' /** * Action for the wizard scene. @@ -60,7 +62,7 @@ export class WizardScene extends Dispatcher, step: number) { + async goToStep(state: UpdateState, step: number): Promise { if (step >= this._steps) { await state.exit() } else { @@ -71,7 +73,7 @@ export class WizardScene extends Dispatcher, count = 1) { + async skip(state: UpdateState, count = 1): Promise { const { $step } = (await state.get()) || {} if ($step === undefined) throw new Error('Wizard state is not initialized') @@ -81,8 +83,9 @@ export class WizardScene extends Dispatcher((it) => it.$step === step) + // eslint-disable-next-line ts/no-empty-object-type + static onNthStep(step: number): UpdateFilter { + const filter = filters.state(it => it.$step === step) if (step === 0) return filters.or(filters.stateEmpty, filter) @@ -92,7 +95,8 @@ export class WizardScene extends Dispatcher { return WizardScene.onNthStep(this._steps) } diff --git a/packages/dispatcher/tests/dispatcher.test.ts b/packages/dispatcher/tests/dispatcher.test.ts index 6ec7a0f2..ed758c1e 100644 --- a/packages/dispatcher/tests/dispatcher.test.ts +++ b/packages/dispatcher/tests/dispatcher.test.ts @@ -1,8 +1,7 @@ import { describe, expect, it } from 'vitest' - import { Message, PeersIndex } from '@mtcute/core' import { TelegramClient } from '@mtcute/core/client.js' -import { createStub, StubTelegramClient } from '@mtcute/test' +import { StubTelegramClient, createStub } from '@mtcute/test' import { Dispatcher, PropagationAction } from '../src/index.js' @@ -40,7 +39,7 @@ describe('Dispatcher', () => { const log: string[] = [] dp.onRawUpdate((cl, upd) => { - log.push('(no) received ' + upd._) + log.push(`(no) received ${upd._}`) return PropagationAction.Continue }) @@ -48,7 +47,7 @@ describe('Dispatcher', () => { dp.onRawUpdate( () => true, (cl, upd) => { - log.push('(true) received ' + upd._) + log.push(`(true) received ${upd._}`) return PropagationAction.Continue }, @@ -57,7 +56,7 @@ describe('Dispatcher', () => { dp.onRawUpdate( () => false, (cl, upd) => { - log.push('(false) received ' + upd._) + log.push(`(false) received ${upd._}`) return PropagationAction.Continue }, @@ -78,16 +77,16 @@ describe('Dispatcher', () => { const log: string[] = [] dp.onRawUpdate((cl, upd) => { - log.push('(grp0) received ' + upd._) + log.push(`(grp0) received ${upd._}`) }, 0) dp.onRawUpdate((cl, upd) => { - log.push('(grp0 2) received ' + upd._) + log.push(`(grp0 2) received ${upd._}`) }, 0) dp.onRawUpdate((cl, upd) => { - log.push('(grp1) received ' + upd._) + log.push(`(grp1) received ${upd._}`) }, 1) dp.onRawUpdate((cl, upd) => { - log.push('(grp2) received ' + upd._) + log.push(`(grp2) received ${upd._}`) }, 2) await dp.dispatchRawUpdateNow({ _: 'updateConfig' }, emptyPeers) @@ -105,21 +104,21 @@ describe('Dispatcher', () => { const log: string[] = [] dp.onRawUpdate((cl, upd) => { - log.push('(grp0) received ' + upd._) + log.push(`(grp0) received ${upd._}`) return PropagationAction.Continue }, 0) dp.onRawUpdate((cl, upd) => { - log.push('(grp0 2) received ' + upd._) + log.push(`(grp0 2) received ${upd._}`) }, 0) dp.onRawUpdate((cl, upd) => { - log.push('(grp1) received ' + upd._) + log.push(`(grp1) received ${upd._}`) }, 1) dp.onRawUpdate((cl, upd) => { - log.push('(grp1 2) received ' + upd._) + log.push(`(grp1 2) received ${upd._}`) }, 1) dp.onRawUpdate((cl, upd) => { - log.push('(grp2) received ' + upd._) + log.push(`(grp2) received ${upd._}`) }, 2) await dp.dispatchRawUpdateNow({ _: 'updateConfig' }, emptyPeers) @@ -138,23 +137,23 @@ describe('Dispatcher', () => { const log: string[] = [] dp.onRawUpdate((cl, upd) => { - log.push('(grp0) received ' + upd._) + log.push(`(grp0) received ${upd._}`) return PropagationAction.Continue }, 0) dp.onRawUpdate((cl, upd) => { - log.push('(grp0 2) received ' + upd._) + log.push(`(grp0 2) received ${upd._}`) }, 0) dp.onRawUpdate((cl, upd) => { - log.push('(grp1) received ' + upd._) + log.push(`(grp1) received ${upd._}`) return PropagationAction.Stop }, 1) dp.onRawUpdate((cl, upd) => { - log.push('(grp1 2) received ' + upd._) + log.push(`(grp1 2) received ${upd._}`) }, 1) dp.onRawUpdate((cl, upd) => { - log.push('(grp2) received ' + upd._) + log.push(`(grp2) received ${upd._}`) }, 2) await dp.dispatchRawUpdateNow({ _: 'updateConfig' }, emptyPeers) @@ -176,11 +175,11 @@ describe('Dispatcher', () => { const log: string[] = [] dp.onRawUpdate((cl, upd) => { - log.push('(parent) received ' + upd._) + log.push(`(parent) received ${upd._}`) }) child.onRawUpdate((cl, upd) => { - log.push('(child) received ' + upd._) + log.push(`(child) received ${upd._}`) }) await dp.dispatchRawUpdateNow({ _: 'updateConfig' }, emptyPeers) @@ -196,35 +195,35 @@ describe('Dispatcher', () => { const log: string[] = [] dp.onRawUpdate((cl, upd) => { - log.push('(parent 0) received ' + upd._) + log.push(`(parent 0) received ${upd._}`) return PropagationAction.Continue }, 0) dp.onRawUpdate((cl, upd) => { - log.push('(parent 1) received ' + upd._) + log.push(`(parent 1) received ${upd._}`) return PropagationAction.Stop }, 1) dp.onRawUpdate((cl, upd) => { - log.push('(parent 2) received ' + upd._) + log.push(`(parent 2) received ${upd._}`) }, 1) child.onRawUpdate((cl, upd) => { - log.push('(child 0) received ' + upd._) + log.push(`(child 0) received ${upd._}`) return PropagationAction.Continue }, 0) child.onRawUpdate((cl, upd) => { - log.push('(child 1) received ' + upd._) + log.push(`(child 1) received ${upd._}`) return PropagationAction.Stop }, 1) child.onRawUpdate((cl, upd) => { - log.push('(child 2) received ' + upd._) + log.push(`(child 2) received ${upd._}`) }, 1) await dp.dispatchRawUpdateNow({ _: 'updateConfig' }, emptyPeers) @@ -247,14 +246,12 @@ describe('Dispatcher', () => { const log: string[] = [] dp.onNewMessage(() => { - // eslint-disable-next-line log.push(`received ${(dp.deps as any).foo}`) }) const dp2 = Dispatcher.child() dp2.onNewMessage(() => { - // eslint-disable-next-line log.push(`received ${(dp.deps as any).foo} (child)`) }) diff --git a/packages/dispatcher/tests/tsconfig.json b/packages/dispatcher/tests/tsconfig.json index cfa0657b..ba289afc 100644 --- a/packages/dispatcher/tests/tsconfig.json +++ b/packages/dispatcher/tests/tsconfig.json @@ -1,9 +1,9 @@ { - "extends": "../../../tsconfig.json", - "include": [ - ".", - ], - "references": [ - { "path": "../" }, - ] + "extends": "../../../tsconfig.json", + "references": [ + { "path": "../" } + ], + "include": [ + "." + ] } diff --git a/packages/dispatcher/tsconfig.json b/packages/dispatcher/tsconfig.json index 919db0b1..3b5437ec 100644 --- a/packages/dispatcher/tsconfig.json +++ b/packages/dispatcher/tsconfig.json @@ -1,13 +1,13 @@ { - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "./dist/esm", - "rootDir": "./src" - }, - "include": [ - "./src", - ], - "references": [ - { "path": "../core" }, - ] + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist/esm" + }, + "references": [ + { "path": "../core" } + ], + "include": [ + "./src" + ] } diff --git a/packages/file-id/package.json b/packages/file-id/package.json index f75412a1..1e4612ab 100644 --- a/packages/file-id/package.json +++ b/packages/file-id/package.json @@ -1,23 +1,23 @@ { - "name": "@mtcute/file-id", - "private": true, - "version": "0.16.0", - "description": "Support for TDLib and Bot API file ID for mtcute", - "author": "alina sireneva ", - "license": "MIT", - "type": "module", - "sideEffects": false, - "scripts": { - "build": "pnpm run -w build-package file-id" - }, - "exports": { - ".": "./src/index.ts" - }, - "dependencies": { - "@mtcute/tl-runtime": "workspace:^", - "long": "5.2.3" - }, - "devDependencies": { - "@mtcute/test": "workspace:^" - } + "name": "@mtcute/file-id", + "type": "module", + "version": "0.16.0", + "private": true, + "description": "Support for TDLib and Bot API file ID for mtcute", + "author": "alina sireneva ", + "license": "MIT", + "sideEffects": false, + "exports": { + ".": "./src/index.ts" + }, + "scripts": { + "build": "pnpm run -w build-package file-id" + }, + "dependencies": { + "@mtcute/tl-runtime": "workspace:^", + "long": "5.2.3" + }, + "devDependencies": { + "@mtcute/test": "workspace:^" + } } diff --git a/packages/file-id/src/parse.test.ts b/packages/file-id/src/parse.test.ts index 47664620..87db9db3 100644 --- a/packages/file-id/src/parse.test.ts +++ b/packages/file-id/src/parse.test.ts @@ -1,6 +1,5 @@ import Long from 'long' import { describe, expect, it } from 'vitest' - import { defaultPlatform } from '@mtcute/test' import { parseFileId } from './parse.js' diff --git a/packages/file-id/src/parse.ts b/packages/file-id/src/parse.ts index cc1209a8..8763af51 100644 --- a/packages/file-id/src/parse.ts +++ b/packages/file-id/src/parse.ts @@ -1,4 +1,5 @@ -import { ITlPlatform, TlBinaryReader } from '@mtcute/tl-runtime' +import type { ITlPlatform } from '@mtcute/tl-runtime' +import { TlBinaryReader } from '@mtcute/tl-runtime' import { tdFileId as td } from './types.js' import { telegramRleDecode } from './utils.js' @@ -249,10 +250,10 @@ function fromPersistentIdV23(platform: ITlPlatform, binary: Uint8Array, version: switch (location.source._) { case 'thumbnail': if ( - location.source.fileType !== fileType || - (fileType !== td.FileType.Photo && - fileType !== td.FileType.Thumbnail && - fileType !== td.FileType.EncryptedThumbnail) + location.source.fileType !== fileType + || (fileType !== td.FileType.Photo + && fileType !== td.FileType.Thumbnail + && fileType !== td.FileType.EncryptedThumbnail) ) { throw new td.InvalidFileIdError('Invalid FileType in PhotoRemoteFileLocation Thumbnail') } diff --git a/packages/file-id/src/serialize-unique.test.ts b/packages/file-id/src/serialize-unique.test.ts index a8a64115..9ef927f7 100644 --- a/packages/file-id/src/serialize-unique.test.ts +++ b/packages/file-id/src/serialize-unique.test.ts @@ -1,5 +1,4 @@ import { describe, expect, it } from 'vitest' - import { defaultPlatform } from '@mtcute/test' import { parseFileId } from './parse.js' diff --git a/packages/file-id/src/serialize-unique.ts b/packages/file-id/src/serialize-unique.ts index 2eebf8a6..220e3036 100644 --- a/packages/file-id/src/serialize-unique.ts +++ b/packages/file-id/src/serialize-unique.ts @@ -1,12 +1,13 @@ -import { ITlPlatform, TlBinaryWriter } from '@mtcute/tl-runtime' +import type { ITlPlatform } from '@mtcute/tl-runtime' +import { TlBinaryWriter } from '@mtcute/tl-runtime' import { tdFileId as td } from './types.js' import { assertNever, telegramRleEncode } from './utils.js' export type InputUniqueLocation = - | Pick - | Pick - | Pick + | Pick + | Pick + | Pick /** * Serialize an object with information about file diff --git a/packages/file-id/src/serialize.ts b/packages/file-id/src/serialize.ts index b7294316..07ee7da0 100644 --- a/packages/file-id/src/serialize.ts +++ b/packages/file-id/src/serialize.ts @@ -1,4 +1,5 @@ -import { ITlPlatform, TlBinaryWriter } from '@mtcute/tl-runtime' +import type { ITlPlatform } from '@mtcute/tl-runtime' +import { TlBinaryWriter } from '@mtcute/tl-runtime' import { tdFileId as td } from './types.js' import { assertNever, telegramRleEncode } from './utils.js' diff --git a/packages/file-id/src/types-inner.ts b/packages/file-id/src/types-inner.ts index 6d2b5c03..0270f12c 100644 --- a/packages/file-id/src/types-inner.ts +++ b/packages/file-id/src/types-inner.ts @@ -1,10 +1,10 @@ -import Long from 'long' +import type Long from 'long' export const PERSISTENT_ID_VERSION_OLD = 2 export const PERSISTENT_ID_VERSION = 4 -export const WEB_LOCATION_FLAG = 1 << 24 -export const FILE_REFERENCE_FLAG = 1 << 25 +export const WEB_LOCATION_FLAG: number = 1 << 24 +export const FILE_REFERENCE_FLAG: number = 1 << 25 export const CURRENT_VERSION = 48 @@ -149,14 +149,14 @@ export interface RawPhotoSizeSourceStickerSetThumbnailVersion extends Omit", - "license": "MIT", - "type": "module", - "sideEffects": false, - "scripts": { - "build": "pnpm run -w build-package html-parser" - }, - "exports": "./src/index.ts", - "dependencies": { - "htmlparser2": "^6.0.1", - "long": "5.2.3", - "@mtcute/core": "workspace:^" - } + "name": "@mtcute/html-parser", + "type": "module", + "version": "0.16.0", + "private": true, + "description": "HTML entities parser for mtcute", + "author": "alina sireneva ", + "license": "MIT", + "sideEffects": false, + "exports": "./src/index.ts", + "scripts": { + "build": "pnpm run -w build-package html-parser" + }, + "dependencies": { + "@mtcute/core": "workspace:^", + "htmlparser2": "^6.0.1", + "long": "5.2.3" + } } diff --git a/packages/html-parser/src/html-parser.test.ts b/packages/html-parser/src/html-parser.test.ts index f52bbc82..85c8735b 100644 --- a/packages/html-parser/src/html-parser.test.ts +++ b/packages/html-parser/src/html-parser.test.ts @@ -1,19 +1,15 @@ import Long from 'long' import { describe, expect, it } from 'vitest' - -import { MessageEntity, TextWithEntities, tl } from '@mtcute/core' +import type { TextWithEntities, tl } from '@mtcute/core' +import { MessageEntity } from '@mtcute/core' // prettier has "html" special-cased which breaks the formatting // this is not an issue when using normally, since we properly handle newlines/spaces, // but here we want to test everything as it is -import { html as htm, HtmlUnparseOptions } from './index.js' +import type { HtmlUnparseOptions } from './index.js' +import { html as htm } from './index.js' -const createEntity = ( - type: T, - offset: number, - length: number, - additional?: Omit, '_' | 'offset' | 'length'>, -): tl.TypeMessageEntity => { +function createEntity(type: T, offset: number, length: number, additional?: Omit, '_' | 'offset' | 'length'>): tl.TypeMessageEntity { return { _: type, offset, @@ -384,20 +380,20 @@ describe('HtmlMessageEntityParser', () => { `, [createEntity('messageEntityPre', 0, 203, { language: '' })], - '\n' + - indent + - 'this is some indented text\n' + - indent + - 'with newlines and\n' + - indent + - '\n' + - indent + - ' indented tags\n' + - indent + - ' yeah so cool\n' + - indent + - '\n' + - indent, + `\n${ + indent + }this is some indented text\n${ + indent + }with newlines and\n${ + indent + }\n${ + indent + } indented tags\n${ + indent + } yeah so cool\n${ + indent + }\n${ + indent}`, ) }) diff --git a/packages/html-parser/src/index.ts b/packages/html-parser/src/index.ts index 4ecfe666..d5d16861 100644 --- a/packages/html-parser/src/index.ts +++ b/packages/html-parser/src/index.ts @@ -1,6 +1,5 @@ import { Parser } from 'htmlparser2' import Long from 'long' - import type { InputText, MessageEntity, TextWithEntities, tl } from '@mtcute/core' const MENTION_REGEX = /^tg:\/\/user\?id=(\d+)(?:&hash=(-?[0-9a-fA-F]+)(?:&|$)|&|$)/ @@ -33,7 +32,7 @@ function parse( if (!pendingText.length) return if (!stacks.pre?.length && !keepWhitespace) { - pendingText = pendingText.replace(/[^\S\u00A0]+/gs, ' ') + pendingText = pendingText.replace(/[^\S\u00A0]+/g, ' ') if (tagEnd) pendingText = pendingText.trimEnd() @@ -152,7 +151,7 @@ function parse( const mention = MENTION_REGEX.exec(url) if (mention) { - const id = parseInt(mention[1]) + const id = Number.parseInt(mention[1]) const accessHash = mention[2] if (accessHash) { @@ -175,7 +174,7 @@ function parse( } } } else { - if (url.match(/^\/\//)) url = 'http:' + url + if (url.match(/^\/\//)) url = `http:${url}` entity = { _: 'messageEntityTextUrl', @@ -215,7 +214,6 @@ function parse( ontext(data) { pendingText += data }, - // eslint-disable-next-line @typescript-eslint/no-explicit-any }) // a hack for interpolating inside attributes @@ -249,10 +247,13 @@ function parse( if (isInsideAttrib) { let text: string - if (typeof it === 'string') text = it - else if (typeof it === 'number') text = it.toString() - else if (Long.isLong(it)) text = it.toString(10) - else { + if (typeof it === 'string') { + text = it + } else if (typeof it === 'number') { + text = it.toString() + } else if (Long.isLong(it)) { + text = it.toString(10) + } else { // obviously we can't have entities inside attributes, so just use the text text = it.text } @@ -394,9 +395,9 @@ function _unparse( case 'messageEntityPre': html.push( `${ - params.syntaxHighlighter && entity.language ? - params.syntaxHighlighter(entityText, entity.language) : - entityText + params.syntaxHighlighter && entity.language + ? params.syntaxHighlighter(entityText, entity.language) + : entityText }`, ) break diff --git a/packages/html-parser/tests/tsconfig.json b/packages/html-parser/tests/tsconfig.json index cfa0657b..ba289afc 100644 --- a/packages/html-parser/tests/tsconfig.json +++ b/packages/html-parser/tests/tsconfig.json @@ -1,9 +1,9 @@ { - "extends": "../../../tsconfig.json", - "include": [ - ".", - ], - "references": [ - { "path": "../" }, - ] + "extends": "../../../tsconfig.json", + "references": [ + { "path": "../" } + ], + "include": [ + "." + ] } diff --git a/packages/html-parser/tsconfig.json b/packages/html-parser/tsconfig.json index 6a5497ee..3b5437ec 100644 --- a/packages/html-parser/tsconfig.json +++ b/packages/html-parser/tsconfig.json @@ -1,13 +1,13 @@ { - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "./dist/esm", - "rootDir": "./src" - }, - "include": [ - "./src", - ], - "references": [ - { "path": "../core" } - ] + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist/esm" + }, + "references": [ + { "path": "../core" } + ], + "include": [ + "./src" + ] } diff --git a/packages/http-proxy/index.ts b/packages/http-proxy/index.ts index 1f363cd3..30bd4755 100644 --- a/packages/http-proxy/index.ts +++ b/packages/http-proxy/index.ts @@ -1,7 +1,9 @@ -import { connect as connectTcp } from 'net' -import { connect as connectTls, SecureContextOptions } from 'tls' +import { connect as connectTcp } from 'node:net' +import type { SecureContextOptions } from 'node:tls' +import { connect as connectTls } from 'node:tls' -import { BaseTcpTransport, IntermediatePacketCodec, MtcuteError, NodePlatform, tl, TransportState } from '@mtcute/node' +import type { tl } from '@mtcute/node' +import { BaseTcpTransport, IntermediatePacketCodec, MtcuteError, NodePlatform, TransportState } from '@mtcute/node' /** * An error has occurred while connecting to an HTTP(s) proxy @@ -77,17 +79,17 @@ export abstract class BaseHttpProxyTcpTransport extends BaseTcpTransport { } if (!this.packetCodecInitialized) { - this._packetCodec.on('error', (err) => this.emit('error', err)) - this._packetCodec.on('packet', (buf) => this.emit('message', buf)) + this._packetCodec.on('error', err => this.emit('error', err)) + this._packetCodec.on('packet', buf => this.emit('message', buf)) this.packetCodecInitialized = true } this._state = TransportState.Connecting this._currentDc = dc - this._socket = this._proxy.tls ? - connectTls(this._proxy.port, this._proxy.host, this._proxy.tlsOptions, this._onProxyConnected.bind(this)) : - connectTcp(this._proxy.port, this._proxy.host, this._onProxyConnected.bind(this)) + this._socket = this._proxy.tls + ? connectTls(this._proxy.port, this._proxy.host, this._proxy.tlsOptions, this._onProxyConnected.bind(this)) + : connectTcp(this._proxy.port, this._proxy.host, this._onProxyConnected.bind(this)) this._socket.on('error', this.handleError.bind(this)) this._socket.on('close', this.close.bind(this)) @@ -108,14 +110,14 @@ export abstract class BaseHttpProxyTcpTransport extends BaseTcpTransport { let auth = this._proxy.user if (this._proxy.password) { - auth += ':' + this._proxy.password + auth += `:${this._proxy.password}` } - headers['Proxy-Authorization'] = 'Basic ' + this._platform.base64Encode(this._platform.utf8Encode(auth)) + headers['Proxy-Authorization'] = `Basic ${this._platform.base64Encode(this._platform.utf8Encode(auth))}` } headers['Proxy-Connection'] = 'Keep-Alive' const headersStr = Object.keys(headers) - .map((k) => `\r\n${k}: ${headers[k]}`) + .map(k => `\r\n${k}: ${headers[k]}`) .join('') const packet = `CONNECT ${ip} HTTP/1.1${headersStr}\r\n\r\n` @@ -145,7 +147,7 @@ export abstract class BaseHttpProxyTcpTransport extends BaseTcpTransport { } // all ok, connection established, can now call handleConnect - this._socket!.on('data', (data) => this._packetCodec.feed(data)) + this._socket!.on('data', data => this._packetCodec.feed(data)) this.handleConnect() }) } @@ -158,5 +160,5 @@ export abstract class BaseHttpProxyTcpTransport extends BaseTcpTransport { * (unless you want to use a custom codec). */ export class HttpProxyTcpTransport extends BaseHttpProxyTcpTransport { - _packetCodec = new IntermediatePacketCodec() + _packetCodec: IntermediatePacketCodec = new IntermediatePacketCodec() } diff --git a/packages/http-proxy/package.json b/packages/http-proxy/package.json index e345ba9c..7b8a2f37 100644 --- a/packages/http-proxy/package.json +++ b/packages/http-proxy/package.json @@ -1,18 +1,18 @@ { - "name": "@mtcute/http-proxy", - "private": true, - "version": "0.16.0", - "description": "HTTP(S) proxy support for mtcute", - "author": "alina sireneva ", - "license": "MIT", - "type": "module", - "sideEffects": false, - "scripts": { - "docs": "typedoc", - "build": "pnpm run -w build-package http-proxy" - }, - "exports": "./index.ts", - "dependencies": { - "@mtcute/node": "workspace:^" - } + "name": "@mtcute/http-proxy", + "type": "module", + "version": "0.16.0", + "private": true, + "description": "HTTP(S) proxy support for mtcute", + "author": "alina sireneva ", + "license": "MIT", + "sideEffects": false, + "exports": "./index.ts", + "scripts": { + "docs": "typedoc", + "build": "pnpm run -w build-package http-proxy" + }, + "dependencies": { + "@mtcute/node": "workspace:^" + } } diff --git a/packages/http-proxy/tsconfig.json b/packages/http-proxy/tsconfig.json index e2709ab7..23cc8889 100644 --- a/packages/http-proxy/tsconfig.json +++ b/packages/http-proxy/tsconfig.json @@ -1,13 +1,13 @@ { - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "./dist/esm" - }, - "include": [ - "./index.ts", - ], - "references": [ - { "path": "../core" }, - { "path": "../node" } - ] + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "./dist/esm" + }, + "references": [ + { "path": "../core" }, + { "path": "../node" } + ], + "include": [ + "./index.ts" + ] } diff --git a/packages/i18n/package.json b/packages/i18n/package.json index c40e9685..2dd46e61 100644 --- a/packages/i18n/package.json +++ b/packages/i18n/package.json @@ -1,24 +1,24 @@ { - "name": "@mtcute/i18n", - "private": true, - "version": "0.16.0", - "description": "I18n for mtcute", - "author": "alina sireneva ", - "license": "MIT", - "type": "module", - "sideEffects": false, - "scripts": { - "build": "pnpm run -w build-package i18n" - }, - "exports": "./src/index.ts", - "devDependencies": { - "@mtcute/core": "workspace:^", - "@mtcute/dispatcher": "workspace:^" - }, - "jsrOnlyFields": { - "dependencies": { - "@mtcute/core": "workspace:^", - "@mtcute/dispatcher": "workspace:^" - } + "name": "@mtcute/i18n", + "type": "module", + "version": "0.16.0", + "private": true, + "description": "I18n for mtcute", + "author": "alina sireneva ", + "license": "MIT", + "sideEffects": false, + "exports": "./src/index.ts", + "scripts": { + "build": "pnpm run -w build-package i18n" + }, + "devDependencies": { + "@mtcute/core": "workspace:^", + "@mtcute/dispatcher": "workspace:^" + }, + "jsrOnlyFields": { + "dependencies": { + "@mtcute/core": "workspace:^", + "@mtcute/dispatcher": "workspace:^" } + } } diff --git a/packages/i18n/src/index.ts b/packages/i18n/src/index.ts index c36841dc..6e5d8133 100644 --- a/packages/i18n/src/index.ts +++ b/packages/i18n/src/index.ts @@ -1,4 +1,4 @@ -import { I18nStrings, I18nValue, MtcuteI18nAdapter, MtcuteI18nFunction, OtherLanguageWrap } from './types.js' +import type { I18nStrings, I18nValue, MtcuteI18nAdapter, MtcuteI18nFunction, OtherLanguageWrap } from './types.js' import { createI18nStringsIndex, extractLanguageFromUpdate } from './utils.js' export * from './plurals/english.js' diff --git a/packages/i18n/src/plurals/english.ts b/packages/i18n/src/plurals/english.ts index 42cc5b0c..264b6ab2 100644 --- a/packages/i18n/src/plurals/english.ts +++ b/packages/i18n/src/plurals/english.ts @@ -1,4 +1,4 @@ -import { I18nValue, I18nValueDynamic } from '../types.js' +import type { I18nValue, I18nValueDynamic } from '../types.js' /** * Get an English ordinal suffix (st/nd/rd/th) for a given number. @@ -45,7 +45,7 @@ export function createPluralEnglish( } if (typeof one === 'string' && typeof many === 'string') { - // eslint-disable-next-line @typescript-eslint/no-unused-vars + // eslint-disable-next-line unused-imports/no-unused-vars return (n, ...args) => (n === 1 ? one : many) } @@ -57,5 +57,5 @@ export function createPluralEnglish( return (n, ...args) => (n === 1 ? one(n, ...args) : many) } - throw new TypeError() + throw new TypeError('Invalid arg types') } diff --git a/packages/i18n/src/plurals/russian.ts b/packages/i18n/src/plurals/russian.ts index 3a691a20..fae41f37 100644 --- a/packages/i18n/src/plurals/russian.ts +++ b/packages/i18n/src/plurals/russian.ts @@ -1,4 +1,4 @@ -import { I18nValue, I18nValueDynamic } from '../types.js' +import type { I18nValue, I18nValueDynamic } from '../types.js' /** * Pluralize a value by Russian rules diff --git a/packages/i18n/src/types.ts b/packages/i18n/src/types.ts index f2f77277..c78514e3 100644 --- a/packages/i18n/src/types.ts +++ b/packages/i18n/src/types.ts @@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ - import type { tl } from '@mtcute/core' type Values = T[keyof T] @@ -9,11 +7,11 @@ type SafeGet = T extends Record ? T[K] : never * Literal translated value, represented by (optionally formatted) string */ export type I18nValueLiteral = - | string - | { - readonly text: string - readonly entities?: tl.TypeMessageEntity[] - } + | string + | { + readonly text: string + readonly entities?: tl.TypeMessageEntity[] + } // ^ we're not using InputText from @mtcute/client because it's a type-only dependency // and may not be available at runtime, and we don't want it to be `any` @@ -80,8 +78,8 @@ export type OtherLanguageWrap = { [key in keyof Strings]?: Strings[key] extends I18nValue ? I18nValue : Strings[key] extends Record - ? OtherLanguageWrap - : never + ? OtherLanguageWrap + : never } /** * Wrapper type for i18n object containing strings for a language @@ -94,6 +92,6 @@ export type OtherLanguageWrapExhaustive = { [key in keyof Strings]: Strings[key] extends I18nValue ? I18nValue : Strings[key] extends Record - ? OtherLanguageWrapExhaustive - : never + ? OtherLanguageWrapExhaustive + : never } diff --git a/packages/i18n/src/utils.ts b/packages/i18n/src/utils.ts index 40eaabe0..9203c013 100644 --- a/packages/i18n/src/utils.ts +++ b/packages/i18n/src/utils.ts @@ -1,6 +1,6 @@ import type * as dispatcherNs from '@mtcute/dispatcher' -import { I18nStrings, I18nValue } from './types.js' +import type { I18nStrings, I18nValue } from './types.js' /** * Create an index of i18n strings delimited by "." @@ -15,7 +15,7 @@ export function createI18nStringsIndex(strings: I18nStrings): Record { fn: () => 'Hello', }, }, - plural: createPluralEnglish('a message', (n) => `${n} messages`), + plural: createPluralEnglish('a message', n => `${n} messages`), plural2: createPluralEnglish('a message', (n: number, s: string) => `${n} messages from ${s}`), plural3: (n: number) => `${n} ${pluralizeEnglish(n, 'message', 'messages')}`, } @@ -32,9 +32,9 @@ describe('i18n', () => { }, }, plural: createPluralRussian( - (n) => `${n} сообщение`, - (n) => `${n} сообщения`, - (n) => `${n === 0 ? 'нет' : n} сообщений`, + n => `${n} сообщение`, + n => `${n} сообщения`, + n => `${n === 0 ? 'нет' : n} сообщений`, ), } diff --git a/packages/i18n/tests/tsconfig.json b/packages/i18n/tests/tsconfig.json index cfa0657b..ba289afc 100644 --- a/packages/i18n/tests/tsconfig.json +++ b/packages/i18n/tests/tsconfig.json @@ -1,9 +1,9 @@ { - "extends": "../../../tsconfig.json", - "include": [ - ".", - ], - "references": [ - { "path": "../" }, - ] + "extends": "../../../tsconfig.json", + "references": [ + { "path": "../" } + ], + "include": [ + "." + ] } diff --git a/packages/i18n/tsconfig.json b/packages/i18n/tsconfig.json index 870bc27b..9f19a1fb 100644 --- a/packages/i18n/tsconfig.json +++ b/packages/i18n/tsconfig.json @@ -1,13 +1,13 @@ { - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "./dist/esm", - "rootDir": "./src" - }, - "include": [ - "./src", - ], - "references": [ - { "path": "../dispatcher" }, - ] + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist/esm" + }, + "references": [ + { "path": "../dispatcher" } + ], + "include": [ + "./src" + ] } diff --git a/packages/markdown-parser/README.md b/packages/markdown-parser/README.md index 76c69b58..6a371ed0 100644 --- a/packages/markdown-parser/README.md +++ b/packages/markdown-parser/README.md @@ -129,10 +129,10 @@ You can interpolate one of the following: - `number` - will be converted to string and appended to plain text as-is - `TextWithEntities` or `MessageEntity` - will add the text and its entities to the output. This is the type returned by `md` itself: ```ts - const bold = md`**bold**` - const text = md`Hello, ${bold}!` + const bold = md`**bold**` + const text = md`Hello, ${bold}!` ``` - falsy value (i.e. `null`, `undefined`, `false`) - will be ignored Because of interpolation, you almost never need to think about escaping anything, -since the values are not even parsed as Markdown, and are appended to the output as-is. \ No newline at end of file +since the values are not even parsed as Markdown, and are appended to the output as-is. diff --git a/packages/markdown-parser/package.json b/packages/markdown-parser/package.json index 6a343909..eac11caa 100644 --- a/packages/markdown-parser/package.json +++ b/packages/markdown-parser/package.json @@ -1,18 +1,18 @@ { - "name": "@mtcute/markdown-parser", - "private": true, - "version": "0.16.3", - "description": "Markdown entities parser for mtcute", - "author": "alina sireneva ", - "license": "MIT", - "type": "module", - "sideEffects": false, - "scripts": { - "build": "pnpm run -w build-package markdown-parser" - }, - "exports": "./src/index.ts", - "dependencies": { - "long": "5.2.3", - "@mtcute/core": "workspace:^" - } + "name": "@mtcute/markdown-parser", + "type": "module", + "version": "0.16.3", + "private": true, + "description": "Markdown entities parser for mtcute", + "author": "alina sireneva ", + "license": "MIT", + "sideEffects": false, + "exports": "./src/index.ts", + "scripts": { + "build": "pnpm run -w build-package markdown-parser" + }, + "dependencies": { + "@mtcute/core": "workspace:^", + "long": "5.2.3" + } } diff --git a/packages/markdown-parser/src/index.ts b/packages/markdown-parser/src/index.ts index 81d915a3..dae2e625 100644 --- a/packages/markdown-parser/src/index.ts +++ b/packages/markdown-parser/src/index.ts @@ -1,5 +1,4 @@ import Long from 'long' - import type { InputText, MessageEntity, TextWithEntities, tl } from '@mtcute/core' const MENTION_REGEX = /^tg:\/\/user\?id=(\d+)(?:&hash=(-?[0-9a-fA-F]+)(?:&|$)|&|$)/ @@ -22,7 +21,7 @@ const TO_BE_ESCAPED = /[*_\-~`[\\\]|]/g * > handles all `string`s passed to it automatically as plain text. */ function escape(str: string): string { - return str.replace(TO_BE_ESCAPED, (s) => '\\' + s) + return str.replace(TO_BE_ESCAPED, s => `\\${s}`) } /** @@ -39,7 +38,7 @@ function unparse(input: InputText): string { text = text.replace(TO_BE_ESCAPED, (s, pos: number) => { escaped.push(pos) - return '\\' + s + return `\\${s}` }) const hasEscaped = escaped.length > 0 @@ -101,7 +100,7 @@ function unparse(input: InputText): string { } startTag += '\n' - endTag = '\n' + TAG_PRE + endTag = `\n${TAG_PRE}` break case 'messageEntityTextUrl': startTag = '[' @@ -255,7 +254,7 @@ function parse( let m = url.match(MENTION_REGEX) if (m) { - const userId = parseInt(m[1]) + const userId = Number.parseInt(m[1]) const accessHash = m[2] if (accessHash) { @@ -273,7 +272,7 @@ function parse( (ent as tl.Mutable)._ = 'messageEntityCustomEmoji' ;(ent as tl.Mutable).documentId = Long.fromString(m[1]) } else { - if (url.match(/^\/\//)) url = 'http:' + url + if (url.match(/^\/\//)) url = `http:${url}` ;(ent as tl.Mutable)._ = 'messageEntityTextUrl' ;(ent as tl.Mutable).url = url } @@ -286,11 +285,10 @@ function parse( pos += 1 insideLink = true if (!('link' in stacks)) stacks.link = [] - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + // eslint-disable-next-line ts/no-unsafe-argument stacks.link.push({ offset: result.length, length: 0, - // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any) // other fields are added after the second part continue } diff --git a/packages/markdown-parser/src/markdown-parser.test.ts b/packages/markdown-parser/src/markdown-parser.test.ts index 71160aa1..61d9ec6c 100644 --- a/packages/markdown-parser/src/markdown-parser.test.ts +++ b/packages/markdown-parser/src/markdown-parser.test.ts @@ -1,17 +1,12 @@ import Long from 'long' import { describe, expect, it } from 'vitest' - -import { MessageEntity, TextWithEntities, tl } from '@mtcute/core' +import type { TextWithEntities, tl } from '@mtcute/core' +import { MessageEntity } from '@mtcute/core' // md is special cased in prettier, we don't want that here import { md as md_ } from './index.js' -const createEntity = ( - type: T, - offset: number, - length: number, - additional?: Omit, '_' | 'offset' | 'length'>, -): tl.TypeMessageEntity => { +function createEntity(type: T, offset: number, length: number, additional?: Omit, '_' | 'offset' | 'length'>): tl.TypeMessageEntity { return { _: type, offset, diff --git a/packages/markdown-parser/tsconfig.json b/packages/markdown-parser/tsconfig.json index 6a5497ee..3b5437ec 100644 --- a/packages/markdown-parser/tsconfig.json +++ b/packages/markdown-parser/tsconfig.json @@ -1,13 +1,13 @@ { - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "./dist/esm", - "rootDir": "./src" - }, - "include": [ - "./src", - ], - "references": [ - { "path": "../core" } - ] + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist/esm" + }, + "references": [ + { "path": "../core" } + ], + "include": [ + "./src" + ] } diff --git a/packages/mtproxy/fake-tls.ts b/packages/mtproxy/fake-tls.ts index b8cfbf5b..2c379260 100644 --- a/packages/mtproxy/fake-tls.ts +++ b/packages/mtproxy/fake-tls.ts @@ -1,16 +1,18 @@ /* eslint-disable no-restricted-globals */ -import { IPacketCodec, WrappedCodec } from '@mtcute/node' -import { bigIntModInv, bigIntModPow, bigIntToBuffer, bufferToBigInt, ICryptoProvider } from '@mtcute/node/utils.js' +import type { IPacketCodec } from '@mtcute/node' +import { WrappedCodec } from '@mtcute/node' +import type { ICryptoProvider } from '@mtcute/node/utils.js' +import { bigIntModInv, bigIntModPow, bigIntToBuffer, bufferToBigInt } from '@mtcute/node/utils.js' const MAX_TLS_PACKET_LENGTH = 2878 const TLS_FIRST_PREFIX = Buffer.from('140303000101', 'hex') // ref: https://github.com/tdlib/td/blob/master/td/mtproto/TlsInit.cpp -const KEY_MOD = 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedn +const KEY_MOD = 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEDn // 2^255 - 19 -const QUAD_RES_MOD = 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedn +const QUAD_RES_MOD = 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEDn // (mod - 1) / 2 = 2^254 - 10 -const QUAD_RES_POW = 0x3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6n +const QUAD_RES_POW = 0x3FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF6n function _getY2(x: bigint, mod: bigint): bigint { // returns y = x^3 + x^2 * 486662 + x @@ -45,14 +47,14 @@ function _isQuadraticResidue(a: bigint): boolean { } interface TlsOperationHandler { - string(buf: Buffer): void - zero(size: number): void - random(size: number): void - domain(): void - grease(seed: number): void - beginScope(): void - endScope(): void - key(): void + string: (buf: Buffer) => void + zero: (size: number) => void + random: (size: number) => void + domain: () => void + grease: (seed: number) => void + beginScope: () => void + endScope: () => void + key: () => void } function executeTlsOperations(h: TlsOperationHandler): void { @@ -148,7 +150,7 @@ function initGrease(crypto: ICryptoProvider, size: number): Buffer { const buf = crypto.randomBytes(size) for (let i = 0; i < size; i++) { - buf[i] = (buf[i] & 0xf0) + 0x0a + buf[i] = (buf[i] & 0xF0) + 0x0A } for (let i = 1; i < size; i += 2) { @@ -275,7 +277,7 @@ export async function generateFakeTlsHeader(domain: string, secret: Buffer, cryp * @internal */ export class FakeTlsPacketCodec extends WrappedCodec implements IPacketCodec { - protected _stream = Buffer.alloc(0) + protected _stream: Buffer = Buffer.alloc(0) private _header!: Buffer private _isFirstTls = true diff --git a/packages/mtproxy/index.ts b/packages/mtproxy/index.ts index b99c5d43..3dd5a548 100644 --- a/packages/mtproxy/index.ts +++ b/packages/mtproxy/index.ts @@ -1,18 +1,20 @@ /* eslint-disable no-restricted-globals */ // todo fixme -import { connect } from 'net' +import { connect } from 'node:net' +import type { + IPacketCodec, + tl, +} from '@mtcute/node' import { BaseTcpTransport, IntermediatePacketCodec, - IPacketCodec, - MtcuteError, MtSecurityError, MtUnsupportedError, + MtcuteError, ObfuscatedPacketCodec, PaddedIntermediatePacketCodec, - tl, TransportState, } from '@mtcute/node' import { buffersEqual } from '@mtcute/node/utils.js' @@ -81,10 +83,10 @@ export class MtProxyTcpTransport extends BaseTcpTransport { if (secret.length === 16) { this._rawSecret = secret - } else if (secret.length === 17 && secret[0] === 0xdd) { + } else if (secret.length === 17 && secret[0] === 0xDD) { this._rawSecret = secret.slice(1) this._randomPadding = true - } else if (secret.length >= 18 && secret[0] === 0xee) { + } else if (secret.length >= 18 && secret[0] === 0xEE) { this._rawSecret = secret.slice(1, 17) this._fakeTlsDomain = secret.slice(17).toString() } else { @@ -141,8 +143,8 @@ export class MtProxyTcpTransport extends BaseTcpTransport { } this._packetCodec.setup?.(this._crypto, this.log) - this._packetCodec.on('error', (err) => this.emit('error', err)) - this._packetCodec.on('packet', (buf) => this.emit('message', buf)) + this._packetCodec.on('error', err => this.emit('error', err)) + this._packetCodec.on('packet', buf => this.emit('message', buf)) } this._state = TransportState.Connecting @@ -153,7 +155,7 @@ export class MtProxyTcpTransport extends BaseTcpTransport { this._proxy.port, this._proxy.host, // MTQ-55 - // eslint-disable-next-line @typescript-eslint/no-misused-promises + // eslint-disable-next-line ts/no-misused-promises this._handleConnectFakeTls.bind(this), ) } else { @@ -164,7 +166,7 @@ export class MtProxyTcpTransport extends BaseTcpTransport { this.handleConnect.bind(this), ) - this._socket.on('data', (data) => this._packetCodec.feed(data)) + this._socket.on('data', data => this._packetCodec.feed(data)) } this._socket.on('error', this.handleError.bind(this)) this._socket.on('close', this.close.bind(this)) @@ -236,7 +238,7 @@ export class MtProxyTcpTransport extends BaseTcpTransport { return this.handleConnect() }) - .catch((err) => this._socket!.emit('error', err)) + .catch(err => this._socket!.emit('error', err)) } this._socket!.write(hello) diff --git a/packages/mtproxy/package.json b/packages/mtproxy/package.json index 6ec74c42..72c65903 100644 --- a/packages/mtproxy/package.json +++ b/packages/mtproxy/package.json @@ -1,18 +1,18 @@ { - "name": "@mtcute/mtproxy", - "private": true, - "version": "0.16.0", - "description": "MTProto proxy (MTProxy) support for mtcute", - "author": "alina sireneva ", - "license": "MIT", - "type": "module", - "sideEffects": false, - "scripts": { - "docs": "typedoc", - "build": "pnpm run -w build-package mtproxy" - }, - "exports": "./index.ts", - "dependencies": { - "@mtcute/node": "workspace:^" - } + "name": "@mtcute/mtproxy", + "type": "module", + "version": "0.16.0", + "private": true, + "description": "MTProto proxy (MTProxy) support for mtcute", + "author": "alina sireneva ", + "license": "MIT", + "sideEffects": false, + "exports": "./index.ts", + "scripts": { + "docs": "typedoc", + "build": "pnpm run -w build-package mtproxy" + }, + "dependencies": { + "@mtcute/node": "workspace:^" + } } diff --git a/packages/mtproxy/tsconfig.json b/packages/mtproxy/tsconfig.json index b33880ef..1f73ad25 100644 --- a/packages/mtproxy/tsconfig.json +++ b/packages/mtproxy/tsconfig.json @@ -1,14 +1,14 @@ { - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "./dist/esm", - }, - "include": [ - "./index.ts", - "./fake-tls.ts", - ], - "references": [ - { "path": "../core" }, - { "path": "../node" } - ] + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "./dist/esm" + }, + "references": [ + { "path": "../core" }, + { "path": "../node" } + ], + "include": [ + "./index.ts", + "./fake-tls.ts" + ] } diff --git a/packages/node/package.json b/packages/node/package.json index 140e0ba3..88d3fe86 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -1,30 +1,30 @@ { - "name": "@mtcute/node", - "private": true, - "version": "0.16.6", - "description": "Meta-package for Node.js", - "author": "alina sireneva ", - "license": "MIT", - "type": "module", - "sideEffects": false, - "scripts": { - "docs": "typedoc", - "build": "pnpm run -w build-package node" - }, - "exports": { - ".": "./src/index.ts", - "./utils.js": "./src/utils.ts", - "./methods.js": "./src/methods.ts" - }, - "dependencies": { - "@mtcute/core": "workspace:^", - "@mtcute/wasm": "workspace:^", - "@mtcute/markdown-parser": "workspace:^", - "@mtcute/html-parser": "workspace:^", - "better-sqlite3": "9.5.0" - }, - "devDependencies": { - "@mtcute/test": "workspace:^", - "@types/better-sqlite3": "7.6.4" - } + "name": "@mtcute/node", + "type": "module", + "version": "0.16.6", + "private": true, + "description": "Meta-package for Node.js", + "author": "alina sireneva ", + "license": "MIT", + "sideEffects": false, + "exports": { + ".": "./src/index.ts", + "./utils.js": "./src/utils.ts", + "./methods.js": "./src/methods.ts" + }, + "scripts": { + "docs": "typedoc", + "build": "pnpm run -w build-package node" + }, + "dependencies": { + "@mtcute/core": "workspace:^", + "@mtcute/html-parser": "workspace:^", + "@mtcute/markdown-parser": "workspace:^", + "@mtcute/wasm": "workspace:^", + "better-sqlite3": "9.5.0" + }, + "devDependencies": { + "@mtcute/test": "workspace:^", + "@types/better-sqlite3": "7.6.4" + } } diff --git a/packages/node/src/client.ts b/packages/node/src/client.ts index 84e8568d..354bf248 100644 --- a/packages/node/src/client.ts +++ b/packages/node/src/client.ts @@ -1,11 +1,15 @@ -import { createInterface, Interface as RlInterface } from 'readline' +import type { Interface as RlInterface } from 'node:readline' +import { createInterface } from 'node:readline' +import type { Readable } from 'node:stream' -import { FileDownloadLocation, FileDownloadParameters, ITelegramStorageProvider, PartialOnly, User } from '@mtcute/core' +import type { FileDownloadLocation, FileDownloadParameters, ITelegramStorageProvider, PartialOnly, User } from '@mtcute/core' +import type { + BaseTelegramClientOptions as BaseTelegramClientOptionsBase, + TelegramClientOptions, +} from '@mtcute/core/client.js' import { BaseTelegramClient as BaseTelegramClientBase, - BaseTelegramClientOptions as BaseTelegramClientOptionsBase, TelegramClient as TelegramClientBase, - TelegramClientOptions, } from '@mtcute/core/client.js' import { setPlatform } from '@mtcute/core/platform.js' @@ -18,18 +22,16 @@ import { TcpTransport } from './utils/tcp.js' export type { TelegramClientOptions } -// eslint-disable-next-line @typescript-eslint/no-explicit-any let nativeCrypto: any try { - /* eslint-disable @typescript-eslint/prefer-ts-expect-error, @typescript-eslint/ban-ts-comment */ - /* eslint-disable import/no-unresolved */ + /* eslint-disable ts/ban-ts-comment,ts/no-unsafe-assignment */ + // @ts-ignore not in deps // @esm-replace-import - nativeCrypto = (await import('@mtcute/crypto-node')).NodeNativeCryptoProvider // eslint-disable-line - /* eslint-enable @typescript-eslint/prefer-ts-expect-error, @typescript-eslint/ban-ts-comment */ - /* eslint-enable import/no-unresolved */ -} catch (e) {} + nativeCrypto = (await import('@mtcute/crypto-node')).NodeNativeCryptoProvider + /* eslint-enable ts/ban-ts-comment,ts/no-unsafe-assignment */ +} catch {} export interface BaseTelegramClientOptions extends PartialOnly, 'transport' | 'crypto'> { @@ -62,9 +64,9 @@ export class BaseTelegramClient extends BaseTelegramClientBase { transport: () => new TcpTransport(), ...opts, storage: - typeof opts.storage === 'string' ? - new SqliteStorage(opts.storage) : - opts.storage ?? new SqliteStorage('client.session'), + typeof opts.storage === 'string' + ? new SqliteStorage(opts.storage) + : opts.storage ?? new SqliteStorage('client.session'), }) } } @@ -105,7 +107,7 @@ export class TelegramClient extends TelegramClientBase { }) } - return new Promise((res) => this._rl?.question(text, res)) + return new Promise(res => this._rl?.question(text, res)) } close(): Promise { @@ -145,7 +147,7 @@ export class TelegramClient extends TelegramClientBase { this.start(params) .then(then) - .catch((err) => this.emitError(err)) + .catch(err => this.emitError(err)) } downloadToFile( @@ -156,7 +158,7 @@ export class TelegramClient extends TelegramClientBase { return downloadToFile(this, filename, location, params) } - downloadAsNodeStream(location: FileDownloadLocation, params?: FileDownloadParameters | undefined) { + downloadAsNodeStream(location: FileDownloadLocation, params?: FileDownloadParameters | undefined): Readable { return downloadAsNodeStream(this, location, params) } } diff --git a/packages/node/src/common-internals-node/exit-hook.ts b/packages/node/src/common-internals-node/exit-hook.ts index 8f1f4258..03466c51 100644 --- a/packages/node/src/common-internals-node/exit-hook.ts +++ b/packages/node/src/common-internals-node/exit-hook.ts @@ -4,7 +4,7 @@ let installed = false let handled = false const callbacks = new Set<() => void>() -// eslint-disable-next-line func-call-spacing + const myHandlers = new Map void>() function register(shouldManuallyExit: boolean, signal: number, event: string) { diff --git a/packages/node/src/common-internals-node/logging.ts b/packages/node/src/common-internals-node/logging.ts index 1f3dfae7..7eb7b4fb 100644 --- a/packages/node/src/common-internals-node/logging.ts +++ b/packages/node/src/common-internals-node/logging.ts @@ -1,16 +1,16 @@ const isTty = typeof process === 'object' && Boolean(process.stdout?.isTTY) -const BASE_FORMAT = isTty ? '%s [%s] [%s%s\x1b[0m] ' : '%s [%s] [%s] ' -const LEVEL_NAMES = isTty ? - [ +const BASE_FORMAT = isTty ? '%s [%s] [%s%s\x1B[0m] ' : '%s [%s] [%s] ' +const LEVEL_NAMES = isTty + ? [ '', // OFF - '\x1b[31mERR\x1b[0m', - '\x1b[33mWRN\x1b[0m', - '\x1b[34mINF\x1b[0m', - '\x1b[36mDBG\x1b[0m', - '\x1b[35mVRB\x1b[0m', - ] : - [ + '\x1B[31mERR\x1B[0m', + '\x1B[33mWRN\x1B[0m', + '\x1B[34mINF\x1B[0m', + '\x1B[36mDBG\x1B[0m', + '\x1B[35mVRB\x1B[0m', + ] + : [ '', // OFF 'ERR', 'WRN', @@ -18,15 +18,21 @@ const LEVEL_NAMES = isTty ? 'DBG', 'VRB', ] -const TAG_COLORS = [6, 2, 3, 4, 5, 1].map((i) => `\x1b[3${i};1m`) +const TAG_COLORS = [6, 2, 3, 4, 5, 1].map(i => `\x1B[3${i};1m`) /** @internal */ -export const defaultLoggingHandler = isTty ? - (color: number, level: number, tag: string, fmt: string, args: unknown[]): void => { +export const defaultLoggingHandler: ( + color: number, + level: number, + tag: string, + fmt: string, + args: unknown[] +) => void = isTty + ? (color: number, level: number, tag: string, fmt: string, args: unknown[]): void => { // eslint-disable-next-line no-console console.log(BASE_FORMAT + fmt, new Date().toISOString(), LEVEL_NAMES[level], TAG_COLORS[color], tag, ...args) - } : - (color: number, level: number, tag: string, fmt: string, args: unknown[]): void => { + } + : (color: number, level: number, tag: string, fmt: string, args: unknown[]): void => { // eslint-disable-next-line no-console console.log(BASE_FORMAT + fmt, new Date().toISOString(), LEVEL_NAMES[level], tag, ...args) } diff --git a/packages/node/src/common-internals-node/platform.ts b/packages/node/src/common-internals-node/platform.ts index f74035a5..df7079ff 100644 --- a/packages/node/src/common-internals-node/platform.ts +++ b/packages/node/src/common-internals-node/platform.ts @@ -1,8 +1,9 @@ -import * as os from 'os' +import * as os from 'node:os' -import { ICorePlatform } from '@mtcute/core/platform.js' +import type { ICorePlatform } from '@mtcute/core/platform.js' import { normalizeFile } from '../utils/normalize-file.js' + import { beforeExit } from './exit-hook.js' import { defaultLoggingHandler } from './logging.js' @@ -21,9 +22,9 @@ export class NodePlatform implements ICorePlatform { } getDefaultLogLevel(): number | null { - const envLogLevel = parseInt(process.env.MTCUTE_LOG_LEVEL ?? '') + const envLogLevel = Number.parseInt(process.env.MTCUTE_LOG_LEVEL ?? '') - if (!isNaN(envLogLevel)) { + if (!Number.isNaN(envLogLevel)) { return envLogLevel } @@ -34,9 +35,11 @@ export class NodePlatform implements ICorePlatform { utf8ByteLength(str: string): number { return Buffer.byteLength(str, 'utf8') } + utf8Encode(str: string): Uint8Array { return Buffer.from(str, 'utf8') } + utf8Decode(buf: Uint8Array): string { return toBuffer(buf).toString('utf8') } @@ -44,6 +47,7 @@ export class NodePlatform implements ICorePlatform { hexEncode(buf: Uint8Array): string { return toBuffer(buf).toString('hex') } + hexDecode(str: string): Uint8Array { return Buffer.from(str, 'hex') } @@ -58,6 +62,7 @@ export class NodePlatform implements ICorePlatform { return str } + base64Decode(string: string, url = false): Uint8Array { if (url && BUFFER_BASE64_URL_AVAILABLE) { return Buffer.from(string, 'base64url') diff --git a/packages/node/src/common-internals-node/readme.md b/packages/node/src/common-internals-node/readme.md index db7a5572..688abefa 100644 --- a/packages/node/src/common-internals-node/readme.md +++ b/packages/node/src/common-internals-node/readme.md @@ -1,2 +1,2 @@ this folder is for common code across `@mtcute/node` and `@mtcute/bun`. -it is symlinked into `@mtcute/bun` \ No newline at end of file +it is symlinked into `@mtcute/bun` diff --git a/packages/node/src/methods/download-file.ts b/packages/node/src/methods/download-file.ts index 5d90285e..c7c7f089 100644 --- a/packages/node/src/methods/download-file.ts +++ b/packages/node/src/methods/download-file.ts @@ -1,7 +1,8 @@ -import { createWriteStream, rmSync } from 'fs' -import { writeFile } from 'fs/promises' +import { createWriteStream, rmSync } from 'node:fs' +import { writeFile } from 'node:fs/promises' -import { FileDownloadLocation, FileDownloadParameters, FileLocation, ITelegramClient } from '@mtcute/core' +import type { FileDownloadLocation, FileDownloadParameters, ITelegramClient } from '@mtcute/core' +import { FileLocation } from '@mtcute/core' import { downloadAsIterable } from '@mtcute/core/methods.js' /** diff --git a/packages/node/src/methods/download-node-stream.ts b/packages/node/src/methods/download-node-stream.ts index 255131c0..05fa45f7 100644 --- a/packages/node/src/methods/download-node-stream.ts +++ b/packages/node/src/methods/download-node-stream.ts @@ -1,6 +1,6 @@ -import { Readable } from 'stream' +import type { Readable } from 'node:stream' -import { FileDownloadLocation, FileDownloadParameters, ITelegramClient } from '@mtcute/core' +import type { FileDownloadLocation, FileDownloadParameters, ITelegramClient } from '@mtcute/core' import { downloadAsStream } from '@mtcute/core/methods.js' import { webStreamToNode } from '../utils/stream-utils.js' diff --git a/packages/node/src/sqlite/driver.ts b/packages/node/src/sqlite/driver.ts index fcfc4cb7..29b0490c 100644 --- a/packages/node/src/sqlite/driver.ts +++ b/packages/node/src/sqlite/driver.ts @@ -1,6 +1,7 @@ -import sqlite3, { Options } from 'better-sqlite3' - -import { BaseSqliteStorageDriver, ISqliteDatabase } from '@mtcute/core' +import type { Options } from 'better-sqlite3' +import sqlite3 from 'better-sqlite3' +import type { ISqliteDatabase } from '@mtcute/core' +import { BaseSqliteStorageDriver } from '@mtcute/core' export interface SqliteStorageDriverOptions { /** @@ -24,7 +25,7 @@ export interface SqliteStorageDriverOptions { export class SqliteStorageDriver extends BaseSqliteStorageDriver { constructor( readonly filename = ':memory:', - readonly params?: SqliteStorageDriverOptions, + readonly params?: SqliteStorageDriverOptions | undefined, ) { super() } diff --git a/packages/node/src/sqlite/index.ts b/packages/node/src/sqlite/index.ts index 882b228d..f4fbb33c 100644 --- a/packages/node/src/sqlite/index.ts +++ b/packages/node/src/sqlite/index.ts @@ -1,13 +1,14 @@ import { BaseSqliteStorage } from '@mtcute/core' -import { SqliteStorageDriver, SqliteStorageDriverOptions } from './driver.js' +import type { SqliteStorageDriverOptions } from './driver.js' +import { SqliteStorageDriver } from './driver.js' export { SqliteStorageDriver } from './driver.js' export class SqliteStorage extends BaseSqliteStorage { constructor( readonly filename = ':memory:', - readonly params?: SqliteStorageDriverOptions, + readonly params?: SqliteStorageDriverOptions | undefined, ) { super(new SqliteStorageDriver(filename, params)) } diff --git a/packages/node/src/sqlite/sqlite.test.ts b/packages/node/src/sqlite/sqlite.test.ts index fe992683..4a356f39 100644 --- a/packages/node/src/sqlite/sqlite.test.ts +++ b/packages/node/src/sqlite/sqlite.test.ts @@ -1,5 +1,4 @@ import { afterAll, beforeAll, describe } from 'vitest' - import { LogManager } from '@mtcute/core/utils.js' import { testAuthKeysRepository, diff --git a/packages/node/src/utils/crypto.test.ts b/packages/node/src/utils/crypto.test.ts index ff24a70c..dc2e8bda 100644 --- a/packages/node/src/utils/crypto.test.ts +++ b/packages/node/src/utils/crypto.test.ts @@ -1,5 +1,4 @@ import { describe } from 'vitest' - import { testCryptoProvider } from '@mtcute/test' if (import.meta.env.TEST_ENV === 'node') { diff --git a/packages/node/src/utils/crypto.ts b/packages/node/src/utils/crypto.ts index 96709dfa..2415c726 100644 --- a/packages/node/src/utils/crypto.ts +++ b/packages/node/src/utils/crypto.ts @@ -1,10 +1,10 @@ -// eslint-disable-next-line no-restricted-imports -import { createCipheriv, createHash, createHmac, pbkdf2, randomFillSync } from 'crypto' -import { readFile } from 'fs/promises' -import { createRequire } from 'module' -import { deflateSync, gunzipSync } from 'zlib' +import { createCipheriv, createHash, createHmac, pbkdf2, randomFillSync } from 'node:crypto' +import { readFile } from 'node:fs/promises' +import { createRequire } from 'node:module' +import { deflateSync, gunzipSync } from 'node:zlib' -import { BaseCryptoProvider, IAesCtr, ICryptoProvider, IEncryptionScheme } from '@mtcute/core/utils.js' +import type { IAesCtr, ICryptoProvider, IEncryptionScheme } from '@mtcute/core/utils.js' +import { BaseCryptoProvider } from '@mtcute/core/utils.js' import { ige256Decrypt, ige256Encrypt, initSync } from '@mtcute/wasm' export abstract class BaseNodeCryptoProvider extends BaseCryptoProvider { @@ -27,8 +27,7 @@ export abstract class BaseNodeCryptoProvider extends BaseCryptoProvider { ): Promise { return new Promise((resolve, reject) => pbkdf2(password, salt, iterations, keylen, algo, (err: Error | null, buf: Uint8Array) => - err !== null ? reject(err) : resolve(buf), - ), + err !== null ? reject(err) : resolve(buf)), ) } @@ -51,7 +50,6 @@ export abstract class BaseNodeCryptoProvider extends BaseCryptoProvider { maxOutputLength: maxSize, }) // hot path, avoid additional runtime checks - // eslint-disable-next-line @typescript-eslint/no-explicit-any } catch (e: any) { if (e.code === 'ERR_BUFFER_TOO_LARGE') { return null @@ -65,7 +63,7 @@ export abstract class BaseNodeCryptoProvider extends BaseCryptoProvider { return gunzipSync(data) } - randomFill(buf: Uint8Array) { + randomFill(buf: Uint8Array): void { randomFillSync(buf) } } diff --git a/packages/node/src/utils/normalize-file.ts b/packages/node/src/utils/normalize-file.ts index 6259615c..3f8eb784 100644 --- a/packages/node/src/utils/normalize-file.ts +++ b/packages/node/src/utils/normalize-file.ts @@ -1,20 +1,24 @@ -import { createReadStream, ReadStream } from 'fs' -import { stat } from 'fs/promises' -import { basename } from 'path' -import { Readable } from 'stream' +import { ReadStream, createReadStream } from 'node:fs' +import { stat } from 'node:fs/promises' +import { basename } from 'node:path' +import { Readable } from 'node:stream' -import { UploadFileLike } from '@mtcute/core' +import type { UploadFileLike } from '@mtcute/core' import { nodeStreamToWeb } from './stream-utils.js' -export async function normalizeFile(file: UploadFileLike) { +export async function normalizeFile(file: UploadFileLike): Promise<{ + file: UploadFileLike + fileName?: string | undefined + fileSize?: number +} | null> { if (typeof file === 'string') { file = createReadStream(file) } if (file instanceof ReadStream) { const fileName = basename(file.path.toString()) - const fileSize = await stat(file.path.toString()).then((stat) => stat.size) + const fileSize = await stat(file.path.toString()).then(stat => stat.size) return { file: nodeStreamToWeb(file), diff --git a/packages/node/src/utils/stream-utils.test.ts b/packages/node/src/utils/stream-utils.test.ts index 20a747ea..8d163500 100644 --- a/packages/node/src/utils/stream-utils.test.ts +++ b/packages/node/src/utils/stream-utils.test.ts @@ -1,16 +1,16 @@ -import { Readable } from 'stream' +import { Readable } from 'node:stream' + import { describe, expect, it } from 'vitest' -import { nodeStreamToWeb, webStreamToNode } from './stream-utils.js' - if (import.meta.env.TEST_ENV === 'node' || import.meta.env.TEST_ENV === 'bun') { + const { nodeStreamToWeb, webStreamToNode } = await import('./stream-utils.js') + describe('nodeStreamToWeb', () => { it('should correctly convert a readable stream', async () => { const stream = new Readable({ read() { - // eslint-disable-next-line no-restricted-globals this.push(Buffer.from([1, 2, 3])) - // eslint-disable-next-line no-restricted-globals + this.push(Buffer.from([4, 5, 6])) this.push(null) }, diff --git a/packages/node/src/utils/stream-utils.ts b/packages/node/src/utils/stream-utils.ts index 532dddd3..f1e37d37 100644 --- a/packages/node/src/utils/stream-utils.ts +++ b/packages/node/src/utils/stream-utils.ts @@ -1,4 +1,4 @@ -import { Readable } from 'stream' +import { Readable } from 'node:stream' import { isNodeVersionAfter } from './version.js' @@ -31,8 +31,8 @@ export function nodeStreamToWeb(stream: Readable): ReadableStream { export function webStreamToNode(stream: ReadableStream): Readable { if ( - typeof Readable.fromWeb === 'function' && - isNodeVersionAfter(18, 13, 0) // https://github.com/nodejs/node/issues/42694 + typeof Readable.fromWeb === 'function' + && isNodeVersionAfter(18, 13, 0) // https://github.com/nodejs/node/issues/42694 ) { // @ts-expect-error node typings are wrong lmao return Readable.fromWeb(stream) diff --git a/packages/node/src/utils/tcp.test.ts b/packages/node/src/utils/tcp.test.ts index 88b71e3e..b42643bb 100644 --- a/packages/node/src/utils/tcp.test.ts +++ b/packages/node/src/utils/tcp.test.ts @@ -1,9 +1,10 @@ -import type { Socket } from 'net' -import { describe, expect, it, MockedObject, vi } from 'vitest' +import type { Socket } from 'node:net' +import type { MockedObject } from 'vitest' +import { describe, expect, it, vi } from 'vitest' import { TransportState } from '@mtcute/core' import { getPlatform } from '@mtcute/core/platform.js' -import { defaultProductionDc, LogManager } from '@mtcute/core/utils.js' +import { LogManager, defaultProductionDc } from '@mtcute/core/utils.js' if (import.meta.env.TEST_ENV === 'node') { vi.doMock('net', () => ({ @@ -22,7 +23,7 @@ if (import.meta.env.TEST_ENV === 'node') { }), })) - const net = await import('net') + const net = await import('node:net') const connect = vi.mocked(net.connect) const { TcpTransport } = await import('./tcp.js') @@ -122,7 +123,7 @@ if (import.meta.env.TEST_ENV === 'node') { const socket = getLastSocket() - const onDataCall = socket.on.mock.calls.find((c) => (c as string[])[0] === 'data') as unknown as [ + const onDataCall = socket.on.mock.calls.find(c => (c as string[])[0] === 'data') as unknown as [ string, (data: Uint8Array) => void, ] @@ -142,7 +143,7 @@ if (import.meta.env.TEST_ENV === 'node') { const socket = getLastSocket() - const onErrorCall = socket.on.mock.calls.find((c) => (c as string[])[0] === 'error') as unknown as [ + const onErrorCall = socket.on.mock.calls.find(c => (c as string[])[0] === 'error') as unknown as [ string, (error: Error) => void, ] diff --git a/packages/node/src/utils/tcp.ts b/packages/node/src/utils/tcp.ts index 56d952ba..8dafe64b 100644 --- a/packages/node/src/utils/tcp.ts +++ b/packages/node/src/utils/tcp.ts @@ -1,8 +1,10 @@ -import EventEmitter from 'events' -import { connect, Socket } from 'net' +import EventEmitter from 'node:events' +import type { Socket } from 'node:net' +import { connect } from 'node:net' -import { IntermediatePacketCodec, IPacketCodec, ITelegramTransport, MtcuteError, TransportState } from '@mtcute/core' -import { BasicDcOption, ICryptoProvider, Logger } from '@mtcute/core/utils.js' +import type { IPacketCodec, ITelegramTransport } from '@mtcute/core' +import { IntermediatePacketCodec, MtcuteError, TransportState } from '@mtcute/core' +import type { BasicDcOption, ICryptoProvider, Logger } from '@mtcute/core/utils.js' /** * Base for TCP transports. @@ -41,7 +43,7 @@ export abstract class BaseTcpTransport extends EventEmitter implements ITelegram return this._currentDc } - // eslint-disable-next-line @typescript-eslint/no-unused-vars + // eslint-disable-next-line unused-imports/no-unused-vars connect(dc: BasicDcOption, testMode: boolean): void { if (this._state !== TransportState.Idle) { throw new MtcuteError('Transport is not IDLE') @@ -49,8 +51,8 @@ export abstract class BaseTcpTransport extends EventEmitter implements ITelegram if (!this.packetCodecInitialized) { this._packetCodec.setup?.(this._crypto, this.log) - this._packetCodec.on('error', (err) => this.emit('error', err)) - this._packetCodec.on('packet', (buf) => this.emit('message', buf)) + this._packetCodec.on('error', err => this.emit('error', err)) + this._packetCodec.on('packet', buf => this.emit('message', buf)) this.packetCodecInitialized = true } @@ -111,7 +113,7 @@ export abstract class BaseTcpTransport extends EventEmitter implements ITelegram this.emit('ready') } }) - .catch((err) => this.emit('error', err)) + .catch(err => this.emit('error', err)) } async send(bytes: Uint8Array): Promise { @@ -134,5 +136,5 @@ export abstract class BaseTcpTransport extends EventEmitter implements ITelegram } export class TcpTransport extends BaseTcpTransport { - _packetCodec = new IntermediatePacketCodec() + _packetCodec: IntermediatePacketCodec = new IntermediatePacketCodec() } diff --git a/packages/node/src/utils/version.ts b/packages/node/src/utils/version.ts index 7911e03d..8f3ee833 100644 --- a/packages/node/src/utils/version.ts +++ b/packages/node/src/utils/version.ts @@ -1,5 +1,7 @@ -export const NODE_VERSION = typeof process !== 'undefined' && 'node' in process.versions ? process.versions.node : null -export const NODE_VERSION_TUPLE = NODE_VERSION ? /*#__PURE__*/ NODE_VERSION.split('.').map(Number) : null +export const NODE_VERSION: string | null + = typeof process !== 'undefined' && 'node' in process.versions ? process.versions.node : null +export const NODE_VERSION_TUPLE: number[] | null + = NODE_VERSION ? /* #__PURE__ */ NODE_VERSION.split('.').map(Number) : null export function isNodeVersionAfter(major: number, minor: number, patch: number): boolean { if (!NODE_VERSION_TUPLE) return true // assume non-node environment is always "after" diff --git a/packages/node/src/worker.ts b/packages/node/src/worker.ts index 0c953a52..cbffe1e8 100644 --- a/packages/node/src/worker.ts +++ b/packages/node/src/worker.ts @@ -1,18 +1,20 @@ -import { parentPort, Worker } from 'worker_threads' +import { Worker, parentPort } from 'node:worker_threads' import { setPlatform } from '@mtcute/core/platform.js' -import { +import type { ClientMessageHandler, RespondFn, SendFn, SomeWorker, - TelegramWorker as TelegramWorkerBase, TelegramWorkerOptions, - TelegramWorkerPort as TelegramWorkerPortBase, TelegramWorkerPortOptions, WorkerCustomMethods, WorkerMessageHandler, } from '@mtcute/core/worker.js' +import { + TelegramWorker as TelegramWorkerBase, + TelegramWorkerPort as TelegramWorkerPortBase, +} from '@mtcute/core/worker.js' import { NodePlatform } from './common-internals-node/platform.js' @@ -35,8 +37,8 @@ export class TelegramWorker extends TelegramWorke const respond: RespondFn = port.postMessage.bind(port) - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument - parentPort.on('message', (message) => handler(message, respond)) + // eslint-disable-next-line ts/no-unsafe-argument + parentPort.on('message', message => handler(message, respond)) return respond } @@ -50,7 +52,7 @@ export class TelegramWorkerPort extends TelegramW connectToWorker(worker: SomeWorker, handler: ClientMessageHandler): [SendFn, () => void] { if (!(worker instanceof Worker)) { - throw new Error('Only worker_threads are supported') + throw new TypeError('Only worker_threads are supported') } const send: SendFn = worker.postMessage.bind(worker) diff --git a/packages/node/tsconfig.json b/packages/node/tsconfig.json index c8886a87..85ff9406 100644 --- a/packages/node/tsconfig.json +++ b/packages/node/tsconfig.json @@ -1,16 +1,16 @@ { - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "./dist/esm", - "rootDir": "./src" - }, - "include": [ - "./src", - ], - "references": [ - { "path": "../core" }, - { "path": "../dispatcher" }, - { "path": "../html-parser" }, - { "path": "../markdown-parser" } - ] + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist/esm" + }, + "references": [ + { "path": "../core" }, + { "path": "../dispatcher" }, + { "path": "../html-parser" }, + { "path": "../markdown-parser" } + ], + "include": [ + "./src" + ] } diff --git a/packages/socks-proxy/index.ts b/packages/socks-proxy/index.ts index 2007f05d..67563e15 100644 --- a/packages/socks-proxy/index.ts +++ b/packages/socks-proxy/index.ts @@ -1,9 +1,9 @@ -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-expect-error -import { normalize } from 'ip6' -import { connect } from 'net' +import { connect } from 'node:net' -import { assertNever, BaseTcpTransport, IntermediatePacketCodec, MtArgumentError, NodePlatform, tl, TransportState } from '@mtcute/node' +// @ts-expect-error no typings +import { normalize } from 'ip6' +import type { tl } from '@mtcute/node' +import { BaseTcpTransport, IntermediatePacketCodec, MtArgumentError, NodePlatform, TransportState, assertNever } from '@mtcute/node' import { dataViewFromBuffer } from '@mtcute/node/utils.js' const p = new NodePlatform() @@ -59,9 +59,9 @@ function writeIpv4(ip: string, buf: Uint8Array, offset: number): void { throw new MtArgumentError('Invalid IPv4 address') } for (let i = 0; i < 4; i++) { - const n = parseInt(parts[i]) + const n = Number.parseInt(parts[i]) - if (isNaN(n) || n < 0 || n > 255) { + if (Number.isNaN(n) || n < 0 || n > 255) { throw new MtArgumentError('Invalid IPv4 address') } @@ -122,7 +122,7 @@ function buildSocks5Auth(username: string, password: string) { } function writeIpv6(ip: string, buf: Uint8Array, offset: number): void { - // eslint-disable-next-line @typescript-eslint/no-unsafe-call + // eslint-disable-next-line ts/no-unsafe-call ip = normalize(ip) as string const parts = ip.split(':') @@ -133,9 +133,9 @@ function writeIpv6(ip: string, buf: Uint8Array, offset: number): void { const dv = dataViewFromBuffer(buf) for (let i = 0, j = offset; i < 8; i++, j += 2) { - const n = parseInt(parts[i]) + const n = Number.parseInt(parts[i]) - if (isNaN(n) || n < 0 || n > 0xffff) { + if (Number.isNaN(n) || n < 0 || n > 0xFFFF) { throw new MtArgumentError('Invalid IPv6 address') } @@ -165,20 +165,20 @@ function buildSocks5Connect(ip: string, port: number, ipv6 = false): Uint8Array } const SOCKS4_ERRORS: Record = { - '91': 'Request rejected or failed', - '92': 'Request failed because client is not running identd', - '93': "Request failed because client's identd could not confirm the user ID in the request", + 91: 'Request rejected or failed', + 92: 'Request failed because client is not running identd', + 93: "Request failed because client's identd could not confirm the user ID in the request", } const SOCKS5_ERRORS: Record = { - '1': 'General failure', - '2': 'Connection not allowed by ruleset', - '3': 'Network unreachable', - '4': 'Host unreachable', - '5': 'Connection refused by destination host', - '6': 'TTL expired', - '7': 'Command not supported / protocol error', - '8': 'Address type not supported', + 1: 'General failure', + 2: 'Connection not allowed by ruleset', + 3: 'Network unreachable', + 4: 'Host unreachable', + 5: 'Connection refused by destination host', + 6: 'TTL expired', + 7: 'Command not supported / protocol error', + 8: 'Address type not supported', } /** @@ -193,7 +193,6 @@ export abstract class BaseSocksTcpTransport extends BaseTcpTransport { if (proxy.version != null && proxy.version !== 4 && proxy.version !== 5) { throw new SocksProxyConnectionError( proxy, - `Invalid SOCKS version: ${proxy.version}`, ) } @@ -207,8 +206,8 @@ export abstract class BaseSocksTcpTransport extends BaseTcpTransport { } if (!this.packetCodecInitialized) { - this._packetCodec.on('error', (err) => this.emit('error', err)) - this._packetCodec.on('packet', (buf) => this.emit('message', buf)) + this._packetCodec.on('error', err => this.emit('error', err)) + this._packetCodec.on('packet', buf => this.emit('message', buf)) this.packetCodecInitialized = true } @@ -239,13 +238,13 @@ export abstract class BaseSocksTcpTransport extends BaseTcpTransport { this.log.debug('[%s:%d] CONNECT returned code %d', this._proxy.host, this._proxy.port, code) - if (code === 0x5a) { + if (code === 0x5A) { this._socket!.off('data', packetHandler) - this._socket!.on('data', (data) => this._packetCodec.feed(data)) + this._socket!.on('data', data => this._packetCodec.feed(data)) this.handleConnect() } else { - const msg = - code in SOCKS4_ERRORS ? SOCKS4_ERRORS[code] : `Unknown error code: 0x${code.toString(16)}` + const msg + = code in SOCKS4_ERRORS ? SOCKS4_ERRORS[code] : `Unknown error code: 0x${code.toString(16)}` this._socket!.emit('error', new SocksProxyConnectionError(this._proxy, msg)) } } @@ -323,7 +322,7 @@ export abstract class BaseSocksTcpTransport extends BaseTcpTransport { this._socket!.emit('error', e) } break - case 0xff: + case 0xFF: default: // "no acceptable methods were offered" this._socket!.emit( @@ -380,13 +379,13 @@ export abstract class BaseSocksTcpTransport extends BaseTcpTransport { if (code === 0x00) { // Request granted this._socket!.off('data', packetHandler) - this._socket!.on('data', (data) => this._packetCodec.feed(data)) + this._socket!.on('data', data => this._packetCodec.feed(data)) this.handleConnect() } else { - const msg = - code in SOCKS5_ERRORS ? - SOCKS5_ERRORS[code] : - `Unknown error code: 0x${code.toString(16)}` + const msg + = code in SOCKS5_ERRORS + ? SOCKS5_ERRORS[code] + : `Unknown error code: 0x${code.toString(16)}` this._socket!.emit('error', new SocksProxyConnectionError(this._proxy, msg)) } break @@ -416,5 +415,5 @@ export abstract class BaseSocksTcpTransport extends BaseTcpTransport { * (unless you want to use a custom codec). */ export class SocksTcpTransport extends BaseSocksTcpTransport { - _packetCodec = new IntermediatePacketCodec() + _packetCodec: IntermediatePacketCodec = new IntermediatePacketCodec() } diff --git a/packages/socks-proxy/package.json b/packages/socks-proxy/package.json index 91d02874..c602cac7 100644 --- a/packages/socks-proxy/package.json +++ b/packages/socks-proxy/package.json @@ -1,19 +1,19 @@ { - "name": "@mtcute/socks-proxy", - "private": true, - "version": "0.16.0", - "description": "SOCKS4/5 proxy support for mtcute", - "author": "alina sireneva ", - "license": "MIT", - "type": "module", - "sideEffects": false, - "scripts": { - "docs": "typedoc", - "build": "pnpm run -w build-package socks-proxy" - }, - "exports": "./index.ts", - "dependencies": { - "@mtcute/node": "workspace:^", - "ip6": "0.2.7" - } + "name": "@mtcute/socks-proxy", + "type": "module", + "version": "0.16.0", + "private": true, + "description": "SOCKS4/5 proxy support for mtcute", + "author": "alina sireneva ", + "license": "MIT", + "sideEffects": false, + "exports": "./index.ts", + "scripts": { + "docs": "typedoc", + "build": "pnpm run -w build-package socks-proxy" + }, + "dependencies": { + "@mtcute/node": "workspace:^", + "ip6": "0.2.7" + } } diff --git a/packages/socks-proxy/tsconfig.json b/packages/socks-proxy/tsconfig.json index 29e70eda..23cc8889 100644 --- a/packages/socks-proxy/tsconfig.json +++ b/packages/socks-proxy/tsconfig.json @@ -3,11 +3,11 @@ "compilerOptions": { "outDir": "./dist/esm" }, - "include": [ - "./index.ts" - ], "references": [ { "path": "../core" }, { "path": "../node" } + ], + "include": [ + "./index.ts" ] } diff --git a/packages/test/package.json b/packages/test/package.json index d35c2886..a3f037e2 100644 --- a/packages/test/package.json +++ b/packages/test/package.json @@ -1,38 +1,38 @@ { - "name": "@mtcute/test", - "private": true, - "version": "0.16.5", - "description": "Test utilities for mtcute", - "author": "alina sireneva ", - "license": "MIT", - "type": "module", - "sideEffects": false, - "scripts": { - "build": "pnpm run -w build-package test" + "name": "@mtcute/test", + "type": "module", + "version": "0.16.5", + "private": true, + "description": "Test utilities for mtcute", + "author": "alina sireneva ", + "license": "MIT", + "sideEffects": false, + "exports": "./src/index.ts", + "scripts": { + "build": "pnpm run -w build-package test" + }, + "peerDependencies": { + "@mtcute/core": "workspace:^", + "@mtcute/node": "workspace:^", + "@mtcute/tl": "workspace:*", + "@mtcute/web": "workspace:^", + "vitest": "*" + }, + "peerDependenciesMeta": { + "@mtcute/node": { + "optional": true }, - "dependencies": { - "long": "5.2.3" - }, - "devDependencies": { - "@mtcute/tl-utils": "workspace:^" - }, - "peerDependencies": { - "@mtcute/core": "workspace:^", - "@mtcute/node": "workspace:^", - "@mtcute/web": "workspace:^", - "@mtcute/tl": "workspace:*", - "vitest": "^1.4.0" - }, - "peerDependenciesMeta": { - "@mtcute/node": { - "optional": true - }, - "@mtcute/web": { - "optional": true - } - }, - "browser": { - "./src/platform.js": "./src/platform.web.js" - }, - "exports": "./src/index.ts" + "@mtcute/web": { + "optional": true + } + }, + "dependencies": { + "long": "5.2.3" + }, + "devDependencies": { + "@mtcute/tl-utils": "workspace:^" + }, + "browser": { + "./src/platform.js": "./src/platform.web.js" + } } diff --git a/packages/test/src/client.test.ts b/packages/test/src/client.test.ts index 4df3d46e..974917d1 100644 --- a/packages/test/src/client.test.ts +++ b/packages/test/src/client.test.ts @@ -1,5 +1,4 @@ import { describe, expect, it } from 'vitest' - import { getPlatform } from '@mtcute/core/platform.js' import { StubTelegramClient } from './client.js' diff --git a/packages/test/src/client.ts b/packages/test/src/client.ts index e0874ac8..08650cf7 100644 --- a/packages/test/src/client.ts +++ b/packages/test/src/client.ts @@ -1,10 +1,12 @@ -import { MaybePromise, MustEqual, RpcCallOptions, tl } from '@mtcute/core' -import { BaseTelegramClient, BaseTelegramClientOptions } from '@mtcute/core/client.js' +import type { MaybePromise, MustEqual, RpcCallOptions } from '@mtcute/core' +import { tl } from '@mtcute/core' +import type { BaseTelegramClientOptions } from '@mtcute/core/client.js' +import { BaseTelegramClient } from '@mtcute/core/client.js' import { defaultCryptoProvider } from './platform.js' import { StubMemoryTelegramStorage } from './storage.js' import { StubTelegramTransport } from './transport.js' -import { InputResponder } from './types.js' +import type { InputResponder } from './types.js' import { markedIdToPeer } from './utils.js' interface MessageBox { @@ -59,7 +61,7 @@ export class StubTelegramClient extends BaseTelegramClient { * * Useful for testing "offline" methods */ - static offline() { + static offline(): StubTelegramClient { const client = new StubTelegramClient() client.call = (obj) => { @@ -77,7 +79,7 @@ export class StubTelegramClient extends BaseTelegramClient { static full() { const client = new StubTelegramClient() - // eslint-disable-next-line @typescript-eslint/no-unsafe-return + // eslint-disable-next-line ts/no-unsafe-return return new Proxy(client, { get(target, prop) { if (typeof prop === 'string' && !(prop in target)) { @@ -86,15 +88,14 @@ export class StubTelegramClient extends BaseTelegramClient { return target[prop as keyof typeof target] }, - // eslint-disable-next-line @typescript-eslint/no-explicit-any }) as any // i don't want to type this properly since it would require depending test utils on client } // some fake peers handling // - readonly _knownChats = new Map() - readonly _knownUsers = new Map() + readonly _knownChats: Map = new Map() + readonly _knownUsers: Map = new Map() _selfId = 0 async registerPeers(...peers: (tl.TypeUser | tl.TypeChat)[]): Promise { @@ -109,7 +110,7 @@ export class StubTelegramClient extends BaseTelegramClient { } } - getPeers(ids: InputPeerId[]) { + getPeers(ids: InputPeerId[]): { users: tl.TypeUser[], chats: tl.TypeChat[] } { const users: tl.TypeUser[] = [] const chats: tl.TypeChat[] = [] @@ -155,7 +156,6 @@ export class StubTelegramClient extends BaseTelegramClient { this._onRawMessage = fn } - // eslint-disable-next-line func-call-spacing private _responders = new Map unknown>() addResponder(responders: InputResponder): void { @@ -178,7 +178,9 @@ export class StubTelegramClient extends BaseTelegramClient { respondWith< T extends tl.RpcMethod['_'], Fn extends(data: tl.FindByName) => MaybePromise, - >(method: T, response: Fn): Fn { + >(method: T, + response: Fn, + ): Fn { // eslint-disable-next-line this._responders.set(method, response as any) @@ -217,7 +219,7 @@ export class StubTelegramClient extends BaseTelegramClient { return state } - getNextMessageId(chatId = 0) { + getNextMessageId(chatId = 0): number { const state = this.getMessageBox(chatId) const nextId = state.lastMessageId + 1 @@ -226,7 +228,7 @@ export class StubTelegramClient extends BaseTelegramClient { return nextId } - getNextPts(chatId = 0, count = 1) { + getNextPts(chatId = 0, count = 1): number { const state = this.getMessageBox(chatId) const nextPts = state.pts + count @@ -235,11 +237,11 @@ export class StubTelegramClient extends BaseTelegramClient { return nextPts } - getNextQts() { + getNextQts(): number { return this._lastQts++ } - getNextDate() { + getNextDate(): number { return (this._lastDate = Math.floor(Date.now() / 1000)) } @@ -301,7 +303,6 @@ export class StubTelegramClient extends BaseTelegramClient { await this.close() if (error) { - // eslint-disable-next-line @typescript-eslint/no-throw-literal throw error } } diff --git a/packages/test/src/crypto.ts b/packages/test/src/crypto.ts index 42d91799..eff3dd72 100644 --- a/packages/test/src/crypto.ts +++ b/packages/test/src/crypto.ts @@ -1,8 +1,10 @@ import { gzipSync, inflateSync } from 'node:zlib' -import { afterEach, beforeAll, beforeEach, describe, expect, it, MockInstance, vi } from 'vitest' +import type { MockInstance } from 'vitest' +import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from 'vitest' import { getPlatform } from '@mtcute/core/platform.js' -import { dataViewFromBuffer, ICryptoProvider } from '@mtcute/core/utils.js' +import type { ICryptoProvider } from '@mtcute/core/utils.js' +import { dataViewFromBuffer } from '@mtcute/core/utils.js' import { defaultCryptoProvider } from './platform.js' @@ -26,7 +28,7 @@ da91539fcc7b03d2b8b1381bd6023fff20278344ad944d364ba684842db3901c346335f0d455eda4 fa3de8e50aac96c1275591a1221c32a60a1513370a33a228e00894341b10cf44a6ae6ac250d17a364e956ab1a17b068df3fb2d5b5a672d8a409eeb8b6ca1ade6 `.replace(/\s/g, '') -export function withFakeRandom(provider: ICryptoProvider, source = DEFAULT_ENTROPY): ICryptoProvider { +export function withFakeRandom(provider: ICryptoProvider, source: string = DEFAULT_ENTROPY): ICryptoProvider { const sourceBytes = getPlatform().hexDecode(source) let offset = 0 @@ -43,23 +45,23 @@ export function withFakeRandom(provider: ICryptoProvider, source = DEFAULT_ENTRO get(target, prop, receiver) { if (prop === 'randomFill') return getRandomValues - // eslint-disable-next-line @typescript-eslint/no-unsafe-return + // eslint-disable-next-line ts/no-unsafe-return return Reflect.get(target, prop, receiver) }, }) } -export function useFakeMathRandom(source = DEFAULT_ENTROPY): void { +export function useFakeMathRandom(source: string = DEFAULT_ENTROPY): void { const sourceBytes = getPlatform().hexDecode(source) const dv = dataViewFromBuffer(sourceBytes) - let spy: MockInstance<[], number> + let spy: MockInstance<() => number> beforeEach(() => { let offset = 0 spy = vi.spyOn(globalThis.Math, 'random').mockImplementation(() => { - const ret = dv.getUint32(offset, true) / 0xffffffff + const ret = dv.getUint32(offset, true) / 0xFFFFFFFF offset += 4 return ret @@ -70,7 +72,7 @@ export function useFakeMathRandom(source = DEFAULT_ENTROPY): void { }) } -export async function defaultTestCryptoProvider(source = DEFAULT_ENTROPY): Promise { +export async function defaultTestCryptoProvider(source: string = DEFAULT_ENTROPY): Promise { const prov = withFakeRandom(defaultCryptoProvider, source) await prov.initialize?.() @@ -248,7 +250,7 @@ export function testCryptoProvider(c: ICryptoProvider): void { }) } -export function u8HexDecode(hex: string) { +export function u8HexDecode(hex: string): Uint8Array { const buf = getPlatform().hexDecode(hex) // eslint-disable-next-line no-restricted-globals diff --git a/packages/test/src/platform.test.ts b/packages/test/src/platform.test.ts index be282cfa..9de8cb0f 100644 --- a/packages/test/src/platform.test.ts +++ b/packages/test/src/platform.test.ts @@ -1,5 +1,4 @@ import { describe, expect, it } from 'vitest' - import { getPlatform } from '@mtcute/core/platform.js' const p = getPlatform() diff --git a/packages/test/src/platform.ts b/packages/test/src/platform.ts index 7a43f98f..c1176a07 100644 --- a/packages/test/src/platform.ts +++ b/packages/test/src/platform.ts @@ -1,5 +1,5 @@ import { NodePlatform } from '@mtcute/node' import { NodeCryptoProvider } from '@mtcute/node/utils.js' -export const defaultPlatform = new NodePlatform() -export const defaultCryptoProvider = new NodeCryptoProvider() +export const defaultPlatform: NodePlatform = new NodePlatform() +export const defaultCryptoProvider: NodeCryptoProvider = new NodeCryptoProvider() diff --git a/packages/test/src/platform.web.ts b/packages/test/src/platform.web.ts index eea14331..32a10db3 100644 --- a/packages/test/src/platform.web.ts +++ b/packages/test/src/platform.web.ts @@ -1,4 +1,4 @@ import { WebCryptoProvider, WebPlatform } from '@mtcute/web' -export const defaultPlatform = new WebPlatform() -export const defaultCryptoProvider = new WebCryptoProvider() +export const defaultPlatform: WebPlatform = new WebPlatform() +export const defaultCryptoProvider: WebCryptoProvider = new WebCryptoProvider() diff --git a/packages/test/src/schema.ts b/packages/test/src/schema.ts index 61f17567..f38c62b8 100644 --- a/packages/test/src/schema.ts +++ b/packages/test/src/schema.ts @@ -1,14 +1,16 @@ import * as schema_ from '@mtcute/tl/api-schema.json' assert { type: 'json' } +import type { TlEntry } from '@mtcute/tl-utils' const schema = ('default' in schema_ ? schema_.default : schema_) as { e: TlEntry[] } -import type { TlEntry } from '@mtcute/tl-utils' - let _cachedEntriesMap: Map | null = null let _cachedUnionsMap: Map | null = null /** @internal */ -export function getEntriesMap() { +export function getEntriesMap(): { + entries: Map + unions: Map +} { if (_cachedEntriesMap) { return { entries: _cachedEntriesMap, diff --git a/packages/test/src/storage.ts b/packages/test/src/storage.ts index a776faff..e10142b6 100644 --- a/packages/test/src/storage.ts +++ b/packages/test/src/storage.ts @@ -1,5 +1,6 @@ import { MemoryStorage, MtArgumentError } from '@mtcute/core' -import { createAesIgeForMessage, ICryptoProvider } from '@mtcute/core/utils.js' +import type { ICryptoProvider } from '@mtcute/core/utils.js' +import { createAesIgeForMessage } from '@mtcute/core/utils.js' export class StubMemoryTelegramStorage extends MemoryStorage { constructor( @@ -51,7 +52,12 @@ export class StubMemoryTelegramStorage extends MemoryStorage { } } - decryptOutgoingMessage(crypto: ICryptoProvider, data: Uint8Array, dcId: number, tempIndex?: number | undefined) { + decryptOutgoingMessage( + crypto: ICryptoProvider, + data: Uint8Array, + dcId: number, + tempIndex?: number | undefined, + ): Uint8Array { const key = tempIndex ? this.authKeys.getTemp(dcId, tempIndex, Date.now()) : this.authKeys.get(dcId) if (!key) { diff --git a/packages/test/src/storage/auth-keys.ts b/packages/test/src/storage/auth-keys.ts index 74c0510a..fc333630 100644 --- a/packages/test/src/storage/auth-keys.ts +++ b/packages/test/src/storage/auth-keys.ts @@ -1,6 +1,5 @@ import { afterEach, describe, expect, it, vi } from 'vitest' - -import { IAuthKeysRepository } from '@mtcute/core' +import type { IAuthKeysRepository } from '@mtcute/core' export function fakeAuthKeysRepository(): IAuthKeysRepository { return { @@ -20,7 +19,7 @@ function fixBuffer(buf: Uint8Array | null): Uint8Array | null { return typeof Buffer !== 'undefined' && buf instanceof Buffer ? new Uint8Array(buf) : buf } -export function testAuthKeysRepository(repo: IAuthKeysRepository) { +export function testAuthKeysRepository(repo: IAuthKeysRepository): void { const key2 = new Uint8Array(256).fill(0x42) const key3 = new Uint8Array(256).fill(0x43) diff --git a/packages/test/src/storage/key-value.ts b/packages/test/src/storage/key-value.ts index e2537c50..8f9ba345 100644 --- a/packages/test/src/storage/key-value.ts +++ b/packages/test/src/storage/key-value.ts @@ -1,6 +1,5 @@ import { afterEach, describe, expect, it, vi } from 'vitest' - -import { IKeyValueRepository, IStorageDriver } from '@mtcute/core' +import type { IKeyValueRepository, IStorageDriver } from '@mtcute/core' export function fakeKeyValueRepository(): IKeyValueRepository { return { @@ -18,7 +17,7 @@ function fixBuffer(buf: Uint8Array | null): Uint8Array | null { return typeof Buffer !== 'undefined' && buf instanceof Buffer ? new Uint8Array(buf) : buf } -export function testKeyValueRepository(repo: IKeyValueRepository, driver: IStorageDriver) { +export function testKeyValueRepository(repo: IKeyValueRepository, driver: IStorageDriver): void { describe('key-value', () => { afterEach(() => repo.deleteAll()) diff --git a/packages/test/src/storage/peers.ts b/packages/test/src/storage/peers.ts index 763c802b..e93a83b5 100644 --- a/packages/test/src/storage/peers.ts +++ b/packages/test/src/storage/peers.ts @@ -1,6 +1,5 @@ import { describe, expect, it, vi } from 'vitest' - -import { IPeersRepository, IStorageDriver } from '@mtcute/core' +import type { IPeersRepository, IStorageDriver } from '@mtcute/core' import { TlBinaryWriter } from '@mtcute/core/utils.js' import { __tlWriterMap } from '@mtcute/tl/binary/writer.js' @@ -23,13 +22,13 @@ function fixPeerInfo(peer: IPeersRepository.PeerInfo | null): IPeersRepository.P ...peer, complete: // eslint-disable-next-line no-restricted-globals - typeof Buffer !== 'undefined' && peer.complete instanceof Buffer ? - new Uint8Array(peer.complete) : - peer.complete, + typeof Buffer !== 'undefined' && peer.complete instanceof Buffer + ? new Uint8Array(peer.complete) + : peer.complete, } } -export function testPeersRepository(repo: IPeersRepository, driver: IStorageDriver) { +export function testPeersRepository(repo: IPeersRepository, driver: IStorageDriver): void { const stubPeerUser: IPeersRepository.PeerInfo = { id: 123123, accessHash: '123|456', diff --git a/packages/test/src/storage/ref-messages.ts b/packages/test/src/storage/ref-messages.ts index 785690f2..fb3ac812 100644 --- a/packages/test/src/storage/ref-messages.ts +++ b/packages/test/src/storage/ref-messages.ts @@ -1,6 +1,5 @@ import { afterEach, describe, expect, it, vi } from 'vitest' - -import { IReferenceMessagesRepository, IStorageDriver } from '@mtcute/core' +import type { IReferenceMessagesRepository, IStorageDriver } from '@mtcute/core' export function fakeRefMessagesRepository(): IReferenceMessagesRepository { return { @@ -12,7 +11,7 @@ export function fakeRefMessagesRepository(): IReferenceMessagesRepository { } } -export function testRefMessagesRepository(repo: IReferenceMessagesRepository, driver: IStorageDriver) { +export function testRefMessagesRepository(repo: IReferenceMessagesRepository, driver: IStorageDriver): void { describe('IReferenceMessagesRepository', () => { afterEach(() => repo.deleteAll()) diff --git a/packages/test/src/stub.ts b/packages/test/src/stub.ts index 3b374a8f..b2318926 100644 --- a/packages/test/src/stub.ts +++ b/packages/test/src/stub.ts @@ -1,6 +1,5 @@ import Long from 'long' - -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import type { TlArgument } from '@mtcute/tl-utils' import { getEntriesMap } from './schema.js' @@ -37,14 +36,13 @@ function getDefaultFor(arg: TlArgument): unknown { const union = getEntriesMap().unions.get(arg.type) if (!union) throw new Error(`Unknown type ${arg.type}`) - // eslint-disable-next-line @typescript-eslint/no-explicit-any return createStub(union[0].name) } } } -const snakeToCamel = (s: string): string => { - return s.replace(/(? { +function snakeToCamel(s: string): string { + return s.replace(/(? { return $1.substring(1).toUpperCase() }) } diff --git a/packages/test/src/transport.test.ts b/packages/test/src/transport.test.ts index e4523af9..abba0492 100644 --- a/packages/test/src/transport.test.ts +++ b/packages/test/src/transport.test.ts @@ -1,5 +1,4 @@ import { describe, expect, it, vi } from 'vitest' - import { MemoryStorage } from '@mtcute/core' import { BaseTelegramClient } from '@mtcute/core/client.js' diff --git a/packages/test/src/transport.ts b/packages/test/src/transport.ts index 562469d4..83e82c68 100644 --- a/packages/test/src/transport.ts +++ b/packages/test/src/transport.ts @@ -1,8 +1,9 @@ -import EventEmitter from 'events' +import EventEmitter from 'node:events' -import { ITelegramTransport, TransportState } from '@mtcute/core' -import { ICryptoProvider, Logger } from '@mtcute/core/utils.js' -import { tl } from '@mtcute/tl' +import type { ITelegramTransport } from '@mtcute/core' +import { TransportState } from '@mtcute/core' +import type { ICryptoProvider, Logger } from '@mtcute/core/utils.js' +import type { tl } from '@mtcute/tl' export class StubTelegramTransport extends EventEmitter implements ITelegramTransport { constructor( @@ -16,11 +17,11 @@ export class StubTelegramTransport extends EventEmitter implements ITelegramTran super() if (params.getMtproxyInfo) { - (this as ITelegramTransport).getMtproxyInfo = params.getMtproxyInfo + (this as unknown as ITelegramTransport).getMtproxyInfo = params.getMtproxyInfo } } - _state = TransportState.Idle + _state: TransportState = TransportState.Idle _currentDc: tl.RawDcOption | null = null _crypto!: ICryptoProvider _log!: Logger @@ -60,7 +61,6 @@ export class StubTelegramTransport extends EventEmitter implements ITelegramTran this.params.onClose?.() } - // eslint-disable-next-line @typescript-eslint/require-await async send(data: Uint8Array): Promise { this.params.onMessage?.(data) } diff --git a/packages/test/src/types.ts b/packages/test/src/types.ts index 1b6ce34e..359ff3f1 100644 --- a/packages/test/src/types.ts +++ b/packages/test/src/types.ts @@ -1,4 +1,4 @@ -import { tl } from '@mtcute/tl' +import type { tl } from '@mtcute/tl' import type { StubTelegramClient } from './client.js' @@ -8,6 +8,6 @@ export type Responder = [ ] export type ResponderFactory = (client: StubTelegramClient) => Responder export type InputResponder = - | Responder - | ResponderFactory - | InputResponder[] + | Responder + | ResponderFactory + | InputResponder[] diff --git a/packages/test/src/utils.ts b/packages/test/src/utils.ts index 63273995..7e88a20c 100644 --- a/packages/test/src/utils.ts +++ b/packages/test/src/utils.ts @@ -1,4 +1,5 @@ -import { parseMarkedPeerId, tl } from '@mtcute/core' +import type { tl } from '@mtcute/core' +import { parseMarkedPeerId } from '@mtcute/core' export function markedIdToPeer(id: number): tl.TypePeer { const [type, bareId] = parseMarkedPeerId(id) diff --git a/packages/test/tests/tsconfig.json b/packages/test/tests/tsconfig.json index cfa0657b..ba289afc 100644 --- a/packages/test/tests/tsconfig.json +++ b/packages/test/tests/tsconfig.json @@ -1,9 +1,9 @@ { - "extends": "../../../tsconfig.json", - "include": [ - ".", - ], - "references": [ - { "path": "../" }, - ] + "extends": "../../../tsconfig.json", + "references": [ + { "path": "../" } + ], + "include": [ + "." + ] } diff --git a/packages/test/tsconfig.json b/packages/test/tsconfig.json index ae547555..b7961074 100644 --- a/packages/test/tsconfig.json +++ b/packages/test/tsconfig.json @@ -1,13 +1,13 @@ { - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "./dist", - "rootDir": "./src", - }, - "include": [ - "./src", - ], - "references": [ - { "path": "../tl" } - ] + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist" + }, + "references": [ + { "path": "../tl" } + ], + "include": [ + "./src" + ] } diff --git a/packages/tl-runtime/README.md b/packages/tl-runtime/README.md index 652bc408..f51a4592 100644 --- a/packages/tl-runtime/README.md +++ b/packages/tl-runtime/README.md @@ -13,4 +13,4 @@ are patching the schema (which is a rare case anyways). ## Features - Supports all TL features used by the public schema - Uint8Array utilities like `hexDecode` -- Supports browsers out of the box \ No newline at end of file +- Supports browsers out of the box diff --git a/packages/tl-runtime/package.json b/packages/tl-runtime/package.json index e058b79f..d9bf915e 100644 --- a/packages/tl-runtime/package.json +++ b/packages/tl-runtime/package.json @@ -1,20 +1,20 @@ { - "name": "@mtcute/tl-runtime", - "private": true, - "version": "0.16.0", - "description": "Runtime for TL", - "author": "alina sireneva ", - "license": "MIT", - "type": "module", - "sideEffects": false, - "scripts": { - "docs": "typedoc", - "build": "pnpm run -w build-package tl-runtime" - }, - "exports": { - ".": "./src/index.ts" - }, - "dependencies": { - "long": "5.2.3" - } + "name": "@mtcute/tl-runtime", + "type": "module", + "version": "0.16.0", + "private": true, + "description": "Runtime for TL", + "author": "alina sireneva ", + "license": "MIT", + "sideEffects": false, + "exports": { + ".": "./src/index.ts" + }, + "scripts": { + "docs": "typedoc", + "build": "pnpm run -w build-package tl-runtime" + }, + "dependencies": { + "long": "5.2.3" + } } diff --git a/packages/tl-runtime/src/platform.ts b/packages/tl-runtime/src/platform.ts index ab14f994..c3cd104e 100644 --- a/packages/tl-runtime/src/platform.ts +++ b/packages/tl-runtime/src/platform.ts @@ -2,13 +2,13 @@ * Platform-specific functions used by {@link TlBinaryReader} and {@link TlBinaryWriter} */ export interface ITlPlatform { - utf8Encode(str: string): Uint8Array - utf8Decode(buf: Uint8Array): string - utf8ByteLength(str: string): number + utf8Encode: (str: string) => Uint8Array + utf8Decode: (buf: Uint8Array) => string + utf8ByteLength: (str: string) => number - hexEncode(buf: Uint8Array): string - hexDecode(str: string): Uint8Array + hexEncode: (buf: Uint8Array) => string + hexDecode: (str: string) => Uint8Array - base64Encode(buf: Uint8Array, url?: boolean): string - base64Decode(str: string, url?: boolean): Uint8Array + base64Encode: (buf: Uint8Array, url?: boolean) => string + base64Decode: (str: string, url?: boolean) => Uint8Array } diff --git a/packages/tl-runtime/src/reader.test.ts b/packages/tl-runtime/src/reader.test.ts index 390955e2..fbf924f8 100644 --- a/packages/tl-runtime/src/reader.test.ts +++ b/packages/tl-runtime/src/reader.test.ts @@ -1,20 +1,20 @@ -// eslint-disable-next-line max-len -/* eslint-disable @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-return,@typescript-eslint/no-unsafe-argument */ +/* eslint-disable ts/no-unsafe-call,ts/no-unsafe-assignment,ts/no-unsafe-return,ts/no-unsafe-argument */ // import Long from 'long' import Long from 'long' import { describe, expect, it } from 'vitest' -import { TlBinaryReader, TlReaderMap } from './reader.js' +import type { TlReaderMap } from './reader.js' +import { TlBinaryReader } from './reader.js' // todo: replace with platform-specific packages const hexEncode = (buf: Uint8Array) => buf.reduce((acc, val) => acc + val.toString(16).padStart(2, '0'), '') -const hexDecodeToBuffer = (hex: string) => new Uint8Array(hex.match(/.{1,2}/g)!.map((byte) => parseInt(byte, 16))) +const hexDecodeToBuffer = (hex: string) => new Uint8Array(hex.match(/.{1,2}/g)!.map(byte => Number.parseInt(byte, 16))) let randomBytes: (n: number) => Uint8Array if (import.meta.env.TEST_ENV === 'node' || import.meta.env.TEST_ENV === 'bun') { - randomBytes = await import('crypto').then((m) => m.randomBytes) + randomBytes = await import('node:crypto').then(m => m.randomBytes) } else { randomBytes = (n: number) => { const buf = new Uint8Array(n) @@ -29,14 +29,14 @@ describe('TlBinaryReader', () => { expect(TlBinaryReader.manual(new Uint8Array([0, 0, 0, 0])).int()).toEqual(0) expect(TlBinaryReader.manual(new Uint8Array([1, 0, 0, 0])).int()).toEqual(1) expect(TlBinaryReader.manual(new Uint8Array([1, 2, 3, 4])).int()).toEqual(67305985) - expect(TlBinaryReader.manual(new Uint8Array([0xff, 0xff, 0xff, 0xff])).int()).toEqual(-1) + expect(TlBinaryReader.manual(new Uint8Array([0xFF, 0xFF, 0xFF, 0xFF])).int()).toEqual(-1) }) it('should read uint32', () => { expect(TlBinaryReader.manual(new Uint8Array([0, 0, 0, 0])).uint()).toEqual(0) expect(TlBinaryReader.manual(new Uint8Array([1, 0, 0, 0])).uint()).toEqual(1) expect(TlBinaryReader.manual(new Uint8Array([1, 2, 3, 4])).uint()).toEqual(67305985) - expect(TlBinaryReader.manual(new Uint8Array([0xff, 0xff, 0xff, 0xff])).uint()).toEqual( + expect(TlBinaryReader.manual(new Uint8Array([0xFF, 0xFF, 0xFF, 0xFF])).uint()).toEqual( 4294967295, ) }) @@ -52,14 +52,14 @@ describe('TlBinaryReader', () => { ) expect( TlBinaryReader.manual( - new Uint8Array([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + new Uint8Array([0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]), ).int53(), ).toEqual(-1) }) it('should read long', () => { expect( - TlBinaryReader.manual(new Uint8Array([0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff])) + TlBinaryReader.manual(new Uint8Array([0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF])) .long() .toString(), ).toEqual('-1') @@ -69,22 +69,22 @@ describe('TlBinaryReader', () => { .toString(), ).toEqual('8671175386481439762') expect( - TlBinaryReader.manual(new Uint8Array([0x15, 0xc4, 0x15, 0xb5, 0xc4, 0x1c, 0x03, 0xa3])) + TlBinaryReader.manual(new Uint8Array([0x15, 0xC4, 0x15, 0xB5, 0xC4, 0x1C, 0x03, 0xA3])) .long() .toString(), ).toEqual('-6700480189419895787') }) it('should read float', () => { - expect(TlBinaryReader.manual(new Uint8Array([0, 0, 0x80, 0x3f])).float()).toBeCloseTo( + expect(TlBinaryReader.manual(new Uint8Array([0, 0, 0x80, 0x3F])).float()).toBeCloseTo( 1, 0.001, ) - expect(TlBinaryReader.manual(new Uint8Array([0xb6, 0xf3, 0x9d, 0x3f])).float()).toBeCloseTo( + expect(TlBinaryReader.manual(new Uint8Array([0xB6, 0xF3, 0x9D, 0x3F])).float()).toBeCloseTo( 1.234, 0.001, ) - expect(TlBinaryReader.manual(new Uint8Array([0xfa, 0x7e, 0x2a, 0x3f])).float()).toBeCloseTo( + expect(TlBinaryReader.manual(new Uint8Array([0xFA, 0x7E, 0x2A, 0x3F])).float()).toBeCloseTo( 0.666, 0.001, ) @@ -92,14 +92,14 @@ describe('TlBinaryReader', () => { it('should read double', () => { expect( - TlBinaryReader.manual(new Uint8Array([0, 0, 0, 0, 0, 0, 0xf0, 0x3f])).double(), + TlBinaryReader.manual(new Uint8Array([0, 0, 0, 0, 0, 0, 0xF0, 0x3F])).double(), ).toBeCloseTo(1, 0.001) expect( TlBinaryReader.manual(new Uint8Array([0, 0, 0, 0, 0, 0, 0x25, 0x40])).double(), ).toBeCloseTo(10.5, 0.001) expect( TlBinaryReader.manual( - new Uint8Array([0x9a, 0x99, 0x99, 0x99, 0x99, 0x99, 0x21, 0x40]), + new Uint8Array([0x9A, 0x99, 0x99, 0x99, 0x99, 0x99, 0x21, 0x40]), ).double(), ).toBeCloseTo(8.8, 0.001) }) @@ -160,37 +160,37 @@ describe('TlBinaryReader', () => { }) const stubObjectsMap: TlReaderMap = { - '3735928559': function (r) { + 3735928559(r) { return { a: r.int(), b: r.object() } }, - '3131949278': function (r) { + 3131949278(r) { return r.uint() }, - '4207861421': () => 42, - '3200191549': function (r) { + 4207861421: () => 42, + 3200191549(r) { return { vec: r.vector(r.uint) } }, } it('should read tg-encoded objects', () => { const buffer = new Uint8Array([ - 0xef, - 0xbe, - 0xad, - 0xde, // 0xdeadbeef object + 0xEF, + 0xBE, + 0xAD, + 0xDE, // 0xdeadbeef object /**/ 0x01, 0x00, 0x00, 0x00, // a = int32 1 - /**/ 0xad, - 0xde, - 0xce, - 0xfa, // b = 0xfacedead object (aka constant 42) + /**/ 0xAD, + 0xDE, + 0xCE, + 0xFA, // b = 0xfacedead object (aka constant 42) - 0xde, - 0xc0, - 0xad, - 0xba, // 0xbaadc0de object + 0xDE, + 0xC0, + 0xAD, + 0xBA, // 0xbaadc0de object /**/ 0x02, 0x00, 0x00, @@ -207,44 +207,44 @@ describe('TlBinaryReader', () => { it('should read tg-encoded vectors', () => { const buffer = new Uint8Array([ 0x15, - 0xc4, - 0xb5, - 0x1c, // 0x1cb5c415 object (vector) + 0xC4, + 0xB5, + 0x1C, // 0x1cb5c415 object (vector) /**/ 0x03, 0x00, 0x00, 0x00, // vector size (3) - /**/ 0xef, - 0xbe, - 0xad, - 0xde, // 0xdeadbeef object + /**/ 0xEF, + 0xBE, + 0xAD, + 0xDE, // 0xdeadbeef object /****/ 0x01, 0x00, 0x00, 0x00, // a = int32 1 - /****/ 0xad, - 0xde, - 0xce, - 0xfa, // 0xfacedead object (aka constant 42) + /****/ 0xAD, + 0xDE, + 0xCE, + 0xFA, // 0xfacedead object (aka constant 42) - /**/ 0xde, - 0xc0, - 0xad, - 0xba, // 0xbaadc0de object + /**/ 0xDE, + 0xC0, + 0xAD, + 0xBA, // 0xbaadc0de object /****/ 0x02, 0x00, 0x00, 0x00, // int32 2 - /**/ 0x3d, - 0x0c, - 0xbf, - 0xbe, // 0xbebf0c3d object + /**/ 0x3D, + 0x0C, + 0xBF, + 0xBE, // 0xbebf0c3d object /****/ 0x15, - 0xc4, - 0xb5, - 0x1c, // 0x1cb5c415 object (vector) + 0xC4, + 0xB5, + 0x1C, // 0x1cb5c415 object (vector) /******/ 0x02, 0x00, 0x00, @@ -271,11 +271,10 @@ describe('TlBinaryReader', () => { describe('examples from documentation', () => { // https://core.telegram.org/mtproto/samples-auth_key#2-a-response-from-the-server-has-been-received-with-the-following-content it('should be able to read resPQ', () => { - const input = - '000000000000000001c8831ec97ae55140000000632416053e0549828cca27e966b301a48fece2fca5cf4d33f4a11ea877ba4aa5739073300817ed48941a08f98100000015c4b51c01000000216be86c022bb4c3' + const input + = '000000000000000001c8831ec97ae55140000000632416053e0549828cca27e966b301a48fece2fca5cf4d33f4a11ea877ba4aa5739073300817ed48941a08f98100000015c4b51c01000000216be86c022bb4c3' const map: TlReaderMap = { - '85337187': function (r) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any + 85337187(r) { const ret: any = {} ret._ = 'mt_resPQ' ret.nonce = r.int128() @@ -299,7 +298,6 @@ describe('TlBinaryReader', () => { expect(r.long().toString(16)).toEqual('51E57AC91E83C801'.toLowerCase()) // messageId expect(r.uint()).toEqual(64) // messageLength - // eslint-disable-next-line @typescript-eslint/no-explicit-any const obj = r.object() as any expect(obj._).toEqual('mt_resPQ') expect(hexEncode(obj.nonce)).toEqual(hexEncode(expected.nonce)) diff --git a/packages/tl-runtime/src/reader.ts b/packages/tl-runtime/src/reader.ts index f0df3cb7..0a721bc8 100644 --- a/packages/tl-runtime/src/reader.ts +++ b/packages/tl-runtime/src/reader.ts @@ -1,6 +1,6 @@ import Long from 'long' -import { ITlPlatform } from './platform.js' +import type { ITlPlatform } from './platform.js' const TWO_PWR_32_DBL = (1 << 16) * (1 << 16) @@ -17,9 +17,7 @@ const TWO_PWR_32_DBL = (1 << 16) * (1 << 16) * - `0x56730bcc` aka `null` */ // avoid unnecessary type complexity -// eslint-disable-next-line @typescript-eslint/no-explicit-any export type TlReaderMap = Record unknown> & { - // eslint-disable-next-line @typescript-eslint/no-explicit-any _results?: Record unknown> } @@ -100,8 +98,8 @@ export class TlBinaryReader { int53(): number { // inlined toNumber from Long - const res = - (this.dataView.getInt32(this.pos, true) >>> 0) + TWO_PWR_32_DBL * this.dataView.getInt32(this.pos + 4, true) + const res = (this.dataView.getInt32(this.pos, true) >>> 0) + + TWO_PWR_32_DBL * this.dataView.getInt32(this.pos + 4, true) this.pos += 8 return res @@ -132,8 +130,8 @@ export class TlBinaryReader { boolean(): boolean { const val = this.uint() - if (val === 0xbc799737) return false - if (val === 0x997275b5) return true + if (val === 0xBC799737) return false + if (val === 0x997275B5) return true throw new Error(`Expected either boolTrue or boolFalse, got 0x${val.toString(16)}`) } @@ -178,16 +176,16 @@ export class TlBinaryReader { return TlBinaryReader.platform.utf8Decode(this.bytes()) } - object(id = this.uint()): unknown { - if (id === 0x1cb5c415 /* vector */) { + object(id: number = this.uint()): unknown { + if (id === 0x1CB5C415 /* vector */) { return this.vector(this.object, true) } - if (id === 0xbc799737 /* boolFalse */) return false - if (id === 0x997275b5 /* boolTrue */) return true + if (id === 0xBC799737 /* boolFalse */) return false + if (id === 0x997275B5 /* boolTrue */) return true // unsure if it is actually used in the wire, seems like it's only used for boolean flags - if (id === 0x3fedd339 /* true */) return true + if (id === 0x3FEDD339 /* true */) return true // never used in the actual schema, but whatever - if (id === 0x56730bcc /* null */) return null + if (id === 0x56730BCC /* null */) return null // hot path, avoid additional runtime checks @@ -206,11 +204,11 @@ export class TlBinaryReader { return reader(this) } - vector(reader = this.object, bare = false): unknown[] { + vector(reader: (id?: number) => unknown = this.object, bare = false): unknown[] { if (!bare) { const uint = this.uint() - if (uint !== 0x1cb5c415) { + if (uint !== 0x1CB5C415) { throw new Error( `Invalid object code, expected 0x1cb5c415 (vector), got 0x${uint.toString(16)} at ${this.pos - 4}`, ) diff --git a/packages/tl-runtime/src/writer.test.ts b/packages/tl-runtime/src/writer.test.ts index e1b6e71a..7d9878bf 100644 --- a/packages/tl-runtime/src/writer.test.ts +++ b/packages/tl-runtime/src/writer.test.ts @@ -1,17 +1,18 @@ -/* eslint-disable @typescript-eslint/no-unsafe-call */ +/* eslint-disable ts/no-unsafe-call */ import Long from 'long' import { describe, expect, it } from 'vitest' -import { TlBinaryWriter, TlSerializationCounter, TlWriterMap } from './writer.js' +import type { TlWriterMap } from './writer.js' +import { TlBinaryWriter, TlSerializationCounter } from './writer.js' // todo: replace with platform-specific packages const hexEncode = (buf: Uint8Array) => buf.reduce((acc, val) => acc + val.toString(16).padStart(2, '0'), '') -const hexDecodeToBuffer = (hex: string) => new Uint8Array(hex.match(/.{1,2}/g)!.map((byte) => parseInt(byte, 16))) +const hexDecodeToBuffer = (hex: string) => new Uint8Array(hex.match(/.{1,2}/g)!.map(byte => Number.parseInt(byte, 16))) let randomBytes: (n: number) => Uint8Array if (import.meta.env.TEST_ENV === 'node' || import.meta.env.TEST_ENV === 'bun') { - randomBytes = await import('crypto').then((m) => m.randomBytes) + randomBytes = await import('node:crypto').then(m => m.randomBytes) } else { randomBytes = (n: number) => { const buf = new Uint8Array(n) @@ -31,88 +32,88 @@ describe('TlBinaryWriter', () => { } it('should write int32', () => { - expect(testSingleMethod(4, (w) => w.int(0))).toEqual('00000000') - expect(testSingleMethod(4, (w) => w.int(1))).toEqual('01000000') - expect(testSingleMethod(4, (w) => w.int(67305985))).toEqual('01020304') - expect(testSingleMethod(4, (w) => w.int(-1))).toEqual('ffffffff') + expect(testSingleMethod(4, w => w.int(0))).toEqual('00000000') + expect(testSingleMethod(4, w => w.int(1))).toEqual('01000000') + expect(testSingleMethod(4, w => w.int(67305985))).toEqual('01020304') + expect(testSingleMethod(4, w => w.int(-1))).toEqual('ffffffff') }) it('should write uint32', () => { - expect(testSingleMethod(4, (w) => w.uint(0))).toEqual('00000000') - expect(testSingleMethod(4, (w) => w.uint(1))).toEqual('01000000') - expect(testSingleMethod(4, (w) => w.uint(67305985))).toEqual('01020304') - expect(testSingleMethod(4, (w) => w.uint(4294967295))).toEqual('ffffffff') + expect(testSingleMethod(4, w => w.uint(0))).toEqual('00000000') + expect(testSingleMethod(4, w => w.uint(1))).toEqual('01000000') + expect(testSingleMethod(4, w => w.uint(67305985))).toEqual('01020304') + expect(testSingleMethod(4, w => w.uint(4294967295))).toEqual('ffffffff') }) it('should write int53', () => { - expect(testSingleMethod(8, (w) => w.int53(0))).toEqual('0000000000000000') - expect(testSingleMethod(8, (w) => w.int53(1))).toEqual('0100000000000000') - expect(testSingleMethod(8, (w) => w.int53(67305985))).toEqual('0102030400000000') - expect(testSingleMethod(8, (w) => w.int53(281479271743489))).toEqual('0100010001000100') - expect(testSingleMethod(8, (w) => w.int53(-1))).toEqual('ffffffffffffffff') + expect(testSingleMethod(8, w => w.int53(0))).toEqual('0000000000000000') + expect(testSingleMethod(8, w => w.int53(1))).toEqual('0100000000000000') + expect(testSingleMethod(8, w => w.int53(67305985))).toEqual('0102030400000000') + expect(testSingleMethod(8, w => w.int53(281479271743489))).toEqual('0100010001000100') + expect(testSingleMethod(8, w => w.int53(-1))).toEqual('ffffffffffffffff') }) it('should write long', () => { - expect(testSingleMethod(8, (w) => w.long(Long.NEG_ONE))).toEqual('ffffffffffffffff') - expect(testSingleMethod(8, (w) => w.long(Long.fromString('8671175386481439762')))).toEqual('1234567812345678') - expect(testSingleMethod(8, (w) => w.long(Long.fromString('-6700480189419895787')))).toEqual('15c415b5c41c03a3') + expect(testSingleMethod(8, w => w.long(Long.NEG_ONE))).toEqual('ffffffffffffffff') + expect(testSingleMethod(8, w => w.long(Long.fromString('8671175386481439762')))).toEqual('1234567812345678') + expect(testSingleMethod(8, w => w.long(Long.fromString('-6700480189419895787')))).toEqual('15c415b5c41c03a3') }) it('should write float', () => { - expect(testSingleMethod(4, (w) => w.float(1))).toEqual('0000803f') - expect(testSingleMethod(4, (w) => w.float(1.234))).toEqual('b6f39d3f') - expect(testSingleMethod(4, (w) => w.float(0.666))).toEqual('fa7e2a3f') + expect(testSingleMethod(4, w => w.float(1))).toEqual('0000803f') + expect(testSingleMethod(4, w => w.float(1.234))).toEqual('b6f39d3f') + expect(testSingleMethod(4, w => w.float(0.666))).toEqual('fa7e2a3f') }) it('should write double', () => { - expect(testSingleMethod(8, (w) => w.double(1))).toEqual('000000000000f03f') - expect(testSingleMethod(8, (w) => w.double(10.5))).toEqual('0000000000002540') - expect(testSingleMethod(8, (w) => w.double(8.8))).toEqual('9a99999999992140') + expect(testSingleMethod(8, w => w.double(1))).toEqual('000000000000f03f') + expect(testSingleMethod(8, w => w.double(10.5))).toEqual('0000000000002540') + expect(testSingleMethod(8, w => w.double(8.8))).toEqual('9a99999999992140') }) it('should write raw bytes', () => { - expect(testSingleMethod(5, (w) => w.raw(new Uint8Array([4, 3, 5, 1, 1])))).toEqual('0403050101') + expect(testSingleMethod(5, w => w.raw(new Uint8Array([4, 3, 5, 1, 1])))).toEqual('0403050101') }) it('should write tg-encoded boolean', () => { - expect(testSingleMethod(4, (w) => w.boolean(false))).toEqual('379779bc') - expect(testSingleMethod(4, (w) => w.boolean(true))).toEqual('b5757299') + expect(testSingleMethod(4, w => w.boolean(false))).toEqual('379779bc') + expect(testSingleMethod(4, w => w.boolean(true))).toEqual('b5757299') }) it('should write tg-encoded bytes', () => { - expect(testSingleMethod(4, (w) => w.bytes(new Uint8Array([1, 2, 3])))).toEqual('03010203') - expect(testSingleMethod(8, (w) => w.bytes(new Uint8Array([1, 2, 3, 4])))).toEqual('0401020304000000') + expect(testSingleMethod(4, w => w.bytes(new Uint8Array([1, 2, 3])))).toEqual('03010203') + expect(testSingleMethod(8, w => w.bytes(new Uint8Array([1, 2, 3, 4])))).toEqual('0401020304000000') const random250bytes = randomBytes(250) - expect(testSingleMethod(252, (w) => w.bytes(random250bytes))).toEqual(`fa${hexEncode(random250bytes)}00`) + expect(testSingleMethod(252, w => w.bytes(random250bytes))).toEqual(`fa${hexEncode(random250bytes)}00`) const random1000bytes = randomBytes(1000) const buffer = new Uint8Array(1004) buffer[0] = 254 new DataView(buffer.buffer).setUint32(1, 1000, true) buffer.set(random1000bytes, 4) - expect(testSingleMethod(1004, (w) => w.bytes(random1000bytes))).toEqual(hexEncode(buffer)) + expect(testSingleMethod(1004, w => w.bytes(random1000bytes))).toEqual(hexEncode(buffer)) }) it('should write tg-encoded string', () => { - expect(testSingleMethod(8, (w) => w.string('test'))).toEqual('0474657374000000') + expect(testSingleMethod(8, w => w.string('test'))).toEqual('0474657374000000') }) const stubObjectsMap: TlWriterMap = { - deadbeef: function (w, obj) { - w.uint(0xdeadbeef) + deadbeef(w, obj) { + w.uint(0xDEADBEEF) w.int(obj.a) w.object(obj.b) }, - facedead: function (w) { - w.uint(0xfacedead) + facedead(w) { + w.uint(0xFACEDEAD) }, - baadc0de: function (w, obj) { - w.uint(0xbaadc0de) + baadc0de(w, obj) { + w.uint(0xBAADC0DE) w.uint(obj.n) }, - bebf0c3d: function (w, obj) { - w.uint(0xbebf0c3d) + bebf0c3d(w, obj) { + w.uint(0xBEBF0C3D) w.vector(w.int, obj.vec) }, // eslint-disable-next-line @@ -130,9 +131,9 @@ describe('TlBinaryWriter', () => { n: 2, } - const length = - TlSerializationCounter.countNeededBytes(stubObjectsMap, object1) + - TlSerializationCounter.countNeededBytes(stubObjectsMap, object2) + const length + = TlSerializationCounter.countNeededBytes(stubObjectsMap, object1) + + TlSerializationCounter.countNeededBytes(stubObjectsMap, object2) expect(length).toEqual(20) expect( @@ -162,11 +163,11 @@ describe('TlBinaryWriter', () => { vec: [1, 2], } - const length = - TlSerializationCounter.countNeededBytes(stubObjectsMap, object1) + - TlSerializationCounter.countNeededBytes(stubObjectsMap, object2) + - TlSerializationCounter.countNeededBytes(stubObjectsMap, object3) + - 8 // because technically in tl vector can't be top-level, but whatever :shrug: + const length + = TlSerializationCounter.countNeededBytes(stubObjectsMap, object1) + + TlSerializationCounter.countNeededBytes(stubObjectsMap, object2) + + TlSerializationCounter.countNeededBytes(stubObjectsMap, object3) + + 8 // because technically in tl vector can't be top-level, but whatever :shrug: expect(length).toEqual(48) expect( @@ -183,8 +184,8 @@ describe('TlBinaryWriter', () => { describe('examples from documentation', () => { // https://core.telegram.org/mtproto/samples-auth_key#2-a-response-from-the-server-has-been-received-with-the-following-content it('should be able to write resPQ', () => { - const expected = - '000000000000000001c8831ec97ae55140000000632416053e0549828cca27e966b301a48fece2fca5cf4d33f4a11ea877ba4aa5739073300817ed48941a08f98100000015c4b51c01000000216be86c022bb4c3' + const expected + = '000000000000000001c8831ec97ae55140000000632416053e0549828cca27e966b301a48fece2fca5cf4d33f4a11ea877ba4aa5739073300817ed48941a08f98100000015c4b51c01000000216be86c022bb4c3' const resPq = { _: 'mt_resPQ', @@ -195,7 +196,7 @@ describe('TlBinaryWriter', () => { } const map: TlWriterMap = { - mt_resPQ: function (w, obj) { + mt_resPQ(w, obj) { w.uint(85337187) w.int128(obj.nonce) w.int128(obj.serverNonce) @@ -206,9 +207,9 @@ describe('TlBinaryWriter', () => { _staticSize: {} as any, } - const length = - 20 + // mtproto header - TlSerializationCounter.countNeededBytes(map, resPq) + const length + = 20 // mtproto header + + TlSerializationCounter.countNeededBytes(map, resPq) expect(length).toEqual(expected.length / 2) expect( diff --git a/packages/tl-runtime/src/writer.ts b/packages/tl-runtime/src/writer.ts index 3d96a34e..056d4d51 100644 --- a/packages/tl-runtime/src/writer.ts +++ b/packages/tl-runtime/src/writer.ts @@ -1,6 +1,6 @@ -import Long from 'long' +import type Long from 'long' -import { ITlPlatform } from './platform.js' +import type { ITlPlatform } from './platform.js' const TWO_PWR_32_DBL = (1 << 16) * (1 << 16) @@ -8,9 +8,7 @@ const TWO_PWR_32_DBL = (1 << 16) * (1 << 16) * Mapping of TL object names to writer functions. */ // avoid unnecessary type complexity -// eslint-disable-next-line @typescript-eslint/no-explicit-any export type TlWriterMap = Record void> & { - // eslint-disable-next-line @typescript-eslint/no-explicit-any _bare?: Record void> _staticSize: Record } @@ -128,7 +126,7 @@ export class TlSerializationCounter { vector(fn: (item: unknown) => void, items: unknown[]): void { this.count += 8 - items.forEach((it) => fn.call(this, it)) + items.forEach(it => fn.call(this, it)) } } @@ -202,8 +200,8 @@ export class TlBinaryWriter { knownSize = -1, ): Uint8Array { if (knownSize === -1) { - knownSize = - objectMap._staticSize[obj._] || TlSerializationCounter.countNeededBytes(objectMap, obj) + knownSize + = objectMap._staticSize[obj._] || TlSerializationCounter.countNeededBytes(objectMap, obj) } const writer = TlBinaryWriter.alloc(objectMap, knownSize) @@ -237,7 +235,7 @@ export class TlBinaryWriter { } null(): void { - this.uint(0x56730bcc) + this.uint(0x56730BCC) } long(val: Long): void { @@ -258,7 +256,7 @@ export class TlBinaryWriter { } boolean(val: boolean): void { - this.dataView.setInt32(this.pos, val ? 0x997275b5 : 0xbc799737, true) + this.dataView.setInt32(this.pos, val ? 0x997275B5 : 0xBC799737, true) this.pos += 4 } @@ -290,9 +288,9 @@ export class TlBinaryWriter { padding = (length + 1) % 4 } else { this.uint8View[this.pos++] = 254 - this.uint8View[this.pos++] = length & 0xff - this.uint8View[this.pos++] = (length >> 8) & 0xff - this.uint8View[this.pos++] = (length >> 16) & 0xff + this.uint8View[this.pos++] = length & 0xFF + this.uint8View[this.pos++] = (length >> 8) & 0xFF + this.uint8View[this.pos++] = (length >> 16) & 0xFF padding = length % 4 } @@ -311,7 +309,6 @@ export class TlBinaryWriter { } // hot path, avoid additional runtime checks - // eslint-disable-next-line @typescript-eslint/no-explicit-any object(obj: any): void { const fn = this.objectMap![obj._] if (!fn) throw new Error(`Unknown object ${obj._}`) @@ -319,10 +316,10 @@ export class TlBinaryWriter { } vector(fn: (item: unknown, bare?: boolean) => void, val: unknown[], bare?: boolean): void { - if (!bare) this.uint(0x1cb5c415) + if (!bare) this.uint(0x1CB5C415) this.uint(val.length) - val.forEach((it) => fn.call(this, it, bare)) + val.forEach(it => fn.call(this, it, bare)) } /** diff --git a/packages/tl-runtime/tsconfig.json b/packages/tl-runtime/tsconfig.json index 23d190e1..77ca9f2d 100644 --- a/packages/tl-runtime/tsconfig.json +++ b/packages/tl-runtime/tsconfig.json @@ -1,10 +1,10 @@ { - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "./dist/esm", - "rootDir": "./src" - }, - "include": [ - "./src" - ], + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist/esm" + }, + "include": [ + "./src" + ] } diff --git a/packages/tl-utils/package.json b/packages/tl-utils/package.json index f510e7b2..4a162dc5 100644 --- a/packages/tl-utils/package.json +++ b/packages/tl-utils/package.json @@ -1,22 +1,22 @@ { - "name": "@mtcute/tl-utils", - "private": true, - "version": "0.16.0", - "description": "Utils for working with TL schema", - "author": "alina sireneva ", - "license": "MIT", - "type": "module", - "sideEffects": false, - "scripts": { - "docs": "typedoc", - "build": "pnpm run -w build-package tl-utils" - }, - "exports": { - ".": "./src/index.ts", - "./json.js": "./src/json/index.ts" - }, - "dependencies": { - "crc-32": "1.2.0", - "@mtcute/tl-runtime": "workspace:^" - } + "name": "@mtcute/tl-utils", + "type": "module", + "version": "0.16.0", + "private": true, + "description": "Utils for working with TL schema", + "author": "alina sireneva ", + "license": "MIT", + "sideEffects": false, + "exports": { + ".": "./src/index.ts", + "./json.js": "./src/json/index.ts" + }, + "scripts": { + "docs": "typedoc", + "build": "pnpm run -w build-package tl-utils" + }, + "dependencies": { + "@mtcute/tl-runtime": "workspace:^", + "crc-32": "1.2.0" + } } diff --git a/packages/tl-utils/src/calculator.test.ts b/packages/tl-utils/src/calculator.test.ts index f19fe044..059ee24e 100644 --- a/packages/tl-utils/src/calculator.test.ts +++ b/packages/tl-utils/src/calculator.test.ts @@ -45,10 +45,10 @@ describe('calculateStaticSizes', () => { it('correctly handles static-sized children', () => { test( - 'peerUser#9db1bc6d user_id:int53 = Peer;\n' + - 'help.promoData#8c39793f flags:# proxy:flags.0?true expires:int peer:peerUser = help.PromoData;', + 'peerUser#9db1bc6d user_id:int53 = Peer;\n' + + 'help.promoData#8c39793f flags:# proxy:flags.0?true expires:int peer:peerUser = help.PromoData;', { - peerUser: 12, + 'peerUser': 12, 'help.promoData': 20, }, ) @@ -56,12 +56,12 @@ describe('calculateStaticSizes', () => { it('correctly handles static-sized union children', () => { test( - 'peerUser#9db1bc6d user_id:int53 = Peer;\n' + - 'peerChannel#9db1bc6d channel_id:int53 = Peer;\n' + - 'help.promoData#8c39793f flags:# proxy:flags.0?true expires:int peer:Peer = help.PromoData;', + 'peerUser#9db1bc6d user_id:int53 = Peer;\n' + + 'peerChannel#9db1bc6d channel_id:int53 = Peer;\n' + + 'help.promoData#8c39793f flags:# proxy:flags.0?true expires:int peer:Peer = help.PromoData;', { - peerUser: 12, - peerChannel: 12, + 'peerUser': 12, + 'peerChannel': 12, 'help.promoData': 24, }, ) @@ -69,9 +69,9 @@ describe('calculateStaticSizes', () => { it('correctly handles differently sized union children', () => { test( - 'peerUser user_id:int53 = Peer;\n' + - 'peerChannel channel_id:int53 access_hash:long = Peer;\n' + - 'help.promoData#8c39793f flags:# proxy:flags.0?true expires:int peer:Peer = help.PromoData;', + 'peerUser user_id:int53 = Peer;\n' + + 'peerChannel channel_id:int53 access_hash:long = Peer;\n' + + 'help.promoData#8c39793f flags:# proxy:flags.0?true expires:int peer:Peer = help.PromoData;', { peerUser: 12, peerChannel: 20, @@ -81,17 +81,17 @@ describe('calculateStaticSizes', () => { it('correctly handles non static-sized union children', () => { test( - 'peerUser user_id:int53 = Peer;\n' + - 'peerChannel channel_id:int53 access_hash:bytes = Peer;\n' + - 'help.promoData#8c39793f flags:# proxy:flags.0?true expires:int peer:Peer = help.PromoData;', + 'peerUser user_id:int53 = Peer;\n' + + 'peerChannel channel_id:int53 access_hash:bytes = Peer;\n' + + 'help.promoData#8c39793f flags:# proxy:flags.0?true expires:int peer:Peer = help.PromoData;', { peerUser: 12, }, ) test( - 'peerUser user_id:int53 access_hash:bytes = Peer;\n' + - 'peerChannel channel_id:int53 access_hash:bytes = Peer;\n' + - 'help.promoData#8c39793f flags:# proxy:flags.0?true expires:int peer:Peer = help.PromoData;', + 'peerUser user_id:int53 access_hash:bytes = Peer;\n' + + 'peerChannel channel_id:int53 access_hash:bytes = Peer;\n' + + 'help.promoData#8c39793f flags:# proxy:flags.0?true expires:int peer:Peer = help.PromoData;', {}, ) }) diff --git a/packages/tl-utils/src/calculator.ts b/packages/tl-utils/src/calculator.ts index 10b2b86c..74abe173 100644 --- a/packages/tl-utils/src/calculator.ts +++ b/packages/tl-utils/src/calculator.ts @@ -1,16 +1,16 @@ -import { TlEntry } from './types.js' +import type { TlEntry } from './types.js' const PRIMITIVES_SIZES: Record = { - int: 4, - long: 8, - int53: 8, - int128: 16, - int256: 32, - double: 8, - boolFalse: 4, - boolTrue: 4, - bool: 4, - Bool: 4, + 'int': 4, + 'long': 8, + 'int53': 8, + 'int128': 16, + 'int256': 32, + 'double': 8, + 'boolFalse': 4, + 'boolTrue': 4, + 'bool': 4, + 'Bool': 4, '#': 4, } diff --git a/packages/tl-utils/src/codegen/errors.test.ts b/packages/tl-utils/src/codegen/errors.test.ts index 3b35debf..dd6efb64 100644 --- a/packages/tl-utils/src/codegen/errors.test.ts +++ b/packages/tl-utils/src/codegen/errors.test.ts @@ -8,7 +8,7 @@ describe('generateCodeForErrors', () => { generateCodeForErrors({ base: { BAD_REQUEST: 400 }, errors: { - USER_NOT_FOUND: { code: 400, name: 'USER_NOT_FOUND' }, + 'USER_NOT_FOUND': { code: 400, name: 'USER_NOT_FOUND' }, 'FLOOD_WAIT_%d': { code: 420, name: 'FLOOD_WAIT_%d', description: 'Wait %d seconds' }, }, throws: {}, diff --git a/packages/tl-utils/src/codegen/errors.ts b/packages/tl-utils/src/codegen/errors.ts index 540b5659..96c9d20d 100644 --- a/packages/tl-utils/src/codegen/errors.ts +++ b/packages/tl-utils/src/codegen/errors.ts @@ -1,4 +1,5 @@ -import { TlErrors } from '../types.js' +import type { TlErrors } from '../types.js' + import { snakeToCamel } from './utils.js' const TEMPLATE_JS = ` @@ -66,8 +67,8 @@ export class RpcError extends Error { } `.trimStart() -const template = (str: string, params: Record): string => { - return str.replace(/{([a-z]+)}/gi, (_, name) => String(params[name] ?? '')) +function template(str: string, params: Record): string { + return str.replace(/\{([a-z]+)\}/gi, (_, name) => String(params[name] ?? '')) } function parseCode(err: string, placeholders_?: string[]): [string, string[]] { @@ -138,8 +139,8 @@ export function generateCodeForErrors(errors: TlErrors, exports = 'exports.'): [ if (placeholders.length) { const placeholderTypes = placeholders.map(placeholderType) - argMap += - ` '${name}': { ` + placeholders.map((it, i) => `${it}: ${placeholderTypes[i]}`).join(', ') + ' },\n' + argMap + += ` '${name}': { ${placeholders.map((it, i) => `${it}: ${placeholderTypes[i]}`).join(', ')} },\n` const regex = name.replace('%d', '(\\d+)') const setters = placeholders.map((it, i) => `param = err.${it} = parseInt(match[${i + 1}])`).join('; ') diff --git a/packages/tl-utils/src/codegen/reader.test.ts b/packages/tl-utils/src/codegen/reader.test.ts index 8d45e309..4f3d74c9 100644 --- a/packages/tl-utils/src/codegen/reader.test.ts +++ b/packages/tl-utils/src/codegen/reader.test.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from 'vitest' import { parseTlToEntries } from '../parse.js' + import { generateReaderCodeForTlEntries, generateReaderCodeForTlEntry } from './reader.js' describe('generateReaderCodeForTlEntry', () => { diff --git a/packages/tl-utils/src/codegen/reader.ts b/packages/tl-utils/src/codegen/reader.ts index 1f552309..4a02be8d 100644 --- a/packages/tl-utils/src/codegen/reader.ts +++ b/packages/tl-utils/src/codegen/reader.ts @@ -1,5 +1,7 @@ import { computeConstructorIdFromEntry } from '../ctor-id.js' -import { TL_PRIMITIVES, TlEntry } from '../types.js' +import type { TlEntry } from '../types.js' +import { TL_PRIMITIVES } from '../types.js' + import { snakeToCamel } from './utils.js' export interface ReaderCodegenOptions { @@ -45,7 +47,7 @@ const DEFAULT_OPTIONS: ReaderCodegenOptions = { * @param params Options * @returns Code as a writers map entry */ -export function generateReaderCodeForTlEntry(entry: TlEntry, params = DEFAULT_OPTIONS): string { +export function generateReaderCodeForTlEntry(entry: TlEntry, params: ReaderCodegenOptions = DEFAULT_OPTIONS): string { const { variableName, includeFlags } = { ...DEFAULT_OPTIONS, ...params } if (entry.id === 0) entry.id = computeConstructorIdFromEntry(entry) @@ -53,7 +55,7 @@ export function generateReaderCodeForTlEntry(entry: TlEntry, params = DEFAULT_OP const pre = `${entry.id}:function(r){` if (!entry.arguments.length) { - return pre + `return{_:'${entry.name}'}},` + return `${pre}return{_:'${entry.name}'}},` } let beforeReturn = '' @@ -88,12 +90,12 @@ export function generateReaderCodeForTlEntry(entry: TlEntry, params = DEFAULT_OP const predicate = arg.typeModifiers.predicate const s = predicate.split('.') const fieldName = s[0] - const bitIndex = parseInt(s[1]) + const bitIndex = Number.parseInt(s[1]) if (!(fieldName in flagsFields)) { throw new Error(`Invalid predicate: ${predicate} - unknown field (in ${entry.name})`) } - if (isNaN(bitIndex) || bitIndex < 0 || bitIndex > 32) { + if (Number.isNaN(bitIndex) || bitIndex < 0 || bitIndex > 32) { throw new Error(`Invalid predicate: ${predicate} - invalid bit`) } @@ -152,9 +154,9 @@ export function generateReaderCodeForTlEntry(entry: TlEntry, params = DEFAULT_OP } if (isBeforeLastFlag) { - beforeReturn += code + ';' + beforeReturn += `${code};` } else { - returnCode += code + ',' + returnCode += `${code},` } }) @@ -167,14 +169,17 @@ export function generateReaderCodeForTlEntry(entry: TlEntry, params = DEFAULT_OP * @param entries Entries to generate reader for * @param params Codegen options */ -export function generateReaderCodeForTlEntries(entries: TlEntry[], params = DEFAULT_OPTIONS): string { +export function generateReaderCodeForTlEntries( + entries: TlEntry[], + params: ReaderCodegenOptions = DEFAULT_OPTIONS, +): string { const { variableName, includeMethods } = { ...DEFAULT_OPTIONS, ...params } let ret = `var ${variableName}={\n` entries.forEach((entry) => { if (entry.kind === 'method' && !includeMethods) return - ret += generateReaderCodeForTlEntry(entry, params) + '\n' + ret += `${generateReaderCodeForTlEntry(entry, params)}\n` }) const usedInBareVector: Record = {} @@ -215,5 +220,5 @@ export function generateReaderCodeForTlEntries(entries: TlEntry[], params = DEFA ret += '},\n' } - return ret + '}' + return `${ret}}` } diff --git a/packages/tl-utils/src/codegen/types.test.ts b/packages/tl-utils/src/codegen/types.test.ts index ec17fb87..7ad64f91 100644 --- a/packages/tl-utils/src/codegen/types.test.ts +++ b/packages/tl-utils/src/codegen/types.test.ts @@ -2,6 +2,7 @@ import { describe, expect, it } from 'vitest' import { parseTlToEntries } from '../parse.js' import { parseFullTlSchema } from '../schema.js' + import { generateTypescriptDefinitionsForTlEntry, generateTypescriptDefinitionsForTlSchema } from './types.js' describe('generateTypescriptDefinitionsForTlEntry', () => { @@ -39,7 +40,7 @@ describe('generateTypescriptDefinitionsForTlEntry', () => { it('adds usage info comments', () => { const entries = parseTlToEntries('---functions---\ntest = Test;\ntestBot = Test;') - const [result, resultBot] = entries.map((it) => + const [result, resultBot] = entries.map(it => generateTypescriptDefinitionsForTlEntry(it, 'tl.', { base: {}, errors: {}, diff --git a/packages/tl-utils/src/codegen/types.ts b/packages/tl-utils/src/codegen/types.ts index 91aad97c..16e6ad75 100644 --- a/packages/tl-utils/src/codegen/types.ts +++ b/packages/tl-utils/src/codegen/types.ts @@ -1,5 +1,6 @@ -import { TlEntry, TlErrors, TlFullSchema, TlTypeModifiers } from '../types.js' +import type { TlEntry, TlErrors, TlFullSchema, TlTypeModifiers } from '../types.js' import { groupTlEntriesByNamespace, splitNameToNamespace } from '../utils.js' + import { generateCodeForErrors } from './errors.js' import { camelToPascal, indent, jsComment, snakeToCamel } from './utils.js' @@ -55,7 +56,7 @@ function fullTypeName( const [ns, name] = splitNameToNamespace(type) let res = baseNamespace - if (namespace && ns) res += ns + '.' + if (namespace && ns) res += `${ns}.` if (name[0].match(/[A-Z]/)) { res += 'Type' @@ -116,11 +117,11 @@ export function generateTypescriptDefinitionsForTlEntry( } if (errors.throws[entry.name]) { - comment += '\n\nThis method *may* throw one of these errors: ' + errors.throws[entry.name].join(', ') + comment += `\n\nThis method *may* throw one of these errors: ${errors.throws[entry.name].join(', ')}` } } } - if (comment) ret += jsComment(comment) + '\n' + if (comment) ret += `${jsComment(comment)}\n` let genericsString = '' const genericsIndex: Record = {} @@ -159,7 +160,7 @@ export function generateTypescriptDefinitionsForTlEntry( } if (arg.comment) { - ret += indent(4, jsComment(arg.comment)) + '\n' + ret += `${indent(4, jsComment(arg.comment))}\n` } ret += ` ${snakeToCamel(arg.name)}` @@ -268,7 +269,7 @@ export function generateTypescriptDefinitionsForTlSchema( unions[entry.type] = 1 } - ts += indent(indentSize, generateTypescriptDefinitionsForTlEntry(entry, namespace + '.')) + '\n' + ts += `${indent(indentSize, generateTypescriptDefinitionsForTlEntry(entry, `${namespace}.`))}\n` }) ts += indent(indentSize, 'interface RpcCallReturn') @@ -286,7 +287,7 @@ export function generateTypescriptDefinitionsForTlSchema( ts += ', ' } - ts += ns + '.RpcCallReturn' + ts += `${ns}.RpcCallReturn` } } ts += ' {\n' @@ -301,22 +302,22 @@ export function generateTypescriptDefinitionsForTlSchema( const g = entry.generics[i] if (g.name === entry.type) { - type = g.type === 'Type' ? 'any' : fullTypeName(g.type, namespace + '.') + type = g.type === 'Type' ? 'any' : fullTypeName(g.type, `${namespace}.`) break } } } if (!type) { - type = fullTypeName(entry.type, namespace + '.', { + type = fullTypeName(entry.type, `${namespace}.`, { typeModifiers: entry.typeModifiers, }) } - ts += indent(indentSize + 4, `'${entry.name}': ${type}`) + '\n' + ts += `${indent(indentSize + 4, `'${entry.name}': ${type}`)}\n` }) - ts += indent(indentSize, '}') + '\n' + ts += `${indent(indentSize, '}')}\n` if (ns) { js += `ns.${ns} = {};\n(function(ns){\n` @@ -326,7 +327,7 @@ export function generateTypescriptDefinitionsForTlSchema( const union = schema.unions[name] if (union.comment) { - ts += indent(indentSize, jsComment(union.comment)) + '\n' + ts += `${indent(indentSize, jsComment(union.comment))}\n` } const typeName = fullTypeName(name, '', { namespace: false }) const typeWithoutNs = typeName.substring(4) @@ -334,12 +335,12 @@ export function generateTypescriptDefinitionsForTlSchema( union.classes.forEach((entry, idx) => { if (idx !== 0) ts += ' | ' - ts += fullTypeName(entry.name, namespace + '.') + ts += fullTypeName(entry.name, `${namespace}.`) }) ts += '\n' - ts += indent(indentSize, `function isAny${typeWithoutNs}(o: object): o is ${typeName}`) + '\n' + ts += `${indent(indentSize, `function isAny${typeWithoutNs}(o: object): o is ${typeName}`)}\n` js += `ns.isAny${typeWithoutNs} = _isAny('${name}');\n` } @@ -356,15 +357,15 @@ export function generateTypescriptDefinitionsForTlSchema( for (const name in schema.methods) { if (first) { - ts += indent(4, 'type RpcMethod =') + '\n' + ts += `${indent(4, 'type RpcMethod =')}\n` first = false } const entry = schema.methods[name] - ts += indent(8, '| ' + fullTypeName(entry.name, namespace + '.', { method: true })) + '\n' + ts += `${indent(8, `| ${fullTypeName(entry.name, `${namespace}.`, { method: true })}`)}\n` } - ts += '\n' + indent(4, 'type TlObject =') + '\n' + ts += `\n${indent(4, 'type TlObject =')}\n` const _types: Record = {} @@ -373,14 +374,14 @@ export function generateTypescriptDefinitionsForTlSchema( _types[entry.name] = entry.type } - ts += - indent( + ts + += `${indent( 8, - '| ' + - fullTypeName(entry.name, namespace + '.', { + `| ${ + fullTypeName(entry.name, `${namespace}.`, { method: entry.kind === 'method', - }), - ) + '\n' + })}`, + )}\n` }) ts += '}' diff --git a/packages/tl-utils/src/codegen/utils.ts b/packages/tl-utils/src/codegen/utils.ts index 4b79e619..34e30d64 100644 --- a/packages/tl-utils/src/codegen/utils.ts +++ b/packages/tl-utils/src/codegen/utils.ts @@ -2,8 +2,8 @@ * Transform snake_case string to camelCase string * @param s Snake_case string */ -export const snakeToCamel = (s: string): string => { - return s.replace(/(? { +export function snakeToCamel(s: string): string { + return s.replace(/(? { return $1.substring(1).toUpperCase() }) } @@ -20,17 +20,17 @@ export const camelToPascal = (s: string): string => s[0].toUpperCase() + s.subst */ export function jsComment(s: string): string { return ( - '/**' + + `/**${ // awesome hack not to break up {@link} links and /g, '\n\n') - .replace(/{@link (.*?)}/g, '{@linkƒ$1}') + .replace(/\{@link (.*?)\}/g, '{@linkƒ$1}') .replace(/ { @@ -84,8 +85,8 @@ describe('generateWriterCodeForTlEntry', () => { describe('generateWriterCodeForTlEntries', () => { it('generates code for bare types', () => { const entries = parseTlToEntries( - 'future_salt#0949d9dc salt:bytes = FutureSalt;\n' + - 'future_salts#ae500895 salts:vector current:future_salt = FutureSalts;', + 'future_salt#0949d9dc salt:bytes = FutureSalt;\n' + + 'future_salts#ae500895 salts:vector current:future_salt = FutureSalts;', ) expect(generateWriterCodeForTlEntries(entries, { includePrelude: false })).toMatchSnapshot() @@ -106,9 +107,9 @@ describe('generateWriterCodeForTlEntries', () => { it('should include static sizes calculations', () => { const entries = parseTlToEntries( - 'test1 foo:int bar:int = Test;\n' + - 'test2 foo:int bar:double = Test;\n' + - 'test3 foo:int bar:bytes = Test;\n', // should not be included + 'test1 foo:int bar:int = Test;\n' + + 'test2 foo:int bar:double = Test;\n' + + 'test3 foo:int bar:bytes = Test;\n', // should not be included ) const code = generateWriterCodeForTlEntries(entries, { includeStaticSizes: true }) diff --git a/packages/tl-utils/src/codegen/writer.ts b/packages/tl-utils/src/codegen/writer.ts index c49626f8..f1309350 100644 --- a/packages/tl-utils/src/codegen/writer.ts +++ b/packages/tl-utils/src/codegen/writer.ts @@ -1,6 +1,8 @@ import { calculateStaticSizes } from '../calculator.js' import { computeConstructorIdFromEntry } from '../ctor-id.js' -import { TL_PRIMITIVES, TlArgument, TlEntry } from '../types.js' +import type { TlArgument, TlEntry } from '../types.js' +import { TL_PRIMITIVES } from '../types.js' + import { snakeToCamel } from './utils.js' export interface WriterCodegenOptions { @@ -40,12 +42,12 @@ const DEFAULT_OPTIONS: WriterCodegenOptions = { includeStaticSizes: false, } -const TL_WRITER_PRELUDE = - 'function h(o,p){' + - 'var q=o[p];' + - 'if(q===void 0)' + - "throw Error('Object '+o._+' is missing required property '+p);" + - 'return q}\n' +const TL_WRITER_PRELUDE + = 'function h(o,p){' + + 'var q=o[p];' + + 'if(q===void 0)' + + "throw Error('Object '+o._+' is missing required property '+p);" + + 'return q}\n' /** * Generate writer code for a single entry. @@ -55,7 +57,7 @@ const TL_WRITER_PRELUDE = * @param params Options * @returns Code as a readers map entry */ -export function generateWriterCodeForTlEntry(entry: TlEntry, params = DEFAULT_OPTIONS): string { +export function generateWriterCodeForTlEntry(entry: TlEntry, params: WriterCodegenOptions = DEFAULT_OPTIONS): string { const { bare, includeFlags, variableName } = { ...DEFAULT_OPTIONS, ...params, @@ -76,7 +78,7 @@ export function generateWriterCodeForTlEntry(entry: TlEntry, params = DEFAULT_OP if (arg.type === '#') { ret += `var ${arg.name}=${includeFlags ? `v.${arg.name}` : '0'};` - const usedByArgs = entry.arguments.filter((a) => a.typeModifiers?.predicate?.startsWith(arg.name + '.')) + const usedByArgs = entry.arguments.filter(a => a.typeModifiers?.predicate?.startsWith(`${arg.name}.`)) const indexUsage: Record = {} usedByArgs.forEach((arg1) => { @@ -86,9 +88,9 @@ export function generateWriterCodeForTlEntry(entry: TlEntry, params = DEFAULT_OP }) Object.entries(indexUsage).forEach(([index, args]) => { - const bitIndex = parseInt(index) + const bitIndex = Number.parseInt(index) - if (isNaN(bitIndex) || bitIndex < 0 || bitIndex > 32) { + if (Number.isNaN(bitIndex) || bitIndex < 0 || bitIndex > 32) { throw new Error(`Invalid predicate: ${arg.name}.${bitIndex} - invalid bit`) } @@ -170,7 +172,7 @@ export function generateWriterCodeForTlEntry(entry: TlEntry, params = DEFAULT_OP } }) - return ret + '},' + return `${ret}},` } /** @@ -179,7 +181,10 @@ export function generateWriterCodeForTlEntry(entry: TlEntry, params = DEFAULT_OP * @param entries Entries to generate writers for * @param params Codegen options */ -export function generateWriterCodeForTlEntries(entries: TlEntry[], params = DEFAULT_OPTIONS): string { +export function generateWriterCodeForTlEntries( + entries: TlEntry[], + params: WriterCodegenOptions = DEFAULT_OPTIONS, +): string { const { includePrelude, variableName, includeStaticSizes } = { ...DEFAULT_OPTIONS, ...params, @@ -191,7 +196,7 @@ export function generateWriterCodeForTlEntries(entries: TlEntry[], params = DEFA const usedAsBareIds: Record = {} entries.forEach((entry) => { - ret += generateWriterCodeForTlEntry(entry, params) + '\n' + ret += `${generateWriterCodeForTlEntry(entry, params)}\n` entry.arguments.forEach((arg) => { if (arg.typeModifiers?.constructorId) { @@ -204,13 +209,13 @@ export function generateWriterCodeForTlEntries(entries: TlEntry[], params = DEFA ret += '_bare:{\n' Object.keys(usedAsBareIds).forEach((id) => { - const entry = entries.find((e) => e.id === parseInt(id))! + const entry = entries.find(e => e.id === Number.parseInt(id))! - ret += - generateWriterCodeForTlEntry(entry, { + ret + += `${generateWriterCodeForTlEntry(entry, { ...params, bare: true, - }) + '\n' + })}\n` }) ret += '},\n' } @@ -227,5 +232,5 @@ export function generateWriterCodeForTlEntries(entries: TlEntry[], params = DEFA ret += '},\n' } - return ret + '}' + return `${ret}}` } diff --git a/packages/tl-utils/src/ctor-id.test.ts b/packages/tl-utils/src/ctor-id.test.ts index 23758924..cb25a337 100644 --- a/packages/tl-utils/src/ctor-id.test.ts +++ b/packages/tl-utils/src/ctor-id.test.ts @@ -1,7 +1,8 @@ import { describe, expect, it } from 'vitest' import { computeConstructorIdFromEntry } from './ctor-id.js' -import { TlArgument, TlEntry } from './index.js' + +import type { TlArgument, TlEntry } from './index.js' describe('computeConstructorIdFromEntry', () => { const make = (name: string, type: string, ...args: string[]): TlEntry => ({ @@ -35,26 +36,26 @@ describe('computeConstructorIdFromEntry', () => { } it('computes for constructors without parameters', () => { - test(make('auth.logOut', 'Bool'), 0x5717da40) - test(make('auth.resetAuthorizations', 'Bool'), 0x9fab0d1a) + test(make('auth.logOut', 'Bool'), 0x5717DA40) + test(make('auth.resetAuthorizations', 'Bool'), 0x9FAB0D1A) }) it('ignores existing constructor id', () => { const entry = make('auth.logOut', 'Bool') - entry.id = 0xaef001df - test(entry, 0x5717da40) + entry.id = 0xAEF001DF + test(entry, 0x5717DA40) }) it('computes for constructors with simple parameters', () => { - test(make('auth.exportAuthorization', 'auth.ExportedAuthorization', 'dc_id:int'), 0xe5bfffcd) + test(make('auth.exportAuthorization', 'auth.ExportedAuthorization', 'dc_id:int'), 0xE5BFFFCD) }) it('computes for constructors with vector parameters', () => { - test(make('account.deleteSecureValue', 'Bool', 'types:Vector'), 0xb880bc4b) + test(make('account.deleteSecureValue', 'Bool', 'types:Vector'), 0xB880BC4B) }) it('computes for constructors with vector return type', () => { - test(make('account.getSecureValue', 'Vector', 'types:Vector'), 0x73665bc2) + test(make('account.getSecureValue', 'Vector', 'types:Vector'), 0x73665BC2) }) it('computes for constructors with optional parameters', () => { @@ -68,7 +69,7 @@ describe('computeConstructorIdFromEntry', () => { 'file_name:string', 'mime_type:string', ), - 0x1c3db333, + 0x1C3DB333, ) }) @@ -82,7 +83,7 @@ describe('computeConstructorIdFromEntry', () => { 'format:flags.1?string', 'theme:flags.1?InputTheme', ), - 0x7ae43737, + 0x7AE43737, ) }) @@ -94,6 +95,6 @@ describe('computeConstructorIdFromEntry', () => { type: 'Type', }, ] - test(entry, 0xcb9f372d) + test(entry, 0xCB9F372D) }) }) diff --git a/packages/tl-utils/src/ctor-id.ts b/packages/tl-utils/src/ctor-id.ts index 5d0931d9..f9af6213 100644 --- a/packages/tl-utils/src/ctor-id.ts +++ b/packages/tl-utils/src/ctor-id.ts @@ -1,7 +1,7 @@ import CRC32 from 'crc-32' import { writeTlEntryToString } from './stringify.js' -import { TlEntry } from './types.js' +import type { TlEntry } from './types.js' /** * Computes the constructor id for a given TL entry. diff --git a/packages/tl-utils/src/diff.test.ts b/packages/tl-utils/src/diff.test.ts index 2732411d..4a324100 100644 --- a/packages/tl-utils/src/diff.test.ts +++ b/packages/tl-utils/src/diff.test.ts @@ -3,7 +3,7 @@ import { describe, expect, it } from 'vitest' import { generateTlEntriesDifference, generateTlSchemasDifference } from './diff.js' import { parseTlToEntries } from './parse.js' import { parseFullTlSchema } from './schema.js' -import { TlEntryDiff, TlSchemaDiff } from './types.js' +import type { TlEntryDiff, TlSchemaDiff } from './types.js' describe('generateTlEntriesDifference', () => { const test = (tl: string[], expected?: TlEntryDiff) => { @@ -16,8 +16,8 @@ describe('generateTlEntriesDifference', () => { test(['test#deadbeef = Test;', 'test#baadf00d = Test;'], { name: 'test', id: { - old: 0xdeadbeef, - new: 0xbaadf00d, + old: 0xDEADBEEF, + new: 0xBAADF00D, }, }) }) diff --git a/packages/tl-utils/src/diff.ts b/packages/tl-utils/src/diff.ts index 1426838e..f864e43d 100644 --- a/packages/tl-utils/src/diff.ts +++ b/packages/tl-utils/src/diff.ts @@ -1,4 +1,4 @@ -import { TlArgument, TlArgumentDiff, TlEntry, TlEntryDiff, TlFullSchema, TlSchemaDiff } from './types.js' +import type { TlArgument, TlArgumentDiff, TlEntry, TlEntryDiff, TlFullSchema, TlSchemaDiff } from './types.js' import { stringifyArgumentType } from './utils.js' /** @@ -41,8 +41,8 @@ export function generateTlEntriesDifference(a: TlEntry, b: TlEntry): TlEntryDiff } if ( - !a.generics !== !b.generics || - (a.generics && b.generics && JSON.stringify(a.generics) !== JSON.stringify(b.generics)) + !a.generics !== !b.generics + || (a.generics && b.generics && JSON.stringify(a.generics) !== JSON.stringify(b.generics)) ) { diff.generics = { old: a.generics, @@ -229,8 +229,6 @@ export function generateTlSchemasDifference(a: TlFullSchema, b: TlFullSchema): T const unionDiff = unionDiffIndex[entry.type] unionDiff[kind].added.push(entry) } - - return } }) diff --git a/packages/tl-utils/src/json/from-json.test.ts b/packages/tl-utils/src/json/from-json.test.ts index 70e23323..0b1222b5 100644 --- a/packages/tl-utils/src/json/from-json.test.ts +++ b/packages/tl-utils/src/json/from-json.test.ts @@ -1,7 +1,8 @@ import { describe, expect, it } from 'vitest' import { computeConstructorIdFromEntry } from '../ctor-id.js' -import { TlEntry } from '../types.js' +import type { TlEntry } from '../types.js' + import { parseTlEntriesFromJson } from './from-json.js' describe('parseTlEntriesFromJson', () => { diff --git a/packages/tl-utils/src/json/from-json.ts b/packages/tl-utils/src/json/from-json.ts index 72281428..21c3baaf 100644 --- a/packages/tl-utils/src/json/from-json.ts +++ b/packages/tl-utils/src/json/from-json.ts @@ -1,6 +1,9 @@ -import { TL_PRIMITIVES, TlArgument, TlEntry } from '../types.js' +import type { TlArgument, TlEntry } from '../types.js' +import { TL_PRIMITIVES } from '../types.js' import { parseArgumentType } from '../utils.js' -import { parseTlSchemaFromJson, TlParamJson } from './types.js' + +import type { TlParamJson } from './types.js' +import { parseTlSchemaFromJson } from './types.js' function paramsToArguments(params: TlParamJson[]): TlArgument[] { return params.map((p) => { diff --git a/packages/tl-utils/src/json/types.ts b/packages/tl-utils/src/json/types.ts index e1bb0da0..fa6550ba 100644 --- a/packages/tl-utils/src/json/types.ts +++ b/packages/tl-utils/src/json/types.ts @@ -16,7 +16,6 @@ function assertFieldType( field: Field, type: Type, ): asserts obj is { [K in Field]: TypeofToType[Type] } { - // eslint-disable-next-line const typeof_ = typeof (obj as any)[field] if (typeof_ !== type) { @@ -41,7 +40,7 @@ function assertFieldParams(obj: object): asserts obj is { params: TlParamJson[] assertFieldType(obj, 'params', 'object') if (!Array.isArray(obj.params)) { - throw new Error('Expected field params to be an array') + throw new TypeError('Expected field params to be an array') } obj.params.forEach(parseTlParamFromJson) // will throw if invalid @@ -93,11 +92,11 @@ export function parseTlSchemaFromJson(obj: object): TlSchemaJson { assertFieldType(obj, 'methods', 'object') if (!Array.isArray(obj.constructors)) { - throw new Error('Expected field constructors to be an array') + throw new TypeError('Expected field constructors to be an array') } if (!Array.isArray(obj.methods)) { - throw new Error('Expected field methods to be an array') + throw new TypeError('Expected field methods to be an array') } obj.constructors.forEach(parseTlConstructorFromJson) // will throw if invalid diff --git a/packages/tl-utils/src/merge.test.ts b/packages/tl-utils/src/merge.test.ts index 329c5340..0331ec75 100644 --- a/packages/tl-utils/src/merge.test.ts +++ b/packages/tl-utils/src/merge.test.ts @@ -34,33 +34,33 @@ describe('mergeTlEntries', () => { it('merges true flags', () => { test( - 'test flags:# = Test;\n' + - 'test flags:# foo:flags.0?true = Test;\n' + - 'test flags:# bar:flags.0?true = Test;\n' + - 'test flags:# baz:flags.1?true = Test;', + 'test flags:# = Test;\n' + + 'test flags:# foo:flags.0?true = Test;\n' + + 'test flags:# bar:flags.0?true = Test;\n' + + 'test flags:# baz:flags.1?true = Test;', 'test#e86481ba flags:# foo:flags.0?true bar:flags.0?true baz:flags.1?true = Test;', ) // ordering of optional flags should not matter test( - 'test flags:# foo:flags.0?true = Test;\n' + - 'test flags:# bar:flags.0?true = Test;\n' + - 'test flags:# baz:flags.1?true = Test;', + 'test flags:# foo:flags.0?true = Test;\n' + + 'test flags:# bar:flags.0?true = Test;\n' + + 'test flags:# baz:flags.1?true = Test;', 'test#e86481ba flags:# foo:flags.0?true bar:flags.0?true baz:flags.1?true = Test;', ) test( - 'test flags:# foo:flags.0?true = Test;\n' + - 'test flags:# foo:flags.0?true bar:flags.0?true = Test;\n' + - 'test flags:# baz:flags.1?true = Test;\n' + - 'test flags:# bar:flags.0?true baz:flags.1?true = Test;', + 'test flags:# foo:flags.0?true = Test;\n' + + 'test flags:# foo:flags.0?true bar:flags.0?true = Test;\n' + + 'test flags:# baz:flags.1?true = Test;\n' + + 'test flags:# bar:flags.0?true baz:flags.1?true = Test;', 'test#e86481ba flags:# foo:flags.0?true bar:flags.0?true baz:flags.1?true = Test;', ) }) it('merges true flags with multiple flags fields', () => { test( - 'test flags:# flags2:# = Test;\n' + - 'test flags:# foo:flags.0?true flags2:# = Test;\n' + - 'test flags:# flags2:# bar:flags2.0?true = Test;\n', + 'test flags:# flags2:# = Test;\n' + + 'test flags:# foo:flags.0?true flags2:# = Test;\n' + + 'test flags:# flags2:# bar:flags2.0?true = Test;\n', 'test#5ca39a98 flags:# foo:flags.0?true flags2:# bar:flags2.0?true = Test;', ) }) @@ -69,8 +69,8 @@ describe('mergeTlEntries', () => { describe('mergeTlSchemas', () => { const test = async (schemas: string[][], onConflict: number, ...expected: string[]) => { const res = await mergeTlSchemas( - schemas.map((tl) => parseFullTlSchema(parseTlToEntries(tl.join('\n')))), - (opts) => opts[onConflict], + schemas.map(tl => parseFullTlSchema(parseTlToEntries(tl.join('\n')))), + opts => opts[onConflict], ) expect( diff --git a/packages/tl-utils/src/merge.ts b/packages/tl-utils/src/merge.ts index bac7c479..f76a6e1c 100644 --- a/packages/tl-utils/src/merge.ts +++ b/packages/tl-utils/src/merge.ts @@ -1,5 +1,5 @@ import { computeConstructorIdFromEntry } from './ctor-id.js' -import { TlArgument, TlEntry, TlFullSchema } from './types.js' +import type { TlArgument, TlEntry, TlFullSchema } from './types.js' /** * Merge multiple TL entries into a single entry. @@ -18,8 +18,8 @@ export function mergeTlEntries(entries: TlEntry[]): TlEntry | string { typeModifiers: first.typeModifiers, id: first.id, comment: first.comment, - generics: first.generics?.map((it) => ({ ...it })), - arguments: first.arguments.map((it) => ({ ...it })), + generics: first.generics?.map(it => ({ ...it })), + arguments: first.arguments.map(it => ({ ...it })), } if (result.id === 0) { @@ -162,7 +162,7 @@ export async function mergeTlSchemas( if (typeof merged === 'string') { // merge conflict // find all candidates from all schemas and let the user decide - const candidates = schemas.map((schema) => schema[kind][entry.name]) + const candidates = schemas.map(schema => schema[kind][entry.name]) const chosen = await onConflict(candidates, merged) diff --git a/packages/tl-utils/src/parse.test.ts b/packages/tl-utils/src/parse.test.ts index b2d3af2a..77131cf5 100644 --- a/packages/tl-utils/src/parse.test.ts +++ b/packages/tl-utils/src/parse.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it, vi } from 'vitest' import { parseTlToEntries } from './parse.js' -import { TlEntry } from './types.js' +import type { TlEntry } from './types.js' describe('tl parser', () => { const test = (tl: string, expected: TlEntry[], params?: Parameters[1]) => { @@ -40,7 +40,7 @@ boolTrue#997275b5 = Bool; { kind: 'class', name: 'inputUserSelf', - id: 0xf7c1b13f, + id: 0xF7C1B13F, type: 'InputUser', arguments: [], }, @@ -52,7 +52,7 @@ boolTrue#997275b5 = Bool; { kind: 'class', name: 'inputUser', - id: 0xf21158c6, + id: 0xF21158C6, type: 'InputUser', arguments: [ { @@ -73,7 +73,7 @@ boolTrue#997275b5 = Bool; { kind: 'class', name: 'msg_resend_req', - id: 0x7d861a08, + id: 0x7D861A08, type: 'MsgResendReq', arguments: [ { @@ -94,7 +94,7 @@ boolTrue#997275b5 = Bool; { kind: 'class', name: 'future_salts', - id: 0xae500895, + id: 0xAE500895, type: 'FutureSalts', arguments: [ { @@ -119,20 +119,20 @@ boolTrue#997275b5 = Bool; it('parses bare unions', () => { test( - 'message#0949d9dc = Message;\n' + // stub so we can reference it - 'msg_container#73f1f8dc messages:vector<%Message> = MessageContainer;', + 'message#0949d9dc = Message;\n' // stub so we can reference it + + 'msg_container#73f1f8dc messages:vector<%Message> = MessageContainer;', [ { kind: 'class', name: 'message', - id: 0x0949d9dc, + id: 0x0949D9DC, type: 'Message', arguments: [], }, { kind: 'class', name: 'msg_container', - id: 0x73f1f8dc, + id: 0x73F1F8DC, type: 'MessageContainer', arguments: [ { @@ -141,7 +141,7 @@ boolTrue#997275b5 = Bool; typeModifiers: { isBareVector: true, isBareUnion: true, - constructorId: 0x0949d9dc, + constructorId: 0x0949D9DC, }, }, ], @@ -152,20 +152,20 @@ boolTrue#997275b5 = Bool; it('parses bare types', () => { test( - 'future_salt#0949d9dc = FutureSalt;\n' + // stub so we can reference it - 'future_salts#ae500895 req_msg_id:long now:int salts:vector = FutureSalts;', + 'future_salt#0949d9dc = FutureSalt;\n' // stub so we can reference it + + 'future_salts#ae500895 req_msg_id:long now:int salts:vector = FutureSalts;', [ { kind: 'class', name: 'future_salt', - id: 0x0949d9dc, + id: 0x0949D9DC, type: 'FutureSalt', arguments: [], }, { kind: 'class', name: 'future_salts', - id: 0xae500895, + id: 0xAE500895, type: 'FutureSalts', arguments: [ { @@ -182,7 +182,7 @@ boolTrue#997275b5 = Bool; typeModifiers: { isBareVector: true, isBareType: true, - constructorId: 0x0949d9dc, + constructorId: 0x0949D9DC, }, }, ], @@ -196,7 +196,7 @@ boolTrue#997275b5 = Bool; { kind: 'method', name: 'auth.exportAuthorization', - id: 0xe5bfffcd, + id: 0xE5BFFFCD, type: 'auth.ExportedAuthorization', arguments: [ { @@ -213,14 +213,14 @@ boolTrue#997275b5 = Bool; { kind: 'class', name: 'jsonNull', - id: 0x3f6d7b68, + id: 0x3F6D7B68, type: 'JSONValue', arguments: [], }, { kind: 'class', name: 'jsonBool', - id: 0xc7345e6a, + id: 0xC7345E6A, type: 'JSONValue', arguments: [ { @@ -237,7 +237,7 @@ boolTrue#997275b5 = Bool; { kind: 'method', name: 'invokeWithLayer', - id: 0xda9b0d0d, + id: 0xDA9B0D0D, type: 'X', generics: [ { @@ -266,7 +266,7 @@ boolTrue#997275b5 = Bool; { kind: 'class', name: 'help.promoData', - id: 0x8c39793f, + id: 0x8C39793F, type: 'help.PromoData', arguments: [ { @@ -317,10 +317,10 @@ account.getAccountTTL = AccountDaysTTL; users.getUsers id:Vector = Vector; `, ) - expect(items[0].id).toEqual(0xda9b0d0d) - expect(items[1].id).toEqual(0x8c39793f) - expect(items[2].id).toEqual(0x8fc711d) - expect(items[3].id).toEqual(0xd91a548) + expect(items[0].id).toEqual(0xDA9B0D0D) + expect(items[1].id).toEqual(0x8C39793F) + expect(items[2].id).toEqual(0x8FC711D) + expect(items[3].id).toEqual(0xD91A548) }) it('parses preceding comments', () => { @@ -328,7 +328,7 @@ users.getUsers id:Vector = Vector; { kind: 'class', name: 'inputUserSelf', - id: 0xf7c1b13f, + id: 0xF7C1B13F, type: 'InputUser', arguments: [], comment: 'Self input user', @@ -339,7 +339,7 @@ users.getUsers id:Vector = Vector; { kind: 'class', name: 'inputUserSelf', - id: 0xf7c1b13f, + id: 0xF7C1B13F, type: 'InputUser', arguments: [], comment: 'Self input user yes', @@ -352,7 +352,7 @@ users.getUsers id:Vector = Vector; { kind: 'class', name: 'inputUserSelf', - id: 0xf7c1b13f, + id: 0xF7C1B13F, type: 'InputUser', arguments: [], }, @@ -361,18 +361,18 @@ users.getUsers id:Vector = Vector; it('parses tdlib-style comments', () => { test( - '//@description A file defined by its remote ID. The remote ID is guaranteed to be usable ' + - 'only if the corresponding file is still accessible to the user and known to TDLib.\n' + - '//-For example, if the file is from a message, then the message must be not deleted and ' + - 'accessible to the user. If the file database is disabled, then the corresponding object ' + - 'with the file must be preloaded by the application\n' + - '//@id Remote file identifier\n' + - 'inputFileRemote id:string = InputFile;\n', + '//@description A file defined by its remote ID. The remote ID is guaranteed to be usable ' + + 'only if the corresponding file is still accessible to the user and known to TDLib.\n' + + '//-For example, if the file is from a message, then the message must be not deleted and ' + + 'accessible to the user. If the file database is disabled, then the corresponding object ' + + 'with the file must be preloaded by the application\n' + + '//@id Remote file identifier\n' + + 'inputFileRemote id:string = InputFile;\n', [ { kind: 'class', name: 'inputFileRemote', - id: 0xf9968b3e, + id: 0xF9968B3E, type: 'InputFile', arguments: [ { @@ -382,11 +382,11 @@ users.getUsers id:Vector = Vector; }, ], comment: - 'A file defined by its remote ID. The remote ID is guaranteed to be usable ' + - 'only if the corresponding file is still accessible to the user and known to TDLib.\n' + - 'For example, if the file is from a message, then the message must be not deleted and ' + - 'accessible to the user. If the file database is disabled, then the corresponding object ' + - 'with the file must be preloaded by the application', + 'A file defined by its remote ID. The remote ID is guaranteed to be usable ' + + 'only if the corresponding file is still accessible to the user and known to TDLib.\n' + + 'For example, if the file is from a message, then the message must be not deleted and ' + + 'accessible to the user. If the file database is disabled, then the corresponding object ' + + 'with the file must be preloaded by the application', }, ], ) @@ -397,7 +397,7 @@ users.getUsers id:Vector = Vector; parseTlToEntries( '// some comment idk\n\n' + '//another comment\n' + '//but multiline\n\n' + '//yet another at the end', { - onOrphanComment: (s) => orphaned.push(s), + onOrphanComment: s => orphaned.push(s), }, ) @@ -406,20 +406,20 @@ users.getUsers id:Vector = Vector; it('applies prefix to constructors', () => { test( - 'future_salt#0949d9dc = FutureSalt;\n' + // stub to reference - 'future_salts#ae500895 salts:vector current:FutureSalt = FutureSalts;', + 'future_salt#0949d9dc = FutureSalt;\n' // stub to reference + + 'future_salts#ae500895 salts:vector current:FutureSalt = FutureSalts;', [ { kind: 'class', name: 'mt_future_salt', - id: 0x0949d9dc, + id: 0x0949D9DC, type: 'FutureSalt', arguments: [], }, { kind: 'class', name: 'mt_future_salts', - id: 0xae500895, + id: 0xAE500895, type: 'FutureSalts', arguments: [ { @@ -428,7 +428,7 @@ users.getUsers id:Vector = Vector; typeModifiers: { isBareVector: true, isBareType: true, - constructorId: 0x0949d9dc, + constructorId: 0x0949D9DC, }, }, { diff --git a/packages/tl-utils/src/parse.ts b/packages/tl-utils/src/parse.ts index 2127d989..6ab4e442 100644 --- a/packages/tl-utils/src/parse.ts +++ b/packages/tl-utils/src/parse.ts @@ -1,8 +1,10 @@ import { computeConstructorIdFromEntry } from './ctor-id.js' -import { TL_PRIMITIVES, TlArgument, TlEntry } from './types.js' +import type { TlArgument, TlEntry } from './types.js' +import { TL_PRIMITIVES } from './types.js' import { parseArgumentType, parseTdlibStyleComment } from './utils.js' -const SINGLE_REGEX = /^(.+?)(?:#([0-9a-f]{1,8}))?(?: \?)?(?: {(.+?:.+?)})? ((?:.+? )*)= (.+);$/ +// eslint-disable-next-line regexp/no-super-linear-backtracking +const SINGLE_REGEX = /^(.+?)(?:#([0-9a-f]{1,8}))?(?: \?)?(?: \{(.+?:.+?)\})? ((?:.+? )*)= (.+);$/ export function computeConstructorIdFromString(line: string): number { return computeConstructorIdFromEntry(parseTlToEntries(line, { forIdComputation: true })[0]) @@ -93,9 +95,9 @@ export function parseTlToEntries( if (line.match(/^\/\//)) { if (currentComment) { if (line[2] === '-') { - currentComment += '\n' + line.substring(3).trim() + currentComment += `\n${line.substring(3).trim()}` } else { - currentComment += ' ' + line.substring(2).trim() + currentComment += ` ${line.substring(2).trim()}` } } else { currentComment = line.substring(2).trim() @@ -130,19 +132,19 @@ export function parseTlToEntries( return } - let typeIdNum = typeId ? parseInt(typeId, 16) : 0 + let typeIdNum = typeId ? Number.parseInt(typeId, 16) : 0 if (typeIdNum === 0 && !params.forIdComputation) { typeIdNum = computeConstructorIdFromString(line) } - const argsParsed = - args && !args.match(/\[ [a-z]+ ]/i) ? - args + const argsParsed + = args && !args.match(/\[ [a-z]+ \]/i) + ? args .trim() .split(' ') - .map((j) => j.split(':')) : - [] + .map(j => j.split(':')) + : [] const entry: TlEntry = { kind: currentKind, diff --git a/packages/tl-utils/src/patch.ts b/packages/tl-utils/src/patch.ts index 3a9cea2e..00c1ad26 100644 --- a/packages/tl-utils/src/patch.ts +++ b/packages/tl-utils/src/patch.ts @@ -1,11 +1,11 @@ -import { TlReaderMap, TlWriterMap } from '@mtcute/tl-runtime' +import type { TlReaderMap, TlWriterMap } from '@mtcute/tl-runtime' import { generateReaderCodeForTlEntries } from './codegen/reader.js' import { generateWriterCodeForTlEntries } from './codegen/writer.js' import { parseTlToEntries } from './parse.js' function evalForResult(js: string): T { - // eslint-disable-next-line @typescript-eslint/no-implied-eval + // eslint-disable-next-line ts/no-implied-eval, no-new-func return new Function(js)() as T } @@ -25,9 +25,9 @@ export function patchRuntimeTlSchema( readers: TlReaderMap, writers: TlWriterMap, ): { - readerMap: TlReaderMap - writerMap: TlWriterMap -} { + readerMap: TlReaderMap + writerMap: TlWriterMap + } { const entries = parseTlToEntries(schema, { parseMethodTypes: true }) const readersCode = generateReaderCodeForTlEntries(entries, { @@ -52,9 +52,7 @@ export function patchRuntimeTlSchema( ...newReaders._results, }, }, - // ts is not smart enough - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-expect-error + // @ts-expect-error ts is not smart enough writerMap: { ...writers, ...newWriters, diff --git a/packages/tl-utils/src/schema.test.ts b/packages/tl-utils/src/schema.test.ts index 1a645fee..dbf5a1ff 100644 --- a/packages/tl-utils/src/schema.test.ts +++ b/packages/tl-utils/src/schema.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest' import { writeTlEntriesToString } from './schema.js' -import { TlEntry } from './types.js' +import type { TlEntry } from './types.js' describe('writeTlEntriesToString', () => { const test = (entries: TlEntry[], params: Parameters[1], ...expected: string[]) => { diff --git a/packages/tl-utils/src/schema.ts b/packages/tl-utils/src/schema.ts index e5511e5f..bc36ed68 100644 --- a/packages/tl-utils/src/schema.ts +++ b/packages/tl-utils/src/schema.ts @@ -1,6 +1,6 @@ import { computeConstructorIdFromEntry } from './ctor-id.js' import { writeTlEntryToString } from './stringify.js' -import { TlEntry, TlFullSchema } from './types.js' +import type { TlEntry, TlFullSchema } from './types.js' const replaceNewlineInComment = (s: string): string => s.replace(/\n/g, '\n//- ') diff --git a/packages/tl-utils/src/stringify.test.ts b/packages/tl-utils/src/stringify.test.ts index 309c3d90..e8a1f023 100644 --- a/packages/tl-utils/src/stringify.test.ts +++ b/packages/tl-utils/src/stringify.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest' import { writeTlEntryToString } from './stringify.js' -import { TlArgument, TlEntry } from './types.js' +import type { TlArgument, TlEntry } from './types.js' describe('writeTlEntryToString', () => { const make = (name: string, type: string, ...args: string[]): TlEntry => ({ @@ -41,7 +41,7 @@ describe('writeTlEntryToString', () => { it('writes constructor id if available', () => { const entry = make('auth.logOut', 'Bool') - entry.id = 0xaef001df + entry.id = 0xAEF001DF test(entry, 'auth.logOut#aef001df = Bool;') }) diff --git a/packages/tl-utils/src/stringify.ts b/packages/tl-utils/src/stringify.ts index 3664957e..37625046 100644 --- a/packages/tl-utils/src/stringify.ts +++ b/packages/tl-utils/src/stringify.ts @@ -1,4 +1,4 @@ -import { TlEntry } from './types.js' +import type { TlEntry } from './types.js' import { stringifyArgumentType } from './utils.js' function normalizeType(s: string): string { @@ -21,7 +21,7 @@ export function writeTlEntryToString(entry: TlEntry, forIdComputation = false): let str = entry.name if (!forIdComputation && entry.id) { - str += '#' + entry.id.toString(16) + str += `#${entry.id.toString(16)}` } str += ' ' @@ -29,9 +29,9 @@ export function writeTlEntryToString(entry: TlEntry, forIdComputation = false): if (entry.generics) { for (const g of entry.generics) { if (forIdComputation) { - str += g.name + ':' + g.type + ' ' + str += `${g.name}:${g.type} ` } else { - str += '{' + g.name + ':' + g.type + '} ' + str += `{${g.name}:${g.type}} ` } } } @@ -41,23 +41,23 @@ export function writeTlEntryToString(entry: TlEntry, forIdComputation = false): continue } - str += arg.name + ':' + str += `${arg.name}:` const type = stringifyArgumentType(arg.type, arg.typeModifiers) if (forIdComputation) { - str += normalizeType(type) + ' ' + str += `${normalizeType(type)} ` } else { - str += type + ' ' + str += `${type} ` } } const type = entry.typeModifiers ? stringifyArgumentType(entry.type, entry.typeModifiers) : entry.type if (forIdComputation) { - str += '= ' + normalizeType(type) + str += `= ${normalizeType(type)}` } else { - str += '= ' + type + ';' + str += `= ${type};` } return str diff --git a/packages/tl-utils/src/utils.ts b/packages/tl-utils/src/utils.ts index c585185e..d25791c8 100644 --- a/packages/tl-utils/src/utils.ts +++ b/packages/tl-utils/src/utils.ts @@ -1,4 +1,4 @@ -import { TlEntry, TlTypeModifiers } from './types.js' +import type { TlEntry, TlTypeModifiers } from './types.js' /** * Split qualified TL entry name into namespace and name @@ -59,7 +59,7 @@ export function groupTlEntriesByNamespace(entries: TlEntry[]): Recordaccess_hash value from the {@link RawUser} constructor"}]},{"kind":"class","name":"inputPeerChannel","type":"InputPeer","id":666680316,"comment":"Defines a channel for further interaction.","arguments":[{"name":"channel_id","type":"int53","comment":"Channel identifier"},{"name":"access_hash","type":"long","comment":"access_hash value from the {@link RawChannel} constructor"}]},{"kind":"class","name":"inputPeerUserFromMessage","type":"InputPeer","id":2826635804,"comment":"Defines a min user that was seen in a certain message of a certain chat.","arguments":[{"name":"peer","type":"InputPeer","comment":"The chat where the user was seen"},{"name":"msg_id","type":"int","comment":"The message ID"},{"name":"user_id","type":"int53","comment":"The identifier of the user that was seen"}]},{"kind":"class","name":"inputPeerChannelFromMessage","type":"InputPeer","id":3173648448,"comment":"Defines a min channel that was seen in a certain message of a certain chat.","arguments":[{"name":"peer","type":"InputPeer","comment":"The chat where the channel's message was seen"},{"name":"msg_id","type":"int","comment":"The message ID"},{"name":"channel_id","type":"int53","comment":"The identifier of the channel that was seen"}]},{"kind":"class","name":"inputUserEmpty","type":"InputUser","id":3112732367,"comment":"Empty constructor, does not define a user.","arguments":[]},{"kind":"class","name":"inputUserSelf","type":"InputUser","id":4156666175,"comment":"Defines the current user.","arguments":[]},{"kind":"class","name":"inputUser","type":"InputUser","id":4061223110,"comment":"Defines a user for further interaction.","arguments":[{"name":"user_id","type":"int53","comment":"User identifier"},{"name":"access_hash","type":"long","comment":"access_hash value from the {@link RawUser} constructor"}]},{"kind":"class","name":"inputUserFromMessage","type":"InputUser","id":497305826,"comment":"Defines a min user that was seen in a certain message of a certain chat.","arguments":[{"name":"peer","type":"InputPeer","comment":"The chat where the user was seen"},{"name":"msg_id","type":"int","comment":"The message ID"},{"name":"user_id","type":"int53","comment":"The identifier of the user that was seen"}]},{"kind":"class","name":"inputPhoneContact","type":"InputContact","id":4086478836,"comment":"Phone contact.","arguments":[{"name":"client_id","type":"long","comment":"An arbitrary 64-bit integer: it should be set, for example, to an incremental number when using {@link contacts.RawImportContactsRequest}, in order to retry importing only the contacts that weren't imported successfully, according to the client_ids returned in {@link contacts.RawImportedContacts}.retry_contacts."},{"name":"phone","type":"string","comment":"Phone number"},{"name":"first_name","type":"string","comment":"Contact's first name"},{"name":"last_name","type":"string","comment":"Contact's last name"}]},{"kind":"class","name":"inputFile","type":"InputFile","id":4113560191,"comment":"Defines a file saved in parts using the method {@link upload.RawSaveFilePartRequest}.","arguments":[{"name":"id","type":"long","comment":"Random file identifier created by the client"},{"name":"parts","type":"int","comment":"Number of parts saved"},{"name":"name","type":"string","comment":"Full name of the file"},{"name":"md5_checksum","type":"string","comment":"In case the file's md5-hash was passed, contents of the file will be checked prior to use"}]},{"kind":"class","name":"inputFileBig","type":"InputFile","id":4199484341,"comment":"Assigns a big file (over 10 MB in size), saved in part using the method {@link upload.RawSaveBigFilePartRequest}.","arguments":[{"name":"id","type":"long","comment":"Random file id, created by the client"},{"name":"parts","type":"int","comment":"Number of parts saved"},{"name":"name","type":"string","comment":"Full file name"}]},{"kind":"class","name":"inputFileStoryDocument","type":"InputFile","id":1658620744,"comment":"Used to edit the thumbnail/static preview of a story, see here » for more info on the full flow.","arguments":[{"name":"id","type":"InputDocument","comment":"The old story video."}]},{"kind":"class","name":"inputMediaEmpty","type":"InputMedia","id":2523198847,"comment":"Empty media content of a message.","arguments":[]},{"kind":"class","name":"inputMediaUploadedPhoto","type":"InputMedia","id":505969924,"comment":"Photo","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"spoiler","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether this media should be hidden behind a spoiler warning"},{"name":"file","type":"InputFile","comment":"The uploaded file"},{"name":"stickers","type":"InputDocument","typeModifiers":{"predicate":"flags.0","isVector":true},"comment":"Attached mask stickers"},{"name":"ttl_seconds","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Time to live in seconds of self-destructing photo"}]},{"kind":"class","name":"inputMediaPhoto","type":"InputMedia","id":3015312949,"comment":"Forwarded photo","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"spoiler","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether this media should be hidden behind a spoiler warning"},{"name":"id","type":"InputPhoto","comment":"Photo to be forwarded"},{"name":"ttl_seconds","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Time to live in seconds of self-destructing photo"}]},{"kind":"class","name":"inputMediaGeoPoint","type":"InputMedia","id":4190388548,"comment":"Map.","arguments":[{"name":"geo_point","type":"InputGeoPoint","comment":"GeoPoint"}]},{"kind":"class","name":"inputMediaContact","type":"InputMedia","id":4171988475,"comment":"Phone book contact","arguments":[{"name":"phone_number","type":"string","comment":"Phone number"},{"name":"first_name","type":"string","comment":"Contact's first name"},{"name":"last_name","type":"string","comment":"Contact's last name"},{"name":"vcard","type":"string","comment":"Contact vcard"}]},{"kind":"class","name":"inputMediaUploadedDocument","type":"InputMedia","id":1530447553,"comment":"New document","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"nosound_video","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether the specified document is a video file with no audio tracks (a GIF animation (even as MPEG4), for example)"},{"name":"force_file","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"Force the media file to be uploaded as document"},{"name":"spoiler","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Whether this media should be hidden behind a spoiler warning"},{"name":"file","type":"InputFile","comment":"The uploaded file"},{"name":"thumb","type":"InputFile","typeModifiers":{"predicate":"flags.2"},"comment":"Thumbnail of the document, uploaded as for the file"},{"name":"mime_type","type":"string","comment":"MIME type of document"},{"name":"attributes","type":"DocumentAttribute","typeModifiers":{"isVector":true},"comment":"Attributes that specify the type of the document (video, audio, voice, sticker, etc.)"},{"name":"stickers","type":"InputDocument","typeModifiers":{"predicate":"flags.0","isVector":true},"comment":"Attached stickers"},{"name":"ttl_seconds","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Time to live in seconds of self-destructing document"}]},{"kind":"class","name":"inputMediaDocument","type":"InputMedia","id":860303448,"comment":"Forwarded document","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"spoiler","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether this media should be hidden behind a spoiler warning"},{"name":"id","type":"InputDocument","comment":"The document to be forwarded."},{"name":"ttl_seconds","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Time to live of self-destructing document"},{"name":"query","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Text query or emoji that was used by the user to find this sticker or GIF: used to improve search result relevance."}]},{"kind":"class","name":"inputMediaVenue","type":"InputMedia","id":3242007569,"comment":"Can be used to send a venue geolocation.","arguments":[{"name":"geo_point","type":"InputGeoPoint","comment":"Geolocation"},{"name":"title","type":"string","comment":"Venue name"},{"name":"address","type":"string","comment":"Physical address of the venue"},{"name":"provider","type":"string","comment":"Venue provider: currently only \"foursquare\" and \"gplaces\" (Google Places) need to be supported"},{"name":"venue_id","type":"string","comment":"Venue ID in the provider's database"},{"name":"venue_type","type":"string","comment":"Venue type in the provider's database"}]},{"kind":"class","name":"inputMediaPhotoExternal","type":"InputMedia","id":3854302746,"comment":"New photo that will be uploaded by the server using the specified URL","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"spoiler","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether this media should be hidden behind a spoiler warning"},{"name":"url","type":"string","comment":"URL of the photo"},{"name":"ttl_seconds","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Self-destruct time to live of photo"}]},{"kind":"class","name":"inputMediaDocumentExternal","type":"InputMedia","id":4216511641,"comment":"Document that will be downloaded by the telegram servers","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"spoiler","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether this media should be hidden behind a spoiler warning"},{"name":"url","type":"string","comment":"URL of the document"},{"name":"ttl_seconds","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Self-destruct time to live of document"}]},{"kind":"class","name":"inputMediaGame","type":"InputMedia","id":3544138739,"comment":"A game","arguments":[{"name":"id","type":"InputGame","comment":"The game to forward"}]},{"kind":"class","name":"inputMediaInvoice","type":"InputMedia","id":1080028941,"comment":"Generated invoice of a bot payment","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"title","type":"string","comment":"Product name, 1-32 characters"},{"name":"description","type":"string","comment":"Product description, 1-255 characters"},{"name":"photo","type":"InputWebDocument","typeModifiers":{"predicate":"flags.0"},"comment":"URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for."},{"name":"invoice","type":"Invoice","comment":"The actual invoice"},{"name":"payload","type":"bytes","comment":"Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes."},{"name":"provider","type":"string","typeModifiers":{"predicate":"flags.3"},"comment":"Payments provider token, obtained via Botfather"},{"name":"provider_data","type":"DataJSON","comment":"JSON-encoded data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider."},{"name":"start_param","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Unique bot deep links start parameter. If present, forwarded copies of the sent message will have a URL button with a deep link to the bot (instead of a Pay button), with the value used as the start parameter. If absent, forwarded copies of the sent message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using the same invoice."},{"name":"extended_media","type":"InputMedia","typeModifiers":{"predicate":"flags.2"},"comment":"Deprecated"}]},{"kind":"class","name":"inputMediaGeoLive","type":"InputMedia","id":2535434307,"comment":"Live geolocation","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"stopped","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether sending of the geolocation was stopped"},{"name":"geo_point","type":"InputGeoPoint","comment":"Current geolocation"},{"name":"heading","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"For live locations, a direction in which the location moves, in degrees; 1-360."},{"name":"period","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Validity period of the current location"},{"name":"proximity_notification_radius","type":"int","typeModifiers":{"predicate":"flags.3"},"comment":"For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000)"}]},{"kind":"class","name":"inputMediaPoll","type":"InputMedia","id":261416433,"comment":"A poll","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"poll","type":"Poll","comment":"The poll to send"},{"name":"correct_answers","type":"bytes","typeModifiers":{"predicate":"flags.0","isVector":true},"comment":"Correct answer IDs (for quiz polls)"},{"name":"solution","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Explanation of quiz solution"},{"name":"solution_entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.1","isVector":true},"comment":"Message entities for styled text"}]},{"kind":"class","name":"inputMediaDice","type":"InputMedia","id":3866083195,"comment":"Send a dice-based animated sticker","arguments":[{"name":"emoticon","type":"string","comment":"The emoji, for now \"🏀\", \"🎲\" and \"🎯\" are supported"}]},{"kind":"class","name":"inputMediaStory","type":"InputMedia","id":2315114360,"comment":"Forwarded story","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer where the story was posted"},{"name":"id","type":"int","comment":"Story ID"}]},{"kind":"class","name":"inputMediaWebPage","type":"InputMedia","id":3256584265,"comment":"Specifies options that will be used to generate the link preview for the caption, or even a standalone link preview without an attached message.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"force_large_media","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, specifies that a large media preview should be used."},{"name":"force_small_media","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"If set, specifies that a small media preview should be used."},{"name":"optional","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"If not set, a WEBPAGE_NOT_FOUND RPC error will be emitted if a webpage preview cannot be generated for the specified url; otherwise, no error will be emitted (unless the provided message is also empty, in which case a MESSAGE_EMPTY will be emitted, instead)."},{"name":"url","type":"string","comment":"The URL to use for the link preview."}]},{"kind":"class","name":"inputMediaPaidMedia","type":"InputMedia","id":2858819523,"comment":"Paid media, see here » for more info.","arguments":[{"name":"stars_amount","type":"long","comment":"The price of the media in Telegram Stars."},{"name":"extended_media","type":"InputMedia","typeModifiers":{"isVector":true},"comment":"Photos or videos."}]},{"kind":"class","name":"inputChatPhotoEmpty","type":"InputChatPhoto","id":480546647,"comment":"Empty constructor, remove group photo.","arguments":[]},{"kind":"class","name":"inputChatUploadedPhoto","type":"InputChatPhoto","id":3184373440,"comment":"New photo to be set as group profile photo.\n\nThe file, video and video_emoji_markup flags are mutually exclusive.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"file","type":"InputFile","typeModifiers":{"predicate":"flags.0"},"comment":"File saved in parts using the method {@link upload.RawSaveFilePartRequest}"},{"name":"video","type":"InputFile","typeModifiers":{"predicate":"flags.1"},"comment":"Square video for animated profile picture"},{"name":"video_start_ts","type":"double","typeModifiers":{"predicate":"flags.2"},"comment":"Floating point UNIX timestamp in seconds, indicating the frame of the video/sticker that should be used as static preview; can only be used if video or video_emoji_markup is set."},{"name":"video_emoji_markup","type":"VideoSize","typeModifiers":{"predicate":"flags.3"},"comment":"Animated sticker profile picture, must contain either a {@link RawVideoSizeEmojiMarkup} or a {@link RawVideoSizeStickerMarkup} constructor."}]},{"kind":"class","name":"inputChatPhoto","type":"InputChatPhoto","id":2303962423,"comment":"Existing photo to be set as a chat profile photo.","arguments":[{"name":"id","type":"InputPhoto","comment":"Existing photo"}]},{"kind":"class","name":"inputGeoPointEmpty","type":"InputGeoPoint","id":3837862870,"comment":"Empty GeoPoint constructor.","arguments":[]},{"kind":"class","name":"inputGeoPoint","type":"InputGeoPoint","id":1210199983,"comment":"Defines a GeoPoint by its coordinates.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"lat","type":"double","comment":"Latitude"},{"name":"long","type":"double","comment":"Longitude"},{"name":"accuracy_radius","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"The estimated horizontal accuracy of the location, in meters; as defined by the sender."}]},{"kind":"class","name":"inputPhotoEmpty","type":"InputPhoto","id":483901197,"comment":"Empty constructor.","arguments":[]},{"kind":"class","name":"inputPhoto","type":"InputPhoto","id":1001634122,"comment":"Defines a photo for further interaction.","arguments":[{"name":"id","type":"long","comment":"Photo identifier"},{"name":"access_hash","type":"long","comment":"access_hash value from the {@link RawPhoto} constructor"},{"name":"file_reference","type":"bytes","comment":"File reference"}]},{"kind":"class","name":"inputFileLocation","type":"InputFileLocation","id":3755650017,"comment":"DEPRECATED location of a photo","arguments":[{"name":"volume_id","type":"long","comment":"Server volume"},{"name":"local_id","type":"int","comment":"File identifier"},{"name":"secret","type":"long","comment":"Check sum to access the file"},{"name":"file_reference","type":"bytes","comment":"File reference"}]},{"kind":"class","name":"inputEncryptedFileLocation","type":"InputFileLocation","id":4112735573,"comment":"Location of encrypted secret chat file.","arguments":[{"name":"id","type":"long","comment":"File ID, id parameter value from {@link RawEncryptedFile}"},{"name":"access_hash","type":"long","comment":"Checksum, access_hash parameter value from {@link RawEncryptedFile}"}]},{"kind":"class","name":"inputDocumentFileLocation","type":"InputFileLocation","id":3134223748,"comment":"Document location (video, voice, audio, basically every type except photo)","arguments":[{"name":"id","type":"long","comment":"Document ID"},{"name":"access_hash","type":"long","comment":"access_hash parameter from the {@link RawDocument} constructor"},{"name":"file_reference","type":"bytes","comment":"File reference"},{"name":"thumb_size","type":"string","comment":"Thumbnail size to download the thumbnail"}]},{"kind":"class","name":"inputSecureFileLocation","type":"InputFileLocation","id":3418877480,"comment":"Location of encrypted telegram passport file.","arguments":[{"name":"id","type":"long","comment":"File ID, id parameter value from {@link RawSecureFile}"},{"name":"access_hash","type":"long","comment":"Checksum, access_hash parameter value from {@link RawSecureFile}"}]},{"kind":"class","name":"inputTakeoutFileLocation","type":"InputFileLocation","id":700340377,"comment":"Used to download a JSON file that will contain all personal data related to features that do not have a specialized takeout method yet, see here » for more info on the takeout API.","arguments":[]},{"kind":"class","name":"inputPhotoFileLocation","type":"InputFileLocation","id":1075322878,"comment":"Use this object to download a photo with {@link upload.RawGetFileRequest} method","arguments":[{"name":"id","type":"long","comment":"Photo ID, obtained from the {@link RawPhoto} object"},{"name":"access_hash","type":"long","comment":"Photo's access hash, obtained from the {@link RawPhoto} object"},{"name":"file_reference","type":"bytes","comment":"File reference"},{"name":"thumb_size","type":"string","comment":"The PhotoSize to download: must be set to the type field of the desired PhotoSize object of the {@link RawPhoto}"}]},{"kind":"class","name":"inputPhotoLegacyFileLocation","type":"InputFileLocation","id":3627312883,"comment":"DEPRECATED legacy photo file location","arguments":[{"name":"id","type":"long","comment":"Photo ID"},{"name":"access_hash","type":"long","comment":"Access hash"},{"name":"file_reference","type":"bytes","comment":"File reference"},{"name":"volume_id","type":"long","comment":"Volume ID"},{"name":"local_id","type":"int","comment":"Local ID"},{"name":"secret","type":"long","comment":"Secret"}]},{"kind":"class","name":"inputPeerPhotoFileLocation","type":"InputFileLocation","id":925204121,"comment":"Location of profile photo of channel/group/supergroup/user","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"big","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to download the high-quality version of the picture"},{"name":"peer","type":"InputPeer","comment":"The peer whose profile picture should be downloaded"},{"name":"photo_id","type":"long","comment":"Photo ID"}]},{"kind":"class","name":"inputStickerSetThumb","type":"InputFileLocation","id":2642736091,"comment":"Location of stickerset thumbnail (see files)","arguments":[{"name":"stickerset","type":"InputStickerSet","comment":"Sticker set"},{"name":"thumb_version","type":"int","comment":"Thumbnail version"}]},{"kind":"class","name":"inputGroupCallStream","type":"InputFileLocation","id":93890858,"comment":"Chunk of a livestream","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"call","type":"InputGroupCall","comment":"Livestream info"},{"name":"time_ms","type":"long","comment":"Timestamp in milliseconds"},{"name":"scale","type":"int","comment":"Specifies the duration of the video segment to fetch in milliseconds, by bitshifting 1000 to the right scale times: duration_ms := 1000 >> scale"},{"name":"video_channel","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Selected video channel"},{"name":"video_quality","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Selected video quality (0 = lowest, 1 = medium, 2 = best)"}]},{"kind":"class","name":"peerUser","type":"Peer","id":1498486562,"comment":"Chat partner","arguments":[{"name":"user_id","type":"int53","comment":"User identifier"}]},{"kind":"class","name":"peerChat","type":"Peer","id":918946202,"comment":"Group.","arguments":[{"name":"chat_id","type":"int53","comment":"Group identifier"}]},{"kind":"class","name":"peerChannel","type":"Peer","id":2728736542,"comment":"Channel/supergroup","arguments":[{"name":"channel_id","type":"int53","comment":"Channel ID"}]},{"kind":"class","name":"storage.fileUnknown","type":"storage.FileType","id":2861972229,"comment":"Unknown type.","arguments":[]},{"kind":"class","name":"storage.filePartial","type":"storage.FileType","id":1086091090,"comment":"Part of a bigger file.","arguments":[]},{"kind":"class","name":"storage.fileJpeg","type":"storage.FileType","id":8322574,"comment":"JPEG image. MIME type: image/jpeg.","arguments":[]},{"kind":"class","name":"storage.fileGif","type":"storage.FileType","id":3403786975,"comment":"GIF image. MIME type: image/gif.","arguments":[]},{"kind":"class","name":"storage.filePng","type":"storage.FileType","id":172975040,"comment":"PNG image. MIME type: image/png.","arguments":[]},{"kind":"class","name":"storage.filePdf","type":"storage.FileType","id":2921222285,"comment":"PDF document image. MIME type: application/pdf.","arguments":[]},{"kind":"class","name":"storage.fileMp3","type":"storage.FileType","id":1384777335,"comment":"Mp3 audio. MIME type: audio/mpeg.","arguments":[]},{"kind":"class","name":"storage.fileMov","type":"storage.FileType","id":1258941372,"comment":"Quicktime video. MIME type: video/quicktime.","arguments":[]},{"kind":"class","name":"storage.fileMp4","type":"storage.FileType","id":3016663268,"comment":"MPEG-4 video. MIME type: video/mp4.","arguments":[]},{"kind":"class","name":"storage.fileWebp","type":"storage.FileType","id":276907596,"comment":"WEBP image. MIME type: image/webp.","arguments":[]},{"kind":"class","name":"userEmpty","type":"User","id":3552332666,"comment":"Empty constructor, non-existent user.","arguments":[{"name":"id","type":"int53","comment":"User identifier or 0"}]},{"kind":"class","name":"user","type":"User","id":2201046986,"comment":"Indicates info about a certain user.\n\nUnless specified otherwise, when updating the local peer database, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).\n\nSee here » for an implementation of the logic to use when updating the local user peer database.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"self","type":"true","typeModifiers":{"predicate":"flags.10"},"comment":"Whether this user indicates the currently logged in user"},{"name":"contact","type":"true","typeModifiers":{"predicate":"flags.11"},"comment":"Whether this user is a contact
When updating the local peer database, do not apply changes to this field if the min flag is set."},{"name":"mutual_contact","type":"true","typeModifiers":{"predicate":"flags.12"},"comment":"Whether this user is a mutual contact.
When updating the local peer database, do not apply changes to this field if the min flag is set."},{"name":"deleted","type":"true","typeModifiers":{"predicate":"flags.13"},"comment":"Whether the account of this user was deleted.
Changes to this flag should invalidate the local {@link RawUserFull} cache for this user ID, see here » for more info."},{"name":"bot","type":"true","typeModifiers":{"predicate":"flags.14"},"comment":"Is this user a bot?
Changes to this flag should invalidate the local {@link RawUserFull} cache for this user ID, see here » for more info."},{"name":"bot_chat_history","type":"true","typeModifiers":{"predicate":"flags.15"},"comment":"Can the bot see all messages in groups?"},{"name":"bot_nochats","type":"true","typeModifiers":{"predicate":"flags.16"},"comment":"Can the bot be added to groups?"},{"name":"verified","type":"true","typeModifiers":{"predicate":"flags.17"},"comment":"Whether this user is verified"},{"name":"restricted","type":"true","typeModifiers":{"predicate":"flags.18"},"comment":"Access to this user must be restricted for the reason specified in restriction_reason"},{"name":"min","type":"true","typeModifiers":{"predicate":"flags.20"},"comment":"See min"},{"name":"bot_inline_geo","type":"true","typeModifiers":{"predicate":"flags.21"},"comment":"Whether the bot can request our geolocation in inline mode"},{"name":"support","type":"true","typeModifiers":{"predicate":"flags.23"},"comment":"Whether this is an official support user"},{"name":"scam","type":"true","typeModifiers":{"predicate":"flags.24"},"comment":"This may be a scam user"},{"name":"apply_min_photo","type":"true","typeModifiers":{"predicate":"flags.25"},"comment":"If set and min is set, the value of photo can be used to update the local database, see the documentation of that flag for more info."},{"name":"fake","type":"true","typeModifiers":{"predicate":"flags.26"},"comment":"If set, this user was reported by many users as a fake or scam user: be careful when interacting with them."},{"name":"bot_attach_menu","type":"true","typeModifiers":{"predicate":"flags.27"},"comment":"Whether this bot offers an attachment menu web app"},{"name":"premium","type":"true","typeModifiers":{"predicate":"flags.28"},"comment":"Whether this user is a Telegram Premium user
Changes to this flag should invalidate the local {@link RawUserFull} cache for this user ID, see here » for more info.
Changes to this flag if the self flag is set should also trigger the following calls, to refresh the respective caches:
- The {@link help.RawGetConfigRequest} cache
- The {@link messages.RawGetTopReactionsRequest} cache if the bot flag is not set"},{"name":"attach_menu_enabled","type":"true","typeModifiers":{"predicate":"flags.29"},"comment":"Whether we installed the attachment menu web app offered by this bot.
When updating the local peer database, do not apply changes to this field if the min flag is set."},{"name":"flags2","type":"#","comment":"Flags, see TL conditional fields"},{"name":"bot_can_edit","type":"true","typeModifiers":{"predicate":"flags2.1"},"comment":"Whether we can edit the profile picture, name, about text and description of this bot because we own it.
When updating the local peer database, do not apply changes to this field if the min flag is set.
Changes to this flag (if min is not set) should invalidate the local {@link RawUserFull} cache for this user ID."},{"name":"close_friend","type":"true","typeModifiers":{"predicate":"flags2.2"},"comment":"Whether we marked this user as a close friend, see here » for more info.
When updating the local peer database, do not apply changes to this field if the min flag is set."},{"name":"stories_hidden","type":"true","typeModifiers":{"predicate":"flags2.3"},"comment":"Whether we have hidden » all active stories of this user.
When updating the local peer database, do not apply changes to this field if the min flag is set."},{"name":"stories_unavailable","type":"true","typeModifiers":{"predicate":"flags2.4"},"comment":"No stories from this user are visible."},{"name":"contact_require_premium","type":"true","typeModifiers":{"predicate":"flags2.10"},"comment":"If set, we can only write to this user if they have already sent some messages to us, if we are subscribed to Telegram Premium, or if they're a mutual contact ({@link RawUser}.mutual_contact).
All the secondary conditions listed above must be checked separately to verify whether we can still write to the user, even if this flag is set (i.e. a mutual contact will have this flag set even if we can still write to them, and so on...); to avoid doing these extra checks if we haven't yet cached all the required information (for example while displaying the chat list in the sharing UI) the {@link users.RawGetIsPremiumRequiredToContactRequest} method may be invoked instead, passing the list of users currently visible in the UI, returning a list of booleans that directly specify whether we can or cannot write to each user; alternatively, the {@link RawUserFull}.contact_require_premium flag contains the same (fully checked, i.e. it's not just a copy of this flag) info returned by {@link users.RawGetIsPremiumRequiredToContactRequest}.
To set this flag for ourselves invoke {@link account.RawSetGlobalPrivacySettingsRequest}, setting the settings.new_noncontact_peers_require_premium flag."},{"name":"bot_business","type":"true","typeModifiers":{"predicate":"flags2.11"},"comment":"Whether this bot can be connected to a user as specified here »."},{"name":"bot_has_main_app","type":"true","typeModifiers":{"predicate":"flags2.13"},"comment":"If set, this bot has configured a Main Mini App »."},{"name":"id","type":"int53","comment":"ID of the user, see here » for more info."},{"name":"access_hash","type":"long","typeModifiers":{"predicate":"flags.0"},"comment":"Access hash of the user, see here » for more info.
If this flag is set, when updating the local peer database, generate a virtual flag called min_access_hash, which is:
- Set to true if min is set AND
- The phone flag is not set OR
- The phone flag is set and the associated phone number string is non-empty
- Set to false otherwise.

Then, apply both access_hash and min_access_hash to the local database if:
- min_access_hash is false OR
- min_access_hash is true AND
- There is no locally cached object for this user OR
- There is no access_hash in the local cache OR
- The cached object's min_access_hash is also true
If the final merged object stored to the database has the min_access_hash field set to true, the related access_hash is only suitable to use in {@link RawInputPeerPhotoFileLocation}, to directly download the profile pictures of users, everywhere else a inputPeer*FromMessage constructor will have to be generated as specified here ».
Bots can also use min access hashes in some conditions, by passing 0 instead of the min access hash."},{"name":"first_name","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"First name.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
- The min flag of the locally cached user entry is set."},{"name":"last_name","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"Last name.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
- The min flag of the locally cached user entry is set."},{"name":"username","type":"string","typeModifiers":{"predicate":"flags.3"},"comment":"Main active username.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
- The min flag of the locally cached user entry is set.
Changes to this flag should invalidate the local {@link RawUserFull} cache for this user ID if the above conditions are respected and the bot_can_edit flag is also set."},{"name":"phone","type":"string","typeModifiers":{"predicate":"flags.4"},"comment":"Phone number.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
- The min flag of the locally cached user entry is set."},{"name":"photo","type":"UserProfilePhoto","typeModifiers":{"predicate":"flags.5"},"comment":"Profile picture of user.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
- The apply_min_photo flag is set OR
- The min flag of the locally cached user entry is set."},{"name":"status","type":"UserStatus","typeModifiers":{"predicate":"flags.6"},"comment":"Online status of user.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
- The min flag of the locally cached user entry is set OR
- The locally cached user entry is equal to {@link RawUserStatusEmpty}."},{"name":"bot_info_version","type":"int","typeModifiers":{"predicate":"flags.14"},"comment":"Version of the {@link RawUserFull}, incremented every time it changes.
Changes to this flag should invalidate the local {@link RawUserFull} cache for this user ID, see here » for more info."},{"name":"restriction_reason","type":"RestrictionReason","typeModifiers":{"predicate":"flags.18","isVector":true},"comment":"Contains the reason why access to this user must be restricted."},{"name":"bot_inline_placeholder","type":"string","typeModifiers":{"predicate":"flags.19"},"comment":"Inline placeholder for this inline bot"},{"name":"lang_code","type":"string","typeModifiers":{"predicate":"flags.22"},"comment":"Language code of the user"},{"name":"emoji_status","type":"EmojiStatus","typeModifiers":{"predicate":"flags.30"},"comment":"Emoji status"},{"name":"usernames","type":"Username","typeModifiers":{"predicate":"flags2.0","isVector":true},"comment":"Additional usernames.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
- The min flag of the locally cached user entry is set.
Changes to this flag (if the above conditions are respected) should invalidate the local {@link RawUserFull} cache for this user ID."},{"name":"stories_max_id","type":"int","typeModifiers":{"predicate":"flags2.5"},"comment":"ID of the maximum read story.
When updating the local peer database, do not apply changes to this field if the min flag of the incoming constructor is set."},{"name":"color","type":"PeerColor","typeModifiers":{"predicate":"flags2.8"},"comment":"The user's accent color."},{"name":"profile_color","type":"PeerColor","typeModifiers":{"predicate":"flags2.9"},"comment":"The user's profile color."},{"name":"bot_active_users","type":"int","typeModifiers":{"predicate":"flags2.12"},"comment":"Monthly Active Users (MAU) of this bot (may be absent for small bots)."}]},{"kind":"class","name":"userProfilePhotoEmpty","type":"UserProfilePhoto","id":1326562017,"comment":"Profile photo has not been set, or was hidden.","arguments":[]},{"kind":"class","name":"userProfilePhoto","type":"UserProfilePhoto","id":2194798342,"comment":"User profile photo.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"has_video","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether an animated profile picture is available for this user"},{"name":"personal","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether this profile photo is only visible to us (i.e. it was set using {@link photos.RawUploadContactProfilePhotoRequest})."},{"name":"photo_id","type":"long","comment":"Identifier of the respective photo"},{"name":"stripped_thumb","type":"bytes","typeModifiers":{"predicate":"flags.1"},"comment":"Stripped thumbnail"},{"name":"dc_id","type":"int","comment":"DC ID where the photo is stored"}]},{"kind":"class","name":"userStatusEmpty","type":"UserStatus","id":164646985,"comment":"User status has not been set yet.","arguments":[]},{"kind":"class","name":"userStatusOnline","type":"UserStatus","id":3988339017,"comment":"Online status of the user.","arguments":[{"name":"expires","type":"int","comment":"Time to expiration of the current online status"}]},{"kind":"class","name":"userStatusOffline","type":"UserStatus","id":9203775,"comment":"The user's offline status.","arguments":[{"name":"was_online","type":"int","comment":"Time the user was last seen online"}]},{"kind":"class","name":"userStatusRecently","type":"UserStatus","id":2065268168,"comment":"Online status: last seen recently","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"by_me","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, the exact user status of this user is actually available to us, but to view it we must first purchase a Premium subscription, or allow this user to see our exact last online status. See {@link RawPrivacyKeyStatusTimestamp} for more info."}]},{"kind":"class","name":"userStatusLastWeek","type":"UserStatus","id":1410997530,"comment":"Online status: last seen last week","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"by_me","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, the exact user status of this user is actually available to us, but to view it we must first purchase a Premium subscription, or allow this user to see our exact last online status. See {@link RawPrivacyKeyStatusTimestamp} for more info."}]},{"kind":"class","name":"userStatusLastMonth","type":"UserStatus","id":1703516023,"comment":"Online status: last seen last month","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"by_me","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, the exact user status of this user is actually available to us, but to view it we must first purchase a Premium subscription, or allow this user to see our exact last online status. See {@link RawPrivacyKeyStatusTimestamp} for more info."}]},{"kind":"class","name":"chatEmpty","type":"Chat","id":693512293,"comment":"Empty constructor, group doesn't exist","arguments":[{"name":"id","type":"int53","comment":"Group identifier"}]},{"kind":"class","name":"chat","type":"Chat","id":1103884886,"comment":"Info about a group.\n\nWhen updating the local peer database, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).\n\nSee here » for an implementation of the logic to use when updating the local user peer database.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"creator","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the current user is the creator of the group"},{"name":"left","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether the current user has left the group"},{"name":"deactivated","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Whether the group was migrated"},{"name":"call_active","type":"true","typeModifiers":{"predicate":"flags.23"},"comment":"Whether a group call is currently active"},{"name":"call_not_empty","type":"true","typeModifiers":{"predicate":"flags.24"},"comment":"Whether there's anyone in the group call"},{"name":"noforwards","type":"true","typeModifiers":{"predicate":"flags.25"},"comment":"Whether this group is protected, thus does not allow forwarding messages from it"},{"name":"id","type":"int53","comment":"ID of the group, see here » for more info"},{"name":"title","type":"string","comment":"Title"},{"name":"photo","type":"ChatPhoto","comment":"Chat photo"},{"name":"participants_count","type":"int","comment":"Participant count"},{"name":"date","type":"int","comment":"Date of creation of the group"},{"name":"version","type":"int","comment":"Used in basic groups to reorder updates and make sure that all of them were received."},{"name":"migrated_to","type":"InputChannel","typeModifiers":{"predicate":"flags.6"},"comment":"Means this chat was upgraded to a supergroup"},{"name":"admin_rights","type":"ChatAdminRights","typeModifiers":{"predicate":"flags.14"},"comment":"Admin rights of the user in the group"},{"name":"default_banned_rights","type":"ChatBannedRights","typeModifiers":{"predicate":"flags.18"},"comment":"Default banned rights of all users in the group"}]},{"kind":"class","name":"chatForbidden","type":"Chat","id":1704108455,"comment":"A group to which the user has no access. E.g., because the user was kicked from the group.","arguments":[{"name":"id","type":"int53","comment":"User identifier"},{"name":"title","type":"string","comment":"Group name"}]},{"kind":"class","name":"channel","type":"Chat","id":179174543,"comment":"Channel/supergroup info\n\nWhen updating the local peer database, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).\n\nThe only exception to the above rule is when the min flag is set, in which case only the following fields must be applied over any locally stored version:\n\nSee here » for an implementation of the logic to use when updating the local user peer database.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"creator","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the current user is the creator of this channel"},{"name":"left","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether the current user has left or is not a member of this channel"},{"name":"broadcast","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Is this a channel?"},{"name":"verified","type":"true","typeModifiers":{"predicate":"flags.7"},"comment":"Is this channel verified by telegram?"},{"name":"megagroup","type":"true","typeModifiers":{"predicate":"flags.8"},"comment":"Is this a supergroup?
Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info."},{"name":"restricted","type":"true","typeModifiers":{"predicate":"flags.9"},"comment":"Whether viewing/writing in this channel for a reason (see restriction_reason)"},{"name":"signatures","type":"true","typeModifiers":{"predicate":"flags.11"},"comment":"Whether signatures are enabled (channels)"},{"name":"min","type":"true","typeModifiers":{"predicate":"flags.12"},"comment":"See min"},{"name":"scam","type":"true","typeModifiers":{"predicate":"flags.19"},"comment":"This channel/supergroup is probably a scam
Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info."},{"name":"has_link","type":"true","typeModifiers":{"predicate":"flags.20"},"comment":"Whether this channel has a linked discussion group » (or this supergroup is a channel's discussion group). The actual ID of the linked channel/supergroup is contained in {@link RawChannelFull}.linked_chat_id.
Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info."},{"name":"has_geo","type":"true","typeModifiers":{"predicate":"flags.21"},"comment":"Whether this channel has a geo position"},{"name":"slowmode_enabled","type":"true","typeModifiers":{"predicate":"flags.22"},"comment":"Whether slow mode is enabled for groups to prevent flood in chat.
Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info."},{"name":"call_active","type":"true","typeModifiers":{"predicate":"flags.23"},"comment":"Whether a group call or livestream is currently active"},{"name":"call_not_empty","type":"true","typeModifiers":{"predicate":"flags.24"},"comment":"Whether there's anyone in the group call or livestream"},{"name":"fake","type":"true","typeModifiers":{"predicate":"flags.25"},"comment":"If set, this supergroup/channel was reported by many users as a fake or scam: be careful when interacting with it.
Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info."},{"name":"gigagroup","type":"true","typeModifiers":{"predicate":"flags.26"},"comment":"Whether this supergroup is a gigagroup
Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info."},{"name":"noforwards","type":"true","typeModifiers":{"predicate":"flags.27"},"comment":"Whether this channel or group is protected, thus does not allow forwarding messages from it"},{"name":"join_to_send","type":"true","typeModifiers":{"predicate":"flags.28"},"comment":"Whether a user needs to join the supergroup before they can send messages: can be false only for discussion groups », toggle using {@link channels.RawToggleJoinToSendRequest}
Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info."},{"name":"join_request","type":"true","typeModifiers":{"predicate":"flags.29"},"comment":"Whether a user's join request will have to be approved by administrators, toggle using {@link channels.RawToggleJoinRequestRequest}
Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info."},{"name":"forum","type":"true","typeModifiers":{"predicate":"flags.30"},"comment":"Whether this supergroup is a forum.
Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info."},{"name":"flags2","type":"#","comment":"Flags, see TL conditional fields"},{"name":"stories_hidden","type":"true","typeModifiers":{"predicate":"flags2.1"},"comment":"Whether we have hidden all stories posted by this channel »."},{"name":"stories_hidden_min","type":"true","typeModifiers":{"predicate":"flags2.2"},"comment":"If set, indicates that the stories_hidden flag was not populated, and its value must cannot be relied on; use the previously cached value, or re-fetch the constructor using {@link channels.RawGetChannelsRequest} to obtain the latest value of the stories_hidden flag."},{"name":"stories_unavailable","type":"true","typeModifiers":{"predicate":"flags2.3"},"comment":"No stories from the channel are visible."},{"name":"id","type":"int53","comment":"ID of the channel, see here » for more info"},{"name":"access_hash","type":"long","typeModifiers":{"predicate":"flags.13"},"comment":"Access hash, see here » for more info"},{"name":"title","type":"string","comment":"Title"},{"name":"username","type":"string","typeModifiers":{"predicate":"flags.6"},"comment":"Main active username."},{"name":"photo","type":"ChatPhoto","comment":"Profile photo"},{"name":"date","type":"int","comment":"Date when the user joined the supergroup/channel, or if the user isn't a member, its creation date"},{"name":"restriction_reason","type":"RestrictionReason","typeModifiers":{"predicate":"flags.9","isVector":true},"comment":"Contains the reason why access to this channel must be restricted.
Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info."},{"name":"admin_rights","type":"ChatAdminRights","typeModifiers":{"predicate":"flags.14"},"comment":"Admin rights of the user in this channel (see rights)"},{"name":"banned_rights","type":"ChatBannedRights","typeModifiers":{"predicate":"flags.15"},"comment":"Banned rights of the user in this channel (see rights)"},{"name":"default_banned_rights","type":"ChatBannedRights","typeModifiers":{"predicate":"flags.18"},"comment":"Default chat rights (see rights)"},{"name":"participants_count","type":"int","typeModifiers":{"predicate":"flags.17"},"comment":"Participant count"},{"name":"usernames","type":"Username","typeModifiers":{"predicate":"flags2.0","isVector":true},"comment":"Additional usernames"},{"name":"stories_max_id","type":"int","typeModifiers":{"predicate":"flags2.4"},"comment":"ID of the maximum read story."},{"name":"color","type":"PeerColor","typeModifiers":{"predicate":"flags2.7"},"comment":"The channel's accent color."},{"name":"profile_color","type":"PeerColor","typeModifiers":{"predicate":"flags2.8"},"comment":"The channel's profile color."},{"name":"emoji_status","type":"EmojiStatus","typeModifiers":{"predicate":"flags2.9"},"comment":"Emoji status"},{"name":"level","type":"int","typeModifiers":{"predicate":"flags2.10"},"comment":"Boost level.
Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info."}]},{"kind":"class","name":"channelForbidden","type":"Chat","id":399807445,"comment":"Indicates a channel/supergroup we can't access because we were banned, or for some other reason.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"broadcast","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Is this a channel"},{"name":"megagroup","type":"true","typeModifiers":{"predicate":"flags.8"},"comment":"Is this a supergroup"},{"name":"id","type":"int53","comment":"Channel ID"},{"name":"access_hash","type":"long","comment":"Access hash"},{"name":"title","type":"string","comment":"Title"},{"name":"until_date","type":"int","typeModifiers":{"predicate":"flags.16"},"comment":"The ban is valid until the specified date"}]},{"kind":"class","name":"chatFull","type":"ChatFull","id":640893467,"comment":"Full info about a basic group.\n\nWhen updating the local peer database », all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"can_set_username","type":"true","typeModifiers":{"predicate":"flags.7"},"comment":"Can we change the username of this chat"},{"name":"has_scheduled","type":"true","typeModifiers":{"predicate":"flags.8"},"comment":"Whether scheduled messages are available"},{"name":"translations_disabled","type":"true","typeModifiers":{"predicate":"flags.19"},"comment":"Whether the real-time chat translation popup should be hidden."},{"name":"id","type":"int53","comment":"ID of the chat"},{"name":"about","type":"string","comment":"About string for this chat"},{"name":"participants","type":"ChatParticipants","comment":"Participant list"},{"name":"chat_photo","type":"Photo","typeModifiers":{"predicate":"flags.2"},"comment":"Chat photo"},{"name":"notify_settings","type":"PeerNotifySettings","comment":"Notification settings"},{"name":"exported_invite","type":"ExportedChatInvite","typeModifiers":{"predicate":"flags.13"},"comment":"Chat invite"},{"name":"bot_info","type":"BotInfo","typeModifiers":{"predicate":"flags.3","isVector":true},"comment":"Info about bots that are in this chat"},{"name":"pinned_msg_id","type":"int","typeModifiers":{"predicate":"flags.6"},"comment":"Message ID of the last pinned message"},{"name":"folder_id","type":"int","typeModifiers":{"predicate":"flags.11"},"comment":"Peer folder ID, for more info click here"},{"name":"call","type":"InputGroupCall","typeModifiers":{"predicate":"flags.12"},"comment":"Group call information"},{"name":"ttl_period","type":"int","typeModifiers":{"predicate":"flags.14"},"comment":"Time-To-Live of messages sent by the current user to this chat"},{"name":"groupcall_default_join_as","type":"Peer","typeModifiers":{"predicate":"flags.15"},"comment":"When using {@link phone.RawGetGroupCallJoinAsRequest} to get a list of peers that can be used to join a group call, this field indicates the peer that should be selected by default."},{"name":"theme_emoticon","type":"string","typeModifiers":{"predicate":"flags.16"},"comment":"Emoji representing a specific chat theme"},{"name":"requests_pending","type":"int","typeModifiers":{"predicate":"flags.17"},"comment":"Pending join requests »"},{"name":"recent_requesters","type":"long","typeModifiers":{"predicate":"flags.17","isVector":true},"comment":"IDs of users who requested to join recently"},{"name":"available_reactions","type":"ChatReactions","typeModifiers":{"predicate":"flags.18"},"comment":"Allowed message reactions »"},{"name":"reactions_limit","type":"int","typeModifiers":{"predicate":"flags.20"},"comment":"This flag may be used to impose a custom limit of unique reactions (i.e. a customizable version of appConfig.reactions_uniq_max)."}]},{"kind":"class","name":"channelFull","type":"ChatFull","id":3148559501,"comment":"Full info about a channel, supergroup or gigagroup.\n\nWhen updating the local peer database », all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"can_view_participants","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Can we view the participant list?"},{"name":"can_set_username","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"Can we set the channel's username?"},{"name":"can_set_stickers","type":"true","typeModifiers":{"predicate":"flags.7"},"comment":"Can we {@link channels.RawSetStickersRequest} a stickerpack to the supergroup?"},{"name":"hidden_prehistory","type":"true","typeModifiers":{"predicate":"flags.10"},"comment":"Is the history before we joined hidden to us?"},{"name":"can_set_location","type":"true","typeModifiers":{"predicate":"flags.16"},"comment":"Can we set the geolocation of this group (for geogroups)"},{"name":"has_scheduled","type":"true","typeModifiers":{"predicate":"flags.19"},"comment":"Whether scheduled messages are available"},{"name":"can_view_stats","type":"true","typeModifiers":{"predicate":"flags.20"},"comment":"Can the user view channel/supergroup statistics"},{"name":"blocked","type":"true","typeModifiers":{"predicate":"flags.22"},"comment":"Whether any anonymous admin of this supergroup was blocked: if set, you won't receive messages from anonymous group admins in discussion replies via @replies"},{"name":"flags2","type":"#","comment":"Flags, see TL conditional fields"},{"name":"can_delete_channel","type":"true","typeModifiers":{"predicate":"flags2.0"},"comment":"Can we delete this channel?"},{"name":"antispam","type":"true","typeModifiers":{"predicate":"flags2.1"},"comment":"Whether native antispam functionality is enabled in this supergroup."},{"name":"participants_hidden","type":"true","typeModifiers":{"predicate":"flags2.2"},"comment":"Whether the participant list is hidden."},{"name":"translations_disabled","type":"true","typeModifiers":{"predicate":"flags2.3"},"comment":"Whether the real-time chat translation popup should be hidden."},{"name":"stories_pinned_available","type":"true","typeModifiers":{"predicate":"flags2.5"},"comment":"Whether this user has some pinned stories."},{"name":"view_forum_as_messages","type":"true","typeModifiers":{"predicate":"flags2.6"},"comment":"Users may also choose to display messages from all topics of a forum as if they were sent to a normal group, using a \"View as messages\" setting in the local client.
This setting only affects the current account, and is synced to other logged in sessions using the {@link channels.RawToggleViewForumAsMessagesRequest} method; invoking this method will update the value of this flag."},{"name":"restricted_sponsored","type":"true","typeModifiers":{"predicate":"flags2.11"},"comment":"Whether ads on this channel were disabled as specified here » (this flag is only visible to the owner of the channel)."},{"name":"can_view_revenue","type":"true","typeModifiers":{"predicate":"flags2.12"},"comment":"If set, this user can view ad revenue statistics » for this channel."},{"name":"paid_media_allowed","type":"true","typeModifiers":{"predicate":"flags2.14"},"comment":"Whether the current user can send or forward paid media » to this channel."},{"name":"can_view_stars_revenue","type":"true","typeModifiers":{"predicate":"flags2.15"},"comment":"If set, this user can view Telegram Star revenue statistics » for this channel."},{"name":"id","type":"int53","comment":"ID of the channel"},{"name":"about","type":"string","comment":"Info about the channel"},{"name":"participants_count","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Number of participants of the channel"},{"name":"admins_count","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Number of channel admins"},{"name":"kicked_count","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"Number of users kicked from the channel"},{"name":"banned_count","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"Number of users banned from the channel"},{"name":"online_count","type":"int","typeModifiers":{"predicate":"flags.13"},"comment":"Number of users currently online"},{"name":"read_inbox_max_id","type":"int","comment":"Position up to which all incoming messages are read."},{"name":"read_outbox_max_id","type":"int","comment":"Position up to which all outgoing messages are read."},{"name":"unread_count","type":"int","comment":"Count of unread messages"},{"name":"chat_photo","type":"Photo","comment":"Channel picture"},{"name":"notify_settings","type":"PeerNotifySettings","comment":"Notification settings"},{"name":"exported_invite","type":"ExportedChatInvite","typeModifiers":{"predicate":"flags.23"},"comment":"Invite link"},{"name":"bot_info","type":"BotInfo","typeModifiers":{"isVector":true},"comment":"Info about bots in the channel/supergroup"},{"name":"migrated_from_chat_id","type":"long","typeModifiers":{"predicate":"flags.4"},"comment":"The chat ID from which this group was migrated"},{"name":"migrated_from_max_id","type":"int","typeModifiers":{"predicate":"flags.4"},"comment":"The message ID in the original chat at which this group was migrated"},{"name":"pinned_msg_id","type":"int","typeModifiers":{"predicate":"flags.5"},"comment":"Message ID of the last pinned message"},{"name":"stickerset","type":"StickerSet","typeModifiers":{"predicate":"flags.8"},"comment":"Associated stickerset"},{"name":"available_min_id","type":"int","typeModifiers":{"predicate":"flags.9"},"comment":"Identifier of a maximum unavailable message in a channel due to hidden history."},{"name":"folder_id","type":"int","typeModifiers":{"predicate":"flags.11"},"comment":"Peer folder ID, for more info click here"},{"name":"linked_chat_id","type":"int53","typeModifiers":{"predicate":"flags.14"},"comment":"ID of the linked discussion chat for channels (and vice versa, the ID of the linked channel for discussion chats)."},{"name":"location","type":"ChannelLocation","typeModifiers":{"predicate":"flags.15"},"comment":"Location of the geo group"},{"name":"slowmode_seconds","type":"int","typeModifiers":{"predicate":"flags.17"},"comment":"If specified, users in supergroups will only be able to send one message every slowmode_seconds seconds"},{"name":"slowmode_next_send_date","type":"int","typeModifiers":{"predicate":"flags.18"},"comment":"Indicates when the user will be allowed to send another message in the supergroup (unixtime)"},{"name":"stats_dc","type":"int","typeModifiers":{"predicate":"flags.12"},"comment":"If set, specifies the DC to use for fetching channel statistics"},{"name":"pts","type":"int","comment":"Latest PTS for this channel"},{"name":"call","type":"InputGroupCall","typeModifiers":{"predicate":"flags.21"},"comment":"Livestream or group call information"},{"name":"ttl_period","type":"int","typeModifiers":{"predicate":"flags.24"},"comment":"Time-To-Live of messages in this channel or supergroup"},{"name":"pending_suggestions","type":"string","typeModifiers":{"predicate":"flags.25","isVector":true},"comment":"A list of suggested actions for the supergroup admin, see here for more info »."},{"name":"groupcall_default_join_as","type":"Peer","typeModifiers":{"predicate":"flags.26"},"comment":"When using {@link phone.RawGetGroupCallJoinAsRequest} to get a list of peers that can be used to join a group call, this field indicates the peer that should be selected by default."},{"name":"theme_emoticon","type":"string","typeModifiers":{"predicate":"flags.27"},"comment":"Emoji representing a specific chat theme"},{"name":"requests_pending","type":"int","typeModifiers":{"predicate":"flags.28"},"comment":"Pending join requests »"},{"name":"recent_requesters","type":"long","typeModifiers":{"predicate":"flags.28","isVector":true},"comment":"IDs of users who requested to join recently"},{"name":"default_send_as","type":"Peer","typeModifiers":{"predicate":"flags.29"},"comment":"Default peer used for sending messages to this channel"},{"name":"available_reactions","type":"ChatReactions","typeModifiers":{"predicate":"flags.30"},"comment":"Allowed message reactions »"},{"name":"reactions_limit","type":"int","typeModifiers":{"predicate":"flags2.13"},"comment":"This flag may be used to impose a custom limit of unique reactions (i.e. a customizable version of appConfig.reactions_uniq_max)."},{"name":"stories","type":"PeerStories","typeModifiers":{"predicate":"flags2.4"},"comment":"Channel stories"},{"name":"wallpaper","type":"WallPaper","typeModifiers":{"predicate":"flags2.7"},"comment":"Wallpaper"},{"name":"boosts_applied","type":"int","typeModifiers":{"predicate":"flags2.8"},"comment":"The number of boosts the current user has applied to the current supergroup."},{"name":"boosts_unrestrict","type":"int","typeModifiers":{"predicate":"flags2.9"},"comment":"The number of boosts this supergroup requires to bypass slowmode and other restrictions, see here » for more info."},{"name":"emojiset","type":"StickerSet","typeModifiers":{"predicate":"flags2.10"},"comment":"Custom emoji stickerset associated to the current supergroup, set using {@link channels.RawSetEmojiStickersRequest} after reaching the appropriate boost level, see here » for more info."}]},{"kind":"class","name":"chatParticipant","type":"ChatParticipant","id":3224190983,"comment":"Group member.","arguments":[{"name":"user_id","type":"int53","comment":"Member user ID"},{"name":"inviter_id","type":"int53","comment":"ID of the user that added the member to the group"},{"name":"date","type":"int","comment":"Date added to the group"}]},{"kind":"class","name":"chatParticipantCreator","type":"ChatParticipant","id":3832270564,"comment":"Represents the creator of the group","arguments":[{"name":"user_id","type":"int53","comment":"ID of the user that created the group"}]},{"kind":"class","name":"chatParticipantAdmin","type":"ChatParticipant","id":2694004571,"comment":"Chat admin","arguments":[{"name":"user_id","type":"int53","comment":"ID of a group member that is admin"},{"name":"inviter_id","type":"int53","comment":"ID of the user that added the member to the group"},{"name":"date","type":"int","comment":"Date when the user was added"}]},{"kind":"class","name":"chatParticipantsForbidden","type":"ChatParticipants","id":2271466465,"comment":"Info on members is unavailable","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"chat_id","type":"int53","comment":"Group ID"},{"name":"self_participant","type":"ChatParticipant","typeModifiers":{"predicate":"flags.0"},"comment":"Info about the group membership of the current user"}]},{"kind":"class","name":"chatParticipants","type":"ChatParticipants","id":1018991608,"comment":"Group members.","arguments":[{"name":"chat_id","type":"int53","comment":"Group identifier"},{"name":"participants","type":"ChatParticipant","typeModifiers":{"isVector":true},"comment":"List of group members"},{"name":"version","type":"int","comment":"Group version number"}]},{"kind":"class","name":"chatPhotoEmpty","type":"ChatPhoto","id":935395612,"comment":"Group photo is not set.","arguments":[]},{"kind":"class","name":"chatPhoto","type":"ChatPhoto","id":476978193,"comment":"Group profile photo.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"has_video","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the user has an animated profile picture"},{"name":"photo_id","type":"long","comment":"Photo ID"},{"name":"stripped_thumb","type":"bytes","typeModifiers":{"predicate":"flags.1"},"comment":"Stripped thumbnail"},{"name":"dc_id","type":"int","comment":"DC where this photo is stored"}]},{"kind":"class","name":"messageEmpty","type":"Message","id":2426849924,"comment":"Empty constructor, non-existent message.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"id","type":"int","comment":"Message identifier"},{"name":"peer_id","type":"Peer","typeModifiers":{"predicate":"flags.0"},"comment":"Peer ID, the chat where this message was sent"}]},{"kind":"class","name":"message","type":"Message","id":2486456898,"comment":"A message","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"out","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Is this an outgoing message"},{"name":"mentioned","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"Whether we were mentioned in this message"},{"name":"media_unread","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Whether there are unread media attachments in this message"},{"name":"silent","type":"true","typeModifiers":{"predicate":"flags.13"},"comment":"Whether this is a silent message (no notification triggered)"},{"name":"post","type":"true","typeModifiers":{"predicate":"flags.14"},"comment":"Whether this is a channel post"},{"name":"from_scheduled","type":"true","typeModifiers":{"predicate":"flags.18"},"comment":"Whether this is a scheduled message"},{"name":"legacy","type":"true","typeModifiers":{"predicate":"flags.19"},"comment":"This is a legacy message: it has to be refetched with the new layer"},{"name":"edit_hide","type":"true","typeModifiers":{"predicate":"flags.21"},"comment":"Whether the message should be shown as not modified to the user, even if an edit date is present"},{"name":"pinned","type":"true","typeModifiers":{"predicate":"flags.24"},"comment":"Whether this message is pinned"},{"name":"noforwards","type":"true","typeModifiers":{"predicate":"flags.26"},"comment":"Whether this message is protected and thus cannot be forwarded; clients should also prevent users from saving attached media (i.e. videos should only be streamed, photos should be kept in RAM, et cetera)."},{"name":"invert_media","type":"true","typeModifiers":{"predicate":"flags.27"},"comment":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom."},{"name":"flags2","type":"#","comment":"Flags, see TL conditional fields"},{"name":"offline","type":"true","typeModifiers":{"predicate":"flags2.1"},"comment":"If set, the message was sent because of a scheduled action by the message sender, for example, as away, or a greeting service message."},{"name":"id","type":"int","comment":"ID of the message"},{"name":"from_id","type":"Peer","typeModifiers":{"predicate":"flags.8"},"comment":"ID of the sender of the message"},{"name":"from_boosts_applied","type":"int","typeModifiers":{"predicate":"flags.29"},"comment":"Supergroups only, contains the number of boosts this user has given the current supergroup, and should be shown in the UI in the header of the message.
Only present for incoming messages from non-anonymous supergroup members that have boosted the supergroup.
Note that this counter should be locally overridden for non-anonymous outgoing messages, according to the current value of {@link RawChannelFull}.boosts_applied, to ensure the value is correct even for messages sent by the current user before a supergroup was boosted (or after a boost has expired or the number of boosts has changed); do not update this value for incoming messages from other users, even if their boosts have changed."},{"name":"peer_id","type":"Peer","comment":"Peer ID, the chat where this message was sent"},{"name":"saved_peer_id","type":"Peer","typeModifiers":{"predicate":"flags.28"},"comment":"Messages fetched from a saved messages dialog » will have peer={@link RawInputPeerSelf} and the saved_peer_id flag set to the ID of the saved dialog.
"},{"name":"fwd_from","type":"MessageFwdHeader","typeModifiers":{"predicate":"flags.2"},"comment":"Info about forwarded messages"},{"name":"via_bot_id","type":"int53","typeModifiers":{"predicate":"flags.11"},"comment":"ID of the inline bot that generated the message"},{"name":"via_business_bot_id","type":"int53","typeModifiers":{"predicate":"flags2.0"},"comment":"Whether the message was sent by the business bot specified in via_bot_id on behalf of the user."},{"name":"reply_to","type":"MessageReplyHeader","typeModifiers":{"predicate":"flags.3"},"comment":"Reply information"},{"name":"date","type":"int","comment":"Date of the message"},{"name":"message","type":"string","comment":"The message"},{"name":"media","type":"MessageMedia","typeModifiers":{"predicate":"flags.9"},"comment":"Media attachment"},{"name":"reply_markup","type":"ReplyMarkup","typeModifiers":{"predicate":"flags.6"},"comment":"Reply markup (bot/inline keyboards)"},{"name":"entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.7","isVector":true},"comment":"Message entities for styled text"},{"name":"views","type":"int","typeModifiers":{"predicate":"flags.10"},"comment":"View count for channel posts"},{"name":"forwards","type":"int","typeModifiers":{"predicate":"flags.10"},"comment":"Forward counter"},{"name":"replies","type":"MessageReplies","typeModifiers":{"predicate":"flags.23"},"comment":"Info about post comments (for channels) or message replies (for groups)"},{"name":"edit_date","type":"int","typeModifiers":{"predicate":"flags.15"},"comment":"Last edit date of this message"},{"name":"post_author","type":"string","typeModifiers":{"predicate":"flags.16"},"comment":"Name of the author of this message for channel posts (with signatures enabled)"},{"name":"grouped_id","type":"long","typeModifiers":{"predicate":"flags.17"},"comment":"Multiple media messages sent using {@link messages.RawSendMultiMediaRequest} with the same grouped ID indicate an album or media group"},{"name":"reactions","type":"MessageReactions","typeModifiers":{"predicate":"flags.20"},"comment":"Reactions to this message"},{"name":"restriction_reason","type":"RestrictionReason","typeModifiers":{"predicate":"flags.22","isVector":true},"comment":"Contains the reason why access to this message must be restricted."},{"name":"ttl_period","type":"int","typeModifiers":{"predicate":"flags.25"},"comment":"Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well."},{"name":"quick_reply_shortcut_id","type":"int","typeModifiers":{"predicate":"flags.30"},"comment":"If set, this message is a quick reply shortcut message » (note that quick reply shortcut messages sent to a private chat will not have this field set)."},{"name":"effect","type":"long","typeModifiers":{"predicate":"flags2.2"},"comment":"A message effect that should be played as specified here »."},{"name":"factcheck","type":"FactCheck","typeModifiers":{"predicate":"flags2.3"},"comment":"Represents a fact-check »."}]},{"kind":"class","name":"messageService","type":"Message","id":721967202,"comment":"Indicates a service message","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"out","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the message is outgoing"},{"name":"mentioned","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"Whether we were mentioned in the message"},{"name":"media_unread","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Whether the message contains unread media"},{"name":"silent","type":"true","typeModifiers":{"predicate":"flags.13"},"comment":"Whether the message is silent"},{"name":"post","type":"true","typeModifiers":{"predicate":"flags.14"},"comment":"Whether it's a channel post"},{"name":"legacy","type":"true","typeModifiers":{"predicate":"flags.19"},"comment":"This is a legacy message: it has to be refetched with the new layer"},{"name":"id","type":"int","comment":"Message ID"},{"name":"from_id","type":"Peer","typeModifiers":{"predicate":"flags.8"},"comment":"ID of the sender of this message"},{"name":"peer_id","type":"Peer","comment":"Sender of service message"},{"name":"reply_to","type":"MessageReplyHeader","typeModifiers":{"predicate":"flags.3"},"comment":"Reply (thread) information"},{"name":"date","type":"int","comment":"Message date"},{"name":"action","type":"MessageAction","comment":"Event connected with the service message"},{"name":"ttl_period","type":"int","typeModifiers":{"predicate":"flags.25"},"comment":"Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well."}]},{"kind":"class","name":"messageMediaEmpty","type":"MessageMedia","id":1038967584,"comment":"Empty constructor.","arguments":[]},{"kind":"class","name":"messageMediaPhoto","type":"MessageMedia","id":1766936791,"comment":"Attached photo.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"spoiler","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether this media should be hidden behind a spoiler warning"},{"name":"photo","type":"Photo","typeModifiers":{"predicate":"flags.0"},"comment":"Photo"},{"name":"ttl_seconds","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"Time to live in seconds of self-destructing photo"}]},{"kind":"class","name":"messageMediaGeo","type":"MessageMedia","id":1457575028,"comment":"Attached map.","arguments":[{"name":"geo","type":"GeoPoint","comment":"GeoPoint"}]},{"kind":"class","name":"messageMediaContact","type":"MessageMedia","id":1882335561,"comment":"Attached contact.","arguments":[{"name":"phone_number","type":"string","comment":"Phone number"},{"name":"first_name","type":"string","comment":"Contact's first name"},{"name":"last_name","type":"string","comment":"Contact's last name"},{"name":"vcard","type":"string","comment":"VCARD of contact"},{"name":"user_id","type":"int53","comment":"User identifier or 0, if the user with the given phone number is not registered"}]},{"kind":"class","name":"messageMediaUnsupported","type":"MessageMedia","id":2676290718,"comment":"Current version of the client does not support this media type.","arguments":[]},{"kind":"class","name":"messageMediaDocument","type":"MessageMedia","id":1291114285,"comment":"Document (video, audio, voice, sticker, any media type except photo)","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"nopremium","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether this is a normal sticker, if not set this is a premium sticker and a premium sticker animation must be played."},{"name":"spoiler","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"Whether this media should be hidden behind a spoiler warning"},{"name":"video","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"Whether this is a video."},{"name":"round","type":"true","typeModifiers":{"predicate":"flags.7"},"comment":"Whether this is a round video."},{"name":"voice","type":"true","typeModifiers":{"predicate":"flags.8"},"comment":"Whether this is a voice message."},{"name":"document","type":"Document","typeModifiers":{"predicate":"flags.0"},"comment":"Attached document"},{"name":"alt_document","type":"Document","typeModifiers":{"predicate":"flags.5"},"comment":"Currently only used for story videos, may contain an alternative version of the story video, explicitly encoded using H.264 (in MPEG4 transport) at a lower resolution than document."},{"name":"ttl_seconds","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"Time to live of self-destructing document"}]},{"kind":"class","name":"messageMediaWebPage","type":"MessageMedia","id":3723562043,"comment":"Preview of webpage","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"force_large_media","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, specifies that a large media preview should be used."},{"name":"force_small_media","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"If set, specifies that a small media preview should be used."},{"name":"manual","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"If set, indicates that the URL used for the webpage preview was specified manually using {@link RawInputMediaWebPage}, and may not be related to any of the URLs specified in the message."},{"name":"safe","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"If set, the webpage can be opened directly without user confirmation; otherwise, user confirmation is required, showing the exact URL that will be opened."},{"name":"webpage","type":"WebPage","comment":"Webpage preview"}]},{"kind":"class","name":"messageMediaVenue","type":"MessageMedia","id":784356159,"comment":"Venue","arguments":[{"name":"geo","type":"GeoPoint","comment":"Geolocation of venue"},{"name":"title","type":"string","comment":"Venue name"},{"name":"address","type":"string","comment":"Address"},{"name":"provider","type":"string","comment":"Venue provider: currently only \"foursquare\" and \"gplaces\" (Google Places) need to be supported"},{"name":"venue_id","type":"string","comment":"Venue ID in the provider's database"},{"name":"venue_type","type":"string","comment":"Venue type in the provider's database"}]},{"kind":"class","name":"messageMediaGame","type":"MessageMedia","id":4256272392,"comment":"Telegram game","arguments":[{"name":"game","type":"Game","comment":"Game"}]},{"kind":"class","name":"messageMediaInvoice","type":"MessageMedia","id":4138027219,"comment":"Invoice","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"shipping_address_requested","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the shipping address was requested"},{"name":"test","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether this is an example invoice"},{"name":"title","type":"string","comment":"Product name, 1-32 characters"},{"name":"description","type":"string","comment":"Product description, 1-255 characters"},{"name":"photo","type":"WebDocument","typeModifiers":{"predicate":"flags.0"},"comment":"URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for."},{"name":"receipt_msg_id","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"Message ID of receipt: if set, clients should change the text of the first {@link RawKeyboardButtonBuy} button always attached to the {@link RawMessage} to a localized version of the word Receipt"},{"name":"currency","type":"string","comment":"Three-letter ISO 4217 currency code, or XTR for Telegram Stars."},{"name":"total_amount","type":"long","comment":"Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."},{"name":"start_param","type":"string","comment":"Unique bot deep-linking parameter that can be used to generate this invoice"},{"name":"extended_media","type":"MessageExtendedMedia","typeModifiers":{"predicate":"flags.4"},"comment":"Deprecated"}]},{"kind":"class","name":"messageMediaGeoLive","type":"MessageMedia","id":3108030054,"comment":"Indicates a live geolocation","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"geo","type":"GeoPoint","comment":"Geolocation"},{"name":"heading","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"For live locations, a direction in which the location moves, in degrees; 1-360"},{"name":"period","type":"int","comment":"Validity period of provided geolocation"},{"name":"proximity_notification_radius","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000)."}]},{"kind":"class","name":"messageMediaPoll","type":"MessageMedia","id":1272375192,"comment":"Poll","arguments":[{"name":"poll","type":"Poll","comment":"The poll"},{"name":"results","type":"PollResults","comment":"The results of the poll"}]},{"kind":"class","name":"messageMediaDice","type":"MessageMedia","id":1065280907,"comment":"Dice-based animated sticker","arguments":[{"name":"value","type":"int","comment":"Dice value"},{"name":"emoticon","type":"string","comment":"The emoji, for now \"🏀\", \"🎲\" and \"🎯\" are supported"}]},{"kind":"class","name":"messageMediaStory","type":"MessageMedia","id":1758159491,"comment":"Represents a forwarded story or a story mention.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"via_mention","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"If set, indicates that this someone has mentioned us in this story (i.e. by tagging us in the description) or vice versa, we have mentioned the other peer (if the message is outgoing)."},{"name":"peer","type":"Peer","comment":"Peer that posted the story."},{"name":"id","type":"int","comment":"Story ID"},{"name":"story","type":"StoryItem","typeModifiers":{"predicate":"flags.0"},"comment":"The story itself, if absent fetch it using {@link stories.RawGetStoriesByIDRequest} and the peer/id parameters specified above."}]},{"kind":"class","name":"messageMediaGiveaway","type":"MessageMedia","id":3668805040,"comment":"Contains info about a giveaway, see here » for more info.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"only_new_subscribers","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, only new subscribers starting from the giveaway creation date will be able to participate to the giveaway."},{"name":"winners_are_visible","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"If set, giveaway winners are public and will be listed in a {@link RawMessageMediaGiveawayResults} message that will be automatically sent to the channel once the giveaway ends."},{"name":"channels","type":"int53","typeModifiers":{"isVector":true},"comment":"The channels that the user must join to participate in the giveaway."},{"name":"countries_iso2","type":"string","typeModifiers":{"predicate":"flags.1","isVector":true},"comment":"If set, only users residing in these countries can participate in the giveaway, (specified as a list of two-letter ISO 3166-1 alpha-2 country codes); otherwise there are no country-based limitations."},{"name":"prize_description","type":"string","typeModifiers":{"predicate":"flags.3"},"comment":"Can contain a textual description of additional giveaway prizes."},{"name":"quantity","type":"int","comment":"Number of Telegram Premium subscriptions given away."},{"name":"months","type":"int","comment":"Duration in months of each Telegram Premium subscription in the giveaway."},{"name":"until_date","type":"int","comment":"The end date of the giveaway."}]},{"kind":"class","name":"messageMediaGiveawayResults","type":"MessageMedia","id":3331919976,"comment":"A giveaway with public winners has finished, this constructor contains info about the winners.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"only_new_subscribers","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, only new subscribers starting from the giveaway creation date participated in the giveaway."},{"name":"refunded","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"If set, the giveaway was canceled and was fully refunded."},{"name":"channel_id","type":"long","comment":"ID of the channel/supergroup that was automatically boosted by the winners of the giveaway for duration of the Premium subscription."},{"name":"additional_peers_count","type":"int","typeModifiers":{"predicate":"flags.3"},"comment":"Number of other channels that participated in the giveaway."},{"name":"launch_msg_id","type":"int","comment":"Identifier of the message with the giveaway in channel_id."},{"name":"winners_count","type":"int","comment":"Total number of winners in the giveaway."},{"name":"unclaimed_count","type":"int","comment":"Number of not-yet-claimed prizes."},{"name":"winners","type":"long","typeModifiers":{"isVector":true},"comment":"Up to 100 user identifiers of the winners of the giveaway."},{"name":"months","type":"int","comment":"Duration in months of each Telegram Premium subscription in the giveaway."},{"name":"prize_description","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Can contain a textual description of additional giveaway prizes."},{"name":"until_date","type":"int","comment":"Point in time (UNIX timestamp in seconds) when the winners were selected. May be bigger than winners selection date specified in initial parameters of the giveaway."}]},{"kind":"class","name":"messageMediaPaidMedia","type":"MessageMedia","id":2827297937,"comment":"Paid media, see here » for more info.","arguments":[{"name":"stars_amount","type":"long","comment":"The price of the media in Telegram Stars."},{"name":"extended_media","type":"MessageExtendedMedia","typeModifiers":{"isVector":true},"comment":"Either the paid-for media, or super low resolution media previews if the media wasn't purchased yet, see here » for more info."}]},{"kind":"class","name":"messageActionEmpty","type":"MessageAction","id":3064919984,"comment":"Empty constructor.","arguments":[]},{"kind":"class","name":"messageActionChatCreate","type":"MessageAction","id":3175599021,"comment":"Group created","arguments":[{"name":"title","type":"string","comment":"Group name"},{"name":"users","type":"int53","typeModifiers":{"isVector":true},"comment":"List of group members"}]},{"kind":"class","name":"messageActionChatEditTitle","type":"MessageAction","id":3047280218,"comment":"Group name changed.","arguments":[{"name":"title","type":"string","comment":"New group name"}]},{"kind":"class","name":"messageActionChatEditPhoto","type":"MessageAction","id":2144015272,"comment":"Group profile changed","arguments":[{"name":"photo","type":"Photo","comment":"New group profile photo"}]},{"kind":"class","name":"messageActionChatDeletePhoto","type":"MessageAction","id":2514746351,"comment":"Group profile photo removed.","arguments":[]},{"kind":"class","name":"messageActionChatAddUser","type":"MessageAction","id":365886720,"comment":"New member in the group","arguments":[{"name":"users","type":"int53","typeModifiers":{"isVector":true},"comment":"Users that were invited to the chat"}]},{"kind":"class","name":"messageActionChatDeleteUser","type":"MessageAction","id":2755604684,"comment":"User left the group.","arguments":[{"name":"user_id","type":"int53","comment":"Leaving user ID"}]},{"kind":"class","name":"messageActionChatJoinedByLink","type":"MessageAction","id":51520707,"comment":"A user joined the chat via an invite link","arguments":[{"name":"inviter_id","type":"int53","comment":"ID of the user that created the invite link"}]},{"kind":"class","name":"messageActionChannelCreate","type":"MessageAction","id":2513611922,"comment":"The channel was created","arguments":[{"name":"title","type":"string","comment":"Original channel/supergroup title"}]},{"kind":"class","name":"messageActionChatMigrateTo","type":"MessageAction","id":3775102866,"comment":"Indicates the chat was migrated to the specified supergroup","arguments":[{"name":"channel_id","type":"int53","comment":"The supergroup it was migrated to"}]},{"kind":"class","name":"messageActionChannelMigrateFrom","type":"MessageAction","id":3929622761,"comment":"Indicates the channel was migrated from the specified chat","arguments":[{"name":"title","type":"string","comment":"The old chat title"},{"name":"chat_id","type":"int53","comment":"The old chat ID"}]},{"kind":"class","name":"messageActionPinMessage","type":"MessageAction","id":2495428845,"comment":"A message was pinned","arguments":[]},{"kind":"class","name":"messageActionHistoryClear","type":"MessageAction","id":2679813636,"comment":"Chat history was cleared","arguments":[]},{"kind":"class","name":"messageActionGameScore","type":"MessageAction","id":2460428406,"comment":"Someone scored in a game","arguments":[{"name":"game_id","type":"long","comment":"Game ID"},{"name":"score","type":"int","comment":"Score"}]},{"kind":"class","name":"messageActionPaymentSentMe","type":"MessageAction","id":2402399015,"comment":"A user just sent a payment to me (a bot)","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"recurring_init","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether this is the first payment of a recurring payment we just subscribed to"},{"name":"recurring_used","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether this payment is part of a recurring payment"},{"name":"currency","type":"string","comment":"Three-letter ISO 4217 currency code, or XTR for Telegram Stars."},{"name":"total_amount","type":"long","comment":"Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."},{"name":"payload","type":"bytes","comment":"Bot specified invoice payload"},{"name":"info","type":"PaymentRequestedInfo","typeModifiers":{"predicate":"flags.0"},"comment":"Order info provided by the user"},{"name":"shipping_option_id","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Identifier of the shipping option chosen by the user"},{"name":"charge","type":"PaymentCharge","comment":"Provider payment identifier"}]},{"kind":"class","name":"messageActionPaymentSent","type":"MessageAction","id":2518040406,"comment":"A payment was sent","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"recurring_init","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether this is the first payment of a recurring payment we just subscribed to"},{"name":"recurring_used","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether this payment is part of a recurring payment"},{"name":"currency","type":"string","comment":"Three-letter ISO 4217 currency code, or XTR for Telegram Stars."},{"name":"total_amount","type":"long","comment":"Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."},{"name":"invoice_slug","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"An invoice slug taken from an invoice deep link or from the premium_invoice_slug app config parameter »"}]},{"kind":"class","name":"messageActionPhoneCall","type":"MessageAction","id":2162236031,"comment":"A phone call","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"video","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Is this a video call?"},{"name":"call_id","type":"long","comment":"Call ID"},{"name":"reason","type":"PhoneCallDiscardReason","typeModifiers":{"predicate":"flags.0"},"comment":"If the call has ended, the reason why it ended"},{"name":"duration","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Duration of the call in seconds"}]},{"kind":"class","name":"messageActionScreenshotTaken","type":"MessageAction","id":1200788123,"comment":"A screenshot of the chat was taken","arguments":[]},{"kind":"class","name":"messageActionCustomAction","type":"MessageAction","id":4209418070,"comment":"Custom action (most likely not supported by the current layer, an upgrade might be needed)","arguments":[{"name":"message","type":"string","comment":"Action message"}]},{"kind":"class","name":"messageActionBotAllowed","type":"MessageAction","id":3306608249,"comment":"We have given the bot permission to send us direct messages.\n\nThe optional fields specify how did we authorize the bot to send us messages.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"attach_menu","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"We have authorized the bot to send us messages by installing the bot's attachment menu."},{"name":"from_request","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"We have allowed the bot to send us messages using {@link bots.RawAllowSendMessageRequest}."},{"name":"domain","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"We have authorized the bot to send us messages by logging into a website via Telegram Login »; this field contains the domain name of the website on which the user has logged in."},{"name":"app","type":"BotApp","typeModifiers":{"predicate":"flags.2"},"comment":"We have authorized the bot to send us messages by opening the specified bot mini app."}]},{"kind":"class","name":"messageActionSecureValuesSentMe","type":"MessageAction","id":455635795,"comment":"Secure telegram passport values were received","arguments":[{"name":"values","type":"SecureValue","typeModifiers":{"isVector":true},"comment":"Vector with information about documents and other Telegram Passport elements that were shared with the bot"},{"name":"credentials","type":"SecureCredentialsEncrypted","comment":"Encrypted credentials required to decrypt the data"}]},{"kind":"class","name":"messageActionSecureValuesSent","type":"MessageAction","id":3646710100,"comment":"Request for secure telegram passport values was sent","arguments":[{"name":"types","type":"SecureValueType","typeModifiers":{"isVector":true},"comment":"Secure value types"}]},{"kind":"class","name":"messageActionContactSignUp","type":"MessageAction","id":4092747638,"comment":"A contact just signed up to telegram","arguments":[]},{"kind":"class","name":"messageActionGeoProximityReached","type":"MessageAction","id":2564871831,"comment":"A user of the chat is now in proximity of another user","arguments":[{"name":"from_id","type":"Peer","comment":"The user or chat that is now in proximity of to_id"},{"name":"to_id","type":"Peer","comment":"The user or chat that subscribed to live geolocation proximity alerts"},{"name":"distance","type":"int","comment":"Distance, in meters (0-100000)"}]},{"kind":"class","name":"messageActionGroupCall","type":"MessageAction","id":2047704898,"comment":"The group call has ended","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"call","type":"InputGroupCall","comment":"Group call"},{"name":"duration","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Group call duration"}]},{"kind":"class","name":"messageActionInviteToGroupCall","type":"MessageAction","id":1345295095,"comment":"A set of users was invited to the group call","arguments":[{"name":"call","type":"InputGroupCall","comment":"The group call"},{"name":"users","type":"int53","typeModifiers":{"isVector":true},"comment":"The invited users"}]},{"kind":"class","name":"messageActionSetMessagesTTL","type":"MessageAction","id":1007897979,"comment":"The Time-To-Live of messages in this chat was changed.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"period","type":"int","comment":"New Time-To-Live of all messages sent in this chat; if 0, autodeletion was disabled."},{"name":"auto_setting_from","type":"long","typeModifiers":{"predicate":"flags.0"},"comment":"If set, the chat TTL setting was set not due to a manual change by one of participants, but automatically because one of the participants has the {@link messages.RawSetDefaultHistoryTTLRequest}. For example, when a user writes to us for the first time and we have set a default messages TTL of 1 week, this service message (with auto_setting_from=our_userid) will be emitted before our first message."}]},{"kind":"class","name":"messageActionGroupCallScheduled","type":"MessageAction","id":3013637729,"comment":"A group call was scheduled","arguments":[{"name":"call","type":"InputGroupCall","comment":"The group call"},{"name":"schedule_date","type":"int","comment":"When is this group call scheduled to start"}]},{"kind":"class","name":"messageActionSetChatTheme","type":"MessageAction","id":2860016453,"comment":"The chat theme was changed","arguments":[{"name":"emoticon","type":"string","comment":"The emoji that identifies a chat theme"}]},{"kind":"class","name":"messageActionChatJoinedByRequest","type":"MessageAction","id":3955008459,"comment":"A user was accepted into the group by an admin","arguments":[]},{"kind":"class","name":"messageActionWebViewDataSentMe","type":"MessageAction","id":1205698681,"comment":"Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (bot side service message).","arguments":[{"name":"text","type":"string","comment":"Text of the {@link RawKeyboardButtonSimpleWebView} that was pressed to open the web app."},{"name":"data","type":"string","comment":"Relayed data."}]},{"kind":"class","name":"messageActionWebViewDataSent","type":"MessageAction","id":3032714421,"comment":"Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (user side service message).\n\nClients should display a service message with the text Data from the «$text» button was transferred to the bot.","arguments":[{"name":"text","type":"string","comment":"Text of the {@link RawKeyboardButtonSimpleWebView} that was pressed to open the web app."}]},{"kind":"class","name":"messageActionGiftPremium","type":"MessageAction","id":3359468268,"comment":"Info about a gifted Telegram Premium subscription","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"currency","type":"string","comment":"Three-letter ISO 4217 currency code"},{"name":"amount","type":"long","comment":"Price of the gift in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."},{"name":"months","type":"int","comment":"Duration of the gifted Telegram Premium subscription"},{"name":"crypto_currency","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"If the gift was bought using a cryptocurrency, the cryptocurrency name."},{"name":"crypto_amount","type":"long","typeModifiers":{"predicate":"flags.0"},"comment":"If the gift was bought using a cryptocurrency, price of the gift in the smallest units of a cryptocurrency."}]},{"kind":"class","name":"messageActionTopicCreate","type":"MessageAction","id":228168278,"comment":"A forum topic was created.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"title","type":"string","comment":"Topic name."},{"name":"icon_color","type":"int","comment":"If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F."},{"name":"icon_emoji_id","type":"long","typeModifiers":{"predicate":"flags.0"},"comment":"ID of the custom emoji used as topic icon."}]},{"kind":"class","name":"messageActionTopicEdit","type":"MessageAction","id":3230943264,"comment":"Forum topic information was edited.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"title","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"New topic title."},{"name":"icon_emoji_id","type":"long","typeModifiers":{"predicate":"flags.1"},"comment":"ID of the new custom emoji used as topic icon, or if it was removed."},{"name":"closed","type":"Bool","typeModifiers":{"predicate":"flags.2"},"comment":"Whether the topic was opened or closed."},{"name":"hidden","type":"Bool","typeModifiers":{"predicate":"flags.3"},"comment":"Whether the topic was hidden or unhidden (only valid for the \"General\" topic, id=1)."}]},{"kind":"class","name":"messageActionSuggestProfilePhoto","type":"MessageAction","id":1474192222,"comment":"A new profile picture was suggested using {@link photos.RawUploadContactProfilePhotoRequest}.","arguments":[{"name":"photo","type":"Photo","comment":"The photo that the user suggested we set as profile picture."}]},{"kind":"class","name":"messageActionRequestedPeer","type":"MessageAction","id":827428507,"comment":"Contains info about one or more peers that the we (the user) shared with the bot after clicking on a {@link RawKeyboardButtonRequestPeer} button (service message sent by the user).","arguments":[{"name":"button_id","type":"int","comment":"button_id contained in the {@link RawKeyboardButtonRequestPeer}"},{"name":"peers","type":"Peer","typeModifiers":{"isVector":true},"comment":"The shared peers"}]},{"kind":"class","name":"messageActionSetChatWallPaper","type":"MessageAction","id":1348510708,"comment":"The wallpaper » of the current chat was changed.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"same","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, indicates the user applied a wallpaper » previously sent by the other user in a {@link RawMessageActionSetChatWallPaper} message."},{"name":"for_both","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"If set, indicates the wallpaper was forcefully applied for both sides, without explicit confirmation from the other side.
If the message is incoming, and we did not like the new wallpaper the other user has chosen for us, we can re-set our previous wallpaper just on our side, by invoking {@link messages.RawSetChatWallPaperRequest}, providing only the revert flag (and obviously the peer parameter)."},{"name":"wallpaper","type":"WallPaper","comment":"New wallpaper"}]},{"kind":"class","name":"messageActionGiftCode","type":"MessageAction","id":1737240073,"comment":"Contains a Telegram Premium giftcode link.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"via_giveaway","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, this gift code was received from a giveaway » started by a channel/supergroup we're subscribed to."},{"name":"unclaimed","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"If set, the link was not redeemed yet."},{"name":"boost_peer","type":"Peer","typeModifiers":{"predicate":"flags.1"},"comment":"Identifier of the channel/supergroup that created the gift code either directly or through a giveaway: if we import this giftcode link, we will also automatically boost this channel/supergroup."},{"name":"months","type":"int","comment":"Duration in months of the gifted Telegram Premium subscription."},{"name":"slug","type":"string","comment":"Slug of the Telegram Premium giftcode link"},{"name":"currency","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"Three-letter ISO 4217 currency code"},{"name":"amount","type":"long","typeModifiers":{"predicate":"flags.2"},"comment":"Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."},{"name":"crypto_currency","type":"string","typeModifiers":{"predicate":"flags.3"},"comment":"If set, the gift was made using the specified cryptocurrency."},{"name":"crypto_amount","type":"long","typeModifiers":{"predicate":"flags.3"},"comment":"If crypto_currency is set, contains the paid amount, in the smallest units of the cryptocurrency."}]},{"kind":"class","name":"messageActionGiveawayLaunch","type":"MessageAction","id":858499565,"comment":"A giveaway was started.","arguments":[]},{"kind":"class","name":"messageActionGiveawayResults","type":"MessageAction","id":715107781,"comment":"A giveaway has ended.","arguments":[{"name":"winners_count","type":"int","comment":"Number of winners in the giveaway"},{"name":"unclaimed_count","type":"int","comment":"Number of undistributed prizes"}]},{"kind":"class","name":"messageActionBoostApply","type":"MessageAction","id":3422726765,"comment":"Some boosts » were applied to the channel or supergroup.","arguments":[{"name":"boosts","type":"int","comment":"Number of applied boosts."}]},{"kind":"class","name":"messageActionRequestedPeerSentMe","type":"MessageAction","id":2477987912,"comment":"Contains info about one or more peers that the a user shared with the me (the bot) after clicking on a {@link RawKeyboardButtonRequestPeer} button (service message received by the bot).","arguments":[{"name":"button_id","type":"int","comment":"button_id contained in the {@link RawKeyboardButtonRequestPeer}"},{"name":"peers","type":"RequestedPeer","typeModifiers":{"isVector":true},"comment":"Info about the shared peers."}]},{"kind":"class","name":"messageActionPaymentRefunded","type":"MessageAction","id":1102307842,"comment":"Describes a payment refund (service message received by both users and bots).","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"peer","type":"Peer","comment":"Identifier of the peer that returned the funds."},{"name":"currency","type":"string","comment":"Currency, XTR for Telegram Stars."},{"name":"total_amount","type":"long","comment":"Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."},{"name":"payload","type":"bytes","typeModifiers":{"predicate":"flags.0"},"comment":"Bot specified invoice payload (only received by bots)."},{"name":"charge","type":"PaymentCharge","comment":"Provider payment identifier"}]},{"kind":"class","name":"messageActionGiftStars","type":"MessageAction","id":1171632161,"comment":"You gifted or were gifted some Telegram Stars.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"currency","type":"string","comment":"Three-letter ISO 4217 currency code"},{"name":"amount","type":"long","comment":"Price of the gift in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."},{"name":"stars","type":"long","comment":"Amount of gifted stars"},{"name":"crypto_currency","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"If the gift was bought using a cryptocurrency, the cryptocurrency name."},{"name":"crypto_amount","type":"long","typeModifiers":{"predicate":"flags.0"},"comment":"If the gift was bought using a cryptocurrency, price of the gift in the smallest units of a cryptocurrency."},{"name":"transaction_id","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Identifier of the transaction, only visible to the receiver of the gift."}]},{"kind":"class","name":"dialog","type":"Dialog","id":3582593222,"comment":"Chat","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"pinned","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Is the dialog pinned"},{"name":"unread_mark","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether the chat was manually marked as unread"},{"name":"view_forum_as_messages","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"Users may also choose to display messages from all topics of a forum as if they were sent to a normal group, using a \"View as messages\" setting in the local client.
This setting only affects the current account, and is synced to other logged in sessions using the {@link channels.RawToggleViewForumAsMessagesRequest} method; invoking this method will update the value of this flag."},{"name":"peer","type":"Peer","comment":"The chat"},{"name":"top_message","type":"int","comment":"The latest message ID"},{"name":"read_inbox_max_id","type":"int","comment":"Position up to which all incoming messages are read."},{"name":"read_outbox_max_id","type":"int","comment":"Position up to which all outgoing messages are read."},{"name":"unread_count","type":"int","comment":"Number of unread messages"},{"name":"unread_mentions_count","type":"int","comment":"Number of unread mentions"},{"name":"unread_reactions_count","type":"int","comment":"Number of unread reactions to messages you sent"},{"name":"notify_settings","type":"PeerNotifySettings","comment":"Notification settings"},{"name":"pts","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"PTS"},{"name":"draft","type":"DraftMessage","typeModifiers":{"predicate":"flags.1"},"comment":"Message draft"},{"name":"folder_id","type":"int","typeModifiers":{"predicate":"flags.4"},"comment":"Peer folder ID, for more info click here"},{"name":"ttl_period","type":"int","typeModifiers":{"predicate":"flags.5"},"comment":"Time-to-live of all messages sent in this dialog"}]},{"kind":"class","name":"dialogFolder","type":"Dialog","id":1908216652,"comment":"Dialog in folder","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"pinned","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Is this folder pinned"},{"name":"folder","type":"Folder","comment":"The folder"},{"name":"peer","type":"Peer","comment":"Peer in folder"},{"name":"top_message","type":"int","comment":"Latest message ID of dialog"},{"name":"unread_muted_peers_count","type":"int","comment":"Number of unread muted peers in folder"},{"name":"unread_unmuted_peers_count","type":"int","comment":"Number of unread unmuted peers in folder"},{"name":"unread_muted_messages_count","type":"int","comment":"Number of unread messages from muted peers in folder"},{"name":"unread_unmuted_messages_count","type":"int","comment":"Number of unread messages from unmuted peers in folder"}]},{"kind":"class","name":"photoEmpty","type":"Photo","id":590459437,"comment":"Empty constructor, non-existent photo","arguments":[{"name":"id","type":"long","comment":"Photo identifier"}]},{"kind":"class","name":"photo","type":"Photo","id":4212750949,"comment":"Photo","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"has_stickers","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the photo has mask stickers attached to it"},{"name":"id","type":"long","comment":"ID"},{"name":"access_hash","type":"long","comment":"Access hash"},{"name":"file_reference","type":"bytes","comment":"file reference"},{"name":"date","type":"int","comment":"Date of upload"},{"name":"sizes","type":"PhotoSize","typeModifiers":{"isVector":true},"comment":"Available sizes for download"},{"name":"video_sizes","type":"VideoSize","typeModifiers":{"predicate":"flags.1","isVector":true},"comment":"For animated profiles, the MPEG4 videos"},{"name":"dc_id","type":"int","comment":"DC ID to use for download"}]},{"kind":"class","name":"photoSizeEmpty","type":"PhotoSize","id":236446268,"comment":"Empty constructor. Image with this thumbnail is unavailable.","arguments":[{"name":"type","type":"string","comment":"Thumbnail type »"}]},{"kind":"class","name":"photoSize","type":"PhotoSize","id":1976012384,"comment":"Image description.","arguments":[{"name":"type","type":"string","comment":"Thumbnail type »"},{"name":"w","type":"int","comment":"Image width"},{"name":"h","type":"int","comment":"Image height"},{"name":"size","type":"int","comment":"File size"}]},{"kind":"class","name":"photoCachedSize","type":"PhotoSize","id":35527382,"comment":"Description of an image and its content.","arguments":[{"name":"type","type":"string","comment":"Thumbnail type"},{"name":"w","type":"int","comment":"Image width"},{"name":"h","type":"int","comment":"Image height"},{"name":"bytes","type":"bytes","comment":"Binary data, file content"}]},{"kind":"class","name":"photoStrippedSize","type":"PhotoSize","id":3769678894,"comment":"A low-resolution compressed JPG payload","arguments":[{"name":"type","type":"string","comment":"Thumbnail type"},{"name":"bytes","type":"bytes","comment":"Thumbnail data, see here for more info on decompression »"}]},{"kind":"class","name":"photoSizeProgressive","type":"PhotoSize","id":4198431637,"comment":"Progressively encoded photosize","arguments":[{"name":"type","type":"string","comment":"Photosize type »"},{"name":"w","type":"int","comment":"Photo width"},{"name":"h","type":"int","comment":"Photo height"},{"name":"sizes","type":"int","typeModifiers":{"isVector":true},"comment":"Sizes of progressive JPEG file prefixes, which can be used to preliminarily show the image."}]},{"kind":"class","name":"photoPathSize","type":"PhotoSize","id":3626061121,"comment":"Messages with animated stickers can have a compressed svg (< 300 bytes) to show the outline of the sticker before fetching the actual lottie animation.","arguments":[{"name":"type","type":"string","comment":"Always j"},{"name":"bytes","type":"bytes","comment":"Compressed SVG path payload, see here for decompression instructions"}]},{"kind":"class","name":"geoPointEmpty","type":"GeoPoint","id":286776671,"comment":"Empty constructor.","arguments":[]},{"kind":"class","name":"geoPoint","type":"GeoPoint","id":2997024355,"comment":"GeoPoint.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"long","type":"double","comment":"Longitude"},{"name":"lat","type":"double","comment":"Latitude"},{"name":"access_hash","type":"long","comment":"Access hash"},{"name":"accuracy_radius","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"The estimated horizontal accuracy of the location, in meters; as defined by the sender."}]},{"kind":"class","name":"auth.sentCode","type":"auth.SentCode","id":1577067778,"comment":"Contains info about a sent verification code.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"type","type":"auth.SentCodeType","comment":"Phone code type"},{"name":"phone_code_hash","type":"string","comment":"Phone code hash, to be stored and later re-used with {@link auth.RawSignInRequest}"},{"name":"next_type","type":"auth.CodeType","typeModifiers":{"predicate":"flags.1"},"comment":"Phone code type that will be sent next, if the phone code is not received within timeout seconds: to send it use {@link auth.RawResendCodeRequest}"},{"name":"timeout","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"Timeout for reception of the phone code"}]},{"kind":"class","name":"auth.sentCodeSuccess","type":"auth.SentCode","id":596704836,"comment":"The user successfully authorized using future auth tokens","arguments":[{"name":"authorization","type":"auth.Authorization","comment":"Authorization info"}]},{"kind":"class","name":"auth.authorization","type":"auth.Authorization","id":782418132,"comment":"Contains user authorization info.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"setup_password_required","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Suggests the user to set up a 2-step verification password to be able to log in again"},{"name":"otherwise_relogin_days","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Iff setup_password_required is set and the user declines to set a 2-step verification password, they will be able to log into their account via SMS again only after this many days pass."},{"name":"tmp_sessions","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Temporary passport sessions"},{"name":"future_auth_token","type":"bytes","typeModifiers":{"predicate":"flags.2"},"comment":"A future auth token"},{"name":"user","type":"User","comment":"Info on authorized user"}]},{"kind":"class","name":"auth.authorizationSignUpRequired","type":"auth.Authorization","id":1148485274,"comment":"An account with this phone number doesn't exist on telegram: the user has to enter basic information and sign up","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"terms_of_service","type":"help.TermsOfService","typeModifiers":{"predicate":"flags.0"},"comment":"Telegram's terms of service: the user must read and accept the terms of service before signing up to telegram"}]},{"kind":"class","name":"auth.exportedAuthorization","type":"auth.ExportedAuthorization","id":3023364792,"comment":"Data for copying of authorization between data centers.","arguments":[{"name":"id","type":"long","comment":"current user identifier"},{"name":"bytes","type":"bytes","comment":"authorizes key"}]},{"kind":"class","name":"inputNotifyPeer","type":"InputNotifyPeer","id":3099351820,"comment":"Notifications generated by a certain user or group.","arguments":[{"name":"peer","type":"InputPeer","comment":"User or group"}]},{"kind":"class","name":"inputNotifyUsers","type":"InputNotifyPeer","id":423314455,"comment":"Notifications generated by all users.","arguments":[]},{"kind":"class","name":"inputNotifyChats","type":"InputNotifyPeer","id":1251338318,"comment":"Notifications generated by all groups.","arguments":[]},{"kind":"class","name":"inputNotifyBroadcasts","type":"InputNotifyPeer","id":2983951486,"comment":"All channels","arguments":[]},{"kind":"class","name":"inputNotifyForumTopic","type":"InputNotifyPeer","id":1548122514,"comment":"Notifications generated by a topic in a forum.","arguments":[{"name":"peer","type":"InputPeer","comment":"Forum ID"},{"name":"top_msg_id","type":"int","comment":"Topic ID"}]},{"kind":"class","name":"inputPeerNotifySettings","type":"InputPeerNotifySettings","id":3402328802,"comment":"Notification settings.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"show_previews","type":"Bool","typeModifiers":{"predicate":"flags.0"},"comment":"If the text of the message shall be displayed in notification"},{"name":"silent","type":"Bool","typeModifiers":{"predicate":"flags.1"},"comment":"Peer was muted?"},{"name":"mute_until","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"Date until which all notifications shall be switched off"},{"name":"sound","type":"NotificationSound","typeModifiers":{"predicate":"flags.3"},"comment":"Identifier of an audio file to play for notifications."},{"name":"stories_muted","type":"Bool","typeModifiers":{"predicate":"flags.6"},"comment":"Whether story notifications should be disabled."},{"name":"stories_hide_sender","type":"Bool","typeModifiers":{"predicate":"flags.7"},"comment":"Whether the sender name should be displayed in story notifications."},{"name":"stories_sound","type":"NotificationSound","typeModifiers":{"predicate":"flags.8"},"comment":"Identifier of an audio file to play for story notifications."}]},{"kind":"class","name":"peerNotifySettings","type":"PeerNotifySettings","id":2573347852,"comment":"Notification settings.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"show_previews","type":"Bool","typeModifiers":{"predicate":"flags.0"},"comment":"(Ternary value) If set, indicates whether or not to display previews of messages in notifications; otherwise the default behavior should be used."},{"name":"silent","type":"Bool","typeModifiers":{"predicate":"flags.1"},"comment":"(Ternary value) If set, indicates whether to mute or unmute the peer; otherwise the default behavior should be used."},{"name":"mute_until","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"Mute all notifications until this date"},{"name":"ios_sound","type":"NotificationSound","typeModifiers":{"predicate":"flags.3"},"comment":"Notification sound for the official iOS application"},{"name":"android_sound","type":"NotificationSound","typeModifiers":{"predicate":"flags.4"},"comment":"Notification sound for the official android application"},{"name":"other_sound","type":"NotificationSound","typeModifiers":{"predicate":"flags.5"},"comment":"Notification sound for other applications"},{"name":"stories_muted","type":"Bool","typeModifiers":{"predicate":"flags.6"},"comment":"Whether story notifications should be disabled."},{"name":"stories_hide_sender","type":"Bool","typeModifiers":{"predicate":"flags.7"},"comment":"Whether the sender name should be displayed in story notifications."},{"name":"stories_ios_sound","type":"NotificationSound","typeModifiers":{"predicate":"flags.8"},"comment":"Sound for story notifications on the official iOS application"},{"name":"stories_android_sound","type":"NotificationSound","typeModifiers":{"predicate":"flags.9"},"comment":"Sound for story notifications on the official Android application"},{"name":"stories_other_sound","type":"NotificationSound","typeModifiers":{"predicate":"flags.10"},"comment":"Sound for story notifications on other applications"}]},{"kind":"class","name":"peerSettings","type":"PeerSettings","id":2899733598,"comment":"List of actions that are possible when interacting with this user, to be shown as suggested actions in the chat action bar », see here » for more info.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"report_spam","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether we can still report the user for spam"},{"name":"add_contact","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether we can add the user as contact"},{"name":"block_contact","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether we can block the user"},{"name":"share_contact","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether we can share the user's contact"},{"name":"need_contacts_exception","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"Whether a special exception for contacts is needed"},{"name":"report_geo","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Whether we can report a geo group as irrelevant for this location"},{"name":"autoarchived","type":"true","typeModifiers":{"predicate":"flags.7"},"comment":"Whether this peer was automatically archived according to {@link RawGlobalPrivacySettings} and can be unarchived"},{"name":"invite_members","type":"true","typeModifiers":{"predicate":"flags.8"},"comment":"If set, this is a recently created group chat to which new members can be invited"},{"name":"request_chat_broadcast","type":"true","typeModifiers":{"predicate":"flags.10"},"comment":"This flag is set if request_chat_title and request_chat_date fields are set and the join request » is related to a channel (otherwise if only the request fields are set, the join request » is related to a chat)."},{"name":"business_bot_paused","type":"true","typeModifiers":{"predicate":"flags.11"},"comment":"This flag is set if both business_bot_id and business_bot_manage_url are set and all connected business bots » were paused in this chat using {@link account.RawToggleConnectedBotPausedRequest}."},{"name":"business_bot_can_reply","type":"true","typeModifiers":{"predicate":"flags.12"},"comment":"This flag is set if both business_bot_id and business_bot_manage_url are set and connected business bots » can reply to messages in this chat, as specified by the settings during initial configuration."},{"name":"geo_distance","type":"int","typeModifiers":{"predicate":"flags.6"},"comment":"Distance in meters between us and this peer"},{"name":"request_chat_title","type":"string","typeModifiers":{"predicate":"flags.9"},"comment":"If set, this is a private chat with an administrator of a chat or channel to which the user sent a join request, and this field contains the chat/channel's title."},{"name":"request_chat_date","type":"int","typeModifiers":{"predicate":"flags.9"},"comment":"If set, this is a private chat with an administrator of a chat or channel to which the user sent a join request, and this field contains the timestamp when the join request » was sent."},{"name":"business_bot_id","type":"int53","typeModifiers":{"predicate":"flags.13"},"comment":"Contains the ID of the business bot » managing this chat, used to display info about the bot in the action bar."},{"name":"business_bot_manage_url","type":"string","typeModifiers":{"predicate":"flags.13"},"comment":"Contains a deep link », used to open a management menu in the business bot. This flag is set if and only if business_bot_id is set."}]},{"kind":"class","name":"wallPaper","type":"WallPaper","id":2755118061,"comment":"Represents a wallpaper based on an image.","arguments":[{"name":"id","type":"long","comment":"Identifier"},{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"creator","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether we created this wallpaper"},{"name":"default","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether this is the default wallpaper"},{"name":"pattern","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether this is a pattern wallpaper »"},{"name":"dark","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"Whether this wallpaper should be used in dark mode."},{"name":"access_hash","type":"long","comment":"Access hash"},{"name":"slug","type":"string","comment":"Unique wallpaper ID, used when generating wallpaper links or importing wallpaper links."},{"name":"document","type":"Document","comment":"The actual wallpaper"},{"name":"settings","type":"WallPaperSettings","typeModifiers":{"predicate":"flags.2"},"comment":"Info on how to generate the wallpaper, according to these instructions »."}]},{"kind":"class","name":"wallPaperNoFile","type":"WallPaper","id":3766501654,"comment":"Represents a wallpaper only based on colors/gradients.","arguments":[{"name":"id","type":"long","comment":"Wallpaper ID"},{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"default","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether this is the default wallpaper"},{"name":"dark","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"Whether this wallpaper should be used in dark mode."},{"name":"settings","type":"WallPaperSettings","typeModifiers":{"predicate":"flags.2"},"comment":"Info on how to generate the wallpaper."}]},{"kind":"class","name":"inputReportReasonSpam","type":"ReportReason","id":1490799288,"comment":"Report for spam","arguments":[]},{"kind":"class","name":"inputReportReasonViolence","type":"ReportReason","id":505595789,"comment":"Report for violence","arguments":[]},{"kind":"class","name":"inputReportReasonPornography","type":"ReportReason","id":777640226,"comment":"Report for pornography","arguments":[]},{"kind":"class","name":"inputReportReasonChildAbuse","type":"ReportReason","id":2918469347,"comment":"Report for child abuse","arguments":[]},{"kind":"class","name":"inputReportReasonOther","type":"ReportReason","id":3252986545,"comment":"Other","arguments":[]},{"kind":"class","name":"inputReportReasonCopyright","type":"ReportReason","id":2609510714,"comment":"Report for copyrighted content","arguments":[]},{"kind":"class","name":"inputReportReasonGeoIrrelevant","type":"ReportReason","id":3688169197,"comment":"Report an irrelevant geo group","arguments":[]},{"kind":"class","name":"inputReportReasonFake","type":"ReportReason","id":4124956391,"comment":"Report for impersonation","arguments":[]},{"kind":"class","name":"inputReportReasonIllegalDrugs","type":"ReportReason","id":177124030,"comment":"Report for illegal drugs","arguments":[]},{"kind":"class","name":"inputReportReasonPersonalDetails","type":"ReportReason","id":2663876157,"comment":"Report for divulgation of personal details","arguments":[]},{"kind":"class","name":"userFull","type":"UserFull","id":3432609568,"comment":"Extended user info\n\nWhen updating the local peer database », all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"blocked","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether you have blocked this user"},{"name":"phone_calls_available","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"Whether this user can make VoIP calls"},{"name":"phone_calls_private","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Whether this user's privacy settings allow you to call them"},{"name":"can_pin_message","type":"true","typeModifiers":{"predicate":"flags.7"},"comment":"Whether you can pin messages in the chat with this user, you can do this only for a chat with yourself"},{"name":"has_scheduled","type":"true","typeModifiers":{"predicate":"flags.12"},"comment":"Whether scheduled messages are available"},{"name":"video_calls_available","type":"true","typeModifiers":{"predicate":"flags.13"},"comment":"Whether the user can receive video calls"},{"name":"voice_messages_forbidden","type":"true","typeModifiers":{"predicate":"flags.20"},"comment":"Whether this user doesn't allow sending voice messages in a private chat with them"},{"name":"translations_disabled","type":"true","typeModifiers":{"predicate":"flags.23"},"comment":"Whether the real-time chat translation popup should be hidden."},{"name":"stories_pinned_available","type":"true","typeModifiers":{"predicate":"flags.26"},"comment":"Whether this user has some pinned stories."},{"name":"blocked_my_stories_from","type":"true","typeModifiers":{"predicate":"flags.27"},"comment":"Whether we've blocked this user, preventing them from seeing our stories »."},{"name":"wallpaper_overridden","type":"true","typeModifiers":{"predicate":"flags.28"},"comment":"Whether the other user has chosen a custom wallpaper for us using {@link messages.RawSetChatWallPaperRequest} and the for_both flag, see here » for more info."},{"name":"contact_require_premium","type":"true","typeModifiers":{"predicate":"flags.29"},"comment":"If set, we cannot write to this user: subscribe to Telegram Premium to get permission to write to this user.
To set this flag for ourselves invoke {@link account.RawSetGlobalPrivacySettingsRequest}, setting the settings.new_noncontact_peers_require_premium flag, see here » for more info."},{"name":"read_dates_private","type":"true","typeModifiers":{"predicate":"flags.30"},"comment":"If set, we cannot fetch the exact read date of messages we send to this user using {@link messages.RawGetOutboxReadDateRequest}.
The exact read date of messages might still be unavailable for other reasons, see {@link messages.RawGetOutboxReadDateRequest} for more info.
To set this flag for ourselves invoke {@link account.RawSetGlobalPrivacySettingsRequest}, setting the settings.hide_read_marks flag."},{"name":"flags2","type":"#","comment":"Flags, see TL conditional fields"},{"name":"sponsored_enabled","type":"true","typeModifiers":{"predicate":"flags2.7"},"comment":"Whether ads were re-enabled for the current account (only accessible to the currently logged-in user), see here » for more info."},{"name":"id","type":"int53","comment":"User ID"},{"name":"about","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Bio of the user"},{"name":"settings","type":"PeerSettings","comment":"Peer settings"},{"name":"personal_photo","type":"Photo","typeModifiers":{"predicate":"flags.21"},"comment":"Personal profile photo, to be shown instead of profile_photo."},{"name":"profile_photo","type":"Photo","typeModifiers":{"predicate":"flags.2"},"comment":"Profile photo"},{"name":"fallback_photo","type":"Photo","typeModifiers":{"predicate":"flags.22"},"comment":"Fallback profile photo, displayed if no photo is present in profile_photo or personal_photo, due to privacy settings."},{"name":"notify_settings","type":"PeerNotifySettings","comment":"Notification settings"},{"name":"bot_info","type":"BotInfo","typeModifiers":{"predicate":"flags.3"},"comment":"For bots, info about the bot (bot commands, etc)"},{"name":"pinned_msg_id","type":"int","typeModifiers":{"predicate":"flags.6"},"comment":"Message ID of the last pinned message"},{"name":"common_chats_count","type":"int","comment":"Chats in common with this user"},{"name":"folder_id","type":"int","typeModifiers":{"predicate":"flags.11"},"comment":"Peer folder ID, for more info click here"},{"name":"ttl_period","type":"int","typeModifiers":{"predicate":"flags.14"},"comment":"Time To Live of all messages in this chat; once a message is this many seconds old, it must be deleted."},{"name":"theme_emoticon","type":"string","typeModifiers":{"predicate":"flags.15"},"comment":"Emoji associated with chat theme"},{"name":"private_forward_name","type":"string","typeModifiers":{"predicate":"flags.16"},"comment":"Anonymized text to be shown instead of the user's name on forwarded messages"},{"name":"bot_group_admin_rights","type":"ChatAdminRights","typeModifiers":{"predicate":"flags.17"},"comment":"A suggested set of administrator rights for the bot, to be shown when adding the bot as admin to a group, see here for more info on how to handle them »."},{"name":"bot_broadcast_admin_rights","type":"ChatAdminRights","typeModifiers":{"predicate":"flags.18"},"comment":"A suggested set of administrator rights for the bot, to be shown when adding the bot as admin to a channel, see here for more info on how to handle them »."},{"name":"premium_gifts","type":"PremiumGiftOption","typeModifiers":{"predicate":"flags.19","isVector":true},"comment":"Telegram Premium subscriptions gift options"},{"name":"wallpaper","type":"WallPaper","typeModifiers":{"predicate":"flags.24"},"comment":"Wallpaper to use in the private chat with the user."},{"name":"stories","type":"PeerStories","typeModifiers":{"predicate":"flags.25"},"comment":"Active stories »"},{"name":"business_work_hours","type":"BusinessWorkHours","typeModifiers":{"predicate":"flags2.0"},"comment":"Telegram Business working hours »."},{"name":"business_location","type":"BusinessLocation","typeModifiers":{"predicate":"flags2.1"},"comment":"Telegram Business location »."},{"name":"business_greeting_message","type":"BusinessGreetingMessage","typeModifiers":{"predicate":"flags2.2"},"comment":"Telegram Business greeting message »."},{"name":"business_away_message","type":"BusinessAwayMessage","typeModifiers":{"predicate":"flags2.3"},"comment":"Telegram Business away message »."},{"name":"business_intro","type":"BusinessIntro","typeModifiers":{"predicate":"flags2.4"},"comment":"Specifies a custom Telegram Business profile introduction »."},{"name":"birthday","type":"Birthday","typeModifiers":{"predicate":"flags2.5"},"comment":"Contains info about the user's birthday »."},{"name":"personal_channel_id","type":"int53","typeModifiers":{"predicate":"flags2.6"},"comment":"ID of the associated personal channel », that should be shown in the profile page."},{"name":"personal_channel_message","type":"int","typeModifiers":{"predicate":"flags2.6"},"comment":"ID of the latest message of the associated personal channel », that should be previewed in the profile page."}]},{"kind":"class","name":"contact","type":"Contact","id":341499403,"comment":"A contact of the current user that is registered in the system.","arguments":[{"name":"user_id","type":"int53","comment":"User identifier"},{"name":"mutual","type":"Bool","comment":"Current user is in the user's contact list"}]},{"kind":"class","name":"importedContact","type":"ImportedContact","id":3242081360,"comment":"Successfully imported contact.","arguments":[{"name":"user_id","type":"int53","comment":"User identifier"},{"name":"client_id","type":"long","comment":"The contact's client identifier (passed to one of the InputContact constructors)"}]},{"kind":"class","name":"contactStatus","type":"ContactStatus","id":383348795,"comment":"Contact status: online / offline.","arguments":[{"name":"user_id","type":"int53","comment":"User identifier"},{"name":"status","type":"UserStatus","comment":"Online status"}]},{"kind":"class","name":"contacts.contactsNotModified","type":"contacts.Contacts","id":3075189202,"comment":"Contact list on the server is the same as the list on the client.","arguments":[]},{"kind":"class","name":"contacts.contacts","type":"contacts.Contacts","id":3941105218,"comment":"The current user's contact list and info on users.","arguments":[{"name":"contacts","type":"Contact","typeModifiers":{"isVector":true},"comment":"Contact list"},{"name":"saved_count","type":"int","comment":"Number of contacts that were saved successfully"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"User list"}]},{"kind":"class","name":"contacts.importedContacts","type":"contacts.ImportedContacts","id":2010127419,"comment":"Info on successfully imported contacts.","arguments":[{"name":"imported","type":"ImportedContact","typeModifiers":{"isVector":true},"comment":"List of successfully imported contacts"},{"name":"popular_invites","type":"PopularContact","typeModifiers":{"isVector":true},"comment":"Popular contacts"},{"name":"retry_contacts","type":"long","typeModifiers":{"isVector":true},"comment":"List of contact ids that could not be imported due to system limitation and will need to be imported at a later date."},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"List of users"}]},{"kind":"class","name":"contacts.blocked","type":"contacts.Blocked","id":182326673,"comment":"Full list of blocked users.","arguments":[{"name":"blocked","type":"PeerBlocked","typeModifiers":{"isVector":true},"comment":"List of blocked users"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Blocked chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"List of users"}]},{"kind":"class","name":"contacts.blockedSlice","type":"contacts.Blocked","id":3781575060,"comment":"Incomplete list of blocked users.","arguments":[{"name":"count","type":"int","comment":"Total number of elements in the list"},{"name":"blocked","type":"PeerBlocked","typeModifiers":{"isVector":true},"comment":"List of blocked users"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Blocked chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"List of users"}]},{"kind":"class","name":"messages.dialogs","type":"messages.Dialogs","id":364538944,"comment":"Full list of chats with messages and auxiliary data.","arguments":[{"name":"dialogs","type":"Dialog","typeModifiers":{"isVector":true},"comment":"List of chats"},{"name":"messages","type":"Message","typeModifiers":{"isVector":true},"comment":"List of last messages from each chat"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"List of groups mentioned in the chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"List of users mentioned in messages and groups"}]},{"kind":"class","name":"messages.dialogsSlice","type":"messages.Dialogs","id":1910543603,"comment":"Incomplete list of dialogs with messages and auxiliary data.","arguments":[{"name":"count","type":"int","comment":"Total number of dialogs"},{"name":"dialogs","type":"Dialog","typeModifiers":{"isVector":true},"comment":"List of dialogs"},{"name":"messages","type":"Message","typeModifiers":{"isVector":true},"comment":"List of last messages from dialogs"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"List of chats mentioned in dialogs"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"List of users mentioned in messages and chats"}]},{"kind":"class","name":"messages.dialogsNotModified","type":"messages.Dialogs","id":4041467286,"comment":"Dialogs haven't changed","arguments":[{"name":"count","type":"int","comment":"Number of dialogs found server-side by the query"}]},{"kind":"class","name":"messages.messages","type":"messages.Messages","id":2356252295,"comment":"Full list of messages with auxiliary data.","arguments":[{"name":"messages","type":"Message","typeModifiers":{"isVector":true},"comment":"List of messages"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"List of chats mentioned in dialogs"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"List of users mentioned in messages and chats"}]},{"kind":"class","name":"messages.messagesSlice","type":"messages.Messages","id":978610270,"comment":"Incomplete list of messages and auxiliary data.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"inexact","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"If set, indicates that the results may be inexact"},{"name":"count","type":"int","comment":"Total number of messages in the list"},{"name":"next_rate","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Rate to use in the offset_rate parameter in the next call to {@link messages.RawSearchGlobalRequest}"},{"name":"offset_id_offset","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"Indicates the absolute position of messages[0] within the total result set with count count.
This is useful, for example, if the result was fetched using offset_id, and we need to display a progress/total counter (like photo 134 of 200, for all media in a chat, we could simply use photo ${offset_id_offset} of ${count}."},{"name":"messages","type":"Message","typeModifiers":{"isVector":true},"comment":"List of messages"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"List of chats mentioned in messages"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"List of users mentioned in messages and chats"}]},{"kind":"class","name":"messages.channelMessages","type":"messages.Messages","id":3346446926,"comment":"Channel messages","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"inexact","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"If set, returned results may be inexact"},{"name":"pts","type":"int","comment":"Event count after generation"},{"name":"count","type":"int","comment":"Total number of results were found server-side (may not be all included here)"},{"name":"offset_id_offset","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"Indicates the absolute position of messages[0] within the total result set with count count.
This is useful, for example, if the result was fetched using offset_id, and we need to display a progress/total counter (like photo 134 of 200, for all media in a chat, we could simply use photo ${offset_id_offset} of ${count}."},{"name":"messages","type":"Message","typeModifiers":{"isVector":true},"comment":"Found messages"},{"name":"topics","type":"ForumTopic","typeModifiers":{"isVector":true},"comment":"Forum topic information"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Users"}]},{"kind":"class","name":"messages.messagesNotModified","type":"messages.Messages","id":1951620897,"comment":"No new messages matching the query were found","arguments":[{"name":"count","type":"int","comment":"Number of results found server-side by the given query"}]},{"kind":"class","name":"messages.chats","type":"messages.Chats","id":1694474197,"comment":"List of chats with auxiliary data.","arguments":[{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"List of chats"}]},{"kind":"class","name":"messages.chatsSlice","type":"messages.Chats","id":2631405892,"comment":"Partial list of chats, more would have to be fetched with pagination","arguments":[{"name":"count","type":"int","comment":"Total number of results that were found server-side (not all are included in chats)"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Chats"}]},{"kind":"class","name":"messages.chatFull","type":"messages.ChatFull","id":3856126364,"comment":"Full info about a channel, supergroup, gigagroup or basic group.","arguments":[{"name":"full_chat","type":"ChatFull","comment":"Full info"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Mentioned chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Mentioned users"}]},{"kind":"class","name":"messages.affectedHistory","type":"messages.AffectedHistory","id":3025955281,"comment":"Affected part of communication history with the user or in a chat.","arguments":[{"name":"pts","type":"int","comment":"Number of events occurred in a text box"},{"name":"pts_count","type":"int","comment":"Number of affected events"},{"name":"offset","type":"int","comment":"If a parameter contains positive value, it is necessary to repeat the method call using the given value; during the proceeding of all the history the value itself shall gradually decrease"}]},{"kind":"class","name":"inputMessagesFilterEmpty","type":"MessagesFilter","id":1474492012,"comment":"Filter is absent.","arguments":[]},{"kind":"class","name":"inputMessagesFilterPhotos","type":"MessagesFilter","id":2517214492,"comment":"Filter for messages containing photos.","arguments":[]},{"kind":"class","name":"inputMessagesFilterVideo","type":"MessagesFilter","id":2680163941,"comment":"Filter for messages containing videos.","arguments":[]},{"kind":"class","name":"inputMessagesFilterPhotoVideo","type":"MessagesFilter","id":1458172132,"comment":"Filter for messages containing photos or videos.","arguments":[]},{"kind":"class","name":"inputMessagesFilterDocument","type":"MessagesFilter","id":2665345416,"comment":"Filter for messages containing documents.","arguments":[]},{"kind":"class","name":"inputMessagesFilterUrl","type":"MessagesFilter","id":2129714567,"comment":"Return only messages containing URLs","arguments":[]},{"kind":"class","name":"inputMessagesFilterGif","type":"MessagesFilter","id":4291323271,"comment":"Return only messages containing gifs","arguments":[]},{"kind":"class","name":"inputMessagesFilterVoice","type":"MessagesFilter","id":1358283666,"comment":"Return only messages containing voice notes","arguments":[]},{"kind":"class","name":"inputMessagesFilterMusic","type":"MessagesFilter","id":928101534,"comment":"Return only messages containing audio files","arguments":[]},{"kind":"class","name":"inputMessagesFilterChatPhotos","type":"MessagesFilter","id":975236280,"comment":"Return only chat photo changes","arguments":[]},{"kind":"class","name":"inputMessagesFilterPhoneCalls","type":"MessagesFilter","id":2160695144,"comment":"Return only phone calls","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"missed","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Return only missed phone calls"}]},{"kind":"class","name":"inputMessagesFilterRoundVoice","type":"MessagesFilter","id":2054952868,"comment":"Return only round videos and voice notes","arguments":[]},{"kind":"class","name":"inputMessagesFilterRoundVideo","type":"MessagesFilter","id":3041516115,"comment":"Return only round videos","arguments":[]},{"kind":"class","name":"inputMessagesFilterMyMentions","type":"MessagesFilter","id":3254314650,"comment":"Return only messages where the current user was mentioned.","arguments":[]},{"kind":"class","name":"inputMessagesFilterGeo","type":"MessagesFilter","id":3875695885,"comment":"Return only messages containing geolocations","arguments":[]},{"kind":"class","name":"inputMessagesFilterContacts","type":"MessagesFilter","id":3764575107,"comment":"Return only messages containing contacts","arguments":[]},{"kind":"class","name":"inputMessagesFilterPinned","type":"MessagesFilter","id":464520273,"comment":"Fetch only pinned messages","arguments":[]},{"kind":"class","name":"updateNewMessage","type":"Update","id":522914557,"comment":"New message in a private chat or in a basic group.","arguments":[{"name":"message","type":"Message","comment":"Message"},{"name":"pts","type":"int","comment":"New quantity of actions in a message box"},{"name":"pts_count","type":"int","comment":"Number of generated events"}]},{"kind":"class","name":"updateMessageID","type":"Update","id":1318109142,"comment":"Sent message with random_id client identifier was assigned an identifier.","arguments":[{"name":"id","type":"int","comment":"id identifier of a respective Message"},{"name":"random_id","type":"long","comment":"Previously transferred client random_id identifier"}]},{"kind":"class","name":"updateDeleteMessages","type":"Update","id":2718806245,"comment":"Messages were deleted.","arguments":[{"name":"messages","type":"int","typeModifiers":{"isVector":true},"comment":"List of identifiers of deleted messages"},{"name":"pts","type":"int","comment":"New quality of actions in a message box"},{"name":"pts_count","type":"int","comment":"Number of generated events"}]},{"kind":"class","name":"updateUserTyping","type":"Update","id":3223225727,"comment":"The user is preparing a message; typing, recording, uploading, etc. This update is valid for 6 seconds. If no further updates of this kind are received after 6 seconds, it should be considered that the user stopped doing whatever they were doing","arguments":[{"name":"user_id","type":"int53","comment":"User id"},{"name":"action","type":"SendMessageAction","comment":"Action type"}]},{"kind":"class","name":"updateChatUserTyping","type":"Update","id":2202565360,"comment":"The user is preparing a message in a group; typing, recording, uploading, etc. This update is valid for 6 seconds. If no further updates of this kind are received after 6 seconds, it should be considered that the user stopped doing whatever they were doing","arguments":[{"name":"chat_id","type":"int53","comment":"Group id"},{"name":"from_id","type":"Peer","comment":"Peer that started typing (can be the chat itself, in case of anonymous admins)."},{"name":"action","type":"SendMessageAction","comment":"Type of action"}]},{"kind":"class","name":"updateChatParticipants","type":"Update","id":125178264,"comment":"Composition of chat participants changed.","arguments":[{"name":"participants","type":"ChatParticipants","comment":"Updated chat participants"}]},{"kind":"class","name":"updateUserStatus","type":"Update","id":3854432478,"comment":"Contact status update.","arguments":[{"name":"user_id","type":"int53","comment":"User identifier"},{"name":"status","type":"UserStatus","comment":"New status"}]},{"kind":"class","name":"updateUserName","type":"Update","id":2810480932,"comment":"Changes the user's first name, last name and username.","arguments":[{"name":"user_id","type":"int53","comment":"User identifier"},{"name":"first_name","type":"string","comment":"New first name. Corresponds to the new value of real_first_name field of the {@link RawUserFull} constructor."},{"name":"last_name","type":"string","comment":"New last name. Corresponds to the new value of real_last_name field of the {@link RawUserFull} constructor."},{"name":"usernames","type":"Username","typeModifiers":{"isVector":true},"comment":"Usernames."}]},{"kind":"class","name":"updateNewAuthorization","type":"Update","id":2303831023,"comment":"A new session logged into the current user's account through an unknown device.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"unconfirmed","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the session is unconfirmed, see here » for more info."},{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here"},{"name":"date","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Authorization date"},{"name":"device","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Name of device, for example Android"},{"name":"location","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Location, for example USA, NY (IP=1.2.3.4)"}]},{"kind":"class","name":"updateNewEncryptedMessage","type":"Update","id":314359194,"comment":"New encrypted message.","arguments":[{"name":"message","type":"EncryptedMessage","comment":"Message"},{"name":"qts","type":"int","comment":"New qts value, see updates » for more info."}]},{"kind":"class","name":"updateEncryptedChatTyping","type":"Update","id":386986326,"comment":"Interlocutor is typing a message in an encrypted chat. Update period is 6 second. If upon this time there is no repeated update, it shall be considered that the interlocutor stopped typing.","arguments":[{"name":"chat_id","type":"int","comment":"Chat ID"}]},{"kind":"class","name":"updateEncryption","type":"Update","id":3030575245,"comment":"Change of state in an encrypted chat.","arguments":[{"name":"chat","type":"EncryptedChat","comment":"Encrypted chat"},{"name":"date","type":"int","comment":"Date of change"}]},{"kind":"class","name":"updateEncryptedMessagesRead","type":"Update","id":956179895,"comment":"Communication history in an encrypted chat was marked as read.","arguments":[{"name":"chat_id","type":"int","comment":"Chat ID"},{"name":"max_date","type":"int","comment":"Maximum value of data for read messages"},{"name":"date","type":"int","comment":"Time when messages were read"}]},{"kind":"class","name":"updateChatParticipantAdd","type":"Update","id":1037718609,"comment":"New group member.","arguments":[{"name":"chat_id","type":"int53","comment":"Group ID"},{"name":"user_id","type":"int53","comment":"ID of the new member"},{"name":"inviter_id","type":"int53","comment":"ID of the user, who added member to the group"},{"name":"date","type":"int","comment":"When was the participant added"},{"name":"version","type":"int","comment":"Chat version number"}]},{"kind":"class","name":"updateChatParticipantDelete","type":"Update","id":3811523959,"comment":"A member has left the group.","arguments":[{"name":"chat_id","type":"int53","comment":"Group ID"},{"name":"user_id","type":"int53","comment":"ID of the user"},{"name":"version","type":"int","comment":"Used in basic groups to reorder updates and make sure that all of them was received."}]},{"kind":"class","name":"updateDcOptions","type":"Update","id":2388564083,"comment":"Changes in the data center configuration options.","arguments":[{"name":"dc_options","type":"DcOption","typeModifiers":{"isVector":true},"comment":"New connection options"}]},{"kind":"class","name":"updateNotifySettings","type":"Update","id":3200411887,"comment":"Changes in notification settings.","arguments":[{"name":"peer","type":"NotifyPeer","comment":"Notification source"},{"name":"notify_settings","type":"PeerNotifySettings","comment":"New notification settings"}]},{"kind":"class","name":"updateServiceNotification","type":"Update","id":3957614617,"comment":"A service message for the user.\n\nThe app must show the message to the user upon receiving this update. In case the popup parameter was passed, the text message must be displayed in a popup alert immediately upon receipt. It is recommended to handle the text as you would an ordinary message in terms of highlighting links, etc. The message must also be stored locally as part of the message history with the user id 777000 (Telegram Notifications).","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"popup","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, the message must be displayed in a popup."},{"name":"invert_media","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom."},{"name":"inbox_date","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"When was the notification received
The message must also be stored locally as part of the message history with the user id 777000 (Telegram Notifications)."},{"name":"type","type":"string","comment":"String, identical in format and contents to the type field in API errors. Describes type of service message. It is acceptable to ignore repeated messages of the same type within a short period of time (15 minutes)."},{"name":"message","type":"string","comment":"Message text"},{"name":"media","type":"MessageMedia","comment":"Media content (optional)"},{"name":"entities","type":"MessageEntity","typeModifiers":{"isVector":true},"comment":"Message entities for styled text"}]},{"kind":"class","name":"updatePrivacy","type":"Update","id":3996854058,"comment":"Privacy rules were changed","arguments":[{"name":"key","type":"PrivacyKey","comment":"Peers to which the privacy rules apply"},{"name":"rules","type":"PrivacyRule","typeModifiers":{"isVector":true},"comment":"New privacy rules"}]},{"kind":"class","name":"updateUserPhone","type":"Update","id":88680979,"comment":"A user's phone number was changed","arguments":[{"name":"user_id","type":"int53","comment":"User ID"},{"name":"phone","type":"string","comment":"New phone number"}]},{"kind":"class","name":"updateReadHistoryInbox","type":"Update","id":2627162079,"comment":"Incoming messages were read","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"folder_id","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Peer folder ID, for more info click here"},{"name":"peer","type":"Peer","comment":"Peer"},{"name":"max_id","type":"int","comment":"Maximum ID of messages read"},{"name":"still_unread_count","type":"int","comment":"Number of messages that are still unread"},{"name":"pts","type":"int","comment":"Event count after generation"},{"name":"pts_count","type":"int","comment":"Number of events that were generated"}]},{"kind":"class","name":"updateReadHistoryOutbox","type":"Update","id":791617983,"comment":"Outgoing messages were read","arguments":[{"name":"peer","type":"Peer","comment":"Peer"},{"name":"max_id","type":"int","comment":"Maximum ID of read outgoing messages"},{"name":"pts","type":"int","comment":"Event count after generation"},{"name":"pts_count","type":"int","comment":"Number of events that were generated"}]},{"kind":"class","name":"updateWebPage","type":"Update","id":2139689491,"comment":"An instant view webpage preview was generated","arguments":[{"name":"webpage","type":"WebPage","comment":"Webpage preview"},{"name":"pts","type":"int","comment":"Event count after generation"},{"name":"pts_count","type":"int","comment":"Number of events that were generated"}]},{"kind":"class","name":"updateReadMessagesContents","type":"Update","id":4163006849,"comment":"Contents of messages in the common message box were read","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"messages","type":"int","typeModifiers":{"isVector":true},"comment":"IDs of read messages"},{"name":"pts","type":"int","comment":"Event count after generation"},{"name":"pts_count","type":"int","comment":"Number of events that were generated"},{"name":"date","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"When was the last message in messages marked as read."}]},{"kind":"class","name":"updateChannelTooLong","type":"Update","id":277713951,"comment":"There are new updates in the specified channel, the client must fetch them.
\nIf the difference is too long or if the channel isn't currently in the states, start fetching from the specified pts.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"channel_id","type":"int53","comment":"The channel"},{"name":"pts","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"The PTS."}]},{"kind":"class","name":"updateChannel","type":"Update","id":1666927625,"comment":"Channel/supergroup ({@link RawChannel} and/or {@link RawChannelFull}) information was updated.\n\nThis update can only be received through getDifference or in {@link RawUpdates}/{@link RawUpdatesCombined} constructors, so it will always come bundled with the updated {@link RawChannel}, that should be applied as usual », without re-fetching the info manually.\n\nHowever, full peer information will not come bundled in updates, so the full peer cache ({@link RawChannelFull}) must be invalidated for channel_id when receiving this update.","arguments":[{"name":"channel_id","type":"int53","comment":"Channel ID"}]},{"kind":"class","name":"updateNewChannelMessage","type":"Update","id":1656358105,"comment":"A new message was sent in a channel/supergroup","arguments":[{"name":"message","type":"Message","comment":"New message"},{"name":"pts","type":"int","comment":"Event count after generation"},{"name":"pts_count","type":"int","comment":"Number of events that were generated"}]},{"kind":"class","name":"updateReadChannelInbox","type":"Update","id":2452516368,"comment":"Incoming messages in a channel/supergroup were read","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"folder_id","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Peer folder ID, for more info click here"},{"name":"channel_id","type":"int53","comment":"Channel/supergroup ID"},{"name":"max_id","type":"int","comment":"Position up to which all incoming messages are read."},{"name":"still_unread_count","type":"int","comment":"Count of messages weren't read yet"},{"name":"pts","type":"int","comment":"Event count after generation"}]},{"kind":"class","name":"updateDeleteChannelMessages","type":"Update","id":3274529554,"comment":"Some messages in a supergroup/channel were deleted","arguments":[{"name":"channel_id","type":"int53","comment":"Channel ID"},{"name":"messages","type":"int","typeModifiers":{"isVector":true},"comment":"IDs of messages that were deleted"},{"name":"pts","type":"int","comment":"Event count after generation"},{"name":"pts_count","type":"int","comment":"Number of events that were generated"}]},{"kind":"class","name":"updateChannelMessageViews","type":"Update","id":4062620680,"comment":"The view counter of a message in a channel has changed","arguments":[{"name":"channel_id","type":"int53","comment":"Channel ID"},{"name":"id","type":"int","comment":"ID of the message"},{"name":"views","type":"int","comment":"New view counter"}]},{"kind":"class","name":"updateChatParticipantAdmin","type":"Update","id":3620364706,"comment":"Admin permissions of a user in a basic group were changed","arguments":[{"name":"chat_id","type":"int53","comment":"Chat ID"},{"name":"user_id","type":"int53","comment":"ID of the (de)admined user"},{"name":"is_admin","type":"Bool","comment":"Whether the user was rendered admin"},{"name":"version","type":"int","comment":"Used in basic groups to reorder updates and make sure that all of them was received."}]},{"kind":"class","name":"updateNewStickerSet","type":"Update","id":1753886890,"comment":"A new stickerset was installed","arguments":[{"name":"stickerset","type":"messages.StickerSet","comment":"The installed stickerset"}]},{"kind":"class","name":"updateStickerSetsOrder","type":"Update","id":196268545,"comment":"The order of stickersets was changed","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"masks","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the updated stickers are mask stickers"},{"name":"emojis","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the updated stickers are custom emoji stickers"},{"name":"order","type":"long","typeModifiers":{"isVector":true},"comment":"New sticker order by sticker ID"}]},{"kind":"class","name":"updateStickerSets","type":"Update","id":834816008,"comment":"Installed stickersets have changed, the client should refetch them as described in the docs.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"masks","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether mask stickersets have changed"},{"name":"emojis","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the list of installed custom emoji stickersets has changed"}]},{"kind":"class","name":"updateSavedGifs","type":"Update","id":2473931806,"comment":"The saved gif list has changed, the client should refetch it using {@link messages.RawGetSavedGifsRequest}","arguments":[]},{"kind":"class","name":"updateBotInlineQuery","type":"Update","id":1232025500,"comment":"An incoming inline query","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"query_id","type":"long","comment":"Query ID"},{"name":"user_id","type":"int53","comment":"User that sent the query"},{"name":"query","type":"string","comment":"Text of query"},{"name":"geo","type":"GeoPoint","typeModifiers":{"predicate":"flags.0"},"comment":"Attached geolocation"},{"name":"peer_type","type":"InlineQueryPeerType","typeModifiers":{"predicate":"flags.1"},"comment":"Type of the chat from which the inline query was sent."},{"name":"offset","type":"string","comment":"Offset to navigate through results"}]},{"kind":"class","name":"updateBotInlineSend","type":"Update","id":317794823,"comment":"The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"user_id","type":"int53","comment":"The user that chose the result"},{"name":"query","type":"string","comment":"The query that was used to obtain the result"},{"name":"geo","type":"GeoPoint","typeModifiers":{"predicate":"flags.0"},"comment":"Optional. Sender location, only for bots that require user location"},{"name":"id","type":"string","comment":"The unique identifier for the result that was chosen"},{"name":"msg_id","type":"InputBotInlineMessageID","typeModifiers":{"predicate":"flags.1"},"comment":"Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message."}]},{"kind":"class","name":"updateEditChannelMessage","type":"Update","id":457133559,"comment":"A message was edited in a channel/supergroup","arguments":[{"name":"message","type":"Message","comment":"The new message"},{"name":"pts","type":"int","comment":"Event count after generation"},{"name":"pts_count","type":"int","comment":"Number of events that were generated"}]},{"kind":"class","name":"updateBotCallbackQuery","type":"Update","id":3117401229,"comment":"A callback button was pressed, and the button data was sent to the bot that created the button","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"query_id","type":"long","comment":"Query ID"},{"name":"user_id","type":"int53","comment":"ID of the user that pressed the button"},{"name":"peer","type":"Peer","comment":"Chat where the inline keyboard was sent"},{"name":"msg_id","type":"int","comment":"Message ID"},{"name":"chat_instance","type":"long","comment":"Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games."},{"name":"data","type":"bytes","typeModifiers":{"predicate":"flags.0"},"comment":"Callback data"},{"name":"game_short_name","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Short name of a Game to be returned, serves as the unique identifier for the game"}]},{"kind":"class","name":"updateEditMessage","type":"Update","id":3825430691,"comment":"A message was edited","arguments":[{"name":"message","type":"Message","comment":"The new edited message"},{"name":"pts","type":"int","comment":"PTS"},{"name":"pts_count","type":"int","comment":"PTS count"}]},{"kind":"class","name":"updateInlineBotCallbackQuery","type":"Update","id":1763610706,"comment":"This notification is received by bots when a button is pressed","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"query_id","type":"long","comment":"Query ID"},{"name":"user_id","type":"int53","comment":"ID of the user that pressed the button"},{"name":"msg_id","type":"InputBotInlineMessageID","comment":"ID of the inline message with the button"},{"name":"chat_instance","type":"long","comment":"Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games."},{"name":"data","type":"bytes","typeModifiers":{"predicate":"flags.0"},"comment":"Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field."},{"name":"game_short_name","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Short name of a Game to be returned, serves as the unique identifier for the game"}]},{"kind":"class","name":"updateReadChannelOutbox","type":"Update","id":3076495785,"comment":"Outgoing messages in a channel/supergroup were read","arguments":[{"name":"channel_id","type":"int53","comment":"Channel/supergroup ID"},{"name":"max_id","type":"int","comment":"Position up to which all outgoing messages are read."}]},{"kind":"class","name":"updateDraftMessage","type":"Update","id":457829485,"comment":"Notifies a change of a message draft.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"peer","type":"Peer","comment":"The peer to which the draft is associated"},{"name":"top_msg_id","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"ID of the forum topic to which the draft is associated"},{"name":"draft","type":"DraftMessage","comment":"The draft"}]},{"kind":"class","name":"updateReadFeaturedStickers","type":"Update","id":1461528386,"comment":"Some featured stickers were marked as read","arguments":[]},{"kind":"class","name":"updateRecentStickers","type":"Update","id":2588027936,"comment":"The recent sticker list was updated","arguments":[]},{"kind":"class","name":"updateConfig","type":"Update","id":2720652550,"comment":"The server-side configuration has changed; the client should re-fetch the config using {@link help.RawGetConfigRequest} and {@link help.RawGetAppConfigRequest}.","arguments":[]},{"kind":"class","name":"updatePtsChanged","type":"Update","id":861169551,"comment":"Common message box sequence PTS has changed, state has to be refetched using updates.getState","arguments":[]},{"kind":"class","name":"updateChannelWebPage","type":"Update","id":791390623,"comment":"A webpage preview of a link in a channel/supergroup message was generated","arguments":[{"name":"channel_id","type":"int53","comment":"Channel/supergroup ID"},{"name":"webpage","type":"WebPage","comment":"Generated webpage preview"},{"name":"pts","type":"int","comment":"Event count after generation"},{"name":"pts_count","type":"int","comment":"Number of events that were generated"}]},{"kind":"class","name":"updateDialogPinned","type":"Update","id":1852826908,"comment":"A dialog was pinned/unpinned","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"pinned","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the dialog was pinned"},{"name":"folder_id","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Peer folder ID, for more info click here"},{"name":"peer","type":"DialogPeer","comment":"The dialog"}]},{"kind":"class","name":"updatePinnedDialogs","type":"Update","id":4195302562,"comment":"Pinned dialogs were updated","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"folder_id","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Peer folder ID, for more info click here"},{"name":"order","type":"DialogPeer","typeModifiers":{"predicate":"flags.0","isVector":true},"comment":"New order of pinned dialogs"}]},{"kind":"class","name":"updateBotWebhookJSON","type":"Update","id":2199371971,"comment":"A new incoming event; for bots only","arguments":[{"name":"data","type":"DataJSON","comment":"The event"}]},{"kind":"class","name":"updateBotWebhookJSONQuery","type":"Update","id":2610053286,"comment":"A new incoming query; for bots only","arguments":[{"name":"query_id","type":"long","comment":"Query identifier"},{"name":"data","type":"DataJSON","comment":"Query data"},{"name":"timeout","type":"int","comment":"Query timeout"}]},{"kind":"class","name":"updateBotShippingQuery","type":"Update","id":3048144253,"comment":"This object contains information about an incoming shipping query.","arguments":[{"name":"query_id","type":"long","comment":"Unique query identifier"},{"name":"user_id","type":"int53","comment":"User who sent the query"},{"name":"payload","type":"bytes","comment":"Bot specified invoice payload"},{"name":"shipping_address","type":"PostAddress","comment":"User specified shipping address"}]},{"kind":"class","name":"updateBotPrecheckoutQuery","type":"Update","id":2359990934,"comment":"This object contains information about an incoming pre-checkout query.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"query_id","type":"long","comment":"Unique query identifier"},{"name":"user_id","type":"int53","comment":"User who sent the query"},{"name":"payload","type":"bytes","comment":"Bot specified invoice payload"},{"name":"info","type":"PaymentRequestedInfo","typeModifiers":{"predicate":"flags.0"},"comment":"Order info provided by the user"},{"name":"shipping_option_id","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Identifier of the shipping option chosen by the user"},{"name":"currency","type":"string","comment":"Three-letter ISO 4217 currency code, or XTR for Telegram Stars."},{"name":"total_amount","type":"long","comment":"Total amount in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."}]},{"kind":"class","name":"updatePhoneCall","type":"Update","id":2869914398,"comment":"An incoming phone call","arguments":[{"name":"phone_call","type":"PhoneCall","comment":"Phone call"}]},{"kind":"class","name":"updateLangPackTooLong","type":"Update","id":1180041828,"comment":"A language pack has changed, the client should manually fetch the changed strings using {@link langpack.RawGetDifferenceRequest}","arguments":[{"name":"lang_code","type":"string","comment":"Language code"}]},{"kind":"class","name":"updateLangPack","type":"Update","id":1442983757,"comment":"Language pack updated","arguments":[{"name":"difference","type":"LangPackDifference","comment":"Changed strings"}]},{"kind":"class","name":"updateFavedStickers","type":"Update","id":3843135853,"comment":"The list of favorited stickers was changed, the client should call {@link messages.RawGetFavedStickersRequest} to refetch the new list","arguments":[]},{"kind":"class","name":"updateChannelReadMessagesContents","type":"Update","id":3928556893,"comment":"The specified channel/supergroup messages were read","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"channel_id","type":"int53","comment":"Channel/supergroup ID"},{"name":"top_msg_id","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Forum topic ID."},{"name":"messages","type":"int","typeModifiers":{"isVector":true},"comment":"IDs of messages that were read"}]},{"kind":"class","name":"updateContactsReset","type":"Update","id":1887741886,"comment":"All contacts were deleted","arguments":[]},{"kind":"class","name":"updateChannelAvailableMessages","type":"Update","id":2990524056,"comment":"The history of a channel/supergroup was hidden.","arguments":[{"name":"channel_id","type":"int53","comment":"Channel/supergroup ID"},{"name":"available_min_id","type":"int","comment":"Identifier of a maximum unavailable message in a channel due to hidden history."}]},{"kind":"class","name":"updateDialogUnreadMark","type":"Update","id":3781450179,"comment":"The manual unread mark of a chat was changed","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"unread","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Was the chat marked or unmarked as read"},{"name":"peer","type":"DialogPeer","comment":"The dialog"}]},{"kind":"class","name":"updateMessagePoll","type":"Update","id":2896258427,"comment":"The results of a poll have changed","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"poll_id","type":"long","comment":"Poll ID"},{"name":"poll","type":"Poll","typeModifiers":{"predicate":"flags.0"},"comment":"If the server knows the client hasn't cached this poll yet, the poll itself"},{"name":"results","type":"PollResults","comment":"New poll results"}]},{"kind":"class","name":"updateChatDefaultBannedRights","type":"Update","id":1421875280,"comment":"Default banned rights in a normal chat were updated","arguments":[{"name":"peer","type":"Peer","comment":"The chat"},{"name":"default_banned_rights","type":"ChatBannedRights","comment":"New default banned rights"},{"name":"version","type":"int","comment":"Version"}]},{"kind":"class","name":"updateFolderPeers","type":"Update","id":422972864,"comment":"The peer list of a peer folder was updated","arguments":[{"name":"folder_peers","type":"FolderPeer","typeModifiers":{"isVector":true},"comment":"New peer list"},{"name":"pts","type":"int","comment":"Event count after generation"},{"name":"pts_count","type":"int","comment":"Number of events that were generated"}]},{"kind":"class","name":"updatePeerSettings","type":"Update","id":1786671974,"comment":"Settings of a certain peer have changed","arguments":[{"name":"peer","type":"Peer","comment":"The peer"},{"name":"settings","type":"PeerSettings","comment":"Associated peer settings"}]},{"kind":"class","name":"updatePeerLocated","type":"Update","id":3031420848,"comment":"List of peers near you was updated","arguments":[{"name":"peers","type":"PeerLocated","typeModifiers":{"isVector":true},"comment":"Geolocated peer list update"}]},{"kind":"class","name":"updateNewScheduledMessage","type":"Update","id":967122427,"comment":"A message was added to the schedule queue of a chat","arguments":[{"name":"message","type":"Message","comment":"Message"}]},{"kind":"class","name":"updateDeleteScheduledMessages","type":"Update","id":2424728814,"comment":"Some scheduled messages were deleted from the schedule queue of a chat","arguments":[{"name":"peer","type":"Peer","comment":"Peer"},{"name":"messages","type":"int","typeModifiers":{"isVector":true},"comment":"Deleted scheduled messages"}]},{"kind":"class","name":"updateTheme","type":"Update","id":2182544291,"comment":"A cloud theme was updated","arguments":[{"name":"theme","type":"Theme","comment":"Theme"}]},{"kind":"class","name":"updateGeoLiveViewed","type":"Update","id":2267003193,"comment":"Live geo position message was viewed","arguments":[{"name":"peer","type":"Peer","comment":"The user that viewed the live geo position"},{"name":"msg_id","type":"int","comment":"Message ID of geo position message"}]},{"kind":"class","name":"updateLoginToken","type":"Update","id":1448076945,"comment":"A login token (for login via QR code) was accepted.","arguments":[]},{"kind":"class","name":"updateMessagePollVote","type":"Update","id":619974263,"comment":"A specific peer has voted in a poll","arguments":[{"name":"poll_id","type":"long","comment":"Poll ID"},{"name":"peer","type":"Peer","comment":"The peer that voted in the poll"},{"name":"options","type":"bytes","typeModifiers":{"isVector":true},"comment":"Chosen option(s)"},{"name":"qts","type":"int","comment":"New qts value, see updates » for more info."}]},{"kind":"class","name":"updateDialogFilter","type":"Update","id":654302845,"comment":"A new folder was added","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"id","type":"int","comment":"Folder ID"},{"name":"filter","type":"DialogFilter","typeModifiers":{"predicate":"flags.0"},"comment":"Folder info"}]},{"kind":"class","name":"updateDialogFilterOrder","type":"Update","id":2782339333,"comment":"New folder order","arguments":[{"name":"order","type":"int","typeModifiers":{"isVector":true},"comment":"Ordered folder IDs"}]},{"kind":"class","name":"updateDialogFilters","type":"Update","id":889491791,"comment":"Clients should update folder info","arguments":[]},{"kind":"class","name":"updatePhoneCallSignalingData","type":"Update","id":643940105,"comment":"Incoming phone call signaling payload","arguments":[{"name":"phone_call_id","type":"long","comment":"Phone call ID"},{"name":"data","type":"bytes","comment":"Signaling payload"}]},{"kind":"class","name":"updateChannelMessageForwards","type":"Update","id":3533318132,"comment":"The forward counter of a message in a channel has changed","arguments":[{"name":"channel_id","type":"int53","comment":"Channel ID"},{"name":"id","type":"int","comment":"ID of the message"},{"name":"forwards","type":"int","comment":"New forward counter"}]},{"kind":"class","name":"updateReadChannelDiscussionInbox","type":"Update","id":3601962310,"comment":"Incoming comments in a discussion thread were marked as read","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"channel_id","type":"int53","comment":"Discussion group ID"},{"name":"top_msg_id","type":"int","comment":"ID of the group message that started the thread (message in linked discussion group)"},{"name":"read_max_id","type":"int","comment":"Message ID of latest read incoming message for this thread"},{"name":"broadcast_id","type":"int53","typeModifiers":{"predicate":"flags.0"},"comment":"If set, contains the ID of the channel that contains the post that started the comment thread in the discussion group (channel_id)"},{"name":"broadcast_post","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"If set, contains the ID of the channel post that started the comment thread"}]},{"kind":"class","name":"updateReadChannelDiscussionOutbox","type":"Update","id":1767677564,"comment":"Outgoing comments in a discussion thread were marked as read","arguments":[{"name":"channel_id","type":"int53","comment":"Supergroup ID"},{"name":"top_msg_id","type":"int","comment":"ID of the group message that started the thread"},{"name":"read_max_id","type":"int","comment":"Message ID of latest read outgoing message for this thread"}]},{"kind":"class","name":"updatePeerBlocked","type":"Update","id":3957356370,"comment":"We blocked a peer, see here » for more info on blocklists.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"blocked","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the peer was blocked or unblocked"},{"name":"blocked_my_stories_from","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the peer was added/removed to/from the story blocklist; if not set, this update affects the main blocklist, see here » for more info."},{"name":"peer_id","type":"Peer","comment":"The (un)blocked peer"}]},{"kind":"class","name":"updateChannelUserTyping","type":"Update","id":2357774627,"comment":"A user is typing in a supergroup, channel or message thread","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"channel_id","type":"int53","comment":"Channel ID"},{"name":"top_msg_id","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Thread ID"},{"name":"from_id","type":"Peer","comment":"The peer that is typing"},{"name":"action","type":"SendMessageAction","comment":"Whether the user is typing, sending a media or doing something else"}]},{"kind":"class","name":"updatePinnedMessages","type":"Update","id":3984976565,"comment":"Some messages were pinned in a chat","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"pinned","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the messages were pinned or unpinned"},{"name":"peer","type":"Peer","comment":"Peer"},{"name":"messages","type":"int","typeModifiers":{"isVector":true},"comment":"Message IDs"},{"name":"pts","type":"int","comment":"Event count after generation"},{"name":"pts_count","type":"int","comment":"Number of events that were generated"}]},{"kind":"class","name":"updatePinnedChannelMessages","type":"Update","id":1538885128,"comment":"Messages were pinned/unpinned in a channel/supergroup","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"pinned","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the messages were pinned or unpinned"},{"name":"channel_id","type":"int53","comment":"Channel ID"},{"name":"messages","type":"int","typeModifiers":{"isVector":true},"comment":"Messages"},{"name":"pts","type":"int","comment":"Event count after generation"},{"name":"pts_count","type":"int","comment":"Number of events that were generated"}]},{"kind":"class","name":"updateChat","type":"Update","id":4170869326,"comment":"Chat ({@link RawChat} and/or {@link RawChatFull}) information was updated.\n\nThis update can only be received through getDifference or in {@link RawUpdates}/{@link RawUpdatesCombined} constructors, so it will always come bundled with the updated {@link RawChat}, that should be applied as usual », without re-fetching the info manually.\n\nHowever, full peer information will not come bundled in updates, so the full peer cache ({@link RawChatFull}) must be invalidated for chat_id when receiving this update.","arguments":[{"name":"chat_id","type":"int53","comment":"Chat ID"}]},{"kind":"class","name":"updateGroupCallParticipants","type":"Update","id":4075543374,"comment":"The participant list of a certain group call has changed","arguments":[{"name":"call","type":"InputGroupCall","comment":"Group call"},{"name":"participants","type":"GroupCallParticipant","typeModifiers":{"isVector":true},"comment":"New participant list"},{"name":"version","type":"int","comment":"Version"}]},{"kind":"class","name":"updateGroupCall","type":"Update","id":347227392,"comment":"A new groupcall was started","arguments":[{"name":"chat_id","type":"int53","comment":"The channel/supergroup where this group call or livestream takes place"},{"name":"call","type":"GroupCall","comment":"Info about the group call or livestream"}]},{"kind":"class","name":"updatePeerHistoryTTL","type":"Update","id":3147544997,"comment":"The Time-To-Live for messages sent by the current user in a specific chat has changed","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"peer","type":"Peer","comment":"The chat"},{"name":"ttl_period","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"The new Time-To-Live"}]},{"kind":"class","name":"updateChatParticipant","type":"Update","id":3498534458,"comment":"A user has joined or left a specific chat","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"chat_id","type":"int53","comment":"Chat ID"},{"name":"date","type":"int","comment":"When did this event occur"},{"name":"actor_id","type":"int53","comment":"User that triggered the change (inviter, admin that kicked the user, or the even the user_id itself)"},{"name":"user_id","type":"int53","comment":"User that was affected by the change"},{"name":"prev_participant","type":"ChatParticipant","typeModifiers":{"predicate":"flags.0"},"comment":"Previous participant info (empty if this participant just joined)"},{"name":"new_participant","type":"ChatParticipant","typeModifiers":{"predicate":"flags.1"},"comment":"New participant info (empty if this participant just left)"},{"name":"invite","type":"ExportedChatInvite","typeModifiers":{"predicate":"flags.2"},"comment":"The invite that was used to join the group"},{"name":"qts","type":"int","comment":"New qts value, see updates » for more info."}]},{"kind":"class","name":"updateChannelParticipant","type":"Update","id":2556246715,"comment":"A participant has left, joined, was banned or admined in a channel or supergroup.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"via_chatlist","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether the participant joined using a chat folder deep link »."},{"name":"channel_id","type":"int53","comment":"Channel ID"},{"name":"date","type":"int","comment":"Date of the event"},{"name":"actor_id","type":"int53","comment":"User that triggered the change (inviter, admin that kicked the user, or the even the user_id itself)"},{"name":"user_id","type":"int53","comment":"User that was affected by the change"},{"name":"prev_participant","type":"ChannelParticipant","typeModifiers":{"predicate":"flags.0"},"comment":"Previous participant status"},{"name":"new_participant","type":"ChannelParticipant","typeModifiers":{"predicate":"flags.1"},"comment":"New participant status"},{"name":"invite","type":"ExportedChatInvite","typeModifiers":{"predicate":"flags.2"},"comment":"Chat invite used to join the channel/supergroup"},{"name":"qts","type":"int","comment":"New qts value, see updates » for more info."}]},{"kind":"class","name":"updateBotStopped","type":"Update","id":3297184329,"comment":"A bot was stopped or re-started.","arguments":[{"name":"user_id","type":"int53","comment":"The user ID"},{"name":"date","type":"int","comment":"When did this action occur"},{"name":"stopped","type":"Bool","comment":"Whether the bot was stopped or started"},{"name":"qts","type":"int","comment":"New qts value, see updates » for more info."}]},{"kind":"class","name":"updateGroupCallConnection","type":"Update","id":192428418,"comment":"New WebRTC parameters","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"presentation","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Are these parameters related to the screen capture session currently in progress?"},{"name":"params","type":"DataJSON","comment":"WebRTC parameters"}]},{"kind":"class","name":"updateBotCommands","type":"Update","id":1299263278,"comment":"The command set of a certain bot in a certain chat has changed.","arguments":[{"name":"peer","type":"Peer","comment":"The affected chat"},{"name":"bot_id","type":"int53","comment":"ID of the bot that changed its command set"},{"name":"commands","type":"BotCommand","typeModifiers":{"isVector":true},"comment":"New bot commands"}]},{"kind":"class","name":"updatePendingJoinRequests","type":"Update","id":1885586395,"comment":"Someone has requested to join a chat or channel","arguments":[{"name":"peer","type":"Peer","comment":"Chat or channel"},{"name":"requests_pending","type":"int","comment":"Number of pending join requests » for the chat or channel"},{"name":"recent_requesters","type":"int53","typeModifiers":{"isVector":true},"comment":"IDs of users that have recently requested to join"}]},{"kind":"class","name":"updateBotChatInviteRequester","type":"Update","id":299870598,"comment":"Someone has requested to join a chat or channel (bots only, users will receive an {@link RawUpdatePendingJoinRequests}, instead)","arguments":[{"name":"peer","type":"Peer","comment":"The chat or channel in question"},{"name":"date","type":"int","comment":"When was the join request » made"},{"name":"user_id","type":"int53","comment":"The user ID that is asking to join the chat or channel"},{"name":"about","type":"string","comment":"Bio of the user"},{"name":"invite","type":"ExportedChatInvite","comment":"Chat invite link that was used by the user to send the join request »"},{"name":"qts","type":"int","comment":"QTS event sequence identifier"}]},{"kind":"class","name":"updateMessageReactions","type":"Update","id":1578843320,"comment":"New message reactions » are available","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"peer","type":"Peer","comment":"Peer"},{"name":"msg_id","type":"int","comment":"Message ID"},{"name":"top_msg_id","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Forum topic ID"},{"name":"reactions","type":"MessageReactions","comment":"Reactions"}]},{"kind":"class","name":"updateAttachMenuBots","type":"Update","id":397910539,"comment":"The list of installed attachment menu entries » has changed, use {@link messages.RawGetAttachMenuBotsRequest} to fetch the updated list.","arguments":[]},{"kind":"class","name":"updateWebViewResultSent","type":"Update","id":361936797,"comment":"Indicates to a bot that a webview was closed and an inline message was sent on behalf of the user using {@link messages.RawSendWebViewResultMessageRequest}","arguments":[{"name":"query_id","type":"long","comment":"Web app interaction ID"}]},{"kind":"class","name":"updateBotMenuButton","type":"Update","id":347625491,"comment":"The menu button behavior for the specified bot has changed","arguments":[{"name":"bot_id","type":"int53","comment":"Bot ID"},{"name":"button","type":"BotMenuButton","comment":"New menu button"}]},{"kind":"class","name":"updateSavedRingtones","type":"Update","id":1960361625,"comment":"The list of saved notification sounds has changed, use {@link account.RawGetSavedRingtonesRequest} to fetch the new list.","arguments":[]},{"kind":"class","name":"updateTranscribedAudio","type":"Update","id":8703322,"comment":"A pending voice message transcription » initiated with {@link messages.RawTranscribeAudioRequest} was updated.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"pending","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether this transcription is still pending and further {@link RawUpdateTranscribedAudio} about it will be sent in the future."},{"name":"peer","type":"Peer","comment":"Peer of the transcribed message"},{"name":"msg_id","type":"int","comment":"Transcribed message ID"},{"name":"transcription_id","type":"long","comment":"Transcription ID"},{"name":"text","type":"string","comment":"Transcribed text"}]},{"kind":"class","name":"updateReadFeaturedEmojiStickers","type":"Update","id":4216080748,"comment":"Some featured custom emoji stickers were marked as read","arguments":[]},{"kind":"class","name":"updateUserEmojiStatus","type":"Update","id":674706841,"comment":"The emoji status of a certain user has changed","arguments":[{"name":"user_id","type":"int53","comment":"User ID"},{"name":"emoji_status","type":"EmojiStatus","comment":"New emoji status"}]},{"kind":"class","name":"updateRecentEmojiStatuses","type":"Update","id":821314523,"comment":"The list of recent emoji statuses has changed","arguments":[]},{"kind":"class","name":"updateRecentReactions","type":"Update","id":1870160884,"comment":"The list of recent message reactions has changed","arguments":[]},{"kind":"class","name":"updateMoveStickerSetToTop","type":"Update","id":2264715141,"comment":"A stickerset was just moved to top, see here for more info »","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"masks","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"This update is referring to a mask stickerset"},{"name":"emojis","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"This update is referring to a custom emoji stickerset"},{"name":"stickerset","type":"long","comment":"Stickerset ID"}]},{"kind":"class","name":"updateMessageExtendedMedia","type":"Update","id":3584300836,"comment":"You bought a paid media »: this update contains the revealed media.","arguments":[{"name":"peer","type":"Peer","comment":"Peer where the paid media was posted"},{"name":"msg_id","type":"int","comment":"ID of the message containing the paid media"},{"name":"extended_media","type":"MessageExtendedMedia","typeModifiers":{"isVector":true},"comment":"Revealed media, contains only {@link RawMessageExtendedMedia} constructors."}]},{"kind":"class","name":"updateChannelPinnedTopic","type":"Update","id":422509539,"comment":"A forum topic » was pinned or unpinned.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"pinned","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the topic was pinned or unpinned"},{"name":"channel_id","type":"int53","comment":"The forum ID"},{"name":"topic_id","type":"int","comment":"The topic ID"}]},{"kind":"class","name":"updateChannelPinnedTopics","type":"Update","id":4263085570,"comment":"The pinned topics of a forum have changed.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"channel_id","type":"int53","comment":"Forum ID."},{"name":"order","type":"int","typeModifiers":{"predicate":"flags.0","isVector":true},"comment":"Ordered list containing the IDs of all pinned topics."}]},{"kind":"class","name":"updateUser","type":"Update","id":542282808,"comment":"User ({@link RawUser} and/or {@link RawUserFull}) information was updated.\n\nThis update can only be received through getDifference or in {@link RawUpdates}/{@link RawUpdatesCombined} constructors, so it will always come bundled with the updated {@link RawUser}, that should be applied as usual », without re-fetching the info manually.\n\nHowever, full peer information will not come bundled in updates, so the full peer cache ({@link RawUserFull}) must be invalidated for user_id when receiving this update.","arguments":[{"name":"user_id","type":"int53","comment":"User ID"}]},{"kind":"class","name":"updateAutoSaveSettings","type":"Update","id":3959795863,"comment":"Media autosave settings have changed and must be refetched using {@link account.RawGetAutoSaveSettingsRequest}.","arguments":[]},{"kind":"class","name":"updateStory","type":"Update","id":1974712216,"comment":"A new story was posted.","arguments":[{"name":"peer","type":"Peer","comment":"ID of the poster."},{"name":"story","type":"StoryItem","comment":"The story that was posted."}]},{"kind":"class","name":"updateReadStories","type":"Update","id":4149121835,"comment":"Stories of a specific peer were marked as read.","arguments":[{"name":"peer","type":"Peer","comment":"The peer"},{"name":"max_id","type":"int","comment":"ID of the last story that was marked as read"}]},{"kind":"class","name":"updateStoryID","type":"Update","id":468923833,"comment":"A story was successfully uploaded.\n\nOnce a story is successfully uploaded, an {@link RawUpdateStoryID} will be returned, indicating the story ID (id) that was attributed to the story (like for messages, random_id indicates the random_id that was passed to {@link stories.RawSendStoryRequest}: this way, you can tell which story was assigned a specific id by checking which {@link stories.RawSendStoryRequest} call has the returned random_id).","arguments":[{"name":"id","type":"int","comment":"The id that was attributed to the story."},{"name":"random_id","type":"long","comment":"The random_id that was passed to {@link stories.RawSendStoryRequest}."}]},{"kind":"class","name":"updateStoriesStealthMode","type":"Update","id":738741697,"comment":"Indicates that stories stealth mode was activated.","arguments":[{"name":"stealth_mode","type":"StoriesStealthMode","comment":"Information about the current stealth mode session."}]},{"kind":"class","name":"updateSentStoryReaction","type":"Update","id":2103604867,"comment":"Indicates we reacted to a story ».","arguments":[{"name":"peer","type":"Peer","comment":"The peer that sent the story"},{"name":"story_id","type":"int","comment":"ID of the story we reacted to"},{"name":"reaction","type":"Reaction","comment":"The reaction that was sent"}]},{"kind":"class","name":"updateBotChatBoost","type":"Update","id":2421019804,"comment":"A channel/supergroup boost has changed (bots only)","arguments":[{"name":"peer","type":"Peer","comment":"Channel"},{"name":"boost","type":"Boost","comment":"New boost information"},{"name":"qts","type":"int","comment":"QTS event sequence identifier"}]},{"kind":"class","name":"updateChannelViewForumAsMessages","type":"Update","id":129403168,"comment":"Users may also choose to display messages from all topics as if they were sent to a normal group, using a \"View as messages\" setting in the local client.
\nThis setting only affects the current account, and is synced to other logged in sessions using the {@link channels.RawToggleViewForumAsMessagesRequest} method; invoking this method will update the value of the view_forum_as_messages flag of {@link RawChannelFull} or {@link RawDialog} and emit an {@link RawUpdateChannelViewForumAsMessages}.","arguments":[{"name":"channel_id","type":"int53","comment":"The forum ID"},{"name":"enabled","type":"Bool","comment":"The new value of the toggle."}]},{"kind":"class","name":"updatePeerWallpaper","type":"Update","id":2923368477,"comment":"The wallpaper » of a given peer has changed.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"wallpaper_overridden","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the other user has chosen a custom wallpaper for us using {@link messages.RawSetChatWallPaperRequest} and the for_both flag, see here » for more info."},{"name":"peer","type":"Peer","comment":"The peer where the wallpaper has changed."},{"name":"wallpaper","type":"WallPaper","typeModifiers":{"predicate":"flags.0"},"comment":"The new wallpaper, if none the wallpaper was removed and the default wallpaper should be used."}]},{"kind":"class","name":"updateBotMessageReaction","type":"Update","id":2887898062,"comment":"Bots only: a user has changed their reactions on a message with public reactions.","arguments":[{"name":"peer","type":"Peer","comment":"Peer of the reacted-to message."},{"name":"msg_id","type":"int","comment":"ID of the reacted-to message."},{"name":"date","type":"int","comment":"Date of the change."},{"name":"actor","type":"Peer","comment":"The user that (un)reacted to the message."},{"name":"old_reactions","type":"Reaction","typeModifiers":{"isVector":true},"comment":"Old reactions"},{"name":"new_reactions","type":"Reaction","typeModifiers":{"isVector":true},"comment":"New reactions"},{"name":"qts","type":"int","comment":"QTS event sequence identifier"}]},{"kind":"class","name":"updateBotMessageReactions","type":"Update","id":164329305,"comment":"Bots only: the number of reactions on a message with anonymous reactions has changed.","arguments":[{"name":"peer","type":"Peer","comment":"Peer of the reacted-to message."},{"name":"msg_id","type":"int","comment":"ID of the reacted-to message."},{"name":"date","type":"int","comment":"Date of the change."},{"name":"reactions","type":"ReactionCount","typeModifiers":{"isVector":true},"comment":"New reaction counters."},{"name":"qts","type":"int","comment":"QTS event sequence identifier"}]},{"kind":"class","name":"updateSavedDialogPinned","type":"Update","id":2930744948,"comment":"A saved message dialog was pinned/unpinned","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"pinned","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the dialog was pinned"},{"name":"peer","type":"DialogPeer","comment":"The dialog"}]},{"kind":"class","name":"updatePinnedSavedDialogs","type":"Update","id":1751942566,"comment":"Pinned saved dialogs » were updated","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"order","type":"DialogPeer","typeModifiers":{"predicate":"flags.0","isVector":true},"comment":"New order of pinned saved dialogs"}]},{"kind":"class","name":"updateSavedReactionTags","type":"Update","id":969307186,"comment":"The list of reaction tag » names assigned by the user has changed and should be refetched using {@link messages.RawGetSavedReactionTagsRequest}.","arguments":[]},{"kind":"class","name":"updateSmsJob","type":"Update","id":4049758676,"comment":"A new SMS job was received","arguments":[{"name":"job_id","type":"string","comment":"SMS job ID"}]},{"kind":"class","name":"updateQuickReplies","type":"Update","id":4182182578,"comment":"Info about or the order of quick reply shortcuts » was changed.","arguments":[{"name":"quick_replies","type":"QuickReply","typeModifiers":{"isVector":true},"comment":"New quick reply shortcut order and information."}]},{"kind":"class","name":"updateNewQuickReply","type":"Update","id":4114458391,"comment":"A new quick reply shortcut » was created.","arguments":[{"name":"quick_reply","type":"QuickReply","comment":"Quick reply shortcut."}]},{"kind":"class","name":"updateDeleteQuickReply","type":"Update","id":1407644140,"comment":"A quick reply shortcut » was deleted. This will not emit {@link RawUpdateDeleteQuickReplyMessages} updates, even if all the messages in the shortcut are also deleted by this update.","arguments":[{"name":"shortcut_id","type":"int","comment":"ID of the quick reply shortcut that was deleted."}]},{"kind":"class","name":"updateQuickReplyMessage","type":"Update","id":1040518415,"comment":"A new message was added to a quick reply shortcut ».","arguments":[{"name":"message","type":"Message","comment":"The message that was added (the {@link RawMessage}.quick_reply_shortcut_id field will contain the shortcut ID)."}]},{"kind":"class","name":"updateDeleteQuickReplyMessages","type":"Update","id":1450174413,"comment":"One or more messages in a quick reply shortcut » were deleted.","arguments":[{"name":"shortcut_id","type":"int","comment":"Quick reply shortcut ID."},{"name":"messages","type":"int","typeModifiers":{"isVector":true},"comment":"IDs of the deleted messages."}]},{"kind":"class","name":"updateBotBusinessConnect","type":"Update","id":2330315130,"comment":"Connecting or disconnecting a business bot or changing the connection settings will emit an {@link RawUpdateBotBusinessConnect} update to the bot, with the new settings and a connection_id that will be used by the bot to handle updates from and send messages as the user.","arguments":[{"name":"connection","type":"BotBusinessConnection","comment":"Business connection settings"},{"name":"qts","type":"int","comment":"New qts value, see updates » for more info."}]},{"kind":"class","name":"updateBotNewBusinessMessage","type":"Update","id":2648388732,"comment":"A message was received via a connected business chat ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"connection_id","type":"string","comment":"Connection ID."},{"name":"message","type":"Message","comment":"New message."},{"name":"reply_to_message","type":"Message","typeModifiers":{"predicate":"flags.0"},"comment":"The message that message is replying to."},{"name":"qts","type":"int","comment":"New qts value, see updates » for more info."}]},{"kind":"class","name":"updateBotEditBusinessMessage","type":"Update","id":132077692,"comment":"A message was edited in a connected business chat ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"connection_id","type":"string","comment":"Business connection ID"},{"name":"message","type":"Message","comment":"New message."},{"name":"reply_to_message","type":"Message","typeModifiers":{"predicate":"flags.0"},"comment":"The message that message is replying to."},{"name":"qts","type":"int","comment":"New qts value, see updates » for more info."}]},{"kind":"class","name":"updateBotDeleteBusinessMessage","type":"Update","id":2687146030,"comment":"A message was deleted in a connected business chat ».","arguments":[{"name":"connection_id","type":"string","comment":"Business connection ID."},{"name":"peer","type":"Peer","comment":"Peer where the messages were deleted."},{"name":"messages","type":"int","typeModifiers":{"isVector":true},"comment":"IDs of the messages that were deleted."},{"name":"qts","type":"int","comment":"New qts value, see updates » for more info."}]},{"kind":"class","name":"updateNewStoryReaction","type":"Update","id":405070859,"comment":"Represents a new reaction to a story.","arguments":[{"name":"story_id","type":"int","comment":"Story ID."},{"name":"peer","type":"Peer","comment":"The peer where the story was posted."},{"name":"reaction","type":"Reaction","comment":"The reaction."}]},{"kind":"class","name":"updateBroadcastRevenueTransactions","type":"Update","id":3755565557,"comment":"A new channel ad revenue transaction was made, see here » for more info.","arguments":[{"name":"peer","type":"Peer","comment":"Channel"},{"name":"balances","type":"BroadcastRevenueBalances","comment":"New ad revenue balance."}]},{"kind":"class","name":"updateStarsBalance","type":"Update","id":263737752,"comment":"The current account's Telegram Stars balance » has changed.","arguments":[{"name":"balance","type":"long","comment":"New balance."}]},{"kind":"class","name":"updateBusinessBotCallbackQuery","type":"Update","id":513998247,"comment":"A callback button sent via a business connection was pressed, and the button data was sent to the bot that created the button.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"query_id","type":"long","comment":"Query ID"},{"name":"user_id","type":"int53","comment":"ID of the user that pressed the button"},{"name":"connection_id","type":"string","comment":"Business connection ID"},{"name":"message","type":"Message","comment":"Message that contains the keyboard (also contains info about the chat where the message was sent)."},{"name":"reply_to_message","type":"Message","typeModifiers":{"predicate":"flags.2"},"comment":"The message that message is replying to."},{"name":"chat_instance","type":"long","comment":"Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games."},{"name":"data","type":"bytes","typeModifiers":{"predicate":"flags.0"},"comment":"Callback data"}]},{"kind":"class","name":"updateStarsRevenueStatus","type":"Update","id":2776936473,"comment":"The Telegram Star balance of a channel/bot we own has changed ».","arguments":[{"name":"peer","type":"Peer","comment":"Channel/bot"},{"name":"status","type":"StarsRevenueStatus","comment":"New Telegram Star balance."}]},{"kind":"class","name":"updates.state","type":"updates.State","id":2775329342,"comment":"Updates state.","arguments":[{"name":"pts","type":"int","comment":"Number of events occurred in a text box"},{"name":"qts","type":"int","comment":"Position in a sequence of updates in secret chats. For further details refer to article secret chats"},{"name":"date","type":"int","comment":"Date of condition"},{"name":"seq","type":"int","comment":"Number of sent updates"},{"name":"unread_count","type":"int","comment":"Number of unread messages"}]},{"kind":"class","name":"updates.differenceEmpty","type":"updates.Difference","id":1567990072,"comment":"No events.","arguments":[{"name":"date","type":"int","comment":"Current date"},{"name":"seq","type":"int","comment":"Number of sent updates"}]},{"kind":"class","name":"updates.difference","type":"updates.Difference","id":16030880,"comment":"Full list of occurred events.","arguments":[{"name":"new_messages","type":"Message","typeModifiers":{"isVector":true},"comment":"List of new messages"},{"name":"new_encrypted_messages","type":"EncryptedMessage","typeModifiers":{"isVector":true},"comment":"List of new encrypted secret chat messages"},{"name":"other_updates","type":"Update","typeModifiers":{"isVector":true},"comment":"List of updates"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"List of chats mentioned in events"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"List of users mentioned in events"},{"name":"state","type":"updates.State","comment":"Current state"}]},{"kind":"class","name":"updates.differenceSlice","type":"updates.Difference","id":2835028353,"comment":"Incomplete list of occurred events.","arguments":[{"name":"new_messages","type":"Message","typeModifiers":{"isVector":true},"comment":"List of new messages"},{"name":"new_encrypted_messages","type":"EncryptedMessage","typeModifiers":{"isVector":true},"comment":"New messages from the encrypted event sequence"},{"name":"other_updates","type":"Update","typeModifiers":{"isVector":true},"comment":"List of updates"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"List of chats mentioned in events"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"List of users mentioned in events"},{"name":"intermediate_state","type":"updates.State","comment":"Intermediary state"}]},{"kind":"class","name":"updates.differenceTooLong","type":"updates.Difference","id":1258196845,"comment":"The difference is too long, and the specified state must be used to refetch updates.","arguments":[{"name":"pts","type":"int","comment":"The new state to use."}]},{"kind":"class","name":"updatesTooLong","type":"Updates","id":3809980286,"comment":"Too many updates, it is necessary to execute {@link updates.RawGetDifferenceRequest}.","arguments":[]},{"kind":"class","name":"updateShortMessage","type":"Updates","id":826001400,"comment":"Info about a message sent to (received from) another user","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"out","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the message is outgoing"},{"name":"mentioned","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"Whether we were mentioned in the message"},{"name":"media_unread","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Whether there are some unread mentions in this message"},{"name":"silent","type":"true","typeModifiers":{"predicate":"flags.13"},"comment":"If true, the message is a silent message, no notifications should be triggered"},{"name":"id","type":"int","comment":"The message ID"},{"name":"user_id","type":"int53","comment":"The ID of the sender (if outgoing will be the ID of the destination) of the message"},{"name":"message","type":"string","comment":"The message"},{"name":"pts","type":"int","comment":"PTS"},{"name":"pts_count","type":"int","comment":"PTS count"},{"name":"date","type":"int","comment":"date"},{"name":"fwd_from","type":"MessageFwdHeader","typeModifiers":{"predicate":"flags.2"},"comment":"Info about a forwarded message"},{"name":"via_bot_id","type":"int53","typeModifiers":{"predicate":"flags.11"},"comment":"Info about the inline bot used to generate this message"},{"name":"reply_to","type":"MessageReplyHeader","typeModifiers":{"predicate":"flags.3"},"comment":"Reply and thread information"},{"name":"entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.7","isVector":true},"comment":"Entities for styled text"},{"name":"ttl_period","type":"int","typeModifiers":{"predicate":"flags.25"},"comment":"Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well."}]},{"kind":"class","name":"updateShortChatMessage","type":"Updates","id":1299050149,"comment":"Shortened constructor containing info on one new incoming text message from a chat","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"out","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the message is outgoing"},{"name":"mentioned","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"Whether we were mentioned in this message"},{"name":"media_unread","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Whether the message contains some unread mentions"},{"name":"silent","type":"true","typeModifiers":{"predicate":"flags.13"},"comment":"If true, the message is a silent message, no notifications should be triggered"},{"name":"id","type":"int","comment":"ID of the message"},{"name":"from_id","type":"int53","comment":"ID of the sender of the message"},{"name":"chat_id","type":"int53","comment":"ID of the chat where the message was sent"},{"name":"message","type":"string","comment":"Message"},{"name":"pts","type":"int","comment":"PTS"},{"name":"pts_count","type":"int","comment":"PTS count"},{"name":"date","type":"int","comment":"date"},{"name":"fwd_from","type":"MessageFwdHeader","typeModifiers":{"predicate":"flags.2"},"comment":"Info about a forwarded message"},{"name":"via_bot_id","type":"int53","typeModifiers":{"predicate":"flags.11"},"comment":"Info about the inline bot used to generate this message"},{"name":"reply_to","type":"MessageReplyHeader","typeModifiers":{"predicate":"flags.3"},"comment":"Reply (thread) information"},{"name":"entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.7","isVector":true},"comment":"Entities for styled text"},{"name":"ttl_period","type":"int","typeModifiers":{"predicate":"flags.25"},"comment":"Time To Live of the message, once updateShortChatMessage.date+updateShortChatMessage.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well."}]},{"kind":"class","name":"updateShort","type":"Updates","id":2027216577,"comment":"Shortened constructor containing info on one update not requiring auxiliary data","arguments":[{"name":"update","type":"Update","comment":"Update"},{"name":"date","type":"int","comment":"Date of event"}]},{"kind":"class","name":"updatesCombined","type":"Updates","id":1918567619,"comment":"Constructor for a group of updates.","arguments":[{"name":"updates","type":"Update","typeModifiers":{"isVector":true},"comment":"List of updates"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"List of users mentioned in updates"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"List of chats mentioned in updates"},{"name":"date","type":"int","comment":"Current date"},{"name":"seq_start","type":"int","comment":"Value seq for the earliest update in a group"},{"name":"seq","type":"int","comment":"Value seq for the latest update in a group"}]},{"kind":"class","name":"updates","type":"Updates","id":1957577280,"comment":"Full constructor of updates","arguments":[{"name":"updates","type":"Update","typeModifiers":{"isVector":true},"comment":"List of updates"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"List of users mentioned in updates"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"List of chats mentioned in updates"},{"name":"date","type":"int","comment":"Current date"},{"name":"seq","type":"int","comment":"Total number of sent updates"}]},{"kind":"class","name":"updateShortSentMessage","type":"Updates","id":2417352961,"comment":"Shortened constructor containing info on one outgoing message to a contact (the destination chat has to be extracted from the method call that returned this object).","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"out","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the message is outgoing"},{"name":"id","type":"int","comment":"ID of the sent message"},{"name":"pts","type":"int","comment":"PTS"},{"name":"pts_count","type":"int","comment":"PTS count"},{"name":"date","type":"int","comment":"date"},{"name":"media","type":"MessageMedia","typeModifiers":{"predicate":"flags.9"},"comment":"Attached media"},{"name":"entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.7","isVector":true},"comment":"Entities for styled text"},{"name":"ttl_period","type":"int","typeModifiers":{"predicate":"flags.25"},"comment":"Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well."}]},{"kind":"class","name":"photos.photos","type":"photos.Photos","id":2378853029,"comment":"Full list of photos with auxiliary data.","arguments":[{"name":"photos","type":"Photo","typeModifiers":{"isVector":true},"comment":"List of photos"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"List of mentioned users"}]},{"kind":"class","name":"photos.photosSlice","type":"photos.Photos","id":352657236,"comment":"Incomplete list of photos with auxiliary data.","arguments":[{"name":"count","type":"int","comment":"Total number of photos"},{"name":"photos","type":"Photo","typeModifiers":{"isVector":true},"comment":"List of photos"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"List of mentioned users"}]},{"kind":"class","name":"photos.photo","type":"photos.Photo","id":539045032,"comment":"Photo with auxiliary data.","arguments":[{"name":"photo","type":"Photo","comment":"Photo"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Users"}]},{"kind":"class","name":"upload.file","type":"upload.File","id":157948117,"comment":"File content.","arguments":[{"name":"type","type":"storage.FileType","comment":"File type"},{"name":"mtime","type":"int","comment":"Modification time"},{"name":"bytes","type":"bytes","comment":"Binary data, file content"}]},{"kind":"class","name":"upload.fileCdnRedirect","type":"upload.File","id":4052539972,"comment":"The file must be downloaded from a CDN DC.","arguments":[{"name":"dc_id","type":"int","comment":"CDN DC ID"},{"name":"file_token","type":"bytes","comment":"File token (see CDN files)"},{"name":"encryption_key","type":"bytes","comment":"Encryption key (see CDN files)"},{"name":"encryption_iv","type":"bytes","comment":"Encryption IV (see CDN files)"},{"name":"file_hashes","type":"FileHash","typeModifiers":{"isVector":true},"comment":"File hashes (see CDN files)"}]},{"kind":"class","name":"dcOption","type":"DcOption","id":414687501,"comment":"Data center","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"ipv6","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the specified IP is an IPv6 address"},{"name":"media_only","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether this DC should only be used to download or upload files"},{"name":"tcpo_only","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether this DC only supports connection with transport obfuscation"},{"name":"cdn","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether this is a CDN DC."},{"name":"static","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"If set, this IP should be used when connecting through a proxy"},{"name":"this_port_only","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"If set, clients must connect using only the specified port, without trying any other port."},{"name":"id","type":"int","comment":"DC ID"},{"name":"ip_address","type":"string","comment":"IP address of DC"},{"name":"port","type":"int","comment":"Port"},{"name":"secret","type":"bytes","typeModifiers":{"predicate":"flags.10"},"comment":"If the tcpo_only flag is set, specifies the secret to use when connecting using transport obfuscation"}]},{"kind":"class","name":"config","type":"Config","id":3424265246,"comment":"Current configuration","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"default_p2p_contacts","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether the client should use P2P by default for phone calls with contacts"},{"name":"preload_featured_stickers","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"Whether the client should preload featured stickers"},{"name":"revoke_pm_inbox","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"Whether incoming private messages can be deleted for both participants"},{"name":"blocked_mode","type":"true","typeModifiers":{"predicate":"flags.8"},"comment":"Indicates that telegram is probably censored by governments/ISPs in the current region"},{"name":"force_try_ipv6","type":"true","typeModifiers":{"predicate":"flags.14"},"comment":"Whether to forcefully connect using IPv6 dcOptions, even if the client knows that IPv4 is available."},{"name":"date","type":"int","comment":"Current date at the server"},{"name":"expires","type":"int","comment":"Expiration date of this config: when it expires it'll have to be refetched using {@link help.RawGetConfigRequest}"},{"name":"test_mode","type":"Bool","comment":"Whether we're connected to the test DCs"},{"name":"this_dc","type":"int","comment":"ID of the DC that returned the reply"},{"name":"dc_options","type":"DcOption","typeModifiers":{"isVector":true},"comment":"DC IP list"},{"name":"dc_txt_domain_name","type":"string","comment":"Domain name for fetching encrypted DC list from DNS TXT record"},{"name":"chat_size_max","type":"int","comment":"Maximum member count for normal groups"},{"name":"megagroup_size_max","type":"int","comment":"Maximum member count for supergroups"},{"name":"forwarded_count_max","type":"int","comment":"Maximum number of messages that can be forwarded at once using {@link messages.RawForwardMessagesRequest}."},{"name":"online_update_period_ms","type":"int","comment":"The client should {@link account.RawUpdateStatusRequest} every N milliseconds"},{"name":"offline_blur_timeout_ms","type":"int","comment":"Delay before offline status needs to be sent to the server"},{"name":"offline_idle_timeout_ms","type":"int","comment":"Time without any user activity after which it should be treated offline"},{"name":"online_cloud_timeout_ms","type":"int","comment":"If we are offline, but were online from some other client in last online_cloud_timeout_ms milliseconds after we had gone offline, then delay offline notification for notify_cloud_delay_ms milliseconds."},{"name":"notify_cloud_delay_ms","type":"int","comment":"If we are offline, but online from some other client then delay sending the offline notification for notify_cloud_delay_ms milliseconds."},{"name":"notify_default_delay_ms","type":"int","comment":"If some other client is online, then delay notification for notification_default_delay_ms milliseconds"},{"name":"push_chat_period_ms","type":"int","comment":"Not for client use"},{"name":"push_chat_limit","type":"int","comment":"Not for client use"},{"name":"edit_time_limit","type":"int","comment":"Only messages with age smaller than the one specified can be edited"},{"name":"revoke_time_limit","type":"int","comment":"Only channel/supergroup messages with age smaller than the specified can be deleted"},{"name":"revoke_pm_time_limit","type":"int","comment":"Only private messages with age smaller than the specified can be deleted"},{"name":"rating_e_decay","type":"int","comment":"Exponential decay rate for computing top peer rating"},{"name":"stickers_recent_limit","type":"int","comment":"Maximum number of recent stickers"},{"name":"channels_read_media_period","type":"int","comment":"Indicates that round videos (video notes) and voice messages sent in channels and older than the specified period must be marked as read"},{"name":"tmp_sessions","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Temporary passport sessions"},{"name":"call_receive_timeout_ms","type":"int","comment":"Maximum allowed outgoing ring time in VoIP calls: if the user we're calling doesn't reply within the specified time (in milliseconds), we should hang up the call"},{"name":"call_ring_timeout_ms","type":"int","comment":"Maximum allowed incoming ring time in VoIP calls: if the current user doesn't reply within the specified time (in milliseconds), the call will be automatically refused"},{"name":"call_connect_timeout_ms","type":"int","comment":"VoIP connection timeout: if the instance of libtgvoip on the other side of the call doesn't connect to our instance of libtgvoip within the specified time (in milliseconds), the call must be aborted"},{"name":"call_packet_timeout_ms","type":"int","comment":"If during a VoIP call a packet isn't received for the specified period of time, the call must be aborted"},{"name":"me_url_prefix","type":"string","comment":"The domain to use to parse deep links »."},{"name":"autoupdate_url_prefix","type":"string","typeModifiers":{"predicate":"flags.7"},"comment":"URL to use to auto-update the current app"},{"name":"gif_search_username","type":"string","typeModifiers":{"predicate":"flags.9"},"comment":"Username of the bot to use to search for GIFs"},{"name":"venue_search_username","type":"string","typeModifiers":{"predicate":"flags.10"},"comment":"Username of the bot to use to search for venues"},{"name":"img_search_username","type":"string","typeModifiers":{"predicate":"flags.11"},"comment":"Username of the bot to use for image search"},{"name":"static_maps_provider","type":"string","typeModifiers":{"predicate":"flags.12"},"comment":"ID of the map provider to use for venues"},{"name":"caption_length_max","type":"int","comment":"Maximum length of caption (length in utf8 codepoints)"},{"name":"message_length_max","type":"int","comment":"Maximum length of messages (length in utf8 codepoints)"},{"name":"webfile_dc_id","type":"int","comment":"DC ID to use to download webfiles"},{"name":"suggested_lang_code","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"Suggested language code"},{"name":"lang_pack_version","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"Language pack version"},{"name":"base_lang_pack_version","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"Basic language pack version"},{"name":"reactions_default","type":"Reaction","typeModifiers":{"predicate":"flags.15"},"comment":"Default message reaction"},{"name":"autologin_token","type":"string","typeModifiers":{"predicate":"flags.16"},"comment":"Autologin token, click here for more info on URL authorization »."}]},{"kind":"class","name":"nearestDc","type":"NearestDc","id":2384074613,"comment":"Nearest data center, according to geo-ip.","arguments":[{"name":"country","type":"string","comment":"Country code determined by geo-ip"},{"name":"this_dc","type":"int","comment":"Number of current data center"},{"name":"nearest_dc","type":"int","comment":"Number of nearest data center"}]},{"kind":"class","name":"help.appUpdate","type":"help.AppUpdate","id":3434860080,"comment":"An update is available for the application.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"can_not_skip","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Unskippable, the new info must be shown to the user (with a popup or something else)"},{"name":"id","type":"int","comment":"Update ID"},{"name":"version","type":"string","comment":"New version name"},{"name":"text","type":"string","comment":"Text description of the update"},{"name":"entities","type":"MessageEntity","typeModifiers":{"isVector":true},"comment":"Message entities for styled text"},{"name":"document","type":"Document","typeModifiers":{"predicate":"flags.1"},"comment":"Application binary"},{"name":"url","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"Application download URL"},{"name":"sticker","type":"Document","typeModifiers":{"predicate":"flags.3"},"comment":"Associated sticker"}]},{"kind":"class","name":"help.noAppUpdate","type":"help.AppUpdate","id":3294258486,"comment":"No updates are available for the application.","arguments":[]},{"kind":"class","name":"help.inviteText","type":"help.InviteText","id":415997816,"comment":"Text of a text message with an invitation to install Telegram.","arguments":[{"name":"message","type":"string","comment":"Text of the message"}]},{"kind":"class","name":"encryptedChatEmpty","type":"EncryptedChat","id":2877210784,"comment":"Empty constructor.","arguments":[{"name":"id","type":"int","comment":"Chat ID"}]},{"kind":"class","name":"encryptedChatWaiting","type":"EncryptedChat","id":1722964307,"comment":"Chat waiting for approval of second participant.","arguments":[{"name":"id","type":"int","comment":"Chat ID"},{"name":"access_hash","type":"long","comment":"Checking sum depending on user ID"},{"name":"date","type":"int","comment":"Date of chat creation"},{"name":"admin_id","type":"int53","comment":"Chat creator ID"},{"name":"participant_id","type":"int53","comment":"ID of second chat participant"}]},{"kind":"class","name":"encryptedChatRequested","type":"EncryptedChat","id":1223809356,"comment":"Request to create an encrypted chat.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"folder_id","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Peer folder ID, for more info click here"},{"name":"id","type":"int","comment":"Chat ID"},{"name":"access_hash","type":"long","comment":"Check sum depending on user ID"},{"name":"date","type":"int","comment":"Chat creation date"},{"name":"admin_id","type":"int53","comment":"Chat creator ID"},{"name":"participant_id","type":"int53","comment":"ID of second chat participant"},{"name":"g_a","type":"bytes","comment":"A = g ^ a mod p, see Wikipedia"}]},{"kind":"class","name":"encryptedChat","type":"EncryptedChat","id":1643173063,"comment":"Encrypted chat","arguments":[{"name":"id","type":"int","comment":"Chat ID"},{"name":"access_hash","type":"long","comment":"Check sum dependent on the user ID"},{"name":"date","type":"int","comment":"Date chat was created"},{"name":"admin_id","type":"int53","comment":"Chat creator ID"},{"name":"participant_id","type":"int53","comment":"ID of the second chat participant"},{"name":"g_a_or_b","type":"bytes","comment":"B = g ^ b mod p, if the currently authorized user is the chat's creator,
or A = g ^ a mod p otherwise
See Wikipedia for more info"},{"name":"key_fingerprint","type":"long","comment":"64-bit fingerprint of received key"}]},{"kind":"class","name":"encryptedChatDiscarded","type":"EncryptedChat","id":505183301,"comment":"Discarded or deleted chat.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"history_deleted","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether both users of this secret chat should also remove all of its messages"},{"name":"id","type":"int","comment":"Chat ID"}]},{"kind":"class","name":"inputEncryptedChat","type":"InputEncryptedChat","id":4047615457,"comment":"Creates an encrypted chat.","arguments":[{"name":"chat_id","type":"int","comment":"Chat ID"},{"name":"access_hash","type":"long","comment":"Checking sum from constructor {@link RawEncryptedChat}, {@link RawEncryptedChatWaiting} or {@link RawEncryptedChatRequested}"}]},{"kind":"class","name":"encryptedFileEmpty","type":"EncryptedFile","id":3256830334,"comment":"Empty constructor, non-existing file.","arguments":[]},{"kind":"class","name":"encryptedFile","type":"EncryptedFile","id":2818608344,"comment":"Encrypted file.","arguments":[{"name":"id","type":"long","comment":"File ID"},{"name":"access_hash","type":"long","comment":"Checking sum depending on user ID"},{"name":"size","type":"int53","comment":"File size in bytes"},{"name":"dc_id","type":"int","comment":"Number of data center"},{"name":"key_fingerprint","type":"int","comment":"32-bit fingerprint of key used for file encryption"}]},{"kind":"class","name":"inputEncryptedFileEmpty","type":"InputEncryptedFile","id":406307684,"comment":"Empty constructor.","arguments":[]},{"kind":"class","name":"inputEncryptedFileUploaded","type":"InputEncryptedFile","id":1690108678,"comment":"Sets new encrypted file saved by parts using upload.saveFilePart method.","arguments":[{"name":"id","type":"long","comment":"Random file ID created by client"},{"name":"parts","type":"int","comment":"Number of saved parts"},{"name":"md5_checksum","type":"string","comment":"In case md5-HASH of the (already encrypted) file was transmitted, file content will be checked prior to use"},{"name":"key_fingerprint","type":"int","comment":"32-bit fingerprint of the key used to encrypt a file"}]},{"kind":"class","name":"inputEncryptedFile","type":"InputEncryptedFile","id":1511503333,"comment":"Sets forwarded encrypted file for attachment.","arguments":[{"name":"id","type":"long","comment":"File ID, value of id parameter from {@link RawEncryptedFile}"},{"name":"access_hash","type":"long","comment":"Checking sum, value of access_hash parameter from {@link RawEncryptedFile}"}]},{"kind":"class","name":"inputEncryptedFileBigUploaded","type":"InputEncryptedFile","id":767652808,"comment":"Assigns a new big encrypted file (over 10 MB in size), saved in parts using the method {@link upload.RawSaveBigFilePartRequest}.","arguments":[{"name":"id","type":"long","comment":"Random file id, created by the client"},{"name":"parts","type":"int","comment":"Number of saved parts"},{"name":"key_fingerprint","type":"int","comment":"32-bit imprint of the key used to encrypt the file"}]},{"kind":"class","name":"encryptedMessage","type":"EncryptedMessage","id":3977822488,"comment":"Encrypted message.","arguments":[{"name":"random_id","type":"long","comment":"Random message ID, assigned by the author of message"},{"name":"chat_id","type":"int","comment":"ID of encrypted chat"},{"name":"date","type":"int","comment":"Date of sending"},{"name":"bytes","type":"bytes","comment":"TL-serialization of DecryptedMessage type, encrypted with the key created at chat initialization"},{"name":"file","type":"EncryptedFile","comment":"Attached encrypted file"}]},{"kind":"class","name":"encryptedMessageService","type":"EncryptedMessage","id":594758406,"comment":"Encrypted service message","arguments":[{"name":"random_id","type":"long","comment":"Random message ID, assigned by the author of message"},{"name":"chat_id","type":"int","comment":"ID of encrypted chat"},{"name":"date","type":"int","comment":"Date of sending"},{"name":"bytes","type":"bytes","comment":"TL-serialization of the DecryptedMessage type, encrypted with the key created at chat initialization"}]},{"kind":"class","name":"messages.dhConfigNotModified","type":"messages.DhConfig","id":3236054581,"comment":"Configuring parameters did not change.","arguments":[{"name":"random","type":"bytes","comment":"Random sequence of bytes of assigned length"}]},{"kind":"class","name":"messages.dhConfig","type":"messages.DhConfig","id":740433629,"comment":"New set of configuring parameters.","arguments":[{"name":"g","type":"int","comment":"New value prime, see Wikipedia"},{"name":"p","type":"bytes","comment":"New value primitive root, see Wikipedia"},{"name":"version","type":"int","comment":"Version of set of parameters"},{"name":"random","type":"bytes","comment":"Random sequence of bytes of assigned length"}]},{"kind":"class","name":"messages.sentEncryptedMessage","type":"messages.SentEncryptedMessage","id":1443858741,"comment":"Message without file attachments sent to an encrypted file.","arguments":[{"name":"date","type":"int","comment":"Date of sending"}]},{"kind":"class","name":"messages.sentEncryptedFile","type":"messages.SentEncryptedMessage","id":2492727090,"comment":"Message with a file enclosure sent to a protected chat","arguments":[{"name":"date","type":"int","comment":"Sending date"},{"name":"file","type":"EncryptedFile","comment":"Attached file"}]},{"kind":"class","name":"inputDocumentEmpty","type":"InputDocument","id":1928391342,"comment":"Empty constructor.","arguments":[]},{"kind":"class","name":"inputDocument","type":"InputDocument","id":448771445,"comment":"Defines a document for subsequent interaction.","arguments":[{"name":"id","type":"long","comment":"Document ID"},{"name":"access_hash","type":"long","comment":"access_hash parameter from the {@link RawDocument} constructor"},{"name":"file_reference","type":"bytes","comment":"File reference"}]},{"kind":"class","name":"documentEmpty","type":"Document","id":922273905,"comment":"Empty constructor, document doesn't exist.","arguments":[{"name":"id","type":"long","comment":"Document ID or 0"}]},{"kind":"class","name":"document","type":"Document","id":2413085912,"comment":"Document","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"id","type":"long","comment":"Document ID"},{"name":"access_hash","type":"long","comment":"Check sum, dependent on document ID"},{"name":"file_reference","type":"bytes","comment":"File reference"},{"name":"date","type":"int","comment":"Creation date"},{"name":"mime_type","type":"string","comment":"MIME type"},{"name":"size","type":"int53","comment":"Size"},{"name":"thumbs","type":"PhotoSize","typeModifiers":{"predicate":"flags.0","isVector":true},"comment":"Thumbnails"},{"name":"video_thumbs","type":"VideoSize","typeModifiers":{"predicate":"flags.1","isVector":true},"comment":"Video thumbnails"},{"name":"dc_id","type":"int","comment":"DC ID"},{"name":"attributes","type":"DocumentAttribute","typeModifiers":{"isVector":true},"comment":"Attributes"}]},{"kind":"class","name":"help.support","type":"help.Support","id":398898678,"comment":"Info on support user.","arguments":[{"name":"phone_number","type":"string","comment":"Phone number"},{"name":"user","type":"User","comment":"User"}]},{"kind":"class","name":"notifyPeer","type":"NotifyPeer","id":2681474008,"comment":"Notifications generated by a certain user or group.","arguments":[{"name":"peer","type":"Peer","comment":"user or group"}]},{"kind":"class","name":"notifyUsers","type":"NotifyPeer","id":3033021260,"comment":"Notifications generated by all users.","arguments":[]},{"kind":"class","name":"notifyChats","type":"NotifyPeer","id":3221737155,"comment":"Notifications generated by all groups.","arguments":[]},{"kind":"class","name":"notifyBroadcasts","type":"NotifyPeer","id":3591563503,"comment":"Channel notification settings","arguments":[]},{"kind":"class","name":"notifyForumTopic","type":"NotifyPeer","id":577659656,"comment":"Notifications generated by a topic in a forum.","arguments":[{"name":"peer","type":"Peer","comment":"Forum ID"},{"name":"top_msg_id","type":"int","comment":"Topic ID"}]},{"kind":"class","name":"sendMessageTypingAction","type":"SendMessageAction","id":381645902,"comment":"User is typing.","arguments":[]},{"kind":"class","name":"sendMessageCancelAction","type":"SendMessageAction","id":4250847477,"comment":"Invalidate all previous action updates. E.g. when user deletes entered text or aborts a video upload.","arguments":[]},{"kind":"class","name":"sendMessageRecordVideoAction","type":"SendMessageAction","id":2710034031,"comment":"User is recording a video.","arguments":[]},{"kind":"class","name":"sendMessageUploadVideoAction","type":"SendMessageAction","id":3916839660,"comment":"User is uploading a video.","arguments":[{"name":"progress","type":"int","comment":"Progress percentage"}]},{"kind":"class","name":"sendMessageRecordAudioAction","type":"SendMessageAction","id":3576656887,"comment":"User is recording a voice message.","arguments":[]},{"kind":"class","name":"sendMessageUploadAudioAction","type":"SendMessageAction","id":4082227115,"comment":"User is uploading a voice message.","arguments":[{"name":"progress","type":"int","comment":"Progress percentage"}]},{"kind":"class","name":"sendMessageUploadPhotoAction","type":"SendMessageAction","id":3520285222,"comment":"User is uploading a photo.","arguments":[{"name":"progress","type":"int","comment":"Progress percentage"}]},{"kind":"class","name":"sendMessageUploadDocumentAction","type":"SendMessageAction","id":2852968932,"comment":"User is uploading a file.","arguments":[{"name":"progress","type":"int","comment":"Progress percentage"}]},{"kind":"class","name":"sendMessageGeoLocationAction","type":"SendMessageAction","id":393186209,"comment":"User is selecting a location to share.","arguments":[]},{"kind":"class","name":"sendMessageChooseContactAction","type":"SendMessageAction","id":1653390447,"comment":"User is selecting a contact to share.","arguments":[]},{"kind":"class","name":"sendMessageGamePlayAction","type":"SendMessageAction","id":3714748232,"comment":"User is playing a game","arguments":[]},{"kind":"class","name":"sendMessageRecordRoundAction","type":"SendMessageAction","id":2297593788,"comment":"User is recording a round video to share","arguments":[]},{"kind":"class","name":"sendMessageUploadRoundAction","type":"SendMessageAction","id":608050278,"comment":"User is uploading a round video","arguments":[{"name":"progress","type":"int","comment":"Progress percentage"}]},{"kind":"class","name":"speakingInGroupCallAction","type":"SendMessageAction","id":3643548293,"comment":"User is currently speaking in the group call","arguments":[]},{"kind":"class","name":"sendMessageHistoryImportAction","type":"SendMessageAction","id":3688534598,"comment":"Chat history is being imported","arguments":[{"name":"progress","type":"int","comment":"Progress percentage"}]},{"kind":"class","name":"sendMessageChooseStickerAction","type":"SendMessageAction","id":2958739121,"comment":"User is choosing a sticker","arguments":[]},{"kind":"class","name":"sendMessageEmojiInteraction","type":"SendMessageAction","id":630664139,"comment":"User has clicked on an animated emoji triggering a reaction, click here for more info ».","arguments":[{"name":"emoticon","type":"string","comment":"Emoji"},{"name":"msg_id","type":"int","comment":"Message ID of the animated emoji that was clicked"},{"name":"interaction","type":"DataJSON","comment":"A JSON object with interaction info, click here for more info »"}]},{"kind":"class","name":"sendMessageEmojiInteractionSeen","type":"SendMessageAction","id":3060109358,"comment":"User is watching an animated emoji reaction triggered by another user, click here for more info ».","arguments":[{"name":"emoticon","type":"string","comment":"Emoji"}]},{"kind":"class","name":"contacts.found","type":"contacts.Found","id":3004386717,"comment":"Users found by name substring and auxiliary data.","arguments":[{"name":"my_results","type":"Peer","typeModifiers":{"isVector":true},"comment":"Personalized results"},{"name":"results","type":"Peer","typeModifiers":{"isVector":true},"comment":"List of found user identifiers"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Found chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"List of users"}]},{"kind":"class","name":"inputPrivacyKeyStatusTimestamp","type":"InputPrivacyKey","id":1335282456,"comment":"Whether people will be able to see our exact last online timestamp.\n\nNote that if we decide to hide our exact last online timestamp to someone (i.e., users A, B, C, or all users) and we do not have a Premium subscription, we won't be able to see the exact last online timestamp of those users (A, B, C, or all users), even if those users do share it with us.\n\nIf those users do share their exact online status with us, but we can't see it due to the reason mentioned above, the by_me flag of {@link RawUserStatusRecently}, {@link RawUserStatusLastWeek}, {@link RawUserStatusLastMonth} will be set.","arguments":[]},{"kind":"class","name":"inputPrivacyKeyChatInvite","type":"InputPrivacyKey","id":3187344422,"comment":"Whether people will be able to invite you to chats","arguments":[]},{"kind":"class","name":"inputPrivacyKeyPhoneCall","type":"InputPrivacyKey","id":4206550111,"comment":"Whether you will accept phone calls","arguments":[]},{"kind":"class","name":"inputPrivacyKeyPhoneP2P","type":"InputPrivacyKey","id":3684593874,"comment":"Whether to allow P2P communication during VoIP calls","arguments":[]},{"kind":"class","name":"inputPrivacyKeyForwards","type":"InputPrivacyKey","id":2765966344,"comment":"Whether messages forwarded from you will be anonymous","arguments":[]},{"kind":"class","name":"inputPrivacyKeyProfilePhoto","type":"InputPrivacyKey","id":1461304012,"comment":"Whether people will be able to see your profile picture","arguments":[]},{"kind":"class","name":"inputPrivacyKeyPhoneNumber","type":"InputPrivacyKey","id":55761658,"comment":"Whether people will be able to see your phone number","arguments":[]},{"kind":"class","name":"inputPrivacyKeyAddedByPhone","type":"InputPrivacyKey","id":3508640733,"comment":"Whether people can add you to their contact list by your phone number","arguments":[]},{"kind":"class","name":"inputPrivacyKeyVoiceMessages","type":"InputPrivacyKey","id":2934349160,"comment":"Whether people can send you voice messages or round videos (Premium users only).","arguments":[]},{"kind":"class","name":"inputPrivacyKeyAbout","type":"InputPrivacyKey","id":941870144,"comment":"Whether people can see your bio","arguments":[]},{"kind":"class","name":"inputPrivacyKeyBirthday","type":"InputPrivacyKey","id":3596227020,"comment":"Whether the user can see our birthday.","arguments":[]},{"kind":"class","name":"privacyKeyStatusTimestamp","type":"PrivacyKey","id":3157175088,"comment":"Whether we can see the last online timestamp of this user.\n\nNote that if we decide to hide our exact last online timestamp to someone (i.e., users A, B, C, or all users) and we do not have a Premium subscription, we won't be able to see the exact last online timestamp of those users (A, B, C, or all users), even if those users do share it with us.\n\nIf those users do share their exact online status with us, but we can't see it due to the reason mentioned above, the by_me flag of {@link RawUserStatusRecently}, {@link RawUserStatusLastWeek}, {@link RawUserStatusLastMonth} will be set.","arguments":[]},{"kind":"class","name":"privacyKeyChatInvite","type":"PrivacyKey","id":1343122938,"comment":"Whether the user can be invited to chats","arguments":[]},{"kind":"class","name":"privacyKeyPhoneCall","type":"PrivacyKey","id":1030105979,"comment":"Whether the user accepts phone calls","arguments":[]},{"kind":"class","name":"privacyKeyPhoneP2P","type":"PrivacyKey","id":961092808,"comment":"Whether P2P connections in phone calls with this user are allowed","arguments":[]},{"kind":"class","name":"privacyKeyForwards","type":"PrivacyKey","id":1777096355,"comment":"Whether messages forwarded from the user will be anonymously forwarded","arguments":[]},{"kind":"class","name":"privacyKeyProfilePhoto","type":"PrivacyKey","id":2517966829,"comment":"Whether the profile picture of the user is visible","arguments":[]},{"kind":"class","name":"privacyKeyPhoneNumber","type":"PrivacyKey","id":3516589165,"comment":"Whether the user allows us to see their phone number","arguments":[]},{"kind":"class","name":"privacyKeyAddedByPhone","type":"PrivacyKey","id":1124062251,"comment":"Whether this user can be added to our contact list by their phone number","arguments":[]},{"kind":"class","name":"privacyKeyVoiceMessages","type":"PrivacyKey","id":110621716,"comment":"Whether the user accepts voice messages","arguments":[]},{"kind":"class","name":"privacyKeyAbout","type":"PrivacyKey","id":2760292193,"comment":"Whether people can see your bio","arguments":[]},{"kind":"class","name":"privacyKeyBirthday","type":"PrivacyKey","id":536913176,"comment":"Whether the user can see our birthday.","arguments":[]},{"kind":"class","name":"inputPrivacyValueAllowContacts","type":"InputPrivacyRule","id":218751099,"comment":"Allow only contacts","arguments":[]},{"kind":"class","name":"inputPrivacyValueAllowAll","type":"InputPrivacyRule","id":407582158,"comment":"Allow all users","arguments":[]},{"kind":"class","name":"inputPrivacyValueAllowUsers","type":"InputPrivacyRule","id":320652927,"comment":"Allow only certain users","arguments":[{"name":"users","type":"InputUser","typeModifiers":{"isVector":true},"comment":"Allowed users"}]},{"kind":"class","name":"inputPrivacyValueDisallowContacts","type":"InputPrivacyRule","id":195371015,"comment":"Disallow only contacts","arguments":[]},{"kind":"class","name":"inputPrivacyValueDisallowAll","type":"InputPrivacyRule","id":3597362889,"comment":"Disallow all","arguments":[]},{"kind":"class","name":"inputPrivacyValueDisallowUsers","type":"InputPrivacyRule","id":2417034343,"comment":"Disallow only certain users","arguments":[{"name":"users","type":"InputUser","typeModifiers":{"isVector":true},"comment":"Users to disallow"}]},{"kind":"class","name":"inputPrivacyValueAllowChatParticipants","type":"InputPrivacyRule","id":2215004623,"comment":"Allow only participants of certain chats","arguments":[{"name":"chats","type":"int53","typeModifiers":{"isVector":true},"comment":"Allowed chat IDs"}]},{"kind":"class","name":"inputPrivacyValueDisallowChatParticipants","type":"InputPrivacyRule","id":3914272646,"comment":"Disallow only participants of certain chats","arguments":[{"name":"chats","type":"int53","typeModifiers":{"isVector":true},"comment":"Disallowed chat IDs"}]},{"kind":"class","name":"inputPrivacyValueAllowCloseFriends","type":"InputPrivacyRule","id":793067081,"comment":"Allow only close friends »","arguments":[]},{"kind":"class","name":"inputPrivacyValueAllowPremium","type":"InputPrivacyRule","id":2009975281,"comment":"Allow only users with a Premium subscription », currently only usable for {@link RawInputPrivacyKeyChatInvite}.","arguments":[]},{"kind":"class","name":"privacyValueAllowContacts","type":"PrivacyRule","id":4294843308,"comment":"Allow all contacts","arguments":[]},{"kind":"class","name":"privacyValueAllowAll","type":"PrivacyRule","id":1698855810,"comment":"Allow all users","arguments":[]},{"kind":"class","name":"privacyValueAllowUsers","type":"PrivacyRule","id":3096469426,"comment":"Allow only certain users","arguments":[{"name":"users","type":"int53","typeModifiers":{"isVector":true},"comment":"Allowed users"}]},{"kind":"class","name":"privacyValueDisallowContacts","type":"PrivacyRule","id":4169726490,"comment":"Disallow only contacts","arguments":[]},{"kind":"class","name":"privacyValueDisallowAll","type":"PrivacyRule","id":2339628899,"comment":"Disallow all users","arguments":[]},{"kind":"class","name":"privacyValueDisallowUsers","type":"PrivacyRule","id":3831632193,"comment":"Disallow only certain users","arguments":[{"name":"users","type":"int53","typeModifiers":{"isVector":true},"comment":"Disallowed users"}]},{"kind":"class","name":"privacyValueAllowChatParticipants","type":"PrivacyRule","id":1796427406,"comment":"Allow all participants of certain chats","arguments":[{"name":"chats","type":"int53","typeModifiers":{"isVector":true},"comment":"Allowed chats"}]},{"kind":"class","name":"privacyValueDisallowChatParticipants","type":"PrivacyRule","id":1103656293,"comment":"Disallow only participants of certain chats","arguments":[{"name":"chats","type":"int53","typeModifiers":{"isVector":true},"comment":"Disallowed chats"}]},{"kind":"class","name":"privacyValueAllowCloseFriends","type":"PrivacyRule","id":4159232155,"comment":"Allow only close friends »","arguments":[]},{"kind":"class","name":"privacyValueAllowPremium","type":"PrivacyRule","id":3974725963,"comment":"Allow only users with a Premium subscription », currently only usable for {@link RawInputPrivacyKeyChatInvite}.","arguments":[]},{"kind":"class","name":"account.privacyRules","type":"account.PrivacyRules","id":1352683077,"comment":"Privacy rules","arguments":[{"name":"rules","type":"PrivacyRule","typeModifiers":{"isVector":true},"comment":"Privacy rules"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Chats to which the rules apply"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Users to which the rules apply"}]},{"kind":"class","name":"accountDaysTTL","type":"AccountDaysTTL","id":3100684255,"comment":"Time to live in days of the current account","arguments":[{"name":"days","type":"int","comment":"This account will self-destruct in the specified number of days"}]},{"kind":"class","name":"documentAttributeImageSize","type":"DocumentAttribute","id":1815593308,"comment":"Defines the width and height of an image uploaded as document","arguments":[{"name":"w","type":"int","comment":"Width of image"},{"name":"h","type":"int","comment":"Height of image"}]},{"kind":"class","name":"documentAttributeAnimated","type":"DocumentAttribute","id":297109817,"comment":"Defines an animated GIF","arguments":[]},{"kind":"class","name":"documentAttributeSticker","type":"DocumentAttribute","id":1662637586,"comment":"Defines a sticker","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"mask","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether this is a mask sticker"},{"name":"alt","type":"string","comment":"Alternative emoji representation of sticker"},{"name":"stickerset","type":"InputStickerSet","comment":"Associated stickerset"},{"name":"mask_coords","type":"MaskCoords","typeModifiers":{"predicate":"flags.0"},"comment":"Mask coordinates (if this is a mask sticker, attached to a photo)"}]},{"kind":"class","name":"documentAttributeVideo","type":"DocumentAttribute","id":389652397,"comment":"Defines a video","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"round_message","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether this is a round video"},{"name":"supports_streaming","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the video supports streaming"},{"name":"nosound","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether the specified document is a video file with no audio tracks (a GIF animation (even as MPEG4), for example)"},{"name":"duration","type":"double","comment":"Duration in seconds"},{"name":"w","type":"int","comment":"Video width"},{"name":"h","type":"int","comment":"Video height"},{"name":"preload_prefix_size","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"Number of bytes to preload when preloading videos (particularly video stories)."},{"name":"video_start_ts","type":"double","typeModifiers":{"predicate":"flags.4"},"comment":"Floating point UNIX timestamp in seconds, indicating the frame of the video that should be used as static preview and thumbnail."}]},{"kind":"class","name":"documentAttributeAudio","type":"DocumentAttribute","id":2555574726,"comment":"Represents an audio file","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"voice","type":"true","typeModifiers":{"predicate":"flags.10"},"comment":"Whether this is a voice message"},{"name":"duration","type":"int","comment":"Duration in seconds"},{"name":"title","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Name of song"},{"name":"performer","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Performer"},{"name":"waveform","type":"bytes","typeModifiers":{"predicate":"flags.2"},"comment":"Waveform: consists in a series of bitpacked 5-bit values.
Example implementation: android."}]},{"kind":"class","name":"documentAttributeFilename","type":"DocumentAttribute","id":358154344,"comment":"A simple document with a file name","arguments":[{"name":"file_name","type":"string","comment":"The file name"}]},{"kind":"class","name":"documentAttributeHasStickers","type":"DocumentAttribute","id":2550256375,"comment":"Whether the current document has stickers attached","arguments":[]},{"kind":"class","name":"documentAttributeCustomEmoji","type":"DocumentAttribute","id":4245985433,"comment":"Info about a custom emoji","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"free","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether this custom emoji can be sent by non-Premium users"},{"name":"text_color","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the color of this TGS custom emoji should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context."},{"name":"alt","type":"string","comment":"The actual emoji"},{"name":"stickerset","type":"InputStickerSet","comment":"The emoji stickerset to which this emoji belongs."}]},{"kind":"class","name":"messages.stickersNotModified","type":"messages.Stickers","id":4050950690,"comment":"No new stickers were found for the given query","arguments":[]},{"kind":"class","name":"messages.stickers","type":"messages.Stickers","id":816245886,"comment":"Found stickers","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here"},{"name":"stickers","type":"Document","typeModifiers":{"isVector":true},"comment":"Stickers"}]},{"kind":"class","name":"stickerPack","type":"StickerPack","id":313694676,"comment":"A stickerpack is a group of stickers associated to the same emoji.
\nIt is not a sticker pack the way it is usually intended, you may be looking for a StickerSet.","arguments":[{"name":"emoticon","type":"string","comment":"Emoji"},{"name":"documents","type":"long","typeModifiers":{"isVector":true},"comment":"Stickers"}]},{"kind":"class","name":"messages.allStickersNotModified","type":"messages.AllStickers","id":3898999491,"comment":"Info about all installed stickers hasn't changed","arguments":[]},{"kind":"class","name":"messages.allStickers","type":"messages.AllStickers","id":3451637435,"comment":"Info about all installed stickers","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here"},{"name":"sets","type":"StickerSet","typeModifiers":{"isVector":true},"comment":"All stickersets"}]},{"kind":"class","name":"messages.affectedMessages","type":"messages.AffectedMessages","id":2228326789,"comment":"Events affected by operation","arguments":[{"name":"pts","type":"int","comment":"Event count after generation"},{"name":"pts_count","type":"int","comment":"Number of events that were generated"}]},{"kind":"class","name":"webPageEmpty","type":"WebPage","id":555358088,"comment":"No preview is available for the webpage","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"id","type":"long","comment":"Preview ID"},{"name":"url","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"URL of the webpage."}]},{"kind":"class","name":"webPagePending","type":"WebPage","id":2966502983,"comment":"A preview of the webpage is currently being generated","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"id","type":"long","comment":"ID of preview"},{"name":"url","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"URL of the webpage"},{"name":"date","type":"int","comment":"When was the processing started"}]},{"kind":"class","name":"webPage","type":"WebPage","id":3902555570,"comment":"Webpage preview","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"has_large_media","type":"true","typeModifiers":{"predicate":"flags.13"},"comment":"Whether the size of the media in the preview can be changed."},{"name":"id","type":"long","comment":"Preview ID"},{"name":"url","type":"string","comment":"URL of previewed webpage"},{"name":"display_url","type":"string","comment":"Webpage URL to be displayed to the user"},{"name":"hash","type":"int","comment":"Hash used for caching, for more info click here"},{"name":"type","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else, see here » for a full list."},{"name":"site_name","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Short name of the site (e.g., Google Docs, App Store)"},{"name":"title","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"Title of the content"},{"name":"description","type":"string","typeModifiers":{"predicate":"flags.3"},"comment":"Content description"},{"name":"photo","type":"Photo","typeModifiers":{"predicate":"flags.4"},"comment":"Image representing the content"},{"name":"embed_url","type":"string","typeModifiers":{"predicate":"flags.5"},"comment":"URL to show in the embedded preview"},{"name":"embed_type","type":"string","typeModifiers":{"predicate":"flags.5"},"comment":"MIME type of the embedded preview, (e.g., text/html or video/mp4)"},{"name":"embed_width","type":"int","typeModifiers":{"predicate":"flags.6"},"comment":"Width of the embedded preview"},{"name":"embed_height","type":"int","typeModifiers":{"predicate":"flags.6"},"comment":"Height of the embedded preview"},{"name":"duration","type":"int","typeModifiers":{"predicate":"flags.7"},"comment":"Duration of the content, in seconds"},{"name":"author","type":"string","typeModifiers":{"predicate":"flags.8"},"comment":"Author of the content"},{"name":"document","type":"Document","typeModifiers":{"predicate":"flags.9"},"comment":"Preview of the content as a media file"},{"name":"cached_page","type":"Page","typeModifiers":{"predicate":"flags.10"},"comment":"Page contents in instant view format"},{"name":"attributes","type":"WebPageAttribute","typeModifiers":{"predicate":"flags.12","isVector":true},"comment":"Webpage attributes"}]},{"kind":"class","name":"webPageNotModified","type":"WebPage","id":1930545681,"comment":"The preview of the webpage hasn't changed","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"cached_page_views","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Page view count"}]},{"kind":"class","name":"authorization","type":"Authorization","id":2902578717,"comment":"Logged-in session","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"current","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether this is the current session"},{"name":"official_app","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the session is from an official app"},{"name":"password_pending","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether the session is still waiting for a 2FA password"},{"name":"encrypted_requests_disabled","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether this session will accept encrypted chats"},{"name":"call_requests_disabled","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"Whether this session will accept phone calls"},{"name":"unconfirmed","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Whether the session is unconfirmed, see here » for more info."},{"name":"hash","type":"long","comment":"Identifier"},{"name":"device_model","type":"string","comment":"Device model"},{"name":"platform","type":"string","comment":"Platform"},{"name":"system_version","type":"string","comment":"System version"},{"name":"api_id","type":"int","comment":"API ID"},{"name":"app_name","type":"string","comment":"App name"},{"name":"app_version","type":"string","comment":"App version"},{"name":"date_created","type":"int","comment":"When was the session created"},{"name":"date_active","type":"int","comment":"When was the session last active"},{"name":"ip","type":"string","comment":"Last known IP"},{"name":"country","type":"string","comment":"Country determined from IP"},{"name":"region","type":"string","comment":"Region determined from IP"}]},{"kind":"class","name":"account.authorizations","type":"account.Authorizations","id":1275039392,"comment":"Logged-in sessions","arguments":[{"name":"authorization_ttl_days","type":"int","comment":"Time-to-live of session"},{"name":"authorizations","type":"Authorization","typeModifiers":{"isVector":true},"comment":"Logged-in sessions"}]},{"kind":"class","name":"account.password","type":"account.Password","id":2507886843,"comment":"Configuration for two-factor authorization","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"has_recovery","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the user has a recovery method configured"},{"name":"has_secure_values","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether telegram passport is enabled"},{"name":"has_password","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether the user has a password"},{"name":"current_algo","type":"PasswordKdfAlgo","typeModifiers":{"predicate":"flags.2"},"comment":"The KDF algorithm for SRP two-factor authentication of the current password"},{"name":"srp_B","type":"bytes","typeModifiers":{"predicate":"flags.2"},"comment":"Srp B param for SRP authorization"},{"name":"srp_id","type":"long","typeModifiers":{"predicate":"flags.2"},"comment":"Srp ID param for SRP authorization"},{"name":"hint","type":"string","typeModifiers":{"predicate":"flags.3"},"comment":"Text hint for the password"},{"name":"email_unconfirmed_pattern","type":"string","typeModifiers":{"predicate":"flags.4"},"comment":"A password recovery email with the specified pattern is still awaiting verification"},{"name":"new_algo","type":"PasswordKdfAlgo","comment":"The KDF algorithm for SRP two-factor authentication to use when creating new passwords"},{"name":"new_secure_algo","type":"SecurePasswordKdfAlgo","comment":"The KDF algorithm for telegram passport"},{"name":"secure_random","type":"bytes","comment":"Secure random string"},{"name":"pending_reset_date","type":"int","typeModifiers":{"predicate":"flags.5"},"comment":"The 2FA password will be automatically removed at this date, unless the user cancels the operation"},{"name":"login_email_pattern","type":"string","typeModifiers":{"predicate":"flags.6"},"comment":"A verified login email with the specified pattern is configured"}]},{"kind":"class","name":"account.passwordSettings","type":"account.PasswordSettings","id":2589733861,"comment":"Private info associated to the password info (recovery email, telegram passport info & so on)","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"email","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"2FA Recovery email"},{"name":"secure_settings","type":"SecureSecretSettings","typeModifiers":{"predicate":"flags.1"},"comment":"Telegram passport settings"}]},{"kind":"class","name":"account.passwordInputSettings","type":"account.PasswordInputSettings","id":3258394569,"comment":"Settings for setting up a new password","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"new_algo","type":"PasswordKdfAlgo","typeModifiers":{"predicate":"flags.0"},"comment":"The SRP algorithm to use"},{"name":"new_password_hash","type":"bytes","typeModifiers":{"predicate":"flags.0"},"comment":"The computed password hash"},{"name":"hint","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Text hint for the password"},{"name":"email","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Password recovery email"},{"name":"new_secure_settings","type":"SecureSecretSettings","typeModifiers":{"predicate":"flags.2"},"comment":"Telegram passport settings"}]},{"kind":"class","name":"auth.passwordRecovery","type":"auth.PasswordRecovery","id":326715557,"comment":"Recovery info of a 2FA password, only for accounts with a recovery email configured.","arguments":[{"name":"email_pattern","type":"string","comment":"The email to which the recovery code was sent must match this pattern."}]},{"kind":"class","name":"receivedNotifyMessage","type":"ReceivedNotifyMessage","id":2743383929,"comment":"Message ID, for which PUSH-notifications were cancelled.","arguments":[{"name":"id","type":"int","comment":"Message ID, for which PUSH-notifications were canceled"},{"name":"flags","type":"int","comment":"Reserved for future use"}]},{"kind":"class","name":"chatInviteExported","type":"ExportedChatInvite","id":179611673,"comment":"Exported chat invite","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"revoked","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether this chat invite was revoked"},{"name":"permanent","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Whether this chat invite has no expiration"},{"name":"request_needed","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"Whether users importing this invite link will have to be approved to join the channel or group"},{"name":"link","type":"string","comment":"Chat invitation link"},{"name":"admin_id","type":"int53","comment":"ID of the admin that created this chat invite"},{"name":"date","type":"int","comment":"When was this chat invite created"},{"name":"start_date","type":"int","typeModifiers":{"predicate":"flags.4"},"comment":"When was this chat invite last modified"},{"name":"expire_date","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"When does this chat invite expire"},{"name":"usage_limit","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"Maximum number of users that can join using this link"},{"name":"usage","type":"int","typeModifiers":{"predicate":"flags.3"},"comment":"How many users joined using this link"},{"name":"requested","type":"int","typeModifiers":{"predicate":"flags.7"},"comment":"Number of users that have already used this link to join"},{"name":"title","type":"string","typeModifiers":{"predicate":"flags.8"},"comment":"Custom description for the invite link, visible only to admins"}]},{"kind":"class","name":"chatInvitePublicJoinRequests","type":"ExportedChatInvite","id":3977280183,"comment":"Used in updates and in the channel log to indicate when a user is requesting to join or has joined a discussion group","arguments":[]},{"kind":"class","name":"chatInviteAlready","type":"ChatInvite","id":1516793212,"comment":"The user has already joined this chat","arguments":[{"name":"chat","type":"Chat","comment":"The chat connected to the invite"}]},{"kind":"class","name":"chatInvite","type":"ChatInvite","id":3454069824,"comment":"Chat invite info","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"channel","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether this is a channel/supergroup or a normal group"},{"name":"broadcast","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether this is a channel"},{"name":"public","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether this is a public channel/supergroup"},{"name":"megagroup","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether this is a supergroup"},{"name":"request_needed","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"Whether the join request » must be first approved by an administrator"},{"name":"verified","type":"true","typeModifiers":{"predicate":"flags.7"},"comment":"Is this chat or channel verified by Telegram?"},{"name":"scam","type":"true","typeModifiers":{"predicate":"flags.8"},"comment":"This chat is probably a scam"},{"name":"fake","type":"true","typeModifiers":{"predicate":"flags.9"},"comment":"If set, this chat was reported by many users as a fake or scam: be careful when interacting with it."},{"name":"title","type":"string","comment":"Chat/supergroup/channel title"},{"name":"about","type":"string","typeModifiers":{"predicate":"flags.5"},"comment":"Description of the group of channel"},{"name":"photo","type":"Photo","comment":"Chat/supergroup/channel photo"},{"name":"participants_count","type":"int","comment":"Participant count"},{"name":"participants","type":"User","typeModifiers":{"predicate":"flags.4","isVector":true},"comment":"A few of the participants that are in the group"},{"name":"color","type":"int","comment":"Profile color palette ID"}]},{"kind":"class","name":"chatInvitePeek","type":"ChatInvite","id":1634294960,"comment":"A chat invitation that also allows peeking into the group to read messages without joining it.","arguments":[{"name":"chat","type":"Chat","comment":"Chat information"},{"name":"expires","type":"int","comment":"Read-only anonymous access to this group will be revoked at this date"}]},{"kind":"class","name":"inputStickerSetEmpty","type":"InputStickerSet","id":4290128789,"comment":"Empty constructor","arguments":[]},{"kind":"class","name":"inputStickerSetID","type":"InputStickerSet","id":2649203305,"comment":"Stickerset by ID","arguments":[{"name":"id","type":"long","comment":"ID"},{"name":"access_hash","type":"long","comment":"Access hash"}]},{"kind":"class","name":"inputStickerSetShortName","type":"InputStickerSet","id":2250033312,"comment":"Stickerset by short name, from a stickerset deep link »","arguments":[{"name":"short_name","type":"string","comment":"Short name from a stickerset deep link »"}]},{"kind":"class","name":"inputStickerSetAnimatedEmoji","type":"InputStickerSet","id":42402760,"comment":"Animated emojis stickerset","arguments":[]},{"kind":"class","name":"inputStickerSetDice","type":"InputStickerSet","id":3867103758,"comment":"Used for fetching animated dice stickers","arguments":[{"name":"emoticon","type":"string","comment":"The emoji, for now \"🏀\", \"🎲\" and \"🎯\" are supported"}]},{"kind":"class","name":"inputStickerSetAnimatedEmojiAnimations","type":"InputStickerSet","id":215889721,"comment":"Animated emoji reaction stickerset (contains animations to play when a user clicks on a given animated emoji)","arguments":[]},{"kind":"class","name":"inputStickerSetPremiumGifts","type":"InputStickerSet","id":3364567810,"comment":"Stickers to show when receiving a gifted Telegram Premium subscription","arguments":[]},{"kind":"class","name":"inputStickerSetEmojiGenericAnimations","type":"InputStickerSet","id":80008398,"comment":"Generic animation stickerset containing animations to play when reacting to messages using a normal emoji without a custom animation","arguments":[]},{"kind":"class","name":"inputStickerSetEmojiDefaultStatuses","type":"InputStickerSet","id":701560302,"comment":"Default custom emoji status stickerset","arguments":[]},{"kind":"class","name":"inputStickerSetEmojiDefaultTopicIcons","type":"InputStickerSet","id":1153562857,"comment":"Default custom emoji stickerset for forum topic icons","arguments":[]},{"kind":"class","name":"inputStickerSetEmojiChannelDefaultStatuses","type":"InputStickerSet","id":1232373075,"comment":"Default custom emoji status stickerset for channel statuses","arguments":[]},{"kind":"class","name":"stickerSet","type":"StickerSet","id":768691932,"comment":"Represents a stickerset (stickerpack)","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"archived","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether this stickerset was archived (due to too many saved stickers in the current account)"},{"name":"official","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Is this stickerset official"},{"name":"masks","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Is this a mask stickerset"},{"name":"emojis","type":"true","typeModifiers":{"predicate":"flags.7"},"comment":"This is a custom emoji stickerset"},{"name":"text_color","type":"true","typeModifiers":{"predicate":"flags.9"},"comment":"Whether the color of this TGS custom emoji stickerset should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context."},{"name":"channel_emoji_status","type":"true","typeModifiers":{"predicate":"flags.10"},"comment":"If set, this custom emoji stickerset can be used in channel/supergroup emoji statuses."},{"name":"creator","type":"true","typeModifiers":{"predicate":"flags.11"},"comment":"Whether we created this stickerset"},{"name":"installed_date","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"When was this stickerset installed"},{"name":"id","type":"long","comment":"ID of the stickerset"},{"name":"access_hash","type":"long","comment":"Access hash of stickerset"},{"name":"title","type":"string","comment":"Title of stickerset"},{"name":"short_name","type":"string","comment":"Short name of stickerset, used when sharing stickerset using stickerset deep links."},{"name":"thumbs","type":"PhotoSize","typeModifiers":{"predicate":"flags.4","isVector":true},"comment":"Stickerset thumbnail"},{"name":"thumb_dc_id","type":"int","typeModifiers":{"predicate":"flags.4"},"comment":"DC ID of thumbnail"},{"name":"thumb_version","type":"int","typeModifiers":{"predicate":"flags.4"},"comment":"Thumbnail version"},{"name":"thumb_document_id","type":"long","typeModifiers":{"predicate":"flags.8"},"comment":"Document ID of custom emoji thumbnail, fetch the document using {@link messages.RawGetCustomEmojiDocumentsRequest}"},{"name":"animated","type":"true","typeModifiers":{"predicate":"flags.5"}},{"name":"videos","type":"true","typeModifiers":{"predicate":"flags.6"}},{"name":"count","type":"int","comment":"Number of stickers in pack"},{"name":"hash","type":"int","comment":"Hash"}]},{"kind":"class","name":"messages.stickerSet","type":"messages.StickerSet","id":1846886166,"comment":"Stickerset and stickers inside it","arguments":[{"name":"set","type":"StickerSet","comment":"The stickerset"},{"name":"packs","type":"StickerPack","typeModifiers":{"isVector":true},"comment":"Emoji info for stickers"},{"name":"keywords","type":"StickerKeyword","typeModifiers":{"isVector":true},"comment":"Keywords for some or every sticker in the stickerset."},{"name":"documents","type":"Document","typeModifiers":{"isVector":true},"comment":"Stickers in stickerset"}]},{"kind":"class","name":"messages.stickerSetNotModified","type":"messages.StickerSet","id":3556320491,"comment":"The stickerset hasn't changed","arguments":[]},{"kind":"class","name":"botCommand","type":"BotCommand","id":3262826695,"comment":"Describes a bot command that can be used in a chat","arguments":[{"name":"command","type":"string","comment":"/command name"},{"name":"description","type":"string","comment":"Description of the command"}]},{"kind":"class","name":"botInfo","type":"BotInfo","id":2402290519,"comment":"Info about bots (available bot commands, etc)","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"has_preview_medias","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"If set, the bot has some preview medias for the configured Main Mini App, see here » for more info on Main Mini App preview medias."},{"name":"user_id","type":"int53","typeModifiers":{"predicate":"flags.0"},"comment":"ID of the bot"},{"name":"description","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Description of the bot"},{"name":"description_photo","type":"Photo","typeModifiers":{"predicate":"flags.4"},"comment":"Description photo"},{"name":"description_document","type":"Document","typeModifiers":{"predicate":"flags.5"},"comment":"Description animation in MPEG4 format"},{"name":"commands","type":"BotCommand","typeModifiers":{"predicate":"flags.2","isVector":true},"comment":"Bot commands that can be used in the chat"},{"name":"menu_button","type":"BotMenuButton","typeModifiers":{"predicate":"flags.3"},"comment":"Indicates the action to execute when pressing the in-UI menu button for bots"}]},{"kind":"class","name":"keyboardButton","type":"KeyboardButton","id":2734311552,"comment":"Bot keyboard button","arguments":[{"name":"text","type":"string","comment":"Button text"}]},{"kind":"class","name":"keyboardButtonUrl","type":"KeyboardButton","id":629866245,"comment":"URL button","arguments":[{"name":"text","type":"string","comment":"Button label"},{"name":"url","type":"string","comment":"URL"}]},{"kind":"class","name":"keyboardButtonCallback","type":"KeyboardButton","id":901503851,"comment":"Callback button","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"requires_password","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the user should verify their identity by entering their 2FA SRP parameters to the {@link messages.RawGetBotCallbackAnswerRequest} method. NOTE: telegram and the bot WILL NOT have access to the plaintext password, thanks to SRP. This button is mainly used by the official @botfather bot, for verifying the user's identity before transferring ownership of a bot to another user."},{"name":"text","type":"string","comment":"Button text"},{"name":"data","type":"bytes","comment":"Callback data"}]},{"kind":"class","name":"keyboardButtonRequestPhone","type":"KeyboardButton","id":2976541737,"comment":"Button to request a user's phone number","arguments":[{"name":"text","type":"string","comment":"Button text"}]},{"kind":"class","name":"keyboardButtonRequestGeoLocation","type":"KeyboardButton","id":4235815743,"comment":"Button to request a user's geolocation","arguments":[{"name":"text","type":"string","comment":"Button text"}]},{"kind":"class","name":"keyboardButtonSwitchInline","type":"KeyboardButton","id":2478439349,"comment":"Button to force a user to switch to inline mode: pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"same_peer","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field."},{"name":"text","type":"string","comment":"Button label"},{"name":"query","type":"string","comment":"The inline query to use"},{"name":"peer_types","type":"InlineQueryPeerType","typeModifiers":{"predicate":"flags.1","isVector":true},"comment":"Filter to use when selecting chats."}]},{"kind":"class","name":"keyboardButtonGame","type":"KeyboardButton","id":1358175439,"comment":"Button to start a game","arguments":[{"name":"text","type":"string","comment":"Button text"}]},{"kind":"class","name":"keyboardButtonBuy","type":"KeyboardButton","id":2950250427,"comment":"Button to buy a product","arguments":[{"name":"text","type":"string","comment":"Button text"}]},{"kind":"class","name":"keyboardButtonUrlAuth","type":"KeyboardButton","id":280464681,"comment":"Button to request a user to authorize via URL using Seamless Telegram Login. When the user clicks on such a button, {@link messages.RawRequestUrlAuthRequest} should be called, providing the button_id and the ID of the container message. The returned {@link RawUrlAuthResultRequest} object will contain more details about the authorization request (request_write_access if the bot would like to send messages to the user along with the username of the bot which will be used for user authorization). Finally, the user can choose to call {@link messages.RawAcceptUrlAuthRequest} to get a {@link RawUrlAuthResultAccepted} with the URL to open instead of the url of this constructor, or a {@link RawUrlAuthResultDefault}, in which case the url of this constructor must be opened, instead. If the user refuses the authorization request but still wants to open the link, the url of this constructor must be used.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"text","type":"string","comment":"Button label"},{"name":"fwd_text","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"New text of the button in forwarded messages."},{"name":"url","type":"string","comment":"An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.

NOTE: Services must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization."},{"name":"button_id","type":"int","comment":"ID of the button to pass to {@link messages.RawRequestUrlAuthRequest}"}]},{"kind":"class","name":"inputKeyboardButtonUrlAuth","type":"KeyboardButton","id":3492708308,"comment":"Button to request a user to {@link messages.RawAcceptUrlAuthRequest} via URL using Seamless Telegram Login.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"request_write_access","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Set this flag to request the permission for your bot to send messages to the user."},{"name":"text","type":"string","comment":"Button text"},{"name":"fwd_text","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"New text of the button in forwarded messages."},{"name":"url","type":"string","comment":"An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.
NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization."},{"name":"bot","type":"InputUser","comment":"Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details."}]},{"kind":"class","name":"keyboardButtonRequestPoll","type":"KeyboardButton","id":3150401885,"comment":"A button that allows the user to create and send a poll when pressed; available only in private","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"quiz","type":"Bool","typeModifiers":{"predicate":"flags.0"},"comment":"If set, only quiz polls can be sent"},{"name":"text","type":"string","comment":"Button text"}]},{"kind":"class","name":"inputKeyboardButtonUserProfile","type":"KeyboardButton","id":3918005115,"comment":"Button that links directly to a user profile","arguments":[{"name":"text","type":"string","comment":"Button text"},{"name":"user_id","type":"InputUser","comment":"User ID"}]},{"kind":"class","name":"keyboardButtonUserProfile","type":"KeyboardButton","id":814112961,"comment":"Button that links directly to a user profile","arguments":[{"name":"text","type":"string","comment":"Button text"},{"name":"user_id","type":"int53","comment":"User ID"}]},{"kind":"class","name":"keyboardButtonWebView","type":"KeyboardButton","id":326529584,"comment":"Button to open a bot mini app using {@link messages.RawRequestWebViewRequest}, sending over user information after user confirmation.\n\nCan only be sent or received as part of an inline keyboard, use {@link RawKeyboardButtonSimpleWebView} for reply keyboards.","arguments":[{"name":"text","type":"string","comment":"Button text"},{"name":"url","type":"string","comment":"Web app url"}]},{"kind":"class","name":"keyboardButtonSimpleWebView","type":"KeyboardButton","id":2696958044,"comment":"Button to open a bot mini app using {@link messages.RawRequestSimpleWebViewRequest}, without sending user information to the web app.\n\nCan only be sent or received as part of a reply keyboard, use {@link RawKeyboardButtonWebView} for inline keyboards.","arguments":[{"name":"text","type":"string","comment":"Button text"},{"name":"url","type":"string","comment":"Web app URL"}]},{"kind":"class","name":"keyboardButtonRequestPeer","type":"KeyboardButton","id":1406648280,"comment":"Prompts the user to select and share one or more peers with the bot using {@link messages.RawSendBotRequestedPeerRequest}","arguments":[{"name":"text","type":"string","comment":"Button text"},{"name":"button_id","type":"int","comment":"Button ID, to be passed to {@link messages.RawSendBotRequestedPeerRequest}."},{"name":"peer_type","type":"RequestPeerType","comment":"Filtering criteria to use for the peer selection list shown to the user.
The list should display all existing peers of the specified type, and should also offer an option for the user to create and immediately use one or more (up to max_quantity) peers of the specified type, if needed."},{"name":"max_quantity","type":"int","comment":"Maximum number of peers that can be chosen."}]},{"kind":"class","name":"inputKeyboardButtonRequestPeer","type":"KeyboardButton","id":3378916613,"comment":"Prompts the user to select and share one or more peers with the bot using {@link messages.RawSendBotRequestedPeerRequest}.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"name_requested","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Set this flag to request the peer's name."},{"name":"username_requested","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Set this flag to request the peer's @username (if any)."},{"name":"photo_requested","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Set this flag to request the peer's photo (if any)."},{"name":"text","type":"string","comment":"Button text"},{"name":"button_id","type":"int","comment":"Button ID, to be passed to {@link messages.RawSendBotRequestedPeerRequest}."},{"name":"peer_type","type":"RequestPeerType","comment":"Filtering criteria to use for the peer selection list shown to the user.
The list should display all existing peers of the specified type, and should also offer an option for the user to create and immediately use one or more (up to max_quantity) peers of the specified type, if needed."},{"name":"max_quantity","type":"int","comment":"Maximum number of peers that can be chosen."}]},{"kind":"class","name":"keyboardButtonRow","type":"KeyboardButtonRow","id":2002815875,"comment":"Inline keyboard row","arguments":[{"name":"buttons","type":"KeyboardButton","typeModifiers":{"isVector":true},"comment":"Bot or inline keyboard buttons"}]},{"kind":"class","name":"replyKeyboardHide","type":"ReplyMarkup","id":2688441221,"comment":"Hide sent bot keyboard","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"selective","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Use this flag if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.

Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet"}]},{"kind":"class","name":"replyKeyboardForceReply","type":"ReplyMarkup","id":2259946248,"comment":"Force the user to send a reply","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"single_use","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again."},{"name":"selective","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.
Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard."},{"name":"placeholder","type":"string","typeModifiers":{"predicate":"flags.3"},"comment":"The placeholder to be shown in the input field when the keyboard is active; 1-64 characters."}]},{"kind":"class","name":"replyKeyboardMarkup","type":"ReplyMarkup","id":2245892561,"comment":"Bot keyboard","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"resize","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). If not set, the custom keyboard is always of the same height as the app's standard keyboard."},{"name":"single_use","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again."},{"name":"selective","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.

Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard."},{"name":"persistent","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"Requests clients to always show the keyboard when the regular keyboard is hidden."},{"name":"rows","type":"KeyboardButtonRow","typeModifiers":{"isVector":true},"comment":"Button row"},{"name":"placeholder","type":"string","typeModifiers":{"predicate":"flags.3"},"comment":"The placeholder to be shown in the input field when the keyboard is active; 1-64 characters."}]},{"kind":"class","name":"replyInlineMarkup","type":"ReplyMarkup","id":1218642516,"comment":"Bot or inline keyboard","arguments":[{"name":"rows","type":"KeyboardButtonRow","typeModifiers":{"isVector":true},"comment":"Bot or inline keyboard rows"}]},{"kind":"class","name":"messageEntityUnknown","type":"MessageEntity","id":3146955413,"comment":"Unknown message entity","arguments":[{"name":"offset","type":"int","comment":"Offset of message entity within message (in UTF-16 code units)"},{"name":"length","type":"int","comment":"Length of message entity within message (in UTF-16 code units)"}]},{"kind":"class","name":"messageEntityMention","type":"MessageEntity","id":4194588573,"comment":"Message entity mentioning a user by @username; {@link RawMessageEntityMentionName} can also be used to mention users by their ID.","arguments":[{"name":"offset","type":"int","comment":"Offset of message entity within message (in UTF-16 code units)"},{"name":"length","type":"int","comment":"Length of message entity within message (in UTF-16 code units)"}]},{"kind":"class","name":"messageEntityHashtag","type":"MessageEntity","id":1868782349,"comment":"#hashtag message entity","arguments":[{"name":"offset","type":"int","comment":"Offset of message entity within message (in UTF-16 code units)"},{"name":"length","type":"int","comment":"Length of message entity within message (in UTF-16 code units)"}]},{"kind":"class","name":"messageEntityBotCommand","type":"MessageEntity","id":1827637959,"comment":"Message entity representing a bot /command","arguments":[{"name":"offset","type":"int","comment":"Offset of message entity within message (in UTF-16 code units)"},{"name":"length","type":"int","comment":"Length of message entity within message (in UTF-16 code units)"}]},{"kind":"class","name":"messageEntityUrl","type":"MessageEntity","id":1859134776,"comment":"Message entity representing an in-text url: https://google.com; for text urls, use {@link RawMessageEntityTextUrl}.","arguments":[{"name":"offset","type":"int","comment":"Offset of message entity within message (in UTF-16 code units)"},{"name":"length","type":"int","comment":"Length of message entity within message (in UTF-16 code units)"}]},{"kind":"class","name":"messageEntityEmail","type":"MessageEntity","id":1692693954,"comment":"Message entity representing an email@example.com.","arguments":[{"name":"offset","type":"int","comment":"Offset of message entity within message (in UTF-16 code units)"},{"name":"length","type":"int","comment":"Length of message entity within message (in UTF-16 code units)"}]},{"kind":"class","name":"messageEntityBold","type":"MessageEntity","id":3177253833,"comment":"Message entity representing bold text.","arguments":[{"name":"offset","type":"int","comment":"Offset of message entity within message (in UTF-16 code units)"},{"name":"length","type":"int","comment":"Length of message entity within message (in UTF-16 code units)"}]},{"kind":"class","name":"messageEntityItalic","type":"MessageEntity","id":2188348256,"comment":"Message entity representing italic text.","arguments":[{"name":"offset","type":"int","comment":"Offset of message entity within message (in UTF-16 code units)"},{"name":"length","type":"int","comment":"Length of message entity within message (in UTF-16 code units)"}]},{"kind":"class","name":"messageEntityCode","type":"MessageEntity","id":681706865,"comment":"Message entity representing a codeblock.","arguments":[{"name":"offset","type":"int","comment":"Offset of message entity within message (in UTF-16 code units)"},{"name":"length","type":"int","comment":"Length of message entity within message (in UTF-16 code units)"}]},{"kind":"class","name":"messageEntityPre","type":"MessageEntity","id":1938967520,"comment":"Message entity representing a preformatted codeblock, allowing the user to specify a programming language for the codeblock.","arguments":[{"name":"offset","type":"int","comment":"Offset of message entity within message (in UTF-16 code units)"},{"name":"length","type":"int","comment":"Length of message entity within message (in UTF-16 code units)"},{"name":"language","type":"string","comment":"Programming language of the code"}]},{"kind":"class","name":"messageEntityTextUrl","type":"MessageEntity","id":1990644519,"comment":"Message entity representing a text url: for in-text urls like https://google.com use {@link RawMessageEntityUrl}.\n\nNote that an additional confirmation popup with the full URL must be displayed to the user before opening this link, unless the domain satisfies the conditions specified in the domain whitelist documentation ».","arguments":[{"name":"offset","type":"int","comment":"Offset of message entity within message (in UTF-16 code units)"},{"name":"length","type":"int","comment":"Length of message entity within message (in UTF-16 code units)"},{"name":"url","type":"string","comment":"The actual URL"}]},{"kind":"class","name":"messageEntityMentionName","type":"MessageEntity","id":3699052864,"comment":"Message entity representing a user mention: for creating a mention use {@link RawInputMessageEntityMentionName}.","arguments":[{"name":"offset","type":"int","comment":"Offset of message entity within message (in UTF-16 code units)"},{"name":"length","type":"int","comment":"Length of message entity within message (in UTF-16 code units)"},{"name":"user_id","type":"int53","comment":"Identifier of the user that was mentioned"}]},{"kind":"class","name":"inputMessageEntityMentionName","type":"MessageEntity","id":546203849,"comment":"Message entity that can be used to create a user user mention: received mentions use the {@link RawMessageEntityMentionName} constructor, instead.","arguments":[{"name":"offset","type":"int","comment":"Offset of message entity within message (in UTF-16 code units)"},{"name":"length","type":"int","comment":"Length of message entity within message (in UTF-16 code units)"},{"name":"user_id","type":"InputUser","comment":"Identifier of the user that was mentioned"}]},{"kind":"class","name":"messageEntityPhone","type":"MessageEntity","id":2607407947,"comment":"Message entity representing a phone number.","arguments":[{"name":"offset","type":"int","comment":"Offset of message entity within message (in UTF-16 code units)"},{"name":"length","type":"int","comment":"Length of message entity within message (in UTF-16 code units)"}]},{"kind":"class","name":"messageEntityCashtag","type":"MessageEntity","id":1280209983,"comment":"Message entity representing a $cashtag.","arguments":[{"name":"offset","type":"int","comment":"Offset of message entity within message (in UTF-16 code units)"},{"name":"length","type":"int","comment":"Length of message entity within message (in UTF-16 code units)"}]},{"kind":"class","name":"messageEntityUnderline","type":"MessageEntity","id":2622389899,"comment":"Message entity representing underlined text.","arguments":[{"name":"offset","type":"int","comment":"Offset of message entity within message (in UTF-16 code units)"},{"name":"length","type":"int","comment":"Length of message entity within message (in UTF-16 code units)"}]},{"kind":"class","name":"messageEntityStrike","type":"MessageEntity","id":3204879316,"comment":"Message entity representing strikethrough text.","arguments":[{"name":"offset","type":"int","comment":"Offset of message entity within message (in UTF-16 code units)"},{"name":"length","type":"int","comment":"Length of message entity within message (in UTF-16 code units)"}]},{"kind":"class","name":"messageEntityBankCard","type":"MessageEntity","id":1981704948,"comment":"Indicates a credit card number","arguments":[{"name":"offset","type":"int","comment":"Offset of message entity within message (in UTF-16 code units)"},{"name":"length","type":"int","comment":"Length of message entity within message (in UTF-16 code units)"}]},{"kind":"class","name":"messageEntitySpoiler","type":"MessageEntity","id":852137487,"comment":"Message entity representing a spoiler","arguments":[{"name":"offset","type":"int","comment":"Offset of message entity within message (in UTF-16 code units)"},{"name":"length","type":"int","comment":"Length of message entity within message (in UTF-16 code units)"}]},{"kind":"class","name":"messageEntityCustomEmoji","type":"MessageEntity","id":3369010680,"comment":"Represents a custom emoji.
\nNote that this entity must wrap exactly one regular emoji (the one contained in {@link RawDocumentAttributeCustomEmoji}.alt) in the related text, otherwise the server will ignore it.","arguments":[{"name":"offset","type":"int","comment":"Offset of message entity within message (in UTF-16 code units)"},{"name":"length","type":"int","comment":"Length of message entity within message (in UTF-16 code units)"},{"name":"document_id","type":"long","comment":"Document ID of the custom emoji, use {@link messages.RawGetCustomEmojiDocumentsRequest} to fetch the emoji animation and the actual emoji it represents."}]},{"kind":"class","name":"messageEntityBlockquote","type":"MessageEntity","id":4056722092,"comment":"Message entity representing a block quote.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"collapsed","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the quote is collapsed by default."},{"name":"offset","type":"int","comment":"Offset of message entity within message (in UTF-16 code units)"},{"name":"length","type":"int","comment":"Length of message entity within message (in UTF-16 code units)"}]},{"kind":"class","name":"inputChannelEmpty","type":"InputChannel","id":4002160262,"comment":"Represents the absence of a channel","arguments":[]},{"kind":"class","name":"inputChannel","type":"InputChannel","id":4082822184,"comment":"Represents a channel","arguments":[{"name":"channel_id","type":"int53","comment":"Channel ID"},{"name":"access_hash","type":"long","comment":"Access hash taken from the {@link RawChannel} constructor"}]},{"kind":"class","name":"inputChannelFromMessage","type":"InputChannel","id":1536380829,"comment":"Defines a min channel that was seen in a certain message of a certain chat.","arguments":[{"name":"peer","type":"InputPeer","comment":"The chat where the channel was seen"},{"name":"msg_id","type":"int","comment":"The message ID in the chat where the channel was seen"},{"name":"channel_id","type":"int53","comment":"The channel ID"}]},{"kind":"class","name":"contacts.resolvedPeer","type":"contacts.ResolvedPeer","id":2131196633,"comment":"Resolved peer","arguments":[{"name":"peer","type":"Peer","comment":"The peer"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Users"}]},{"kind":"class","name":"messageRange","type":"MessageRange","id":182649427,"comment":"Indicates a range of chat messages","arguments":[{"name":"min_id","type":"int","comment":"Start of range (message ID)"},{"name":"max_id","type":"int","comment":"End of range (message ID)"}]},{"kind":"class","name":"updates.channelDifferenceEmpty","type":"updates.ChannelDifference","id":1041346555,"comment":"There are no new updates","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"final","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether there are more updates that must be fetched (always false)"},{"name":"pts","type":"int","comment":"The latest PTS"},{"name":"timeout","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Clients are supposed to refetch the channel difference after timeout seconds have elapsed, if the user is currently viewing the chat, see here » for more info."}]},{"kind":"class","name":"updates.channelDifferenceTooLong","type":"updates.ChannelDifference","id":2763835134,"comment":"The provided pts + limit < remote pts. Simply, there are too many updates to be fetched (more than limit), the client has to resolve the update gap in one of the following ways (assuming the existence of a persistent database to locally store messages):\n\nIt should be also noted that some messages like live location messages shouldn't be deleted.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"final","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether there are more updates that must be fetched (always false)"},{"name":"timeout","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Clients are supposed to refetch the channel difference after timeout seconds have elapsed"},{"name":"dialog","type":"Dialog","comment":"Dialog containing the latest PTS that can be used to reset the channel state"},{"name":"messages","type":"Message","typeModifiers":{"isVector":true},"comment":"The latest messages"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Chats from messages"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Users from messages"}]},{"kind":"class","name":"updates.channelDifference","type":"updates.ChannelDifference","id":543450958,"comment":"The new updates","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"final","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether there are more updates to be fetched using getDifference, starting from the provided pts"},{"name":"pts","type":"int","comment":"The PTS from which to start getting updates the next time"},{"name":"timeout","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Clients are supposed to refetch the channel difference after timeout seconds have elapsed, if the user is currently viewing the chat, see here » for more info."},{"name":"new_messages","type":"Message","typeModifiers":{"isVector":true},"comment":"New messages"},{"name":"other_updates","type":"Update","typeModifiers":{"isVector":true},"comment":"Other updates"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Users"}]},{"kind":"class","name":"channelMessagesFilterEmpty","type":"ChannelMessagesFilter","id":2496933607,"comment":"No filter","arguments":[]},{"kind":"class","name":"channelMessagesFilter","type":"ChannelMessagesFilter","id":3447183703,"comment":"Filter for getting only certain types of channel messages","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"exclude_new_messages","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether to exclude new messages from the search"},{"name":"ranges","type":"MessageRange","typeModifiers":{"isVector":true},"comment":"A range of messages to fetch"}]},{"kind":"class","name":"channelParticipant","type":"ChannelParticipant","id":3222013888,"comment":"Channel/supergroup participant","arguments":[{"name":"user_id","type":"int53","comment":"Participant user ID"},{"name":"date","type":"int","comment":"Date joined"}]},{"kind":"class","name":"channelParticipantSelf","type":"ChannelParticipant","id":900251559,"comment":"Myself","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"via_request","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether I joined upon specific approval of an admin"},{"name":"user_id","type":"int53","comment":"User ID"},{"name":"inviter_id","type":"int53","comment":"User that invited me to the channel/supergroup"},{"name":"date","type":"int","comment":"When did I join the channel/supergroup"}]},{"kind":"class","name":"channelParticipantCreator","type":"ChannelParticipant","id":803602899,"comment":"Channel/supergroup creator","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"user_id","type":"int53","comment":"User ID"},{"name":"admin_rights","type":"ChatAdminRights","comment":"Creator admin rights"},{"name":"rank","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"The role (rank) of the group creator in the group: just an arbitrary string, admin by default"}]},{"kind":"class","name":"channelParticipantAdmin","type":"ChannelParticipant","id":885242707,"comment":"Admin","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"can_edit","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Can this admin promote other admins with the same permissions?"},{"name":"self","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Is this the current user"},{"name":"user_id","type":"int53","comment":"Admin user ID"},{"name":"inviter_id","type":"int53","typeModifiers":{"predicate":"flags.1"},"comment":"User that invited the admin to the channel/group"},{"name":"promoted_by","type":"int53","comment":"User that promoted the user to admin"},{"name":"date","type":"int","comment":"When did the user join"},{"name":"admin_rights","type":"ChatAdminRights","comment":"Admin rights"},{"name":"rank","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"The role (rank) of the admin in the group: just an arbitrary string, admin by default"}]},{"kind":"class","name":"channelParticipantBanned","type":"ChannelParticipant","id":1844969806,"comment":"Banned/kicked user","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"left","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the user has left the group"},{"name":"peer","type":"Peer","comment":"The banned peer"},{"name":"kicked_by","type":"int53","comment":"User was kicked by the specified admin"},{"name":"date","type":"int","comment":"When did the user join the group"},{"name":"banned_rights","type":"ChatBannedRights","comment":"Banned rights"}]},{"kind":"class","name":"channelParticipantLeft","type":"ChannelParticipant","id":453242886,"comment":"A participant that left the channel/supergroup","arguments":[{"name":"peer","type":"Peer","comment":"The peer that left"}]},{"kind":"class","name":"channelParticipantsRecent","type":"ChannelParticipantsFilter","id":3728686201,"comment":"Fetch only recent participants","arguments":[]},{"kind":"class","name":"channelParticipantsAdmins","type":"ChannelParticipantsFilter","id":3026225513,"comment":"Fetch only admin participants","arguments":[]},{"kind":"class","name":"channelParticipantsKicked","type":"ChannelParticipantsFilter","id":2746567045,"comment":"Fetch only kicked participants","arguments":[{"name":"q","type":"string","comment":"Optional filter for searching kicked participants by name (otherwise empty)"}]},{"kind":"class","name":"channelParticipantsBots","type":"ChannelParticipantsFilter","id":2966521435,"comment":"Fetch only bot participants","arguments":[]},{"kind":"class","name":"channelParticipantsBanned","type":"ChannelParticipantsFilter","id":338142689,"comment":"Fetch only banned participants","arguments":[{"name":"q","type":"string","comment":"Optional filter for searching banned participants by name (otherwise empty)"}]},{"kind":"class","name":"channelParticipantsSearch","type":"ChannelParticipantsFilter","id":106343499,"comment":"Query participants by name","arguments":[{"name":"q","type":"string","comment":"Search query"}]},{"kind":"class","name":"channelParticipantsContacts","type":"ChannelParticipantsFilter","id":3144345741,"comment":"Fetch only participants that are also contacts","arguments":[{"name":"q","type":"string","comment":"Optional search query for searching contact participants by name"}]},{"kind":"class","name":"channelParticipantsMentions","type":"ChannelParticipantsFilter","id":3763035371,"comment":"This filter is used when looking for supergroup members to mention.
\nThis filter will automatically remove anonymous admins, and return even non-participant users that replied to a specific thread through the comment section of a channel.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"q","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Filter by user name or username"},{"name":"top_msg_id","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Look only for users that posted in this thread"}]},{"kind":"class","name":"channels.channelParticipants","type":"channels.ChannelParticipants","id":2595290799,"comment":"Represents multiple channel participants","arguments":[{"name":"count","type":"int","comment":"Total number of participants that correspond to the given query"},{"name":"participants","type":"ChannelParticipant","typeModifiers":{"isVector":true},"comment":"Participants"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Mentioned chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Users mentioned in participant info"}]},{"kind":"class","name":"channels.channelParticipantsNotModified","type":"channels.ChannelParticipants","id":4028055529,"comment":"No new participant info could be found","arguments":[]},{"kind":"class","name":"channels.channelParticipant","type":"channels.ChannelParticipant","id":3753378583,"comment":"Represents a channel participant","arguments":[{"name":"participant","type":"ChannelParticipant","comment":"The channel participant"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Mentioned chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Users"}]},{"kind":"class","name":"help.termsOfService","type":"help.TermsOfService","id":2013922064,"comment":"Info about the latest telegram Terms Of Service","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"popup","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether a prompt must be showed to the user, in order to accept the new terms."},{"name":"id","type":"DataJSON","comment":"ID of the new terms"},{"name":"text","type":"string","comment":"Text of the new terms"},{"name":"entities","type":"MessageEntity","typeModifiers":{"isVector":true},"comment":"Message entities for styled text"},{"name":"min_age_confirm","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Minimum age required to sign up to telegram, the user must confirm that they is older than the minimum age."}]},{"kind":"class","name":"messages.savedGifsNotModified","type":"messages.SavedGifs","id":3892468898,"comment":"No new saved gifs were found","arguments":[]},{"kind":"class","name":"messages.savedGifs","type":"messages.SavedGifs","id":2225089037,"comment":"Saved gifs","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here"},{"name":"gifs","type":"Document","typeModifiers":{"isVector":true},"comment":"List of saved gifs"}]},{"kind":"class","name":"inputBotInlineMessageMediaAuto","type":"InputBotInlineMessage","id":864077702,"comment":"A media","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"invert_media","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom."},{"name":"message","type":"string","comment":"Caption"},{"name":"entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.1","isVector":true},"comment":"Message entities for styled text"},{"name":"reply_markup","type":"ReplyMarkup","typeModifiers":{"predicate":"flags.2"},"comment":"Inline keyboard"}]},{"kind":"class","name":"inputBotInlineMessageText","type":"InputBotInlineMessage","id":1036876423,"comment":"Simple text message","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"no_webpage","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Disable webpage preview"},{"name":"invert_media","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom."},{"name":"message","type":"string","comment":"Message"},{"name":"entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.1","isVector":true},"comment":"Message entities for styled text"},{"name":"reply_markup","type":"ReplyMarkup","typeModifiers":{"predicate":"flags.2"},"comment":"Inline keyboard"}]},{"kind":"class","name":"inputBotInlineMessageMediaGeo","type":"InputBotInlineMessage","id":2526190213,"comment":"Geolocation","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"geo_point","type":"InputGeoPoint","comment":"Geolocation"},{"name":"heading","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"For live locations, a direction in which the location moves, in degrees; 1-360"},{"name":"period","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Validity period"},{"name":"proximity_notification_radius","type":"int","typeModifiers":{"predicate":"flags.3"},"comment":"For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000)"},{"name":"reply_markup","type":"ReplyMarkup","typeModifiers":{"predicate":"flags.2"},"comment":"Reply markup for bot/inline keyboards"}]},{"kind":"class","name":"inputBotInlineMessageMediaVenue","type":"InputBotInlineMessage","id":1098628881,"comment":"Venue","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"geo_point","type":"InputGeoPoint","comment":"Geolocation"},{"name":"title","type":"string","comment":"Venue name"},{"name":"address","type":"string","comment":"Address"},{"name":"provider","type":"string","comment":"Venue provider: currently only \"foursquare\" and \"gplaces\" (Google Places) need to be supported"},{"name":"venue_id","type":"string","comment":"Venue ID in the provider's database"},{"name":"venue_type","type":"string","comment":"Venue type in the provider's database"},{"name":"reply_markup","type":"ReplyMarkup","typeModifiers":{"predicate":"flags.2"},"comment":"Inline keyboard"}]},{"kind":"class","name":"inputBotInlineMessageMediaContact","type":"InputBotInlineMessage","id":2800599037,"comment":"A contact","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"phone_number","type":"string","comment":"Phone number"},{"name":"first_name","type":"string","comment":"First name"},{"name":"last_name","type":"string","comment":"Last name"},{"name":"vcard","type":"string","comment":"VCard info"},{"name":"reply_markup","type":"ReplyMarkup","typeModifiers":{"predicate":"flags.2"},"comment":"Inline keyboard"}]},{"kind":"class","name":"inputBotInlineMessageGame","type":"InputBotInlineMessage","id":1262639204,"comment":"A game","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"reply_markup","type":"ReplyMarkup","typeModifiers":{"predicate":"flags.2"},"comment":"Inline keyboard"}]},{"kind":"class","name":"inputBotInlineMessageMediaInvoice","type":"InputBotInlineMessage","id":3622273573,"comment":"An invoice","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"title","type":"string","comment":"Product name, 1-32 characters"},{"name":"description","type":"string","comment":"Product description, 1-255 characters"},{"name":"photo","type":"InputWebDocument","typeModifiers":{"predicate":"flags.0"},"comment":"Invoice photo"},{"name":"invoice","type":"Invoice","comment":"The invoice"},{"name":"payload","type":"bytes","comment":"Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes."},{"name":"provider","type":"string","comment":"Payments provider token, obtained via Botfather"},{"name":"provider_data","type":"DataJSON","comment":"A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider."},{"name":"reply_markup","type":"ReplyMarkup","typeModifiers":{"predicate":"flags.2"},"comment":"Inline keyboard"}]},{"kind":"class","name":"inputBotInlineMessageMediaWebPage","type":"InputBotInlineMessage","id":3185362192,"comment":"Specifies options that will be used to generate the link preview for the message, or even a standalone link preview without an attached message.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"invert_media","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom."},{"name":"force_large_media","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"If set, specifies that a large media preview should be used."},{"name":"force_small_media","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"If set, specifies that a small media preview should be used."},{"name":"optional","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"If not set, a WEBPAGE_NOT_FOUND RPC error will be emitted if a webpage preview cannot be generated for the specified url; otherwise, no error will be emitted (unless the provided message is also empty, in which case a MESSAGE_EMPTY will be emitted, instead)."},{"name":"message","type":"string","comment":"The message, can be empty."},{"name":"entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.1","isVector":true},"comment":"Message entities for styled text"},{"name":"url","type":"string","comment":"The URL to use for the link preview."},{"name":"reply_markup","type":"ReplyMarkup","typeModifiers":{"predicate":"flags.2"},"comment":"Inline keyboard"}]},{"kind":"class","name":"inputBotInlineResult","type":"InputBotInlineResult","id":2294256409,"comment":"An inline bot result","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"id","type":"string","comment":"ID of result"},{"name":"type","type":"string","comment":"Result type (see bot API docs)"},{"name":"title","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Result title"},{"name":"description","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"Result description"},{"name":"url","type":"string","typeModifiers":{"predicate":"flags.3"},"comment":"URL of result"},{"name":"thumb","type":"InputWebDocument","typeModifiers":{"predicate":"flags.4"},"comment":"Thumbnail for result"},{"name":"content","type":"InputWebDocument","typeModifiers":{"predicate":"flags.5"},"comment":"Result contents"},{"name":"send_message","type":"InputBotInlineMessage","comment":"Message to send when the result is selected"}]},{"kind":"class","name":"inputBotInlineResultPhoto","type":"InputBotInlineResult","id":2832753831,"comment":"Photo","arguments":[{"name":"id","type":"string","comment":"Result ID"},{"name":"type","type":"string","comment":"Result type (see bot API docs)"},{"name":"photo","type":"InputPhoto","comment":"Photo to send"},{"name":"send_message","type":"InputBotInlineMessage","comment":"Message to send when the result is selected"}]},{"kind":"class","name":"inputBotInlineResultDocument","type":"InputBotInlineResult","id":4294507972,"comment":"Document (media of any type except for photos)","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"id","type":"string","comment":"Result ID"},{"name":"type","type":"string","comment":"Result type (see bot API docs)"},{"name":"title","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Result title"},{"name":"description","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"Result description"},{"name":"document","type":"InputDocument","comment":"Document to send"},{"name":"send_message","type":"InputBotInlineMessage","comment":"Message to send when the result is selected"}]},{"kind":"class","name":"inputBotInlineResultGame","type":"InputBotInlineResult","id":1336154098,"comment":"Game","arguments":[{"name":"id","type":"string","comment":"Result ID"},{"name":"short_name","type":"string","comment":"Game short name"},{"name":"send_message","type":"InputBotInlineMessage","comment":"Message to send when the result is selected"}]},{"kind":"class","name":"botInlineMessageMediaAuto","type":"BotInlineMessage","id":1984755728,"comment":"Send whatever media is attached to the {@link RawBotInlineMediaResult}","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"invert_media","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom."},{"name":"message","type":"string","comment":"Caption"},{"name":"entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.1","isVector":true},"comment":"Message entities for styled text"},{"name":"reply_markup","type":"ReplyMarkup","typeModifiers":{"predicate":"flags.2"},"comment":"Inline keyboard"}]},{"kind":"class","name":"botInlineMessageText","type":"BotInlineMessage","id":2357159394,"comment":"Send a simple text message","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"no_webpage","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Disable webpage preview"},{"name":"invert_media","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom."},{"name":"message","type":"string","comment":"The message"},{"name":"entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.1","isVector":true},"comment":"Message entities for styled text"},{"name":"reply_markup","type":"ReplyMarkup","typeModifiers":{"predicate":"flags.2"},"comment":"Inline keyboard"}]},{"kind":"class","name":"botInlineMessageMediaGeo","type":"BotInlineMessage","id":85477117,"comment":"Send a geolocation","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"geo","type":"GeoPoint","comment":"Geolocation"},{"name":"heading","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"For live locations, a direction in which the location moves, in degrees; 1-360."},{"name":"period","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Validity period"},{"name":"proximity_notification_radius","type":"int","typeModifiers":{"predicate":"flags.3"},"comment":"For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000)."},{"name":"reply_markup","type":"ReplyMarkup","typeModifiers":{"predicate":"flags.2"},"comment":"Inline keyboard"}]},{"kind":"class","name":"botInlineMessageMediaVenue","type":"BotInlineMessage","id":2324063644,"comment":"Send a venue","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"geo","type":"GeoPoint","comment":"Geolocation of venue"},{"name":"title","type":"string","comment":"Venue name"},{"name":"address","type":"string","comment":"Address"},{"name":"provider","type":"string","comment":"Venue provider: currently only \"foursquare\" and \"gplaces\" (Google Places) need to be supported"},{"name":"venue_id","type":"string","comment":"Venue ID in the provider's database"},{"name":"venue_type","type":"string","comment":"Venue type in the provider's database"},{"name":"reply_markup","type":"ReplyMarkup","typeModifiers":{"predicate":"flags.2"},"comment":"Inline keyboard"}]},{"kind":"class","name":"botInlineMessageMediaContact","type":"BotInlineMessage","id":416402882,"comment":"Send a contact","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"phone_number","type":"string","comment":"Phone number"},{"name":"first_name","type":"string","comment":"First name"},{"name":"last_name","type":"string","comment":"Last name"},{"name":"vcard","type":"string","comment":"VCard info"},{"name":"reply_markup","type":"ReplyMarkup","typeModifiers":{"predicate":"flags.2"},"comment":"Inline keyboard"}]},{"kind":"class","name":"botInlineMessageMediaInvoice","type":"BotInlineMessage","id":894081801,"comment":"Send an invoice","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"shipping_address_requested","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Set this flag if you require the user's shipping address to complete the order"},{"name":"test","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Test invoice"},{"name":"title","type":"string","comment":"Product name, 1-32 characters"},{"name":"description","type":"string","comment":"Product description, 1-255 characters"},{"name":"photo","type":"WebDocument","typeModifiers":{"predicate":"flags.0"},"comment":"Product photo"},{"name":"currency","type":"string","comment":"Three-letter ISO 4217 currency code, or XTR for Telegram Stars."},{"name":"total_amount","type":"long","comment":"Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."},{"name":"reply_markup","type":"ReplyMarkup","typeModifiers":{"predicate":"flags.2"},"comment":"Inline keyboard"}]},{"kind":"class","name":"botInlineMessageMediaWebPage","type":"BotInlineMessage","id":2157631910,"comment":"Specifies options that must be used to generate the link preview for the message, or even a standalone link preview without an attached message.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"invert_media","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom."},{"name":"force_large_media","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"If set, specifies that a large media preview should be used."},{"name":"force_small_media","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"If set, specifies that a small media preview should be used."},{"name":"manual","type":"true","typeModifiers":{"predicate":"flags.7"},"comment":"If set, indicates that the URL used for the webpage preview was specified manually using {@link RawInputMediaWebPage}, and may not be related to any of the URLs specified in the message."},{"name":"safe","type":"true","typeModifiers":{"predicate":"flags.8"},"comment":"If set, the link can be opened directly without user confirmation."},{"name":"message","type":"string","comment":"The message, can be empty."},{"name":"entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.1","isVector":true},"comment":"Message entities for styled text"},{"name":"url","type":"string","comment":"The URL to use for the link preview."},{"name":"reply_markup","type":"ReplyMarkup","typeModifiers":{"predicate":"flags.2"},"comment":"Reply markup for sending bot buttons"}]},{"kind":"class","name":"botInlineResult","type":"BotInlineResult","id":295067450,"comment":"Generic result","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"id","type":"string","comment":"Result ID"},{"name":"type","type":"string","comment":"Result type (see bot API docs)"},{"name":"title","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Result title"},{"name":"description","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"Result description"},{"name":"url","type":"string","typeModifiers":{"predicate":"flags.3"},"comment":"URL of article or webpage"},{"name":"thumb","type":"WebDocument","typeModifiers":{"predicate":"flags.4"},"comment":"Thumbnail for the result"},{"name":"content","type":"WebDocument","typeModifiers":{"predicate":"flags.5"},"comment":"Content of the result"},{"name":"send_message","type":"BotInlineMessage","comment":"Message to send"}]},{"kind":"class","name":"botInlineMediaResult","type":"BotInlineResult","id":400266251,"comment":"Media result","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"id","type":"string","comment":"Result ID"},{"name":"type","type":"string","comment":"Result type (see bot API docs)"},{"name":"photo","type":"Photo","typeModifiers":{"predicate":"flags.0"},"comment":"If type is photo, the photo to send"},{"name":"document","type":"Document","typeModifiers":{"predicate":"flags.1"},"comment":"If type is document, the document to send"},{"name":"title","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"Result title"},{"name":"description","type":"string","typeModifiers":{"predicate":"flags.3"},"comment":"Description"},{"name":"send_message","type":"BotInlineMessage","comment":"Depending on the type and on the constructor, contains the caption of the media or the content of the message to be sent instead of the media"}]},{"kind":"class","name":"messages.botResults","type":"messages.BotResults","id":3760321270,"comment":"Result of a query to an inline bot","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"gallery","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the result is a picture gallery"},{"name":"query_id","type":"long","comment":"Query ID"},{"name":"next_offset","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"The next offset to use when navigating through results"},{"name":"switch_pm","type":"InlineBotSwitchPM","typeModifiers":{"predicate":"flags.2"},"comment":"Shown as a button on top of the remaining inline result list; if clicked, redirects the user to a private chat with the bot with the specified start parameter."},{"name":"switch_webview","type":"InlineBotWebView","typeModifiers":{"predicate":"flags.3"},"comment":"Shown as a button on top of the remaining inline result list; if clicked, opens the specified inline mode mini app."},{"name":"results","type":"BotInlineResult","typeModifiers":{"isVector":true},"comment":"The results"},{"name":"cache_time","type":"int","comment":"Caching validity of the results"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Users mentioned in the results"}]},{"kind":"class","name":"exportedMessageLink","type":"ExportedMessageLink","id":1571494644,"comment":"Link to a message in a supergroup/channel","arguments":[{"name":"link","type":"string","comment":"URL"},{"name":"html","type":"string","comment":"Embed code"}]},{"kind":"class","name":"messageFwdHeader","type":"MessageFwdHeader","id":1313731771,"comment":"Info about a forwarded message","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"imported","type":"true","typeModifiers":{"predicate":"flags.7"},"comment":"Whether this message was imported from a foreign chat service, click here for more info »"},{"name":"saved_out","type":"true","typeModifiers":{"predicate":"flags.11"},"comment":"Only for messages forwarded to saved messages », set if the original message was outgoing (though the message may have been originally outgoing even if this flag is not set, if from_id points to the current user)."},{"name":"from_id","type":"Peer","typeModifiers":{"predicate":"flags.0"},"comment":"The ID of the user that originally sent the message"},{"name":"from_name","type":"string","typeModifiers":{"predicate":"flags.5"},"comment":"The name of the user that originally sent the message"},{"name":"date","type":"int","comment":"When was the message originally sent"},{"name":"channel_post","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"ID of the channel message that was forwarded"},{"name":"post_author","type":"string","typeModifiers":{"predicate":"flags.3"},"comment":"For channels and if signatures are enabled, author of the channel message"},{"name":"saved_from_peer","type":"Peer","typeModifiers":{"predicate":"flags.4"},"comment":"Only for messages forwarded to saved messages », contains the dialog where the message was originally sent."},{"name":"saved_from_msg_id","type":"int","typeModifiers":{"predicate":"flags.4"},"comment":"Only for messages forwarded to saved messages », contains the original ID of the message in saved_from_peer."},{"name":"saved_from_id","type":"Peer","typeModifiers":{"predicate":"flags.8"},"comment":"Only for forwarded messages reforwarded to saved messages », contains the sender of the original message (i.e. if user A sends a message, then user B forwards it somewhere, then user C saves it to saved messages, this field will contain the ID of user B and from_id will contain the ID of user A)."},{"name":"saved_from_name","type":"string","typeModifiers":{"predicate":"flags.9"},"comment":"Only for forwarded messages from users with forward privacy enabled, sent by users with forward privacy enabled, reforwarded to saved messages », contains the sender of the original message (i.e. if user A (fwd privacy enabled) sends a message, then user B (fwd privacy enabled) forwards it somewhere, then user C saves it to saved messages, this field will contain the name of user B and from_name will contain the name of user A)."},{"name":"saved_date","type":"int","typeModifiers":{"predicate":"flags.10"},"comment":"Only for forwarded messages reforwarded to saved messages », indicates when was the original message sent (i.e. if user A sends a message @ unixtime 1, then user B forwards it somewhere @ unixtime 2, then user C saves it to saved messages @ unixtime 3, this field will contain 2, date will contain 1 and the date of the containing {@link RawMessage} will contain 3)."},{"name":"psa_type","type":"string","typeModifiers":{"predicate":"flags.6"},"comment":"PSA type"}]},{"kind":"class","name":"auth.codeTypeSms","type":"auth.CodeType","id":1923290508,"comment":"The next time, the authentication code will be delivered via an immediately canceled incoming call.","arguments":[]},{"kind":"class","name":"auth.codeTypeCall","type":"auth.CodeType","id":1948046307,"comment":"The next time, the authentication code is to be delivered via an outgoing phone call.","arguments":[]},{"kind":"class","name":"auth.codeTypeFlashCall","type":"auth.CodeType","id":577556219,"comment":"The next time, the authentication code will be delivered via an immediately canceled incoming call.","arguments":[]},{"kind":"class","name":"auth.codeTypeMissedCall","type":"auth.CodeType","id":3592083182,"comment":"The next time, the authentication code will be delivered via an immediately canceled incoming call, handled manually by the user.","arguments":[]},{"kind":"class","name":"auth.codeTypeFragmentSms","type":"auth.CodeType","id":116234636,"comment":"The next time, the authentication code will be delivered via fragment.com","arguments":[]},{"kind":"class","name":"auth.sentCodeTypeApp","type":"auth.SentCodeType","id":1035688326,"comment":"The code was sent through the telegram app","arguments":[{"name":"length","type":"int","comment":"Length of the code in bytes"}]},{"kind":"class","name":"auth.sentCodeTypeSms","type":"auth.SentCodeType","id":3221273506,"comment":"The code was sent via SMS","arguments":[{"name":"length","type":"int","comment":"Length of the code in bytes"}]},{"kind":"class","name":"auth.sentCodeTypeCall","type":"auth.SentCodeType","id":1398007207,"comment":"The code will be sent via a phone call: a synthesized voice will tell the user which verification code to input.","arguments":[{"name":"length","type":"int","comment":"Length of the verification code"}]},{"kind":"class","name":"auth.sentCodeTypeFlashCall","type":"auth.SentCodeType","id":2869151449,"comment":"The code will be sent via a flash phone call, that will be closed immediately. The phone code will then be the phone number itself, just make sure that the phone number matches the specified pattern.","arguments":[{"name":"pattern","type":"string","comment":"pattern to match"}]},{"kind":"class","name":"auth.sentCodeTypeMissedCall","type":"auth.SentCodeType","id":2181063812,"comment":"The code will be sent via a flash phone call, that will be closed immediately. The last digits of the phone number that calls are the code that must be entered manually by the user.","arguments":[{"name":"prefix","type":"string","comment":"Prefix of the phone number from which the call will be made"},{"name":"length","type":"int","comment":"Length of the verification code"}]},{"kind":"class","name":"auth.sentCodeTypeEmailCode","type":"auth.SentCodeType","id":4098946459,"comment":"The code was sent via the previously configured login email »","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"apple_signin_allowed","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether authorization through Apple ID is allowed"},{"name":"google_signin_allowed","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether authorization through Google ID is allowed"},{"name":"email_pattern","type":"string","comment":"Pattern of the email"},{"name":"length","type":"int","comment":"Length of the sent verification code"},{"name":"reset_available_period","type":"int","typeModifiers":{"predicate":"flags.3"},"comment":"Clients should wait for the specified amount of seconds before allowing the user to invoke {@link auth.RawResetLoginEmailRequest} (will be 0 for Premium users)."},{"name":"reset_pending_date","type":"int","typeModifiers":{"predicate":"flags.4"},"comment":"An email reset was already requested, and will occur at the specified date."}]},{"kind":"class","name":"auth.sentCodeTypeSetUpEmailRequired","type":"auth.SentCodeType","id":2773032426,"comment":"The user should add and verify an email address in order to login as described here ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"apple_signin_allowed","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether authorization through Apple ID is allowed"},{"name":"google_signin_allowed","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether authorization through Google ID is allowed"}]},{"kind":"class","name":"auth.sentCodeTypeFragmentSms","type":"auth.SentCodeType","id":3646315577,"comment":"The code was delivered via fragment.com.","arguments":[{"name":"url","type":"string","comment":"Open the specified URL to log into fragment.com with the wallet that owns the specified phone number and view the code."},{"name":"length","type":"int","comment":"Length of the delivered code."}]},{"kind":"class","name":"auth.sentCodeTypeFirebaseSms","type":"auth.SentCodeType","id":10475318,"comment":"An authentication code should be delivered via SMS after Firebase attestation, as described in the auth documentation ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"nonce","type":"bytes","typeModifiers":{"predicate":"flags.0"},"comment":"On Android, the nonce to be used as described in the auth documentation »"},{"name":"play_integrity_project_id","type":"long","typeModifiers":{"predicate":"flags.2"},"comment":"Google Play Integrity project ID"},{"name":"play_integrity_nonce","type":"bytes","typeModifiers":{"predicate":"flags.2"},"comment":"Play Integrity API nonce"},{"name":"receipt","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"On iOS, must be compared with the receipt extracted from the received push notification."},{"name":"push_timeout","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"On iOS: if a push notification with the ios_push_secret isn't received within push_timeout seconds, the next_type authentication method must be used, with {@link auth.RawResendCodeRequest}."},{"name":"length","type":"int","comment":"Length of the code that will be delivered."}]},{"kind":"class","name":"auth.sentCodeTypeSmsWord","type":"auth.SentCodeType","id":2752949377,"comment":"The code was sent via SMS as a secret word, starting with the letter specified in beginning","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"beginning","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"If set, the secret word in the sent SMS (which may contain multiple words) starts with this letter."}]},{"kind":"class","name":"auth.sentCodeTypeSmsPhrase","type":"auth.SentCodeType","id":3010958511,"comment":"The code was sent via SMS as a secret phrase starting with the word specified in beginning","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"beginning","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"If set, the secret phrase (and the SMS) starts with this word."}]},{"kind":"class","name":"messages.botCallbackAnswer","type":"messages.BotCallbackAnswer","id":911761060,"comment":"Callback answer sent by the bot in response to a button press","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"alert","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether an alert should be shown to the user instead of a toast notification"},{"name":"has_url","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether an URL is present"},{"name":"native_ui","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"Whether to show games in WebView or in native UI."},{"name":"message","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Alert to show"},{"name":"url","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"URL to open"},{"name":"cache_time","type":"int","comment":"For how long should this answer be cached"}]},{"kind":"class","name":"messages.messageEditData","type":"messages.MessageEditData","id":649453030,"comment":"Message edit data for media","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"caption","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Media caption, if the specified media's caption can be edited"}]},{"kind":"class","name":"inputBotInlineMessageID","type":"InputBotInlineMessageID","id":2299280777,"comment":"Represents a sent inline message from the perspective of a bot (legacy constructor)","arguments":[{"name":"dc_id","type":"int","comment":"DC ID to use when working with this inline message"},{"name":"id","type":"long","comment":"ID of message, contains both the (32-bit, legacy) owner ID and the message ID, used only for Bot API backwards compatibility with 32-bit user ID."},{"name":"access_hash","type":"long","comment":"Access hash of message"}]},{"kind":"class","name":"inputBotInlineMessageID64","type":"InputBotInlineMessageID","id":3067680215,"comment":"Represents a sent inline message from the perspective of a bot","arguments":[{"name":"dc_id","type":"int","comment":"DC ID to use when working with this inline message"},{"name":"owner_id","type":"long","comment":"ID of the owner of this message"},{"name":"id","type":"int","comment":"ID of message"},{"name":"access_hash","type":"long","comment":"Access hash of message"}]},{"kind":"class","name":"inlineBotSwitchPM","type":"InlineBotSwitchPM","id":1008755359,"comment":"The bot requested the user to message them in private","arguments":[{"name":"text","type":"string","comment":"Text for the button that switches the user to a private chat with the bot and sends the bot a start message with the parameter start_parameter (can be empty)"},{"name":"start_param","type":"string","comment":"The parameter for the /start parameter"}]},{"kind":"class","name":"messages.peerDialogs","type":"messages.PeerDialogs","id":863093588,"comment":"Dialog info of multiple peers","arguments":[{"name":"dialogs","type":"Dialog","typeModifiers":{"isVector":true},"comment":"Dialog info"},{"name":"messages","type":"Message","typeModifiers":{"isVector":true},"comment":"Messages mentioned in dialog info"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Users"},{"name":"state","type":"updates.State","comment":"Current update state of dialog"}]},{"kind":"class","name":"topPeer","type":"TopPeer","id":3989684315,"comment":"Top peer","arguments":[{"name":"peer","type":"Peer","comment":"Peer"},{"name":"rating","type":"double","comment":"Rating as computed in top peer rating »"}]},{"kind":"class","name":"topPeerCategoryBotsPM","type":"TopPeerCategory","id":2875595611,"comment":"Most used bots","arguments":[]},{"kind":"class","name":"topPeerCategoryBotsInline","type":"TopPeerCategory","id":344356834,"comment":"Most used inline bots","arguments":[]},{"kind":"class","name":"topPeerCategoryCorrespondents","type":"TopPeerCategory","id":104314861,"comment":"Users we've chatted most frequently with","arguments":[]},{"kind":"class","name":"topPeerCategoryGroups","type":"TopPeerCategory","id":3172442442,"comment":"Often-opened groups and supergroups","arguments":[]},{"kind":"class","name":"topPeerCategoryChannels","type":"TopPeerCategory","id":371037736,"comment":"Most frequently visited channels","arguments":[]},{"kind":"class","name":"topPeerCategoryPhoneCalls","type":"TopPeerCategory","id":511092620,"comment":"Most frequently called users","arguments":[]},{"kind":"class","name":"topPeerCategoryForwardUsers","type":"TopPeerCategory","id":2822794409,"comment":"Users to which the users often forwards messages to","arguments":[]},{"kind":"class","name":"topPeerCategoryForwardChats","type":"TopPeerCategory","id":4226728176,"comment":"Chats to which the users often forwards messages to","arguments":[]},{"kind":"class","name":"topPeerCategoryBotsApp","type":"TopPeerCategory","id":4255022060,"comment":"Most frequently used Main Mini Bot Apps.","arguments":[]},{"kind":"class","name":"topPeerCategoryPeers","type":"TopPeerCategoryPeers","id":4219683473,"comment":"Top peer category","arguments":[{"name":"category","type":"TopPeerCategory","comment":"Top peer category of peers"},{"name":"count","type":"int","comment":"Count of peers"},{"name":"peers","type":"TopPeer","typeModifiers":{"isVector":true},"comment":"Peers"}]},{"kind":"class","name":"contacts.topPeersNotModified","type":"contacts.TopPeers","id":3727060725,"comment":"Top peer info hasn't changed","arguments":[]},{"kind":"class","name":"contacts.topPeers","type":"contacts.TopPeers","id":1891070632,"comment":"Top peers","arguments":[{"name":"categories","type":"TopPeerCategoryPeers","typeModifiers":{"isVector":true},"comment":"Top peers by top peer category"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Users"}]},{"kind":"class","name":"contacts.topPeersDisabled","type":"contacts.TopPeers","id":3039597469,"comment":"Top peers disabled","arguments":[]},{"kind":"class","name":"draftMessageEmpty","type":"DraftMessage","id":453805082,"comment":"Empty draft","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"date","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"When was the draft last updated"}]},{"kind":"class","name":"draftMessage","type":"DraftMessage","id":761606687,"comment":"Represents a message draft.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"no_webpage","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether no webpage preview will be generated"},{"name":"invert_media","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom."},{"name":"reply_to","type":"InputReplyTo","typeModifiers":{"predicate":"flags.4"},"comment":"If set, indicates that the message should be sent in reply to the specified message or story."},{"name":"message","type":"string","comment":"The draft"},{"name":"entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.3","isVector":true},"comment":"Message entities for styled text."},{"name":"media","type":"InputMedia","typeModifiers":{"predicate":"flags.5"},"comment":"Media."},{"name":"date","type":"int","comment":"Date of last update of the draft."},{"name":"effect","type":"long","typeModifiers":{"predicate":"flags.7"},"comment":"A message effect that should be played as specified here »."}]},{"kind":"class","name":"messages.featuredStickersNotModified","type":"messages.FeaturedStickers","id":3336309862,"comment":"Featured stickers haven't changed","arguments":[{"name":"count","type":"int","comment":"Total number of featured stickers"}]},{"kind":"class","name":"messages.featuredStickers","type":"messages.FeaturedStickers","id":3191351558,"comment":"Featured stickersets","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"premium","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether this is a premium stickerset"},{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here"},{"name":"count","type":"int","comment":"Total number of featured stickers"},{"name":"sets","type":"StickerSetCovered","typeModifiers":{"isVector":true},"comment":"Featured stickersets"},{"name":"unread","type":"long","typeModifiers":{"isVector":true},"comment":"IDs of new featured stickersets"}]},{"kind":"class","name":"messages.recentStickersNotModified","type":"messages.RecentStickers","id":186120336,"comment":"No new recent sticker was found","arguments":[]},{"kind":"class","name":"messages.recentStickers","type":"messages.RecentStickers","id":2295561302,"comment":"Recently used stickers","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here"},{"name":"packs","type":"StickerPack","typeModifiers":{"isVector":true},"comment":"Emojis associated to stickers"},{"name":"stickers","type":"Document","typeModifiers":{"isVector":true},"comment":"Recent stickers"},{"name":"dates","type":"int","typeModifiers":{"isVector":true},"comment":"When was each sticker last used"}]},{"kind":"class","name":"messages.archivedStickers","type":"messages.ArchivedStickers","id":1338747336,"comment":"Archived stickersets","arguments":[{"name":"count","type":"int","comment":"Number of archived stickers"},{"name":"sets","type":"StickerSetCovered","typeModifiers":{"isVector":true},"comment":"Archived stickersets"}]},{"kind":"class","name":"messages.stickerSetInstallResultSuccess","type":"messages.StickerSetInstallResult","id":946083368,"comment":"The stickerset was installed successfully","arguments":[]},{"kind":"class","name":"messages.stickerSetInstallResultArchive","type":"messages.StickerSetInstallResult","id":904138920,"comment":"The stickerset was installed, but since there are too many stickersets some were archived","arguments":[{"name":"sets","type":"StickerSetCovered","typeModifiers":{"isVector":true},"comment":"Archived stickersets"}]},{"kind":"class","name":"stickerSetCovered","type":"StickerSetCovered","id":1678812626,"comment":"Stickerset with a single sticker as preview","arguments":[{"name":"set","type":"StickerSet","comment":"Stickerset"},{"name":"cover","type":"Document","comment":"Preview"}]},{"kind":"class","name":"stickerSetMultiCovered","type":"StickerSetCovered","id":872932635,"comment":"Stickerset, with multiple stickers as preview","arguments":[{"name":"set","type":"StickerSet","comment":"Stickerset"},{"name":"covers","type":"Document","typeModifiers":{"isVector":true},"comment":"Preview stickers"}]},{"kind":"class","name":"stickerSetFullCovered","type":"StickerSetCovered","id":1087454222,"comment":"Stickerset preview with all stickers of the stickerset included.
\nCurrently used only for custom emoji stickersets, to avoid a further call to {@link messages.RawGetStickerSetRequest}.","arguments":[{"name":"set","type":"StickerSet","comment":"Stickerset"},{"name":"packs","type":"StickerPack","typeModifiers":{"isVector":true},"comment":"Emoji information about every sticker in the stickerset"},{"name":"keywords","type":"StickerKeyword","typeModifiers":{"isVector":true},"comment":"Keywords for some or every sticker in the stickerset."},{"name":"documents","type":"Document","typeModifiers":{"isVector":true},"comment":"Stickers"}]},{"kind":"class","name":"stickerSetNoCovered","type":"StickerSetCovered","id":2008112412,"comment":"Just the stickerset information, with no previews.","arguments":[{"name":"set","type":"StickerSet","comment":"Stickerset information."}]},{"kind":"class","name":"maskCoords","type":"MaskCoords","id":2933316530,"comment":"Position on a photo where a mask should be placed when attaching stickers to media »\n\nThe n position indicates where the mask should be placed:","arguments":[{"name":"n","type":"int","comment":"Part of the face, relative to which the mask should be placed"},{"name":"x","type":"double","comment":"Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position)"},{"name":"y","type":"double","comment":"Shift by Y-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just below the default mask position)"},{"name":"zoom","type":"double","comment":"Mask scaling coefficient. (For example, 2.0 means a doubled size)"}]},{"kind":"class","name":"inputStickeredMediaPhoto","type":"InputStickeredMedia","id":1251549527,"comment":"A photo with stickers attached","arguments":[{"name":"id","type":"InputPhoto","comment":"The photo"}]},{"kind":"class","name":"inputStickeredMediaDocument","type":"InputStickeredMedia","id":70813275,"comment":"A document with stickers attached","arguments":[{"name":"id","type":"InputDocument","comment":"The document"}]},{"kind":"class","name":"game","type":"Game","id":3187238203,"comment":"Indicates an already sent game","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"id","type":"long","comment":"ID of the game"},{"name":"access_hash","type":"long","comment":"Access hash of the game"},{"name":"short_name","type":"string","comment":"Short name for the game"},{"name":"title","type":"string","comment":"Title of the game"},{"name":"description","type":"string","comment":"Game description"},{"name":"photo","type":"Photo","comment":"Game preview"},{"name":"document","type":"Document","typeModifiers":{"predicate":"flags.0"},"comment":"Optional attached document"}]},{"kind":"class","name":"inputGameID","type":"InputGame","id":53231223,"comment":"Indicates an already sent game","arguments":[{"name":"id","type":"long","comment":"game ID from Game constructor"},{"name":"access_hash","type":"long","comment":"access hash from Game constructor"}]},{"kind":"class","name":"inputGameShortName","type":"InputGame","id":3274827786,"comment":"Game by short name","arguments":[{"name":"bot_id","type":"InputUser","comment":"The bot that provides the game"},{"name":"short_name","type":"string","comment":"The game's short name, usually obtained from a game link »"}]},{"kind":"class","name":"highScore","type":"HighScore","id":1940093419,"comment":"Game highscore","arguments":[{"name":"pos","type":"int","comment":"Position in highscore list"},{"name":"user_id","type":"int53","comment":"User ID"},{"name":"score","type":"int","comment":"Score"}]},{"kind":"class","name":"messages.highScores","type":"messages.HighScores","id":2587622809,"comment":"Highscores in a game","arguments":[{"name":"scores","type":"HighScore","typeModifiers":{"isVector":true},"comment":"Highscores"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Users, associated to the highscores"}]},{"kind":"class","name":"textEmpty","type":"RichText","id":3695018575,"comment":"Empty rich text element","arguments":[]},{"kind":"class","name":"textPlain","type":"RichText","id":1950782688,"comment":"Plain text","arguments":[{"name":"text","type":"string","comment":"Text"}]},{"kind":"class","name":"textBold","type":"RichText","id":1730456516,"comment":"Bold text","arguments":[{"name":"text","type":"RichText","comment":"Text"}]},{"kind":"class","name":"textItalic","type":"RichText","id":3641877916,"comment":"Italic text","arguments":[{"name":"text","type":"RichText","comment":"Text"}]},{"kind":"class","name":"textUnderline","type":"RichText","id":3240501956,"comment":"Underlined text","arguments":[{"name":"text","type":"RichText","comment":"Text"}]},{"kind":"class","name":"textStrike","type":"RichText","id":2616769429,"comment":"Strikethrough text","arguments":[{"name":"text","type":"RichText","comment":"Text"}]},{"kind":"class","name":"textFixed","type":"RichText","id":1816074681,"comment":"fixed-width rich text","arguments":[{"name":"text","type":"RichText","comment":"Text"}]},{"kind":"class","name":"textUrl","type":"RichText","id":1009288385,"comment":"Link","arguments":[{"name":"text","type":"RichText","comment":"Text of link"},{"name":"url","type":"string","comment":"Webpage HTTP URL"},{"name":"webpage_id","type":"long","comment":"If a preview was already generated for the page, the page ID"}]},{"kind":"class","name":"textEmail","type":"RichText","id":3730443734,"comment":"Rich text email link","arguments":[{"name":"text","type":"RichText","comment":"Link text"},{"name":"email","type":"string","comment":"Email address"}]},{"kind":"class","name":"textConcat","type":"RichText","id":2120376535,"comment":"Concatenation of rich texts","arguments":[{"name":"texts","type":"RichText","typeModifiers":{"isVector":true},"comment":"Concatenated rich texts"}]},{"kind":"class","name":"textSubscript","type":"RichText","id":3983181060,"comment":"Subscript text","arguments":[{"name":"text","type":"RichText","comment":"Text"}]},{"kind":"class","name":"textSuperscript","type":"RichText","id":3355139585,"comment":"Superscript text","arguments":[{"name":"text","type":"RichText","comment":"Text"}]},{"kind":"class","name":"textMarked","type":"RichText","id":55281185,"comment":"Highlighted text","arguments":[{"name":"text","type":"RichText","comment":"Text"}]},{"kind":"class","name":"textPhone","type":"RichText","id":483104362,"comment":"Rich text linked to a phone number","arguments":[{"name":"text","type":"RichText","comment":"Text"},{"name":"phone","type":"string","comment":"Phone number"}]},{"kind":"class","name":"textImage","type":"RichText","id":136105807,"comment":"Inline image","arguments":[{"name":"document_id","type":"long","comment":"Document ID"},{"name":"w","type":"int","comment":"Width"},{"name":"h","type":"int","comment":"Height"}]},{"kind":"class","name":"textAnchor","type":"RichText","id":894777186,"comment":"Text linking to another section of the page","arguments":[{"name":"text","type":"RichText","comment":"Text"},{"name":"name","type":"string","comment":"Section name"}]},{"kind":"class","name":"pageBlockUnsupported","type":"PageBlock","id":324435594,"comment":"Unsupported IV element","arguments":[]},{"kind":"class","name":"pageBlockTitle","type":"PageBlock","id":1890305021,"comment":"Title","arguments":[{"name":"text","type":"RichText","comment":"Title"}]},{"kind":"class","name":"pageBlockSubtitle","type":"PageBlock","id":2415565343,"comment":"Subtitle","arguments":[{"name":"text","type":"RichText","comment":"Text"}]},{"kind":"class","name":"pageBlockAuthorDate","type":"PageBlock","id":3132089824,"comment":"Author and date of creation of article","arguments":[{"name":"author","type":"RichText","comment":"Author name"},{"name":"published_date","type":"int","comment":"Date of publication"}]},{"kind":"class","name":"pageBlockHeader","type":"PageBlock","id":3218105580,"comment":"Page header","arguments":[{"name":"text","type":"RichText","comment":"Contents"}]},{"kind":"class","name":"pageBlockSubheader","type":"PageBlock","id":4046173921,"comment":"Subheader","arguments":[{"name":"text","type":"RichText","comment":"Subheader"}]},{"kind":"class","name":"pageBlockParagraph","type":"PageBlock","id":1182402406,"comment":"A paragraph","arguments":[{"name":"text","type":"RichText","comment":"Text"}]},{"kind":"class","name":"pageBlockPreformatted","type":"PageBlock","id":3228621118,"comment":"Preformatted (
 text)","arguments":[{"name":"text","type":"RichText","comment":"Text"},{"name":"language","type":"string","comment":"Programming language of preformatted text"}]},{"kind":"class","name":"pageBlockFooter","type":"PageBlock","id":1216809369,"comment":"Page footer","arguments":[{"name":"text","type":"RichText","comment":"Contents"}]},{"kind":"class","name":"pageBlockDivider","type":"PageBlock","id":3676352904,"comment":"An empty block separating a page","arguments":[]},{"kind":"class","name":"pageBlockAnchor","type":"PageBlock","id":3456972720,"comment":"Link to section within the page itself (like anchor)","arguments":[{"name":"name","type":"string","comment":"Name of target section"}]},{"kind":"class","name":"pageBlockList","type":"PageBlock","id":3840442385,"comment":"Unordered list of IV blocks","arguments":[{"name":"items","type":"PageListItem","typeModifiers":{"isVector":true},"comment":"List of blocks in an IV page"}]},{"kind":"class","name":"pageBlockBlockquote","type":"PageBlock","id":641563686,"comment":"Quote (equivalent to the HTML 
)","arguments":[{"name":"text","type":"RichText","comment":"Quote contents"},{"name":"caption","type":"RichText","comment":"Caption"}]},{"kind":"class","name":"pageBlockPullquote","type":"PageBlock","id":1329878739,"comment":"Pullquote","arguments":[{"name":"text","type":"RichText","comment":"Text"},{"name":"caption","type":"RichText","comment":"Caption"}]},{"kind":"class","name":"pageBlockPhoto","type":"PageBlock","id":391759200,"comment":"A photo","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"photo_id","type":"long","comment":"Photo ID"},{"name":"caption","type":"PageCaption","comment":"Caption"},{"name":"url","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"HTTP URL of page the photo leads to when clicked"},{"name":"webpage_id","type":"long","typeModifiers":{"predicate":"flags.0"},"comment":"ID of preview of the page the photo leads to when clicked"}]},{"kind":"class","name":"pageBlockVideo","type":"PageBlock","id":2089805750,"comment":"Video","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"autoplay","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the video is set to autoplay"},{"name":"loop","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the video is set to loop"},{"name":"video_id","type":"long","comment":"Video ID"},{"name":"caption","type":"PageCaption","comment":"Caption"}]},{"kind":"class","name":"pageBlockCover","type":"PageBlock","id":972174080,"comment":"A page cover","arguments":[{"name":"cover","type":"PageBlock","comment":"Cover"}]},{"kind":"class","name":"pageBlockEmbed","type":"PageBlock","id":2826014149,"comment":"An embedded webpage","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"full_width","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the block should be full width"},{"name":"allow_scrolling","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether scrolling should be allowed"},{"name":"url","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Web page URL, if available"},{"name":"html","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"HTML-markup of the embedded page"},{"name":"poster_photo_id","type":"long","typeModifiers":{"predicate":"flags.4"},"comment":"Poster photo, if available"},{"name":"w","type":"int","typeModifiers":{"predicate":"flags.5"},"comment":"Block width, if known"},{"name":"h","type":"int","typeModifiers":{"predicate":"flags.5"},"comment":"Block height, if known"},{"name":"caption","type":"PageCaption","comment":"Caption"}]},{"kind":"class","name":"pageBlockEmbedPost","type":"PageBlock","id":4065961995,"comment":"An embedded post","arguments":[{"name":"url","type":"string","comment":"Web page URL"},{"name":"webpage_id","type":"long","comment":"ID of generated webpage preview"},{"name":"author_photo_id","type":"long","comment":"ID of the author's photo"},{"name":"author","type":"string","comment":"Author name"},{"name":"date","type":"int","comment":"Creation date"},{"name":"blocks","type":"PageBlock","typeModifiers":{"isVector":true},"comment":"Post contents"},{"name":"caption","type":"PageCaption","comment":"Caption"}]},{"kind":"class","name":"pageBlockCollage","type":"PageBlock","id":1705048653,"comment":"Collage of media","arguments":[{"name":"items","type":"PageBlock","typeModifiers":{"isVector":true},"comment":"Media elements"},{"name":"caption","type":"PageCaption","comment":"Caption"}]},{"kind":"class","name":"pageBlockSlideshow","type":"PageBlock","id":52401552,"comment":"Slideshow","arguments":[{"name":"items","type":"PageBlock","typeModifiers":{"isVector":true},"comment":"Slideshow items"},{"name":"caption","type":"PageCaption","comment":"Caption"}]},{"kind":"class","name":"pageBlockChannel","type":"PageBlock","id":4011282869,"comment":"Reference to a telegram channel","arguments":[{"name":"channel","type":"Chat","comment":"The channel/supergroup/chat"}]},{"kind":"class","name":"pageBlockAudio","type":"PageBlock","id":2151899626,"comment":"Audio","arguments":[{"name":"audio_id","type":"long","comment":"Audio ID (to be fetched from the container {@link RawPage} constructor"},{"name":"caption","type":"PageCaption","comment":"Audio caption"}]},{"kind":"class","name":"pageBlockKicker","type":"PageBlock","id":504660880,"comment":"Kicker","arguments":[{"name":"text","type":"RichText","comment":"Contents"}]},{"kind":"class","name":"pageBlockTable","type":"PageBlock","id":3209554562,"comment":"Table","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"bordered","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Does the table have a visible border?"},{"name":"striped","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Is the table striped?"},{"name":"title","type":"RichText","comment":"Title"},{"name":"rows","type":"PageTableRow","typeModifiers":{"isVector":true},"comment":"Table rows"}]},{"kind":"class","name":"pageBlockOrderedList","type":"PageBlock","id":2592793057,"comment":"Ordered list of IV blocks","arguments":[{"name":"items","type":"PageListOrderedItem","typeModifiers":{"isVector":true},"comment":"List items"}]},{"kind":"class","name":"pageBlockDetails","type":"PageBlock","id":1987480557,"comment":"A collapsible details block","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"open","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the block is open by default"},{"name":"blocks","type":"PageBlock","typeModifiers":{"isVector":true},"comment":"Block contents"},{"name":"title","type":"RichText","comment":"Always visible heading for the block"}]},{"kind":"class","name":"pageBlockRelatedArticles","type":"PageBlock","id":370236054,"comment":"Related articles","arguments":[{"name":"title","type":"RichText","comment":"Title"},{"name":"articles","type":"PageRelatedArticle","typeModifiers":{"isVector":true},"comment":"Related articles"}]},{"kind":"class","name":"pageBlockMap","type":"PageBlock","id":2756656886,"comment":"A map","arguments":[{"name":"geo","type":"GeoPoint","comment":"Location of the map center"},{"name":"zoom","type":"int","comment":"Map zoom level; 13-20"},{"name":"w","type":"int","comment":"Map width in pixels before applying scale; 16-102"},{"name":"h","type":"int","comment":"Map height in pixels before applying scale; 16-1024"},{"name":"caption","type":"PageCaption","comment":"Caption"}]},{"kind":"class","name":"phoneCallDiscardReasonMissed","type":"PhoneCallDiscardReason","id":2246320897,"comment":"The phone call was missed","arguments":[]},{"kind":"class","name":"phoneCallDiscardReasonDisconnect","type":"PhoneCallDiscardReason","id":3767910816,"comment":"The phone call was disconnected","arguments":[]},{"kind":"class","name":"phoneCallDiscardReasonHangup","type":"PhoneCallDiscardReason","id":1471006352,"comment":"The phone call was ended normally","arguments":[]},{"kind":"class","name":"phoneCallDiscardReasonBusy","type":"PhoneCallDiscardReason","id":4210550985,"comment":"The phone call was discarded because the user is busy in another call","arguments":[]},{"kind":"class","name":"dataJSON","type":"DataJSON","id":2104790276,"comment":"Represents a json-encoded object","arguments":[{"name":"data","type":"string","comment":"JSON-encoded object"}]},{"kind":"class","name":"labeledPrice","type":"LabeledPrice","id":3408489464,"comment":"This object represents a portion of the price for goods or services.","arguments":[{"name":"label","type":"string","comment":"Portion label"},{"name":"amount","type":"long","comment":"Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."}]},{"kind":"class","name":"invoice","type":"Invoice","id":1572428309,"comment":"Invoice","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"test","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Test invoice"},{"name":"name_requested","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Set this flag if you require the user's full name to complete the order"},{"name":"phone_requested","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Set this flag if you require the user's phone number to complete the order"},{"name":"email_requested","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Set this flag if you require the user's email address to complete the order"},{"name":"shipping_address_requested","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"Set this flag if you require the user's shipping address to complete the order"},{"name":"flexible","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Set this flag if the final price depends on the shipping method"},{"name":"phone_to_provider","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"Set this flag if user's phone number should be sent to provider"},{"name":"email_to_provider","type":"true","typeModifiers":{"predicate":"flags.7"},"comment":"Set this flag if user's email address should be sent to provider"},{"name":"recurring","type":"true","typeModifiers":{"predicate":"flags.9"},"comment":"Whether this is a recurring payment"},{"name":"currency","type":"string","comment":"Three-letter ISO 4217 currency code, or XTR for Telegram Stars."},{"name":"prices","type":"LabeledPrice","typeModifiers":{"isVector":true},"comment":"Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)"},{"name":"max_tip_amount","type":"long","typeModifiers":{"predicate":"flags.8"},"comment":"The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."},{"name":"suggested_tip_amounts","type":"long","typeModifiers":{"predicate":"flags.8","isVector":true},"comment":"A vector of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount."},{"name":"terms_url","type":"string","typeModifiers":{"predicate":"flags.10"},"comment":"Terms of service URL"}]},{"kind":"class","name":"paymentCharge","type":"PaymentCharge","id":3926049406,"comment":"Payment identifier","arguments":[{"name":"id","type":"string","comment":"Telegram payment identifier"},{"name":"provider_charge_id","type":"string","comment":"Provider payment identifier"}]},{"kind":"class","name":"postAddress","type":"PostAddress","id":512535275,"comment":"Shipping address","arguments":[{"name":"street_line1","type":"string","comment":"First line for the address"},{"name":"street_line2","type":"string","comment":"Second line for the address"},{"name":"city","type":"string","comment":"City"},{"name":"state","type":"string","comment":"State, if applicable (empty otherwise)"},{"name":"country_iso2","type":"string","comment":"ISO 3166-1 alpha-2 country code"},{"name":"post_code","type":"string","comment":"Address post code"}]},{"kind":"class","name":"paymentRequestedInfo","type":"PaymentRequestedInfo","id":2426158996,"comment":"Order info provided by the user","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"name","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"User's full name"},{"name":"phone","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"User's phone number"},{"name":"email","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"User's email address"},{"name":"shipping_address","type":"PostAddress","typeModifiers":{"predicate":"flags.3"},"comment":"User's shipping address"}]},{"kind":"class","name":"paymentSavedCredentialsCard","type":"PaymentSavedCredentials","id":3452074527,"comment":"Saved credit card","arguments":[{"name":"id","type":"string","comment":"Card ID"},{"name":"title","type":"string","comment":"Title"}]},{"kind":"class","name":"webDocument","type":"WebDocument","id":475467473,"comment":"Remote document","arguments":[{"name":"url","type":"string","comment":"Document URL"},{"name":"access_hash","type":"long","comment":"Access hash"},{"name":"size","type":"int","comment":"File size"},{"name":"mime_type","type":"string","comment":"MIME type"},{"name":"attributes","type":"DocumentAttribute","typeModifiers":{"isVector":true},"comment":"Attributes for media types"}]},{"kind":"class","name":"webDocumentNoProxy","type":"WebDocument","id":4190682310,"comment":"Remote document that can be downloaded without proxying through telegram","arguments":[{"name":"url","type":"string","comment":"Document URL"},{"name":"size","type":"int","comment":"File size"},{"name":"mime_type","type":"string","comment":"MIME type"},{"name":"attributes","type":"DocumentAttribute","typeModifiers":{"isVector":true},"comment":"Attributes for media types"}]},{"kind":"class","name":"inputWebDocument","type":"InputWebDocument","id":2616017741,"comment":"The document","arguments":[{"name":"url","type":"string","comment":"Remote document URL to be downloaded using the appropriate method"},{"name":"size","type":"int","comment":"Remote file size"},{"name":"mime_type","type":"string","comment":"Mime type"},{"name":"attributes","type":"DocumentAttribute","typeModifiers":{"isVector":true},"comment":"Attributes for media types"}]},{"kind":"class","name":"inputWebFileLocation","type":"InputWebFileLocation","id":3258570374,"comment":"Location of a remote HTTP(s) file","arguments":[{"name":"url","type":"string","comment":"HTTP URL of file"},{"name":"access_hash","type":"long","comment":"Access hash"}]},{"kind":"class","name":"inputWebFileGeoPointLocation","type":"InputWebFileLocation","id":2669814217,"comment":"Used to download a server-generated image with the map preview from a {@link RawGeoPoint}, see the webfile docs for more info ».","arguments":[{"name":"geo_point","type":"InputGeoPoint","comment":"Generated from the lat, long and accuracy_radius parameters of the {@link RawGeoPoint}"},{"name":"access_hash","type":"long","comment":"Access hash of the {@link RawGeoPoint}"},{"name":"w","type":"int","comment":"Map width in pixels before applying scale; 16-1024"},{"name":"h","type":"int","comment":"Map height in pixels before applying scale; 16-1024"},{"name":"zoom","type":"int","comment":"Map zoom level; 13-20"},{"name":"scale","type":"int","comment":"Map scale; 1-3"}]},{"kind":"class","name":"inputWebFileAudioAlbumThumbLocation","type":"InputWebFileLocation","id":4100974884,"comment":"Used to download an album cover for any music file using {@link upload.RawGetWebFileRequest}, see the webfile docs for more info ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"small","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Used to return a thumbnail with 100x100 resolution (instead of the default 600x600)"},{"name":"document","type":"InputDocument","typeModifiers":{"predicate":"flags.0"},"comment":"The audio file in question: must NOT be provided in secret chats, provide the title and performer fields instead."},{"name":"title","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Song title: should only be used in secret chats, in normal chats provide document instead, as it has more lax rate limits."},{"name":"performer","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Song performer: should only be used in secret chats, in normal chats provide document instead, as it has more lax rate limits."}]},{"kind":"class","name":"upload.webFile","type":"upload.WebFile","id":568808380,"comment":"Represents a chunk of an HTTP webfile downloaded through telegram's secure MTProto servers","arguments":[{"name":"size","type":"int","comment":"File size"},{"name":"mime_type","type":"string","comment":"Mime type"},{"name":"file_type","type":"storage.FileType","comment":"File type"},{"name":"mtime","type":"int","comment":"Modified time"},{"name":"bytes","type":"bytes","comment":"Data"}]},{"kind":"class","name":"payments.paymentForm","type":"payments.PaymentForm","id":2684716881,"comment":"Payment form","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"can_save_credentials","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether the user can choose to save credentials."},{"name":"password_missing","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Indicates that the user can save payment credentials, but only after setting up a 2FA password (currently the account doesn't have a 2FA password)"},{"name":"form_id","type":"long","comment":"Form ID"},{"name":"bot_id","type":"int53","comment":"Bot ID"},{"name":"title","type":"string","comment":"Form title"},{"name":"description","type":"string","comment":"Description"},{"name":"photo","type":"WebDocument","typeModifiers":{"predicate":"flags.5"},"comment":"Product photo"},{"name":"invoice","type":"Invoice","comment":"Invoice"},{"name":"provider_id","type":"long","comment":"Payment provider ID."},{"name":"url","type":"string","comment":"Payment form URL"},{"name":"native_provider","type":"string","typeModifiers":{"predicate":"flags.4"},"comment":"Payment provider name.
One of the following:
- stripe"},{"name":"native_params","type":"DataJSON","typeModifiers":{"predicate":"flags.4"},"comment":"Contains information about the payment provider, if available, to support it natively without the need for opening the URL.
A JSON object that can contain the following fields:

- apple_pay_merchant_id: Apple Pay merchant ID
- google_pay_public_key: Google Pay public key
- need_country: True, if the user country must be provided,
- need_zip: True, if the user ZIP/postal code must be provided,
- need_cardholder_name: True, if the cardholder name must be provided
"},{"name":"additional_methods","type":"PaymentFormMethod","typeModifiers":{"predicate":"flags.6","isVector":true},"comment":"Additional payment methods"},{"name":"saved_info","type":"PaymentRequestedInfo","typeModifiers":{"predicate":"flags.0"},"comment":"Saved server-side order information"},{"name":"saved_credentials","type":"PaymentSavedCredentials","typeModifiers":{"predicate":"flags.1","isVector":true},"comment":"Contains information about saved card credentials"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Users"}]},{"kind":"class","name":"payments.paymentFormStars","type":"payments.PaymentForm","id":2079764828,"comment":"Represents a payment form, for payments to be using Telegram Stars, see here » for more info.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"form_id","type":"long","comment":"Form ID."},{"name":"bot_id","type":"int53","comment":"Bot ID."},{"name":"title","type":"string","comment":"Form title"},{"name":"description","type":"string","comment":"Description"},{"name":"photo","type":"WebDocument","typeModifiers":{"predicate":"flags.5"},"comment":"Product photo"},{"name":"invoice","type":"Invoice","comment":"Invoice"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Info about users mentioned in the other fields."}]},{"kind":"class","name":"payments.validatedRequestedInfo","type":"payments.ValidatedRequestedInfo","id":3510966403,"comment":"Validated user-provided info","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"id","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"ID"},{"name":"shipping_options","type":"ShippingOption","typeModifiers":{"predicate":"flags.1","isVector":true},"comment":"Shipping options"}]},{"kind":"class","name":"payments.paymentResult","type":"payments.PaymentResult","id":1314881805,"comment":"Payment result","arguments":[{"name":"updates","type":"Updates","comment":"Info about the payment"}]},{"kind":"class","name":"payments.paymentVerificationNeeded","type":"payments.PaymentResult","id":3628142905,"comment":"Payment was not successful, additional verification is needed","arguments":[{"name":"url","type":"string","comment":"URL for additional payment credentials verification"}]},{"kind":"class","name":"payments.paymentReceipt","type":"payments.PaymentReceipt","id":1891958275,"comment":"Receipt","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"date","type":"int","comment":"Date of generation"},{"name":"bot_id","type":"int53","comment":"Bot ID"},{"name":"provider_id","type":"long","comment":"Provider ID"},{"name":"title","type":"string","comment":"Title"},{"name":"description","type":"string","comment":"Description"},{"name":"photo","type":"WebDocument","typeModifiers":{"predicate":"flags.2"},"comment":"Photo"},{"name":"invoice","type":"Invoice","comment":"Invoice"},{"name":"info","type":"PaymentRequestedInfo","typeModifiers":{"predicate":"flags.0"},"comment":"Info"},{"name":"shipping","type":"ShippingOption","typeModifiers":{"predicate":"flags.1"},"comment":"Selected shipping option"},{"name":"tip_amount","type":"long","typeModifiers":{"predicate":"flags.3"},"comment":"Tipped amount"},{"name":"currency","type":"string","comment":"Three-letter ISO 4217 currency code"},{"name":"total_amount","type":"long","comment":"Total amount in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."},{"name":"credentials_title","type":"string","comment":"Payment credential name"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Users"}]},{"kind":"class","name":"payments.paymentReceiptStars","type":"payments.PaymentReceipt","id":3669751866,"comment":"Receipt for payment made using Telegram Stars.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"date","type":"int","comment":"Date of generation"},{"name":"bot_id","type":"int53","comment":"Bot ID"},{"name":"title","type":"string","comment":"Title"},{"name":"description","type":"string","comment":"Description"},{"name":"photo","type":"WebDocument","typeModifiers":{"predicate":"flags.2"},"comment":"Product photo"},{"name":"invoice","type":"Invoice","comment":"Invoice"},{"name":"currency","type":"string","comment":"Currency, always XTR."},{"name":"total_amount","type":"long","comment":"Amount of Telegram Stars."},{"name":"transaction_id","type":"string","comment":"Transaction ID"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Info about users mentioned in the other fields."}]},{"kind":"class","name":"payments.savedInfo","type":"payments.SavedInfo","id":4220511292,"comment":"Saved server-side order information","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"has_saved_credentials","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the user has some saved payment credentials"},{"name":"saved_info","type":"PaymentRequestedInfo","typeModifiers":{"predicate":"flags.0"},"comment":"Saved server-side order information"}]},{"kind":"class","name":"inputPaymentCredentialsSaved","type":"InputPaymentCredentials","id":3238965967,"comment":"Saved payment credentials","arguments":[{"name":"id","type":"string","comment":"Credential ID"},{"name":"tmp_password","type":"bytes","comment":"Temporary password"}]},{"kind":"class","name":"inputPaymentCredentials","type":"InputPaymentCredentials","id":873977640,"comment":"Payment credentials","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"save","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Save payment credential for future use"},{"name":"data","type":"DataJSON","comment":"Payment credentials"}]},{"kind":"class","name":"inputPaymentCredentialsApplePay","type":"InputPaymentCredentials","id":178373535,"comment":"Apple pay payment credentials","arguments":[{"name":"payment_data","type":"DataJSON","comment":"Payment data"}]},{"kind":"class","name":"inputPaymentCredentialsGooglePay","type":"InputPaymentCredentials","id":2328045569,"comment":"Google Pay payment credentials","arguments":[{"name":"payment_token","type":"DataJSON","comment":"Payment token"}]},{"kind":"class","name":"account.tmpPassword","type":"account.TmpPassword","id":3680828724,"comment":"Temporary payment password","arguments":[{"name":"tmp_password","type":"bytes","comment":"Temporary password"},{"name":"valid_until","type":"int","comment":"Validity period"}]},{"kind":"class","name":"shippingOption","type":"ShippingOption","id":3055631583,"comment":"Shipping option","arguments":[{"name":"id","type":"string","comment":"Option ID"},{"name":"title","type":"string","comment":"Title"},{"name":"prices","type":"LabeledPrice","typeModifiers":{"isVector":true},"comment":"List of price portions"}]},{"kind":"class","name":"inputStickerSetItem","type":"InputStickerSetItem","id":853188252,"comment":"Sticker in a stickerset","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"document","type":"InputDocument","comment":"The sticker"},{"name":"emoji","type":"string","comment":"Associated emoji"},{"name":"mask_coords","type":"MaskCoords","typeModifiers":{"predicate":"flags.0"},"comment":"Coordinates for mask sticker"},{"name":"keywords","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Set of keywords, separated by commas (can't be provided for mask stickers)"}]},{"kind":"class","name":"inputPhoneCall","type":"InputPhoneCall","id":506920429,"comment":"Phone call","arguments":[{"name":"id","type":"long","comment":"Call ID"},{"name":"access_hash","type":"long","comment":"Access hash"}]},{"kind":"class","name":"phoneCallEmpty","type":"PhoneCall","id":1399245077,"comment":"Empty constructor","arguments":[{"name":"id","type":"long","comment":"Call ID"}]},{"kind":"class","name":"phoneCallWaiting","type":"PhoneCall","id":3307368215,"comment":"Incoming phone call","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"video","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"Is this a video call"},{"name":"id","type":"long","comment":"Call ID"},{"name":"access_hash","type":"long","comment":"Access hash"},{"name":"date","type":"int","comment":"Date"},{"name":"admin_id","type":"int53","comment":"Admin ID"},{"name":"participant_id","type":"int53","comment":"Participant ID"},{"name":"protocol","type":"PhoneCallProtocol","comment":"Phone call protocol info"},{"name":"receive_date","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"When was the phone call received"}]},{"kind":"class","name":"phoneCallRequested","type":"PhoneCall","id":347139340,"comment":"Requested phone call","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"video","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"Whether this is a video call"},{"name":"id","type":"long","comment":"Phone call ID"},{"name":"access_hash","type":"long","comment":"Access hash"},{"name":"date","type":"int","comment":"When was the phone call created"},{"name":"admin_id","type":"int53","comment":"ID of the creator of the phone call"},{"name":"participant_id","type":"int53","comment":"ID of the other participant of the phone call"},{"name":"g_a_hash","type":"bytes","comment":"Parameter for key exchange"},{"name":"protocol","type":"PhoneCallProtocol","comment":"Call protocol info to be passed to libtgvoip"}]},{"kind":"class","name":"phoneCallAccepted","type":"PhoneCall","id":912311057,"comment":"An accepted phone call","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"video","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"Whether this is a video call"},{"name":"id","type":"long","comment":"ID of accepted phone call"},{"name":"access_hash","type":"long","comment":"Access hash of phone call"},{"name":"date","type":"int","comment":"When was the call accepted"},{"name":"admin_id","type":"int53","comment":"ID of the call creator"},{"name":"participant_id","type":"int53","comment":"ID of the other user in the call"},{"name":"g_b","type":"bytes","comment":"B parameter for secure E2E phone call key exchange"},{"name":"protocol","type":"PhoneCallProtocol","comment":"Protocol to use for phone call"}]},{"kind":"class","name":"phoneCall","type":"PhoneCall","id":810769141,"comment":"Phone call","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"p2p_allowed","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Whether P2P connection to the other peer is allowed"},{"name":"video","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"Whether this is a video call"},{"name":"id","type":"long","comment":"Call ID"},{"name":"access_hash","type":"long","comment":"Access hash"},{"name":"date","type":"int","comment":"Date of creation of the call"},{"name":"admin_id","type":"int53","comment":"User ID of the creator of the call"},{"name":"participant_id","type":"int53","comment":"User ID of the other participant in the call"},{"name":"g_a_or_b","type":"bytes","comment":"Parameter for key exchange"},{"name":"key_fingerprint","type":"long","comment":"Key fingerprint"},{"name":"protocol","type":"PhoneCallProtocol","comment":"Call protocol info to be passed to libtgvoip"},{"name":"connections","type":"PhoneConnection","typeModifiers":{"isVector":true},"comment":"List of endpoints the user can connect to exchange call data"},{"name":"start_date","type":"int","comment":"When was the call actually started"},{"name":"custom_parameters","type":"DataJSON","typeModifiers":{"predicate":"flags.7"},"comment":"Custom JSON-encoded call parameters to be passed to tgcalls."}]},{"kind":"class","name":"phoneCallDiscarded","type":"PhoneCall","id":1355435489,"comment":"Indicates a discarded phone call","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"need_rating","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether the server required the user to {@link phone.RawSetCallRatingRequest} the call"},{"name":"need_debug","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether the server required the client to {@link phone.RawSaveCallDebugRequest} the libtgvoip call debug data"},{"name":"video","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"Whether the call was a video call"},{"name":"id","type":"long","comment":"Call ID"},{"name":"reason","type":"PhoneCallDiscardReason","typeModifiers":{"predicate":"flags.0"},"comment":"Why was the phone call discarded"},{"name":"duration","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Duration of the phone call in seconds"}]},{"kind":"class","name":"phoneConnection","type":"PhoneConnection","id":2629903303,"comment":"Identifies an endpoint that can be used to connect to the other user in a phone call","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"tcp","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether TCP should be used"},{"name":"id","type":"long","comment":"Endpoint ID"},{"name":"ip","type":"string","comment":"IP address of endpoint"},{"name":"ipv6","type":"string","comment":"IPv6 address of endpoint"},{"name":"port","type":"int","comment":"Port ID"},{"name":"peer_tag","type":"bytes","comment":"Our peer tag"}]},{"kind":"class","name":"phoneConnectionWebrtc","type":"PhoneConnection","id":1667228533,"comment":"WebRTC connection parameters","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"turn","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether this is a TURN endpoint"},{"name":"stun","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether this is a STUN endpoint"},{"name":"id","type":"long","comment":"Endpoint ID"},{"name":"ip","type":"string","comment":"IP address"},{"name":"ipv6","type":"string","comment":"IPv6 address"},{"name":"port","type":"int","comment":"Port"},{"name":"username","type":"string","comment":"Username"},{"name":"password","type":"string","comment":"Password"}]},{"kind":"class","name":"phoneCallProtocol","type":"PhoneCallProtocol","id":4236742600,"comment":"Protocol info for libtgvoip","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"udp_p2p","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to allow P2P connection to the other participant"},{"name":"udp_reflector","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether to allow connection to the other participants through the reflector servers"},{"name":"min_layer","type":"int","comment":"Minimum layer for remote libtgvoip"},{"name":"max_layer","type":"int","comment":"Maximum layer for remote libtgvoip"},{"name":"library_versions","type":"string","typeModifiers":{"isVector":true},"comment":"When using {@link phone.RawRequestCallRequest} and {@link phone.RawAcceptCallRequest}, specify all library versions supported by the client.
The server will merge and choose the best library version supported by both peers, returning only the best value in the result of the callee's {@link phone.RawAcceptCallRequest} and in the {@link RawPhoneCallAccepted} update received by the caller."}]},{"kind":"class","name":"phone.phoneCall","type":"phone.PhoneCall","id":3968000320,"comment":"A VoIP phone call","arguments":[{"name":"phone_call","type":"PhoneCall","comment":"The VoIP phone call"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"VoIP phone call participants"}]},{"kind":"class","name":"upload.cdnFileReuploadNeeded","type":"upload.CdnFile","id":4004045934,"comment":"The file was cleared from the temporary RAM cache of the CDN and has to be re-uploaded.","arguments":[{"name":"request_token","type":"bytes","comment":"Request token (see CDN)"}]},{"kind":"class","name":"upload.cdnFile","type":"upload.CdnFile","id":2845821519,"comment":"Represent a chunk of a CDN file.","arguments":[{"name":"bytes","type":"bytes","comment":"The data"}]},{"kind":"class","name":"cdnPublicKey","type":"CdnPublicKey","id":3380800186,"comment":"Public key to use only during handshakes to CDN DCs.","arguments":[{"name":"dc_id","type":"int","comment":"CDN DC ID"},{"name":"public_key","type":"string","comment":"RSA public key"}]},{"kind":"class","name":"cdnConfig","type":"CdnConfig","id":1462101002,"comment":"Configuration for CDN file downloads.","arguments":[{"name":"public_keys","type":"CdnPublicKey","typeModifiers":{"isVector":true},"comment":"Vector of public keys to use only during handshakes to CDN DCs."}]},{"kind":"class","name":"langPackString","type":"LangPackString","id":3402727926,"comment":"Translated localization string","arguments":[{"name":"key","type":"string","comment":"Language key"},{"name":"value","type":"string","comment":"Value"}]},{"kind":"class","name":"langPackStringPluralized","type":"LangPackString","id":1816636575,"comment":"A language pack string which has different forms based on the number of some object it mentions. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"key","type":"string","comment":"Localization key"},{"name":"zero_value","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Value for zero objects"},{"name":"one_value","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Value for one object"},{"name":"two_value","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"Value for two objects"},{"name":"few_value","type":"string","typeModifiers":{"predicate":"flags.3"},"comment":"Value for a few objects"},{"name":"many_value","type":"string","typeModifiers":{"predicate":"flags.4"},"comment":"Value for many objects"},{"name":"other_value","type":"string","comment":"Default value"}]},{"kind":"class","name":"langPackStringDeleted","type":"LangPackString","id":695856818,"comment":"Deleted localization string","arguments":[{"name":"key","type":"string","comment":"Localization key"}]},{"kind":"class","name":"langPackDifference","type":"LangPackDifference","id":4085629430,"comment":"Changes to the app's localization pack","arguments":[{"name":"lang_code","type":"string","comment":"Language code"},{"name":"from_version","type":"int","comment":"Previous version number"},{"name":"version","type":"int","comment":"New version number"},{"name":"strings","type":"LangPackString","typeModifiers":{"isVector":true},"comment":"Localized strings"}]},{"kind":"class","name":"langPackLanguage","type":"LangPackLanguage","id":4006239459,"comment":"Identifies a localization pack","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"official","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the language pack is official"},{"name":"rtl","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Is this a localization pack for an RTL language"},{"name":"beta","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Is this a beta localization pack?"},{"name":"name","type":"string","comment":"Language name"},{"name":"native_name","type":"string","comment":"Language name in the language itself"},{"name":"lang_code","type":"string","comment":"Language code (pack identifier)"},{"name":"base_lang_code","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Identifier of a base language pack; may be empty. If a string is missed in the language pack, then it should be fetched from base language pack. Unsupported in custom language packs"},{"name":"plural_code","type":"string","comment":"A language code to be used to apply plural forms. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info"},{"name":"strings_count","type":"int","comment":"Total number of non-deleted strings from the language pack"},{"name":"translated_count","type":"int","comment":"Total number of translated strings from the language pack"},{"name":"translations_url","type":"string","comment":"Link to language translation interface; empty for custom local language packs"}]},{"kind":"class","name":"channelAdminLogEventActionChangeTitle","type":"ChannelAdminLogEventAction","id":3873421349,"comment":"Channel/supergroup title was changed","arguments":[{"name":"prev_value","type":"string","comment":"Previous title"},{"name":"new_value","type":"string","comment":"New title"}]},{"kind":"class","name":"channelAdminLogEventActionChangeAbout","type":"ChannelAdminLogEventAction","id":1427671598,"comment":"The description was changed","arguments":[{"name":"prev_value","type":"string","comment":"Previous description"},{"name":"new_value","type":"string","comment":"New description"}]},{"kind":"class","name":"channelAdminLogEventActionChangeUsername","type":"ChannelAdminLogEventAction","id":1783299128,"comment":"Channel/supergroup username was changed","arguments":[{"name":"prev_value","type":"string","comment":"Old username"},{"name":"new_value","type":"string","comment":"New username"}]},{"kind":"class","name":"channelAdminLogEventActionChangePhoto","type":"ChannelAdminLogEventAction","id":1129042607,"comment":"The channel/supergroup's picture was changed","arguments":[{"name":"prev_photo","type":"Photo","comment":"Previous picture"},{"name":"new_photo","type":"Photo","comment":"New picture"}]},{"kind":"class","name":"channelAdminLogEventActionToggleInvites","type":"ChannelAdminLogEventAction","id":460916654,"comment":"Invites were enabled/disabled","arguments":[{"name":"new_value","type":"Bool","comment":"New value"}]},{"kind":"class","name":"channelAdminLogEventActionToggleSignatures","type":"ChannelAdminLogEventAction","id":648939889,"comment":"Channel signatures were enabled/disabled","arguments":[{"name":"new_value","type":"Bool","comment":"New value"}]},{"kind":"class","name":"channelAdminLogEventActionUpdatePinned","type":"ChannelAdminLogEventAction","id":3924306968,"comment":"A message was pinned","arguments":[{"name":"message","type":"Message","comment":"The message that was pinned"}]},{"kind":"class","name":"channelAdminLogEventActionEditMessage","type":"ChannelAdminLogEventAction","id":1889215493,"comment":"A message was edited","arguments":[{"name":"prev_message","type":"Message","comment":"Old message"},{"name":"new_message","type":"Message","comment":"New message"}]},{"kind":"class","name":"channelAdminLogEventActionDeleteMessage","type":"ChannelAdminLogEventAction","id":1121994683,"comment":"A message was deleted","arguments":[{"name":"message","type":"Message","comment":"The message that was deleted"}]},{"kind":"class","name":"channelAdminLogEventActionParticipantJoin","type":"ChannelAdminLogEventAction","id":405815507,"comment":"A user has joined the group (in the case of big groups, info of the user that has joined isn't shown)","arguments":[]},{"kind":"class","name":"channelAdminLogEventActionParticipantLeave","type":"ChannelAdminLogEventAction","id":4170676210,"comment":"A user left the channel/supergroup (in the case of big groups, info of the user that has joined isn't shown)","arguments":[]},{"kind":"class","name":"channelAdminLogEventActionParticipantInvite","type":"ChannelAdminLogEventAction","id":3810276568,"comment":"A user was invited to the group","arguments":[{"name":"participant","type":"ChannelParticipant","comment":"The user that was invited"}]},{"kind":"class","name":"channelAdminLogEventActionParticipantToggleBan","type":"ChannelAdminLogEventAction","id":3872931198,"comment":"The banned rights of a user were changed","arguments":[{"name":"prev_participant","type":"ChannelParticipant","comment":"Old banned rights of user"},{"name":"new_participant","type":"ChannelParticipant","comment":"New banned rights of user"}]},{"kind":"class","name":"channelAdminLogEventActionParticipantToggleAdmin","type":"ChannelAdminLogEventAction","id":3580323600,"comment":"The admin rights of a user were changed","arguments":[{"name":"prev_participant","type":"ChannelParticipant","comment":"Previous admin rights"},{"name":"new_participant","type":"ChannelParticipant","comment":"New admin rights"}]},{"kind":"class","name":"channelAdminLogEventActionChangeStickerSet","type":"ChannelAdminLogEventAction","id":2982398631,"comment":"The supergroup's stickerset was changed","arguments":[{"name":"prev_stickerset","type":"InputStickerSet","comment":"Previous stickerset"},{"name":"new_stickerset","type":"InputStickerSet","comment":"New stickerset"}]},{"kind":"class","name":"channelAdminLogEventActionTogglePreHistoryHidden","type":"ChannelAdminLogEventAction","id":1599903217,"comment":"The hidden prehistory setting was {@link channels.RawTogglePreHistoryHiddenRequest}","arguments":[{"name":"new_value","type":"Bool","comment":"New value"}]},{"kind":"class","name":"channelAdminLogEventActionDefaultBannedRights","type":"ChannelAdminLogEventAction","id":771095562,"comment":"The default banned rights were modified","arguments":[{"name":"prev_banned_rights","type":"ChatBannedRights","comment":"Previous global banned rights"},{"name":"new_banned_rights","type":"ChatBannedRights","comment":"New global banned rights."}]},{"kind":"class","name":"channelAdminLogEventActionStopPoll","type":"ChannelAdminLogEventAction","id":2399639107,"comment":"A poll was stopped","arguments":[{"name":"message","type":"Message","comment":"The poll that was stopped"}]},{"kind":"class","name":"channelAdminLogEventActionChangeLinkedChat","type":"ChannelAdminLogEventAction","id":84703944,"comment":"The linked chat was changed","arguments":[{"name":"prev_value","type":"int53","comment":"Previous linked chat"},{"name":"new_value","type":"int53","comment":"New linked chat"}]},{"kind":"class","name":"channelAdminLogEventActionChangeLocation","type":"ChannelAdminLogEventAction","id":241923758,"comment":"The geo group location was changed","arguments":[{"name":"prev_value","type":"ChannelLocation","comment":"Previous location"},{"name":"new_value","type":"ChannelLocation","comment":"New location"}]},{"kind":"class","name":"channelAdminLogEventActionToggleSlowMode","type":"ChannelAdminLogEventAction","id":1401984889,"comment":"{@link channels.RawToggleSlowModeRequest}","arguments":[{"name":"prev_value","type":"int","comment":"Previous slow mode value"},{"name":"new_value","type":"int","comment":"New slow mode value"}]},{"kind":"class","name":"channelAdminLogEventActionStartGroupCall","type":"ChannelAdminLogEventAction","id":589338437,"comment":"A group call was started","arguments":[{"name":"call","type":"InputGroupCall","comment":"Group call"}]},{"kind":"class","name":"channelAdminLogEventActionDiscardGroupCall","type":"ChannelAdminLogEventAction","id":3684667712,"comment":"A group call was terminated","arguments":[{"name":"call","type":"InputGroupCall","comment":"The group call that was terminated"}]},{"kind":"class","name":"channelAdminLogEventActionParticipantMute","type":"ChannelAdminLogEventAction","id":4179895506,"comment":"A group call participant was muted","arguments":[{"name":"participant","type":"GroupCallParticipant","comment":"The participant that was muted"}]},{"kind":"class","name":"channelAdminLogEventActionParticipantUnmute","type":"ChannelAdminLogEventAction","id":3863226816,"comment":"A group call participant was unmuted","arguments":[{"name":"participant","type":"GroupCallParticipant","comment":"The participant that was unmuted"}]},{"kind":"class","name":"channelAdminLogEventActionToggleGroupCallSetting","type":"ChannelAdminLogEventAction","id":1456906823,"comment":"Group call settings were changed","arguments":[{"name":"join_muted","type":"Bool","comment":"Whether all users are muted by default upon joining"}]},{"kind":"class","name":"channelAdminLogEventActionParticipantJoinByInvite","type":"ChannelAdminLogEventAction","id":4271882584,"comment":"A user joined the supergroup/channel using a specific invite link","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"via_chatlist","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"The participant joined by importing a chat folder deep link »."},{"name":"invite","type":"ExportedChatInvite","comment":"The invite link used to join the supergroup/channel"}]},{"kind":"class","name":"channelAdminLogEventActionExportedInviteDelete","type":"ChannelAdminLogEventAction","id":1515256996,"comment":"A chat invite was deleted","arguments":[{"name":"invite","type":"ExportedChatInvite","comment":"The deleted chat invite"}]},{"kind":"class","name":"channelAdminLogEventActionExportedInviteRevoke","type":"ChannelAdminLogEventAction","id":1091179342,"comment":"A specific invite link was revoked","arguments":[{"name":"invite","type":"ExportedChatInvite","comment":"The invite link that was revoked"}]},{"kind":"class","name":"channelAdminLogEventActionExportedInviteEdit","type":"ChannelAdminLogEventAction","id":3910056793,"comment":"A chat invite was edited","arguments":[{"name":"prev_invite","type":"ExportedChatInvite","comment":"Previous chat invite information"},{"name":"new_invite","type":"ExportedChatInvite","comment":"New chat invite information"}]},{"kind":"class","name":"channelAdminLogEventActionParticipantVolume","type":"ChannelAdminLogEventAction","id":1048537159,"comment":"channelAdminLogEvent.user_id has set the volume of participant.peer to participant.volume","arguments":[{"name":"participant","type":"GroupCallParticipant","comment":"The participant whose volume was changed"}]},{"kind":"class","name":"channelAdminLogEventActionChangeHistoryTTL","type":"ChannelAdminLogEventAction","id":1855199800,"comment":"The Time-To-Live of messages in this chat was changed","arguments":[{"name":"prev_value","type":"int","comment":"Previous value"},{"name":"new_value","type":"int","comment":"New value"}]},{"kind":"class","name":"channelAdminLogEventActionParticipantJoinByRequest","type":"ChannelAdminLogEventAction","id":2947945546,"comment":"A new member was accepted to the chat by an admin","arguments":[{"name":"invite","type":"ExportedChatInvite","comment":"The invite link that was used to join the chat"},{"name":"approved_by","type":"int53","comment":"ID of the admin that approved the invite"}]},{"kind":"class","name":"channelAdminLogEventActionToggleNoForwards","type":"ChannelAdminLogEventAction","id":3408578406,"comment":"Forwards were enabled or disabled","arguments":[{"name":"new_value","type":"Bool","comment":"Old value"}]},{"kind":"class","name":"channelAdminLogEventActionSendMessage","type":"ChannelAdminLogEventAction","id":663693416,"comment":"A message was posted in a channel","arguments":[{"name":"message","type":"Message","comment":"The message that was sent"}]},{"kind":"class","name":"channelAdminLogEventActionChangeAvailableReactions","type":"ChannelAdminLogEventAction","id":3192786680,"comment":"The set of allowed message reactions » for this channel has changed","arguments":[{"name":"prev_value","type":"ChatReactions","comment":"Previously allowed reaction emojis"},{"name":"new_value","type":"ChatReactions","comment":"New allowed reaction emojis"}]},{"kind":"class","name":"channelAdminLogEventActionChangeUsernames","type":"ChannelAdminLogEventAction","id":4031755177,"comment":"The list of usernames associated with the channel was changed","arguments":[{"name":"prev_value","type":"string","typeModifiers":{"isVector":true},"comment":"Previous set of usernames"},{"name":"new_value","type":"string","typeModifiers":{"isVector":true},"comment":"New set of usernames"}]},{"kind":"class","name":"channelAdminLogEventActionToggleForum","type":"ChannelAdminLogEventAction","id":46949251,"comment":"Forum functionality was enabled or disabled.","arguments":[{"name":"new_value","type":"Bool","comment":"Whether forum functionality was enabled or disabled."}]},{"kind":"class","name":"channelAdminLogEventActionCreateTopic","type":"ChannelAdminLogEventAction","id":1483767080,"comment":"A forum topic was created","arguments":[{"name":"topic","type":"ForumTopic","comment":"The forum topic that was created"}]},{"kind":"class","name":"channelAdminLogEventActionEditTopic","type":"ChannelAdminLogEventAction","id":4033864200,"comment":"A forum topic was edited","arguments":[{"name":"prev_topic","type":"ForumTopic","comment":"Previous topic information"},{"name":"new_topic","type":"ForumTopic","comment":"New topic information"}]},{"kind":"class","name":"channelAdminLogEventActionDeleteTopic","type":"ChannelAdminLogEventAction","id":2920712457,"comment":"A forum topic was deleted","arguments":[{"name":"topic","type":"ForumTopic","comment":"The forum topic that was deleted"}]},{"kind":"class","name":"channelAdminLogEventActionPinTopic","type":"ChannelAdminLogEventAction","id":1569535291,"comment":"A forum topic was pinned or unpinned","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"prev_topic","type":"ForumTopic","typeModifiers":{"predicate":"flags.0"},"comment":"Previous topic information"},{"name":"new_topic","type":"ForumTopic","typeModifiers":{"predicate":"flags.1"},"comment":"New topic information"}]},{"kind":"class","name":"channelAdminLogEventActionToggleAntiSpam","type":"ChannelAdminLogEventAction","id":1693675004,"comment":"Native antispam functionality was enabled or disabled.","arguments":[{"name":"new_value","type":"Bool","comment":"Whether antispam functionality was enabled or disabled."}]},{"kind":"class","name":"channelAdminLogEventActionChangePeerColor","type":"ChannelAdminLogEventAction","id":1469507456,"comment":"The message accent color was changed","arguments":[{"name":"prev_value","type":"PeerColor","comment":"Previous accent palette"},{"name":"new_value","type":"PeerColor","comment":"New accent palette"}]},{"kind":"class","name":"channelAdminLogEventActionChangeProfilePeerColor","type":"ChannelAdminLogEventAction","id":1581742885,"comment":"The profile accent color was changed","arguments":[{"name":"prev_value","type":"PeerColor","comment":"Previous accent palette"},{"name":"new_value","type":"PeerColor","comment":"New accent palette"}]},{"kind":"class","name":"channelAdminLogEventActionChangeWallpaper","type":"ChannelAdminLogEventAction","id":834362706,"comment":"The wallpaper was changed","arguments":[{"name":"prev_value","type":"WallPaper","comment":"Previous wallpaper"},{"name":"new_value","type":"WallPaper","comment":"New wallpaper"}]},{"kind":"class","name":"channelAdminLogEventActionChangeEmojiStatus","type":"ChannelAdminLogEventAction","id":1051328177,"comment":"The emoji status was changed","arguments":[{"name":"prev_value","type":"EmojiStatus","comment":"Previous emoji status"},{"name":"new_value","type":"EmojiStatus","comment":"New emoji status"}]},{"kind":"class","name":"channelAdminLogEventActionChangeEmojiStickerSet","type":"ChannelAdminLogEventAction","id":1188577451,"comment":"The supergroup's custom emoji stickerset was changed.","arguments":[{"name":"prev_stickerset","type":"InputStickerSet","comment":"Old value"},{"name":"new_stickerset","type":"InputStickerSet","comment":"New value"}]},{"kind":"class","name":"channelAdminLogEvent","type":"ChannelAdminLogEvent","id":531458253,"comment":"Admin log event","arguments":[{"name":"id","type":"long","comment":"Event ID"},{"name":"date","type":"int","comment":"Date"},{"name":"user_id","type":"int53","comment":"User ID"},{"name":"action","type":"ChannelAdminLogEventAction","comment":"Action"}]},{"kind":"class","name":"channels.adminLogResults","type":"channels.AdminLogResults","id":3985307469,"comment":"Admin log events","arguments":[{"name":"events","type":"ChannelAdminLogEvent","typeModifiers":{"isVector":true},"comment":"Admin log events"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Chats mentioned in events"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Users mentioned in events"}]},{"kind":"class","name":"channelAdminLogEventsFilter","type":"ChannelAdminLogEventsFilter","id":3926948580,"comment":"Filter only certain admin log events","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"join","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"{@link RawChannelAdminLogEventActionParticipantJoin}, including {@link RawChannelAdminLogEventActionParticipantJoinByInvite} and {@link RawChannelAdminLogEventActionParticipantJoinByRequest}."},{"name":"leave","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"{@link RawChannelAdminLogEventActionParticipantLeave}"},{"name":"invite","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"{@link RawChannelAdminLogEventActionParticipantInvite}"},{"name":"ban","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"{@link RawChannelAdminLogEventActionParticipantToggleBan}"},{"name":"unban","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"{@link RawChannelAdminLogEventActionParticipantToggleBan}"},{"name":"kick","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"{@link RawChannelAdminLogEventActionParticipantToggleBan}"},{"name":"unkick","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"{@link RawChannelAdminLogEventActionParticipantToggleBan}"},{"name":"promote","type":"true","typeModifiers":{"predicate":"flags.7"},"comment":"{@link RawChannelAdminLogEventActionParticipantToggleAdmin}"},{"name":"demote","type":"true","typeModifiers":{"predicate":"flags.8"},"comment":"{@link RawChannelAdminLogEventActionParticipantToggleAdmin}"},{"name":"info","type":"true","typeModifiers":{"predicate":"flags.9"},"comment":"Info change events (when {@link RawChannelAdminLogEventActionChangeAbout}, {@link RawChannelAdminLogEventActionChangeLinkedChat}, {@link RawChannelAdminLogEventActionChangeLocation}, {@link RawChannelAdminLogEventActionChangePhoto}, {@link RawChannelAdminLogEventActionChangeStickerSet}, {@link RawChannelAdminLogEventActionChangeTitle} or {@link RawChannelAdminLogEventActionChangeUsername}, {@link RawChannelAdminLogEventActionToggleSlowMode}, {@link RawChannelAdminLogEventActionChangeHistoryTTL} settings of a channel gets modified)"},{"name":"settings","type":"true","typeModifiers":{"predicate":"flags.10"},"comment":"Settings change events ({@link RawChannelAdminLogEventActionToggleInvites}, {@link RawChannelAdminLogEventActionTogglePreHistoryHidden}, {@link RawChannelAdminLogEventActionToggleSignatures}, {@link RawChannelAdminLogEventActionDefaultBannedRights}, {@link RawChannelAdminLogEventActionToggleForum})"},{"name":"pinned","type":"true","typeModifiers":{"predicate":"flags.11"},"comment":"{@link RawChannelAdminLogEventActionUpdatePinned}"},{"name":"edit","type":"true","typeModifiers":{"predicate":"flags.12"},"comment":"{@link RawChannelAdminLogEventActionEditMessage}"},{"name":"delete","type":"true","typeModifiers":{"predicate":"flags.13"},"comment":"{@link RawChannelAdminLogEventActionDeleteMessage}"},{"name":"group_call","type":"true","typeModifiers":{"predicate":"flags.14"},"comment":"Group call events"},{"name":"invites","type":"true","typeModifiers":{"predicate":"flags.15"},"comment":"Invite events"},{"name":"send","type":"true","typeModifiers":{"predicate":"flags.16"},"comment":"A message was posted in a channel"},{"name":"forums","type":"true","typeModifiers":{"predicate":"flags.17"},"comment":"Forum-related events"}]},{"kind":"class","name":"popularContact","type":"PopularContact","id":1558266229,"comment":"Popular contact","arguments":[{"name":"client_id","type":"long","comment":"Contact identifier"},{"name":"importers","type":"int","comment":"How many people imported this contact"}]},{"kind":"class","name":"messages.favedStickersNotModified","type":"messages.FavedStickers","id":2660214483,"comment":"No new favorited stickers were found","arguments":[]},{"kind":"class","name":"messages.favedStickers","type":"messages.FavedStickers","id":750063767,"comment":"Favorited stickers","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here"},{"name":"packs","type":"StickerPack","typeModifiers":{"isVector":true},"comment":"Emojis associated to stickers"},{"name":"stickers","type":"Document","typeModifiers":{"isVector":true},"comment":"Favorited stickers"}]},{"kind":"class","name":"recentMeUrlUnknown","type":"RecentMeUrl","id":1189204285,"comment":"Unknown t.me url","arguments":[{"name":"url","type":"string","comment":"URL"}]},{"kind":"class","name":"recentMeUrlUser","type":"RecentMeUrl","id":3106671074,"comment":"Recent t.me link to a user","arguments":[{"name":"url","type":"string","comment":"URL"},{"name":"user_id","type":"int53","comment":"User ID"}]},{"kind":"class","name":"recentMeUrlChat","type":"RecentMeUrl","id":3000660434,"comment":"Recent t.me link to a chat","arguments":[{"name":"url","type":"string","comment":"t.me URL"},{"name":"chat_id","type":"int53","comment":"Chat ID"}]},{"kind":"class","name":"recentMeUrlChatInvite","type":"RecentMeUrl","id":3947431965,"comment":"Recent t.me invite link to a chat","arguments":[{"name":"url","type":"string","comment":"t.me URL"},{"name":"chat_invite","type":"ChatInvite","comment":"Chat invitation"}]},{"kind":"class","name":"recentMeUrlStickerSet","type":"RecentMeUrl","id":3154794460,"comment":"Recent t.me stickerset installation URL","arguments":[{"name":"url","type":"string","comment":"t.me URL"},{"name":"set","type":"StickerSetCovered","comment":"Stickerset"}]},{"kind":"class","name":"help.recentMeUrls","type":"help.RecentMeUrls","id":235081943,"comment":"Recent t.me URLs","arguments":[{"name":"urls","type":"RecentMeUrl","typeModifiers":{"isVector":true},"comment":"URLs"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Users"}]},{"kind":"class","name":"inputSingleMedia","type":"InputSingleMedia","id":482797855,"comment":"A single media in an album or grouped media sent with {@link messages.RawSendMultiMediaRequest}.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"media","type":"InputMedia","comment":"The media"},{"name":"random_id","type":"long","comment":"Unique client media ID required to prevent message resending"},{"name":"message","type":"string","comment":"A caption for the media"},{"name":"entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.0","isVector":true},"comment":"Message entities for styled text"}]},{"kind":"class","name":"webAuthorization","type":"WebAuthorization","id":2801333330,"comment":"Represents a bot logged in using the Telegram login widget","arguments":[{"name":"hash","type":"long","comment":"Authorization hash"},{"name":"bot_id","type":"int53","comment":"Bot ID"},{"name":"domain","type":"string","comment":"The domain name of the website on which the user has logged in."},{"name":"browser","type":"string","comment":"Browser user-agent"},{"name":"platform","type":"string","comment":"Platform"},{"name":"date_created","type":"int","comment":"When was the web session created"},{"name":"date_active","type":"int","comment":"When was the web session last active"},{"name":"ip","type":"string","comment":"IP address"},{"name":"region","type":"string","comment":"Region, determined from IP address"}]},{"kind":"class","name":"account.webAuthorizations","type":"account.WebAuthorizations","id":3981887996,"comment":"Web authorizations","arguments":[{"name":"authorizations","type":"WebAuthorization","typeModifiers":{"isVector":true},"comment":"Web authorization list"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Users"}]},{"kind":"class","name":"inputMessageID","type":"InputMessage","id":2792792866,"comment":"Message by ID","arguments":[{"name":"id","type":"int","comment":"Message ID"}]},{"kind":"class","name":"inputMessageReplyTo","type":"InputMessage","id":3134751637,"comment":"Message to which the specified message replies to","arguments":[{"name":"id","type":"int","comment":"ID of the message that replies to the message we need"}]},{"kind":"class","name":"inputMessagePinned","type":"InputMessage","id":2257003832,"comment":"Pinned message","arguments":[]},{"kind":"class","name":"inputMessageCallbackQuery","type":"InputMessage","id":2902071934,"comment":"Used by bots for fetching information about the message that originated a callback query","arguments":[{"name":"id","type":"int","comment":"Message ID"},{"name":"query_id","type":"long","comment":"Callback query ID"}]},{"kind":"class","name":"inputDialogPeer","type":"InputDialogPeer","id":4239064759,"comment":"A peer","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer"}]},{"kind":"class","name":"inputDialogPeerFolder","type":"InputDialogPeer","id":1684014375,"comment":"All peers in a peer folder","arguments":[{"name":"folder_id","type":"int","comment":"Peer folder ID, for more info click here"}]},{"kind":"class","name":"dialogPeer","type":"DialogPeer","id":3849174789,"comment":"Peer","arguments":[{"name":"peer","type":"Peer","comment":"Peer"}]},{"kind":"class","name":"dialogPeerFolder","type":"DialogPeer","id":1363483106,"comment":"Peer folder","arguments":[{"name":"folder_id","type":"int","comment":"Peer folder ID, for more info click here"}]},{"kind":"class","name":"messages.foundStickerSetsNotModified","type":"messages.FoundStickerSets","id":223655517,"comment":"No further results were found","arguments":[]},{"kind":"class","name":"messages.foundStickerSets","type":"messages.FoundStickerSets","id":2331024850,"comment":"Found stickersets","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here"},{"name":"sets","type":"StickerSetCovered","typeModifiers":{"isVector":true},"comment":"Found stickersets"}]},{"kind":"class","name":"fileHash","type":"FileHash","id":4087022428,"comment":"SHA256 Hash of an uploaded file, to be checked for validity after download","arguments":[{"name":"offset","type":"int53","comment":"Offset from where to start computing SHA-256 hash"},{"name":"limit","type":"int","comment":"Length"},{"name":"hash","type":"bytes","comment":"SHA-256 Hash of file chunk, to be checked for validity after download"}]},{"kind":"class","name":"inputClientProxy","type":"InputClientProxy","id":1968737087,"comment":"Info about an MTProxy used to connect.","arguments":[{"name":"address","type":"string","comment":"Proxy address"},{"name":"port","type":"int","comment":"Proxy port"}]},{"kind":"class","name":"help.termsOfServiceUpdateEmpty","type":"help.TermsOfServiceUpdate","id":3811614591,"comment":"No changes were made to telegram's terms of service","arguments":[{"name":"expires","type":"int","comment":"New TOS updates will have to be queried using {@link help.RawGetTermsOfServiceUpdateRequest} in expires seconds"}]},{"kind":"class","name":"help.termsOfServiceUpdate","type":"help.TermsOfServiceUpdate","id":686618977,"comment":"Info about an update of telegram's terms of service. If the terms of service are declined, then the {@link account.RawDeleteAccountRequest} method should be called with the reason \"Decline ToS update\"","arguments":[{"name":"expires","type":"int","comment":"New TOS updates will have to be queried using {@link help.RawGetTermsOfServiceUpdateRequest} in expires seconds"},{"name":"terms_of_service","type":"help.TermsOfService","comment":"New terms of service"}]},{"kind":"class","name":"inputSecureFileUploaded","type":"InputSecureFile","id":859091184,"comment":"Uploaded secure file, for more info see the passport docs »","arguments":[{"name":"id","type":"long","comment":"Secure file ID"},{"name":"parts","type":"int","comment":"Secure file part count"},{"name":"md5_checksum","type":"string","comment":"MD5 hash of encrypted uploaded file, to be checked server-side"},{"name":"file_hash","type":"bytes","comment":"File hash"},{"name":"secret","type":"bytes","comment":"Secret"}]},{"kind":"class","name":"inputSecureFile","type":"InputSecureFile","id":1399317950,"comment":"Pre-uploaded passport file, for more info see the passport docs »","arguments":[{"name":"id","type":"long","comment":"Secure file ID"},{"name":"access_hash","type":"long","comment":"Secure file access hash"}]},{"kind":"class","name":"secureFileEmpty","type":"SecureFile","id":1679398724,"comment":"Empty constructor","arguments":[]},{"kind":"class","name":"secureFile","type":"SecureFile","id":2097791614,"comment":"Secure passport file, for more info see the passport docs »","arguments":[{"name":"id","type":"long","comment":"ID"},{"name":"access_hash","type":"long","comment":"Access hash"},{"name":"size","type":"int53","comment":"File size"},{"name":"dc_id","type":"int","comment":"DC ID"},{"name":"date","type":"int","comment":"Date of upload"},{"name":"file_hash","type":"bytes","comment":"File hash"},{"name":"secret","type":"bytes","comment":"Secret"}]},{"kind":"class","name":"secureData","type":"SecureData","id":2330640067,"comment":"Secure passport data, for more info see the passport docs »","arguments":[{"name":"data","type":"bytes","comment":"Data"},{"name":"data_hash","type":"bytes","comment":"Data hash"},{"name":"secret","type":"bytes","comment":"Secret"}]},{"kind":"class","name":"securePlainPhone","type":"SecurePlainData","id":2103482845,"comment":"Phone number to use in telegram passport: it must be verified, first ».","arguments":[{"name":"phone","type":"string","comment":"Phone number"}]},{"kind":"class","name":"securePlainEmail","type":"SecurePlainData","id":569137759,"comment":"Email address to use in telegram passport: it must be verified, first ».","arguments":[{"name":"email","type":"string","comment":"Email address"}]},{"kind":"class","name":"secureValueTypePersonalDetails","type":"SecureValueType","id":2636808675,"comment":"Personal details","arguments":[]},{"kind":"class","name":"secureValueTypePassport","type":"SecureValueType","id":1034709504,"comment":"Passport","arguments":[]},{"kind":"class","name":"secureValueTypeDriverLicense","type":"SecureValueType","id":115615172,"comment":"Driver's license","arguments":[]},{"kind":"class","name":"secureValueTypeIdentityCard","type":"SecureValueType","id":2698015819,"comment":"Identity card","arguments":[]},{"kind":"class","name":"secureValueTypeInternalPassport","type":"SecureValueType","id":2577698595,"comment":"Internal passport","arguments":[]},{"kind":"class","name":"secureValueTypeAddress","type":"SecureValueType","id":3420659238,"comment":"Address","arguments":[]},{"kind":"class","name":"secureValueTypeUtilityBill","type":"SecureValueType","id":4231435598,"comment":"Utility bill","arguments":[]},{"kind":"class","name":"secureValueTypeBankStatement","type":"SecureValueType","id":2299755533,"comment":"Bank statement","arguments":[]},{"kind":"class","name":"secureValueTypeRentalAgreement","type":"SecureValueType","id":2340959368,"comment":"Rental agreement","arguments":[]},{"kind":"class","name":"secureValueTypePassportRegistration","type":"SecureValueType","id":2581823594,"comment":"Internal registration passport","arguments":[]},{"kind":"class","name":"secureValueTypeTemporaryRegistration","type":"SecureValueType","id":3926060083,"comment":"Temporary registration","arguments":[]},{"kind":"class","name":"secureValueTypePhone","type":"SecureValueType","id":3005262555,"comment":"Phone","arguments":[]},{"kind":"class","name":"secureValueTypeEmail","type":"SecureValueType","id":2386339822,"comment":"Email","arguments":[]},{"kind":"class","name":"secureValue","type":"SecureValue","id":411017418,"comment":"Secure value","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"type","type":"SecureValueType","comment":"Secure passport value type"},{"name":"data","type":"SecureData","typeModifiers":{"predicate":"flags.0"},"comment":"Encrypted Telegram Passport element data"},{"name":"front_side","type":"SecureFile","typeModifiers":{"predicate":"flags.1"},"comment":"Encrypted passport file with the front side of the document"},{"name":"reverse_side","type":"SecureFile","typeModifiers":{"predicate":"flags.2"},"comment":"Encrypted passport file with the reverse side of the document"},{"name":"selfie","type":"SecureFile","typeModifiers":{"predicate":"flags.3"},"comment":"Encrypted passport file with a selfie of the user holding the document"},{"name":"translation","type":"SecureFile","typeModifiers":{"predicate":"flags.6","isVector":true},"comment":"Array of encrypted passport files with translated versions of the provided documents"},{"name":"files","type":"SecureFile","typeModifiers":{"predicate":"flags.4","isVector":true},"comment":"Array of encrypted passport files with photos the of the documents"},{"name":"plain_data","type":"SecurePlainData","typeModifiers":{"predicate":"flags.5"},"comment":"Plaintext verified passport data"},{"name":"hash","type":"bytes","comment":"Data hash"}]},{"kind":"class","name":"inputSecureValue","type":"InputSecureValue","id":3676426407,"comment":"Secure value, for more info see the passport docs »","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"type","type":"SecureValueType","comment":"Secure passport value type"},{"name":"data","type":"SecureData","typeModifiers":{"predicate":"flags.0"},"comment":"Encrypted Telegram Passport element data"},{"name":"front_side","type":"InputSecureFile","typeModifiers":{"predicate":"flags.1"},"comment":"Encrypted passport file with the front side of the document"},{"name":"reverse_side","type":"InputSecureFile","typeModifiers":{"predicate":"flags.2"},"comment":"Encrypted passport file with the reverse side of the document"},{"name":"selfie","type":"InputSecureFile","typeModifiers":{"predicate":"flags.3"},"comment":"Encrypted passport file with a selfie of the user holding the document"},{"name":"translation","type":"InputSecureFile","typeModifiers":{"predicate":"flags.6","isVector":true},"comment":"Array of encrypted passport files with translated versions of the provided documents"},{"name":"files","type":"InputSecureFile","typeModifiers":{"predicate":"flags.4","isVector":true},"comment":"Array of encrypted passport files with photos the of the documents"},{"name":"plain_data","type":"SecurePlainData","typeModifiers":{"predicate":"flags.5"},"comment":"Plaintext verified passport data"}]},{"kind":"class","name":"secureValueHash","type":"SecureValueHash","id":3978218928,"comment":"Secure value hash","arguments":[{"name":"type","type":"SecureValueType","comment":"Secure value type"},{"name":"hash","type":"bytes","comment":"Hash"}]},{"kind":"class","name":"secureValueErrorData","type":"SecureValueError","id":3903065049,"comment":"Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.","arguments":[{"name":"type","type":"SecureValueType","comment":"The section of the user's Telegram Passport which has the error, one of {@link RawSecureValueTypePersonalDetails}, {@link RawSecureValueTypePassport}, {@link RawSecureValueTypeDriverLicense}, {@link RawSecureValueTypeIdentityCard}, {@link RawSecureValueTypeInternalPassport}, {@link RawSecureValueTypeAddress}"},{"name":"data_hash","type":"bytes","comment":"Data hash"},{"name":"field","type":"string","comment":"Name of the data field which has the error"},{"name":"text","type":"string","comment":"Error message"}]},{"kind":"class","name":"secureValueErrorFrontSide","type":"SecureValueError","id":12467706,"comment":"Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.","arguments":[{"name":"type","type":"SecureValueType","comment":"One of {@link RawSecureValueTypePassport}, {@link RawSecureValueTypeDriverLicense}, {@link RawSecureValueTypeIdentityCard}, {@link RawSecureValueTypeInternalPassport}"},{"name":"file_hash","type":"bytes","comment":"File hash"},{"name":"text","type":"string","comment":"Error message"}]},{"kind":"class","name":"secureValueErrorReverseSide","type":"SecureValueError","id":2257201829,"comment":"Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.","arguments":[{"name":"type","type":"SecureValueType","comment":"One of {@link RawSecureValueTypeDriverLicense}, {@link RawSecureValueTypeIdentityCard}"},{"name":"file_hash","type":"bytes","comment":"File hash"},{"name":"text","type":"string","comment":"Error message"}]},{"kind":"class","name":"secureValueErrorSelfie","type":"SecureValueError","id":3845639894,"comment":"Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.","arguments":[{"name":"type","type":"SecureValueType","comment":"One of {@link RawSecureValueTypePassport}, {@link RawSecureValueTypeDriverLicense}, {@link RawSecureValueTypeIdentityCard}, {@link RawSecureValueTypeInternalPassport}"},{"name":"file_hash","type":"bytes","comment":"File hash"},{"name":"text","type":"string","comment":"Error message"}]},{"kind":"class","name":"secureValueErrorFile","type":"SecureValueError","id":2054162547,"comment":"Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.","arguments":[{"name":"type","type":"SecureValueType","comment":"One of {@link RawSecureValueTypeUtilityBill}, {@link RawSecureValueTypeBankStatement}, {@link RawSecureValueTypeRentalAgreement}, {@link RawSecureValueTypePassportRegistration}, {@link RawSecureValueTypeTemporaryRegistration}"},{"name":"file_hash","type":"bytes","comment":"File hash"},{"name":"text","type":"string","comment":"Error message"}]},{"kind":"class","name":"secureValueErrorFiles","type":"SecureValueError","id":1717706985,"comment":"Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.","arguments":[{"name":"type","type":"SecureValueType","comment":"One of {@link RawSecureValueTypeUtilityBill}, {@link RawSecureValueTypeBankStatement}, {@link RawSecureValueTypeRentalAgreement}, {@link RawSecureValueTypePassportRegistration}, {@link RawSecureValueTypeTemporaryRegistration}"},{"name":"file_hash","type":"bytes","typeModifiers":{"isVector":true},"comment":"File hash"},{"name":"text","type":"string","comment":"Error message"}]},{"kind":"class","name":"secureValueError","type":"SecureValueError","id":2258466191,"comment":"Secure value error","arguments":[{"name":"type","type":"SecureValueType","comment":"Type of element which has the issue"},{"name":"hash","type":"bytes","comment":"Hash"},{"name":"text","type":"string","comment":"Error message"}]},{"kind":"class","name":"secureValueErrorTranslationFile","type":"SecureValueError","id":2702460784,"comment":"Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.","arguments":[{"name":"type","type":"SecureValueType","comment":"One of {@link RawSecureValueTypePersonalDetails}, {@link RawSecureValueTypePassport}, {@link RawSecureValueTypeDriverLicense}, {@link RawSecureValueTypeIdentityCard}, {@link RawSecureValueTypeInternalPassport}, {@link RawSecureValueTypeUtilityBill}, {@link RawSecureValueTypeBankStatement}, {@link RawSecureValueTypeRentalAgreement}, {@link RawSecureValueTypePassportRegistration}, {@link RawSecureValueTypeTemporaryRegistration}"},{"name":"file_hash","type":"bytes","comment":"File hash"},{"name":"text","type":"string","comment":"Error message"}]},{"kind":"class","name":"secureValueErrorTranslationFiles","type":"SecureValueError","id":878931416,"comment":"Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation changes.","arguments":[{"name":"type","type":"SecureValueType","comment":"One of {@link RawSecureValueTypePersonalDetails}, {@link RawSecureValueTypePassport}, {@link RawSecureValueTypeDriverLicense}, {@link RawSecureValueTypeIdentityCard}, {@link RawSecureValueTypeInternalPassport}, {@link RawSecureValueTypeUtilityBill}, {@link RawSecureValueTypeBankStatement}, {@link RawSecureValueTypeRentalAgreement}, {@link RawSecureValueTypePassportRegistration}, {@link RawSecureValueTypeTemporaryRegistration}"},{"name":"file_hash","type":"bytes","typeModifiers":{"isVector":true},"comment":"Hash"},{"name":"text","type":"string","comment":"Error message"}]},{"kind":"class","name":"secureCredentialsEncrypted","type":"SecureCredentialsEncrypted","id":871426631,"comment":"Encrypted credentials required to decrypt telegram passport data.","arguments":[{"name":"data","type":"bytes","comment":"Encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication, as described in decrypting data »"},{"name":"hash","type":"bytes","comment":"Data hash for data authentication as described in decrypting data »"},{"name":"secret","type":"bytes","comment":"Secret, encrypted with the bot's public RSA key, required for data decryption as described in decrypting data »"}]},{"kind":"class","name":"account.authorizationForm","type":"account.AuthorizationForm","id":2905480408,"comment":"Telegram Passport authorization form","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"required_types","type":"SecureRequiredType","typeModifiers":{"isVector":true},"comment":"Required Telegram Passport documents"},{"name":"values","type":"SecureValue","typeModifiers":{"isVector":true},"comment":"Already submitted Telegram Passport documents"},{"name":"errors","type":"SecureValueError","typeModifiers":{"isVector":true},"comment":"Telegram Passport errors"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Info about the bot to which the form will be submitted"},{"name":"privacy_policy_url","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"URL of the service's privacy policy"}]},{"kind":"class","name":"account.sentEmailCode","type":"account.SentEmailCode","id":2166326607,"comment":"The sent email code","arguments":[{"name":"email_pattern","type":"string","comment":"The email (to which the code was sent) must match this pattern"},{"name":"length","type":"int","comment":"The length of the verification code"}]},{"kind":"class","name":"help.deepLinkInfoEmpty","type":"help.DeepLinkInfo","id":1722786150,"comment":"Deep link info empty","arguments":[]},{"kind":"class","name":"help.deepLinkInfo","type":"help.DeepLinkInfo","id":1783556146,"comment":"Deep link info, see the here for more details","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"update_app","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"An update of the app is required to parse this link"},{"name":"message","type":"string","comment":"Message to show to the user"},{"name":"entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.1","isVector":true},"comment":"Message entities for styled text"}]},{"kind":"class","name":"savedPhoneContact","type":"SavedContact","id":289586518,"comment":"Saved contact","arguments":[{"name":"phone","type":"string","comment":"Phone number"},{"name":"first_name","type":"string","comment":"First name"},{"name":"last_name","type":"string","comment":"Last name"},{"name":"date","type":"int","comment":"Date added"}]},{"kind":"class","name":"account.takeout","type":"account.Takeout","id":1304052993,"comment":"Takeout info","arguments":[{"name":"id","type":"long","comment":"Takeout ID"}]},{"kind":"class","name":"passwordKdfAlgoUnknown","type":"PasswordKdfAlgo","id":3562713238,"comment":"Unknown KDF (most likely, the client is outdated and does not support the specified KDF algorithm)","arguments":[]},{"kind":"class","name":"passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow","type":"PasswordKdfAlgo","id":982592842,"comment":"This key derivation algorithm defines that SRP 2FA login must be used","arguments":[{"name":"salt1","type":"bytes","comment":"One of two salts used by the derivation function (see SRP 2FA login)"},{"name":"salt2","type":"bytes","comment":"One of two salts used by the derivation function (see SRP 2FA login)"},{"name":"g","type":"int","comment":"Base (see SRP 2FA login)"},{"name":"p","type":"bytes","comment":"2048-bit modulus (see SRP 2FA login)"}]},{"kind":"class","name":"securePasswordKdfAlgoUnknown","type":"SecurePasswordKdfAlgo","id":4883767,"comment":"Unknown KDF algo (most likely the client has to be updated)","arguments":[]},{"kind":"class","name":"securePasswordKdfAlgoPBKDF2HMACSHA512iter100000","type":"SecurePasswordKdfAlgo","id":3153255840,"comment":"PBKDF2 with SHA512 and 100000 iterations KDF algo","arguments":[{"name":"salt","type":"bytes","comment":"Salt"}]},{"kind":"class","name":"securePasswordKdfAlgoSHA512","type":"SecurePasswordKdfAlgo","id":2252807570,"comment":"SHA512 KDF algo","arguments":[{"name":"salt","type":"bytes","comment":"Salt"}]},{"kind":"class","name":"secureSecretSettings","type":"SecureSecretSettings","id":354925740,"comment":"Secure settings","arguments":[{"name":"secure_algo","type":"SecurePasswordKdfAlgo","comment":"Secure KDF algo"},{"name":"secure_secret","type":"bytes","comment":"Secure secret"},{"name":"secure_secret_id","type":"long","comment":"Secret ID"}]},{"kind":"class","name":"inputCheckPasswordEmpty","type":"InputCheckPasswordSRP","id":2558588504,"comment":"There is no password","arguments":[]},{"kind":"class","name":"inputCheckPasswordSRP","type":"InputCheckPasswordSRP","id":3531600002,"comment":"Constructor for checking the validity of a 2FA SRP password (see SRP)","arguments":[{"name":"srp_id","type":"long","comment":"SRP ID"},{"name":"A","type":"bytes","comment":"A parameter (see SRP)"},{"name":"M1","type":"bytes","comment":"M1 parameter (see SRP)"}]},{"kind":"class","name":"secureRequiredType","type":"SecureRequiredType","id":2191366618,"comment":"Required type","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"native_names","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Native names"},{"name":"selfie_required","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Is a selfie required"},{"name":"translation_required","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Is a translation required"},{"name":"type","type":"SecureValueType","comment":"Secure value type"}]},{"kind":"class","name":"secureRequiredTypeOneOf","type":"SecureRequiredType","id":41187252,"comment":"One of","arguments":[{"name":"types","type":"SecureRequiredType","typeModifiers":{"isVector":true},"comment":"Secure required value types"}]},{"kind":"class","name":"help.passportConfigNotModified","type":"help.PassportConfig","id":3216634967,"comment":"Password configuration not modified","arguments":[]},{"kind":"class","name":"help.passportConfig","type":"help.PassportConfig","id":2694370991,"comment":"Telegram passport configuration","arguments":[{"name":"hash","type":"int","comment":"Hash used for caching, for more info click here"},{"name":"countries_langs","type":"DataJSON","comment":"Localization"}]},{"kind":"class","name":"inputAppEvent","type":"InputAppEvent","id":488313413,"comment":"Event that occurred in the application.","arguments":[{"name":"time","type":"double","comment":"Client's exact timestamp for the event"},{"name":"type","type":"string","comment":"Type of event"},{"name":"peer","type":"long","comment":"Arbitrary numeric value for more convenient selection of certain event types, or events referring to a certain object"},{"name":"data","type":"JSONValue","comment":"Details of the event"}]},{"kind":"class","name":"jsonObjectValue","type":"JSONObjectValue","id":3235781593,"comment":"JSON key: value pair","arguments":[{"name":"key","type":"string","comment":"Key"},{"name":"value","type":"JSONValue","comment":"Value"}]},{"kind":"class","name":"jsonNull","type":"JSONValue","id":1064139624,"comment":"null JSON value","arguments":[]},{"kind":"class","name":"jsonBool","type":"JSONValue","id":3342098026,"comment":"JSON boolean value","arguments":[{"name":"value","type":"Bool","comment":"Value"}]},{"kind":"class","name":"jsonNumber","type":"JSONValue","id":736157604,"comment":"JSON numeric value","arguments":[{"name":"value","type":"double","comment":"Value"}]},{"kind":"class","name":"jsonString","type":"JSONValue","id":3072226938,"comment":"JSON string","arguments":[{"name":"value","type":"string","comment":"Value"}]},{"kind":"class","name":"jsonArray","type":"JSONValue","id":4148447075,"comment":"JSON array","arguments":[{"name":"value","type":"JSONValue","typeModifiers":{"isVector":true},"comment":"JSON values"}]},{"kind":"class","name":"jsonObject","type":"JSONValue","id":2579616925,"comment":"JSON object value","arguments":[{"name":"value","type":"JSONObjectValue","typeModifiers":{"isVector":true},"comment":"Values"}]},{"kind":"class","name":"pageTableCell","type":"PageTableCell","id":878078826,"comment":"Table cell","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"header","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Is this element part of the column header"},{"name":"align_center","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Horizontally centered block"},{"name":"align_right","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"Right-aligned block"},{"name":"valign_middle","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Vertically centered block"},{"name":"valign_bottom","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"Block vertically-aligned to the bottom"},{"name":"text","type":"RichText","typeModifiers":{"predicate":"flags.7"},"comment":"Content"},{"name":"colspan","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"For how many columns should this cell extend"},{"name":"rowspan","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"For how many rows should this cell extend"}]},{"kind":"class","name":"pageTableRow","type":"PageTableRow","id":3770729957,"comment":"Table row","arguments":[{"name":"cells","type":"PageTableCell","typeModifiers":{"isVector":true},"comment":"Table cells"}]},{"kind":"class","name":"pageCaption","type":"PageCaption","id":1869903447,"comment":"Page caption","arguments":[{"name":"text","type":"RichText","comment":"Caption"},{"name":"credit","type":"RichText","comment":"Credits"}]},{"kind":"class","name":"pageListItemText","type":"PageListItem","id":3106911949,"comment":"List item","arguments":[{"name":"text","type":"RichText","comment":"Text"}]},{"kind":"class","name":"pageListItemBlocks","type":"PageListItem","id":635466748,"comment":"List item","arguments":[{"name":"blocks","type":"PageBlock","typeModifiers":{"isVector":true},"comment":"Blocks"}]},{"kind":"class","name":"pageListOrderedItemText","type":"PageListOrderedItem","id":1577484359,"comment":"Ordered list of text items","arguments":[{"name":"num","type":"string","comment":"Number of element within ordered list"},{"name":"text","type":"RichText","comment":"Text"}]},{"kind":"class","name":"pageListOrderedItemBlocks","type":"PageListOrderedItem","id":2564655414,"comment":"Ordered list of IV blocks","arguments":[{"name":"num","type":"string","comment":"Number of element within ordered list"},{"name":"blocks","type":"PageBlock","typeModifiers":{"isVector":true},"comment":"Item contents"}]},{"kind":"class","name":"pageRelatedArticle","type":"PageRelatedArticle","id":3012615176,"comment":"Related article","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"url","type":"string","comment":"URL of article"},{"name":"webpage_id","type":"long","comment":"Webpage ID of generated IV preview"},{"name":"title","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Title"},{"name":"description","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Description"},{"name":"photo_id","type":"long","typeModifiers":{"predicate":"flags.2"},"comment":"ID of preview photo"},{"name":"author","type":"string","typeModifiers":{"predicate":"flags.3"},"comment":"Author name"},{"name":"published_date","type":"int","typeModifiers":{"predicate":"flags.4"},"comment":"Date of publication"}]},{"kind":"class","name":"page","type":"Page","id":2556788493,"comment":"Instant view page","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"part","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Indicates that not full page preview is available to the client and it will need to fetch full Instant View from the server using {@link messages.RawGetWebPagePreviewRequest}."},{"name":"rtl","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the page contains RTL text"},{"name":"v2","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether this is an IV v2 page"},{"name":"url","type":"string","comment":"Original page HTTP URL"},{"name":"blocks","type":"PageBlock","typeModifiers":{"isVector":true},"comment":"Page elements (like with HTML elements, only as TL constructors)"},{"name":"photos","type":"Photo","typeModifiers":{"isVector":true},"comment":"Photos in page"},{"name":"documents","type":"Document","typeModifiers":{"isVector":true},"comment":"Media in page"},{"name":"views","type":"int","typeModifiers":{"predicate":"flags.3"},"comment":"View count"}]},{"kind":"class","name":"help.supportName","type":"help.SupportName","id":2349199817,"comment":"Localized name for telegram support","arguments":[{"name":"name","type":"string","comment":"Localized name"}]},{"kind":"class","name":"help.userInfoEmpty","type":"help.UserInfo","id":4088278765,"comment":"Internal use","arguments":[]},{"kind":"class","name":"help.userInfo","type":"help.UserInfo","id":32192344,"comment":"Internal use","arguments":[{"name":"message","type":"string","comment":"Info"},{"name":"entities","type":"MessageEntity","typeModifiers":{"isVector":true},"comment":"Message entities for styled text"},{"name":"author","type":"string","comment":"Author"},{"name":"date","type":"int","comment":"Date"}]},{"kind":"class","name":"pollAnswer","type":"PollAnswer","id":4279689930,"comment":"A possible answer of a poll","arguments":[{"name":"text","type":"TextWithEntities","comment":"Textual representation of the answer (only Premium users can use custom emoji entities here)."},{"name":"option","type":"bytes","comment":"The param that has to be passed to {@link messages.RawSendVoteRequest}."}]},{"kind":"class","name":"poll","type":"Poll","id":1484026161,"comment":"Poll","arguments":[{"name":"id","type":"long","comment":"ID of the poll"},{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"closed","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the poll is closed and doesn't accept any more answers"},{"name":"public_voters","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether cast votes are publicly visible to all users (non-anonymous poll)"},{"name":"multiple_choice","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether multiple options can be chosen as answer"},{"name":"quiz","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether this is a quiz (with wrong and correct answers, results shown in the return type)"},{"name":"question","type":"TextWithEntities","comment":"The question of the poll (only Premium users can use custom emoji entities here)."},{"name":"answers","type":"PollAnswer","typeModifiers":{"isVector":true},"comment":"The possible answers, vote using {@link messages.RawSendVoteRequest}."},{"name":"close_period","type":"int","typeModifiers":{"predicate":"flags.4"},"comment":"Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date."},{"name":"close_date","type":"int","typeModifiers":{"predicate":"flags.5"},"comment":"Point in time (UNIX timestamp in seconds) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future; can't be used together with close_period."}]},{"kind":"class","name":"pollAnswerVoters","type":"PollAnswerVoters","id":997055186,"comment":"A poll answer, and how users voted on it","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"chosen","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether we have chosen this answer"},{"name":"correct","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"For quizzes, whether the option we have chosen is correct"},{"name":"option","type":"bytes","comment":"The param that has to be passed to {@link messages.RawSendVoteRequest}."},{"name":"voters","type":"int","comment":"How many users voted for this option"}]},{"kind":"class","name":"pollResults","type":"PollResults","id":2061444128,"comment":"Results of poll","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"min","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Similar to min objects, used for poll constructors that are the same for all users so they don't have the option chosen by the current user (you can use {@link messages.RawGetPollResultsRequest} to get the full poll results)."},{"name":"results","type":"PollAnswerVoters","typeModifiers":{"predicate":"flags.1","isVector":true},"comment":"Poll results"},{"name":"total_voters","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"Total number of people that voted in the poll"},{"name":"recent_voters","type":"Peer","typeModifiers":{"predicate":"flags.3","isVector":true},"comment":"IDs of the last users that recently voted in the poll"},{"name":"solution","type":"string","typeModifiers":{"predicate":"flags.4"},"comment":"Explanation of quiz solution"},{"name":"solution_entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.4","isVector":true},"comment":"Message entities for styled text in quiz solution"}]},{"kind":"class","name":"chatOnlines","type":"ChatOnlines","id":4030849616,"comment":"Number of online users in a chat","arguments":[{"name":"onlines","type":"int","comment":"Number of online users"}]},{"kind":"class","name":"statsURL","type":"StatsURL","id":1202287072,"comment":"URL with chat statistics","arguments":[{"name":"url","type":"string","comment":"Chat statistics"}]},{"kind":"class","name":"chatAdminRights","type":"ChatAdminRights","id":1605510357,"comment":"Represents the rights of an admin in a channel/supergroup.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"change_info","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, allows the admin to modify the description of the channel/supergroup"},{"name":"post_messages","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"If set, allows the admin to post messages in the channel"},{"name":"edit_messages","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"If set, allows the admin to also edit messages from other admins in the channel"},{"name":"delete_messages","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"If set, allows the admin to also delete messages from other admins in the channel"},{"name":"ban_users","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"If set, allows the admin to ban users from the channel/supergroup"},{"name":"invite_users","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"If set, allows the admin to invite users in the channel/supergroup"},{"name":"pin_messages","type":"true","typeModifiers":{"predicate":"flags.7"},"comment":"If set, allows the admin to pin messages in the channel/supergroup"},{"name":"add_admins","type":"true","typeModifiers":{"predicate":"flags.9"},"comment":"If set, allows the admin to add other admins with the same (or more limited) permissions in the channel/supergroup"},{"name":"anonymous","type":"true","typeModifiers":{"predicate":"flags.10"},"comment":"Whether this admin is anonymous"},{"name":"manage_call","type":"true","typeModifiers":{"predicate":"flags.11"},"comment":"If set, allows the admin to change group call/livestream settings"},{"name":"other","type":"true","typeModifiers":{"predicate":"flags.12"},"comment":"Set this flag if none of the other flags are set, but you still want the user to be an admin: if this or any of the other flags are set, the admin can get the chat admin log, get chat statistics, get message statistics in channels, get channel members, see anonymous administrators in supergroups and ignore slow mode."},{"name":"manage_topics","type":"true","typeModifiers":{"predicate":"flags.13"},"comment":"If set, allows the admin to create, delete or modify forum topics »."},{"name":"post_stories","type":"true","typeModifiers":{"predicate":"flags.14"},"comment":"If set, allows the admin to post stories as the channel."},{"name":"edit_stories","type":"true","typeModifiers":{"predicate":"flags.15"},"comment":"If set, allows the admin to edit stories posted by the other admins of the channel."},{"name":"delete_stories","type":"true","typeModifiers":{"predicate":"flags.16"},"comment":"If set, allows the admin to delete stories posted by the other admins of the channel."}]},{"kind":"class","name":"chatBannedRights","type":"ChatBannedRights","id":2668758040,"comment":"Represents the rights of a normal user in a supergroup/channel/chat. In this case, the flags are inverted: if set, a flag does not allow a user to do X.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"view_messages","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, does not allow a user to view messages in a supergroup/channel/chat"},{"name":"send_messages","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"If set, does not allow a user to send messages in a supergroup/chat"},{"name":"send_media","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"If set, does not allow a user to send any media in a supergroup/chat"},{"name":"send_stickers","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"If set, does not allow a user to send stickers in a supergroup/chat"},{"name":"send_gifs","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"If set, does not allow a user to send gifs in a supergroup/chat"},{"name":"send_games","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"If set, does not allow a user to send games in a supergroup/chat"},{"name":"send_inline","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"If set, does not allow a user to use inline bots in a supergroup/chat."},{"name":"embed_links","type":"true","typeModifiers":{"predicate":"flags.7"},"comment":"If set, does not allow a user to embed links in the messages of a supergroup/chat"},{"name":"send_polls","type":"true","typeModifiers":{"predicate":"flags.8"},"comment":"If set, does not allow a user to send polls in a supergroup/chat"},{"name":"change_info","type":"true","typeModifiers":{"predicate":"flags.10"},"comment":"If set, does not allow any user to change the description of a supergroup/chat"},{"name":"invite_users","type":"true","typeModifiers":{"predicate":"flags.15"},"comment":"If set, does not allow any user to invite users in a supergroup/chat"},{"name":"pin_messages","type":"true","typeModifiers":{"predicate":"flags.17"},"comment":"If set, does not allow any user to pin messages in a supergroup/chat"},{"name":"manage_topics","type":"true","typeModifiers":{"predicate":"flags.18"},"comment":"If set, does not allow any user to create, delete or modify forum topics »."},{"name":"send_photos","type":"true","typeModifiers":{"predicate":"flags.19"},"comment":"If set, does not allow a user to send photos in a supergroup/chat."},{"name":"send_videos","type":"true","typeModifiers":{"predicate":"flags.20"},"comment":"If set, does not allow a user to send videos in a supergroup/chat."},{"name":"send_roundvideos","type":"true","typeModifiers":{"predicate":"flags.21"},"comment":"If set, does not allow a user to send round videos in a supergroup/chat."},{"name":"send_audios","type":"true","typeModifiers":{"predicate":"flags.22"},"comment":"If set, does not allow a user to send audio files in a supergroup/chat."},{"name":"send_voices","type":"true","typeModifiers":{"predicate":"flags.23"},"comment":"If set, does not allow a user to send voice messages in a supergroup/chat."},{"name":"send_docs","type":"true","typeModifiers":{"predicate":"flags.24"},"comment":"If set, does not allow a user to send documents in a supergroup/chat."},{"name":"send_plain","type":"true","typeModifiers":{"predicate":"flags.25"},"comment":"If set, does not allow a user to send text messages in a supergroup/chat."},{"name":"until_date","type":"int","comment":"Validity of said permissions (it is considered forever any value less then 30 seconds or more then 366 days)."}]},{"kind":"class","name":"inputWallPaper","type":"InputWallPaper","id":3861952889,"comment":"Wallpaper","arguments":[{"name":"id","type":"long","comment":"Wallpaper ID"},{"name":"access_hash","type":"long","comment":"Access hash"}]},{"kind":"class","name":"inputWallPaperSlug","type":"InputWallPaper","id":1913199744,"comment":"Wallpaper by slug (a unique ID, obtained from a wallpaper link »)","arguments":[{"name":"slug","type":"string","comment":"Unique wallpaper ID"}]},{"kind":"class","name":"inputWallPaperNoFile","type":"InputWallPaper","id":2524595758,"comment":"Wallpaper with no file access hash, used for example when deleting (unsave=true) wallpapers using {@link account.RawSaveWallPaperRequest}, specifying just the wallpaper ID.","arguments":[{"name":"id","type":"long","comment":"Wallpaper ID"}]},{"kind":"class","name":"account.wallPapersNotModified","type":"account.WallPapers","id":471437699,"comment":"No new wallpapers were found","arguments":[]},{"kind":"class","name":"account.wallPapers","type":"account.WallPapers","id":3452142988,"comment":"Installed wallpapers","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here"},{"name":"wallpapers","type":"WallPaper","typeModifiers":{"isVector":true},"comment":"Wallpapers"}]},{"kind":"class","name":"codeSettings","type":"CodeSettings","id":2904898936,"comment":"Settings used by telegram servers for sending the confirm code.\n\nExample implementations: telegram for android, tdlib.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"allow_flashcall","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to allow phone verification via phone calls."},{"name":"current_number","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Pass true if the phone number is used on the current device. Ignored if allow_flashcall is not set."},{"name":"allow_app_hash","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"If a token that will be included in eventually sent SMSs is required: required in newer versions of android, to use the android SMS receiver APIs"},{"name":"allow_missed_call","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Whether this device supports receiving the code using the {@link auth.RawCodeTypeMissedCall} method"},{"name":"allow_firebase","type":"true","typeModifiers":{"predicate":"flags.7"},"comment":"Whether Firebase auth is supported"},{"name":"unknown_number","type":"true","typeModifiers":{"predicate":"flags.9"},"comment":"Set this flag if there is a SIM card in the current device, but it is not possible to check whether the specified phone number matches the SIM's phone number."},{"name":"logout_tokens","type":"bytes","typeModifiers":{"predicate":"flags.6","isVector":true},"comment":"Previously stored future auth tokens, see the documentation for more info »"},{"name":"token","type":"string","typeModifiers":{"predicate":"flags.8"},"comment":"Used only by official iOS apps for Firebase auth: device token for apple push."},{"name":"app_sandbox","type":"Bool","typeModifiers":{"predicate":"flags.8"},"comment":"Used only by official iOS apps for firebase auth: whether a sandbox-certificate will be used during transmission of the push notification."}]},{"kind":"class","name":"wallPaperSettings","type":"WallPaperSettings","id":925826256,"comment":"Wallpaper rendering information.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"blur","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"For image wallpapers »: if set, the JPEG must be downscaled to fit in 450x450 square and then box-blurred with radius 12."},{"name":"motion","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"If set, the background needs to be slightly moved when the device is rotated."},{"name":"background_color","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Used for solid », gradient » and freeform gradient » fills."},{"name":"second_background_color","type":"int","typeModifiers":{"predicate":"flags.4"},"comment":"Used for gradient » and freeform gradient » fills."},{"name":"third_background_color","type":"int","typeModifiers":{"predicate":"flags.5"},"comment":"Used for freeform gradient » fills."},{"name":"fourth_background_color","type":"int","typeModifiers":{"predicate":"flags.6"},"comment":"Used for freeform gradient » fills."},{"name":"intensity","type":"int","typeModifiers":{"predicate":"flags.3"},"comment":"Used for pattern wallpapers »."},{"name":"rotation","type":"int","typeModifiers":{"predicate":"flags.4"},"comment":"Clockwise rotation angle of the gradient, in degrees; 0-359. Should be always divisible by 45."},{"name":"emoticon","type":"string","typeModifiers":{"predicate":"flags.7"},"comment":"If set, this wallpaper can be used as a channel wallpaper and is represented by the specified UTF-8 emoji."}]},{"kind":"class","name":"autoDownloadSettings","type":"AutoDownloadSettings","id":3131405864,"comment":"Autodownload settings","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"disabled","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Disable automatic media downloads?"},{"name":"video_preload_large","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether to preload the first seconds of videos larger than the specified limit"},{"name":"audio_preload_next","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether to preload the next audio track when you're listening to music"},{"name":"phonecalls_less_data","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether to enable data saving mode in phone calls"},{"name":"stories_preload","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"Whether to preload stories; in particular, the first {@link RawDocumentAttributeVideo}.preload_prefix_size bytes of story videos should be preloaded."},{"name":"photo_size_max","type":"int","comment":"Maximum size of photos to preload"},{"name":"video_size_max","type":"int53","comment":"Maximum size of videos to preload"},{"name":"file_size_max","type":"int53","comment":"Maximum size of other files to preload"},{"name":"video_upload_maxbitrate","type":"int","comment":"Maximum suggested bitrate for uploading videos"},{"name":"small_queue_active_operations_max","type":"int","comment":"A limit, specifying the maximum number of files that should be downloaded in parallel from the same DC, for files smaller than 20MB."},{"name":"large_queue_active_operations_max","type":"int","comment":"A limit, specifying the maximum number of files that should be downloaded in parallel from the same DC, for files bigger than 20MB."}]},{"kind":"class","name":"account.autoDownloadSettings","type":"account.AutoDownloadSettings","id":1674235686,"comment":"Media autodownload settings","arguments":[{"name":"low","type":"AutoDownloadSettings","comment":"Low data usage preset"},{"name":"medium","type":"AutoDownloadSettings","comment":"Medium data usage preset"},{"name":"high","type":"AutoDownloadSettings","comment":"High data usage preset"}]},{"kind":"class","name":"emojiKeyword","type":"EmojiKeyword","id":3585325561,"comment":"Emoji keyword","arguments":[{"name":"keyword","type":"string","comment":"Keyword"},{"name":"emoticons","type":"string","typeModifiers":{"isVector":true},"comment":"Emojis associated to keyword"}]},{"kind":"class","name":"emojiKeywordDeleted","type":"EmojiKeyword","id":594408994,"comment":"Deleted emoji keyword","arguments":[{"name":"keyword","type":"string","comment":"Keyword"},{"name":"emoticons","type":"string","typeModifiers":{"isVector":true},"comment":"Emojis that were associated to keyword"}]},{"kind":"class","name":"emojiKeywordsDifference","type":"EmojiKeywordsDifference","id":1556570557,"comment":"Changes to emoji keywords","arguments":[{"name":"lang_code","type":"string","comment":"Language code for keywords"},{"name":"from_version","type":"int","comment":"Previous emoji keyword list version"},{"name":"version","type":"int","comment":"Current version of emoji keyword list"},{"name":"keywords","type":"EmojiKeyword","typeModifiers":{"isVector":true},"comment":"Emojis associated to keywords"}]},{"kind":"class","name":"emojiURL","type":"EmojiURL","id":2775937949,"comment":"An HTTP URL which can be used to automatically log in into translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation","arguments":[{"name":"url","type":"string","comment":"An HTTP URL which can be used to automatically log in into translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation"}]},{"kind":"class","name":"emojiLanguage","type":"EmojiLanguage","id":3019592545,"comment":"Emoji language","arguments":[{"name":"lang_code","type":"string","comment":"Language code"}]},{"kind":"class","name":"folder","type":"Folder","id":4283715173,"comment":"Folder","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"autofill_new_broadcasts","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Automatically add new channels to this folder"},{"name":"autofill_public_groups","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Automatically add joined new public supergroups to this folder"},{"name":"autofill_new_correspondents","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Automatically add new private chats to this folder"},{"name":"id","type":"int","comment":"Folder ID"},{"name":"title","type":"string","comment":"Folder title"},{"name":"photo","type":"ChatPhoto","typeModifiers":{"predicate":"flags.3"},"comment":"Folder picture"}]},{"kind":"class","name":"inputFolderPeer","type":"InputFolderPeer","id":4224893590,"comment":"Peer in a folder","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer"},{"name":"folder_id","type":"int","comment":"Peer folder ID, for more info click here"}]},{"kind":"class","name":"folderPeer","type":"FolderPeer","id":3921323624,"comment":"Peer in a folder","arguments":[{"name":"peer","type":"Peer","comment":"Folder peer info"},{"name":"folder_id","type":"int","comment":"Peer folder ID, for more info click here"}]},{"kind":"class","name":"messages.searchCounter","type":"messages.SearchCounter","id":3896830975,"comment":"Indicates how many results would be found by a {@link messages.RawSearchRequest} call with the same parameters","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"inexact","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"If set, the results may be inexact"},{"name":"filter","type":"MessagesFilter","comment":"Provided message filter"},{"name":"count","type":"int","comment":"Number of results that were found server-side"}]},{"kind":"class","name":"urlAuthResultRequest","type":"UrlAuthResult","id":2463316494,"comment":"Details about the authorization request, for more info click here »","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"request_write_access","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the bot would like to send messages to the user"},{"name":"bot","type":"User","comment":"Username of a bot, which will be used for user authorization. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details."},{"name":"domain","type":"string","comment":"The domain name of the website on which the user will log in."}]},{"kind":"class","name":"urlAuthResultAccepted","type":"UrlAuthResult","id":2408320590,"comment":"Details about an accepted authorization request, for more info click here »","arguments":[{"name":"url","type":"string","comment":"The URL name of the website on which the user has logged in."}]},{"kind":"class","name":"urlAuthResultDefault","type":"UrlAuthResult","id":2849430303,"comment":"Details about an accepted authorization request, for more info click here »","arguments":[]},{"kind":"class","name":"channelLocationEmpty","type":"ChannelLocation","id":3216354699,"comment":"No location (normal supergroup)","arguments":[]},{"kind":"class","name":"channelLocation","type":"ChannelLocation","id":547062491,"comment":"Geographical location of supergroup (geogroups)","arguments":[{"name":"geo_point","type":"GeoPoint","comment":"Geographical location of supergroup"},{"name":"address","type":"string","comment":"Textual description of the address"}]},{"kind":"class","name":"peerLocated","type":"PeerLocated","id":3393592157,"comment":"Peer geolocated nearby","arguments":[{"name":"peer","type":"Peer","comment":"Peer"},{"name":"expires","type":"int","comment":"Validity period of current data"},{"name":"distance","type":"int","comment":"Distance from the peer in meters"}]},{"kind":"class","name":"peerSelfLocated","type":"PeerLocated","id":4176226379,"comment":"Current peer","arguments":[{"name":"expires","type":"int","comment":"Expiry of geolocation info for current peer"}]},{"kind":"class","name":"restrictionReason","type":"RestrictionReason","id":3497176244,"comment":"Restriction reason.\n\nContains the reason why access to a certain object must be restricted. Clients are supposed to deny access to the channel if the platform field is equal to all or to the current platform (ios, android, wp, etc.). Platforms can be concatenated (ios-android, ios-wp), unknown platforms are to be ignored. The text is the error message that should be shown to the user.","arguments":[{"name":"platform","type":"string","comment":"Platform identifier (ios, android, wp, all, etc.), can be concatenated with a dash as separator (android-ios, ios-wp, etc)"},{"name":"reason","type":"string","comment":"Restriction reason (porno, terms, etc.)"},{"name":"text","type":"string","comment":"Error message to be shown to the user"}]},{"kind":"class","name":"inputTheme","type":"InputTheme","id":1012306921,"comment":"Theme","arguments":[{"name":"id","type":"long","comment":"ID"},{"name":"access_hash","type":"long","comment":"Access hash"}]},{"kind":"class","name":"inputThemeSlug","type":"InputTheme","id":4119399921,"comment":"Theme by theme ID","arguments":[{"name":"slug","type":"string","comment":"Unique theme ID obtained from a theme deep link »"}]},{"kind":"class","name":"theme","type":"Theme","id":2685298646,"comment":"Theme","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"creator","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the current user is the creator of this theme"},{"name":"default","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether this is the default theme"},{"name":"for_chat","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Whether this theme is meant to be used as a chat theme"},{"name":"id","type":"long","comment":"Theme ID"},{"name":"access_hash","type":"long","comment":"Theme access hash"},{"name":"slug","type":"string","comment":"Unique theme ID"},{"name":"title","type":"string","comment":"Theme name"},{"name":"document","type":"Document","typeModifiers":{"predicate":"flags.2"},"comment":"Theme"},{"name":"settings","type":"ThemeSettings","typeModifiers":{"predicate":"flags.3","isVector":true},"comment":"Theme settings"},{"name":"emoticon","type":"string","typeModifiers":{"predicate":"flags.6"},"comment":"Theme emoji"},{"name":"installs_count","type":"int","typeModifiers":{"predicate":"flags.4"},"comment":"Installation count"}]},{"kind":"class","name":"account.themesNotModified","type":"account.Themes","id":4095653410,"comment":"No new themes were installed","arguments":[]},{"kind":"class","name":"account.themes","type":"account.Themes","id":2587724909,"comment":"Installed themes","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here"},{"name":"themes","type":"Theme","typeModifiers":{"isVector":true},"comment":"Themes"}]},{"kind":"class","name":"auth.loginToken","type":"auth.LoginToken","id":1654593920,"comment":"Login token (for QR code login)","arguments":[{"name":"expires","type":"int","comment":"Expiration date of QR code"},{"name":"token","type":"bytes","comment":"Token to render in QR code"}]},{"kind":"class","name":"auth.loginTokenMigrateTo","type":"auth.LoginToken","id":110008598,"comment":"Repeat the query to the specified DC","arguments":[{"name":"dc_id","type":"int","comment":"DC ID"},{"name":"token","type":"bytes","comment":"Token to use for login"}]},{"kind":"class","name":"auth.loginTokenSuccess","type":"auth.LoginToken","id":957176926,"comment":"Login via token (QR code) succeeded!","arguments":[{"name":"authorization","type":"auth.Authorization","comment":"Authorization info"}]},{"kind":"class","name":"account.contentSettings","type":"account.ContentSettings","id":1474462241,"comment":"Sensitive content settings","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"sensitive_enabled","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether viewing of sensitive (NSFW) content is enabled"},{"name":"sensitive_can_change","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the current client can change the sensitive content settings to view NSFW content"}]},{"kind":"class","name":"messages.inactiveChats","type":"messages.InactiveChats","id":2837970629,"comment":"Inactive chat list","arguments":[{"name":"dates","type":"int","typeModifiers":{"isVector":true},"comment":"When was the chat last active"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Chat list"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Users mentioned in the chat list"}]},{"kind":"class","name":"baseThemeClassic","type":"BaseTheme","id":3282117730,"comment":"Classic theme","arguments":[]},{"kind":"class","name":"baseThemeDay","type":"BaseTheme","id":4225242760,"comment":"Day theme","arguments":[]},{"kind":"class","name":"baseThemeNight","type":"BaseTheme","id":3081969320,"comment":"Night theme","arguments":[]},{"kind":"class","name":"baseThemeTinted","type":"BaseTheme","id":1834973166,"comment":"Tinted theme","arguments":[]},{"kind":"class","name":"baseThemeArctic","type":"BaseTheme","id":1527845466,"comment":"Arctic theme","arguments":[]},{"kind":"class","name":"inputThemeSettings","type":"InputThemeSettings","id":2413711439,"comment":"Theme settings","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"message_colors_animated","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"If set, the freeform gradient fill needs to be animated on every sent message"},{"name":"base_theme","type":"BaseTheme","comment":"Default theme on which this theme is based"},{"name":"accent_color","type":"int","comment":"Accent color, ARGB format"},{"name":"outbox_accent_color","type":"int","typeModifiers":{"predicate":"flags.3"},"comment":"Accent color of outgoing messages in ARGB format"},{"name":"message_colors","type":"int","typeModifiers":{"predicate":"flags.0","isVector":true},"comment":"The fill to be used as a background for outgoing messages, in RGB24 format.
If just one or two equal colors are provided, describes a solid fill of a background.
If two different colors are provided, describes the top and bottom colors of a 0-degree gradient.
If three or four colors are provided, describes a freeform gradient fill of a background."},{"name":"wallpaper","type":"InputWallPaper","typeModifiers":{"predicate":"flags.1"},"comment":"{@link RawInputWallPaper} or {@link RawInputWallPaper} when passing wallpaper files for image or pattern wallpapers, {@link RawInputWallPaperNoFile} with id=0 otherwise."},{"name":"wallpaper_settings","type":"WallPaperSettings","typeModifiers":{"predicate":"flags.1"},"comment":"Wallpaper settings."}]},{"kind":"class","name":"themeSettings","type":"ThemeSettings","id":4200117972,"comment":"Theme settings","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"message_colors_animated","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"If set, the freeform gradient fill needs to be animated on every sent message."},{"name":"base_theme","type":"BaseTheme","comment":"Base theme"},{"name":"accent_color","type":"int","comment":"Accent color, ARGB format"},{"name":"outbox_accent_color","type":"int","typeModifiers":{"predicate":"flags.3"},"comment":"Accent color of outgoing messages in ARGB format"},{"name":"message_colors","type":"int","typeModifiers":{"predicate":"flags.0","isVector":true},"comment":"The fill to be used as a background for outgoing messages, in RGB24 format.
If just one or two equal colors are provided, describes a solid fill of a background.
If two different colors are provided, describes the top and bottom colors of a 0-degree gradient.
If three or four colors are provided, describes a freeform gradient fill of a background."},{"name":"wallpaper","type":"WallPaper","typeModifiers":{"predicate":"flags.1"},"comment":"Wallpaper"}]},{"kind":"class","name":"webPageAttributeTheme","type":"WebPageAttribute","id":1421174295,"comment":"Page theme","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"documents","type":"Document","typeModifiers":{"predicate":"flags.0","isVector":true},"comment":"Theme files"},{"name":"settings","type":"ThemeSettings","typeModifiers":{"predicate":"flags.1"},"comment":"Theme settings"}]},{"kind":"class","name":"webPageAttributeStory","type":"WebPageAttribute","id":781501415,"comment":"Webpage preview of a Telegram story","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"peer","type":"Peer","comment":"Peer that posted the story"},{"name":"id","type":"int","comment":"Story ID"},{"name":"story","type":"StoryItem","typeModifiers":{"predicate":"flags.0"},"comment":"May contain the story, if not the story should be fetched when and if needed using {@link stories.RawGetStoriesByIDRequest} with the above id and peer."}]},{"kind":"class","name":"webPageAttributeStickerSet","type":"WebPageAttribute","id":1355547603,"comment":"Contains info about a stickerset », for a {@link RawWebPage} preview of a stickerset deep link » (the {@link RawWebPage} will have a type of telegram_stickerset).","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"emojis","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether this i s a custom emoji stickerset."},{"name":"text_color","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the color of this TGS custom emoji stickerset should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context."},{"name":"stickers","type":"Document","typeModifiers":{"isVector":true},"comment":"A subset of the stickerset in the stickerset."}]},{"kind":"class","name":"messages.votesList","type":"messages.VotesList","id":1218005070,"comment":"How users voted in a poll","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"count","type":"int","comment":"Total number of votes for all options (or only for the chosen option, if provided to {@link messages.RawGetPollVotesRequest})"},{"name":"votes","type":"MessagePeerVote","typeModifiers":{"isVector":true},"comment":"Vote info for each user"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Mentioned chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Info about users that voted in the poll"},{"name":"next_offset","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Offset to use with the next {@link messages.RawGetPollVotesRequest} request, empty string if no more results are available."}]},{"kind":"class","name":"bankCardOpenUrl","type":"BankCardOpenUrl","id":4117234314,"comment":"Credit card info URL provided by the bank","arguments":[{"name":"url","type":"string","comment":"Info URL"},{"name":"name","type":"string","comment":"Bank name"}]},{"kind":"class","name":"payments.bankCardData","type":"payments.BankCardData","id":1042605427,"comment":"Credit card info, provided by the card's bank(s)","arguments":[{"name":"title","type":"string","comment":"Credit card title"},{"name":"open_urls","type":"BankCardOpenUrl","typeModifiers":{"isVector":true},"comment":"Info URL(s) provided by the card's bank(s)"}]},{"kind":"class","name":"dialogFilter","type":"DialogFilter","id":1605718587,"comment":"Dialog filter AKA folder","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"contacts","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to include all contacts in this folder"},{"name":"non_contacts","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether to include all non-contacts in this folder"},{"name":"groups","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether to include all groups in this folder"},{"name":"broadcasts","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether to include all channels in this folder"},{"name":"bots","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"Whether to include all bots in this folder"},{"name":"exclude_muted","type":"true","typeModifiers":{"predicate":"flags.11"},"comment":"Whether to exclude muted chats from this folder"},{"name":"exclude_read","type":"true","typeModifiers":{"predicate":"flags.12"},"comment":"Whether to exclude read chats from this folder"},{"name":"exclude_archived","type":"true","typeModifiers":{"predicate":"flags.13"},"comment":"Whether to exclude archived chats from this folder"},{"name":"id","type":"int","comment":"Folder ID"},{"name":"title","type":"string","comment":"Folder name (max 12 UTF-8 chars)"},{"name":"emoticon","type":"string","typeModifiers":{"predicate":"flags.25"},"comment":"Emoji to use as icon for the folder."},{"name":"color","type":"int","typeModifiers":{"predicate":"flags.27"},"comment":"A color ID for the folder tag associated to this folder, see here » for more info."},{"name":"pinned_peers","type":"InputPeer","typeModifiers":{"isVector":true},"comment":"Pinned chats, folders can have unlimited pinned chats"},{"name":"include_peers","type":"InputPeer","typeModifiers":{"isVector":true},"comment":"Include the following chats in this folder"},{"name":"exclude_peers","type":"InputPeer","typeModifiers":{"isVector":true},"comment":"Exclude the following chats from this folder"}]},{"kind":"class","name":"dialogFilterDefault","type":"DialogFilter","id":909284270,"comment":"Used only when reordering folders to indicate the default (all chats) folder.","arguments":[]},{"kind":"class","name":"dialogFilterChatlist","type":"DialogFilter","id":2682424996,"comment":"A folder imported using a chat folder deep link ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"has_my_invites","type":"true","typeModifiers":{"predicate":"flags.26"},"comment":"Whether the current user has created some chat folder deep links » to share the folder as well."},{"name":"id","type":"int","comment":"ID of the folder"},{"name":"title","type":"string","comment":"Name of the folder (max 12 UTF-8 chars)"},{"name":"emoticon","type":"string","typeModifiers":{"predicate":"flags.25"},"comment":"Emoji to use as icon for the folder."},{"name":"color","type":"int","typeModifiers":{"predicate":"flags.27"},"comment":"A color ID for the folder tag associated to this folder, see here » for more info."},{"name":"pinned_peers","type":"InputPeer","typeModifiers":{"isVector":true},"comment":"Pinned chats, folders can have unlimited pinned chats"},{"name":"include_peers","type":"InputPeer","typeModifiers":{"isVector":true},"comment":"Chats to include in the folder"}]},{"kind":"class","name":"dialogFilterSuggested","type":"DialogFilterSuggested","id":2004110666,"comment":"Suggested folders","arguments":[{"name":"filter","type":"DialogFilter","comment":"Folder info"},{"name":"description","type":"string","comment":"Folder description"}]},{"kind":"class","name":"statsDateRangeDays","type":"StatsDateRangeDays","id":3057118639,"comment":"Channel statistics date range","arguments":[{"name":"min_date","type":"int","comment":"Initial date"},{"name":"max_date","type":"int","comment":"Final date"}]},{"kind":"class","name":"statsAbsValueAndPrev","type":"StatsAbsValueAndPrev","id":3410210014,"comment":"Statistics value couple; initial and final value for period of time currently in consideration","arguments":[{"name":"current","type":"double","comment":"Current value"},{"name":"previous","type":"double","comment":"Previous value"}]},{"kind":"class","name":"statsPercentValue","type":"StatsPercentValue","id":3419287520,"comment":"Channel statistics percentage.
\nCompute the percentage simply by doing part * total / 100","arguments":[{"name":"part","type":"double","comment":"Partial value"},{"name":"total","type":"double","comment":"Total value"}]},{"kind":"class","name":"statsGraphAsync","type":"StatsGraph","id":1244130093,"comment":"This channel statistics graph must be generated asynchronously using {@link stats.RawLoadAsyncGraphRequest} to reduce server load","arguments":[{"name":"token","type":"string","comment":"Token to use for fetching the async graph"}]},{"kind":"class","name":"statsGraphError","type":"StatsGraph","id":3202127906,"comment":"An error occurred while generating the statistics graph","arguments":[{"name":"error","type":"string","comment":"The error"}]},{"kind":"class","name":"statsGraph","type":"StatsGraph","id":2393138358,"comment":"Channel statistics graph","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"json","type":"DataJSON","comment":"Statistics data"},{"name":"zoom_token","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Zoom token"}]},{"kind":"class","name":"stats.broadcastStats","type":"stats.BroadcastStats","id":963421692,"comment":"Channel statistics.","arguments":[{"name":"period","type":"StatsDateRangeDays","comment":"Period in consideration"},{"name":"followers","type":"StatsAbsValueAndPrev","comment":"Follower count change for period in consideration"},{"name":"views_per_post","type":"StatsAbsValueAndPrev","comment":"total_viewcount/postcount, for posts posted during the period in consideration.
Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)."},{"name":"shares_per_post","type":"StatsAbsValueAndPrev","comment":"total_sharecount/postcount, for posts posted during the period in consideration.
Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)"},{"name":"reactions_per_post","type":"StatsAbsValueAndPrev","comment":"total_reactions/postcount, for posts posted during the period in consideration.
Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)"},{"name":"views_per_story","type":"StatsAbsValueAndPrev","comment":"total_views/storycount, for posts posted during the period in consideration.
Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)"},{"name":"shares_per_story","type":"StatsAbsValueAndPrev","comment":"total_shares/storycount, for posts posted during the period in consideration.
Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)"},{"name":"reactions_per_story","type":"StatsAbsValueAndPrev","comment":"total_reactions/storycount, for posts posted during the period in consideration.
Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)"},{"name":"enabled_notifications","type":"StatsPercentValue","comment":"Percentage of subscribers with enabled notifications"},{"name":"growth_graph","type":"StatsGraph","comment":"Channel growth graph (absolute subscriber count)"},{"name":"followers_graph","type":"StatsGraph","comment":"Followers growth graph (relative subscriber count)"},{"name":"mute_graph","type":"StatsGraph","comment":"Muted users graph (relative)"},{"name":"top_hours_graph","type":"StatsGraph","comment":"Views per hour graph (absolute)"},{"name":"interactions_graph","type":"StatsGraph","comment":"Interactions graph (absolute)"},{"name":"iv_interactions_graph","type":"StatsGraph","comment":"IV interactions graph (absolute)"},{"name":"views_by_source_graph","type":"StatsGraph","comment":"Views by source graph (absolute)"},{"name":"new_followers_by_source_graph","type":"StatsGraph","comment":"New followers by source graph (absolute)"},{"name":"languages_graph","type":"StatsGraph","comment":"Subscriber language graph (pie chart)"},{"name":"reactions_by_emotion_graph","type":"StatsGraph","comment":"A graph containing the number of reactions on posts categorized by emotion"},{"name":"story_interactions_graph","type":"StatsGraph","comment":"A graph containing the number of story views and shares"},{"name":"story_reactions_by_emotion_graph","type":"StatsGraph","comment":"A graph containing the number of reactions on stories categorized by emotion"},{"name":"recent_posts_interactions","type":"PostInteractionCounters","typeModifiers":{"isVector":true},"comment":"Detailed statistics about number of views and shares of recently sent messages and stories"}]},{"kind":"class","name":"help.promoDataEmpty","type":"help.PromoData","id":2566302837,"comment":"No PSA/MTProxy info is available","arguments":[{"name":"expires","type":"int","comment":"Re-fetch PSA/MTProxy info after the specified number of seconds"}]},{"kind":"class","name":"help.promoData","type":"help.PromoData","id":2352576831,"comment":"MTProxy/Public Service Announcement information","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"proxy","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"MTProxy-related channel"},{"name":"expires","type":"int","comment":"Expiry of PSA/MTProxy info"},{"name":"peer","type":"Peer","comment":"MTProxy/PSA peer"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Chat info"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"User info"},{"name":"psa_type","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"PSA type"},{"name":"psa_message","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"PSA message"}]},{"kind":"class","name":"videoSize","type":"VideoSize","id":3727929492,"comment":"An animated profile picture in MPEG4 format","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"type","type":"string","comment":"u for animated profile pictures, and v for trimmed and downscaled video previews"},{"name":"w","type":"int","comment":"Video width"},{"name":"h","type":"int","comment":"Video height"},{"name":"size","type":"int","comment":"File size"},{"name":"video_start_ts","type":"double","typeModifiers":{"predicate":"flags.0"},"comment":"Timestamp that should be shown as static preview to the user (seconds)"}]},{"kind":"class","name":"videoSizeEmojiMarkup","type":"VideoSize","id":4166795580,"comment":"An animated profile picture based on a custom emoji sticker.","arguments":[{"name":"emoji_id","type":"long","comment":"Custom emoji ID: the custom emoji sticker is shown at the center of the profile picture and occupies at most 67% of it."},{"name":"background_colors","type":"int","typeModifiers":{"isVector":true},"comment":"1, 2, 3 or 4 RBG-24 colors used to generate a solid (1), gradient (2) or freeform gradient (3, 4) background, similar to how fill wallpapers are generated. The rotation angle for gradient backgrounds is 0."}]},{"kind":"class","name":"videoSizeStickerMarkup","type":"VideoSize","id":228623102,"comment":"An animated profile picture based on a sticker.","arguments":[{"name":"stickerset","type":"InputStickerSet","comment":"Stickerset"},{"name":"sticker_id","type":"long","comment":"Sticker ID"},{"name":"background_colors","type":"int","typeModifiers":{"isVector":true},"comment":"1, 2, 3 or 4 RBG-24 colors used to generate a solid (1), gradient (2) or freeform gradient (3, 4) background, similar to how fill wallpapers are generated. The rotation angle for gradient backgrounds is 0."}]},{"kind":"class","name":"statsGroupTopPoster","type":"StatsGroupTopPoster","id":2634330011,"comment":"Information about an active user in a supergroup","arguments":[{"name":"user_id","type":"int53","comment":"User ID"},{"name":"messages","type":"int","comment":"Number of messages for statistics period in consideration"},{"name":"avg_chars","type":"int","comment":"Average number of characters per message"}]},{"kind":"class","name":"statsGroupTopAdmin","type":"StatsGroupTopAdmin","id":3612888199,"comment":"Information about an active admin in a supergroup","arguments":[{"name":"user_id","type":"int53","comment":"User ID"},{"name":"deleted","type":"int","comment":"Number of deleted messages for statistics period in consideration"},{"name":"kicked","type":"int","comment":"Number of kicked users for statistics period in consideration"},{"name":"banned","type":"int","comment":"Number of banned users for statistics period in consideration"}]},{"kind":"class","name":"statsGroupTopInviter","type":"StatsGroupTopInviter","id":1398765469,"comment":"Information about an active supergroup inviter","arguments":[{"name":"user_id","type":"int53","comment":"User ID"},{"name":"invitations","type":"int","comment":"Number of invitations for statistics period in consideration"}]},{"kind":"class","name":"stats.megagroupStats","type":"stats.MegagroupStats","id":4018141462,"comment":"Supergroup statistics","arguments":[{"name":"period","type":"StatsDateRangeDays","comment":"Period in consideration"},{"name":"members","type":"StatsAbsValueAndPrev","comment":"Member count change for period in consideration"},{"name":"messages","type":"StatsAbsValueAndPrev","comment":"Message number change for period in consideration"},{"name":"viewers","type":"StatsAbsValueAndPrev","comment":"Number of users that viewed messages, for range in consideration"},{"name":"posters","type":"StatsAbsValueAndPrev","comment":"Number of users that posted messages, for range in consideration"},{"name":"growth_graph","type":"StatsGraph","comment":"Supergroup growth graph (absolute subscriber count)"},{"name":"members_graph","type":"StatsGraph","comment":"Members growth (relative subscriber count)"},{"name":"new_members_by_source_graph","type":"StatsGraph","comment":"New members by source graph"},{"name":"languages_graph","type":"StatsGraph","comment":"Subscriber language graph (pie chart)"},{"name":"messages_graph","type":"StatsGraph","comment":"Message activity graph (stacked bar graph, message type)"},{"name":"actions_graph","type":"StatsGraph","comment":"Group activity graph (deleted, modified messages, blocked users)"},{"name":"top_hours_graph","type":"StatsGraph","comment":"Activity per hour graph (absolute)"},{"name":"weekdays_graph","type":"StatsGraph","comment":"Activity per day of week graph (absolute)"},{"name":"top_posters","type":"StatsGroupTopPoster","typeModifiers":{"isVector":true},"comment":"Info about most active group members"},{"name":"top_admins","type":"StatsGroupTopAdmin","typeModifiers":{"isVector":true},"comment":"Info about most active group admins"},{"name":"top_inviters","type":"StatsGroupTopInviter","typeModifiers":{"isVector":true},"comment":"Info about most active group inviters"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Info about users mentioned in statistics"}]},{"kind":"class","name":"globalPrivacySettings","type":"GlobalPrivacySettings","id":1934380235,"comment":"Global privacy settings","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"archive_and_mute_new_noncontact_peers","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to archive and mute new chats from non-contacts"},{"name":"keep_archived_unmuted","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether unmuted chats will be kept in the Archive chat list when they get a new message."},{"name":"keep_archived_folders","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether unmuted chats that are always included or pinned in a folder, will be kept in the Archive chat list when they get a new message. Ignored if keep_archived_unmuted is set."},{"name":"hide_read_marks","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"If this flag is set, the {@link RawInputPrivacyKeyStatusTimestamp} key will also apply to the ability to use {@link messages.RawGetOutboxReadDateRequest} on messages sent to us.
Meaning, users that cannot see our exact last online date due to the current value of the {@link RawInputPrivacyKeyStatusTimestamp} key will receive a 403 USER_PRIVACY_RESTRICTED error when invoking {@link messages.RawGetOutboxReadDateRequest} to fetch the exact read date of a message they sent to us.
The {@link RawUserFull}.read_dates_private flag will be set for users that have this flag enabled."},{"name":"new_noncontact_peers_require_premium","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"If set, only users that have a premium account, are in our contact list, or already have a private chat with us can write to us; a 403 PRIVACY_PREMIUM_REQUIRED error will be emitted otherwise.
The {@link RawUserFull}.contact_require_premium flag will be set for users that have this flag enabled.
To check whether we can write to a user with this flag enabled, if we haven't yet cached all the required information (for example we don't have the {@link RawUserFull} or history of all users while displaying the chat list in the sharing UI) the {@link users.RawGetIsPremiumRequiredToContactRequest} method may be invoked, passing the list of users currently visible in the UI, returning a list of booleans that directly specify whether we can or cannot write to each user.
Premium users only, non-Premium users will receive a PREMIUM_ACCOUNT_REQUIRED error when trying to enable this flag."}]},{"kind":"class","name":"help.countryCode","type":"help.CountryCode","id":1107543535,"comment":"Country code and phone number pattern of a specific country","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"country_code","type":"string","comment":"ISO country code"},{"name":"prefixes","type":"string","typeModifiers":{"predicate":"flags.0","isVector":true},"comment":"Possible phone prefixes"},{"name":"patterns","type":"string","typeModifiers":{"predicate":"flags.1","isVector":true},"comment":"Phone patterns: for example, XXX XXX XXX"}]},{"kind":"class","name":"help.country","type":"help.Country","id":3280440867,"comment":"Name, ISO code, localized name and phone codes/patterns of a specific country","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"hidden","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether this country should not be shown in the list"},{"name":"iso2","type":"string","comment":"ISO code of country"},{"name":"default_name","type":"string","comment":"Name of the country in the country's language"},{"name":"name","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Name of the country in the user's language, if different from the original name"},{"name":"country_codes","type":"help.CountryCode","typeModifiers":{"isVector":true},"comment":"Phone codes/patterns"}]},{"kind":"class","name":"help.countriesListNotModified","type":"help.CountriesList","id":2479628082,"comment":"The country list has not changed","arguments":[]},{"kind":"class","name":"help.countriesList","type":"help.CountriesList","id":2278585758,"comment":"Name, ISO code, localized name and phone codes/patterns of all available countries","arguments":[{"name":"countries","type":"help.Country","typeModifiers":{"isVector":true},"comment":"Name, ISO code, localized name and phone codes/patterns of all available countries"},{"name":"hash","type":"int","comment":"Hash used for caching, for more info click here"}]},{"kind":"class","name":"messageViews","type":"MessageViews","id":1163625789,"comment":"View, forward counter + info about replies of a specific message","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"views","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"View count of message"},{"name":"forwards","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Forward count of message"},{"name":"replies","type":"MessageReplies","typeModifiers":{"predicate":"flags.2"},"comment":"Reply and thread information of message"}]},{"kind":"class","name":"messages.messageViews","type":"messages.MessageViews","id":3066361155,"comment":"View, forward counter + info about replies","arguments":[{"name":"views","type":"MessageViews","typeModifiers":{"isVector":true},"comment":"View, forward counter + info about replies"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Chats mentioned in constructor"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Users mentioned in constructor"}]},{"kind":"class","name":"messages.discussionMessage","type":"messages.DiscussionMessage","id":2788431746,"comment":"Information about a message thread","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"messages","type":"Message","typeModifiers":{"isVector":true},"comment":"The messages from which the thread starts. The messages are returned in reverse chronological order (i.e., in order of decreasing message ID)."},{"name":"max_id","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Message ID of latest reply in this thread"},{"name":"read_inbox_max_id","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Message ID of latest read incoming message in this thread"},{"name":"read_outbox_max_id","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"Message ID of latest read outgoing message in this thread"},{"name":"unread_count","type":"int","comment":"Number of unread messages"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Chats mentioned in constructor"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Users mentioned in constructor"}]},{"kind":"class","name":"messageReplyHeader","type":"MessageReplyHeader","id":2948336091,"comment":"Message replies and thread information","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"reply_to_scheduled","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"This is a reply to a scheduled message."},{"name":"forum_topic","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether this message was sent in a forum topic (except for the General topic)."},{"name":"quote","type":"true","typeModifiers":{"predicate":"flags.9"},"comment":"Whether this message is quoting a part of another message."},{"name":"reply_to_msg_id","type":"int","typeModifiers":{"predicate":"flags.4"},"comment":"ID of message to which this message is replying"},{"name":"reply_to_peer_id","type":"Peer","typeModifiers":{"predicate":"flags.0"},"comment":"For replies sent in channel discussion threads of which the current user is not a member, the discussion group ID"},{"name":"reply_from","type":"MessageFwdHeader","typeModifiers":{"predicate":"flags.5"},"comment":"When replying to a message sent by a certain peer to another chat, contains info about the peer that originally sent the message to that other chat."},{"name":"reply_media","type":"MessageMedia","typeModifiers":{"predicate":"flags.8"},"comment":"When replying to a media sent by a certain peer to another chat, contains the media of the replied-to message."},{"name":"reply_to_top_id","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"ID of the message that started this message thread"},{"name":"quote_text","type":"string","typeModifiers":{"predicate":"flags.6"},"comment":"Used to quote-reply to only a certain section (specified here) of the original message."},{"name":"quote_entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.7","isVector":true},"comment":"Message entities for styled text from the quote_text field."},{"name":"quote_offset","type":"int","typeModifiers":{"predicate":"flags.10"},"comment":"Offset of the message quote_text within the original message (in UTF-16 code units)."}]},{"kind":"class","name":"messageReplyStoryHeader","type":"MessageReplyHeader","id":240843065,"comment":"Represents a reply to a story","arguments":[{"name":"peer","type":"Peer","comment":"Sender of the story."},{"name":"story_id","type":"int","comment":"Story ID"}]},{"kind":"class","name":"messageReplies","type":"MessageReplies","id":2211844034,"comment":"Info about the comment section of a channel post, or a simple message thread","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"comments","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether this constructor contains information about the comment section of a channel post, or a simple message thread"},{"name":"replies","type":"int","comment":"Contains the total number of replies in this thread or comment section."},{"name":"replies_pts","type":"int","comment":"PTS of the message that started this thread."},{"name":"recent_repliers","type":"Peer","typeModifiers":{"predicate":"flags.1","isVector":true},"comment":"For channel post comments, contains information about the last few comment posters for a specific thread, to show a small list of commenter profile pictures in client previews."},{"name":"channel_id","type":"int53","typeModifiers":{"predicate":"flags.0"},"comment":"For channel post comments, contains the ID of the associated discussion supergroup"},{"name":"max_id","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"ID of the latest message in this thread or comment section."},{"name":"read_max_id","type":"int","typeModifiers":{"predicate":"flags.3"},"comment":"Contains the ID of the latest read message in this thread or comment section."}]},{"kind":"class","name":"peerBlocked","type":"PeerBlocked","id":3908927508,"comment":"Information about a blocked peer","arguments":[{"name":"peer_id","type":"Peer","comment":"Peer ID"},{"name":"date","type":"int","comment":"When was the peer blocked"}]},{"kind":"class","name":"stats.messageStats","type":"stats.MessageStats","id":2145983508,"comment":"Message statistics","arguments":[{"name":"views_graph","type":"StatsGraph","comment":"Message view graph"},{"name":"reactions_by_emotion_graph","type":"StatsGraph","comment":"A graph containing the number of reactions on stories categorized by emotion"}]},{"kind":"class","name":"groupCallDiscarded","type":"GroupCall","id":2004925620,"comment":"An ended group call","arguments":[{"name":"id","type":"long","comment":"Group call ID"},{"name":"access_hash","type":"long","comment":"Group call access hash"},{"name":"duration","type":"int","comment":"Group call duration"}]},{"kind":"class","name":"groupCall","type":"GroupCall","id":3583468812,"comment":"Info about a group call or livestream","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"join_muted","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the user should be muted upon joining the call"},{"name":"can_change_join_muted","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether the current user can change the value of the join_muted flag using {@link phone.RawToggleGroupCallSettingsRequest}"},{"name":"join_date_asc","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"Specifies the ordering to use when locally sorting by date and displaying in the UI group call participants."},{"name":"schedule_start_subscribed","type":"true","typeModifiers":{"predicate":"flags.8"},"comment":"Whether we subscribed to the scheduled call"},{"name":"can_start_video","type":"true","typeModifiers":{"predicate":"flags.9"},"comment":"Whether you can start streaming video into the call"},{"name":"record_video_active","type":"true","typeModifiers":{"predicate":"flags.11"},"comment":"Whether the group call is currently being recorded"},{"name":"rtmp_stream","type":"true","typeModifiers":{"predicate":"flags.12"},"comment":"Whether RTMP streams are allowed"},{"name":"listeners_hidden","type":"true","typeModifiers":{"predicate":"flags.13"},"comment":"Whether the listeners list is hidden and cannot be fetched using {@link phone.RawGetGroupParticipantsRequest}. The phone.groupParticipants.count and groupCall.participants_count counters will still include listeners."},{"name":"id","type":"long","comment":"Group call ID"},{"name":"access_hash","type":"long","comment":"Group call access hash"},{"name":"participants_count","type":"int","comment":"Participant count"},{"name":"title","type":"string","typeModifiers":{"predicate":"flags.3"},"comment":"Group call title"},{"name":"stream_dc_id","type":"int","typeModifiers":{"predicate":"flags.4"},"comment":"DC ID to be used for livestream chunks"},{"name":"record_start_date","type":"int","typeModifiers":{"predicate":"flags.5"},"comment":"When was the recording started"},{"name":"schedule_date","type":"int","typeModifiers":{"predicate":"flags.7"},"comment":"When is the call scheduled to start"},{"name":"unmuted_video_count","type":"int","typeModifiers":{"predicate":"flags.10"},"comment":"Number of people currently streaming video into the call"},{"name":"unmuted_video_limit","type":"int","comment":"Maximum number of people allowed to stream video into the call"},{"name":"version","type":"int","comment":"Version"}]},{"kind":"class","name":"inputGroupCall","type":"InputGroupCall","id":3635053583,"comment":"Points to a specific group call","arguments":[{"name":"id","type":"long","comment":"Group call ID"},{"name":"access_hash","type":"long","comment":"Group call access hash"}]},{"kind":"class","name":"groupCallParticipant","type":"GroupCallParticipant","id":3953538814,"comment":"Info about a group call participant","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"muted","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the participant is muted"},{"name":"left","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the participant has left"},{"name":"can_self_unmute","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether the participant can unmute themselves"},{"name":"just_joined","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"Whether the participant has just joined"},{"name":"versioned","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"If set, and {@link RawUpdateGroupCallParticipants}.version < locally stored call.version, info about this participant should be ignored. If (...), and {@link RawUpdateGroupCallParticipants}.version > call.version+1, the participant list should be refetched using {@link phone.RawGetGroupParticipantsRequest}."},{"name":"min","type":"true","typeModifiers":{"predicate":"flags.8"},"comment":"If not set, the volume and muted_by_you fields can be safely used to overwrite locally cached information; otherwise, volume will contain valid information only if volume_by_admin is set both in the cache and in the received constructor."},{"name":"muted_by_you","type":"true","typeModifiers":{"predicate":"flags.9"},"comment":"Whether this participant was muted by the current user"},{"name":"volume_by_admin","type":"true","typeModifiers":{"predicate":"flags.10"},"comment":"Whether our volume can only changed by an admin"},{"name":"self","type":"true","typeModifiers":{"predicate":"flags.12"},"comment":"Whether this participant is the current user"},{"name":"video_joined","type":"true","typeModifiers":{"predicate":"flags.15"},"comment":"Whether this participant is currently broadcasting video"},{"name":"peer","type":"Peer","comment":"Peer information"},{"name":"date","type":"int","comment":"When did this participant join the group call"},{"name":"active_date","type":"int","typeModifiers":{"predicate":"flags.3"},"comment":"When was this participant last active in the group call"},{"name":"source","type":"int","comment":"Source ID"},{"name":"volume","type":"int","typeModifiers":{"predicate":"flags.7"},"comment":"Volume, if not set the volume is set to 100%."},{"name":"about","type":"string","typeModifiers":{"predicate":"flags.11"},"comment":"Info about this participant"},{"name":"raise_hand_rating","type":"long","typeModifiers":{"predicate":"flags.13"},"comment":"Specifies the UI visualization order of peers with raised hands: peers with a higher rating should be showed first in the list."},{"name":"video","type":"GroupCallParticipantVideo","typeModifiers":{"predicate":"flags.6"},"comment":"Info about the video stream the participant is currently broadcasting"},{"name":"presentation","type":"GroupCallParticipantVideo","typeModifiers":{"predicate":"flags.14"},"comment":"Info about the screen sharing stream the participant is currently broadcasting"}]},{"kind":"class","name":"phone.groupCall","type":"phone.GroupCall","id":2658302637,"comment":"Contains info about a group call, and partial info about its participants.","arguments":[{"name":"call","type":"GroupCall","comment":"Info about the group call"},{"name":"participants","type":"GroupCallParticipant","typeModifiers":{"isVector":true},"comment":"A partial list of participants."},{"name":"participants_next_offset","type":"string","comment":"Next offset to use when fetching the remaining participants using {@link phone.RawGetGroupParticipantsRequest}"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Chats mentioned in the participants vector"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Users mentioned in the participants vector"}]},{"kind":"class","name":"phone.groupParticipants","type":"phone.GroupParticipants","id":4101460406,"comment":"Info about the participants of a group call or livestream","arguments":[{"name":"count","type":"int","comment":"Number of participants"},{"name":"participants","type":"GroupCallParticipant","typeModifiers":{"isVector":true},"comment":"List of participants"},{"name":"next_offset","type":"string","comment":"If not empty, the specified list of participants is partial, and more participants can be fetched specifying this parameter as offset in {@link phone.RawGetGroupParticipantsRequest}."},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Mentioned chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Mentioned users"},{"name":"version","type":"int","comment":"Version info"}]},{"kind":"class","name":"inlineQueryPeerTypeSameBotPM","type":"InlineQueryPeerType","id":813821341,"comment":"Peer type: private chat with the bot itself","arguments":[]},{"kind":"class","name":"inlineQueryPeerTypePM","type":"InlineQueryPeerType","id":2201751468,"comment":"Peer type: private chat","arguments":[]},{"kind":"class","name":"inlineQueryPeerTypeChat","type":"InlineQueryPeerType","id":3613836554,"comment":"Peer type: chat","arguments":[]},{"kind":"class","name":"inlineQueryPeerTypeMegagroup","type":"InlineQueryPeerType","id":1589952067,"comment":"Peer type: supergroup","arguments":[]},{"kind":"class","name":"inlineQueryPeerTypeBroadcast","type":"InlineQueryPeerType","id":1664413338,"comment":"Peer type: channel","arguments":[]},{"kind":"class","name":"inlineQueryPeerTypeBotPM","type":"InlineQueryPeerType","id":238759180,"comment":"Peer type: private chat with a bot.","arguments":[]},{"kind":"class","name":"messages.historyImport","type":"messages.HistoryImport","id":375566091,"comment":"ID of a specific chat import session, click here for more info ».","arguments":[{"name":"id","type":"long","comment":"History import ID"}]},{"kind":"class","name":"messages.historyImportParsed","type":"messages.HistoryImportParsed","id":1578088377,"comment":"Contains information about a chat export file generated by a foreign chat app, click here for more info.
\nIf neither the pm or group flags are set, the specified chat export was generated from a chat of unknown type.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"pm","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"The chat export file was generated from a private chat."},{"name":"group","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"The chat export file was generated from a group chat."},{"name":"title","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"Title of the chat."}]},{"kind":"class","name":"messages.affectedFoundMessages","type":"messages.AffectedFoundMessages","id":4019011180,"comment":"Messages found and affected by changes","arguments":[{"name":"pts","type":"int","comment":"Event count after generation"},{"name":"pts_count","type":"int","comment":"Number of events that were generated"},{"name":"offset","type":"int","comment":"If bigger than zero, the request must be repeated to remove more messages"},{"name":"messages","type":"int","typeModifiers":{"isVector":true},"comment":"Affected message IDs"}]},{"kind":"class","name":"chatInviteImporter","type":"ChatInviteImporter","id":2354765785,"comment":"When and which user joined the chat using a chat invite","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"requested","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether this user currently has a pending join request »"},{"name":"via_chatlist","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"The participant joined by importing a chat folder deep link »."},{"name":"user_id","type":"int53","comment":"The user"},{"name":"date","type":"int","comment":"When did the user join"},{"name":"about","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"For users with pending requests, contains bio of the user that requested to join"},{"name":"approved_by","type":"int53","typeModifiers":{"predicate":"flags.1"},"comment":"The administrator that approved the join request » of the user"}]},{"kind":"class","name":"messages.exportedChatInvites","type":"messages.ExportedChatInvites","id":3183881676,"comment":"Info about chat invites exported by a certain admin.","arguments":[{"name":"count","type":"int","comment":"Number of invites exported by the admin"},{"name":"invites","type":"ExportedChatInvite","typeModifiers":{"isVector":true},"comment":"Exported invites"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Info about the admin"}]},{"kind":"class","name":"messages.exportedChatInvite","type":"messages.ExportedChatInvite","id":410107472,"comment":"Info about a chat invite","arguments":[{"name":"invite","type":"ExportedChatInvite","comment":"Info about the chat invite"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Mentioned users"}]},{"kind":"class","name":"messages.exportedChatInviteReplaced","type":"messages.ExportedChatInvite","id":572915951,"comment":"The specified chat invite was replaced with another one","arguments":[{"name":"invite","type":"ExportedChatInvite","comment":"The replaced chat invite"},{"name":"new_invite","type":"ExportedChatInvite","comment":"The invite that replaces the previous invite"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Mentioned users"}]},{"kind":"class","name":"messages.chatInviteImporters","type":"messages.ChatInviteImporters","id":2176233482,"comment":"Info about the users that joined the chat using a specific chat invite","arguments":[{"name":"count","type":"int","comment":"Number of users that joined"},{"name":"importers","type":"ChatInviteImporter","typeModifiers":{"isVector":true},"comment":"The users that joined"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"The users that joined"}]},{"kind":"class","name":"chatAdminWithInvites","type":"ChatAdminWithInvites","id":4075613987,"comment":"Info about chat invites generated by admins.","arguments":[{"name":"admin_id","type":"int53","comment":"The admin"},{"name":"invites_count","type":"int","comment":"Number of invites generated by the admin"},{"name":"revoked_invites_count","type":"int","comment":"Number of revoked invites"}]},{"kind":"class","name":"messages.chatAdminsWithInvites","type":"messages.ChatAdminsWithInvites","id":3063640791,"comment":"Info about chat invites generated by admins.","arguments":[{"name":"admins","type":"ChatAdminWithInvites","typeModifiers":{"isVector":true},"comment":"Info about chat invites generated by admins."},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Mentioned users"}]},{"kind":"class","name":"messages.checkedHistoryImportPeer","type":"messages.CheckedHistoryImportPeer","id":2723014423,"comment":"Contains a confirmation text to be shown to the user, upon importing chat history, click here for more info ».","arguments":[{"name":"confirm_text","type":"string","comment":"A confirmation text to be shown to the user, upon importing chat history »."}]},{"kind":"class","name":"phone.joinAsPeers","type":"phone.JoinAsPeers","id":2951045695,"comment":"A list of peers that can be used to join a group call, presenting yourself as a specific user/channel.","arguments":[{"name":"peers","type":"Peer","typeModifiers":{"isVector":true},"comment":"Peers"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Chats mentioned in the peers vector"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Users mentioned in the peers vector"}]},{"kind":"class","name":"phone.exportedGroupCallInvite","type":"phone.ExportedGroupCallInvite","id":541839704,"comment":"An invite to a group call or livestream","arguments":[{"name":"link","type":"string","comment":"Invite link"}]},{"kind":"class","name":"groupCallParticipantVideoSourceGroup","type":"GroupCallParticipantVideoSourceGroup","id":3702593719,"comment":"Describes a group of video synchronization source identifiers","arguments":[{"name":"semantics","type":"string","comment":"SDP semantics"},{"name":"sources","type":"int","typeModifiers":{"isVector":true},"comment":"Source IDs"}]},{"kind":"class","name":"groupCallParticipantVideo","type":"GroupCallParticipantVideo","id":1735736008,"comment":"Info about a video stream","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"paused","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the stream is currently paused"},{"name":"endpoint","type":"string","comment":"Endpoint"},{"name":"source_groups","type":"GroupCallParticipantVideoSourceGroup","typeModifiers":{"isVector":true},"comment":"Source groups"},{"name":"audio_source","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Audio source ID"}]},{"kind":"class","name":"stickers.suggestedShortName","type":"stickers.SuggestedShortName","id":2248056895,"comment":"A suggested short name for a stickerpack","arguments":[{"name":"short_name","type":"string","comment":"Suggested short name"}]},{"kind":"class","name":"botCommandScopeDefault","type":"BotCommandScope","id":795652779,"comment":"The commands will be valid in all dialogs","arguments":[]},{"kind":"class","name":"botCommandScopeUsers","type":"BotCommandScope","id":1011811544,"comment":"The specified bot commands will only be valid in all private chats with users.","arguments":[]},{"kind":"class","name":"botCommandScopeChats","type":"BotCommandScope","id":1877059713,"comment":"The specified bot commands will be valid in all groups and supergroups.","arguments":[]},{"kind":"class","name":"botCommandScopeChatAdmins","type":"BotCommandScope","id":3114950762,"comment":"The specified bot commands will be valid only for chat administrators, in all groups and supergroups.","arguments":[]},{"kind":"class","name":"botCommandScopePeer","type":"BotCommandScope","id":3684534653,"comment":"The specified bot commands will be valid only in a specific dialog.","arguments":[{"name":"peer","type":"InputPeer","comment":"The dialog"}]},{"kind":"class","name":"botCommandScopePeerAdmins","type":"BotCommandScope","id":1071145937,"comment":"The specified bot commands will be valid for all admins of the specified group or supergroup.","arguments":[{"name":"peer","type":"InputPeer","comment":"The chat"}]},{"kind":"class","name":"botCommandScopePeerUser","type":"BotCommandScope","id":169026035,"comment":"The specified bot commands will be valid only for a specific user in the specified group or supergroup.","arguments":[{"name":"peer","type":"InputPeer","comment":"The chat"},{"name":"user_id","type":"InputUser","comment":"The user"}]},{"kind":"class","name":"account.resetPasswordFailedWait","type":"account.ResetPasswordResult","id":3816265825,"comment":"You recently requested a password reset that was canceled, please wait until the specified date before requesting another reset.","arguments":[{"name":"retry_date","type":"int","comment":"Wait until this date before requesting another reset."}]},{"kind":"class","name":"account.resetPasswordRequestedWait","type":"account.ResetPasswordResult","id":3924819069,"comment":"You successfully requested a password reset, please wait until the specified date before finalizing the reset.","arguments":[{"name":"until_date","type":"int","comment":"Wait until this date before finalizing the reset."}]},{"kind":"class","name":"account.resetPasswordOk","type":"account.ResetPasswordResult","id":3911636542,"comment":"The 2FA password was reset successfully.","arguments":[]},{"kind":"class","name":"sponsoredMessage","type":"SponsoredMessage","id":3186488678,"comment":"A sponsored message.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"recommended","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Whether the message needs to be labeled as \"recommended\" instead of \"sponsored\""},{"name":"can_report","type":"true","typeModifiers":{"predicate":"flags.12"},"comment":"Whether this message can be reported as specified here »."},{"name":"random_id","type":"bytes","comment":"Message ID"},{"name":"url","type":"string","comment":"Contains the URL to open when the user clicks on the sponsored message."},{"name":"title","type":"string","comment":"Contains the title of the sponsored message."},{"name":"message","type":"string","comment":"Sponsored message"},{"name":"entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.1","isVector":true},"comment":"Message entities for styled text in message."},{"name":"photo","type":"Photo","typeModifiers":{"predicate":"flags.6"},"comment":"If set, contains a custom profile photo bubble that should be displayed for the sponsored message, like for messages sent in groups."},{"name":"color","type":"PeerColor","typeModifiers":{"predicate":"flags.13"},"comment":"If set, the sponsored message should use the message accent color » specified in color."},{"name":"button_text","type":"string","comment":"Label of the sponsored message button."},{"name":"sponsor_info","type":"string","typeModifiers":{"predicate":"flags.7"},"comment":"If set, contains additional information about the sponsor to be shown along with the message."},{"name":"additional_info","type":"string","typeModifiers":{"predicate":"flags.8"},"comment":"If set, contains additional information about the sponsored message to be shown along with the message."}]},{"kind":"class","name":"messages.sponsoredMessages","type":"messages.SponsoredMessages","id":3387825543,"comment":"A set of sponsored messages associated to a channel","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"posts_between","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"If set, specifies the minimum number of messages between shown sponsored messages; otherwise, only one sponsored message must be shown after all ordinary messages."},{"name":"messages","type":"SponsoredMessage","typeModifiers":{"isVector":true},"comment":"Sponsored messages"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Chats mentioned in the sponsored messages"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Users mentioned in the sponsored messages"}]},{"kind":"class","name":"messages.sponsoredMessagesEmpty","type":"messages.SponsoredMessages","id":406407439,"comment":"No sponsored messages are available.","arguments":[]},{"kind":"class","name":"searchResultsCalendarPeriod","type":"SearchResultsCalendarPeriod","id":3383776159,"comment":"Information about found messages sent on a specific day, used to split the messages in {@link messages.RawSearchResultsCalendar} constructors by days.\n\nMultiple searchResultsCalendarPeriod constructors are returned in {@link messages.RawSearchResultsCalendar}, each containing information about the first, last and total number of messages matching the filter that were sent on a specific day.","arguments":[{"name":"date","type":"int","comment":"The day this object is referring to."},{"name":"min_msg_id","type":"int","comment":"First message ID that was sent on this day."},{"name":"max_msg_id","type":"int","comment":"Last message ID that was sent on this day."},{"name":"count","type":"int","comment":"All messages that were sent on this day."}]},{"kind":"class","name":"messages.searchResultsCalendar","type":"messages.SearchResultsCalendar","id":343859772,"comment":"Information about found messages sent on a specific day","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"inexact","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, indicates that the results may be inexact"},{"name":"count","type":"int","comment":"Total number of results matching query"},{"name":"min_date","type":"int","comment":"Starting timestamp of attached messages"},{"name":"min_msg_id","type":"int","comment":"Ending timestamp of attached messages"},{"name":"offset_id_offset","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Indicates the absolute position of messages[0] within the total result set with count count.
This is useful, for example, if we need to display a progress/total counter (like photo 134 of 200, for all media in a chat, we could simply use photo ${offset_id_offset} of ${count}."},{"name":"periods","type":"SearchResultsCalendarPeriod","typeModifiers":{"isVector":true},"comment":"Used to split the messages by days: multiple SearchResultsCalendarPeriod constructors are returned, each containing information about the first, last and total number of messages matching the filter that were sent on a specific day.
This information can be easily used to split the returned messages by day."},{"name":"messages","type":"Message","typeModifiers":{"isVector":true},"comment":"Messages"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Mentioned chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Mentioned users"}]},{"kind":"class","name":"searchResultPosition","type":"SearchResultsPosition","id":2137295719,"comment":"Information about a message in a specific position","arguments":[{"name":"msg_id","type":"int","comment":"Message ID"},{"name":"date","type":"int","comment":"When was the message sent"},{"name":"offset","type":"int","comment":"0-based message position in the full list of suitable messages"}]},{"kind":"class","name":"messages.searchResultsPositions","type":"messages.SearchResultsPositions","id":1404185519,"comment":"Information about sparse positions of messages","arguments":[{"name":"count","type":"int","comment":"Total number of found messages"},{"name":"positions","type":"SearchResultsPosition","typeModifiers":{"isVector":true},"comment":"List of message positions"}]},{"kind":"class","name":"channels.sendAsPeers","type":"channels.SendAsPeers","id":4103516358,"comment":"A list of peers that can be used to send messages in a specific group","arguments":[{"name":"peers","type":"SendAsPeer","typeModifiers":{"isVector":true},"comment":"Peers that can be used to send messages to the group"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Mentioned chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Mentioned users"}]},{"kind":"class","name":"users.userFull","type":"users.UserFull","id":997004590,"comment":"Full user information","arguments":[{"name":"full_user","type":"UserFull","comment":"Full user information"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Mentioned chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Mentioned users"}]},{"kind":"class","name":"messages.peerSettings","type":"messages.PeerSettings","id":1753266509,"comment":"Peer settings","arguments":[{"name":"settings","type":"PeerSettings","comment":"Peer settings"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Mentioned chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Mentioned users"}]},{"kind":"class","name":"auth.loggedOut","type":"auth.LoggedOut","id":3282207583,"comment":"Future auth token » to be used on subsequent authorizations","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"future_auth_token","type":"bytes","typeModifiers":{"predicate":"flags.0"},"comment":"Future auth token » to be used on subsequent authorizations"}]},{"kind":"class","name":"reactionCount","type":"ReactionCount","id":2748435328,"comment":"Reactions","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"chosen_order","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"If set, indicates that the current user also sent this reaction.
The integer value indicates when was the reaction added: the bigger the value, the newer the reaction."},{"name":"reaction","type":"Reaction","comment":"The reaction."},{"name":"count","type":"int","comment":"Number of users that reacted with this emoji."}]},{"kind":"class","name":"messageReactions","type":"MessageReactions","id":1328256121,"comment":"Message reactions »","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"min","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Similar to min objects, used for message reaction » constructors that are the same for all users so they don't have the reactions sent by the current user (you can use {@link messages.RawGetMessagesReactionsRequest} to get the full reaction info)."},{"name":"can_see_list","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether {@link messages.RawGetMessageReactionsListRequest} can be used to see how each specific peer reacted to the message"},{"name":"reactions_as_tags","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"If set or if there are no reactions, all present and future reactions should be treated as message tags, see here » for more info."},{"name":"results","type":"ReactionCount","typeModifiers":{"isVector":true},"comment":"Reactions"},{"name":"recent_reactions","type":"MessagePeerReaction","typeModifiers":{"predicate":"flags.1","isVector":true},"comment":"List of recent peers and their reactions"}]},{"kind":"class","name":"messages.messageReactionsList","type":"messages.MessageReactionsList","id":834488621,"comment":"List of peers that reacted to a specific message","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"count","type":"int","comment":"Total number of reactions matching query"},{"name":"reactions","type":"MessagePeerReaction","typeModifiers":{"isVector":true},"comment":"List of peers that reacted to a specific message"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Mentioned chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Mentioned users"},{"name":"next_offset","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"If set, indicates the next offset to use to load more results by invoking {@link messages.RawGetMessageReactionsListRequest}."}]},{"kind":"class","name":"availableReaction","type":"AvailableReaction","id":3229084673,"comment":"Animations associated with a message reaction","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"inactive","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If not set, the reaction can be added to new messages and enabled in chats."},{"name":"premium","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether this reaction can only be used by Telegram Premium users"},{"name":"reaction","type":"string","comment":"Reaction emoji"},{"name":"title","type":"string","comment":"Reaction description"},{"name":"static_icon","type":"Document","comment":"Static icon for the reaction"},{"name":"appear_animation","type":"Document","comment":"The animated sticker to show when the user opens the reaction dropdown"},{"name":"select_animation","type":"Document","comment":"The animated sticker to show when the user hovers over the reaction"},{"name":"activate_animation","type":"Document","comment":"The animated sticker to show when the reaction is chosen and activated"},{"name":"effect_animation","type":"Document","comment":"The background effect (still an animated sticker) to play under the activate_animation, when the reaction is chosen and activated"},{"name":"around_animation","type":"Document","typeModifiers":{"predicate":"flags.1"},"comment":"The animation that plays around the button when you press an existing reaction (played together with center_icon)."},{"name":"center_icon","type":"Document","typeModifiers":{"predicate":"flags.1"},"comment":"The animation of the emoji inside the button when you press an existing reaction (played together with around_animation)."}]},{"kind":"class","name":"messages.availableReactionsNotModified","type":"messages.AvailableReactions","id":2668042583,"comment":"No new reactions are available","arguments":[]},{"kind":"class","name":"messages.availableReactions","type":"messages.AvailableReactions","id":1989032621,"comment":"Animations and metadata associated with message reactions »","arguments":[{"name":"hash","type":"int","comment":"Hash used for caching, for more info click here"},{"name":"reactions","type":"AvailableReaction","typeModifiers":{"isVector":true},"comment":"Animations and metadata associated with message reactions »"}]},{"kind":"class","name":"messagePeerReaction","type":"MessagePeerReaction","id":2356786748,"comment":"How a certain peer reacted to the message","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"big","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the specified message reaction » should elicit a bigger and longer reaction"},{"name":"unread","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the reaction wasn't yet marked as read by the current user"},{"name":"my","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Starting from layer 159, {@link messages.RawSendReactionRequest} will send reactions from the peer (user or channel) specified using {@link messages.RawSaveDefaultSendAsRequest}.
If set, this flag indicates that this reaction was sent by us, even if the peer doesn't point to the current account."},{"name":"peer_id","type":"Peer","comment":"Peer that reacted to the message"},{"name":"date","type":"int","comment":"When was this reaction added"},{"name":"reaction","type":"Reaction","comment":"Reaction emoji"}]},{"kind":"class","name":"groupCallStreamChannel","type":"GroupCallStreamChannel","id":2162903215,"comment":"Info about an RTMP stream in a group call or livestream","arguments":[{"name":"channel","type":"int","comment":"Channel ID"},{"name":"scale","type":"int","comment":"Specifies the duration of the video segment to fetch in milliseconds, by bitshifting 1000 to the right scale times: duration_ms := 1000 >> scale."},{"name":"last_timestamp_ms","type":"long","comment":"Last seen timestamp to easily start fetching livestream chunks using {@link RawInputGroupCallStream}"}]},{"kind":"class","name":"phone.groupCallStreamChannels","type":"phone.GroupCallStreamChannels","id":3504636594,"comment":"Info about RTMP streams in a group call or livestream","arguments":[{"name":"channels","type":"GroupCallStreamChannel","typeModifiers":{"isVector":true},"comment":"RTMP streams"}]},{"kind":"class","name":"phone.groupCallStreamRtmpUrl","type":"phone.GroupCallStreamRtmpUrl","id":767505458,"comment":"RTMP URL and stream key to be used in streaming software","arguments":[{"name":"url","type":"string","comment":"RTMP URL"},{"name":"key","type":"string","comment":"Stream key"}]},{"kind":"class","name":"attachMenuBotIconColor","type":"AttachMenuBotIconColor","id":1165423600,"comment":"Represents an attachment menu icon color for bot mini apps »","arguments":[{"name":"name","type":"string","comment":"One of the following values:
light_icon - Color of the attachment menu icon (light mode)
light_text - Color of the attachment menu label, once selected (light mode)
dark_icon - Color of the attachment menu icon (dark mode)
dark_text - Color of the attachment menu label, once selected (dark mode)"},{"name":"color","type":"int","comment":"Color in RGB24 format"}]},{"kind":"class","name":"attachMenuBotIcon","type":"AttachMenuBotIcon","id":2997303403,"comment":"Represents an attachment menu icon for bot mini apps »","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"name","type":"string","comment":"One of the following values: note that animated icons must be played when the user clicks on the button, activating the bot mini app.

default_static - Default attachment menu icon in SVG format
placeholder_static - Default placeholder for opened Web Apps in SVG format
ios_static - Attachment menu icon in SVG format for the official iOS app
ios_animated - Animated attachment menu icon in TGS format for the official iOS app
android_animated - Animated attachment menu icon in TGS format for the official Android app
macos_animated - Animated attachment menu icon in TGS format for the official native Mac OS app
ios_side_menu_static - Side menu icon in PNG format for the official iOS app
android_side_menu_static - Side menu icon in SVG format for the official android app
macos_side_menu_static - Side menu icon in PNG format for the official native Mac OS app"},{"name":"icon","type":"Document","comment":"The actual icon file."},{"name":"colors","type":"AttachMenuBotIconColor","typeModifiers":{"predicate":"flags.0","isVector":true},"comment":"Attachment menu icon colors."}]},{"kind":"class","name":"attachMenuBot","type":"AttachMenuBot","id":3641544190,"comment":"Represents a bot mini app that can be launched from the attachment/side menu »\n\nAt least one of the show_in_attach_menu or the show_in_side_menu flags will always be set.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"inactive","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, before launching the mini app the client should ask the user to add the mini app to the attachment/side menu, and only if the user accepts, after invoking {@link messages.RawToggleBotInAttachMenuRequest} the app should be opened."},{"name":"has_settings","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Deprecated flag, can be ignored."},{"name":"request_write_access","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether the bot would like to send messages to the user."},{"name":"show_in_attach_menu","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether, when installed, an attachment menu entry should be shown for the Mini App."},{"name":"show_in_side_menu","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"Whether, when installed, an entry in the main view side menu should be shown for the Mini App."},{"name":"side_menu_disclaimer_needed","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"If inactive if set and the user hasn't previously accepted the third-party mini apps Terms of Service for this bot, when showing the mini app installation prompt, an additional mandatory checkbox to accept the mini apps TOS and a disclaimer indicating that this Mini App is not affiliated to Telegram should be shown."},{"name":"bot_id","type":"int53","comment":"Bot ID"},{"name":"short_name","type":"string","comment":"Attachment menu item name"},{"name":"peer_types","type":"AttachMenuPeerType","typeModifiers":{"predicate":"flags.3","isVector":true},"comment":"List of dialog types where this attachment menu entry should be shown"},{"name":"icons","type":"AttachMenuBotIcon","typeModifiers":{"isVector":true},"comment":"List of platform-specific static icons and animations to use for the attachment menu button"}]},{"kind":"class","name":"attachMenuBotsNotModified","type":"AttachMenuBots","id":4057500252,"comment":"The list of bot mini apps hasn't changed","arguments":[]},{"kind":"class","name":"attachMenuBots","type":"AttachMenuBots","id":1011024320,"comment":"Represents a list of bot mini apps that can be launched from the attachment menu »","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here"},{"name":"bots","type":"AttachMenuBot","typeModifiers":{"isVector":true},"comment":"List of bot mini apps that can be launched from the attachment menu »"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Info about related users/bots"}]},{"kind":"class","name":"attachMenuBotsBot","type":"AttachMenuBotsBot","id":2478794367,"comment":"Represents a bot mini app that can be launched from the attachment menu »","arguments":[{"name":"bot","type":"AttachMenuBot","comment":"Represents a bot mini app that can be launched from the attachment menu »
"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Info about related users and bots"}]},{"kind":"class","name":"webViewResultUrl","type":"WebViewResult","id":1294139288,"comment":"Contains the webview URL with appropriate theme and user info parameters added","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"fullsize","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"If set, the app must be opened in fullsize mode instead of compact mode."},{"name":"query_id","type":"long","typeModifiers":{"predicate":"flags.0"},"comment":"Webview session ID (only returned by inline button mini apps, menu button mini apps, attachment menu mini apps)."},{"name":"url","type":"string","comment":"Webview URL to open"}]},{"kind":"class","name":"webViewMessageSent","type":"WebViewMessageSent","id":211046684,"comment":"Info about a sent inline webview message","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"msg_id","type":"InputBotInlineMessageID","typeModifiers":{"predicate":"flags.0"},"comment":"Message ID"}]},{"kind":"class","name":"botMenuButtonDefault","type":"BotMenuButton","id":1966318984,"comment":"Placeholder bot menu button never returned to users: see the docs for more info.","arguments":[]},{"kind":"class","name":"botMenuButtonCommands","type":"BotMenuButton","id":1113113093,"comment":"Bot menu button that opens the bot command list when clicked.","arguments":[]},{"kind":"class","name":"botMenuButton","type":"BotMenuButton","id":3350559974,"comment":"Bot menu button that opens a web app when clicked.","arguments":[{"name":"text","type":"string","comment":"Title to be displayed on the menu button instead of 'Menu'"},{"name":"url","type":"string","comment":"URL of a web app to open when the user clicks on the button"}]},{"kind":"class","name":"account.savedRingtonesNotModified","type":"account.SavedRingtones","id":4227262641,"comment":"The notification sound list hasn't changed.","arguments":[]},{"kind":"class","name":"account.savedRingtones","type":"account.SavedRingtones","id":3253284037,"comment":"A list of saved notification sounds","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here"},{"name":"ringtones","type":"Document","typeModifiers":{"isVector":true},"comment":"Saved notification sounds"}]},{"kind":"class","name":"notificationSoundDefault","type":"NotificationSound","id":2548612798,"comment":"Indicates the default notification sound should be used","arguments":[]},{"kind":"class","name":"notificationSoundNone","type":"NotificationSound","id":1863070943,"comment":"No notification sound should be used","arguments":[]},{"kind":"class","name":"notificationSoundLocal","type":"NotificationSound","id":2198575844,"comment":"Indicates a specific local notification sound should be used","arguments":[{"name":"title","type":"string","comment":"Notification sound title"},{"name":"data","type":"string","comment":"Notification sound identifier (arbitrary data used by the client to identify a specific local notification sound)"}]},{"kind":"class","name":"notificationSoundRingtone","type":"NotificationSound","id":4285300809,"comment":"A specific previously uploaded notification sound should be used","arguments":[{"name":"id","type":"long","comment":"Document ID of notification sound uploaded using {@link account.RawUploadRingtoneRequest}"}]},{"kind":"class","name":"account.savedRingtone","type":"account.SavedRingtone","id":3072737133,"comment":"The notification sound was already in MP3 format and was saved without any modification","arguments":[]},{"kind":"class","name":"account.savedRingtoneConverted","type":"account.SavedRingtone","id":523271863,"comment":"The notification sound was not in MP3 format and was successfully converted and saved, use the returned Document to refer to the notification sound from now on","arguments":[{"name":"document","type":"Document","comment":"The converted notification sound"}]},{"kind":"class","name":"attachMenuPeerTypeSameBotPM","type":"AttachMenuPeerType","id":2104224014,"comment":"The bot attachment menu entry is available in the chat with the bot that offers it","arguments":[]},{"kind":"class","name":"attachMenuPeerTypeBotPM","type":"AttachMenuPeerType","id":3274439194,"comment":"The bot attachment menu entry is available in private chats with other bots (excluding the bot that offers the current attachment menu)","arguments":[]},{"kind":"class","name":"attachMenuPeerTypePM","type":"AttachMenuPeerType","id":4047950623,"comment":"The bot attachment menu entry is available in private chats with other users (not bots)","arguments":[]},{"kind":"class","name":"attachMenuPeerTypeChat","type":"AttachMenuPeerType","id":84480319,"comment":"The bot attachment menu entry is available in groups and supergroups","arguments":[]},{"kind":"class","name":"attachMenuPeerTypeBroadcast","type":"AttachMenuPeerType","id":2080104188,"comment":"The bot attachment menu entry is available in channels","arguments":[]},{"kind":"class","name":"inputInvoiceMessage","type":"InputInvoice","id":3317000281,"comment":"An invoice contained in a {@link RawMessageMediaInvoice} message or paid media ».","arguments":[{"name":"peer","type":"InputPeer","comment":"Chat where the invoice/paid media was sent"},{"name":"msg_id","type":"int","comment":"Message ID"}]},{"kind":"class","name":"inputInvoiceSlug","type":"InputInvoice","id":3274099439,"comment":"An invoice slug taken from an invoice deep link or from the premium_invoice_slug app config parameter »","arguments":[{"name":"slug","type":"string","comment":"The invoice slug"}]},{"kind":"class","name":"inputInvoicePremiumGiftCode","type":"InputInvoice","id":2560125965,"comment":"Used if the user wishes to start a channel/supergroup giveaway or send some giftcodes to members of a channel/supergroup, in exchange for boosts.","arguments":[{"name":"purpose","type":"InputStorePaymentPurpose","comment":"Should be populated with {@link RawInputStorePaymentPremiumGiveaway} for giveaways and {@link RawInputStorePaymentPremiumGiftCode} for gifts."},{"name":"option","type":"PremiumGiftCodeOption","comment":"Should be populated with one of the giveaway options returned by {@link payments.RawGetPremiumGiftCodeOptionsRequest}, see the giveaways » documentation for more info."}]},{"kind":"class","name":"inputInvoiceStars","type":"InputInvoice","id":1710230755,"comment":"Used to top up the Telegram Stars balance of the current account or someone else's account.","arguments":[{"name":"purpose","type":"InputStorePaymentPurpose","comment":"Either an {@link RawInputStorePaymentStarsTopup} or an {@link RawInputStorePaymentStarsGift}."}]},{"kind":"class","name":"payments.exportedInvoice","type":"payments.ExportedInvoice","id":2932919257,"comment":"Exported invoice deep link","arguments":[{"name":"url","type":"string","comment":"Exported invoice deep link"}]},{"kind":"class","name":"messages.transcribedAudio","type":"messages.TranscribedAudio","id":3485063511,"comment":"Transcribed text from a voice message »","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"pending","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the transcription is partial because audio transcription is still in progress, if set the user may receive further {@link RawUpdateTranscribedAudio} updates with the updated transcription."},{"name":"transcription_id","type":"long","comment":"Transcription ID"},{"name":"text","type":"string","comment":"Transcripted text"},{"name":"trial_remains_num","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"For non-Premium users, this flag will be set, indicating the remaining transcriptions in the free trial period."},{"name":"trial_remains_until_date","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"For non-Premium users, this flag will be set, indicating the date when the trial_remains_num counter will be reset to the maximum value of transcribe_audio_trial_weekly_number."}]},{"kind":"class","name":"help.premiumPromo","type":"help.PremiumPromo","id":1395946908,"comment":"Telegram Premium promotion information\n\nNote that the video_sections+videos fields are a list of videos, and the corresponding premium feature identifiers.
\nThey're equivalent to a section => video dictionary, with keys from video_section and values from videos.
\nThe keys in video_sections correspond to a specific feature identifier, and the associated promotional video should be shown when the associated feature row is clicked.","arguments":[{"name":"status_text","type":"string","comment":"Description of the current state of the user's Telegram Premium subscription"},{"name":"status_entities","type":"MessageEntity","typeModifiers":{"isVector":true},"comment":"Message entities for styled text"},{"name":"video_sections","type":"string","typeModifiers":{"isVector":true},"comment":"A list of premium feature identifiers », associated to each video"},{"name":"videos","type":"Document","typeModifiers":{"isVector":true},"comment":"A list of videos"},{"name":"period_options","type":"PremiumSubscriptionOption","typeModifiers":{"isVector":true},"comment":"Telegram Premium subscription options"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Related user information"}]},{"kind":"class","name":"inputStorePaymentPremiumSubscription","type":"InputStorePaymentPurpose","id":2792693350,"comment":"Info about a Telegram Premium purchase","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"restore","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Pass true if this is a restore of a Telegram Premium purchase; only for the App Store"},{"name":"upgrade","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Pass true if this is an upgrade from a monthly subscription to a yearly subscription; only for App Store"}]},{"kind":"class","name":"inputStorePaymentGiftPremium","type":"InputStorePaymentPurpose","id":1634697192,"comment":"Info about a gifted Telegram Premium purchase","arguments":[{"name":"user_id","type":"InputUser","comment":"The user to which the Telegram Premium subscription was gifted"},{"name":"currency","type":"string","comment":"Three-letter ISO 4217 currency code"},{"name":"amount","type":"long","comment":"Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."}]},{"kind":"class","name":"inputStorePaymentPremiumGiftCode","type":"InputStorePaymentPurpose","id":2743099199,"comment":"Used to gift Telegram Premium subscriptions only to some specific subscribers of a channel/supergroup or to some of our contacts, see here » for more info on giveaways and gifts.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"users","type":"InputUser","typeModifiers":{"isVector":true},"comment":"The users that will receive the Telegram Premium subscriptions."},{"name":"boost_peer","type":"InputPeer","typeModifiers":{"predicate":"flags.0"},"comment":"If set, the gifts will be sent on behalf of a channel/supergroup we are an admin of, which will also assign some boosts to it. Otherwise, the gift will be sent directly from the currently logged in user, and we will gain some extra boost slots. See here » for more info on giveaways and gifts."},{"name":"currency","type":"string","comment":"Three-letter ISO 4217 currency code"},{"name":"amount","type":"long","comment":"Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."}]},{"kind":"class","name":"inputStorePaymentPremiumGiveaway","type":"InputStorePaymentPurpose","id":369444042,"comment":"Used to pay for a giveaway, see here » for more info.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"only_new_subscribers","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, only new subscribers starting from the giveaway creation date will be able to participate to the giveaway."},{"name":"winners_are_visible","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"If set, giveaway winners are public and will be listed in a {@link RawMessageMediaGiveawayResults} message that will be automatically sent to the channel once the giveaway ends."},{"name":"boost_peer","type":"InputPeer","comment":"The channel/supergroup starting the giveaway, that the user must join to participate, that will receive the giveaway boosts; see here » for more info on giveaways."},{"name":"additional_peers","type":"InputPeer","typeModifiers":{"predicate":"flags.1","isVector":true},"comment":"Additional channels that the user must join to participate to the giveaway can be specified here."},{"name":"countries_iso2","type":"string","typeModifiers":{"predicate":"flags.2","isVector":true},"comment":"The set of users that can participate to the giveaway can be restricted by passing here an explicit whitelist of up to giveaway_countries_max countries, specified as two-letter ISO 3166-1 alpha-2 country codes."},{"name":"prize_description","type":"string","typeModifiers":{"predicate":"flags.4"},"comment":"Can contain a textual description of additional giveaway prizes."},{"name":"random_id","type":"long","comment":"Random ID to avoid resending the giveaway"},{"name":"until_date","type":"int","comment":"The end date of the giveaway, must be at most giveaway_period_max seconds in the future; see here » for more info on giveaways."},{"name":"currency","type":"string","comment":"Three-letter ISO 4217 currency code"},{"name":"amount","type":"long","comment":"Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."}]},{"kind":"class","name":"inputStorePaymentStarsTopup","type":"InputStorePaymentPurpose","id":3722252118,"comment":"Used to top up the Telegram Stars balance of the current account.","arguments":[{"name":"stars","type":"long","comment":"Amount of stars to topup"},{"name":"currency","type":"string","comment":"Three-letter ISO 4217 currency code"},{"name":"amount","type":"long","comment":"Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."}]},{"kind":"class","name":"inputStorePaymentStarsGift","type":"InputStorePaymentPurpose","id":494149367,"comment":"Used to gift Telegram Stars to a friend.","arguments":[{"name":"user_id","type":"InputUser","comment":"The user to which the stars should be gifted."},{"name":"stars","type":"long","comment":"Amount of stars to gift"},{"name":"currency","type":"string","comment":"Three-letter ISO 4217 currency code"},{"name":"amount","type":"long","comment":"Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."}]},{"kind":"class","name":"premiumGiftOption","type":"PremiumGiftOption","id":1958953753,"comment":"Telegram Premium gift option","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"months","type":"int","comment":"Duration of gifted Telegram Premium subscription"},{"name":"currency","type":"string","comment":"Three-letter ISO 4217 currency code"},{"name":"amount","type":"long","comment":"Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."},{"name":"bot_url","type":"string","comment":"An invoice deep link » to an invoice for in-app payment, using the official Premium bot; may be empty if direct payment isn't available."},{"name":"store_product","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"An identifier for the App Store/Play Store product associated with the Premium gift."}]},{"kind":"class","name":"paymentFormMethod","type":"PaymentFormMethod","id":2298016283,"comment":"Represents an additional payment method","arguments":[{"name":"url","type":"string","comment":"URL to open in a webview to process the payment"},{"name":"title","type":"string","comment":"Payment method description"}]},{"kind":"class","name":"emojiStatusEmpty","type":"EmojiStatus","id":769727150,"comment":"No emoji status is set","arguments":[]},{"kind":"class","name":"emojiStatus","type":"EmojiStatus","id":2459656605,"comment":"An emoji status","arguments":[{"name":"document_id","type":"long","comment":"Custom emoji document ID"}]},{"kind":"class","name":"emojiStatusUntil","type":"EmojiStatus","id":4197492935,"comment":"An emoji status valid until the specified date","arguments":[{"name":"document_id","type":"long","comment":"Custom emoji document ID"},{"name":"until","type":"int","comment":"This status is valid until this date"}]},{"kind":"class","name":"account.emojiStatusesNotModified","type":"account.EmojiStatuses","id":3498894917,"comment":"The server-side list of emoji statuses hasn't changed","arguments":[]},{"kind":"class","name":"account.emojiStatuses","type":"account.EmojiStatuses","id":2428790737,"comment":"A list of emoji statuses","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here"},{"name":"statuses","type":"EmojiStatus","typeModifiers":{"isVector":true},"comment":"Emoji statuses"}]},{"kind":"class","name":"reactionEmpty","type":"Reaction","id":2046153753,"comment":"No reaction","arguments":[]},{"kind":"class","name":"reactionEmoji","type":"Reaction","id":455247544,"comment":"Normal emoji message reaction","arguments":[{"name":"emoticon","type":"string","comment":"Emoji"}]},{"kind":"class","name":"reactionCustomEmoji","type":"Reaction","id":2302016627,"comment":"Custom emoji message reaction","arguments":[{"name":"document_id","type":"long","comment":"Custom emoji document ID"}]},{"kind":"class","name":"chatReactionsNone","type":"ChatReactions","id":3942396604,"comment":"No reactions are allowed","arguments":[]},{"kind":"class","name":"chatReactionsAll","type":"ChatReactions","id":1385335754,"comment":"All reactions or all non-custom reactions are allowed","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"allow_custom","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to allow custom reactions"}]},{"kind":"class","name":"chatReactionsSome","type":"ChatReactions","id":1713193015,"comment":"Some reactions are allowed","arguments":[{"name":"reactions","type":"Reaction","typeModifiers":{"isVector":true},"comment":"Allowed set of reactions: the reactions_in_chat_max configuration field indicates the maximum number of reactions that can be specified in this field."}]},{"kind":"class","name":"messages.reactionsNotModified","type":"messages.Reactions","id":2960120799,"comment":"The server-side list of message reactions hasn't changed","arguments":[]},{"kind":"class","name":"messages.reactions","type":"messages.Reactions","id":3942512406,"comment":"List of message reactions","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here"},{"name":"reactions","type":"Reaction","typeModifiers":{"isVector":true},"comment":"Reactions"}]},{"kind":"class","name":"emailVerifyPurposeLoginSetup","type":"EmailVerifyPurpose","id":1128644211,"comment":"Email verification purpose: setup login email","arguments":[{"name":"phone_number","type":"string","comment":"Phone number"},{"name":"phone_code_hash","type":"string","comment":"Phone code hash as specified by the documentation"}]},{"kind":"class","name":"emailVerifyPurposeLoginChange","type":"EmailVerifyPurpose","id":1383932651,"comment":"Email verification purpose: change login email","arguments":[]},{"kind":"class","name":"emailVerifyPurposePassport","type":"EmailVerifyPurpose","id":3153401477,"comment":"Verify an email for use in telegram passport","arguments":[]},{"kind":"class","name":"emailVerificationCode","type":"EmailVerification","id":2452510121,"comment":"Email verification code","arguments":[{"name":"code","type":"string","comment":"Received verification code"}]},{"kind":"class","name":"emailVerificationGoogle","type":"EmailVerification","id":3683688130,"comment":"Google ID email verification token","arguments":[{"name":"token","type":"string","comment":"Token"}]},{"kind":"class","name":"emailVerificationApple","type":"EmailVerification","id":2530243837,"comment":"Apple ID email verification token","arguments":[{"name":"token","type":"string","comment":"Token"}]},{"kind":"class","name":"account.emailVerified","type":"account.EmailVerified","id":731303195,"comment":"The email was verified correctly.","arguments":[{"name":"email","type":"string","comment":"The verified email address."}]},{"kind":"class","name":"account.emailVerifiedLogin","type":"account.EmailVerified","id":3787132257,"comment":"The email was verified correctly, and a login code was just sent to it.","arguments":[{"name":"email","type":"string","comment":"The verified email address."},{"name":"sent_code","type":"auth.SentCode","comment":"Info about the sent login code"}]},{"kind":"class","name":"premiumSubscriptionOption","type":"PremiumSubscriptionOption","id":1596792306,"comment":"Describes a Telegram Premium subscription option","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"current","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether this subscription option is currently in use."},{"name":"can_purchase_upgrade","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether this subscription option can be used to upgrade the existing Telegram Premium subscription. When upgrading Telegram Premium subscriptions bought through stores, make sure that the store transaction ID is equal to transaction, to avoid upgrading someone else's account, if the client is currently logged into multiple accounts."},{"name":"transaction","type":"string","typeModifiers":{"predicate":"flags.3"},"comment":"Identifier of the last in-store transaction for the currently used subscription on the current account."},{"name":"months","type":"int","comment":"Duration of subscription in months"},{"name":"currency","type":"string","comment":"Three-letter ISO 4217 currency code"},{"name":"amount","type":"long","comment":"Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."},{"name":"bot_url","type":"string","comment":"Deep link used to initiate payment"},{"name":"store_product","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Store product ID, only for official apps"}]},{"kind":"class","name":"sendAsPeer","type":"SendAsPeer","id":3088871476,"comment":"Indicates a peer that can be used to send messages","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"premium_required","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether a Telegram Premium account is required to send messages as this peer"},{"name":"peer","type":"Peer","comment":"Peer"}]},{"kind":"class","name":"messageExtendedMediaPreview","type":"MessageExtendedMedia","id":2908916936,"comment":"Paid media preview for not yet purchased paid media, see here » for more info.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"w","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Width"},{"name":"h","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Height"},{"name":"thumb","type":"PhotoSize","typeModifiers":{"predicate":"flags.1"},"comment":"Extremely low resolution thumbnail."},{"name":"video_duration","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"Video duration for videos."}]},{"kind":"class","name":"messageExtendedMedia","type":"MessageExtendedMedia","id":3997670500,"comment":"Already purchased paid media, see here » for more info.","arguments":[{"name":"media","type":"MessageMedia","comment":"The media we purchased."}]},{"kind":"class","name":"stickerKeyword","type":"StickerKeyword","id":4244550300,"comment":"Keywords for a certain sticker","arguments":[{"name":"document_id","type":"long","comment":"Sticker ID"},{"name":"keyword","type":"string","typeModifiers":{"isVector":true},"comment":"Keywords"}]},{"kind":"class","name":"username","type":"Username","id":3020371527,"comment":"Contains information about a username.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"editable","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the username is editable, meaning it wasn't bought on fragment."},{"name":"active","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the username is active."},{"name":"username","type":"string","comment":"The username."}]},{"kind":"class","name":"forumTopicDeleted","type":"ForumTopic","id":37687451,"comment":"Represents a deleted forum topic.","arguments":[{"name":"id","type":"int","comment":"The ID of the deleted forum topic."}]},{"kind":"class","name":"forumTopic","type":"ForumTopic","id":1903173033,"comment":"Represents a forum topic.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"my","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the topic was created by the current user"},{"name":"closed","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether the topic is closed (no messages can be sent to it)"},{"name":"pinned","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether the topic is pinned"},{"name":"short","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Whether this constructor is a reduced version of the full topic information.
If set, only the my, closed, id, date, title, icon_color, icon_emoji_id and from_id parameters will contain valid information.
Reduced info is usually only returned in topic-related admin log events » and in the {@link messages.RawChannelMessages} constructor: if needed, full information can be fetched using {@link channels.RawGetForumTopicsByIDRequest}."},{"name":"hidden","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"Whether the topic is hidden (only valid for the \"General\" topic, id=1)"},{"name":"id","type":"int","comment":"Topic ID"},{"name":"date","type":"int","comment":"Topic creation date"},{"name":"title","type":"string","comment":"Topic title"},{"name":"icon_color","type":"int","comment":"If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F."},{"name":"icon_emoji_id","type":"long","typeModifiers":{"predicate":"flags.0"},"comment":"ID of the custom emoji used as topic icon."},{"name":"top_message","type":"int","comment":"ID of the last message that was sent to this topic"},{"name":"read_inbox_max_id","type":"int","comment":"Position up to which all incoming messages are read."},{"name":"read_outbox_max_id","type":"int","comment":"Position up to which all outgoing messages are read."},{"name":"unread_count","type":"int","comment":"Number of unread messages"},{"name":"unread_mentions_count","type":"int","comment":"Number of unread mentions"},{"name":"unread_reactions_count","type":"int","comment":"Number of unread reactions to messages you sent"},{"name":"from_id","type":"Peer","comment":"ID of the peer that created the topic"},{"name":"notify_settings","type":"PeerNotifySettings","comment":"Notification settings"},{"name":"draft","type":"DraftMessage","typeModifiers":{"predicate":"flags.4"},"comment":"Message draft"}]},{"kind":"class","name":"messages.forumTopics","type":"messages.ForumTopics","id":913709011,"comment":"Contains information about multiple forum topics","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"order_by_create_date","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the returned topics are ordered by creation date; if set, pagination by offset_date should use {@link RawForumTopic}.date; otherwise topics are ordered by the last message date, so paginate by the date of the message referenced by {@link RawForumTopic}.top_message."},{"name":"count","type":"int","comment":"Total number of topics matching query; may be more than the topics contained in topics, in which case pagination is required."},{"name":"topics","type":"ForumTopic","typeModifiers":{"isVector":true},"comment":"Forum topics"},{"name":"messages","type":"Message","typeModifiers":{"isVector":true},"comment":"Related messages (contains the messages mentioned by {@link RawForumTopic}.top_message)."},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Related chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Related users"},{"name":"pts","type":"int","comment":"Event count after generation"}]},{"kind":"class","name":"defaultHistoryTTL","type":"DefaultHistoryTTL","id":1135897376,"comment":"Contains info about the default value of the Time-To-Live setting, applied to all new chats.","arguments":[{"name":"period","type":"int","comment":"Time-To-Live setting applied to all new chats."}]},{"kind":"class","name":"exportedContactToken","type":"ExportedContactToken","id":1103040667,"comment":"Describes a temporary profile link.","arguments":[{"name":"url","type":"string","comment":"The temporary profile link."},{"name":"expires","type":"int","comment":"Its expiration date"}]},{"kind":"class","name":"requestPeerTypeUser","type":"RequestPeerType","id":1597737472,"comment":"Choose a user.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"bot","type":"Bool","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to allow choosing only bots."},{"name":"premium","type":"Bool","typeModifiers":{"predicate":"flags.1"},"comment":"Whether to allow choosing only Premium users."}]},{"kind":"class","name":"requestPeerTypeChat","type":"RequestPeerType","id":3387977243,"comment":"Choose a chat or supergroup","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"creator","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to allow only choosing chats or supergroups that were created by the current user."},{"name":"bot_participant","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Whether to allow only choosing chats or supergroups where the bot is a participant."},{"name":"has_username","type":"Bool","typeModifiers":{"predicate":"flags.3"},"comment":"If specified, allows only choosing channels with or without a username, according to the value of Bool."},{"name":"forum","type":"Bool","typeModifiers":{"predicate":"flags.4"},"comment":"If specified, allows only choosing chats or supergroups that are or aren't forums, according to the value of Bool."},{"name":"user_admin_rights","type":"ChatAdminRights","typeModifiers":{"predicate":"flags.1"},"comment":"If specified, allows only choosing chats or supergroups where the current user is an admin with at least the specified admin rights."},{"name":"bot_admin_rights","type":"ChatAdminRights","typeModifiers":{"predicate":"flags.2"},"comment":"If specified, allows only choosing chats or supergroups where the bot is an admin with at least the specified admin rights."}]},{"kind":"class","name":"requestPeerTypeBroadcast","type":"RequestPeerType","id":865857388,"comment":"Choose a channel","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"creator","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to allow only choosing channels that were created by the current user."},{"name":"has_username","type":"Bool","typeModifiers":{"predicate":"flags.3"},"comment":"If specified, allows only choosing channels with or without a username, according to the value of Bool."},{"name":"user_admin_rights","type":"ChatAdminRights","typeModifiers":{"predicate":"flags.1"},"comment":"If specified, allows only choosing channels where the current user is an admin with at least the specified admin rights."},{"name":"bot_admin_rights","type":"ChatAdminRights","typeModifiers":{"predicate":"flags.2"},"comment":"If specified, allows only choosing channels where the bot is an admin with at least the specified admin rights."}]},{"kind":"class","name":"emojiListNotModified","type":"EmojiList","id":1209970170,"comment":"The list of custom emojis hasn't changed.","arguments":[]},{"kind":"class","name":"emojiList","type":"EmojiList","id":2048790993,"comment":"Represents a list of custom emojis.","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here"},{"name":"document_id","type":"long","typeModifiers":{"isVector":true},"comment":"Custom emoji IDs"}]},{"kind":"class","name":"emojiGroup","type":"EmojiGroup","id":2056961449,"comment":"Represents an emoji category.","arguments":[{"name":"title","type":"string","comment":"Category name, i.e. \"Animals\", \"Flags\", \"Faces\" and so on..."},{"name":"icon_emoji_id","type":"long","comment":"A single custom emoji used as preview for the category."},{"name":"emoticons","type":"string","typeModifiers":{"isVector":true},"comment":"A list of UTF-8 emojis, matching the category."}]},{"kind":"class","name":"emojiGroupGreeting","type":"EmojiGroup","id":2161274055,"comment":"Represents an emoji category, that should be moved to the top of the list when choosing a sticker for a business introduction","arguments":[{"name":"title","type":"string","comment":"Category name, i.e. \"Animals\", \"Flags\", \"Faces\" and so on..."},{"name":"icon_emoji_id","type":"long","comment":"A single custom emoji used as preview for the category."},{"name":"emoticons","type":"string","typeModifiers":{"isVector":true},"comment":"A list of UTF-8 emojis, matching the category."}]},{"kind":"class","name":"emojiGroupPremium","type":"EmojiGroup","id":154914612,"comment":"An emoji category, used to select all Premium-only stickers (i.e. those with a Premium effect »)/Premium-only custom emojis (i.e. those where the {@link RawDocumentAttributeCustomEmoji}.free flag is not set)","arguments":[{"name":"title","type":"string","comment":"Category name, i.e. \"Animals\", \"Flags\", \"Faces\" and so on..."},{"name":"icon_emoji_id","type":"long","comment":"A single custom emoji used as preview for the category."}]},{"kind":"class","name":"messages.emojiGroupsNotModified","type":"messages.EmojiGroups","id":1874111879,"comment":"The list of emoji categories hasn't changed.","arguments":[]},{"kind":"class","name":"messages.emojiGroups","type":"messages.EmojiGroups","id":2283780427,"comment":"Represents a list of emoji categories.","arguments":[{"name":"hash","type":"int","comment":"Hash used for caching, for more info click here"},{"name":"groups","type":"EmojiGroup","typeModifiers":{"isVector":true},"comment":"A list of emoji categories."}]},{"kind":"class","name":"textWithEntities","type":"TextWithEntities","id":1964978502,"comment":"Styled text with message entities","arguments":[{"name":"text","type":"string","comment":"Text"},{"name":"entities","type":"MessageEntity","typeModifiers":{"isVector":true},"comment":"Message entities for styled text"}]},{"kind":"class","name":"messages.translateResult","type":"messages.TranslatedText","id":870003448,"comment":"Translated text with entities","arguments":[{"name":"result","type":"TextWithEntities","typeModifiers":{"isVector":true},"comment":"Text+entities, for each input message."}]},{"kind":"class","name":"autoSaveSettings","type":"AutoSaveSettings","id":3360175310,"comment":"Media autosave settings","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"photos","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether photos should be autosaved to the gallery."},{"name":"videos","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether videos should be autosaved to the gallery."},{"name":"video_max_size","type":"long","typeModifiers":{"predicate":"flags.2"},"comment":"If set, specifies a size limit for autosavable videos"}]},{"kind":"class","name":"autoSaveException","type":"AutoSaveException","id":2170563911,"comment":"Peer-specific media autosave settings","arguments":[{"name":"peer","type":"Peer","comment":"The peer"},{"name":"settings","type":"AutoSaveSettings","comment":"Media autosave settings"}]},{"kind":"class","name":"account.autoSaveSettings","type":"account.AutoSaveSettings","id":1279133341,"comment":"Contains media autosave settings","arguments":[{"name":"users_settings","type":"AutoSaveSettings","comment":"Default media autosave settings for private chats"},{"name":"chats_settings","type":"AutoSaveSettings","comment":"Default media autosave settings for groups and supergroups"},{"name":"broadcasts_settings","type":"AutoSaveSettings","comment":"Default media autosave settings for channels"},{"name":"exceptions","type":"AutoSaveException","typeModifiers":{"isVector":true},"comment":"Peer-specific granular autosave settings"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Chats mentioned in the peer-specific granular autosave settings"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Users mentioned in the peer-specific granular autosave settings"}]},{"kind":"class","name":"help.appConfigNotModified","type":"help.AppConfig","id":2094949405,"comment":"The client configuration parameters haven't changed","arguments":[]},{"kind":"class","name":"help.appConfig","type":"help.AppConfig","id":3709368366,"comment":"Contains various client configuration parameters","arguments":[{"name":"hash","type":"int","comment":"Hash used for caching, for more info click here"},{"name":"config","type":"JSONValue","comment":"Client configuration parameters"}]},{"kind":"class","name":"inputBotAppID","type":"InputBotApp","id":2837495162,"comment":"Used to fetch information about a direct link Mini App by its ID","arguments":[{"name":"id","type":"long","comment":"direct link Mini App ID."},{"name":"access_hash","type":"long","comment":"Access hash, obtained from the {@link RawBotApp} constructor."}]},{"kind":"class","name":"inputBotAppShortName","type":"InputBotApp","id":2425095175,"comment":"Used to fetch information about a direct link Mini App by its short name","arguments":[{"name":"bot_id","type":"InputUser","comment":"ID of the bot that owns the bot mini app"},{"name":"short_name","type":"string","comment":"Short name, obtained from a Direct Mini App deep link"}]},{"kind":"class","name":"botAppNotModified","type":"BotApp","id":1571189943,"comment":"Bot app info hasn't changed.","arguments":[]},{"kind":"class","name":"botApp","type":"BotApp","id":2516373974,"comment":"Contains information about a direct link Mini App.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"id","type":"long","comment":"bot mini app ID"},{"name":"access_hash","type":"long","comment":"bot mini app access hash"},{"name":"short_name","type":"string","comment":"bot mini app short name, used to generate Direct Mini App deep links."},{"name":"title","type":"string","comment":"bot mini app title."},{"name":"description","type":"string","comment":"bot mini app description."},{"name":"photo","type":"Photo","comment":"bot mini app photo."},{"name":"document","type":"Document","typeModifiers":{"predicate":"flags.0"},"comment":"bot mini app animation."},{"name":"hash","type":"long","comment":"Hash to pass to {@link messages.RawGetBotAppRequest}, to avoid refetching bot app info if it hasn't changed."}]},{"kind":"class","name":"messages.botApp","type":"messages.BotApp","id":3947933173,"comment":"Contains information about a direct link Mini App","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"inactive","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the web app was never used by the user, and confirmation must be asked from the user before opening it."},{"name":"request_write_access","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"The bot is asking permission to send messages to the user: if the user agrees, set the write_allowed flag when invoking {@link messages.RawRequestAppWebViewRequest}."},{"name":"has_settings","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Deprecated flag, can be ignored."},{"name":"app","type":"BotApp","comment":"Bot app information"}]},{"kind":"class","name":"inlineBotWebView","type":"InlineBotWebView","id":3044185557,"comment":"Specifies an inline mode mini app button, shown on top of the inline query results list.","arguments":[{"name":"text","type":"string","comment":"Text of the button"},{"name":"url","type":"string","comment":"Webapp URL"}]},{"kind":"class","name":"readParticipantDate","type":"ReadParticipantDate","id":1246753138,"comment":"Contains info about when a certain participant has read a message","arguments":[{"name":"user_id","type":"int53","comment":"User ID"},{"name":"date","type":"int","comment":"When the user read the message"}]},{"kind":"class","name":"inputChatlistDialogFilter","type":"InputChatlist","id":4091599411,"comment":"Folder ID","arguments":[{"name":"filter_id","type":"int","comment":"Folder ID"}]},{"kind":"class","name":"exportedChatlistInvite","type":"ExportedChatlistInvite","id":206668204,"comment":"Exported chat folder deep link ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"title","type":"string","comment":"Name of the link"},{"name":"url","type":"string","comment":"The chat folder deep link »."},{"name":"peers","type":"Peer","typeModifiers":{"isVector":true},"comment":"Peers to import"}]},{"kind":"class","name":"chatlists.exportedChatlistInvite","type":"chatlists.ExportedChatlistInvite","id":283567014,"comment":"Info about an exported chat folder deep link ».","arguments":[{"name":"filter","type":"DialogFilter","comment":"Folder ID"},{"name":"invite","type":"ExportedChatlistInvite","comment":"The exported chat folder deep link »."}]},{"kind":"class","name":"chatlists.exportedInvites","type":"chatlists.ExportedInvites","id":279670215,"comment":"Info about multiple chat folder deep links ».","arguments":[{"name":"invites","type":"ExportedChatlistInvite","typeModifiers":{"isVector":true},"comment":"The chat folder deep links »."},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Related chat information"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Related user information"}]},{"kind":"class","name":"chatlists.chatlistInviteAlready","type":"chatlists.ChatlistInvite","id":4203214425,"comment":"Updated info about a chat folder deep link » we already imported.","arguments":[{"name":"filter_id","type":"int","comment":"ID of the imported folder"},{"name":"missing_peers","type":"Peer","typeModifiers":{"isVector":true},"comment":"New peers to be imported"},{"name":"already_peers","type":"Peer","typeModifiers":{"isVector":true},"comment":"Peers that were already imported"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Related chat information"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Related user information"}]},{"kind":"class","name":"chatlists.chatlistInvite","type":"chatlists.ChatlistInvite","id":500007837,"comment":"Info about a chat folder deep link ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"title","type":"string","comment":"Name of the link"},{"name":"emoticon","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Emoji to use as icon for the folder."},{"name":"peers","type":"Peer","typeModifiers":{"isVector":true},"comment":"Supergroups and channels to join"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Related chat information"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Related user information"}]},{"kind":"class","name":"chatlists.chatlistUpdates","type":"chatlists.ChatlistUpdates","id":2478671757,"comment":"Updated information about a chat folder deep link ».","arguments":[{"name":"missing_peers","type":"Peer","typeModifiers":{"isVector":true},"comment":"New peers to join"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Related chat information"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Related user information"}]},{"kind":"class","name":"bots.botInfo","type":"bots.BotInfo","id":3903288752,"comment":"Localized information about a bot.","arguments":[{"name":"name","type":"string","comment":"Bot name"},{"name":"about","type":"string","comment":"Bot about text"},{"name":"description","type":"string","comment":"Bot description"}]},{"kind":"class","name":"messagePeerVote","type":"MessagePeerVote","id":3066834268,"comment":"How a peer voted in a poll","arguments":[{"name":"peer","type":"Peer","comment":"Peer ID"},{"name":"option","type":"bytes","comment":"The option chosen by the peer"},{"name":"date","type":"int","comment":"When did the peer cast the vote"}]},{"kind":"class","name":"messagePeerVoteInputOption","type":"MessagePeerVote","id":1959634180,"comment":"How a peer voted in a poll (reduced constructor, returned if an option was provided to {@link messages.RawGetPollVotesRequest})","arguments":[{"name":"peer","type":"Peer","comment":"The peer that voted for the queried option"},{"name":"date","type":"int","comment":"When did the peer cast the vote"}]},{"kind":"class","name":"messagePeerVoteMultiple","type":"MessagePeerVote","id":1177089766,"comment":"How a peer voted in a multiple-choice poll","arguments":[{"name":"peer","type":"Peer","comment":"Peer ID"},{"name":"options","type":"bytes","typeModifiers":{"isVector":true},"comment":"Options chosen by the peer"},{"name":"date","type":"int","comment":"When did the peer cast their votes"}]},{"kind":"class","name":"storyViews","type":"StoryViews","id":2371443926,"comment":"Aggregated view and reaction information of a story.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"has_viewers","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"If set, indicates that the viewers list is currently viewable, and was not yet deleted because the story has expired while the user didn't have a Premium account."},{"name":"views_count","type":"int","comment":"View counter of the story"},{"name":"forwards_count","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"Forward counter of the story"},{"name":"reactions","type":"ReactionCount","typeModifiers":{"predicate":"flags.3","isVector":true},"comment":"All reactions sent to this story"},{"name":"reactions_count","type":"int","typeModifiers":{"predicate":"flags.4"},"comment":"Number of reactions added to the story"},{"name":"recent_viewers","type":"int53","typeModifiers":{"predicate":"flags.0","isVector":true},"comment":"User IDs of some recent viewers of the story"}]},{"kind":"class","name":"storyItemDeleted","type":"StoryItem","id":1374088783,"comment":"Represents a previously active story, that was deleted","arguments":[{"name":"id","type":"int","comment":"Story ID"}]},{"kind":"class","name":"storyItemSkipped","type":"StoryItem","id":4289579283,"comment":"Represents an active story, whose full information was omitted for space and performance reasons; use {@link stories.RawGetStoriesByIDRequest} to fetch full info about the skipped story when and if needed.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"close_friends","type":"true","typeModifiers":{"predicate":"flags.8"},"comment":"Whether this story can only be viewed by our close friends, see here » for more info"},{"name":"id","type":"int","comment":"Story ID"},{"name":"date","type":"int","comment":"When was the story posted."},{"name":"expire_date","type":"int","comment":"When does the story expire."}]},{"kind":"class","name":"storyItem","type":"StoryItem","id":2041735716,"comment":"Represents a story.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"pinned","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Whether this story is pinned on the user's profile"},{"name":"public","type":"true","typeModifiers":{"predicate":"flags.7"},"comment":"Whether this story is public and can be viewed by everyone"},{"name":"close_friends","type":"true","typeModifiers":{"predicate":"flags.8"},"comment":"Whether this story can only be viewed by our close friends, see here » for more info"},{"name":"min","type":"true","typeModifiers":{"predicate":"flags.9"},"comment":"Full information about this story was omitted for space and performance reasons; use {@link stories.RawGetStoriesByIDRequest} to fetch full info about this story when and if needed."},{"name":"noforwards","type":"true","typeModifiers":{"predicate":"flags.10"},"comment":"Whether this story is protected and thus cannot be forwarded; clients should also prevent users from saving attached media (i.e. videos should only be streamed, photos should be kept in RAM, et cetera)."},{"name":"edited","type":"true","typeModifiers":{"predicate":"flags.11"},"comment":"Indicates whether the story was edited."},{"name":"contacts","type":"true","typeModifiers":{"predicate":"flags.12"},"comment":"Whether this story can only be viewed by our contacts"},{"name":"selected_contacts","type":"true","typeModifiers":{"predicate":"flags.13"},"comment":"Whether this story can only be viewed by a select list of our contacts"},{"name":"out","type":"true","typeModifiers":{"predicate":"flags.16"},"comment":"indicates whether we sent this story."},{"name":"id","type":"int","comment":"ID of the story."},{"name":"date","type":"int","comment":"When was the story posted."},{"name":"from_id","type":"Peer","typeModifiers":{"predicate":"flags.18"},"comment":"Sender of the story."},{"name":"fwd_from","type":"StoryFwdHeader","typeModifiers":{"predicate":"flags.17"},"comment":"For reposted stories », contains info about the original story."},{"name":"expire_date","type":"int","comment":"When does the story expire."},{"name":"caption","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Story caption."},{"name":"entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.1","isVector":true},"comment":"Message entities for styled text"},{"name":"media","type":"MessageMedia","comment":"Story media."},{"name":"media_areas","type":"MediaArea","typeModifiers":{"predicate":"flags.14","isVector":true},"comment":"List of media areas, see here » for more info on media areas."},{"name":"privacy","type":"PrivacyRule","typeModifiers":{"predicate":"flags.2","isVector":true},"comment":"Privacy rules indicating who can and can't view this story"},{"name":"views","type":"StoryViews","typeModifiers":{"predicate":"flags.3"},"comment":"View date and reaction information"},{"name":"sent_reaction","type":"Reaction","typeModifiers":{"predicate":"flags.15"},"comment":"The reaction we sent."}]},{"kind":"class","name":"stories.allStoriesNotModified","type":"stories.AllStories","id":291044926,"comment":"The list of active (or active and hidden) stories has not changed.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"state","type":"string","comment":"State to use to ask for updates"},{"name":"stealth_mode","type":"StoriesStealthMode","comment":"Current stealth mode information"}]},{"kind":"class","name":"stories.allStories","type":"stories.AllStories","id":1862033025,"comment":"Full list of active (or active and hidden) stories.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"has_more","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether more results can be fetched as described here »."},{"name":"count","type":"int","comment":"Total number of active (or active and hidden) stories"},{"name":"state","type":"string","comment":"State to use for pagination"},{"name":"peer_stories","type":"PeerStories","typeModifiers":{"isVector":true},"comment":"Stories"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Mentioned chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Mentioned users"},{"name":"stealth_mode","type":"StoriesStealthMode","comment":"Current stealth mode information"}]},{"kind":"class","name":"stories.stories","type":"stories.Stories","id":1673780490,"comment":"List of stories","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"count","type":"int","comment":"Total number of stories that can be fetched"},{"name":"stories","type":"StoryItem","typeModifiers":{"isVector":true},"comment":"Stories"},{"name":"pinned_to_top","type":"int","typeModifiers":{"predicate":"flags.0","isVector":true},"comment":"IDs of pinned stories."},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Mentioned chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Mentioned users"}]},{"kind":"class","name":"storyView","type":"StoryView","id":2965236421,"comment":"Story view date and reaction information","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"blocked","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether we have completely blocked this user, including from viewing more of our stories."},{"name":"blocked_my_stories_from","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether we have blocked this user from viewing more of our stories."},{"name":"user_id","type":"int53","comment":"The user that viewed the story"},{"name":"date","type":"int","comment":"When did the user view the story"},{"name":"reaction","type":"Reaction","typeModifiers":{"predicate":"flags.2"},"comment":"If present, contains the reaction that the user left on the story"}]},{"kind":"class","name":"storyViewPublicForward","type":"StoryView","id":2424530699,"comment":"A certain peer has forwarded the story as a message to a public chat or channel.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"blocked","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether we have completely blocked this user, including from viewing more of our stories."},{"name":"blocked_my_stories_from","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether we have blocked this user from viewing more of our stories."},{"name":"message","type":"Message","comment":"The message with the forwarded story."}]},{"kind":"class","name":"storyViewPublicRepost","type":"StoryView","id":3178549065,"comment":"A certain peer has reposted the story.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"blocked","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether we have completely blocked this user, including from viewing more of our stories."},{"name":"blocked_my_stories_from","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether we have blocked this user from viewing more of our stories."},{"name":"peer_id","type":"Peer","comment":"The peer that reposted the story."},{"name":"story","type":"StoryItem","comment":"The reposted story."}]},{"kind":"class","name":"stories.storyViewsList","type":"stories.StoryViewsList","id":1507299269,"comment":"Reaction and view counters for a story","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"count","type":"int","comment":"Total number of results that can be fetched"},{"name":"views_count","type":"int","comment":"Total number of story views"},{"name":"forwards_count","type":"int","comment":"Total number of story forwards/reposts"},{"name":"reactions_count","type":"int","comment":"Number of reactions that were added to the story"},{"name":"views","type":"StoryView","typeModifiers":{"isVector":true},"comment":"Story view date and reaction information"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Mentioned chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Mentioned users"},{"name":"next_offset","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Offset for pagination"}]},{"kind":"class","name":"stories.storyViews","type":"stories.StoryViews","id":3734957341,"comment":"Reaction and view counters for a list of stories","arguments":[{"name":"views","type":"StoryViews","typeModifiers":{"isVector":true},"comment":"View date and reaction information of multiple stories"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Mentioned users"}]},{"kind":"class","name":"inputReplyToMessage","type":"InputReplyTo","id":583071445,"comment":"Reply to a message.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"reply_to_msg_id","type":"int","comment":"The message ID to reply to."},{"name":"top_msg_id","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"This field must contain the topic ID only when replying to messages in forum topics different from the \"General\" topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1).
If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the \"General\" topic."},{"name":"reply_to_peer_id","type":"InputPeer","typeModifiers":{"predicate":"flags.1"},"comment":"Used to reply to messages sent to another chat (specified here), can only be used for non-protected chats and messages."},{"name":"quote_text","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"Used to quote-reply to only a certain section (specified here) of the original message. The maximum UTF-8 length for quotes is specified in the quote_length_max config key."},{"name":"quote_entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.3","isVector":true},"comment":"Message entities for styled text from the quote_text field."},{"name":"quote_offset","type":"int","typeModifiers":{"predicate":"flags.4"},"comment":"Offset of the message quote_text within the original message (in UTF-16 code units)."}]},{"kind":"class","name":"inputReplyToStory","type":"InputReplyTo","id":1484862010,"comment":"Reply to a story.","arguments":[{"name":"peer","type":"InputPeer","comment":"Sender of the story"},{"name":"story_id","type":"int","comment":"ID of the story to reply to."}]},{"kind":"class","name":"exportedStoryLink","type":"ExportedStoryLink","id":1070138683,"comment":"Represents a story deep link.","arguments":[{"name":"link","type":"string","comment":"The story deep link."}]},{"kind":"class","name":"storiesStealthMode","type":"StoriesStealthMode","id":1898850301,"comment":"Information about the current stealth mode session.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"active_until_date","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"The date up to which stealth mode will be active."},{"name":"cooldown_until_date","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"The date starting from which the user will be allowed to re-enable stealth mode again."}]},{"kind":"class","name":"mediaAreaCoordinates","type":"MediaAreaCoordinates","id":3486113794,"comment":"Coordinates and size of a clicable rectangular area on top of a story.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"x","type":"double","comment":"The abscissa of the rectangle's center, as a percentage of the media width (0-100)."},{"name":"y","type":"double","comment":"The ordinate of the rectangle's center, as a percentage of the media height (0-100)."},{"name":"w","type":"double","comment":"The width of the rectangle, as a percentage of the media width (0-100)."},{"name":"h","type":"double","comment":"The height of the rectangle, as a percentage of the media height (0-100)."},{"name":"rotation","type":"double","comment":"Clockwise rotation angle of the rectangle, in degrees (0-360)."},{"name":"radius","type":"double","typeModifiers":{"predicate":"flags.0"},"comment":"The radius of the rectangle corner rounding, as a percentage of the media width."}]},{"kind":"class","name":"mediaAreaVenue","type":"MediaArea","id":3196246940,"comment":"Represents a location tag attached to a story, with additional venue information.","arguments":[{"name":"coordinates","type":"MediaAreaCoordinates","comment":"The size and location of the media area corresponding to the location sticker on top of the story media."},{"name":"geo","type":"GeoPoint","comment":"Coordinates of the venue"},{"name":"title","type":"string","comment":"Venue name"},{"name":"address","type":"string","comment":"Address"},{"name":"provider","type":"string","comment":"Venue provider: currently only \"foursquare\" and \"gplaces\" need to be supported."},{"name":"venue_id","type":"string","comment":"Venue ID in the provider's database"},{"name":"venue_type","type":"string","comment":"Venue type in the provider's database"}]},{"kind":"class","name":"inputMediaAreaVenue","type":"MediaArea","id":2994872703,"comment":"Represents a location tag attached to a story, with additional venue information.","arguments":[{"name":"coordinates","type":"MediaAreaCoordinates","comment":"The size and location of the media area corresponding to the location sticker on top of the story media."},{"name":"query_id","type":"long","comment":"The query_id from {@link messages.RawBotResults}, see here » for more info."},{"name":"result_id","type":"string","comment":"The id of the chosen result, see here » for more info."}]},{"kind":"class","name":"mediaAreaGeoPoint","type":"MediaArea","id":3402974509,"comment":"Represents a geolocation tag attached to a story.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"coordinates","type":"MediaAreaCoordinates","comment":"The size and position of the media area corresponding to the location sticker on top of the story media."},{"name":"geo","type":"GeoPoint","comment":"Coordinates of the geolocation tag."},{"name":"address","type":"GeoPointAddress","typeModifiers":{"predicate":"flags.0"},"comment":"Optional textual representation of the address."}]},{"kind":"class","name":"mediaAreaSuggestedReaction","type":"MediaArea","id":340088945,"comment":"Represents a reaction bubble.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"dark","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the reaction bubble has a dark background."},{"name":"flipped","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the reaction bubble is mirrored (see here » for more info)."},{"name":"coordinates","type":"MediaAreaCoordinates","comment":"The coordinates of the media area corresponding to the reaction button."},{"name":"reaction","type":"Reaction","comment":"The reaction that should be sent when this area is clicked."}]},{"kind":"class","name":"mediaAreaChannelPost","type":"MediaArea","id":1996756655,"comment":"Represents a channel post.","arguments":[{"name":"coordinates","type":"MediaAreaCoordinates","comment":"The size and location of the media area corresponding to the location sticker on top of the story media."},{"name":"channel_id","type":"int53","comment":"The channel that posted the message"},{"name":"msg_id","type":"int","comment":"ID of the channel message"}]},{"kind":"class","name":"inputMediaAreaChannelPost","type":"MediaArea","id":577893055,"comment":"Represents a channel post","arguments":[{"name":"coordinates","type":"MediaAreaCoordinates","comment":"The size and location of the media area corresponding to the location sticker on top of the story media."},{"name":"channel","type":"InputChannel","comment":"The channel that posted the message"},{"name":"msg_id","type":"int","comment":"ID of the channel message"}]},{"kind":"class","name":"mediaAreaUrl","type":"MediaArea","id":926421125,"comment":"Represents a URL media area.","arguments":[{"name":"coordinates","type":"MediaAreaCoordinates","comment":"The size and location of the media area corresponding to the URL button on top of the story media."},{"name":"url","type":"string","comment":"URL to open when clicked."}]},{"kind":"class","name":"mediaAreaWeather","type":"MediaArea","id":1235637404,"comment":"Represents a weather widget ».","arguments":[{"name":"coordinates","type":"MediaAreaCoordinates","comment":"The size and location of the media area corresponding to the widget on top of the story media."},{"name":"emoji","type":"string","comment":"Weather emoji, should be rendered as an animated emoji."},{"name":"temperature_c","type":"double","comment":"Temperature in degrees Celsius."},{"name":"color","type":"int","comment":"ARGB background color."}]},{"kind":"class","name":"peerStories","type":"PeerStories","id":2587224473,"comment":"Stories associated to a peer","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"peer","type":"Peer","comment":"The peer"},{"name":"max_read_id","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"If set, contains the ID of the maximum read story"},{"name":"stories","type":"StoryItem","typeModifiers":{"isVector":true},"comment":"Stories"}]},{"kind":"class","name":"stories.peerStories","type":"stories.PeerStories","id":3404105576,"comment":"Active story list of a specific peer.","arguments":[{"name":"stories","type":"PeerStories","comment":"Stories"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Mentioned chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Mentioned users"}]},{"kind":"class","name":"messages.webPage","type":"messages.WebPage","id":4250800829,"comment":"Represents an Instant View webpage.","arguments":[{"name":"webpage","type":"WebPage","comment":"The instant view webpage."},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Chats mentioned in the webpage."},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Users mentioned in the webpage."}]},{"kind":"class","name":"premiumGiftCodeOption","type":"PremiumGiftCodeOption","id":629052971,"comment":"Contains info about a giveaway/gift option.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"users","type":"int","comment":"Number of users which will be able to activate the gift codes."},{"name":"months","type":"int","comment":"Duration in months of each gifted Telegram Premium subscription."},{"name":"store_product","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Identifier of the store product associated with the option, official apps only."},{"name":"store_quantity","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Number of times the store product must be paid"},{"name":"currency","type":"string","comment":"Three-letter ISO 4217 currency code"},{"name":"amount","type":"long","comment":"Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."}]},{"kind":"class","name":"payments.checkedGiftCode","type":"payments.CheckedGiftCode","id":675942550,"comment":"Contains info about a Telegram Premium giftcode link.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"via_giveaway","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether this giftcode was created by a giveaway."},{"name":"from_id","type":"Peer","typeModifiers":{"predicate":"flags.4"},"comment":"The peer that created the gift code."},{"name":"giveaway_msg_id","type":"int","typeModifiers":{"predicate":"flags.3"},"comment":"Message ID of the giveaway in the channel specified in from_id."},{"name":"to_id","type":"long","typeModifiers":{"predicate":"flags.0"},"comment":"The destination user of the gift."},{"name":"date","type":"int","comment":"Creation date of the gift code."},{"name":"months","type":"int","comment":"Duration in months of the gifted Telegram Premium subscription."},{"name":"used_date","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"When was the giftcode imported, if it was imported."},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Mentioned chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Mentioned users"}]},{"kind":"class","name":"payments.giveawayInfo","type":"payments.GiveawayInfo","id":1130879648,"comment":"Contains info about an ongoing giveaway.\n\nIf neither the participating, joined_too_early_date, admin_disallowed_chat_id or disallowed_country flags are set, the user is not currently participating in the giveaway but could participate by joining all the channels specified in the {@link RawMessageMediaGiveaway}.channels field.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"participating","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"The current user is participating in the giveaway."},{"name":"preparing_results","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"If set, the giveaway has ended and the results are being prepared."},{"name":"start_date","type":"int","comment":"When was the giveaway started"},{"name":"joined_too_early_date","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"The current user can't participate in the giveaway, because they were already a member of the channel when the giveaway started, and the only_new_subscribers was set when starting the giveaway."},{"name":"admin_disallowed_chat_id","type":"long","typeModifiers":{"predicate":"flags.2"},"comment":"If set, the current user can't participate in the giveaway, because they are an administrator in one of the channels (ID specified in this flag) that created the giveaway."},{"name":"disallowed_country","type":"string","typeModifiers":{"predicate":"flags.4"},"comment":"If set, the current user can't participate in this giveaway, because their phone number is from the specified disallowed country (specified as a two-letter ISO 3166-1 alpha-2 country code)."}]},{"kind":"class","name":"payments.giveawayInfoResults","type":"payments.GiveawayInfo","id":13456752,"comment":"A giveaway has ended.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"winner","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether we're one of the winners of this giveaway."},{"name":"refunded","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the giveaway was canceled and was fully refunded."},{"name":"start_date","type":"int","comment":"Start date of the giveaway"},{"name":"gift_code_slug","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"If we're one of the winners of this giveaway, contains the Premium gift code, see here » for more info on the full giveaway flow."},{"name":"finish_date","type":"int","comment":"End date of the giveaway. May be bigger than the end date specified in parameters of the giveaway."},{"name":"winners_count","type":"int","comment":"Number of winners in the giveaway"},{"name":"activated_count","type":"int","comment":"Number of winners, which activated their gift codes."}]},{"kind":"class","name":"prepaidGiveaway","type":"PrepaidGiveaway","id":2991824212,"comment":"Contains info about a prepaid giveaway ».","arguments":[{"name":"id","type":"long","comment":"Prepaid giveaway ID."},{"name":"months","type":"int","comment":"Duration in months of each gifted Telegram Premium subscription."},{"name":"quantity","type":"int","comment":"Number of given away Telegram Premium subscriptions."},{"name":"date","type":"int","comment":"Payment date."}]},{"kind":"class","name":"boost","type":"Boost","id":706514033,"comment":"Info about one or more boosts applied by a specific user.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"gift","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether this boost was applied because the channel/supergroup directly gifted a subscription to the user."},{"name":"giveaway","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether this boost was applied because the user was chosen in a giveaway started by the channel/supergroup."},{"name":"unclaimed","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"If set, the user hasn't yet invoked {@link payments.RawApplyGiftCodeRequest} to claim a subscription gifted directly or in a giveaway by the channel."},{"name":"id","type":"string","comment":"Unique ID for this set of boosts."},{"name":"user_id","type":"int53","typeModifiers":{"predicate":"flags.0"},"comment":"ID of the user that applied the boost."},{"name":"giveaway_msg_id","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"The message ID of the giveaway"},{"name":"date","type":"int","comment":"When was the boost applied"},{"name":"expires","type":"int","comment":"When does the boost expire"},{"name":"used_gift_slug","type":"string","typeModifiers":{"predicate":"flags.4"},"comment":"The created Telegram Premium gift code, only set if either gift or giveaway are set AND it is either a gift code for the currently logged in user or if it was already claimed."},{"name":"multiplier","type":"int","typeModifiers":{"predicate":"flags.5"},"comment":"If set, this boost counts as multiplier boosts, otherwise it counts as a single boost."}]},{"kind":"class","name":"premium.boostsList","type":"premium.BoostsList","id":2264424764,"comment":"List of boosts that were applied to a peer by multiple users.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"count","type":"int","comment":"Total number of results"},{"name":"boosts","type":"Boost","typeModifiers":{"isVector":true},"comment":"Boosts"},{"name":"next_offset","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Offset that can be used for pagination."},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Mentioned users"}]},{"kind":"class","name":"myBoost","type":"MyBoost","id":3293069660,"comment":"Contains information about a single boost slot ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"slot","type":"int","comment":"Boost slot ID »"},{"name":"peer","type":"Peer","typeModifiers":{"predicate":"flags.0"},"comment":"If set, indicates this slot is currently occupied, i.e. we are boosting this peer.
Note that we can assign multiple boost slots to the same peer."},{"name":"date","type":"int","comment":"When (unixtime) we started boosting the peer, 0 otherwise."},{"name":"expires","type":"int","comment":"Indicates the (unixtime) expiration date of the boost in peer (0 if peer is not set)."},{"name":"cooldown_until_date","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"If peer is set, indicates the (unixtime) date after which this boost can be reassigned to another channel."}]},{"kind":"class","name":"premium.myBoosts","type":"premium.MyBoosts","id":2598512866,"comment":"A list of peers we are currently boosting, and how many boost slots we have left.","arguments":[{"name":"my_boosts","type":"MyBoost","typeModifiers":{"isVector":true},"comment":"Info about boosted peers and remaining boost slots."},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Referenced chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Referenced users"}]},{"kind":"class","name":"premium.boostsStatus","type":"premium.BoostsStatus","id":1230586490,"comment":"Contains info about the current boost status of a peer.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"my_boost","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether we're currently boosting this channel/supergroup, my_boost_slots will also be set."},{"name":"level","type":"int","comment":"The current boost level of the channel/supergroup."},{"name":"current_level_boosts","type":"int","comment":"The number of boosts acquired so far in the current level."},{"name":"boosts","type":"int","comment":"Total number of boosts acquired so far."},{"name":"gift_boosts","type":"int","typeModifiers":{"predicate":"flags.4"},"comment":"The number of boosts acquired from created Telegram Premium gift codes and giveaways; only returned to channel/supergroup admins."},{"name":"next_level_boosts","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Total number of boosts needed to reach the next level; if absent, the next level isn't available."},{"name":"premium_audience","type":"StatsPercentValue","typeModifiers":{"predicate":"flags.1"},"comment":"Only returned to channel/supergroup admins: contains the approximated number of Premium users subscribed to the channel/supergroup, related to the total number of subscribers."},{"name":"boost_url","type":"string","comment":"Boost deep link » that can be used to boost the chat."},{"name":"prepaid_giveaways","type":"PrepaidGiveaway","typeModifiers":{"predicate":"flags.3","isVector":true},"comment":"A list of prepaid giveaways available for the chat; only returned to channel/supergroup admins."},{"name":"my_boost_slots","type":"int","typeModifiers":{"predicate":"flags.2","isVector":true},"comment":"Indicates which of our boost slots we've assigned to this peer (populated if my_boost is set)."}]},{"kind":"class","name":"storyFwdHeader","type":"StoryFwdHeader","id":3089555792,"comment":"Contains info about the original poster of a reposted story.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"modified","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether the story media was modified before reposting it (for example by overlaying a round video with a reaction)."},{"name":"from","type":"Peer","typeModifiers":{"predicate":"flags.0"},"comment":"Peer that originally posted the story; will be empty for stories forwarded from a user with forwards privacy enabled, in which case from_name will be set, instead."},{"name":"from_name","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Will be set for stories forwarded from a user with forwards privacy enabled, in which case from will also be empty."},{"name":"story_id","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":", contains the story ID"}]},{"kind":"class","name":"postInteractionCountersMessage","type":"PostInteractionCounters","id":3875901055,"comment":"Interaction counters for a message.","arguments":[{"name":"msg_id","type":"int","comment":"Message ID"},{"name":"views","type":"int","comment":"Number of views"},{"name":"forwards","type":"int","comment":"Number of forwards to public channels"},{"name":"reactions","type":"int","comment":"Number of reactions"}]},{"kind":"class","name":"postInteractionCountersStory","type":"PostInteractionCounters","id":2319978023,"comment":"Interaction counters for a story.","arguments":[{"name":"story_id","type":"int","comment":"Story ID"},{"name":"views","type":"int","comment":"Number of views"},{"name":"forwards","type":"int","comment":"Number of forwards and reposts to public chats and channels"},{"name":"reactions","type":"int","comment":"Number of reactions"}]},{"kind":"class","name":"stats.storyStats","type":"stats.StoryStats","id":1355613820,"comment":"Contains statistics about a story.","arguments":[{"name":"views_graph","type":"StatsGraph","comment":"A graph containing the number of story views and shares"},{"name":"reactions_by_emotion_graph","type":"StatsGraph","comment":"A bar graph containing the number of story reactions categorized by \"emotion\" (i.e. Positive, Negative, Other, etc...)"}]},{"kind":"class","name":"publicForwardMessage","type":"PublicForward","id":32685898,"comment":"Contains info about a forward of a story as a message.","arguments":[{"name":"message","type":"Message","comment":"Info about the message with the reposted story."}]},{"kind":"class","name":"publicForwardStory","type":"PublicForward","id":3992169936,"comment":"Contains info about a forward of a story as a repost by a public channel.","arguments":[{"name":"peer","type":"Peer","comment":"The channel that reposted the story."},{"name":"story","type":"StoryItem","comment":"The reposted story (may be different from the original story)."}]},{"kind":"class","name":"stats.publicForwards","type":"stats.PublicForwards","id":2466479648,"comment":"Contains info about the forwards of a story as a message to public chats and reposts by public channels.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"count","type":"int","comment":"Total number of results"},{"name":"forwards","type":"PublicForward","typeModifiers":{"isVector":true},"comment":"Info about the forwards of a story."},{"name":"next_offset","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Offset used for pagination."},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Mentioned chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Mentioned users"}]},{"kind":"class","name":"peerColor","type":"PeerColor","id":3041614543,"comment":"Represents a color palette ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"color","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Color palette ID, see here » for more info; if not set, the default palette should be used."},{"name":"background_emoji_id","type":"long","typeModifiers":{"predicate":"flags.1"},"comment":"Optional custom emoji ID used to generate the pattern."}]},{"kind":"class","name":"help.peerColorSet","type":"help.PeerColorSet","id":639736408,"comment":"Represents a color palette that can be used in message accents ».","arguments":[{"name":"colors","type":"int","typeModifiers":{"isVector":true},"comment":"A list of 1-3 colors in RGB format, describing the accent color."}]},{"kind":"class","name":"help.peerColorProfileSet","type":"help.PeerColorSet","id":1987928555,"comment":"Represents a color palette that can be used in profile pages ».","arguments":[{"name":"palette_colors","type":"int","typeModifiers":{"isVector":true},"comment":"A list of 1-2 colors in RGB format, shown in the color palette settings to describe the current palette."},{"name":"bg_colors","type":"int","typeModifiers":{"isVector":true},"comment":"A list of 1-2 colors in RGB format describing the colors used to generate the actual background used in the profile page."},{"name":"story_colors","type":"int","typeModifiers":{"isVector":true},"comment":"A list of 2 colors in RGB format describing the colors of the gradient used for the unread active story indicator around the profile photo."}]},{"kind":"class","name":"help.peerColorOption","type":"help.PeerColorOption","id":2917953214,"comment":"Contains info about a color palette ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"hidden","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether this palette should not be displayed as an option to the user when choosing a palette to apply to profile pages or message accents."},{"name":"color_id","type":"int","comment":"Palette ID."},{"name":"colors","type":"help.PeerColorSet","typeModifiers":{"predicate":"flags.1"},"comment":"Light mode palette.
Will be empty for IDs 0 to 6 inclusive, in which case a palette containing a single color from the following colors should be used: red, orange, violet, green, cyan, blue, pink for indexes 0 to 6 (i.e. the same colors used for randomized fallback message accent colors)."},{"name":"dark_colors","type":"help.PeerColorSet","typeModifiers":{"predicate":"flags.2"},"comment":"Dark mode palette. Optional, defaults to the palette in colors (or the autogenerated palette for IDs 0 to 6) if absent."},{"name":"channel_min_level","type":"int","typeModifiers":{"predicate":"flags.3"},"comment":"Channels can use this palette only after reaching at least the boost level specified in this field."},{"name":"group_min_level","type":"int","typeModifiers":{"predicate":"flags.4"},"comment":"Supergroups can use this palette only after reaching at least the boost level specified in this field."}]},{"kind":"class","name":"help.peerColorsNotModified","type":"help.PeerColors","id":732034510,"comment":"The list of color palettes has not changed.","arguments":[]},{"kind":"class","name":"help.peerColors","type":"help.PeerColors","id":16313608,"comment":"Contains info about multiple color palettes ».","arguments":[{"name":"hash","type":"int","comment":"Hash used for caching, for more info click here"},{"name":"colors","type":"help.PeerColorOption","typeModifiers":{"isVector":true},"comment":"Usable color palettes."}]},{"kind":"class","name":"storyReaction","type":"StoryReaction","id":1620104917,"comment":"How a certain peer reacted to a story","arguments":[{"name":"peer_id","type":"Peer","comment":"The peer"},{"name":"date","type":"int","comment":"Reaction date"},{"name":"reaction","type":"Reaction","comment":"The reaction"}]},{"kind":"class","name":"storyReactionPublicForward","type":"StoryReaction","id":3148555843,"comment":"A certain peer has forwarded the story as a message to a public chat or channel.","arguments":[{"name":"message","type":"Message","comment":"The message with the forwarded story."}]},{"kind":"class","name":"storyReactionPublicRepost","type":"StoryReaction","id":3486322451,"comment":"A certain peer has reposted the story.","arguments":[{"name":"peer_id","type":"Peer","comment":"The peer that reposted the story."},{"name":"story","type":"StoryItem","comment":"The reposted story."}]},{"kind":"class","name":"stories.storyReactionsList","type":"stories.StoryReactionsList","id":2858383516,"comment":"List of peers that reacted to or intercated with a specific story","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"count","type":"int","comment":"Total number of reactions matching query"},{"name":"reactions","type":"StoryReaction","typeModifiers":{"isVector":true},"comment":"List of peers that reacted to or interacted with a specific story"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Mentioned chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Mentioned users"},{"name":"next_offset","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"If set, indicates the next offset to use to load more results by invoking {@link stories.RawGetStoryReactionsListRequest}."}]},{"kind":"class","name":"savedDialog","type":"SavedDialog","id":3179793260,"comment":"Represents a saved dialog ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"pinned","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Is the dialog pinned"},{"name":"peer","type":"Peer","comment":"The dialog"},{"name":"top_message","type":"int","comment":"The latest message ID"}]},{"kind":"class","name":"messages.savedDialogs","type":"messages.SavedDialogs","id":4164608545,"comment":"Represents some saved message dialogs ».","arguments":[{"name":"dialogs","type":"SavedDialog","typeModifiers":{"isVector":true},"comment":"Saved message dialogs »."},{"name":"messages","type":"Message","typeModifiers":{"isVector":true},"comment":"List of last messages from each saved dialog"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Mentioned chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Mentioned users"}]},{"kind":"class","name":"messages.savedDialogsSlice","type":"messages.SavedDialogs","id":1153080793,"comment":"Incomplete list of saved message dialogs » with messages and auxiliary data.","arguments":[{"name":"count","type":"int","comment":"Total number of saved message dialogs"},{"name":"dialogs","type":"SavedDialog","typeModifiers":{"isVector":true},"comment":"List of saved message dialogs"},{"name":"messages","type":"Message","typeModifiers":{"isVector":true},"comment":"List of last messages from dialogs"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Mentioned chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Mentioned users"}]},{"kind":"class","name":"messages.savedDialogsNotModified","type":"messages.SavedDialogs","id":3223285736,"comment":"The saved dialogs haven't changed","arguments":[{"name":"count","type":"int","comment":"Number of saved dialogs found server-side by the query"}]},{"kind":"class","name":"savedReactionTag","type":"SavedReactionTag","id":3413112872,"comment":"Info about a saved message reaction tag ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"reaction","type":"Reaction","comment":"Reaction associated to the tag."},{"name":"title","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Custom tag name assigned by the user (max 12 UTF-8 chars)."},{"name":"count","type":"int","comment":"Number of messages tagged with this tag."}]},{"kind":"class","name":"messages.savedReactionTagsNotModified","type":"messages.SavedReactionTags","id":2291882479,"comment":"The list of reaction tag » names assigned by the user hasn't changed.","arguments":[]},{"kind":"class","name":"messages.savedReactionTags","type":"messages.SavedReactionTags","id":844731658,"comment":"List of reaction tag » names assigned by the user.","arguments":[{"name":"tags","type":"SavedReactionTag","typeModifiers":{"isVector":true},"comment":"Saved reaction tags."},{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here"}]},{"kind":"class","name":"outboxReadDate","type":"OutboxReadDate","id":1001931436,"comment":"Exact read date of a private message we sent to another user.","arguments":[{"name":"date","type":"int","comment":"UNIX timestamp with the read date."}]},{"kind":"class","name":"smsjobs.eligibleToJoin","type":"smsjobs.EligibilityToJoin","id":3700114639,"comment":"SMS jobs eligibility","arguments":[{"name":"terms_url","type":"string","comment":"Terms of service URL"},{"name":"monthly_sent_sms","type":"int","comment":"Monthly sent SMSes"}]},{"kind":"class","name":"smsjobs.status","type":"smsjobs.Status","id":720277905,"comment":"Status","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"allow_international","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Allow international numbers"},{"name":"recent_sent","type":"int","comment":"Recently sent"},{"name":"recent_since","type":"int","comment":"Since"},{"name":"recent_remains","type":"int","comment":"Remaining"},{"name":"total_sent","type":"int","comment":"Total sent"},{"name":"total_since","type":"int","comment":"Total since"},{"name":"last_gift_slug","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Last gift deep link"},{"name":"terms_url","type":"string","comment":"Terms of service URL"}]},{"kind":"class","name":"smsJob","type":"SmsJob","id":3869372088,"comment":"Info about an SMS job.","arguments":[{"name":"job_id","type":"string","comment":"Job ID"},{"name":"phone_number","type":"string","comment":"Destination phone number"},{"name":"text","type":"string","comment":"Text"}]},{"kind":"class","name":"businessWeeklyOpen","type":"BusinessWeeklyOpen","id":302717625,"comment":"A time interval, indicating the opening hours of a business.\n\nNote that opening hours specified by the user must be appropriately validated and transformed before uploading them to the server, as specified here ».","arguments":[{"name":"start_minute","type":"int","comment":"Start minute in minutes of the week, 0 to 7*24*60 inclusively."},{"name":"end_minute","type":"int","comment":"End minute in minutes of the week, 1 to 8*24*60 inclusively (8 and not 7 because this allows to specify intervals that, for example, start on Sunday 21:00 and end on Monday 04:00 (6*24*60+21*60 to 7*24*60+4*60) without passing an invalid end_minute < start_minute). See here » for more info."}]},{"kind":"class","name":"businessWorkHours","type":"BusinessWorkHours","id":2358423704,"comment":"Specifies a set of Telegram Business opening hours.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"open_now","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Ignored if set while invoking {@link account.RawUpdateBusinessWorkHoursRequest}, only returned by the server in {@link RawUserFull}.business_work_hours, indicating whether the business is currently open according to the current time and the values in weekly_open and timezone."},{"name":"timezone_id","type":"string","comment":"An ID of one of the timezones returned by {@link help.RawGetTimezonesListRequest}.
The timezone ID is contained {@link RawTimezone}.id, a human-readable, localized name of the timezone is available in {@link RawTimezone}.name and the {@link RawTimezone}.utc_offset field contains the UTC offset in seconds, which may be displayed in hh:mm format by the client together with the human-readable name (i.e. $name UTC -01:00)."},{"name":"weekly_open","type":"BusinessWeeklyOpen","typeModifiers":{"isVector":true},"comment":"A list of time intervals (max 28) represented by {@link RawBusinessWeeklyOpen}, indicating the opening hours of their business."}]},{"kind":"class","name":"businessLocation","type":"BusinessLocation","id":2891717367,"comment":"Represents the location of a Telegram Business ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"geo_point","type":"GeoPoint","typeModifiers":{"predicate":"flags.0"},"comment":"Geographical coordinates (optional)."},{"name":"address","type":"string","comment":"Textual description of the address (mandatory)."}]},{"kind":"class","name":"inputBusinessRecipients","type":"InputBusinessRecipients","id":1871393450,"comment":"Specifies the chats that can receive Telegram Business away » and greeting » messages.\n\nIf exclude_selected is set, specifies all chats that cannot receive Telegram Business away » and greeting » messages.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"existing_chats","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"All existing private chats."},{"name":"new_chats","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"All new private chats."},{"name":"contacts","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"All private chats with contacts."},{"name":"non_contacts","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"All private chats with non-contacts."},{"name":"exclude_selected","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"If set, inverts the selection."},{"name":"users","type":"InputUser","typeModifiers":{"predicate":"flags.4","isVector":true},"comment":"Only private chats with the specified users."}]},{"kind":"class","name":"businessRecipients","type":"BusinessRecipients","id":554733559,"comment":"Specifies the chats that can receive Telegram Business away » and greeting » messages.\n\nIf exclude_selected is set, specifies all chats that cannot receive Telegram Business away » and greeting » messages.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"existing_chats","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"All existing private chats."},{"name":"new_chats","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"All new private chats."},{"name":"contacts","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"All private chats with contacts."},{"name":"non_contacts","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"All private chats with non-contacts."},{"name":"exclude_selected","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"If set, inverts the selection."},{"name":"users","type":"int53","typeModifiers":{"predicate":"flags.4","isVector":true},"comment":"Only private chats with the specified users."}]},{"kind":"class","name":"businessAwayMessageScheduleAlways","type":"BusinessAwayMessageSchedule","id":3384402617,"comment":"Always send Telegram Business away messages to users writing to us in private.","arguments":[]},{"kind":"class","name":"businessAwayMessageScheduleOutsideWorkHours","type":"BusinessAwayMessageSchedule","id":3287479553,"comment":"Send Telegram Business away messages to users writing to us in private outside of the configured Telegram Business working hours.","arguments":[]},{"kind":"class","name":"businessAwayMessageScheduleCustom","type":"BusinessAwayMessageSchedule","id":3427638988,"comment":"Send Telegram Business away messages to users writing to us in private in the specified time span.","arguments":[{"name":"start_date","type":"int","comment":"Start date (UNIX timestamp)."},{"name":"end_date","type":"int","comment":"End date (UNIX timestamp)."}]},{"kind":"class","name":"inputBusinessGreetingMessage","type":"InputBusinessGreetingMessage","id":26528571,"comment":"Describes a Telegram Business greeting, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period.","arguments":[{"name":"shortcut_id","type":"int","comment":"ID of a quick reply shorcut, containing the greeting messages to send, see here » for more info."},{"name":"recipients","type":"InputBusinessRecipients","comment":"Allowed recipients for the greeting messages."},{"name":"no_activity_days","type":"int","comment":"The number of days after which a private chat will be considered as inactive; currently, must be one of 7, 14, 21, or 28."}]},{"kind":"class","name":"businessGreetingMessage","type":"BusinessGreetingMessage","id":3843664811,"comment":"Describes a Telegram Business greeting, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period.","arguments":[{"name":"shortcut_id","type":"int","comment":"ID of a quick reply shorcut, containing the greeting messages to send, see here » for more info."},{"name":"recipients","type":"BusinessRecipients","comment":"Allowed recipients for the greeting messages."},{"name":"no_activity_days","type":"int","comment":"The number of days after which a private chat will be considered as inactive; currently, must be one of 7, 14, 21, or 28."}]},{"kind":"class","name":"inputBusinessAwayMessage","type":"InputBusinessAwayMessage","id":2200008160,"comment":"Describes a Telegram Business away message, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"offline_only","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, the messages will not be sent if the account was online in the last 10 minutes."},{"name":"shortcut_id","type":"int","comment":"ID of a quick reply shorcut, containing the away messages to send, see here » for more info."},{"name":"schedule","type":"BusinessAwayMessageSchedule","comment":"Specifies when should the away messages be sent."},{"name":"recipients","type":"InputBusinessRecipients","comment":"Allowed recipients for the away messages."}]},{"kind":"class","name":"businessAwayMessage","type":"BusinessAwayMessage","id":4011158108,"comment":"Describes a Telegram Business away message, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"offline_only","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, the messages will not be sent if the account was online in the last 10 minutes."},{"name":"shortcut_id","type":"int","comment":"ID of a quick reply shorcut, containing the away messages to send, see here » for more info."},{"name":"schedule","type":"BusinessAwayMessageSchedule","comment":"Specifies when should the away messages be sent."},{"name":"recipients","type":"BusinessRecipients","comment":"Allowed recipients for the away messages."}]},{"kind":"class","name":"timezone","type":"Timezone","id":4287793653,"comment":"Timezone information.","arguments":[{"name":"id","type":"string","comment":"Unique timezone ID."},{"name":"name","type":"string","comment":"Human-readable and localized timezone name."},{"name":"utc_offset","type":"int","comment":"UTC offset in seconds, which may be displayed in hh:mm format by the client together with the human-readable name (i.e. $name UTC -01:00)."}]},{"kind":"class","name":"help.timezonesListNotModified","type":"help.TimezonesList","id":2533820620,"comment":"The timezone list has not changed.","arguments":[]},{"kind":"class","name":"help.timezonesList","type":"help.TimezonesList","id":2071260529,"comment":"Timezone information that may be used elsewhere in the API, such as to set Telegram Business opening hours ».","arguments":[{"name":"timezones","type":"Timezone","typeModifiers":{"isVector":true},"comment":"Timezones"},{"name":"hash","type":"int","comment":"Hash used for caching, for more info click here"}]},{"kind":"class","name":"quickReply","type":"QuickReply","id":110563371,"comment":"A quick reply shortcut.","arguments":[{"name":"shortcut_id","type":"int","comment":"Unique shortcut ID."},{"name":"shortcut","type":"string","comment":"Shortcut name."},{"name":"top_message","type":"int","comment":"ID of the last message in the shortcut."},{"name":"count","type":"int","comment":"Total number of messages in the shortcut."}]},{"kind":"class","name":"inputQuickReplyShortcut","type":"InputQuickReplyShortcut","id":609840449,"comment":"Selects a quick reply shortcut by name.","arguments":[{"name":"shortcut","type":"string","comment":"Shortcut name."}]},{"kind":"class","name":"inputQuickReplyShortcutId","type":"InputQuickReplyShortcut","id":18418929,"comment":"Selects a quick reply shortcut by its numeric ID.","arguments":[{"name":"shortcut_id","type":"int","comment":"Shortcut ID."}]},{"kind":"class","name":"messages.quickReplies","type":"messages.QuickReplies","id":3331155605,"comment":"Info about quick reply shortcuts ».","arguments":[{"name":"quick_replies","type":"QuickReply","typeModifiers":{"isVector":true},"comment":"Quick reply shortcuts."},{"name":"messages","type":"Message","typeModifiers":{"isVector":true},"comment":"Messages mentioned in quick_replies."},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Mentioned chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Mentioned users"}]},{"kind":"class","name":"messages.quickRepliesNotModified","type":"messages.QuickReplies","id":1603398491,"comment":"Info about quick reply shortcuts » hasn't changed.","arguments":[]},{"kind":"class","name":"connectedBot","type":"ConnectedBot","id":3171321345,"comment":"Contains info about a connected business bot ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"can_reply","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the the bot can reply to messages it receives through the connection"},{"name":"bot_id","type":"int53","comment":"ID of the connected bot"},{"name":"recipients","type":"BusinessBotRecipients","comment":"Specifies the private chats that a connected business bot » may receive messages and interact with.
"}]},{"kind":"class","name":"account.connectedBots","type":"account.ConnectedBots","id":400029819,"comment":"Info about currently connected business bots.","arguments":[{"name":"connected_bots","type":"ConnectedBot","typeModifiers":{"isVector":true},"comment":"Info about the connected bots"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Bot information"}]},{"kind":"class","name":"messages.dialogFilters","type":"messages.DialogFilters","id":718878489,"comment":"Folder and folder tags information","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"tags_enabled","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether folder tags are enabled."},{"name":"filters","type":"DialogFilter","typeModifiers":{"isVector":true},"comment":"Folders."}]},{"kind":"class","name":"birthday","type":"Birthday","id":1821253126,"comment":"Birthday information for a user.\n\nAlso used to invite users to gift Telegram Premium subscriptions » to other users with birthdays within a +1/-1 day time range, related to the current day.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"day","type":"int","comment":"Birth day"},{"name":"month","type":"int","comment":"Birth month"},{"name":"year","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"(Optional) birth year."}]},{"kind":"class","name":"botBusinessConnection","type":"BotBusinessConnection","id":2305045428,"comment":"Contains info about a bot business connection.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"can_reply","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the bot can reply on behalf of the user to messages it receives through the business connection"},{"name":"disabled","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether this business connection is currently disabled"},{"name":"connection_id","type":"string","comment":"Business connection ID, used to identify messages coming from the connection and to reply to them as specified here »."},{"name":"user_id","type":"int53","comment":"ID of the user that the bot is connected to via this connection."},{"name":"dc_id","type":"int","comment":"ID of the datacenter where to send queries wrapped in a {@link RawInvokeWithBusinessConnectionRequest} as specified here »."},{"name":"date","type":"int","comment":"When was the connection created."}]},{"kind":"class","name":"inputBusinessIntro","type":"InputBusinessIntro","id":163867085,"comment":"Telegram Business introduction ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"title","type":"string","comment":"Title of the introduction message"},{"name":"description","type":"string","comment":"Profile introduction"},{"name":"sticker","type":"InputDocument","typeModifiers":{"predicate":"flags.0"},"comment":"Optional introduction sticker."}]},{"kind":"class","name":"businessIntro","type":"BusinessIntro","id":1510606445,"comment":"Telegram Business introduction ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"title","type":"string","comment":"Title of the introduction message (max intro_title_length_limit » UTF-8 characters)."},{"name":"description","type":"string","comment":"Profile introduction (max intro_description_length_limit » UTF-8 characters)."},{"name":"sticker","type":"Document","typeModifiers":{"predicate":"flags.0"},"comment":"Optional introduction sticker."}]},{"kind":"class","name":"messages.myStickers","type":"messages.MyStickers","id":4211040925,"comment":"The list of stickersets owned by the current account ».","arguments":[{"name":"count","type":"int","comment":"Total number of owned stickersets."},{"name":"sets","type":"StickerSetCovered","typeModifiers":{"isVector":true},"comment":"Stickersets"}]},{"kind":"class","name":"inputCollectibleUsername","type":"InputCollectible","id":3818152105,"comment":"Represents a username fragment collectible","arguments":[{"name":"username","type":"string","comment":"Username"}]},{"kind":"class","name":"inputCollectiblePhone","type":"InputCollectible","id":2732725412,"comment":"Represents a phone number fragment collectible","arguments":[{"name":"phone","type":"string","comment":"Phone number"}]},{"kind":"class","name":"fragment.collectibleInfo","type":"fragment.CollectibleInfo","id":1857945489,"comment":"Info about a fragment collectible.","arguments":[{"name":"purchase_date","type":"int","comment":"Purchase date (unixtime)"},{"name":"currency","type":"string","comment":"Three-letter ISO 4217 currency code for amount"},{"name":"amount","type":"long","comment":"Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."},{"name":"crypto_currency","type":"string","comment":"Cryptocurrency name."},{"name":"crypto_amount","type":"long","comment":"Price, in the smallest units of the cryptocurrency."},{"name":"url","type":"string","comment":"Fragment URL with more info about the collectible"}]},{"kind":"class","name":"inputBusinessBotRecipients","type":"InputBusinessBotRecipients","id":3303379486,"comment":"Specifies the private chats that a connected business bot » may interact with.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"existing_chats","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Selects all existing private chats."},{"name":"new_chats","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Selects all new private chats."},{"name":"contacts","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Selects all private chats with contacts."},{"name":"non_contacts","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Selects all private chats with non-contacts."},{"name":"exclude_selected","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"If set, then all private chats except the ones selected by existing_chats, new_chats, contacts, non_contacts and users are chosen.
Note that if this flag is set, any values passed in exclude_users will be merged and moved into users by the server."},{"name":"users","type":"InputUser","typeModifiers":{"predicate":"flags.4","isVector":true},"comment":"Explicitly selected private chats."},{"name":"exclude_users","type":"InputUser","typeModifiers":{"predicate":"flags.6","isVector":true},"comment":"Identifiers of private chats that are always excluded."}]},{"kind":"class","name":"businessBotRecipients","type":"BusinessBotRecipients","id":3096245107,"comment":"Specifies the private chats that a connected business bot » may receive messages and interact with.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"existing_chats","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Selects all existing private chats."},{"name":"new_chats","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Selects all new private chats."},{"name":"contacts","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Selects all private chats with contacts."},{"name":"non_contacts","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Selects all private chats with non-contacts."},{"name":"exclude_selected","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"If set, then all private chats except the ones selected by existing_chats, new_chats, contacts, non_contacts and users are chosen.
Note that if this flag is set, any values passed in exclude_users will be merged and moved into users by the server, thus exclude_users will always be empty."},{"name":"users","type":"int53","typeModifiers":{"predicate":"flags.4","isVector":true},"comment":"Explicitly selected private chats."},{"name":"exclude_users","type":"int53","typeModifiers":{"predicate":"flags.6","isVector":true},"comment":"Identifiers of private chats that are always excluded."}]},{"kind":"class","name":"contactBirthday","type":"ContactBirthday","id":496600883,"comment":"Birthday information of a contact.","arguments":[{"name":"contact_id","type":"int53","comment":"User ID."},{"name":"birthday","type":"Birthday","comment":"Birthday information."}]},{"kind":"class","name":"contacts.contactBirthdays","type":"contacts.ContactBirthdays","id":290452237,"comment":"Birthday information of our contacts.","arguments":[{"name":"contacts","type":"ContactBirthday","typeModifiers":{"isVector":true},"comment":"Birthday info"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"User information"}]},{"kind":"class","name":"missingInvitee","type":"MissingInvitee","id":1653379620,"comment":"Info about why a specific user could not be invited ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"premium_would_allow_invite","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, we could not add the user only because the current account needs to purchase a Telegram Premium subscription to complete the operation."},{"name":"premium_required_for_pm","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"If set, we could not add the user because of their privacy settings, and additionally, the current account needs to purchase a Telegram Premium subscription to directly share an invite link with the user via a private message."},{"name":"user_id","type":"int53","comment":"ID of the user. If neither of the flags below are set, we could not add the user because of their privacy settings, and we can create and directly share an invite link with them using a normal message, instead."}]},{"kind":"class","name":"messages.invitedUsers","type":"messages.InvitedUsers","id":2136862630,"comment":"Contains info about successfully or unsuccessfully invited » users.","arguments":[{"name":"updates","type":"Updates","comment":"List of updates about successfully invited users (and eventually info about the created group)"},{"name":"missing_invitees","type":"MissingInvitee","typeModifiers":{"isVector":true},"comment":"A list of users that could not be invited, along with the reason why they couldn't be invited."}]},{"kind":"class","name":"inputBusinessChatLink","type":"InputBusinessChatLink","id":292003751,"comment":"Contains info about a business chat deep link » to be created by the current account.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"message","type":"string","comment":"Message to pre-fill in the message input field."},{"name":"entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.0","isVector":true},"comment":"Message entities for styled text"},{"name":"title","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Human-readable name of the link, to simplify management in the UI (only visible to the creator of the link)."}]},{"kind":"class","name":"businessChatLink","type":"BusinessChatLink","id":3031328367,"comment":"Contains info about a business chat deep link » created by the current account.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"link","type":"string","comment":"Business chat deep link."},{"name":"message","type":"string","comment":"Message to pre-fill in the message input field."},{"name":"entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.0","isVector":true},"comment":"Message entities for styled text"},{"name":"title","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Human-readable name of the link, to simplify management in the UI (only visible to the creator of the link)."},{"name":"views","type":"int","comment":"Number of times the link was resolved (clicked/scanned/etc...)."}]},{"kind":"class","name":"account.businessChatLinks","type":"account.BusinessChatLinks","id":3963855569,"comment":"Contains info about business chat deep links » created by the current account.","arguments":[{"name":"links","type":"BusinessChatLink","typeModifiers":{"isVector":true},"comment":"Links"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Mentioned chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Mentioned users"}]},{"kind":"class","name":"account.resolvedBusinessChatLinks","type":"account.ResolvedBusinessChatLinks","id":2586029857,"comment":"Contains info about a single resolved business chat deep link ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"peer","type":"Peer","comment":"Destination peer"},{"name":"message","type":"string","comment":"Message to pre-fill in the message input field."},{"name":"entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.0","isVector":true},"comment":"Message entities for styled text"},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Mentioned chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Mentioned users"}]},{"kind":"class","name":"requestedPeerUser","type":"RequestedPeer","id":3593466986,"comment":"Info about a user, shared by a user with the currently logged in bot using {@link messages.RawSendBotRequestedPeerRequest}.\n\nAll fields except the ID are optional, and will be populated if present on the chosen user, according to the parameters of the requesting {@link RawInputKeyboardButtonRequestPeer}.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"user_id","type":"int53","comment":"User ID."},{"name":"first_name","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"First name."},{"name":"last_name","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Last name."},{"name":"username","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Username."},{"name":"photo","type":"Photo","typeModifiers":{"predicate":"flags.2"},"comment":"Profile photo."}]},{"kind":"class","name":"requestedPeerChat","type":"RequestedPeer","id":1929860175,"comment":"Info about a chat, shared by a user with the currently logged in bot using {@link messages.RawSendBotRequestedPeerRequest}.\n\nAll fields except the ID are optional, and will be populated if present on the chosen chat, according to the parameters of the requesting {@link RawInputKeyboardButtonRequestPeer}.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"chat_id","type":"int53","comment":"Chat ID."},{"name":"title","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Chat title."},{"name":"photo","type":"Photo","typeModifiers":{"predicate":"flags.2"},"comment":"Chat photo."}]},{"kind":"class","name":"requestedPeerChannel","type":"RequestedPeer","id":2342781924,"comment":"Info about a channel/supergroup, shared by a user with the currently logged in bot using {@link messages.RawSendBotRequestedPeerRequest}.\n\nAll fields except the ID are optional, and will be populated if present on the chosen channel/supergroup, according to the parameters of the requesting {@link RawInputKeyboardButtonRequestPeer}.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"channel_id","type":"int53","comment":"Channel/supergroup ID."},{"name":"title","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Channel/supergroup title."},{"name":"username","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Channel/supergroup username."},{"name":"photo","type":"Photo","typeModifiers":{"predicate":"flags.2"},"comment":"Channel/supergroup photo."}]},{"kind":"class","name":"sponsoredMessageReportOption","type":"SponsoredMessageReportOption","id":1124938064,"comment":"A report option for a sponsored message ».","arguments":[{"name":"text","type":"string","comment":"Localized description of the option."},{"name":"option","type":"bytes","comment":"Option identifier to pass to {@link channels.RawReportSponsoredMessageRequest}."}]},{"kind":"class","name":"channels.sponsoredMessageReportResultChooseOption","type":"channels.SponsoredMessageReportResult","id":2221907522,"comment":"The user must choose a report option from the localized options available in options, and after selection, {@link channels.RawReportSponsoredMessageRequest} must be invoked again, passing the option's option field to the option param of the method.","arguments":[{"name":"title","type":"string","comment":"Title of the option selection popup."},{"name":"options","type":"SponsoredMessageReportOption","typeModifiers":{"isVector":true},"comment":"Localized list of options."}]},{"kind":"class","name":"channels.sponsoredMessageReportResultAdsHidden","type":"channels.SponsoredMessageReportResult","id":1044107055,"comment":"Sponsored messages were hidden for the user in all chats.","arguments":[]},{"kind":"class","name":"channels.sponsoredMessageReportResultReported","type":"channels.SponsoredMessageReportResult","id":2910423113,"comment":"The sponsored message was reported successfully.","arguments":[]},{"kind":"class","name":"stats.broadcastRevenueStats","type":"stats.BroadcastRevenueStats","id":1409802903,"comment":"Channel revenue ad statistics, see here » for more info.\n\nNote that all balances and currency amounts and graph values are in the smallest unit of the chosen cryptocurrency (currently nanotons for TONs, so to obtain a value in USD divide the chosen amount by 10^9, and then divide by usd_rate).","arguments":[{"name":"top_hours_graph","type":"StatsGraph","comment":"Ad impressions graph"},{"name":"revenue_graph","type":"StatsGraph","comment":"Ad revenue graph (in the smallest unit of the cryptocurrency in which revenue is calculated)"},{"name":"balances","type":"BroadcastRevenueBalances","comment":"Current balance, current withdrawable balance and overall revenue"},{"name":"usd_rate","type":"double","comment":"Current conversion rate of the cryptocurrency (not in the smallest unit) in which revenue is calculated to USD"}]},{"kind":"class","name":"stats.broadcastRevenueWithdrawalUrl","type":"stats.BroadcastRevenueWithdrawalUrl","id":3966080823,"comment":"Contains the URL to use to withdraw channel ad revenue.","arguments":[{"name":"url","type":"string","comment":"A unique URL to a Fragment page where the user will be able to specify and submit the address of the TON wallet where the funds will be sent."}]},{"kind":"class","name":"broadcastRevenueTransactionProceeds","type":"BroadcastRevenueTransaction","id":1434332356,"comment":"Describes earnings from sponsored messages in a channel in some time frame, see here » for more info.","arguments":[{"name":"amount","type":"long","comment":"Amount in the smallest unit of the cryptocurrency."},{"name":"from_date","type":"int","comment":"Start unixtime for the timeframe."},{"name":"to_date","type":"int","comment":"End unixtime for the timeframe."}]},{"kind":"class","name":"broadcastRevenueTransactionWithdrawal","type":"BroadcastRevenueTransaction","id":1515784568,"comment":"Describes a withdrawal of ad earnings »","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"pending","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the withdrawal is currently pending"},{"name":"failed","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether the withdrawal has failed"},{"name":"amount","type":"long","comment":"Amount withdrawn"},{"name":"date","type":"int","comment":"Withdrawal date"},{"name":"provider","type":"string","comment":"Payment provider name"},{"name":"transaction_date","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"If neither pending nor failed are set, the transaction was completed successfully, and this field will contain the point in time (UNIX timestamp in seconds) when the withdrawal was completed successfully."},{"name":"transaction_url","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"If neither pending nor failed are set, the transaction was completed successfully, and this field will contain a URL where the withdrawal transaction can be viewed."}]},{"kind":"class","name":"broadcastRevenueTransactionRefund","type":"BroadcastRevenueTransaction","id":1121127726,"comment":"Describes a refund for failed withdrawal of ad earnings »","arguments":[{"name":"amount","type":"long","comment":"Amount refunded."},{"name":"date","type":"int","comment":"Date of refund."},{"name":"provider","type":"string","comment":"Payment provider name."}]},{"kind":"class","name":"stats.broadcastRevenueTransactions","type":"stats.BroadcastRevenueTransactions","id":2266334310,"comment":"Channel ad revenue transactions ».","arguments":[{"name":"count","type":"int","comment":"Total number of transactions."},{"name":"transactions","type":"BroadcastRevenueTransaction","typeModifiers":{"isVector":true},"comment":"Transactions"}]},{"kind":"class","name":"reactionNotificationsFromContacts","type":"ReactionNotificationsFrom","id":3133384218,"comment":"Receive notifications about reactions made only by our contacts.","arguments":[]},{"kind":"class","name":"reactionNotificationsFromAll","type":"ReactionNotificationsFrom","id":1268654752,"comment":"Receive notifications about reactions made by any user.","arguments":[]},{"kind":"class","name":"reactionsNotifySettings","type":"ReactionsNotifySettings","id":1457736048,"comment":"Reaction notification settings, see here » for more info.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"messages_notify_from","type":"ReactionNotificationsFrom","typeModifiers":{"predicate":"flags.0"},"comment":"Message reaction notification settings, if not set completely disables notifications/updates about message reactions."},{"name":"stories_notify_from","type":"ReactionNotificationsFrom","typeModifiers":{"predicate":"flags.1"},"comment":"Story reaction notification settings, if not set completely disables notifications/updates about reactions to stories."},{"name":"sound","type":"NotificationSound","comment":"Notification sound for reactions »"},{"name":"show_previews","type":"Bool","comment":"If false, push notifications » about message/story reactions will only be of type REACT_HIDDEN/REACT_STORY_HIDDEN, without any information about the reacted-to story or the reaction itself."}]},{"kind":"class","name":"broadcastRevenueBalances","type":"BroadcastRevenueBalances","id":2218324422,"comment":"Describes channel ad revenue balances ».\n\nNote that all balances are in the smallest unit of the chosen cryptocurrency (currently nanotons for TONs, so to obtain a value in USD divide the chosen amount by 10^9, and then divide by usd_rate).","arguments":[{"name":"current_balance","type":"long","comment":"Amount of not-yet-withdrawn cryptocurrency."},{"name":"available_balance","type":"long","comment":"Amount of withdrawable cryptocurrency, out of the currently available balance (available_balance <= current_balance)."},{"name":"overall_revenue","type":"long","comment":"Total amount of earned cryptocurrency."}]},{"kind":"class","name":"availableEffect","type":"AvailableEffect","id":2479088254,"comment":"Represents a message effect ».\n\nAll long IDs except for id are {@link RawDocument}.ids from the containing {@link messages.RawAvailableEffects} constructor.\n\nSee here » for more info on how to use following fields.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"premium_required","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether a Premium subscription is required to use this effect."},{"name":"id","type":"long","comment":"Unique effect ID."},{"name":"emoticon","type":"string","comment":"Emoji corresponding to the effect, to be used as icon for the effect if static_icon_id is not set."},{"name":"static_icon_id","type":"long","typeModifiers":{"predicate":"flags.0"},"comment":"ID of the document containing the static icon (WEBP) of the effect."},{"name":"effect_sticker_id","type":"long","comment":"Contains the preview animation (TGS format »), used for the effect selection menu."},{"name":"effect_animation_id","type":"long","typeModifiers":{"predicate":"flags.1"},"comment":"If set, contains the actual animated effect (TGS format »). If not set, the animated effect must be set equal to the premium animated sticker effect associated to the animated sticker specified in effect_sticker_id (always different from the preview animation, fetched thanks to the {@link RawVideoSize} of type f as specified here »)."}]},{"kind":"class","name":"messages.availableEffectsNotModified","type":"messages.AvailableEffects","id":3522009691,"comment":"The full list of usable animated message effects » hasn't changed.","arguments":[]},{"kind":"class","name":"messages.availableEffects","type":"messages.AvailableEffects","id":3185271150,"comment":"The full list of usable animated message effects ».","arguments":[{"name":"hash","type":"int","comment":"Hash used for caching, for more info click here"},{"name":"effects","type":"AvailableEffect","typeModifiers":{"isVector":true},"comment":"Message effects"},{"name":"documents","type":"Document","typeModifiers":{"isVector":true},"comment":"Documents specified in the effects constructors."}]},{"kind":"class","name":"factCheck","type":"FactCheck","id":3097230543,"comment":"Represents a fact-check » created by an independent fact-checker.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"need_check","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, the country/text fields will not be set, and the fact check must be fetched manually by the client (if it isn't already cached with the key specified in hash) using bundled {@link messages.RawGetFactCheckRequest} requests, when the message with the factcheck scrolls into view."},{"name":"country","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"A two-letter ISO 3166-1 alpha-2 country code of the country for which the fact-check should be shown."},{"name":"text","type":"TextWithEntities","typeModifiers":{"predicate":"flags.1"},"comment":"The fact-check."},{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here"}]},{"kind":"class","name":"starsTransactionPeerUnsupported","type":"StarsTransactionPeer","id":2515714020,"comment":"Describes a Telegram Star transaction that cannot be described using the current layer.","arguments":[]},{"kind":"class","name":"starsTransactionPeerAppStore","type":"StarsTransactionPeer","id":3025646453,"comment":"Describes a Telegram Star transaction with the App Store, used when purchasing Telegram Stars through the App Store.","arguments":[]},{"kind":"class","name":"starsTransactionPeerPlayMarket","type":"StarsTransactionPeer","id":2069236235,"comment":"Describes a Telegram Star transaction with the Play Store, used when purchasing Telegram Stars through the Play Store.","arguments":[]},{"kind":"class","name":"starsTransactionPeerPremiumBot","type":"StarsTransactionPeer","id":621656824,"comment":"Describes a Telegram Star transaction made using @PremiumBot (i.e. using the {@link RawInputInvoiceStars} flow described here »).","arguments":[]},{"kind":"class","name":"starsTransactionPeerFragment","type":"StarsTransactionPeer","id":3912227074,"comment":"Describes a Telegram Star transaction with Fragment, used when purchasing Telegram Stars through Fragment.","arguments":[]},{"kind":"class","name":"starsTransactionPeer","type":"StarsTransactionPeer","id":3624771933,"comment":"Describes a Telegram Star transaction with another peer.","arguments":[{"name":"peer","type":"Peer","comment":"The peer."}]},{"kind":"class","name":"starsTransactionPeerAds","type":"StarsTransactionPeer","id":1617438738,"comment":"Describes a Telegram Star transaction used to pay for Telegram ads as specified here ».","arguments":[]},{"kind":"class","name":"starsTopupOption","type":"StarsTopupOption","id":198776256,"comment":"Telegram Stars topup option.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"extended","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"If set, the option must only be shown in the full list of topup options."},{"name":"stars","type":"long","comment":"Amount of Telegram stars."},{"name":"store_product","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Identifier of the store product associated with the option, official apps only."},{"name":"currency","type":"string","comment":"Three-letter ISO 4217 currency code"},{"name":"amount","type":"long","comment":"Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."}]},{"kind":"class","name":"starsTransaction","type":"StarsTransaction","id":766853519,"comment":"Represents a Telegram Stars transaction ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"refund","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether this transaction is a refund."},{"name":"pending","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"The transaction is currently pending."},{"name":"failed","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"This transaction has failed."},{"name":"gift","type":"true","typeModifiers":{"predicate":"flags.10"},"comment":"This transaction was a gift from the user in peer.peer."},{"name":"id","type":"string","comment":"Transaction ID."},{"name":"stars","type":"long","comment":"Amount of Stars (negative for outgoing transactions)."},{"name":"date","type":"int","comment":"Date of the transaction (unixtime)."},{"name":"peer","type":"StarsTransactionPeer","comment":"Source of the incoming transaction, or its recipient for outgoing transactions."},{"name":"title","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"For transactions with bots, title of the bought product."},{"name":"description","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"For transactions with bots, description of the bought product."},{"name":"photo","type":"WebDocument","typeModifiers":{"predicate":"flags.2"},"comment":"For transactions with bots, photo of the bought product."},{"name":"transaction_date","type":"int","typeModifiers":{"predicate":"flags.5"},"comment":"If neither pending nor failed are set, the transaction was completed successfully, and this field will contain the point in time (UNIX timestamp in seconds) when the withdrawal was completed successfully."},{"name":"transaction_url","type":"string","typeModifiers":{"predicate":"flags.5"},"comment":"If neither pending nor failed are set, the transaction was completed successfully, and this field will contain a URL where the withdrawal transaction can be viewed."},{"name":"bot_payload","type":"bytes","typeModifiers":{"predicate":"flags.7"},"comment":"Bot specified invoice payload (i.e. the payload passed to {@link RawInputMediaInvoice} when creating the invoice)."},{"name":"msg_id","type":"int","typeModifiers":{"predicate":"flags.8"},"comment":"For paid media transactions », message ID of the paid media posted to peer.peer (can point to a deleted message; either way, extended_media will always contain the bought media)."},{"name":"extended_media","type":"MessageMedia","typeModifiers":{"predicate":"flags.9","isVector":true},"comment":"The purchased paid media »."}]},{"kind":"class","name":"payments.starsStatus","type":"payments.StarsStatus","id":2364862048,"comment":"Info about the current Telegram Star balance and transaction history ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"balance","type":"long","comment":"Current Telegram Star balance."},{"name":"history","type":"StarsTransaction","typeModifiers":{"isVector":true},"comment":"List of Telegram Star transactions (partial if next_offset is set)."},{"name":"next_offset","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Offset to use to fetch more transactions from the transaction history using {@link payments.RawGetStarsTransactionsRequest}."},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Chats mentioned in history."},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Users mentioned in history."}]},{"kind":"class","name":"foundStory","type":"FoundStory","id":3900361664,"comment":"A story found using global story search ».","arguments":[{"name":"peer","type":"Peer","comment":"The peer that posted the story."},{"name":"story","type":"StoryItem","comment":"The story."}]},{"kind":"class","name":"stories.foundStories","type":"stories.FoundStories","id":3806230327,"comment":"Stories found using global story search ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"count","type":"int","comment":"Total number of results found for the query."},{"name":"stories","type":"FoundStory","typeModifiers":{"isVector":true},"comment":"Matching stories."},{"name":"next_offset","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Offset used to fetch the next page, if not set this is the final page."},{"name":"chats","type":"Chat","typeModifiers":{"isVector":true},"comment":"Mentioned chats"},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"Mentioned users"}]},{"kind":"class","name":"geoPointAddress","type":"GeoPointAddress","id":3729546643,"comment":"Address optionally associated to a {@link RawGeoPoint}.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"country_iso2","type":"string","comment":"Two-letter ISO 3166-1 alpha-2 country code"},{"name":"state","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"State"},{"name":"city","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"City"},{"name":"street","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"Street"}]},{"kind":"class","name":"starsRevenueStatus","type":"StarsRevenueStatus","id":2033461574,"comment":"Describes Telegram Star revenue balances ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"withdrawal_enabled","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, the user may withdraw up to available_balance stars."},{"name":"current_balance","type":"long","comment":"Amount of not-yet-withdrawn Telegram Stars."},{"name":"available_balance","type":"long","comment":"Amount of withdrawable Telegram Stars."},{"name":"overall_revenue","type":"long","comment":"Total amount of earned Telegram Stars."},{"name":"next_withdrawal_at","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Unixtime indicating when will withdrawal be available to the user. If not set, withdrawal can be started now."}]},{"kind":"class","name":"payments.starsRevenueStats","type":"payments.StarsRevenueStats","id":3375085371,"comment":"Star revenue statistics, see here » for more info.\n\nNote that all balances and currency amounts and graph values are in Stars.","arguments":[{"name":"revenue_graph","type":"StatsGraph","comment":"Star revenue graph (number of earned stars)"},{"name":"status","type":"StarsRevenueStatus","comment":"Current balance, current withdrawable balance and overall earned Telegram Stars"},{"name":"usd_rate","type":"double","comment":"Current conversion rate of Telegram Stars to USD"}]},{"kind":"class","name":"payments.starsRevenueWithdrawalUrl","type":"payments.StarsRevenueWithdrawalUrl","id":497778871,"comment":"Contains the URL to use to withdraw Telegram Star revenue.","arguments":[{"name":"url","type":"string","comment":"Contains the URL to use to withdraw Telegram Star revenue."}]},{"kind":"class","name":"payments.starsRevenueAdsAccountUrl","type":"payments.StarsRevenueAdsAccountUrl","id":961445665,"comment":"Contains a URL leading to a page where the user will be able to place ads for the channel/bot, paying using Telegram Stars.","arguments":[{"name":"url","type":"string","comment":"URL to open."}]},{"kind":"class","name":"inputStarsTransaction","type":"InputStarsTransaction","id":543876817,"comment":"Used to fetch info about a Telegram Star transaction ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"refund","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, fetches info about the refund transaction for this transaction."},{"name":"id","type":"string","comment":"Transaction ID."}]},{"kind":"class","name":"starsGiftOption","type":"StarsGiftOption","id":1577421297,"comment":"Telegram Stars gift option.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"extended","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"If set, the option must only be shown in the full list of topup options."},{"name":"stars","type":"long","comment":"Amount of Telegram stars."},{"name":"store_product","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Identifier of the store product associated with the option, official apps only."},{"name":"currency","type":"string","comment":"Three-letter ISO 4217 currency code"},{"name":"amount","type":"long","comment":"Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."}]},{"kind":"class","name":"bots.popularAppBots","type":"bots.PopularAppBots","id":428978491,"comment":"Popular Main Mini Apps, to be used in the apps tab of global search ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"next_offset","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Offset for pagination."},{"name":"users","type":"User","typeModifiers":{"isVector":true},"comment":"The bots associated to each Main Mini App, see here » for more info."}]},{"kind":"class","name":"botPreviewMedia","type":"BotPreviewMedia","id":602479523,"comment":"Represents a Main Mini App preview media, see here » for more info.","arguments":[{"name":"date","type":"int","comment":"When was this media last updated."},{"name":"media","type":"MessageMedia","comment":"The actual photo/video."}]},{"kind":"class","name":"bots.previewInfo","type":"bots.PreviewInfo","id":212278628,"comment":"Contains info about Main Mini App previews, see here » for more info.","arguments":[{"name":"media","type":"BotPreviewMedia","typeModifiers":{"isVector":true},"comment":"All preview medias for the language code passed to {@link bots.RawGetPreviewInfoRequest}."},{"name":"lang_codes","type":"string","typeModifiers":{"isVector":true},"comment":"All available language codes for which preview medias were uploaded (regardless of the language code passed to {@link bots.RawGetPreviewInfoRequest})."}]},{"kind":"class","name":"updateGroupInvitePrivacyForbidden","type":"Update","id":3438316246,"comment":"0-N updates of this type may be returned only when invoking {@link messages.RawAddChatUserRequest}, {@link channels.RawInviteToChannelRequest} or {@link messages.RawCreateChatRequest}: it indicates we couldn't add a user to a chat because of their privacy settings; if required, an invite link can be shared with the user, instead.","arguments":[{"name":"user_id","type":"int53","comment":"ID of the user we couldn't add."}]},{"kind":"class","name":"simpleWebViewResultUrl","type":"SimpleWebViewResult","id":2284811963,"comment":"Contains the webview URL with appropriate theme parameters added","arguments":[{"name":"url","type":"string","comment":"URL"}]},{"kind":"class","name":"appWebViewResultUrl","type":"AppWebViewResult","id":1008422669,"comment":"Contains the link that must be used to open a direct link Mini App.","arguments":[{"name":"url","type":"string","comment":"The URL to open"}]},{"kind":"class","name":"sponsoredWebPage","type":"SponsoredWebPage","id":1035529315,"comment":"Represents a sponsored website.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"url","type":"string","comment":"Web page URL."},{"name":"site_name","type":"string","comment":"Website name."},{"name":"photo","type":"Photo","typeModifiers":{"predicate":"flags.0"},"comment":"Optional image preview."}]},{"kind":"class","name":"inputStorePaymentStars","type":"InputStorePaymentPurpose","id":1326377183,"comment":"Used to top up the Telegram Stars balance using the Play Store/App Store flow (official apps only).","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"stars","type":"long","comment":"Amount of stars to topup"},{"name":"currency","type":"string","comment":"Three-letter ISO 4217 currency code"},{"name":"amount","type":"long","comment":"Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."}]},{"kind":"class","name":"mtcute.dummyUpdate","id":614906126,"type":"Update","arguments":[{"name":"pts","type":"int"},{"name":"pts_count","type":"int"},{"name":"channel_id","type":"int53"}]},{"kind":"class","name":"mtcute.dummyInputPeerMinUser","id":2240546338,"type":"InputPeer","arguments":[{"name":"user_id","type":"int"}]},{"kind":"class","name":"mtcute.dummyInputPeerMinChannel","id":1796171926,"type":"InputPeer","arguments":[{"name":"channel_id","type":"int"}]},{"kind":"method","name":"test.useConfigSimple","id":4189565501,"type":"help.ConfigSimple","arguments":[],"typeModifiers":{"constructorId":1515793004}},{"kind":"method","name":"test.parseInputAppEvent","id":3138226161,"type":"InputAppEvent","arguments":[],"typeModifiers":{"constructorId":488313413}},{"kind":"method","name":"invokeWithBusinessConnectionPrefix","id":3710427022,"type":"Error","arguments":[{"name":"connection_id","type":"string"}],"typeModifiers":{"constructorId":3300522427}},{"kind":"method","name":"invokeWithGooglePlayIntegrityPrefix","id":502868356,"type":"Error","arguments":[{"name":"nonce","type":"string"},{"name":"token","type":"string"}],"typeModifiers":{"constructorId":3300522427}},{"kind":"method","name":"invokeWithApnsSecretPrefix","id":229528824,"type":"Error","arguments":[{"name":"nonce","type":"string"},{"name":"secret","type":"string"}],"typeModifiers":{"constructorId":3300522427}},{"kind":"method","name":"invokeAfterMsg","type":"X","id":3416209197,"comment":"Invokes a query after successful completion of one of the previous queries.","generics":[{"name":"X","type":"Type"}],"arguments":[{"name":"msg_id","type":"long","comment":"Message identifier on which a current query depends"},{"name":"query","type":"!X","comment":"The query itself"}],"available":"both"},{"kind":"method","name":"invokeAfterMsgs","type":"X","id":1036301552,"comment":"Invokes a query after a successful completion of previous queries","generics":[{"name":"X","type":"Type"}],"arguments":[{"name":"msg_ids","type":"long","typeModifiers":{"isVector":true},"comment":"List of messages on which a current query depends"},{"name":"query","type":"!X","comment":"The query itself"}],"available":"both"},{"kind":"method","name":"initConnection","type":"X","id":3251461801,"comment":"Initialize connection","generics":[{"name":"X","type":"Type"}],"arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"api_id","type":"int","comment":"Application identifier (see. App configuration)"},{"name":"device_model","type":"string","comment":"Device model"},{"name":"system_version","type":"string","comment":"Operation system version"},{"name":"app_version","type":"string","comment":"Application version"},{"name":"system_lang_code","type":"string","comment":"Code for the language used on the device's OS, ISO 639-1 standard"},{"name":"lang_pack","type":"string","comment":"Platform identifier (i.e. android, tdesktop, etc)."},{"name":"lang_code","type":"string","comment":"Either an ISO 639-1 language code or a language pack name obtained from a language pack link."},{"name":"proxy","type":"InputClientProxy","typeModifiers":{"predicate":"flags.0"},"comment":"Info about an MTProto proxy"},{"name":"params","type":"JSONValue","typeModifiers":{"predicate":"flags.1"},"comment":"Additional initConnection parameters.
For now, only the tz_offset field is supported, for specifying the timezone offset in seconds."},{"name":"query","type":"!X","comment":"The query itself"}],"throws":[{"code":400,"name":"CONNECTION_LAYER_INVALID","comment":"Layer invalid."}],"available":"both"},{"kind":"method","name":"invokeWithLayer","type":"X","id":3667594509,"comment":"Invoke the specified query using the specified API layer","generics":[{"name":"X","type":"Type"}],"arguments":[{"name":"layer","type":"int","comment":"The layer to use"},{"name":"query","type":"!X","comment":"The query"}],"throws":[{"code":400,"name":"AUTH_BYTES_INVALID","comment":"The provided authorization is invalid."},{"code":400,"name":"CDN_METHOD_INVALID","comment":"You can't call this method in a CDN DC."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"CONNECTION_API_ID_INVALID","comment":"The provided API id is invalid."},{"code":406,"name":"INVITE_HASH_EXPIRED","comment":"The invite link has expired."}],"available":"both"},{"kind":"method","name":"invokeWithoutUpdates","type":"X","id":3214170551,"comment":"Invoke a request without subscribing the used connection for updates (this is enabled by default for file queries).","generics":[{"name":"X","type":"Type"}],"arguments":[{"name":"query","type":"!X","comment":"The query"}],"available":"both"},{"kind":"method","name":"invokeWithMessagesRange","type":"X","id":911373810,"comment":"Invoke with the given message range","generics":[{"name":"X","type":"Type"}],"arguments":[{"name":"range","type":"MessageRange","comment":"Message range"},{"name":"query","type":"!X","comment":"Query"}],"available":"both"},{"kind":"method","name":"invokeWithTakeout","type":"X","id":2896821550,"comment":"Invoke a method within a takeout session, see here » for more info.","generics":[{"name":"X","type":"Type"}],"arguments":[{"name":"takeout_id","type":"long","comment":"Takeout session ID »"},{"name":"query","type":"!X","comment":"Query"}],"available":"both"},{"kind":"method","name":"invokeWithBusinessConnection","type":"X","id":3710427022,"comment":"Invoke a method using a Telegram Business Bot connection, see here » for more info, including a list of the methods that can be wrapped in this constructor.\n\nMake sure to always send queries wrapped in a invokeWithBusinessConnection to the datacenter ID, specified in the dc_id field of the {@link RawBotBusinessConnection} that is being used.","generics":[{"name":"X","type":"Type"}],"arguments":[{"name":"connection_id","type":"string","comment":"Business connection ID."},{"name":"query","type":"!X","comment":"The actual query."}],"available":"both"},{"kind":"method","name":"invokeWithGooglePlayIntegrity","type":"X","id":502868356,"comment":"Official clients only, invoke with Google Play Integrity token.","generics":[{"name":"X","type":"Type"}],"arguments":[{"name":"nonce","type":"string","comment":"Nonce."},{"name":"token","type":"string","comment":"Token."},{"name":"query","type":"!X","comment":"Query."}],"available":"both"},{"kind":"method","name":"invokeWithApnsSecret","type":"X","id":229528824,"comment":"Official clients only, invoke with Apple push verification.","generics":[{"name":"X","type":"Type"}],"arguments":[{"name":"nonce","type":"string","comment":"Nonce."},{"name":"secret","type":"string","comment":"Secret."},{"name":"query","type":"!X","comment":"Query."}],"available":"both"},{"kind":"method","name":"auth.sendCode","type":"auth.SentCode","id":2792825935,"comment":"Send the verification code for login","arguments":[{"name":"phone_number","type":"string","comment":"Phone number in international format"},{"name":"api_id","type":"int","comment":"Application identifier (see App configuration)"},{"name":"api_hash","type":"string","comment":"Application secret hash (see App configuration)"},{"name":"settings","type":"CodeSettings","comment":"Settings for the code type to send"}],"throws":[{"code":400,"name":"API_ID_INVALID","comment":"API ID invalid."},{"code":400,"name":"API_ID_PUBLISHED_FLOOD","comment":"This API id was published somewhere, you can't use it now."},{"code":500,"name":"AUTH_RESTART","comment":"Restart the authorization process."},{"code":400,"name":"PHONE_NUMBER_APP_SIGNUP_FORBIDDEN","comment":"You can't sign up using this app."},{"code":400,"name":"PHONE_NUMBER_BANNED","comment":"The provided phone number is banned from telegram."},{"code":400,"name":"PHONE_NUMBER_FLOOD","comment":"You asked for the code too many times."},{"code":406,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."},{"code":406,"name":"PHONE_PASSWORD_FLOOD","comment":"You have tried logging in too many times."},{"code":400,"name":"PHONE_PASSWORD_PROTECTED","comment":"This phone is password protected."},{"code":400,"name":"SMS_CODE_CREATE_FAILED","comment":"An error occurred while creating the SMS code."},{"code":406,"name":"UPDATE_APP_TO_LOGIN","comment":"Please update to the latest version of MadelineProto to login."}],"available":"user"},{"kind":"method","name":"auth.signUp","type":"auth.Authorization","id":2865215255,"comment":"Registers a validated phone number in the system.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"no_joined_notifications","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, users on Telegram that have already added phone_number to their contacts will not receive signup notifications about this user."},{"name":"phone_number","type":"string","comment":"Phone number in the international format"},{"name":"phone_code_hash","type":"string","comment":"SMS-message ID"},{"name":"first_name","type":"string","comment":"New user first name"},{"name":"last_name","type":"string","comment":"New user last name"}],"throws":[{"code":400,"name":"FIRSTNAME_INVALID","comment":"The first name is invalid."},{"code":400,"name":"LASTNAME_INVALID","comment":"The last name is invalid."},{"code":400,"name":"PHONE_CODE_EMPTY","comment":"phone_code is missing."},{"code":400,"name":"PHONE_CODE_EXPIRED","comment":"The phone code you provided has expired."},{"code":400,"name":"PHONE_CODE_INVALID","comment":"The provided phone code is invalid."},{"code":400,"name":"PHONE_NUMBER_FLOOD","comment":"You asked for the code too many times."},{"code":406,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."},{"code":400,"name":"PHONE_NUMBER_OCCUPIED","comment":"The phone number is already in use."}],"available":"user"},{"kind":"method","name":"auth.signIn","type":"auth.Authorization","id":2371004753,"comment":"Signs in a user with a validated phone number.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"phone_number","type":"string","comment":"Phone number in the international format"},{"name":"phone_code_hash","type":"string","comment":"SMS-message ID, obtained from {@link auth.RawSendCodeRequest}"},{"name":"phone_code","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Valid numerical code from the SMS-message"},{"name":"email_verification","type":"EmailVerification","typeModifiers":{"predicate":"flags.1"},"comment":"Email verification code or token"}],"throws":[{"code":500,"name":"AUTH_RESTART","comment":"Restart the authorization process."},{"code":400,"name":"PHONE_CODE_EMPTY","comment":"phone_code is missing."},{"code":400,"name":"PHONE_CODE_EXPIRED","comment":"The phone code you provided has expired."},{"code":400,"name":"PHONE_CODE_INVALID","comment":"The provided phone code is invalid."},{"code":406,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."},{"code":400,"name":"PHONE_NUMBER_UNOCCUPIED","comment":"The phone number is not yet being used."},{"code":500,"name":"SIGN_IN_FAILED","comment":"Failure while signing in."},{"code":406,"name":"UPDATE_APP_TO_LOGIN","comment":"Please update to the latest version of MadelineProto to login."}],"available":"user"},{"kind":"method","name":"auth.logOut","type":"auth.LoggedOut","typeModifiers":{"constructorId":3282207583},"id":1047706137,"comment":"Logs out the user.","arguments":[],"available":"both"},{"kind":"method","name":"auth.resetAuthorizations","type":"Bool","id":2678787354,"comment":"Terminates all user's authorized sessions except for the current one.\n\nAfter calling this method it is necessary to reregister the current device using the method {@link account.RawRegisterDeviceRequest}","arguments":[],"throws":[{"code":406,"name":"FRESH_RESET_AUTHORISATION_FORBIDDEN","comment":"You can't logout other sessions if less than 24 hours have passed since you logged on the current session."}],"available":"user"},{"kind":"method","name":"auth.exportAuthorization","type":"auth.ExportedAuthorization","typeModifiers":{"constructorId":3023364792},"id":3854565325,"comment":"Returns data for copying authorization to another data-center.","arguments":[{"name":"dc_id","type":"int","comment":"Number of a target data-center"}],"throws":[{"code":400,"name":"DC_ID_INVALID","comment":"The provided DC ID is invalid."}],"available":"both"},{"kind":"method","name":"auth.importAuthorization","type":"auth.Authorization","id":2776268205,"comment":"Logs in a user using a key transmitted from their native data-center.","arguments":[{"name":"id","type":"long","comment":"User ID"},{"name":"bytes","type":"bytes","comment":"Authorization key"}],"throws":[{"code":400,"name":"AUTH_BYTES_INVALID","comment":"The provided authorization is invalid."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"both"},{"kind":"method","name":"auth.bindTempAuthKey","type":"Bool","id":3453233669,"comment":"Binds a temporary authorization key temp_auth_key_id to the permanent authorization key perm_auth_key_id. Each permanent key may only be bound to one temporary key at a time, binding a new temporary key overwrites the previous one.\n\nFor more information, see Perfect Forward Secrecy.","arguments":[{"name":"perm_auth_key_id","type":"long","comment":"Permanent auth_key_id to bind to"},{"name":"nonce","type":"long","comment":"Random long from Binding message contents"},{"name":"expires_at","type":"int","comment":"UNIX timestamp in seconds to invalidate temporary key, see Binding message contents"},{"name":"encrypted_message","type":"bytes","comment":"See Generating encrypted_message"}],"throws":[{"code":400,"name":"ENCRYPTED_MESSAGE_INVALID","comment":"Encrypted message invalid."},{"code":400,"name":"TEMP_AUTH_KEY_ALREADY_BOUND","comment":"The passed temporary key is already bound to another perm_auth_key_id."},{"code":400,"name":"TEMP_AUTH_KEY_EMPTY","comment":"No temporary auth key provided."}],"available":"both"},{"kind":"method","name":"auth.importBotAuthorization","type":"auth.Authorization","id":1738800940,"comment":"Login as a bot","arguments":[{"name":"flags","type":"int","comment":"Reserved for future use"},{"name":"api_id","type":"int","comment":"Application identifier (see. App configuration)"},{"name":"api_hash","type":"string","comment":"Application identifier hash (see. App configuration)"},{"name":"bot_auth_token","type":"string","comment":"Bot token (see bots)"}],"throws":[{"code":400,"name":"ACCESS_TOKEN_EXPIRED","comment":"Access token expired."},{"code":400,"name":"ACCESS_TOKEN_INVALID","comment":"Access token invalid."},{"code":400,"name":"API_ID_INVALID","comment":"API ID invalid."},{"code":400,"name":"API_ID_PUBLISHED_FLOOD","comment":"This API id was published somewhere, you can't use it now."}],"available":"both"},{"kind":"method","name":"auth.checkPassword","type":"auth.Authorization","id":3515567382,"comment":"Try logging to an account protected by a 2FA password.","arguments":[{"name":"password","type":"InputCheckPasswordSRP","comment":"The account's password (see SRP)"}],"throws":[{"code":400,"name":"PASSWORD_HASH_INVALID","comment":"The provided password hash is invalid."},{"code":400,"name":"SRP_ID_INVALID","comment":"Invalid SRP ID provided."},{"code":400,"name":"SRP_PASSWORD_CHANGED","comment":"Password has changed."}],"available":"user"},{"kind":"method","name":"auth.requestPasswordRecovery","type":"auth.PasswordRecovery","typeModifiers":{"constructorId":326715557},"id":3633822822,"comment":"Request recovery code of a 2FA password, only for accounts with a recovery email configured.","arguments":[],"throws":[{"code":400,"name":"PASSWORD_EMPTY","comment":"The provided password is empty."},{"code":400,"name":"PASSWORD_RECOVERY_NA","comment":"No email was set, can't recover password via email."}],"available":"user"},{"kind":"method","name":"auth.recoverPassword","type":"auth.Authorization","id":923364464,"comment":"Reset the 2FA password using the recovery code sent using {@link auth.RawRequestPasswordRecoveryRequest}.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"code","type":"string","comment":"Code received via email"},{"name":"new_settings","type":"account.PasswordInputSettings","typeModifiers":{"predicate":"flags.0"},"comment":"New password"}],"throws":[{"code":400,"name":"CODE_EMPTY","comment":"The provided code is empty."},{"code":400,"name":"NEW_SETTINGS_INVALID","comment":"The new password settings are invalid."}],"available":"user"},{"kind":"method","name":"auth.resendCode","type":"auth.SentCode","id":3403969827,"comment":"Resend the login code via another medium, the phone code type is determined by the return value of the previous auth.sendCode/auth.resendCode: see login for more info.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"phone_number","type":"string","comment":"The phone number"},{"name":"phone_code_hash","type":"string","comment":"The phone code hash obtained from {@link auth.RawSendCodeRequest}"},{"name":"reason","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Official clients only, used if the device integrity verification failed, and no secret could be obtained to invoke {@link auth.RawRequestFirebaseSmsRequest}: in this case, the device integrity verification failure reason must be passed here."}],"throws":[{"code":400,"name":"PHONE_CODE_EMPTY","comment":"phone_code is missing."},{"code":400,"name":"PHONE_CODE_EXPIRED","comment":"The phone code you provided has expired."},{"code":400,"name":"PHONE_CODE_HASH_EMPTY","comment":"phone_code_hash is missing."},{"code":406,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."},{"code":406,"name":"SEND_CODE_UNAVAILABLE","comment":"Returned when all available options for this type of number were already used (e.g. flash-call, then SMS, then this error might be returned to trigger a second resend)."}],"available":"user"},{"kind":"method","name":"auth.cancelCode","type":"Bool","id":520357240,"comment":"Cancel the login verification code","arguments":[{"name":"phone_number","type":"string","comment":"Phone number"},{"name":"phone_code_hash","type":"string","comment":"Phone code hash from {@link auth.RawSendCodeRequest}"}],"throws":[{"code":400,"name":"PHONE_CODE_EXPIRED","comment":"The phone code you provided has expired."},{"code":406,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."}],"available":"user"},{"kind":"method","name":"auth.dropTempAuthKeys","type":"Bool","id":2387124616,"comment":"Delete all temporary authorization keys except for the ones specified","arguments":[{"name":"except_auth_keys","type":"long","typeModifiers":{"isVector":true},"comment":"The auth keys that shouldn't be dropped."}],"available":"both"},{"kind":"method","name":"auth.exportLoginToken","type":"auth.LoginToken","id":3084944894,"comment":"Generate a login token, for login via QR code.
\nThe generated login token should be encoded using base64url, then shown as a tg://login?token=base64encodedtoken deep link » in the QR code.\n\nFor more info, see login via QR code.","arguments":[{"name":"api_id","type":"int","comment":"Application identifier (see. App configuration)"},{"name":"api_hash","type":"string","comment":"Application identifier hash (see. App configuration)"},{"name":"except_ids","type":"long","typeModifiers":{"isVector":true},"comment":"List of already logged-in user IDs, to prevent logging in twice with the same user"}],"throws":[{"code":400,"name":"API_ID_INVALID","comment":"API ID invalid."},{"code":400,"name":"API_ID_PUBLISHED_FLOOD","comment":"This API id was published somewhere, you can't use it now."}],"available":"user"},{"kind":"method","name":"auth.importLoginToken","type":"auth.LoginToken","id":2511101156,"comment":"Login using a redirected login token, generated in case of DC mismatch during QR code login.\n\nFor more info, see login via QR code.","arguments":[{"name":"token","type":"bytes","comment":"Login token"}],"throws":[{"code":400,"name":"AUTH_TOKEN_ALREADY_ACCEPTED","comment":"The specified auth token was already accepted."},{"code":400,"name":"AUTH_TOKEN_EXPIRED","comment":"The authorization token has expired."},{"code":400,"name":"AUTH_TOKEN_INVALID","comment":"The specified auth token is invalid."},{"code":400,"name":"AUTH_TOKEN_INVALIDX","comment":"The specified auth token is invalid."}],"available":"user"},{"kind":"method","name":"auth.acceptLoginToken","type":"Authorization","typeModifiers":{"constructorId":2902578717},"id":3902057805,"comment":"Accept QR code login token, logging in the app that generated it.\n\nReturns info about the new session.\n\nFor more info, see login via QR code.","arguments":[{"name":"token","type":"bytes","comment":"Login token embedded in QR code, for more info, see login via QR code."}],"throws":[{"code":400,"name":"AUTH_TOKEN_ALREADY_ACCEPTED","comment":"The specified auth token was already accepted."},{"code":400,"name":"AUTH_TOKEN_EXCEPTION","comment":"An error occurred while importing the auth token."},{"code":400,"name":"AUTH_TOKEN_EXPIRED","comment":"The authorization token has expired."},{"code":400,"name":"AUTH_TOKEN_INVALIDX","comment":"The specified auth token is invalid."}],"available":"user"},{"kind":"method","name":"auth.checkRecoveryPassword","type":"Bool","id":221691769,"comment":"Check if the 2FA recovery code sent using {@link auth.RawRequestPasswordRecoveryRequest} is valid, before passing it to {@link auth.RawRecoverPasswordRequest}.","arguments":[{"name":"code","type":"string","comment":"Code received via email"}],"throws":[{"code":400,"name":"CODE_EMPTY","comment":"The provided code is empty."},{"code":400,"name":"PASSWORD_RECOVERY_EXPIRED","comment":"The recovery code has expired."}],"available":"user"},{"kind":"method","name":"auth.importWebTokenAuthorization","type":"auth.Authorization","id":767062953,"comment":"Login by importing an authorization token","arguments":[{"name":"api_id","type":"int","comment":"API ID"},{"name":"api_hash","type":"string","comment":"API hash"},{"name":"web_auth_token","type":"string","comment":"The authorization token"}],"throws":[{"code":400,"name":"API_ID_INVALID","comment":"API ID invalid."}],"available":"user"},{"kind":"method","name":"auth.requestFirebaseSms","type":"Bool","id":2386109982,"comment":"Request an SMS code via Firebase.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"phone_number","type":"string","comment":"Phone number"},{"name":"phone_code_hash","type":"string","comment":"Phone code hash returned by {@link auth.RawSendCodeRequest}"},{"name":"safety_net_token","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"On Android, a JWS object obtained as described in the auth documentation »"},{"name":"play_integrity_token","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"On Android, an object obtained as described in the auth documentation »"},{"name":"ios_push_secret","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Secret token received via an apple push notification"}],"throws":[{"code":400,"name":"PHONE_CODE_EMPTY","comment":"phone_code is missing."},{"code":400,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."}],"available":"user"},{"kind":"method","name":"auth.resetLoginEmail","type":"auth.SentCode","id":2123760019,"comment":"Reset the login email ».","arguments":[{"name":"phone_number","type":"string","comment":"Phone number of the account"},{"name":"phone_code_hash","type":"string","comment":"Phone code hash, obtained as described in the documentation »"}],"throws":[{"code":400,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."},{"code":400,"name":"TASK_ALREADY_EXISTS","comment":"An email reset was already requested."}],"available":"user"},{"kind":"method","name":"auth.reportMissingCode","type":"Bool","id":3416125430,"comment":"Official apps only, reports that the SMS authentication code wasn't delivered.","arguments":[{"name":"phone_number","type":"string","comment":"Phone number where we were supposed to receive the code"},{"name":"phone_code_hash","type":"string","comment":"The phone code hash obtained from {@link auth.RawSendCodeRequest}"},{"name":"mnc","type":"string","comment":"MNC of the current network operator."}],"throws":[{"code":400,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."}],"available":"user"},{"kind":"method","name":"account.registerDevice","type":"Bool","id":3968205178,"comment":"Register device to receive PUSH notifications","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"no_muted","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Avoid receiving (silent and invisible background) notifications. Useful to save battery."},{"name":"token_type","type":"int","comment":"Device token type, see PUSH updates for the possible values."},{"name":"token","type":"string","comment":"Device token, see PUSH updates for the possible values."},{"name":"app_sandbox","type":"Bool","comment":"If true is transmitted, a sandbox-certificate will be used during transmission."},{"name":"secret","type":"bytes","comment":"For FCM and APNS VoIP, optional encryption key used to encrypt push notifications"},{"name":"other_uids","type":"int53","typeModifiers":{"isVector":true},"comment":"List of user identifiers of other users currently using the client"}],"throws":[{"code":400,"name":"TOKEN_EMPTY","comment":"The specified token is empty."},{"code":400,"name":"TOKEN_INVALID","comment":"The provided token is invalid."},{"code":400,"name":"TOKEN_TYPE_INVALID","comment":"The specified token type is invalid."},{"code":400,"name":"WEBPUSH_AUTH_INVALID","comment":"The specified web push authentication secret is invalid."},{"code":400,"name":"WEBPUSH_KEY_INVALID","comment":"The specified web push elliptic curve Diffie-Hellman public key is invalid."},{"code":400,"name":"WEBPUSH_TOKEN_INVALID","comment":"The specified web push token is invalid."}],"available":"user"},{"kind":"method","name":"account.unregisterDevice","type":"Bool","id":1779249670,"comment":"Deletes a device by its token, stops sending PUSH-notifications to it.","arguments":[{"name":"token_type","type":"int","comment":"Device token type, see PUSH updates for the possible values."},{"name":"token","type":"string","comment":"Device token, see PUSH updates for the possible values."},{"name":"other_uids","type":"int53","typeModifiers":{"isVector":true},"comment":"List of user identifiers of other users currently using the client"}],"throws":[{"code":400,"name":"TOKEN_INVALID","comment":"The provided token is invalid."}],"available":"user"},{"kind":"method","name":"account.updateNotifySettings","type":"Bool","id":2227067795,"comment":"Edits notification settings from a given user/group, from all users/all groups.","arguments":[{"name":"peer","type":"InputNotifyPeer","comment":"Notification source"},{"name":"settings","type":"InputPeerNotifySettings","comment":"Notification settings"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"SETTINGS_INVALID","comment":"Invalid settings were provided."}],"available":"user"},{"kind":"method","name":"account.getNotifySettings","type":"PeerNotifySettings","typeModifiers":{"constructorId":2573347852},"id":313765169,"comment":"Gets current notification settings for a given user/group, from all users/all groups.","arguments":[{"name":"peer","type":"InputNotifyPeer","comment":"Notification source"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"account.resetNotifySettings","type":"Bool","id":3682473799,"comment":"Resets all notification settings from users and groups.","arguments":[],"available":"user"},{"kind":"method","name":"account.updateProfile","type":"User","id":2018596725,"comment":"Updates user profile.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"first_name","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"New user first name"},{"name":"last_name","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"New user last name"},{"name":"about","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"New bio"}],"throws":[{"code":400,"name":"ABOUT_TOO_LONG","comment":"About string too long."},{"code":400,"name":"FIRSTNAME_INVALID","comment":"The first name is invalid."}],"available":"user"},{"kind":"method","name":"account.updateStatus","type":"Bool","id":1713919532,"comment":"Updates online user status.","arguments":[{"name":"offline","type":"Bool","comment":"If true is transmitted, user status will change to {@link RawUserStatusOffline}."}],"available":"user"},{"kind":"method","name":"account.getWallPapers","type":"account.WallPapers","id":127302966,"comment":"Returns a list of available wallpapers.","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"account.reportPeer","type":"Bool","id":3317316998,"comment":"Report a peer for violation of telegram's Terms of Service","arguments":[{"name":"peer","type":"InputPeer","comment":"The peer to report"},{"name":"reason","type":"ReportReason","comment":"The reason why this peer is being reported"},{"name":"message","type":"string","comment":"Comment for report moderation"}],"throws":[{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"account.checkUsername","type":"Bool","id":655677548,"comment":"Validates a username and checks availability.","arguments":[{"name":"username","type":"string","comment":"username
Accepted characters: A-z (case-insensitive), 0-9 and underscores.
Length: 5-32 characters."}],"throws":[{"code":400,"name":"USERNAME_INVALID","comment":"The provided username is not valid."},{"code":400,"name":"USERNAME_OCCUPIED","comment":"The provided username is already occupied."},{"code":400,"name":"USERNAME_PURCHASE_AVAILABLE","comment":"The specified username can be purchased on https://fragment.com."}],"available":"user"},{"kind":"method","name":"account.updateUsername","type":"User","id":1040964988,"comment":"Changes username for the current user.","arguments":[{"name":"username","type":"string","comment":"username or empty string if username is to be removed
Accepted characters: a-z (case-insensitive), 0-9 and underscores.
Length: 5-32 characters."}],"throws":[{"code":400,"name":"USERNAME_INVALID","comment":"The provided username is not valid."},{"code":400,"name":"USERNAME_NOT_MODIFIED","comment":"The username was not modified."},{"code":400,"name":"USERNAME_OCCUPIED","comment":"The provided username is already occupied."},{"code":400,"name":"USERNAME_PURCHASE_AVAILABLE","comment":"The specified username can be purchased on https://fragment.com."}],"available":"user"},{"kind":"method","name":"account.getPrivacy","type":"account.PrivacyRules","typeModifiers":{"constructorId":1352683077},"id":3671837008,"comment":"Get privacy settings of current account","arguments":[{"name":"key","type":"InputPrivacyKey","comment":"Peer category whose privacy settings should be fetched"}],"throws":[{"code":400,"name":"PRIVACY_KEY_INVALID","comment":"The privacy key is invalid."}],"available":"user"},{"kind":"method","name":"account.setPrivacy","type":"account.PrivacyRules","typeModifiers":{"constructorId":1352683077},"id":3388480744,"comment":"Change privacy settings of current account","arguments":[{"name":"key","type":"InputPrivacyKey","comment":"New privacy rule"},{"name":"rules","type":"InputPrivacyRule","typeModifiers":{"isVector":true},"comment":"Peers to which the privacy rule will apply."}],"throws":[{"code":400,"name":"PRIVACY_KEY_INVALID","comment":"The privacy key is invalid."},{"code":400,"name":"PRIVACY_TOO_LONG","comment":"Too many privacy rules were specified, the current limit is 1000."},{"code":400,"name":"PRIVACY_VALUE_INVALID","comment":"The specified privacy rule combination is invalid."}],"available":"user"},{"kind":"method","name":"account.deleteAccount","type":"Bool","id":2730545012,"comment":"Delete the user's account from the telegram servers.\n\nCan also be used to delete the account of a user that provided the login code, but forgot the 2FA password and no recovery method is configured, see here » for more info on password recovery, and here » for more info on account deletion.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"reason","type":"string","comment":"Why is the account being deleted, can be empty"},{"name":"password","type":"InputCheckPasswordSRP","typeModifiers":{"predicate":"flags.0"},"comment":"2FA password: this field can be omitted even for accounts with 2FA enabled: in this case account account deletion will be delayed by 7 days as specified in the docs »"}],"throws":[{"code":420,"name":"2FA_CONFIRM_WAIT_%d","comment":"Since this account is active and protected by a 2FA password, we will delete it in 1 week for security purposes. You can cancel this process at any time, you'll be able to reset your account in %d seconds."}],"available":"user"},{"kind":"method","name":"account.getAccountTTL","type":"AccountDaysTTL","typeModifiers":{"constructorId":3100684255},"id":150761757,"comment":"Get days to live of account","arguments":[],"available":"user"},{"kind":"method","name":"account.setAccountTTL","type":"Bool","id":608323678,"comment":"Set account self-destruction period","arguments":[{"name":"ttl","type":"AccountDaysTTL","comment":"Time to live in days"}],"throws":[{"code":400,"name":"TTL_DAYS_INVALID","comment":"The provided TTL is invalid."}],"available":"user"},{"kind":"method","name":"account.sendChangePhoneCode","type":"auth.SentCode","id":2186758885,"comment":"Verify a new phone number to associate to the current account","arguments":[{"name":"phone_number","type":"string","comment":"New phone number"},{"name":"settings","type":"CodeSettings","comment":"Phone code settings"}],"throws":[{"code":406,"name":"FRESH_CHANGE_PHONE_FORBIDDEN","comment":"You can't change phone number right after logging in, please wait at least 24 hours."},{"code":400,"name":"PHONE_NUMBER_BANNED","comment":"The provided phone number is banned from telegram."},{"code":406,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."},{"code":400,"name":"PHONE_NUMBER_OCCUPIED","comment":"The phone number is already in use."}],"available":"user"},{"kind":"method","name":"account.changePhone","type":"User","id":1891839707,"comment":"Change the phone number of the current account","arguments":[{"name":"phone_number","type":"string","comment":"New phone number"},{"name":"phone_code_hash","type":"string","comment":"Phone code hash received when calling {@link account.RawSendChangePhoneCodeRequest}"},{"name":"phone_code","type":"string","comment":"Phone code received when calling {@link account.RawSendChangePhoneCodeRequest}"}],"throws":[{"code":400,"name":"PHONE_CODE_EMPTY","comment":"phone_code is missing."},{"code":400,"name":"PHONE_CODE_EXPIRED","comment":"The phone code you provided has expired."},{"code":406,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."},{"code":400,"name":"PHONE_NUMBER_OCCUPIED","comment":"The phone number is already in use."}],"available":"user"},{"kind":"method","name":"account.updateDeviceLocked","type":"Bool","id":954152242,"comment":"When client-side passcode lock feature is enabled, will not show message texts in incoming PUSH notifications.","arguments":[{"name":"period","type":"int","comment":"Inactivity period after which to start hiding message texts in PUSH notifications."}],"available":"user"},{"kind":"method","name":"account.getAuthorizations","type":"account.Authorizations","typeModifiers":{"constructorId":1275039392},"id":3810574680,"comment":"Get logged-in sessions","arguments":[],"available":"user"},{"kind":"method","name":"account.resetAuthorization","type":"Bool","id":3749180348,"comment":"Log out an active authorized session by its hash","arguments":[{"name":"hash","type":"long","comment":"Session hash"}],"throws":[{"code":406,"name":"FRESH_RESET_AUTHORISATION_FORBIDDEN","comment":"You can't logout other sessions if less than 24 hours have passed since you logged on the current session."},{"code":400,"name":"HASH_INVALID","comment":"The provided hash is invalid."}],"available":"user"},{"kind":"method","name":"account.getPassword","type":"account.Password","typeModifiers":{"constructorId":2507886843},"id":1418342645,"comment":"Obtain configuration for two-factor authorization with password","arguments":[],"available":"user"},{"kind":"method","name":"account.getPasswordSettings","type":"account.PasswordSettings","typeModifiers":{"constructorId":2589733861},"id":2631199481,"comment":"Get private info associated to the password info (recovery email, telegram passport info & so on)","arguments":[{"name":"password","type":"InputCheckPasswordSRP","comment":"The password (see SRP)"}],"throws":[{"code":400,"name":"PASSWORD_HASH_INVALID","comment":"The provided password hash is invalid."}],"available":"user"},{"kind":"method","name":"account.updatePasswordSettings","type":"Bool","id":2778402863,"comment":"Set a new 2FA password","arguments":[{"name":"password","type":"InputCheckPasswordSRP","comment":"The old password (see SRP)"},{"name":"new_settings","type":"account.PasswordInputSettings","comment":"The new password (see SRP)"}],"throws":[{"code":400,"name":"EMAIL_INVALID","comment":"The specified email is invalid."},{"code":400,"name":"EMAIL_UNCONFIRMED","comment":"Email unconfirmed."},{"code":400,"name":"EMAIL_UNCONFIRMED_%d","comment":"The provided email isn't confirmed, %d is the length of the verification code that was just sent to the email: use {@link account.RawVerifyEmailRequest} to enter the received verification code and enable the recovery email."},{"code":400,"name":"NEW_SALT_INVALID","comment":"The new salt is invalid."},{"code":400,"name":"NEW_SETTINGS_EMPTY","comment":"No password is set on the current account, and no new password was specified in new_settings."},{"code":400,"name":"NEW_SETTINGS_INVALID","comment":"The new password settings are invalid."},{"code":400,"name":"PASSWORD_HASH_INVALID","comment":"The provided password hash is invalid."},{"code":400,"name":"SRP_ID_INVALID","comment":"Invalid SRP ID provided."},{"code":400,"name":"SRP_PASSWORD_CHANGED","comment":"Password has changed."}],"available":"user"},{"kind":"method","name":"account.sendConfirmPhoneCode","type":"auth.SentCode","id":457157256,"comment":"Send confirmation code to cancel account deletion, for more info click here »","arguments":[{"name":"hash","type":"string","comment":"The hash from the service notification, for more info click here »"},{"name":"settings","type":"CodeSettings","comment":"Phone code settings"}],"throws":[{"code":400,"name":"HASH_INVALID","comment":"The provided hash is invalid."}],"available":"user"},{"kind":"method","name":"account.confirmPhone","type":"Bool","id":1596029123,"comment":"Confirm a phone number to cancel account deletion, for more info click here »","arguments":[{"name":"phone_code_hash","type":"string","comment":"Phone code hash, for more info click here »"},{"name":"phone_code","type":"string","comment":"SMS code, for more info click here »"}],"throws":[{"code":400,"name":"CODE_HASH_INVALID","comment":"Code hash invalid."},{"code":400,"name":"PHONE_CODE_EMPTY","comment":"phone_code is missing."}],"available":"user"},{"kind":"method","name":"account.getTmpPassword","type":"account.TmpPassword","typeModifiers":{"constructorId":3680828724},"id":1151208273,"comment":"Get temporary payment password","arguments":[{"name":"password","type":"InputCheckPasswordSRP","comment":"SRP password parameters"},{"name":"period","type":"int","comment":"Time during which the temporary password will be valid, in seconds; should be between 60 and 86400"}],"throws":[{"code":400,"name":"PASSWORD_HASH_INVALID","comment":"The provided password hash is invalid."},{"code":400,"name":"TMP_PASSWORD_DISABLED","comment":"The temporary password is disabled."}],"available":"user"},{"kind":"method","name":"account.getWebAuthorizations","type":"account.WebAuthorizations","typeModifiers":{"constructorId":3981887996},"id":405695855,"comment":"Get web login widget authorizations","arguments":[],"available":"user"},{"kind":"method","name":"account.resetWebAuthorization","type":"Bool","id":755087855,"comment":"Log out an active web telegram login session","arguments":[{"name":"hash","type":"long","comment":"{@link RawWebAuthorization} hash"}],"throws":[{"code":400,"name":"HASH_INVALID","comment":"The provided hash is invalid."}],"available":"user"},{"kind":"method","name":"account.resetWebAuthorizations","type":"Bool","id":1747789204,"comment":"Reset all active web telegram login sessions","arguments":[],"available":"user"},{"kind":"method","name":"account.getAllSecureValues","type":"SecureValue","typeModifiers":{"isVector":true,"constructorId":411017418},"id":2995305597,"comment":"Get all saved Telegram Passport documents, for more info see the passport docs »","arguments":[],"available":"user"},{"kind":"method","name":"account.getSecureValue","type":"SecureValue","typeModifiers":{"isVector":true,"constructorId":411017418},"id":1936088002,"comment":"Get saved Telegram Passport document, for more info see the passport docs »","arguments":[{"name":"types","type":"SecureValueType","typeModifiers":{"isVector":true},"comment":"Requested value types"}],"available":"user"},{"kind":"method","name":"account.saveSecureValue","type":"SecureValue","typeModifiers":{"constructorId":411017418},"id":2308956957,"comment":"Securely save Telegram Passport document, for more info see the passport docs »","arguments":[{"name":"value","type":"InputSecureValue","comment":"Secure value, for more info see the passport docs »"},{"name":"secure_secret_id","type":"long","comment":"Passport secret hash, for more info see the passport docs »"}],"throws":[{"code":400,"name":"PASSWORD_REQUIRED","comment":"A 2FA password must be configured to use Telegram Passport."},{"code":400,"name":"SECURE_SECRET_REQUIRED","comment":"A secure secret is required."}],"available":"user"},{"kind":"method","name":"account.deleteSecureValue","type":"Bool","id":3095444555,"comment":"Delete stored Telegram Passport documents, for more info see the passport docs »","arguments":[{"name":"types","type":"SecureValueType","typeModifiers":{"isVector":true},"comment":"Document types to delete"}],"available":"user"},{"kind":"method","name":"account.getAuthorizationForm","type":"account.AuthorizationForm","typeModifiers":{"constructorId":2905480408},"id":2838059386,"comment":"Returns a Telegram Passport authorization form for sharing data with a service","arguments":[{"name":"bot_id","type":"int53","comment":"User identifier of the service's bot"},{"name":"scope","type":"string","comment":"Telegram Passport element types requested by the service"},{"name":"public_key","type":"string","comment":"Service's public key"}],"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."},{"code":400,"name":"PUBLIC_KEY_REQUIRED","comment":"A public key is required."}],"available":"user"},{"kind":"method","name":"account.acceptAuthorization","type":"Bool","id":4092415091,"comment":"Sends a Telegram Passport authorization form, effectively sharing data with the service","arguments":[{"name":"bot_id","type":"int53","comment":"Bot ID"},{"name":"scope","type":"string","comment":"Telegram Passport element types requested by the service"},{"name":"public_key","type":"string","comment":"Service's public key"},{"name":"value_hashes","type":"SecureValueHash","typeModifiers":{"isVector":true},"comment":"Types of values sent and their hashes"},{"name":"credentials","type":"SecureCredentialsEncrypted","comment":"Encrypted values"}],"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."},{"code":400,"name":"PUBLIC_KEY_REQUIRED","comment":"A public key is required."}],"available":"user"},{"kind":"method","name":"account.sendVerifyPhoneCode","type":"auth.SentCode","id":2778945273,"comment":"Send the verification phone code for telegram passport.","arguments":[{"name":"phone_number","type":"string","comment":"The phone number to verify"},{"name":"settings","type":"CodeSettings","comment":"Phone code settings"}],"throws":[{"code":400,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."}],"available":"user"},{"kind":"method","name":"account.verifyPhone","type":"Bool","id":1305716726,"comment":"Verify a phone number for telegram passport.","arguments":[{"name":"phone_number","type":"string","comment":"Phone number"},{"name":"phone_code_hash","type":"string","comment":"Phone code hash received from the call to {@link account.RawSendVerifyPhoneCodeRequest}"},{"name":"phone_code","type":"string","comment":"Code received after the call to {@link account.RawSendVerifyPhoneCodeRequest}"}],"throws":[{"code":400,"name":"PHONE_CODE_EMPTY","comment":"phone_code is missing."},{"code":400,"name":"PHONE_CODE_EXPIRED","comment":"The phone code you provided has expired."},{"code":400,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."}],"available":"user"},{"kind":"method","name":"account.sendVerifyEmailCode","type":"account.SentEmailCode","typeModifiers":{"constructorId":2166326607},"id":2564831163,"comment":"Send an email verification code.","arguments":[{"name":"purpose","type":"EmailVerifyPurpose","comment":"Verification purpose."},{"name":"email","type":"string","comment":"The email where to send the code."}],"throws":[{"code":400,"name":"EMAIL_INVALID","comment":"The specified email is invalid."},{"code":400,"name":"EMAIL_NOT_ALLOWED","comment":"The specified email cannot be used to complete the operation."},{"code":400,"name":"EMAIL_NOT_SETUP","comment":"In order to change the login email with emailVerifyPurposeLoginChange, an existing login email must already be set using emailVerifyPurposeLoginSetup."},{"code":400,"name":"PHONE_HASH_EXPIRED","comment":"An invalid or expired phone_code_hash was provided."},{"code":400,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."}],"available":"user"},{"kind":"method","name":"account.verifyEmail","type":"account.EmailVerified","id":53322959,"comment":"Verify an email address.","arguments":[{"name":"purpose","type":"EmailVerifyPurpose","comment":"Verification purpose"},{"name":"verification","type":"EmailVerification","comment":"Email verification code or token"}],"throws":[{"code":400,"name":"EMAIL_INVALID","comment":"The specified email is invalid."},{"code":400,"name":"EMAIL_NOT_ALLOWED","comment":"The specified email cannot be used to complete the operation."},{"code":400,"name":"EMAIL_VERIFY_EXPIRED","comment":"The verification email has expired."},{"code":400,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."}],"available":"user"},{"kind":"method","name":"account.initTakeoutSession","type":"account.Takeout","typeModifiers":{"constructorId":1304052993},"id":2398350000,"comment":"Initialize a takeout session, see here » for more info.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"contacts","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to export contacts"},{"name":"message_users","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether to export messages in private chats"},{"name":"message_chats","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether to export messages in basic groups"},{"name":"message_megagroups","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether to export messages in supergroups"},{"name":"message_channels","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"Whether to export messages in channels"},{"name":"files","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Whether to export files"},{"name":"file_max_size","type":"int53","typeModifiers":{"predicate":"flags.5"},"comment":"Maximum size of files to export"}],"throws":[{"code":420,"name":"TAKEOUT_INIT_DELAY_%d","comment":"Sorry, for security reasons, you will be able to begin downloading your data in %d seconds. We have notified all your devices about the export request to make sure it's authorized and to give you time to react if it's not."}],"available":"user"},{"kind":"method","name":"account.finishTakeoutSession","type":"Bool","id":489050862,"comment":"Terminate a takeout session, see here » for more info.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"success","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Data exported successfully"}],"throws":[{"code":403,"name":"TAKEOUT_REQUIRED","comment":"A takeout session needs to be initialized first, see here » for more info."}],"available":"user"},{"kind":"method","name":"account.confirmPasswordEmail","type":"Bool","id":2413762848,"comment":"Verify an email to use as 2FA recovery method.","arguments":[{"name":"code","type":"string","comment":"The phone code that was received after setting a recovery email"}],"throws":[{"code":400,"name":"CODE_INVALID","comment":"Code invalid."},{"code":400,"name":"EMAIL_HASH_EXPIRED","comment":"Email hash expired."}],"available":"user"},{"kind":"method","name":"account.resendPasswordEmail","type":"Bool","id":2055154197,"comment":"Resend the code to verify an email to use as 2FA recovery method.","arguments":[],"throws":[{"code":400,"name":"EMAIL_HASH_EXPIRED","comment":"Email hash expired."}],"available":"user"},{"kind":"method","name":"account.cancelPasswordEmail","type":"Bool","id":3251361206,"comment":"Cancel the code that was sent to verify an email to use as 2FA recovery method.","arguments":[],"throws":[{"code":400,"name":"EMAIL_HASH_EXPIRED","comment":"Email hash expired."}],"available":"user"},{"kind":"method","name":"account.getContactSignUpNotification","type":"Bool","id":2668087080,"comment":"Whether the user will receive notifications when contacts sign up","arguments":[],"available":"user"},{"kind":"method","name":"account.setContactSignUpNotification","type":"Bool","id":3488890721,"comment":"Toggle contact sign up notifications","arguments":[{"name":"silent","type":"Bool","comment":"Whether to disable contact sign up notifications"}],"available":"user"},{"kind":"method","name":"account.getNotifyExceptions","type":"Updates","id":1398240377,"comment":"Returns list of chats with non-default notification settings","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"compare_sound","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"If set, chats with non-default sound will be returned"},{"name":"compare_stories","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"If set, chats with non-default notification settings for stories will be returned"},{"name":"peer","type":"InputNotifyPeer","typeModifiers":{"predicate":"flags.0"},"comment":"If specified, only chats of the specified category will be returned"}],"available":"user"},{"kind":"method","name":"account.getWallPaper","type":"WallPaper","id":4237155306,"comment":"Get info about a certain wallpaper","arguments":[{"name":"wallpaper","type":"InputWallPaper","comment":"The wallpaper to get info about"}],"throws":[{"code":400,"name":"WALLPAPER_INVALID","comment":"The specified wallpaper is invalid."}],"available":"user"},{"kind":"method","name":"account.uploadWallPaper","type":"WallPaper","id":3818557187,"comment":"Create and upload a new wallpaper","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"for_chat","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Set this flag when uploading wallpapers to be passed to {@link messages.RawSetChatWallPaperRequest}."},{"name":"file","type":"InputFile","comment":"The JPG/PNG wallpaper"},{"name":"mime_type","type":"string","comment":"MIME type of uploaded wallpaper"},{"name":"settings","type":"WallPaperSettings","comment":"Wallpaper settings"}],"throws":[{"code":400,"name":"WALLPAPER_FILE_INVALID","comment":"The specified wallpaper file is invalid."},{"code":400,"name":"WALLPAPER_MIME_INVALID","comment":"The specified wallpaper MIME type is invalid."}],"available":"user"},{"kind":"method","name":"account.saveWallPaper","type":"Bool","id":1817860919,"comment":"Install/uninstall wallpaper","arguments":[{"name":"wallpaper","type":"InputWallPaper","comment":"Wallpaper to install or uninstall"},{"name":"unsave","type":"Bool","comment":"Uninstall wallpaper?"},{"name":"settings","type":"WallPaperSettings","comment":"Wallpaper settings"}],"throws":[{"code":400,"name":"WALLPAPER_INVALID","comment":"The specified wallpaper is invalid."}],"available":"user"},{"kind":"method","name":"account.installWallPaper","type":"Bool","id":4276967273,"comment":"Install wallpaper","arguments":[{"name":"wallpaper","type":"InputWallPaper","comment":"Wallpaper to install"},{"name":"settings","type":"WallPaperSettings","comment":"Wallpaper settings"}],"throws":[{"code":400,"name":"WALLPAPER_INVALID","comment":"The specified wallpaper is invalid."}],"available":"user"},{"kind":"method","name":"account.resetWallPapers","type":"Bool","id":3141244932,"comment":"Delete all installed wallpapers, reverting to the default wallpaper set.","arguments":[],"available":"user"},{"kind":"method","name":"account.getAutoDownloadSettings","type":"account.AutoDownloadSettings","typeModifiers":{"constructorId":1674235686},"id":1457130303,"comment":"Get media autodownload settings","arguments":[],"available":"user"},{"kind":"method","name":"account.saveAutoDownloadSettings","type":"Bool","id":1995661875,"comment":"Change media autodownload settings","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"low","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to save media in the low data usage preset"},{"name":"high","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether to save media in the high data usage preset"},{"name":"settings","type":"AutoDownloadSettings","comment":"Media autodownload settings"}],"available":"user"},{"kind":"method","name":"account.uploadTheme","type":"Document","id":473805619,"comment":"Upload theme","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"file","type":"InputFile","comment":"Previously uploaded theme file with platform-specific colors for UI components, can be left unset when creating themes that only modify the wallpaper or accent colors."},{"name":"thumb","type":"InputFile","typeModifiers":{"predicate":"flags.0"},"comment":"Thumbnail"},{"name":"file_name","type":"string","comment":"File name"},{"name":"mime_type","type":"string","comment":"MIME type, must be application/x-tgtheme-{format}, where format depends on the client"}],"throws":[{"code":400,"name":"THEME_FILE_INVALID","comment":"Invalid theme file provided."},{"code":400,"name":"THEME_MIME_INVALID","comment":"The theme's MIME type is invalid."}],"available":"user"},{"kind":"method","name":"account.createTheme","type":"Theme","typeModifiers":{"constructorId":2685298646},"id":1697530880,"comment":"Create a theme","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"slug","type":"string","comment":"Unique theme ID used to generate theme deep links, can be empty to autogenerate a random ID."},{"name":"title","type":"string","comment":"Theme name"},{"name":"document","type":"InputDocument","typeModifiers":{"predicate":"flags.2"},"comment":"Theme file"},{"name":"settings","type":"InputThemeSettings","typeModifiers":{"predicate":"flags.3","isVector":true},"comment":"Theme settings, multiple values can be provided for the different base themes (day/night mode, etc)."}],"throws":[{"code":400,"name":"THEME_MIME_INVALID","comment":"The theme's MIME type is invalid."},{"code":400,"name":"THEME_TITLE_INVALID","comment":"The specified theme title is invalid."}],"available":"user"},{"kind":"method","name":"account.updateTheme","type":"Theme","typeModifiers":{"constructorId":2685298646},"id":737414348,"comment":"Update theme","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"format","type":"string","comment":"Theme format, a string that identifies the theming engines supported by the client"},{"name":"theme","type":"InputTheme","comment":"Theme to update"},{"name":"slug","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Unique theme ID"},{"name":"title","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Theme name"},{"name":"document","type":"InputDocument","typeModifiers":{"predicate":"flags.2"},"comment":"Theme file"},{"name":"settings","type":"InputThemeSettings","typeModifiers":{"predicate":"flags.3","isVector":true},"comment":"Theme settings"}],"throws":[{"code":400,"name":"THEME_INVALID","comment":"Invalid theme provided."}],"available":"user"},{"kind":"method","name":"account.saveTheme","type":"Bool","id":4065792108,"comment":"Save a theme","arguments":[{"name":"theme","type":"InputTheme","comment":"Theme to save"},{"name":"unsave","type":"Bool","comment":"Unsave"}],"throws":[{"code":400,"name":"THEME_INVALID","comment":"Invalid theme provided."}],"available":"user"},{"kind":"method","name":"account.installTheme","type":"Bool","id":3341269819,"comment":"Install a theme","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"dark","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to install the dark version"},{"name":"theme","type":"InputTheme","typeModifiers":{"predicate":"flags.1"},"comment":"Theme to install"},{"name":"format","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"Theme format, a string that identifies the theming engines supported by the client"},{"name":"base_theme","type":"BaseTheme","typeModifiers":{"predicate":"flags.3"},"comment":"Indicates a basic theme provided by all clients"}],"available":"user"},{"kind":"method","name":"account.getTheme","type":"Theme","typeModifiers":{"constructorId":2685298646},"id":978872812,"comment":"Get theme information","arguments":[{"name":"format","type":"string","comment":"Theme format, a string that identifies the theming engines supported by the client"},{"name":"theme","type":"InputTheme","comment":"Theme"}],"throws":[{"code":400,"name":"THEME_FORMAT_INVALID","comment":"Invalid theme format provided."},{"code":400,"name":"THEME_INVALID","comment":"Invalid theme provided."}],"available":"user"},{"kind":"method","name":"account.getThemes","type":"account.Themes","id":1913054296,"comment":"Get installed themes","arguments":[{"name":"format","type":"string","comment":"Theme format, a string that identifies the theming engines supported by the client"},{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"account.setContentSettings","type":"Bool","id":3044323691,"comment":"Set sensitive content settings (for viewing or hiding NSFW content)","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"sensitive_enabled","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Enable NSFW content"}],"throws":[{"code":403,"name":"SENSITIVE_CHANGE_FORBIDDEN","comment":"You can't change your sensitive content settings."}],"available":"user"},{"kind":"method","name":"account.getContentSettings","type":"account.ContentSettings","typeModifiers":{"constructorId":1474462241},"id":2342210990,"comment":"Get sensitive content settings","arguments":[],"available":"user"},{"kind":"method","name":"account.getMultiWallPapers","type":"WallPaper","typeModifiers":{"isVector":true},"id":1705865692,"comment":"Get info about multiple wallpapers","arguments":[{"name":"wallpapers","type":"InputWallPaper","typeModifiers":{"isVector":true},"comment":"Wallpapers to fetch info about"}],"throws":[{"code":400,"name":"WALLPAPER_INVALID","comment":"The specified wallpaper is invalid."}],"available":"user"},{"kind":"method","name":"account.getGlobalPrivacySettings","type":"GlobalPrivacySettings","typeModifiers":{"constructorId":1934380235},"id":3945483510,"comment":"Get global privacy settings","arguments":[],"available":"user"},{"kind":"method","name":"account.setGlobalPrivacySettings","type":"GlobalPrivacySettings","typeModifiers":{"constructorId":1934380235},"id":517647042,"comment":"Set global privacy settings","arguments":[{"name":"settings","type":"GlobalPrivacySettings","comment":"Global privacy settings"}],"throws":[{"code":400,"name":"AUTOARCHIVE_NOT_AVAILABLE","comment":"The autoarchive setting is not available at this time: please check the value of the autoarchive_setting_available field in client config » before calling this method."},{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."}],"available":"user"},{"kind":"method","name":"account.reportProfilePhoto","type":"Bool","id":4203529973,"comment":"Report a profile photo of a dialog","arguments":[{"name":"peer","type":"InputPeer","comment":"The dialog"},{"name":"photo_id","type":"InputPhoto","comment":"Dialog photo ID"},{"name":"reason","type":"ReportReason","comment":"Report reason"},{"name":"message","type":"string","comment":"Comment for report moderation"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"account.resetPassword","type":"account.ResetPasswordResult","id":2466827803,"comment":"Initiate a 2FA password reset: can only be used if the user is already logged-in, see here for more info »","arguments":[],"throws":[{"code":400,"name":"PASSWORD_EMPTY","comment":"The provided password is empty."}],"available":"user"},{"kind":"method","name":"account.declinePasswordReset","type":"Bool","id":1284770294,"comment":"Abort a pending 2FA password reset, see here for more info »","arguments":[],"throws":[{"code":400,"name":"RESET_REQUEST_MISSING","comment":"No password reset is in progress."}],"available":"user"},{"kind":"method","name":"account.getChatThemes","type":"account.Themes","id":3594051209,"comment":"Get all available chat themes ».","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"account.setAuthorizationTTL","type":"Bool","id":3213466272,"comment":"Set time-to-live of current session","arguments":[{"name":"authorization_ttl_days","type":"int","comment":"Time-to-live of current session in days"}],"throws":[{"code":406,"name":"FRESH_RESET_AUTHORISATION_FORBIDDEN","comment":"You can't logout other sessions if less than 24 hours have passed since you logged on the current session."},{"code":400,"name":"TTL_DAYS_INVALID","comment":"The provided TTL is invalid."}],"available":"user"},{"kind":"method","name":"account.changeAuthorizationSettings","type":"Bool","id":1089766498,"comment":"Change settings related to a session.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"confirmed","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"If set, confirms a newly logged in session »."},{"name":"hash","type":"long","comment":"Session ID from the {@link RawAuthorization} constructor, fetchable using {@link account.RawGetAuthorizationsRequest}"},{"name":"encrypted_requests_disabled","type":"Bool","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to enable or disable receiving encrypted chats: if the flag is not set, the previous setting is not changed"},{"name":"call_requests_disabled","type":"Bool","typeModifiers":{"predicate":"flags.1"},"comment":"Whether to enable or disable receiving calls: if the flag is not set, the previous setting is not changed"}],"throws":[{"code":400,"name":"HASH_INVALID","comment":"The provided hash is invalid."}],"available":"user"},{"kind":"method","name":"account.getSavedRingtones","type":"account.SavedRingtones","id":3784319624,"comment":"Fetch saved notification sounds","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"account.saveRingtone","type":"account.SavedRingtone","id":1038768899,"comment":"Save or remove saved notification sound.\n\nIf the notification sound is already in MP3 format, {@link account.RawSavedRingtone} will be returned.
\nOtherwise, it will be automatically converted and a {@link account.RawSavedRingtoneConverted} will be returned, containing a new {@link RawDocument} object that should be used to refer to the ringtone from now on (ie when deleting it using the unsave parameter, or when downloading it).","arguments":[{"name":"id","type":"InputDocument","comment":"Notification sound uploaded using {@link account.RawUploadRingtoneRequest}"},{"name":"unsave","type":"Bool","comment":"Whether to add or delete the notification sound"}],"throws":[{"code":400,"name":"RINGTONE_INVALID","comment":"The specified ringtone is invalid."}],"available":"user"},{"kind":"method","name":"account.uploadRingtone","type":"Document","id":2199552930,"comment":"Upload notification sound, use {@link account.RawSaveRingtoneRequest} to convert it and add it to the list of saved notification sounds.","arguments":[{"name":"file","type":"InputFile","comment":"Notification sound"},{"name":"file_name","type":"string","comment":"File name"},{"name":"mime_type","type":"string","comment":"MIME type of file"}],"throws":[{"code":400,"name":"RINGTONE_MIME_INVALID","comment":"The MIME type for the ringtone is invalid."}],"available":"user"},{"kind":"method","name":"account.updateEmojiStatus","type":"Bool","id":4224966251,"comment":"Set an emoji status","arguments":[{"name":"emoji_status","type":"EmojiStatus","comment":"Emoji status to set"}],"throws":[{"code":400,"name":"DOCUMENT_INVALID","comment":"The specified document is invalid."}],"available":"user"},{"kind":"method","name":"account.getDefaultEmojiStatuses","type":"account.EmojiStatuses","id":3598005126,"comment":"Get a list of default suggested emoji statuses","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"account.getRecentEmojiStatuses","type":"account.EmojiStatuses","id":257392901,"comment":"Get recently used emoji statuses","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"account.clearRecentEmojiStatuses","type":"Bool","id":404757166,"comment":"Clears list of recently used emoji statuses","arguments":[],"available":"user"},{"kind":"method","name":"account.reorderUsernames","type":"Bool","id":4015001259,"comment":"Reorder usernames associated with the currently logged-in user.","arguments":[{"name":"order","type":"string","typeModifiers":{"isVector":true},"comment":"The new order for active usernames. All active usernames must be specified."}],"throws":[{"code":400,"name":"ORDER_INVALID","comment":"The specified username order is invalid."},{"code":400,"name":"USERNAME_NOT_MODIFIED","comment":"The username was not modified."}],"available":"user"},{"kind":"method","name":"account.toggleUsername","type":"Bool","id":1490465654,"comment":"Activate or deactivate a purchased fragment.com username associated to the currently logged-in user.","arguments":[{"name":"username","type":"string","comment":"Username"},{"name":"active","type":"Bool","comment":"Whether to activate or deactivate it"}],"throws":[{"code":400,"name":"USERNAMES_ACTIVE_TOO_MUCH","comment":"The maximum number of active usernames was reached."},{"code":400,"name":"USERNAME_INVALID","comment":"The provided username is not valid."},{"code":400,"name":"USERNAME_NOT_MODIFIED","comment":"The username was not modified."}],"available":"user"},{"kind":"method","name":"account.getDefaultProfilePhotoEmojis","type":"EmojiList","id":3799319336,"comment":"Get a set of suggested custom emoji stickers that can be used as profile picture","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"account.getDefaultGroupPhotoEmojis","type":"EmojiList","id":2438488238,"comment":"Get a set of suggested custom emoji stickers that can be used as group picture","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"account.getAutoSaveSettings","type":"account.AutoSaveSettings","typeModifiers":{"constructorId":1279133341},"id":2915810522,"comment":"Get autosave settings","arguments":[],"available":"user"},{"kind":"method","name":"account.saveAutoSaveSettings","type":"Bool","id":3600515937,"comment":"Modify autosave settings","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"users","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the new settings should affect all private chats"},{"name":"chats","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the new settings should affect all groups"},{"name":"broadcasts","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether the new settings should affect all channels"},{"name":"peer","type":"InputPeer","typeModifiers":{"predicate":"flags.3"},"comment":"Whether the new settings should affect a specific peer"},{"name":"settings","type":"AutoSaveSettings","comment":"The new autosave settings"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"account.deleteAutoSaveExceptions","type":"Bool","id":1404829728,"comment":"Clear all peer-specific autosave settings.","arguments":[],"available":"user"},{"kind":"method","name":"account.invalidateSignInCodes","type":"Bool","id":3398101178,"comment":"Invalidate the specified login codes, see here » for more info.","arguments":[{"name":"codes","type":"string","typeModifiers":{"isVector":true},"comment":"The login codes to invalidate."}],"available":"user"},{"kind":"method","name":"account.updateColor","type":"Bool","id":2096079197,"comment":"Update the accent color and background custom emoji » of the current account.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"for_profile","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether to change the accent color emoji pattern of the profile page; otherwise, the accent color and emoji pattern of messages will be changed."},{"name":"color","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"ID of the accent color palette » to use (not RGB24, see here » for more info)."},{"name":"background_emoji_id","type":"long","typeModifiers":{"predicate":"flags.0"},"comment":"Custom emoji ID used in the accent color pattern."}],"throws":[{"code":400,"name":"COLOR_INVALID","comment":"The specified color palette ID was invalid."},{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."}],"available":"user"},{"kind":"method","name":"account.getDefaultBackgroundEmojis","type":"EmojiList","id":2785720782,"comment":"Get a set of suggested custom emoji stickers that can be used in an accent color pattern.","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"account.getChannelDefaultEmojiStatuses","type":"account.EmojiStatuses","id":1999087573,"comment":"Get a list of default suggested channel emoji statuses.","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"account.getChannelRestrictedStatusEmojis","type":"EmojiList","id":900325589,"comment":"Returns fetch the full list of custom emoji IDs » that cannot be used in channel emoji statuses ».","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"account.updateBusinessWorkHours","type":"Bool","id":1258348646,"comment":"Specify a set of Telegram Business opening hours.
\nThis info will be contained in {@link RawUserFull}.business_work_hours.\n\nTo remove all opening hours, invoke the method without setting the business_work_hours field.\n\nNote that the opening hours specified by the user must be appropriately validated and transformed before invoking the method, as specified here ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"business_work_hours","type":"BusinessWorkHours","typeModifiers":{"predicate":"flags.0"},"comment":"Opening hours (optional, if not set removes all opening hours)."}],"throws":[{"code":400,"name":"BUSINESS_WORK_HOURS_EMPTY","comment":"No work hours were specified."},{"code":400,"name":"BUSINESS_WORK_HOURS_PERIOD_INVALID","comment":"The specified work hours are invalid, see here » for the exact requirements."},{"code":400,"name":"TIMEZONE_INVALID","comment":"The specified timezone does not exist."}],"available":"user"},{"kind":"method","name":"account.updateBusinessLocation","type":"Bool","id":2657817370,"comment":"Businesses » may advertise their location using this method, see here » for more info.\n\nTo remove business location information invoke the method without setting any of the parameters.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"geo_point","type":"InputGeoPoint","typeModifiers":{"predicate":"flags.1"},"comment":"Optional, contains a set of geographical coordinates."},{"name":"address","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Mandatory when setting/updating the location, contains a textual description of the address (max 96 UTF-8 chars)."}],"available":"user"},{"kind":"method","name":"account.updateBusinessGreetingMessage","type":"Bool","id":1724755908,"comment":"Set a list of Telegram Business greeting messages.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"message","type":"InputBusinessGreetingMessage","typeModifiers":{"predicate":"flags.0"},"comment":"Greeting message configuration and contents."}],"available":"user"},{"kind":"method","name":"account.updateBusinessAwayMessage","type":"Bool","id":2724888485,"comment":"Set a list of Telegram Business away messages.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"message","type":"InputBusinessAwayMessage","typeModifiers":{"predicate":"flags.0"},"comment":"Away message configuration and contents."}],"available":"user"},{"kind":"method","name":"account.updateConnectedBot","type":"Updates","id":1138250269,"comment":"Connect a business bot » to the current account, or to change the current connection settings.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"can_reply","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the bot can reply to messages it receives from us, on behalf of us using the business connection."},{"name":"deleted","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether to fully disconnect the bot from the current account."},{"name":"bot","type":"InputUser","comment":"The bot to connect or disconnect"},{"name":"recipients","type":"InputBusinessBotRecipients","comment":"Configuration for the business connection"}],"throws":[{"code":400,"name":"BOT_BUSINESS_MISSING","comment":"The specified bot is not a business bot (the {@link RawUser}.bot_business flag is not set)."},{"code":400,"name":"BUSINESS_RECIPIENTS_EMPTY","comment":"You didn't set any flag in inputBusinessBotRecipients, thus the bot cannot work with any peer."},{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."}],"available":"user"},{"kind":"method","name":"account.getConnectedBots","type":"account.ConnectedBots","typeModifiers":{"constructorId":400029819},"id":1319421967,"comment":"List all currently connected business bots »","arguments":[],"available":"user"},{"kind":"method","name":"account.getBotBusinessConnection","type":"Updates","id":1990746736,"comment":"Bots may invoke this method to re-fetch the {@link RawUpdateBotBusinessConnect} constructor associated with a specific business connection_id, see here » for more info on connected business bots.
\nThis is needed for example for freshly logged in bots that are receiving some {@link RawUpdateBotNewBusinessMessage}, etc. updates because some users have already connected to the bot before it could login.
\nIn this case, the bot is receiving messages from the business connection, but it hasn't cached the associated {@link RawUpdateBotBusinessConnect} with info about the connection (can it reply to messages? etc.) yet, and cannot receive the old ones because they were sent when the bot wasn't logged into the session yet.
\nThis method can be used to fetch info about a not-yet-cached business connection, and should not be invoked if the info is already cached or to fetch changes, as eventual changes will automatically be sent as new {@link RawUpdateBotBusinessConnect} updates to the bot using the usual update delivery methods ».","arguments":[{"name":"connection_id","type":"string","comment":"Business connection ID »."}],"throws":[{"code":400,"name":"CONNECTION_ID_INVALID","comment":"The specified connection ID is invalid."}],"available":"both"},{"kind":"method","name":"account.updateBusinessIntro","type":"Bool","id":2786381876,"comment":"Set or remove the Telegram Business introduction ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"intro","type":"InputBusinessIntro","typeModifiers":{"predicate":"flags.0"},"comment":"Telegram Business introduction, to remove it call the method without setting this flag."}],"available":"user"},{"kind":"method","name":"account.toggleConnectedBotPaused","type":"Bool","id":1684934807,"comment":"Pause or unpause a specific chat, temporarily disconnecting it from all business bots ».","arguments":[{"name":"peer","type":"InputPeer","comment":"The chat to pause"},{"name":"paused","type":"Bool","comment":"Whether to pause or unpause the chat"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"account.disablePeerConnectedBot","type":"Bool","id":1581481689,"comment":"Permanently disconnect a specific chat from all business bots » (equivalent to specifying it in recipients.exclude_users during initial configuration with {@link account.RawUpdateConnectedBotRequest}); to reconnect of a chat disconnected using this method the user must reconnect the entire bot by invoking {@link account.RawUpdateConnectedBotRequest}.","arguments":[{"name":"peer","type":"InputPeer","comment":"The chat to disconnect"}],"throws":[{"code":400,"name":"BOT_ALREADY_DISABLED","comment":"The connected business bot was already disabled for the specified peer."},{"code":400,"name":"BOT_NOT_CONNECTED_YET","comment":"No business bot is connected to the currently logged in user."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"account.updateBirthday","type":"Bool","id":3429764113,"comment":"Update our birthday, see here » for more info.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"birthday","type":"Birthday","typeModifiers":{"predicate":"flags.0"},"comment":"Birthday."}],"throws":[{"code":400,"name":"BIRTHDAY_INVALID","comment":"An invalid age was specified, must be between 0 and 150 years."}],"available":"user"},{"kind":"method","name":"account.createBusinessChatLink","type":"BusinessChatLink","typeModifiers":{"constructorId":3031328367},"id":2287068814,"comment":"Create a business chat deep link ».","arguments":[{"name":"link","type":"InputBusinessChatLink","comment":"Info about the link to create."}],"throws":[{"code":400,"name":"CHATLINKS_TOO_MUCH","comment":"Too many business chat links were created, please delete some older links."},{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."}],"available":"user"},{"kind":"method","name":"account.editBusinessChatLink","type":"BusinessChatLink","typeModifiers":{"constructorId":3031328367},"id":2352222383,"comment":"Edit a created business chat deep link ».","arguments":[{"name":"slug","type":"string","comment":"Slug of the link, obtained as specified here »."},{"name":"link","type":"InputBusinessChatLink","comment":"New link information."}],"throws":[{"code":400,"name":"CHATLINK_SLUG_EMPTY","comment":"The specified slug is empty."},{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."}],"available":"user"},{"kind":"method","name":"account.deleteBusinessChatLink","type":"Bool","id":1611085428,"comment":"Delete a business chat deep link ».","arguments":[{"name":"slug","type":"string","comment":"Slug of the link, obtained as specified here »."}],"throws":[{"code":400,"name":"CHATLINK_SLUG_EMPTY","comment":"The specified slug is empty."},{"code":400,"name":"CHATLINK_SLUG_EXPIRED","comment":"The specified business chat link has expired."}],"available":"user"},{"kind":"method","name":"account.getBusinessChatLinks","type":"account.BusinessChatLinks","typeModifiers":{"constructorId":3963855569},"id":1869667809,"comment":"List all created business chat deep links ».","arguments":[],"available":"user"},{"kind":"method","name":"account.resolveBusinessChatLink","type":"account.ResolvedBusinessChatLinks","typeModifiers":{"constructorId":2586029857},"id":1418913262,"comment":"Resolve a business chat deep link ».","arguments":[{"name":"slug","type":"string","comment":"Slug of the link, obtained as specified here »."}],"throws":[{"code":400,"name":"CHATLINK_SLUG_EMPTY","comment":"The specified slug is empty."},{"code":400,"name":"CHATLINK_SLUG_EXPIRED","comment":"The specified business chat link has expired."}],"available":"user"},{"kind":"method","name":"account.updatePersonalChannel","type":"Bool","id":3645048288,"comment":"Associate (or remove) a personal channel », that will be listed on our personal profile page ».\n\nChanging it will emit an {@link RawUpdateUser} update.","arguments":[{"name":"channel","type":"InputChannel","comment":"The channel, pass {@link RawInputChannelEmpty} to remove it."}],"available":"user"},{"kind":"method","name":"account.toggleSponsoredMessages","type":"Bool","id":3118048141,"comment":"Disable or re-enable Telegram ads for the current Premium account.\n\nUseful for business owners that may want to launch and view their own Telegram ads via the Telegram ad platform ».","arguments":[{"name":"enabled","type":"Bool","comment":"Enable or disable ads."}],"available":"user"},{"kind":"method","name":"account.getReactionsNotifySettings","type":"ReactionsNotifySettings","typeModifiers":{"constructorId":1457736048},"id":115172684,"comment":"Get the current reaction notification settings ».","arguments":[],"available":"user"},{"kind":"method","name":"account.setReactionsNotifySettings","type":"ReactionsNotifySettings","typeModifiers":{"constructorId":1457736048},"id":829220168,"comment":"Change the reaction notification settings ».","arguments":[{"name":"settings","type":"ReactionsNotifySettings","comment":"New reaction notification settings."}],"available":"user"},{"kind":"method","name":"users.getUsers","type":"User","typeModifiers":{"isVector":true},"id":227648840,"comment":"Returns basic user info according to their identifiers.","arguments":[{"name":"id","type":"InputUser","typeModifiers":{"isVector":true},"comment":"List of user identifiers"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"FROM_MESSAGE_BOT_DISABLED","comment":"Bots can't use fromMessage min constructors."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."}],"available":"both"},{"kind":"method","name":"users.getFullUser","type":"users.UserFull","typeModifiers":{"constructorId":997004590},"id":3054459160,"comment":"Returns extended user info by ID.","arguments":[{"name":"id","type":"InputUser","comment":"User ID"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"USERNAME_OCCUPIED","comment":"The provided username is already occupied."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"both"},{"kind":"method","name":"users.setSecureValueErrors","type":"Bool","id":2429064373,"comment":"Notify the user that the sent passport data contains some errors The user will not be able to re-submit their Passport data to you until the errors are fixed (the contents of the field for which you returned the error must change).\n\nUse this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.","arguments":[{"name":"id","type":"InputUser","comment":"The user"},{"name":"errors","type":"SecureValueError","typeModifiers":{"isVector":true},"comment":"Errors"}],"throws":[{"code":403,"name":"USER_BOT_INVALID","comment":"User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"bot"},{"kind":"method","name":"users.getIsPremiumRequiredToContact","type":"Bool","typeModifiers":{"isVector":true},"id":2787289616,"comment":"Check whether we can write to the specified user (this method can only be called by non-Premium users), see here » for more info on the full flow.","arguments":[{"name":"id","type":"InputUser","typeModifiers":{"isVector":true},"comment":"Users to fetch info about."}],"available":"user"},{"kind":"method","name":"contacts.getContactIDs","type":"int","typeModifiers":{"isVector":true},"id":2061264541,"comment":"Get the telegram IDs of all contacts.
\nReturns an array of Telegram user IDs for all contacts (0 if a contact does not have an associated Telegram account or have hidden their account using privacy settings).","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here"}],"available":"user"},{"kind":"method","name":"contacts.getStatuses","type":"ContactStatus","typeModifiers":{"isVector":true,"constructorId":383348795},"id":3299038190,"comment":"Use this method to obtain the online statuses of all contacts with an accessible Telegram account.","arguments":[],"available":"user"},{"kind":"method","name":"contacts.getContacts","type":"contacts.Contacts","id":1574346258,"comment":"Returns the current user's contact list.","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here.
Note that the hash is computed using the usual algorithm, passing to the algorithm first the previously returned {@link contacts.RawContacts}.saved_count field, then max 100000 sorted user IDs from the contact list, including the ID of the currently logged in user if it is saved as a contact.
Example: tdlib implementation."}],"available":"user"},{"kind":"method","name":"contacts.importContacts","type":"contacts.ImportedContacts","typeModifiers":{"constructorId":2010127419},"id":746589157,"comment":"Imports contacts: saves a full list on the server, adds already registered contacts to the contact list, returns added contacts and their info.\n\nUse {@link contacts.RawAddContactRequest} to add Telegram contacts without actually using their phone number.","arguments":[{"name":"contacts","type":"InputContact","typeModifiers":{"isVector":true},"comment":"List of contacts to import"}],"available":"user"},{"kind":"method","name":"contacts.deleteContacts","type":"Updates","id":157945344,"comment":"Deletes several contacts from the list.","arguments":[{"name":"id","type":"InputUser","typeModifiers":{"isVector":true},"comment":"User ID list"}],"available":"user"},{"kind":"method","name":"contacts.deleteByPhones","type":"Bool","id":269745566,"comment":"Delete contacts by phone number","arguments":[{"name":"phones","type":"string","typeModifiers":{"isVector":true},"comment":"Phone numbers"}],"available":"user"},{"kind":"method","name":"contacts.block","type":"Bool","id":774801204,"comment":"Adds a peer to a blocklist, see here » for more info.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"my_stories_from","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the peer should be added to the story blocklist; if not set, the peer will be added to the main blocklist, see here » for more info."},{"name":"id","type":"InputPeer","comment":"Peer"}],"throws":[{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CONTACT_ID_INVALID","comment":"The provided contact ID is invalid."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"contacts.unblock","type":"Bool","id":3041973032,"comment":"Deletes a peer from a blocklist, see here » for more info.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"my_stories_from","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the peer should be removed from the story blocklist; if not set, the peer will be removed from the main blocklist, see here » for more info."},{"name":"id","type":"InputPeer","comment":"Peer"}],"throws":[{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CONTACT_ID_INVALID","comment":"The provided contact ID is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"contacts.getBlocked","type":"contacts.Blocked","id":2592509824,"comment":"Returns the list of blocked users.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"my_stories_from","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to fetch the story blocklist; if not set, will fetch the main blocklist. See here » for differences between the two."},{"name":"offset","type":"int","comment":"The number of list elements to be skipped"},{"name":"limit","type":"int","comment":"The number of list elements to be returned"}],"available":"user"},{"kind":"method","name":"contacts.search","type":"contacts.Found","typeModifiers":{"constructorId":3004386717},"id":301470424,"comment":"Returns users found by username substring.","arguments":[{"name":"q","type":"string","comment":"Target substring"},{"name":"limit","type":"int","comment":"Maximum number of users to be returned"}],"throws":[{"code":400,"name":"QUERY_TOO_SHORT","comment":"The query string is too short."},{"code":400,"name":"SEARCH_QUERY_EMPTY","comment":"The search query is empty."}],"available":"user"},{"kind":"method","name":"contacts.resolveUsername","type":"contacts.ResolvedPeer","typeModifiers":{"constructorId":2131196633},"id":4181511075,"comment":"Resolve a @username to get peer info","arguments":[{"name":"username","type":"string","comment":"@username to resolve"}],"throws":[{"code":400,"name":"CONNECTION_LAYER_INVALID","comment":"Layer invalid."},{"code":400,"name":"USERNAME_INVALID","comment":"The provided username is not valid."},{"code":400,"name":"USERNAME_NOT_OCCUPIED","comment":"The provided username is not occupied."}],"available":"both"},{"kind":"method","name":"contacts.getTopPeers","type":"contacts.TopPeers","id":2536798390,"comment":"Get most used peers","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"correspondents","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Users we've chatted most frequently with"},{"name":"bots_pm","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Most used bots"},{"name":"bots_inline","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Most used inline bots"},{"name":"phone_calls","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Most frequently called users"},{"name":"forward_users","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"Users to which the users often forwards messages to"},{"name":"forward_chats","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Chats to which the users often forwards messages to"},{"name":"groups","type":"true","typeModifiers":{"predicate":"flags.10"},"comment":"Often-opened groups and supergroups"},{"name":"channels","type":"true","typeModifiers":{"predicate":"flags.15"},"comment":"Most frequently visited channels"},{"name":"bots_app","type":"true","typeModifiers":{"predicate":"flags.16"},"comment":"Most frequently used Main Mini Bot Apps."},{"name":"offset","type":"int","comment":"Offset for pagination"},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"},{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here"}],"throws":[{"code":400,"name":"TYPES_EMPTY","comment":"No top peer type was provided."}],"available":"user"},{"kind":"method","name":"contacts.resetTopPeerRating","type":"Bool","id":451113900,"comment":"Reset rating of top peer","arguments":[{"name":"category","type":"TopPeerCategory","comment":"Top peer category"},{"name":"peer","type":"InputPeer","comment":"Peer whose rating should be reset"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"contacts.resetSaved","type":"Bool","id":2274703345,"comment":"Removes all contacts without an associated Telegram account.","arguments":[],"available":"user"},{"kind":"method","name":"contacts.getSaved","type":"SavedContact","typeModifiers":{"isVector":true,"constructorId":289586518},"id":2196890527,"comment":"Get all contacts, requires a takeout session, see here » for more info.","arguments":[],"throws":[{"code":400,"name":"TAKEOUT_INVALID","comment":"The specified takeout ID is invalid."},{"code":403,"name":"TAKEOUT_REQUIRED","comment":"A takeout session needs to be initialized first, see here » for more info."}],"available":"user"},{"kind":"method","name":"contacts.toggleTopPeers","type":"Bool","id":2232729050,"comment":"Enable/disable top peers","arguments":[{"name":"enabled","type":"Bool","comment":"Enable/disable"}],"available":"user"},{"kind":"method","name":"contacts.addContact","type":"Updates","id":3908330448,"comment":"Add an existing telegram user as contact.\n\nUse {@link contacts.RawImportContactsRequest} to add contacts by phone number, without knowing their Telegram ID.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"add_phone_privacy_exception","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Allow the other user to see our phone number?"},{"name":"id","type":"InputUser","comment":"Telegram ID of the other user"},{"name":"first_name","type":"string","comment":"First name"},{"name":"last_name","type":"string","comment":"Last name"},{"name":"phone","type":"string","comment":"User's phone number, may be omitted to simply add the user to the contact list, without a phone number."}],"throws":[{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CONTACT_ID_INVALID","comment":"The provided contact ID is invalid."},{"code":400,"name":"CONTACT_NAME_EMPTY","comment":"Contact name empty."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."}],"available":"user"},{"kind":"method","name":"contacts.acceptContact","type":"Updates","id":4164002319,"comment":"If the add contact action bar is active, add that user as contact","arguments":[{"name":"id","type":"InputUser","comment":"The user to add as contact"}],"throws":[{"code":400,"name":"CONTACT_ADD_MISSING","comment":"Contact to add is missing."},{"code":400,"name":"CONTACT_ID_INVALID","comment":"The provided contact ID is invalid."},{"code":400,"name":"CONTACT_REQ_MISSING","comment":"Missing contact request."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."}],"available":"user"},{"kind":"method","name":"contacts.getLocated","type":"Updates","id":3544759364,"comment":"Get users and geochats near you, see here » for more info.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"background","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"While the geolocation of the current user is public, clients should update it in the background every half-an-hour or so, while setting this flag.
Do this only if the new location is more than 1 KM away from the previous one, or if the previous location is unknown."},{"name":"geo_point","type":"InputGeoPoint","comment":"Geolocation"},{"name":"self_expires","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"If set, the geolocation of the current user will be public for the specified number of seconds; pass 0x7fffffff to disable expiry, 0 to make the current geolocation private; if the flag isn't set, no changes will be applied."}],"throws":[{"code":406,"name":"BUSINESS_ADDRESS_ACTIVE","comment":"The user is currently advertising a Business Location, the location may only be changed (or removed) using {@link account.RawUpdateBusinessLocationRequest}. ."},{"code":400,"name":"GEO_POINT_INVALID","comment":"Invalid geoposition provided."},{"code":406,"name":"USERPIC_PRIVACY_REQUIRED","comment":"You need to disable privacy settings for your profile picture in order to make your geolocation public."},{"code":406,"name":"USERPIC_UPLOAD_REQUIRED","comment":"You must have a profile picture to publish your geolocation."}],"available":"user"},{"kind":"method","name":"contacts.blockFromReplies","type":"Updates","id":698914348,"comment":"Stop getting notifications about discussion replies of a certain user in @replies","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"delete_message","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to delete the specified message as well"},{"name":"delete_history","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether to delete all @replies messages from this user as well"},{"name":"report_spam","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether to also report this user for spam"},{"name":"msg_id","type":"int","comment":"ID of the message in the @replies chat"}],"throws":[{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."}],"available":"user"},{"kind":"method","name":"contacts.resolvePhone","type":"contacts.ResolvedPeer","typeModifiers":{"constructorId":2131196633},"id":2331591492,"comment":"Resolve a phone number to get user info, if their privacy settings allow it.","arguments":[{"name":"phone","type":"string","comment":"Phone number in international format, possibly obtained from a phone number deep link."}],"throws":[{"code":400,"name":"PHONE_NOT_OCCUPIED","comment":"No user is associated to the specified phone number."}],"available":"user"},{"kind":"method","name":"contacts.exportContactToken","type":"ExportedContactToken","typeModifiers":{"constructorId":1103040667},"id":4167385127,"comment":"Generates a temporary profile link for the currently logged-in user.","arguments":[],"available":"user"},{"kind":"method","name":"contacts.importContactToken","type":"User","id":318789512,"comment":"Obtain user info from a temporary profile link.","arguments":[{"name":"token","type":"string","comment":"The token extracted from the temporary profile link."}],"throws":[{"code":400,"name":"IMPORT_TOKEN_INVALID","comment":"The specified token is invalid."}],"available":"user"},{"kind":"method","name":"contacts.editCloseFriends","type":"Bool","id":3127313904,"comment":"Edit the close friends list, see here » for more info.","arguments":[{"name":"id","type":"int53","typeModifiers":{"isVector":true},"comment":"Full list of user IDs of close friends, see here for more info."}],"available":"user"},{"kind":"method","name":"contacts.setBlocked","type":"Bool","id":2496027766,"comment":"Replace the contents of an entire blocklist, see here for more info ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"my_stories_from","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to edit the story blocklist; if not set, will edit the main blocklist. See here » for differences between the two."},{"name":"id","type":"InputPeer","typeModifiers":{"isVector":true},"comment":"Full content of the blocklist."},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"}],"available":"user"},{"kind":"method","name":"contacts.getBirthdays","type":"contacts.ContactBirthdays","typeModifiers":{"constructorId":290452237},"id":3673008228,"comment":"Fetch all users with birthdays that fall within +1/-1 days, relative to the current day: this method should be invoked by clients every 6-8 hours, and if the result is non-empty, it should be used to appropriately update locally cached birthday information in {@link RawUser}.birthday.\n\nSee here » for more info.","arguments":[],"available":"user"},{"kind":"method","name":"messages.getMessages","type":"messages.Messages","id":1673946374,"comment":"Returns the list of messages by their IDs.","arguments":[{"name":"id","type":"InputMessage","typeModifiers":{"isVector":true},"comment":"Message ID list"}],"available":"both"},{"kind":"method","name":"messages.getDialogs","type":"messages.Dialogs","id":2700397391,"comment":"Returns the current user dialog list.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"exclude_pinned","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Exclude pinned dialogs"},{"name":"folder_id","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Peer folder ID, for more info click here"},{"name":"offset_date","type":"int","comment":"Offsets for pagination, for more info click here"},{"name":"offset_id","type":"int","comment":"Offsets for pagination, for more info click here (top_message ID used for pagination)"},{"name":"offset_peer","type":"InputPeer","comment":"Offset peer for pagination"},{"name":"limit","type":"int","comment":"Number of list elements to be returned"},{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here"}],"throws":[{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"FOLDER_ID_INVALID","comment":"Invalid folder ID."},{"code":400,"name":"OFFSET_PEER_ID_INVALID","comment":"The provided offset peer is invalid."}],"available":"user"},{"kind":"method","name":"messages.getHistory","type":"messages.Messages","id":1143203525,"comment":"Returns the conversation history with one interlocutor / within a chat","arguments":[{"name":"peer","type":"InputPeer","comment":"Target peer"},{"name":"offset_id","type":"int","comment":"Only return messages starting from the specified message ID"},{"name":"offset_date","type":"int","comment":"Only return messages sent before the specified date"},{"name":"add_offset","type":"int","comment":"Number of list elements to be skipped, negative values are also accepted."},{"name":"limit","type":"int","comment":"Number of results to return"},{"name":"max_id","type":"int","comment":"If a positive value was transferred, the method will return only messages with IDs less than max_id"},{"name":"min_id","type":"int","comment":"If a positive value was transferred, the method will return only messages with IDs more than min_id"},{"name":"hash","type":"long","comment":"Result hash"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"TAKEOUT_INVALID","comment":"The specified takeout ID is invalid."}],"available":"user"},{"kind":"method","name":"messages.search","type":"messages.Messages","id":703497338,"comment":"Search for messages.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"peer","type":"InputPeer","comment":"User or chat, histories with which are searched, or {@link RawInputPeerEmpty} constructor to search in all private chats and normal groups (not channels) ». Use {@link messages.RawSearchGlobalRequest} to search globally in all chats, groups, supergroups and channels."},{"name":"q","type":"string","comment":"Text search request"},{"name":"from_id","type":"InputPeer","typeModifiers":{"predicate":"flags.0"},"comment":"Only return messages sent by the specified user ID"},{"name":"saved_peer_id","type":"InputPeer","typeModifiers":{"predicate":"flags.2"},"comment":"Search within the saved message dialog » with this ID."},{"name":"saved_reaction","type":"Reaction","typeModifiers":{"predicate":"flags.3","isVector":true},"comment":"You may search for saved messages tagged » with one or more reactions using this flag."},{"name":"top_msg_id","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Thread ID"},{"name":"filter","type":"MessagesFilter","comment":"Filter to return only specified message types"},{"name":"min_date","type":"int","comment":"If a positive value was transferred, only messages with a sending date bigger than the transferred one will be returned"},{"name":"max_date","type":"int","comment":"If a positive value was transferred, only messages with a sending date smaller than the transferred one will be returned"},{"name":"offset_id","type":"int","comment":"Only return messages starting from the specified message ID"},{"name":"add_offset","type":"int","comment":"Additional offset"},{"name":"limit","type":"int","comment":"Number of results to return"},{"name":"max_id","type":"int","comment":"Maximum message ID to return"},{"name":"min_id","type":"int","comment":"Minimum message ID to return"},{"name":"hash","type":"long","comment":"Hash"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"FROM_PEER_INVALID","comment":"The specified from_id is invalid."},{"code":400,"name":"INPUT_FILTER_INVALID","comment":"The specified filter is invalid."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"PEER_ID_NOT_SUPPORTED","comment":"The provided peer ID is not supported."},{"code":400,"name":"SEARCH_QUERY_EMPTY","comment":"The search query is empty."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"user"},{"kind":"method","name":"messages.readHistory","type":"messages.AffectedMessages","typeModifiers":{"constructorId":2228326789},"id":238054714,"comment":"Marks message history as read.","arguments":[{"name":"peer","type":"InputPeer","comment":"Target user or group"},{"name":"max_id","type":"int","comment":"If a positive value is passed, only messages with identifiers less or equal than the given one will be read"}],"throws":[{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.deleteHistory","type":"messages.AffectedHistory","typeModifiers":{"constructorId":3025955281},"id":2962199082,"comment":"Deletes communication history.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"just_clear","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Just clear history for the current user, without actually removing messages for every chat user"},{"name":"revoke","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether to delete the message history for all chat participants"},{"name":"peer","type":"InputPeer","comment":"User or chat, communication history of which will be deleted"},{"name":"max_id","type":"int","comment":"Maximum ID of message to delete"},{"name":"min_date","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"Delete all messages newer than this UNIX timestamp"},{"name":"max_date","type":"int","typeModifiers":{"predicate":"flags.3"},"comment":"Delete all messages older than this UNIX timestamp"}],"throws":[{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_REVOKE_DATE_UNSUPPORTED","comment":"min_date and max_date are not available for using with non-user peers."},{"code":400,"name":"MAX_DATE_INVALID","comment":"The specified maximum date is invalid."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"MIN_DATE_INVALID","comment":"The specified minimum date is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.deleteMessages","type":"messages.AffectedMessages","typeModifiers":{"constructorId":2228326789},"id":3851326930,"comment":"Deletes messages by their identifiers.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"revoke","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to delete messages for all participants of the chat"},{"name":"id","type":"int","typeModifiers":{"isVector":true},"comment":"Message ID list"}],"throws":[{"code":403,"name":"MESSAGE_DELETE_FORBIDDEN","comment":"You can't delete one of the messages you tried to delete, most likely because it is a service message."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."}],"available":"both"},{"kind":"method","name":"messages.receivedMessages","type":"ReceivedNotifyMessage","typeModifiers":{"isVector":true,"constructorId":2743383929},"id":94983360,"comment":"Confirms receipt of messages by a client, cancels PUSH-notification sending.","arguments":[{"name":"max_id","type":"int","comment":"Maximum message ID available in a client."}],"available":"user"},{"kind":"method","name":"messages.setTyping","type":"Bool","id":1486110434,"comment":"Sends a current user typing event (see SendMessageAction for all event types) to a conversation partner or group.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"peer","type":"InputPeer","comment":"Target user or group"},{"name":"top_msg_id","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Topic ID"},{"name":"action","type":"SendMessageAction","comment":"Type of action"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":403,"name":"GROUPCALL_FORBIDDEN","comment":"The group call has already ended."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."},{"code":403,"name":"USER_IS_BLOCKED","comment":"You were blocked by this user."},{"code":400,"name":"USER_IS_BOT","comment":"Bots can't send messages to other bots."}],"available":"both"},{"kind":"method","name":"messages.sendMessage","type":"Updates","id":2554304325,"comment":"Sends a message to a chat","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"no_webpage","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Set this flag to disable generation of the webpage preview"},{"name":"silent","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Send this message silently (no notifications for the receivers)"},{"name":"background","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"Send this message as background message"},{"name":"clear_draft","type":"true","typeModifiers":{"predicate":"flags.7"},"comment":"Clear the draft field"},{"name":"noforwards","type":"true","typeModifiers":{"predicate":"flags.14"},"comment":"Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled"},{"name":"update_stickersets_order","type":"true","typeModifiers":{"predicate":"flags.15"},"comment":"Whether to move used stickersets to top, see here for more info on this flag »"},{"name":"invert_media","type":"true","typeModifiers":{"predicate":"flags.16"},"comment":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom."},{"name":"peer","type":"InputPeer","comment":"The destination where the message will be sent"},{"name":"reply_to","type":"InputReplyTo","typeModifiers":{"predicate":"flags.0"},"comment":"If set, indicates that the message should be sent in reply to the specified message or story.
Also used to quote other messages."},{"name":"message","type":"string","comment":"The message"},{"name":"random_id","type":"long","comment":"Unique client message ID required to prevent message resending"},{"name":"reply_markup","type":"ReplyMarkup","typeModifiers":{"predicate":"flags.2"},"comment":"Reply markup for sending bot buttons"},{"name":"entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.3","isVector":true},"comment":"Message entities for sending styled text"},{"name":"schedule_date","type":"int","typeModifiers":{"predicate":"flags.10"},"comment":"Scheduled message date for scheduled messages"},{"name":"send_as","type":"InputPeer","typeModifiers":{"predicate":"flags.13"},"comment":"Send this message as the specified peer"},{"name":"quick_reply_shortcut","type":"InputQuickReplyShortcut","typeModifiers":{"predicate":"flags.17"},"comment":"Add the message to the specified quick reply shortcut », instead."},{"name":"effect","type":"long","typeModifiers":{"predicate":"flags.18"},"comment":"Specifies a message effect » to use for the message."}],"throws":[{"code":400,"name":"ADMIN_RIGHTS_EMPTY","comment":"The chatAdminRights constructor passed in keyboardButtonRequestPeer.peer_type.user_admin_rights has no rights set (i.e. flags is 0)."},{"code":400,"name":"BOT_DOMAIN_INVALID","comment":"Bot domain invalid."},{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."},{"code":400,"name":"BUSINESS_PEER_INVALID","comment":"Messages can't be set to the specified peer through the current business connection."},{"code":400,"name":"BUTTON_DATA_INVALID","comment":"The data of one or more of the buttons you provided is invalid."},{"code":400,"name":"BUTTON_TYPE_INVALID","comment":"The type of one or more of the buttons you provided is invalid."},{"code":400,"name":"BUTTON_URL_INVALID","comment":"Button URL invalid."},{"code":400,"name":"BUTTON_USER_INVALID","comment":"The user_id passed to inputKeyboardButtonUserProfile is invalid!"},{"code":400,"name":"BUTTON_USER_PRIVACY_RESTRICTED","comment":"The privacy setting of the user specified in a {@link RawInputKeyboardButtonUserProfile} button do not allow creating such a button."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_GUEST_SEND_FORBIDDEN","comment":"You join the discussion group before commenting, see here » for more info."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_RESTRICTED","comment":"You can't send messages in this chat, you were restricted."},{"code":403,"name":"CHAT_SEND_PLAIN_FORBIDDEN","comment":"You can't send non-media (text) messages in this chat."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"DOCUMENT_INVALID","comment":"The specified document is invalid."},{"code":400,"name":"ENCRYPTION_DECLINED","comment":"The secret chat was declined."},{"code":400,"name":"ENTITIES_TOO_LONG","comment":"You provided too many styled message entities."},{"code":400,"name":"ENTITY_BOUNDS_INVALID","comment":"A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length."},{"code":400,"name":"ENTITY_MENTION_USER_INVALID","comment":"You mentioned an invalid user."},{"code":400,"name":"FROM_MESSAGE_BOT_DISABLED","comment":"Bots can't use fromMessage min constructors."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MESSAGE_EMPTY","comment":"The provided message is empty."},{"code":400,"name":"MESSAGE_TOO_LONG","comment":"The provided message is too long."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":500,"name":"MSG_WAIT_FAILED","comment":"A waiting call returned an error."},{"code":406,"name":"PAYMENT_UNSUPPORTED","comment":"A detailed description of the error will be received separately as described here »."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"PINNED_DIALOGS_TOO_MUCH","comment":"Too many pinned dialogs."},{"code":400,"name":"POLL_OPTION_INVALID","comment":"Invalid poll option provided."},{"code":406,"name":"PRIVACY_PREMIUM_REQUIRED","comment":"You need a Telegram Premium subscription to send a message to this user."},{"code":400,"name":"QUICK_REPLIES_TOO_MUCH","comment":"A maximum of appConfig.quick_replies_limit shortcuts may be created, the limit was reached."},{"code":400,"name":"QUOTE_TEXT_INVALID","comment":"The specified reply_to.quote_text field is invalid."},{"code":500,"name":"RANDOM_ID_DUPLICATE","comment":"You provided a random ID that was already used."},{"code":400,"name":"REPLY_MARKUP_INVALID","comment":"The provided reply markup is invalid."},{"code":400,"name":"REPLY_MARKUP_TOO_LONG","comment":"The specified reply_markup is too long."},{"code":400,"name":"REPLY_MESSAGES_TOO_MUCH","comment":"Each shortcut can contain a maximum of appConfig.quick_reply_messages_limit messages, the limit was reached."},{"code":400,"name":"REPLY_MESSAGE_ID_INVALID","comment":"The specified reply-to message ID is invalid."},{"code":400,"name":"REPLY_TO_INVALID","comment":"The specified reply_to field is invalid."},{"code":400,"name":"REPLY_TO_USER_INVALID","comment":"The replied-to user is invalid."},{"code":400,"name":"SCHEDULE_BOT_NOT_ALLOWED","comment":"Bots cannot schedule messages."},{"code":400,"name":"SCHEDULE_DATE_TOO_LATE","comment":"You can't schedule a message this far in the future."},{"code":400,"name":"SCHEDULE_STATUS_PRIVATE","comment":"Can't schedule until user is online, if the user's last seen timestamp is hidden by their privacy settings."},{"code":400,"name":"SCHEDULE_TOO_MUCH","comment":"There are too many scheduled messages."},{"code":400,"name":"SEND_AS_PEER_INVALID","comment":"You can't send messages as the specified peer."},{"code":420,"name":"SLOWMODE_WAIT_%d","comment":"Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat."},{"code":400,"name":"STORY_ID_INVALID","comment":"The specified story ID is invalid."},{"code":406,"name":"TOPIC_CLOSED","comment":"This topic was closed, you can't send messages to it anymore."},{"code":406,"name":"TOPIC_DELETED","comment":"The specified topic was deleted."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."},{"code":403,"name":"USER_IS_BLOCKED","comment":"You were blocked by this user."},{"code":400,"name":"USER_IS_BOT","comment":"Bots can't send messages to other bots."},{"code":400,"name":"WC_CONVERT_URL_INVALID","comment":"WC convert URL invalid."},{"code":400,"name":"YOU_BLOCKED_USER","comment":"You blocked this user."}],"available":"both"},{"kind":"method","name":"messages.sendMedia","type":"Updates","id":2018673486,"comment":"Send a media","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"silent","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Send message silently (no notification should be triggered)"},{"name":"background","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"Send message in background"},{"name":"clear_draft","type":"true","typeModifiers":{"predicate":"flags.7"},"comment":"Clear the draft"},{"name":"noforwards","type":"true","typeModifiers":{"predicate":"flags.14"},"comment":"Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled"},{"name":"update_stickersets_order","type":"true","typeModifiers":{"predicate":"flags.15"},"comment":"Whether to move used stickersets to top, see here for more info on this flag »"},{"name":"invert_media","type":"true","typeModifiers":{"predicate":"flags.16"},"comment":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom."},{"name":"peer","type":"InputPeer","comment":"Destination"},{"name":"reply_to","type":"InputReplyTo","typeModifiers":{"predicate":"flags.0"},"comment":"If set, indicates that the message should be sent in reply to the specified message or story."},{"name":"media","type":"InputMedia","comment":"Attached media"},{"name":"message","type":"string","comment":"Caption"},{"name":"random_id","type":"long","comment":"Random ID to avoid resending the same message"},{"name":"reply_markup","type":"ReplyMarkup","typeModifiers":{"predicate":"flags.2"},"comment":"Reply markup for bot keyboards"},{"name":"entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.3","isVector":true},"comment":"Message entities for styled text"},{"name":"schedule_date","type":"int","typeModifiers":{"predicate":"flags.10"},"comment":"Scheduled message date for scheduled messages"},{"name":"send_as","type":"InputPeer","typeModifiers":{"predicate":"flags.13"},"comment":"Send this message as the specified peer"},{"name":"quick_reply_shortcut","type":"InputQuickReplyShortcut","typeModifiers":{"predicate":"flags.17"},"comment":"Add the message to the specified quick reply shortcut », instead."},{"name":"effect","type":"long","typeModifiers":{"predicate":"flags.18"},"comment":"Specifies a message effect » to use for the message."}],"throws":[{"code":400,"name":"BOT_GAMES_DISABLED","comment":"Games can't be sent to channels."},{"code":400,"name":"BOT_PAYMENTS_DISABLED","comment":"Please enable bot payments in botfather before calling this method."},{"code":400,"name":"BROADCAST_PUBLIC_VOTERS_FORBIDDEN","comment":"You can't forward polls with public voters."},{"code":400,"name":"BUTTON_DATA_INVALID","comment":"The data of one or more of the buttons you provided is invalid."},{"code":400,"name":"BUTTON_POS_INVALID","comment":"The position of one of the keyboard buttons is invalid (i.e. a Game or Pay button not in the first position, and so on...)."},{"code":400,"name":"BUTTON_TYPE_INVALID","comment":"The type of one or more of the buttons you provided is invalid."},{"code":400,"name":"BUTTON_URL_INVALID","comment":"Button URL invalid."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_FORWARDS_RESTRICTED","comment":"You can't forward messages from a protected chat."},{"code":403,"name":"CHAT_GUEST_SEND_FORBIDDEN","comment":"You join the discussion group before commenting, see here » for more info."},{"code":400,"name":"CHAT_RESTRICTED","comment":"You can't send messages in this chat, you were restricted."},{"code":403,"name":"CHAT_SEND_AUDIOS_FORBIDDEN","comment":"You can't send audio messages in this chat."},{"code":403,"name":"CHAT_SEND_DOCS_FORBIDDEN","comment":"You can't send documents in this chat."},{"code":403,"name":"CHAT_SEND_GIFS_FORBIDDEN","comment":"You can't send gifs in this chat."},{"code":403,"name":"CHAT_SEND_MEDIA_FORBIDDEN","comment":"You can't send media in this chat."},{"code":403,"name":"CHAT_SEND_PHOTOS_FORBIDDEN","comment":"You can't send photos in this chat."},{"code":403,"name":"CHAT_SEND_PLAIN_FORBIDDEN","comment":"You can't send non-media (text) messages in this chat."},{"code":403,"name":"CHAT_SEND_POLL_FORBIDDEN","comment":"You can't send polls in this chat."},{"code":403,"name":"CHAT_SEND_ROUNDVIDEOS_FORBIDDEN","comment":"You can't send round videos to this chat."},{"code":403,"name":"CHAT_SEND_STICKERS_FORBIDDEN","comment":"You can't send stickers in this chat."},{"code":403,"name":"CHAT_SEND_VIDEOS_FORBIDDEN","comment":"You can't send videos in this chat."},{"code":403,"name":"CHAT_SEND_VOICES_FORBIDDEN","comment":"You can't send voice recordings in this chat."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"CURRENCY_TOTAL_AMOUNT_INVALID","comment":"The total amount of all prices is invalid."},{"code":400,"name":"DOCUMENT_INVALID","comment":"The specified document is invalid."},{"code":400,"name":"EMOTICON_INVALID","comment":"The specified emoji is invalid."},{"code":400,"name":"ENTITY_BOUNDS_INVALID","comment":"A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length."},{"code":400,"name":"EXTERNAL_URL_INVALID","comment":"External URL invalid."},{"code":400,"name":"FILE_PARTS_INVALID","comment":"The number of file parts is invalid."},{"code":400,"name":"FILE_PART_LENGTH_INVALID","comment":"The length of a file part is invalid."},{"code":400,"name":"FILE_REFERENCE_EMPTY","comment":"An empty file reference was specified."},{"code":400,"name":"FILE_REFERENCE_EXPIRED","comment":"File reference expired, it must be refetched as described in the documentation."},{"code":400,"name":"GAME_BOT_INVALID","comment":"Bots can't send another bot's game."},{"code":400,"name":"IMAGE_PROCESS_FAILED","comment":"Failure while processing image."},{"code":400,"name":"INPUT_FILE_INVALID","comment":"The specified InputFile is invalid."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MD5_CHECKSUM_INVALID","comment":"The MD5 checksums do not match."},{"code":400,"name":"MEDIA_CAPTION_TOO_LONG","comment":"The caption is too long."},{"code":400,"name":"MEDIA_EMPTY","comment":"The provided media object is invalid."},{"code":400,"name":"MEDIA_INVALID","comment":"Media invalid."},{"code":400,"name":"MESSAGE_EMPTY","comment":"The provided message is empty."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PAYMENT_PROVIDER_INVALID","comment":"The specified payment provider is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"PHOTO_EXT_INVALID","comment":"The extension of the photo is invalid."},{"code":400,"name":"PHOTO_INVALID_DIMENSIONS","comment":"The photo dimensions are invalid."},{"code":400,"name":"PHOTO_SAVE_FILE_INVALID","comment":"Internal issues, try again later."},{"code":400,"name":"POLL_ANSWERS_INVALID","comment":"Invalid poll answers were provided."},{"code":400,"name":"POLL_ANSWER_INVALID","comment":"One of the poll answers is not acceptable."},{"code":400,"name":"POLL_OPTION_DUPLICATE","comment":"Duplicate poll options provided."},{"code":400,"name":"POLL_OPTION_INVALID","comment":"Invalid poll option provided."},{"code":400,"name":"POLL_QUESTION_INVALID","comment":"One of the poll questions is not acceptable."},{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."},{"code":403,"name":"PRIVACY_PREMIUM_REQUIRED","comment":"You need a Telegram Premium subscription to send a message to this user."},{"code":400,"name":"QUICK_REPLIES_TOO_MUCH","comment":"A maximum of appConfig.quick_replies_limit shortcuts may be created, the limit was reached."},{"code":400,"name":"QUIZ_CORRECT_ANSWERS_EMPTY","comment":"No correct quiz answer was specified."},{"code":400,"name":"QUIZ_CORRECT_ANSWERS_TOO_MUCH","comment":"You specified too many correct answers in a quiz, quizzes can only have one right answer!"},{"code":400,"name":"QUIZ_CORRECT_ANSWER_INVALID","comment":"An invalid value was provided to the correct_answers field."},{"code":400,"name":"QUIZ_MULTIPLE_INVALID","comment":"Quizzes can't have the multiple_choice flag set!"},{"code":500,"name":"RANDOM_ID_DUPLICATE","comment":"You provided a random ID that was already used."},{"code":400,"name":"REPLY_MARKUP_BUY_EMPTY","comment":"Reply markup for buy button empty."},{"code":400,"name":"REPLY_MARKUP_GAME_EMPTY","comment":"A game message is being edited, but the newly provided keyboard doesn't have a keyboardButtonGame button."},{"code":400,"name":"REPLY_MARKUP_INVALID","comment":"The provided reply markup is invalid."},{"code":400,"name":"REPLY_MARKUP_TOO_LONG","comment":"The specified reply_markup is too long."},{"code":400,"name":"REPLY_MESSAGES_TOO_MUCH","comment":"Each shortcut can contain a maximum of appConfig.quick_reply_messages_limit messages, the limit was reached."},{"code":400,"name":"SCHEDULE_BOT_NOT_ALLOWED","comment":"Bots cannot schedule messages."},{"code":400,"name":"SCHEDULE_DATE_TOO_LATE","comment":"You can't schedule a message this far in the future."},{"code":400,"name":"SCHEDULE_TOO_MUCH","comment":"There are too many scheduled messages."},{"code":400,"name":"SEND_AS_PEER_INVALID","comment":"You can't send messages as the specified peer."},{"code":420,"name":"SLOWMODE_WAIT_%d","comment":"Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat."},{"code":400,"name":"STORY_ID_INVALID","comment":"The specified story ID is invalid."},{"code":406,"name":"TOPIC_CLOSED","comment":"This topic was closed, you can't send messages to it anymore."},{"code":406,"name":"TOPIC_DELETED","comment":"The specified topic was deleted."},{"code":400,"name":"TTL_MEDIA_INVALID","comment":"Invalid media Time To Live was provided."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."},{"code":403,"name":"USER_IS_BLOCKED","comment":"You were blocked by this user."},{"code":400,"name":"USER_IS_BOT","comment":"Bots can't send messages to other bots."},{"code":400,"name":"VIDEO_CONTENT_TYPE_INVALID","comment":"The video's content type is invalid."},{"code":400,"name":"VOICE_MESSAGES_FORBIDDEN","comment":"This user's privacy settings forbid you from sending voice messages."},{"code":400,"name":"WEBDOCUMENT_MIME_INVALID","comment":"Invalid webdocument mime type provided."},{"code":400,"name":"WEBPAGE_CURL_FAILED","comment":"Failure while fetching the webpage with cURL."},{"code":400,"name":"WEBPAGE_MEDIA_EMPTY","comment":"Webpage media empty."},{"code":400,"name":"WEBPAGE_NOT_FOUND","comment":"A preview for the specified webpage url could not be generated."},{"code":400,"name":"WEBPAGE_URL_INVALID","comment":"The specified webpage url is invalid."},{"code":400,"name":"YOU_BLOCKED_USER","comment":"You blocked this user."}],"available":"both"},{"kind":"method","name":"messages.forwardMessages","type":"Updates","id":3573781000,"comment":"Forwards messages by their IDs.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"silent","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Whether to send messages silently (no notification will be triggered on the destination clients)"},{"name":"background","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"Whether to send the message in background"},{"name":"with_my_score","type":"true","typeModifiers":{"predicate":"flags.8"},"comment":"When forwarding games, whether to include your score in the game"},{"name":"drop_author","type":"true","typeModifiers":{"predicate":"flags.11"},"comment":"Whether to forward messages without quoting the original author"},{"name":"drop_media_captions","type":"true","typeModifiers":{"predicate":"flags.12"},"comment":"Whether to strip captions from media"},{"name":"noforwards","type":"true","typeModifiers":{"predicate":"flags.14"},"comment":"Only for bots, disallows further re-forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled"},{"name":"from_peer","type":"InputPeer","comment":"Source of messages"},{"name":"id","type":"int","typeModifiers":{"isVector":true},"comment":"IDs of messages"},{"name":"random_id","type":"long","typeModifiers":{"isVector":true},"comment":"Random ID to prevent resending of messages"},{"name":"to_peer","type":"InputPeer","comment":"Destination peer"},{"name":"top_msg_id","type":"int","typeModifiers":{"predicate":"flags.9"},"comment":"Destination forum topic"},{"name":"schedule_date","type":"int","typeModifiers":{"predicate":"flags.10"},"comment":"Scheduled message date for scheduled messages"},{"name":"send_as","type":"InputPeer","typeModifiers":{"predicate":"flags.13"},"comment":"Forward the messages as the specified peer"},{"name":"quick_reply_shortcut","type":"InputQuickReplyShortcut","typeModifiers":{"predicate":"flags.17"},"comment":"Add the messages to the specified quick reply shortcut », instead."}],"throws":[{"code":400,"name":"BROADCAST_PUBLIC_VOTERS_FORBIDDEN","comment":"You can't forward polls with public voters."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":406,"name":"CHAT_FORWARDS_RESTRICTED","comment":"You can't forward messages from a protected chat."},{"code":403,"name":"CHAT_GUEST_SEND_FORBIDDEN","comment":"You join the discussion group before commenting, see here » for more info."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_RESTRICTED","comment":"You can't send messages in this chat, you were restricted."},{"code":403,"name":"CHAT_SEND_AUDIOS_FORBIDDEN","comment":"You can't send audio messages in this chat."},{"code":403,"name":"CHAT_SEND_DOCS_FORBIDDEN","comment":"You can't send documents in this chat."},{"code":403,"name":"CHAT_SEND_GAME_FORBIDDEN","comment":"You can't send a game to this chat."},{"code":403,"name":"CHAT_SEND_GIFS_FORBIDDEN","comment":"You can't send gifs in this chat."},{"code":403,"name":"CHAT_SEND_MEDIA_FORBIDDEN","comment":"You can't send media in this chat."},{"code":403,"name":"CHAT_SEND_PHOTOS_FORBIDDEN","comment":"You can't send photos in this chat."},{"code":403,"name":"CHAT_SEND_PLAIN_FORBIDDEN","comment":"You can't send non-media (text) messages in this chat."},{"code":403,"name":"CHAT_SEND_POLL_FORBIDDEN","comment":"You can't send polls in this chat."},{"code":403,"name":"CHAT_SEND_STICKERS_FORBIDDEN","comment":"You can't send stickers in this chat."},{"code":403,"name":"CHAT_SEND_VIDEOS_FORBIDDEN","comment":"You can't send videos in this chat."},{"code":403,"name":"CHAT_SEND_VOICES_FORBIDDEN","comment":"You can't send voice recordings in this chat."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"GROUPED_MEDIA_INVALID","comment":"Invalid grouped media."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MEDIA_EMPTY","comment":"The provided media object is invalid."},{"code":400,"name":"MESSAGE_IDS_EMPTY","comment":"No message ids were provided."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":406,"name":"PAYMENT_UNSUPPORTED","comment":"A detailed description of the error will be received separately as described here »."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."},{"code":406,"name":"PRIVACY_PREMIUM_REQUIRED","comment":"You need a Telegram Premium subscription to send a message to this user."},{"code":400,"name":"QUICK_REPLIES_TOO_MUCH","comment":"A maximum of appConfig.quick_replies_limit shortcuts may be created, the limit was reached."},{"code":400,"name":"QUIZ_ANSWER_MISSING","comment":"You can forward a quiz while hiding the original author only after choosing an option in the quiz."},{"code":500,"name":"RANDOM_ID_DUPLICATE","comment":"You provided a random ID that was already used."},{"code":400,"name":"RANDOM_ID_INVALID","comment":"A provided random ID is invalid."},{"code":400,"name":"REPLY_MESSAGES_TOO_MUCH","comment":"Each shortcut can contain a maximum of appConfig.quick_reply_messages_limit messages, the limit was reached."},{"code":400,"name":"SCHEDULE_BOT_NOT_ALLOWED","comment":"Bots cannot schedule messages."},{"code":400,"name":"SCHEDULE_DATE_TOO_LATE","comment":"You can't schedule a message this far in the future."},{"code":400,"name":"SCHEDULE_TOO_MUCH","comment":"There are too many scheduled messages."},{"code":400,"name":"SEND_AS_PEER_INVALID","comment":"You can't send messages as the specified peer."},{"code":400,"name":"SLOWMODE_MULTI_MSGS_DISABLED","comment":"Slowmode is enabled, you cannot forward multiple messages to this group."},{"code":420,"name":"SLOWMODE_WAIT_%d","comment":"Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat."},{"code":406,"name":"TOPIC_CLOSED","comment":"This topic was closed, you can't send messages to it anymore."},{"code":406,"name":"TOPIC_DELETED","comment":"The specified topic was deleted."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."},{"code":403,"name":"USER_IS_BLOCKED","comment":"You were blocked by this user."},{"code":400,"name":"USER_IS_BOT","comment":"Bots can't send messages to other bots."},{"code":403,"name":"VOICE_MESSAGES_FORBIDDEN","comment":"This user's privacy settings forbid you from sending voice messages."},{"code":400,"name":"YOU_BLOCKED_USER","comment":"You blocked this user."}],"available":"both"},{"kind":"method","name":"messages.reportSpam","type":"Bool","id":3474297563,"comment":"Report a new incoming chat for spam, if the {@link RawPeerSettings} of the chat allow us to do that","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer to report"}],"throws":[{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.getPeerSettings","type":"messages.PeerSettings","typeModifiers":{"constructorId":1753266509},"id":4024018594,"comment":"Get peer settings","arguments":[{"name":"peer","type":"InputPeer","comment":"The peer"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.report","type":"Bool","id":2303961934,"comment":"Report a message in a chat for violation of telegram's Terms of Service","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer"},{"name":"id","type":"int","typeModifiers":{"isVector":true},"comment":"IDs of messages to report"},{"name":"reason","type":"ReportReason","comment":"Why are these messages being reported"},{"name":"message","type":"string","comment":"Comment for report moderation"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.getChats","type":"messages.Chats","id":1240027791,"comment":"Returns chat basic info on their IDs.","arguments":[{"name":"id","type":"int53","typeModifiers":{"isVector":true},"comment":"List of chat IDs"}],"throws":[{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"both"},{"kind":"method","name":"messages.getFullChat","type":"messages.ChatFull","typeModifiers":{"constructorId":3856126364},"id":2930772788,"comment":"Get full info about a basic group.","arguments":[{"name":"chat_id","type":"int53","comment":"Basic group ID."}],"throws":[{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"both"},{"kind":"method","name":"messages.editChatTitle","type":"Updates","id":1937260541,"comment":"Changes chat name and sends a service message on it.","arguments":[{"name":"chat_id","type":"int53","comment":"Chat ID"},{"name":"title","type":"string","comment":"New chat name, different from the old one"}],"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"CHAT_TITLE_EMPTY","comment":"No chat title provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"both"},{"kind":"method","name":"messages.editChatPhoto","type":"Updates","id":903730804,"comment":"Changes chat photo and sends a service message on it","arguments":[{"name":"chat_id","type":"int53","comment":"Chat ID"},{"name":"photo","type":"InputChatPhoto","comment":"Photo to be set"}],"throws":[{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"IMAGE_PROCESS_FAILED","comment":"Failure while processing image."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"PHOTO_CROP_SIZE_SMALL","comment":"Photo is too small."},{"code":400,"name":"PHOTO_EXT_INVALID","comment":"The extension of the photo is invalid."},{"code":400,"name":"PHOTO_INVALID","comment":"Photo invalid."}],"available":"both"},{"kind":"method","name":"messages.addChatUser","type":"messages.InvitedUsers","typeModifiers":{"constructorId":2136862630},"id":3418804487,"comment":"Adds a user to a chat and sends a service message on it.","arguments":[{"name":"chat_id","type":"int53","comment":"Chat ID"},{"name":"user_id","type":"InputUser","comment":"User ID to be added"},{"name":"fwd_limit","type":"int","comment":"Number of last messages to be forwarded"}],"throws":[{"code":400,"name":"BOT_GROUPS_BLOCKED","comment":"This bot can't be added to groups."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USERS_TOO_MUCH","comment":"The maximum number of users has been exceeded (to create a chat, for example)."},{"code":400,"name":"USER_ALREADY_PARTICIPANT","comment":"The user is already in the group."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."},{"code":400,"name":"USER_IS_BLOCKED","comment":"You were blocked by this user."},{"code":403,"name":"USER_NOT_MUTUAL_CONTACT","comment":"The provided user is not a mutual contact."},{"code":403,"name":"USER_PRIVACY_RESTRICTED","comment":"The user's privacy settings do not allow you to do this."},{"code":400,"name":"YOU_BLOCKED_USER","comment":"You blocked this user."}],"available":"user"},{"kind":"method","name":"messages.deleteChatUser","type":"Updates","id":2719505579,"comment":"Deletes a user from a chat and sends a service message on it.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"revoke_history","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Remove the entire chat history of the specified user in this chat."},{"name":"chat_id","type":"int53","comment":"Chat ID"},{"name":"user_id","type":"InputUser","comment":"User ID to be deleted"}],"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."},{"code":400,"name":"USER_NOT_PARTICIPANT","comment":"You're not a member of this supergroup/channel."}],"available":"both"},{"kind":"method","name":"messages.createChat","type":"messages.InvitedUsers","typeModifiers":{"constructorId":2136862630},"id":2463030740,"comment":"Creates a new chat.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"users","type":"InputUser","typeModifiers":{"isVector":true},"comment":"List of user IDs to be invited"},{"name":"title","type":"string","comment":"Chat name"},{"name":"ttl_period","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Time-to-live of all messages that will be sent in the chat: once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. You can use {@link messages.RawSetDefaultHistoryTTLRequest} to edit this value later."}],"throws":[{"code":500,"name":"CHAT_ID_GENERATE_FAILED","comment":"Failure while generating the chat ID."},{"code":400,"name":"CHAT_INVALID","comment":"Invalid chat."},{"code":400,"name":"CHAT_TITLE_EMPTY","comment":"No chat title provided."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"TTL_PERIOD_INVALID","comment":"The specified TTL period is invalid."},{"code":400,"name":"USERS_TOO_FEW","comment":"Not enough users (to create a chat, for example)."},{"code":406,"name":"USER_RESTRICTED","comment":"You're spamreported, you can't create channels or chats."}],"available":"user"},{"kind":"method","name":"messages.getDhConfig","type":"messages.DhConfig","id":651135312,"comment":"Returns configuration parameters for Diffie-Hellman key generation. Can also return a random sequence of bytes of required length.","arguments":[{"name":"version","type":"int","comment":"Value of the version parameter from {@link messages.RawDhConfig}, available at the client"},{"name":"random_length","type":"int","comment":"Length of the required random sequence"}],"throws":[{"code":400,"name":"RANDOM_LENGTH_INVALID","comment":"Random length invalid."}],"available":"user"},{"kind":"method","name":"messages.requestEncryption","type":"EncryptedChat","id":4132286275,"comment":"Sends a request to start a secret chat to the user.","arguments":[{"name":"user_id","type":"InputUser","comment":"User ID"},{"name":"random_id","type":"int","comment":"Unique client request ID required to prevent resending. This also doubles as the chat ID."},{"name":"g_a","type":"bytes","comment":"A = g ^ a mod p, see Wikipedia"}],"throws":[{"code":400,"name":"DH_G_A_INVALID","comment":"g_a invalid."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"user"},{"kind":"method","name":"messages.acceptEncryption","type":"EncryptedChat","id":1035731989,"comment":"Confirms creation of a secret chat","arguments":[{"name":"peer","type":"InputEncryptedChat","comment":"Secret chat ID"},{"name":"g_b","type":"bytes","comment":"B = g ^ b mod p, see Wikipedia"},{"name":"key_fingerprint","type":"long","comment":"64-bit fingerprint of the received key"}],"throws":[{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"ENCRYPTION_ALREADY_ACCEPTED","comment":"Secret chat already accepted."},{"code":400,"name":"ENCRYPTION_ALREADY_DECLINED","comment":"The secret chat was already declined."}],"available":"user"},{"kind":"method","name":"messages.discardEncryption","type":"Bool","id":4086541984,"comment":"Cancels a request for creation and/or delete info on secret chat.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"delete_history","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to delete the entire chat history for the other user as well"},{"name":"chat_id","type":"int","comment":"Secret chat ID"}],"throws":[{"code":400,"name":"CHAT_ID_EMPTY","comment":"The provided chat ID is empty."},{"code":400,"name":"ENCRYPTION_ALREADY_ACCEPTED","comment":"Secret chat already accepted."},{"code":400,"name":"ENCRYPTION_ALREADY_DECLINED","comment":"The secret chat was already declined."},{"code":400,"name":"ENCRYPTION_ID_INVALID","comment":"The provided secret chat ID is invalid."}],"available":"user"},{"kind":"method","name":"messages.setEncryptedTyping","type":"Bool","id":2031374829,"comment":"Send typing event by the current user to a secret chat.","arguments":[{"name":"peer","type":"InputEncryptedChat","comment":"Secret chat ID"},{"name":"typing","type":"Bool","comment":"Typing.
Possible values:
true, if the user started typing and more than 5 seconds have passed since the last request
false, if the user stopped typing"}],"throws":[{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."}],"available":"user"},{"kind":"method","name":"messages.readEncryptedHistory","type":"Bool","id":2135648522,"comment":"Marks message history within a secret chat as read.","arguments":[{"name":"peer","type":"InputEncryptedChat","comment":"Secret chat ID"},{"name":"max_date","type":"int","comment":"Maximum date value for received messages in history"}],"throws":[{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"MAX_DATE_INVALID","comment":"The specified maximum date is invalid."},{"code":400,"name":"MSG_WAIT_FAILED","comment":"A waiting call returned an error."}],"available":"user"},{"kind":"method","name":"messages.sendEncrypted","type":"messages.SentEncryptedMessage","id":1157265941,"comment":"Sends a text message to a secret chat.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"silent","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Send encrypted message without a notification"},{"name":"peer","type":"InputEncryptedChat","comment":"Secret chat ID"},{"name":"random_id","type":"long","comment":"Unique client message ID, necessary to avoid message resending"},{"name":"data","type":"bytes","comment":"TL-serialization of DecryptedMessage type, encrypted with a key that was created during chat initialization"}],"throws":[{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"DATA_INVALID","comment":"Encrypted data invalid."},{"code":400,"name":"DATA_TOO_LONG","comment":"Data too long."},{"code":400,"name":"ENCRYPTION_DECLINED","comment":"The secret chat was declined."},{"code":500,"name":"MSG_WAIT_FAILED","comment":"A waiting call returned an error."},{"code":403,"name":"USER_IS_BLOCKED","comment":"You were blocked by this user."}],"available":"user"},{"kind":"method","name":"messages.sendEncryptedFile","type":"messages.SentEncryptedMessage","id":1431914525,"comment":"Sends a message with a file attachment to a secret chat","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"silent","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to send the file without triggering a notification"},{"name":"peer","type":"InputEncryptedChat","comment":"Secret chat ID"},{"name":"random_id","type":"long","comment":"Unique client message ID necessary to prevent message resending"},{"name":"data","type":"bytes","comment":"TL-serialization of DecryptedMessage type, encrypted with a key generated during chat initialization"},{"name":"file","type":"InputEncryptedFile","comment":"File attachment for the secret chat"}],"throws":[{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"DATA_TOO_LONG","comment":"Data too long."},{"code":400,"name":"ENCRYPTION_DECLINED","comment":"The secret chat was declined."},{"code":400,"name":"FILE_EMTPY","comment":"An empty file was provided."},{"code":400,"name":"MD5_CHECKSUM_INVALID","comment":"The MD5 checksums do not match."},{"code":400,"name":"MSG_WAIT_FAILED","comment":"A waiting call returned an error."}],"available":"user"},{"kind":"method","name":"messages.sendEncryptedService","type":"messages.SentEncryptedMessage","id":852769188,"comment":"Sends a service message to a secret chat.","arguments":[{"name":"peer","type":"InputEncryptedChat","comment":"Secret chat ID"},{"name":"random_id","type":"long","comment":"Unique client message ID required to prevent message resending"},{"name":"data","type":"bytes","comment":"TL-serialization of DecryptedMessage type, encrypted with a key generated during chat initialization"}],"throws":[{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"DATA_INVALID","comment":"Encrypted data invalid."},{"code":400,"name":"ENCRYPTION_DECLINED","comment":"The secret chat was declined."},{"code":400,"name":"ENCRYPTION_ID_INVALID","comment":"The provided secret chat ID is invalid."},{"code":500,"name":"MSG_WAIT_FAILED","comment":"A waiting call returned an error."},{"code":403,"name":"USER_DELETED","comment":"You can't send this secret message because the other participant deleted their account."},{"code":403,"name":"USER_IS_BLOCKED","comment":"You were blocked by this user."}],"available":"user"},{"kind":"method","name":"messages.receivedQueue","type":"long","typeModifiers":{"isVector":true},"id":1436924774,"comment":"Confirms receipt of messages in a secret chat by client, cancels push notifications.
\nThe method returns a list of random_ids of messages for which push notifications were cancelled.","arguments":[{"name":"max_qts","type":"int","comment":"Maximum qts value available at the client"}],"throws":[{"code":400,"name":"MAX_QTS_INVALID","comment":"The specified max_qts is invalid."},{"code":500,"name":"MSG_WAIT_FAILED","comment":"A waiting call returned an error."}],"available":"user"},{"kind":"method","name":"messages.reportEncryptedSpam","type":"Bool","id":1259113487,"comment":"Report a secret chat for spam","arguments":[{"name":"peer","type":"InputEncryptedChat","comment":"The secret chat to report"}],"throws":[{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."}],"available":"user"},{"kind":"method","name":"messages.readMessageContents","type":"messages.AffectedMessages","typeModifiers":{"constructorId":2228326789},"id":916930423,"comment":"Notifies the sender about the recipient having listened a voice message or watched a video.","arguments":[{"name":"id","type":"int","typeModifiers":{"isVector":true},"comment":"Message ID list"}],"available":"user"},{"kind":"method","name":"messages.getStickers","type":"messages.Stickers","id":3584414625,"comment":"Get stickers by emoji","arguments":[{"name":"emoticon","type":"string","comment":"The emoji"},{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"throws":[{"code":400,"name":"EMOTICON_EMPTY","comment":"The emoji is empty."}],"available":"user"},{"kind":"method","name":"messages.getAllStickers","type":"messages.AllStickers","id":3097534888,"comment":"Get all installed stickers","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"messages.getWebPagePreview","type":"MessageMedia","id":2338894028,"comment":"Get preview of webpage","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"message","type":"string","comment":"Message from which to extract the preview"},{"name":"entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.3","isVector":true},"comment":"Message entities for styled text"}],"throws":[{"code":400,"name":"ENTITY_BOUNDS_INVALID","comment":"A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length."},{"code":400,"name":"MESSAGE_EMPTY","comment":"The provided message is empty."}],"available":"user"},{"kind":"method","name":"messages.exportChatInvite","type":"ExportedChatInvite","id":2687296981,"comment":"Export an invite link for a chat","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"legacy_revoke_permanent","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Legacy flag, reproducing legacy behavior of this method: if set, revokes all previous links before creating a new one. Kept for bot API BC, should not be used by modern clients."},{"name":"request_needed","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether admin confirmation is required before admitting each separate user into the chat"},{"name":"peer","type":"InputPeer","comment":"Chat"},{"name":"expire_date","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Expiration date"},{"name":"usage_limit","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Maximum number of users that can join using this link"},{"name":"title","type":"string","typeModifiers":{"predicate":"flags.4"},"comment":"Description of the invite link, visible only to administrators"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"EXPIRE_DATE_INVALID","comment":"The specified expiration date is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USAGE_LIMIT_INVALID","comment":"The specified usage limit is invalid."}],"available":"both"},{"kind":"method","name":"messages.checkChatInvite","type":"ChatInvite","id":1051570619,"comment":"Check the validity of a chat invite link and get basic info about it","arguments":[{"name":"hash","type":"string","comment":"Invite hash from chat invite deep link »."}],"throws":[{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"INVITE_HASH_EMPTY","comment":"The invite hash is empty."},{"code":406,"name":"INVITE_HASH_EXPIRED","comment":"The invite link has expired."},{"code":400,"name":"INVITE_HASH_INVALID","comment":"The invite hash is invalid."}],"available":"user"},{"kind":"method","name":"messages.importChatInvite","type":"Updates","id":1817183516,"comment":"Import a chat invite and join a private chat/supergroup/channel","arguments":[{"name":"hash","type":"string","comment":"hash from a chat invite deep link"}],"throws":[{"code":400,"name":"CHANNELS_TOO_MUCH","comment":"You have joined too many channels/supergroups."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_INVALID","comment":"Invalid chat."},{"code":400,"name":"INVITE_HASH_EMPTY","comment":"The invite hash is empty."},{"code":406,"name":"INVITE_HASH_EXPIRED","comment":"The invite link has expired."},{"code":400,"name":"INVITE_HASH_INVALID","comment":"The invite hash is invalid."},{"code":400,"name":"INVITE_REQUEST_SENT","comment":"You have successfully requested to join this chat or channel."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USERS_TOO_MUCH","comment":"The maximum number of users has been exceeded (to create a chat, for example)."},{"code":400,"name":"USER_ALREADY_PARTICIPANT","comment":"The user is already in the group."},{"code":400,"name":"USER_CHANNELS_TOO_MUCH","comment":"One of the users you tried to add is already in too many channels/supergroups."}],"available":"user"},{"kind":"method","name":"messages.getStickerSet","type":"messages.StickerSet","id":3365989492,"comment":"Get info about a stickerset","arguments":[{"name":"stickerset","type":"InputStickerSet","comment":"Stickerset"},{"name":"hash","type":"int","comment":"Hash used for caching, for more info click here"}],"throws":[{"code":400,"name":"EMOTICON_STICKERPACK_MISSING","comment":"inputStickerSetDice.emoji cannot be empty."},{"code":406,"name":"STICKERSET_INVALID","comment":"The provided sticker set is invalid."}],"available":"both"},{"kind":"method","name":"messages.installStickerSet","type":"messages.StickerSetInstallResult","id":3348096096,"comment":"Install a stickerset","arguments":[{"name":"stickerset","type":"InputStickerSet","comment":"Stickerset to install"},{"name":"archived","type":"Bool","comment":"Whether to archive stickerset"}],"throws":[{"code":406,"name":"STICKERSET_INVALID","comment":"The provided sticker set is invalid."}],"available":"user"},{"kind":"method","name":"messages.uninstallStickerSet","type":"Bool","id":4184757726,"comment":"Uninstall a stickerset","arguments":[{"name":"stickerset","type":"InputStickerSet","comment":"The stickerset to uninstall"}],"throws":[{"code":406,"name":"STICKERSET_INVALID","comment":"The provided sticker set is invalid."}],"available":"user"},{"kind":"method","name":"messages.startBot","type":"Updates","id":3873403768,"comment":"Start a conversation with a bot using a deep linking parameter","arguments":[{"name":"bot","type":"InputUser","comment":"The bot"},{"name":"peer","type":"InputPeer","comment":"The chat where to start the bot, can be the bot's private chat or a group"},{"name":"random_id","type":"long","comment":"Random ID to avoid resending the same message"},{"name":"start_param","type":"string","comment":"Deep linking parameter"}],"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":500,"name":"RANDOM_ID_DUPLICATE","comment":"You provided a random ID that was already used."},{"code":400,"name":"START_PARAM_EMPTY","comment":"The start parameter is empty."},{"code":400,"name":"START_PARAM_INVALID","comment":"Start parameter invalid."},{"code":400,"name":"START_PARAM_TOO_LONG","comment":"Start parameter is too long."}],"available":"user"},{"kind":"method","name":"messages.getMessagesViews","type":"messages.MessageViews","typeModifiers":{"constructorId":3066361155},"id":1468322785,"comment":"Get and increase the view counter of a message sent or forwarded from a channel","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer where the message was found"},{"name":"id","type":"int","typeModifiers":{"isVector":true},"comment":"ID of message"},{"name":"increment","type":"Bool","comment":"Whether to mark the message as viewed and increment the view counter"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.editChatAdmin","type":"Bool","id":2824589762,"comment":"Make a user admin in a basic group.","arguments":[{"name":"chat_id","type":"int53","comment":"The ID of the group"},{"name":"user_id","type":"InputUser","comment":"The user to make admin"},{"name":"is_admin","type":"Bool","comment":"Whether to make them admin"}],"throws":[{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."},{"code":400,"name":"USER_NOT_PARTICIPANT","comment":"You're not a member of this supergroup/channel."}],"available":"user"},{"kind":"method","name":"messages.migrateChat","type":"Updates","id":2726777625,"comment":"Turn a basic group into a supergroup","arguments":[{"name":"chat_id","type":"int53","comment":"Basic group to migrate"}],"throws":[{"code":400,"name":"CHANNELS_TOO_MUCH","comment":"You have joined too many channels/supergroups."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":500,"name":"CHAT_INVALID","comment":"Invalid chat."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.searchGlobal","type":"messages.Messages","id":1271290010,"comment":"Search for messages and peers globally","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"broadcasts_only","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"If set, only returns results from channels (used in the global channel search tab »)."},{"name":"folder_id","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Peer folder ID, for more info click here"},{"name":"q","type":"string","comment":"Query"},{"name":"filter","type":"MessagesFilter","comment":"Global search filter"},{"name":"min_date","type":"int","comment":"If a positive value was specified, the method will return only messages with date bigger than min_date"},{"name":"max_date","type":"int","comment":"If a positive value was transferred, the method will return only messages with date smaller than max_date"},{"name":"offset_rate","type":"int","comment":"Initially 0, then set to the {@link messages.RawMessagesSlice}"},{"name":"offset_peer","type":"InputPeer","comment":"Offsets for pagination, for more info click here"},{"name":"offset_id","type":"int","comment":"Offsets for pagination, for more info click here"},{"name":"limit","type":"int","comment":"Offsets for pagination, for more info click here"}],"throws":[{"code":400,"name":"FOLDER_ID_INVALID","comment":"Invalid folder ID."},{"code":400,"name":"INPUT_FILTER_INVALID","comment":"The specified filter is invalid."},{"code":400,"name":"SEARCH_QUERY_EMPTY","comment":"The search query is empty."}],"available":"user"},{"kind":"method","name":"messages.reorderStickerSets","type":"Bool","id":2016638777,"comment":"Reorder installed stickersets","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"masks","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Reorder mask stickersets"},{"name":"emojis","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Reorder custom emoji stickersets"},{"name":"order","type":"long","typeModifiers":{"isVector":true},"comment":"New stickerset order by stickerset IDs"}],"available":"user"},{"kind":"method","name":"messages.getDocumentByHash","type":"Document","id":2985428511,"comment":"Get a document by its SHA256 hash, mainly used for gifs","arguments":[{"name":"sha256","type":"bytes","comment":"SHA256 of file"},{"name":"size","type":"int53","comment":"Size of the file in bytes"},{"name":"mime_type","type":"string","comment":"Mime type"}],"throws":[{"code":400,"name":"SHA256_HASH_INVALID","comment":"The provided SHA256 hash is invalid."}],"available":"both"},{"kind":"method","name":"messages.getSavedGifs","type":"messages.SavedGifs","id":1559270965,"comment":"Get saved GIFs.","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"messages.saveGif","type":"Bool","id":846868683,"comment":"Add GIF to saved gifs list","arguments":[{"name":"id","type":"InputDocument","comment":"GIF to save"},{"name":"unsave","type":"Bool","comment":"Whether to remove GIF from saved gifs list"}],"throws":[{"code":400,"name":"GIF_ID_INVALID","comment":"The provided GIF ID is invalid."}],"available":"user"},{"kind":"method","name":"messages.getInlineBotResults","type":"messages.BotResults","typeModifiers":{"constructorId":3760321270},"id":1364105629,"comment":"Query an inline bot","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"bot","type":"InputUser","comment":"The bot to query"},{"name":"peer","type":"InputPeer","comment":"The currently opened chat"},{"name":"geo_point","type":"InputGeoPoint","typeModifiers":{"predicate":"flags.0"},"comment":"The geolocation, if requested"},{"name":"query","type":"string","comment":"The query"},{"name":"offset","type":"string","comment":"The offset within the results, will be passed directly as-is to the bot."}],"throws":[{"code":400,"name":"BOT_INLINE_DISABLED","comment":"This bot can't be used in inline mode."},{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."},{"code":400,"name":"BOT_RESPONSE_TIMEOUT","comment":"A timeout occurred while fetching data from the bot."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":-503,"name":"Timeout","comment":"Timeout while fetching data."}],"available":"user"},{"kind":"method","name":"messages.setInlineBotResults","type":"Bool","id":3138561049,"comment":"Answer an inline query, for bots only","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"gallery","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Set this flag if the results are composed of media files"},{"name":"private","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Set this flag if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query"},{"name":"query_id","type":"long","comment":"Unique identifier for the answered query"},{"name":"results","type":"InputBotInlineResult","typeModifiers":{"isVector":true},"comment":"Vector of results for the inline query"},{"name":"cache_time","type":"int","comment":"The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300."},{"name":"next_offset","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes."},{"name":"switch_pm","type":"InlineBotSwitchPM","typeModifiers":{"predicate":"flags.3"},"comment":"If passed, clients will display a button on top of the remaining inline result list with the specified text, that switches the user to a private chat with the bot and sends the bot a start message with a certain parameter."},{"name":"switch_webview","type":"InlineBotWebView","typeModifiers":{"predicate":"flags.4"},"comment":"If passed, clients will display a button on top of the remaining inline result list with the specified text, that switches the user to the specified inline mode mini app."}],"throws":[{"code":400,"name":"ARTICLE_TITLE_EMPTY","comment":"The title of the article is empty."},{"code":400,"name":"AUDIO_CONTENT_URL_EMPTY","comment":"The remote URL specified in the content field is empty."},{"code":400,"name":"AUDIO_TITLE_EMPTY","comment":"An empty audio title was provided."},{"code":400,"name":"BUTTON_DATA_INVALID","comment":"The data of one or more of the buttons you provided is invalid."},{"code":400,"name":"BUTTON_TYPE_INVALID","comment":"The type of one or more of the buttons you provided is invalid."},{"code":400,"name":"BUTTON_URL_INVALID","comment":"Button URL invalid."},{"code":400,"name":"DOCUMENT_INVALID","comment":"The specified document is invalid."},{"code":400,"name":"FILE_CONTENT_TYPE_INVALID","comment":"File content-type is invalid."},{"code":400,"name":"FILE_TITLE_EMPTY","comment":"An empty file title was specified."},{"code":400,"name":"GIF_CONTENT_TYPE_INVALID","comment":"GIF content-type invalid."},{"code":400,"name":"MESSAGE_EMPTY","comment":"The provided message is empty."},{"code":400,"name":"MESSAGE_TOO_LONG","comment":"The provided message is too long."},{"code":400,"name":"NEXT_OFFSET_INVALID","comment":"The specified offset is longer than 64 bytes."},{"code":400,"name":"PHOTO_CONTENT_TYPE_INVALID","comment":"Photo mime-type invalid."},{"code":400,"name":"PHOTO_CONTENT_URL_EMPTY","comment":"Photo URL invalid."},{"code":400,"name":"PHOTO_INVALID","comment":"Photo invalid."},{"code":400,"name":"PHOTO_THUMB_URL_EMPTY","comment":"Photo thumbnail URL is empty."},{"code":400,"name":"QUERY_ID_INVALID","comment":"The query ID is invalid."},{"code":400,"name":"REPLY_MARKUP_INVALID","comment":"The provided reply markup is invalid."},{"code":400,"name":"RESULTS_TOO_MUCH","comment":"Too many results were provided."},{"code":400,"name":"RESULT_ID_DUPLICATE","comment":"You provided a duplicate result ID."},{"code":400,"name":"RESULT_ID_INVALID","comment":"One of the specified result IDs is invalid."},{"code":400,"name":"RESULT_TYPE_INVALID","comment":"Result type invalid."},{"code":400,"name":"SEND_MESSAGE_MEDIA_INVALID","comment":"Invalid media provided."},{"code":400,"name":"SEND_MESSAGE_TYPE_INVALID","comment":"The message type is invalid."},{"code":400,"name":"START_PARAM_EMPTY","comment":"The start parameter is empty."},{"code":400,"name":"START_PARAM_INVALID","comment":"Start parameter invalid."},{"code":400,"name":"STICKER_DOCUMENT_INVALID","comment":"The specified sticker document is invalid."},{"code":400,"name":"SWITCH_PM_TEXT_EMPTY","comment":"The switch_pm.text field was empty."},{"code":400,"name":"SWITCH_WEBVIEW_URL_INVALID","comment":"The URL specified in switch_webview.url is invalid!"},{"code":400,"name":"URL_INVALID","comment":"Invalid URL provided."},{"code":403,"name":"USER_BOT_INVALID","comment":"User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."},{"code":400,"name":"VIDEO_TITLE_EMPTY","comment":"The specified video title is empty."},{"code":400,"name":"WEBDOCUMENT_INVALID","comment":"Invalid webdocument URL provided."},{"code":400,"name":"WEBDOCUMENT_MIME_INVALID","comment":"Invalid webdocument mime type provided."},{"code":400,"name":"WEBDOCUMENT_SIZE_TOO_BIG","comment":"Webdocument is too big!"},{"code":400,"name":"WEBDOCUMENT_URL_INVALID","comment":"The specified webdocument URL is invalid."}],"available":"bot"},{"kind":"method","name":"messages.sendInlineBotResult","type":"Updates","id":1052698730,"comment":"Send a result obtained using {@link messages.RawGetInlineBotResultsRequest}.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"silent","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Whether to send the message silently (no notification will be triggered on the other client)"},{"name":"background","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"Whether to send the message in background"},{"name":"clear_draft","type":"true","typeModifiers":{"predicate":"flags.7"},"comment":"Whether to clear the draft"},{"name":"hide_via","type":"true","typeModifiers":{"predicate":"flags.11"},"comment":"Whether to hide the via @botname in the resulting message (only for bot usernames encountered in the {@link RawConfig})"},{"name":"peer","type":"InputPeer","comment":"Destination"},{"name":"reply_to","type":"InputReplyTo","typeModifiers":{"predicate":"flags.0"},"comment":"If set, indicates that the message should be sent in reply to the specified message or story."},{"name":"random_id","type":"long","comment":"Random ID to avoid resending the same query"},{"name":"query_id","type":"long","comment":"Query ID from {@link messages.RawGetInlineBotResultsRequest}"},{"name":"id","type":"string","comment":"Result ID from {@link messages.RawGetInlineBotResultsRequest}"},{"name":"schedule_date","type":"int","typeModifiers":{"predicate":"flags.10"},"comment":"Scheduled message date for scheduled messages"},{"name":"send_as","type":"InputPeer","typeModifiers":{"predicate":"flags.13"},"comment":"Send this message as the specified peer"},{"name":"quick_reply_shortcut","type":"InputQuickReplyShortcut","typeModifiers":{"predicate":"flags.17"},"comment":"Add the message to the specified quick reply shortcut », instead."}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_GUEST_SEND_FORBIDDEN","comment":"You join the discussion group before commenting, see here » for more info."},{"code":400,"name":"CHAT_RESTRICTED","comment":"You can't send messages in this chat, you were restricted."},{"code":403,"name":"CHAT_SEND_AUDIOS_FORBIDDEN","comment":"You can't send audio messages in this chat."},{"code":403,"name":"CHAT_SEND_GAME_FORBIDDEN","comment":"You can't send a game to this chat."},{"code":403,"name":"CHAT_SEND_GIFS_FORBIDDEN","comment":"You can't send gifs in this chat."},{"code":403,"name":"CHAT_SEND_INLINE_FORBIDDEN","comment":"You can't send inline messages in this group."},{"code":403,"name":"CHAT_SEND_MEDIA_FORBIDDEN","comment":"You can't send media in this chat."},{"code":403,"name":"CHAT_SEND_PHOTOS_FORBIDDEN","comment":"You can't send photos in this chat."},{"code":403,"name":"CHAT_SEND_PLAIN_FORBIDDEN","comment":"You can't send non-media (text) messages in this chat."},{"code":403,"name":"CHAT_SEND_STICKERS_FORBIDDEN","comment":"You can't send stickers in this chat."},{"code":403,"name":"CHAT_SEND_VOICES_FORBIDDEN","comment":"You can't send voice recordings in this chat."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"ENTITY_BOUNDS_INVALID","comment":"A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length."},{"code":400,"name":"INLINE_RESULT_EXPIRED","comment":"The inline query expired."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MEDIA_EMPTY","comment":"The provided media object is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"QUERY_ID_EMPTY","comment":"The query ID is empty."},{"code":400,"name":"QUICK_REPLIES_TOO_MUCH","comment":"A maximum of appConfig.quick_replies_limit shortcuts may be created, the limit was reached."},{"code":500,"name":"RANDOM_ID_DUPLICATE","comment":"You provided a random ID that was already used."},{"code":400,"name":"REPLY_MESSAGES_TOO_MUCH","comment":"Each shortcut can contain a maximum of appConfig.quick_reply_messages_limit messages, the limit was reached."},{"code":400,"name":"RESULT_ID_EMPTY","comment":"Result ID empty."},{"code":400,"name":"RESULT_ID_INVALID","comment":"One of the specified result IDs is invalid."},{"code":400,"name":"SCHEDULE_DATE_TOO_LATE","comment":"You can't schedule a message this far in the future."},{"code":400,"name":"SCHEDULE_TOO_MUCH","comment":"There are too many scheduled messages."},{"code":500,"name":"SEND_MEDIA_INVALID","comment":"The specified media is invalid."},{"code":420,"name":"SLOWMODE_WAIT_%d","comment":"Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat."},{"code":400,"name":"TOPIC_DELETED","comment":"The specified topic was deleted."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."},{"code":400,"name":"VOICE_MESSAGES_FORBIDDEN","comment":"This user's privacy settings forbid you from sending voice messages."},{"code":400,"name":"WEBPAGE_CURL_FAILED","comment":"Failure while fetching the webpage with cURL."},{"code":400,"name":"WEBPAGE_MEDIA_EMPTY","comment":"Webpage media empty."},{"code":400,"name":"YOU_BLOCKED_USER","comment":"You blocked this user."}],"available":"user"},{"kind":"method","name":"messages.getMessageEditData","type":"messages.MessageEditData","typeModifiers":{"constructorId":649453030},"id":4255550774,"comment":"Find out if a media message's caption can be edited","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer where the media was sent"},{"name":"id","type":"int","comment":"ID of message"}],"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":403,"name":"MESSAGE_AUTHOR_REQUIRED","comment":"Message author required."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.editMessage","type":"Updates","id":3755032581,"comment":"Edit message","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"no_webpage","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Disable webpage preview"},{"name":"invert_media","type":"true","typeModifiers":{"predicate":"flags.16"},"comment":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom."},{"name":"peer","type":"InputPeer","comment":"Where was the message sent"},{"name":"id","type":"int","comment":"ID of the message to edit"},{"name":"message","type":"string","typeModifiers":{"predicate":"flags.11"},"comment":"New message"},{"name":"media","type":"InputMedia","typeModifiers":{"predicate":"flags.14"},"comment":"New attached media"},{"name":"reply_markup","type":"ReplyMarkup","typeModifiers":{"predicate":"flags.2"},"comment":"Reply markup for inline keyboards"},{"name":"entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.3","isVector":true},"comment":"Message entities for styled text"},{"name":"schedule_date","type":"int","typeModifiers":{"predicate":"flags.15"},"comment":"Scheduled message date for scheduled messages"},{"name":"quick_reply_shortcut_id","type":"int","typeModifiers":{"predicate":"flags.17"},"comment":"If specified, edits a quick reply shortcut message, instead »."}],"throws":[{"code":400,"name":"BOT_DOMAIN_INVALID","comment":"Bot domain invalid."},{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."},{"code":400,"name":"BUTTON_DATA_INVALID","comment":"The data of one or more of the buttons you provided is invalid."},{"code":400,"name":"BUTTON_TYPE_INVALID","comment":"The type of one or more of the buttons you provided is invalid."},{"code":400,"name":"BUTTON_URL_INVALID","comment":"Button URL invalid."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_FORWARDS_RESTRICTED","comment":"You can't forward messages from a protected chat."},{"code":403,"name":"CHAT_SEND_GIFS_FORBIDDEN","comment":"You can't send gifs in this chat."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"DOCUMENT_INVALID","comment":"The specified document is invalid."},{"code":400,"name":"ENTITIES_TOO_LONG","comment":"You provided too many styled message entities."},{"code":400,"name":"ENTITY_BOUNDS_INVALID","comment":"A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length."},{"code":400,"name":"FILE_PARTS_INVALID","comment":"The number of file parts is invalid."},{"code":400,"name":"IMAGE_PROCESS_FAILED","comment":"Failure while processing image."},{"code":403,"name":"INLINE_BOT_REQUIRED","comment":"Only the inline bot can edit message."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MEDIA_CAPTION_TOO_LONG","comment":"The caption is too long."},{"code":400,"name":"MEDIA_EMPTY","comment":"The provided media object is invalid."},{"code":400,"name":"MEDIA_GROUPED_INVALID","comment":"You tried to send media of different types in an album."},{"code":400,"name":"MEDIA_INVALID","comment":"Media invalid."},{"code":400,"name":"MEDIA_NEW_INVALID","comment":"The new media is invalid."},{"code":400,"name":"MEDIA_PREV_INVALID","comment":"Previous media invalid."},{"code":400,"name":"MEDIA_TTL_INVALID","comment":"The specified media TTL is invalid."},{"code":403,"name":"MESSAGE_AUTHOR_REQUIRED","comment":"Message author required."},{"code":400,"name":"MESSAGE_EDIT_TIME_EXPIRED","comment":"You can't edit this message anymore, too much time has passed since its creation."},{"code":400,"name":"MESSAGE_EMPTY","comment":"The provided message is empty."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"MESSAGE_NOT_MODIFIED","comment":"The provided message data is identical to the previous message data, the message wasn't modified."},{"code":400,"name":"MESSAGE_TOO_LONG","comment":"The provided message is too long."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":500,"name":"MSG_WAIT_FAILED","comment":"A waiting call returned an error."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"REPLY_MARKUP_INVALID","comment":"The provided reply markup is invalid."},{"code":400,"name":"REPLY_MARKUP_TOO_LONG","comment":"The specified reply_markup is too long."},{"code":400,"name":"SCHEDULE_DATE_INVALID","comment":"Invalid schedule date provided."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."},{"code":400,"name":"WEBPAGE_NOT_FOUND","comment":"A preview for the specified webpage url could not be generated."}],"available":"both"},{"kind":"method","name":"messages.editInlineBotMessage","type":"Bool","id":2203418042,"comment":"Edit an inline bot message","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"no_webpage","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Disable webpage preview"},{"name":"invert_media","type":"true","typeModifiers":{"predicate":"flags.16"},"comment":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom."},{"name":"id","type":"InputBotInlineMessageID","comment":"Sent inline message ID"},{"name":"message","type":"string","typeModifiers":{"predicate":"flags.11"},"comment":"Message"},{"name":"media","type":"InputMedia","typeModifiers":{"predicate":"flags.14"},"comment":"Media"},{"name":"reply_markup","type":"ReplyMarkup","typeModifiers":{"predicate":"flags.2"},"comment":"Reply markup for inline keyboards"},{"name":"entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.3","isVector":true},"comment":"Message entities for styled text"}],"throws":[{"code":400,"name":"BUTTON_DATA_INVALID","comment":"The data of one or more of the buttons you provided is invalid."},{"code":400,"name":"ENTITY_BOUNDS_INVALID","comment":"A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"MESSAGE_NOT_MODIFIED","comment":"The provided message data is identical to the previous message data, the message wasn't modified."}],"available":"both"},{"kind":"method","name":"messages.getBotCallbackAnswer","type":"messages.BotCallbackAnswer","typeModifiers":{"constructorId":911761060},"id":2470627847,"comment":"Press an inline callback button and get a callback answer from the bot","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"game","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether this is a \"play game\" button"},{"name":"peer","type":"InputPeer","comment":"Where was the inline keyboard sent"},{"name":"msg_id","type":"int","comment":"ID of the Message with the inline keyboard"},{"name":"data","type":"bytes","typeModifiers":{"predicate":"flags.0"},"comment":"Callback data"},{"name":"password","type":"InputCheckPasswordSRP","typeModifiers":{"predicate":"flags.2"},"comment":"For buttons {@link RawKeyboardButtonCallback}, the SRP payload generated using SRP."}],"throws":[{"code":400,"name":"BOT_RESPONSE_TIMEOUT","comment":"A timeout occurred while fetching data from the bot."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"DATA_INVALID","comment":"Encrypted data invalid."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"PASSWORD_MISSING","comment":"You must enable 2FA before executing this operation."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":-503,"name":"Timeout","comment":"Timeout while fetching data."}],"available":"user"},{"kind":"method","name":"messages.setBotCallbackAnswer","type":"Bool","id":3582923530,"comment":"Set the callback answer to a user button press (bots only)","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"alert","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether to show the message as a popup instead of a toast notification"},{"name":"query_id","type":"long","comment":"Query ID"},{"name":"message","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Popup to show"},{"name":"url","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"URL to open"},{"name":"cache_time","type":"int","comment":"Cache validity"}],"throws":[{"code":400,"name":"MESSAGE_TOO_LONG","comment":"The provided message is too long."},{"code":400,"name":"QUERY_ID_INVALID","comment":"The query ID is invalid."},{"code":400,"name":"URL_INVALID","comment":"Invalid URL provided."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},{"kind":"method","name":"messages.getPeerDialogs","type":"messages.PeerDialogs","typeModifiers":{"constructorId":863093588},"id":3832593661,"comment":"Get dialog info of specified peers","arguments":[{"name":"peers","type":"InputDialogPeer","typeModifiers":{"isVector":true},"comment":"Peers"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.saveDraft","type":"Bool","id":3547514318,"comment":"Save a message draft associated to a chat.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"no_webpage","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Disable generation of the webpage preview"},{"name":"invert_media","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom."},{"name":"reply_to","type":"InputReplyTo","typeModifiers":{"predicate":"flags.4"},"comment":"If set, indicates that the message should be sent in reply to the specified message or story."},{"name":"peer","type":"InputPeer","comment":"Destination of the message that should be sent"},{"name":"message","type":"string","comment":"The draft"},{"name":"entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.3","isVector":true},"comment":"Message entities for styled text"},{"name":"media","type":"InputMedia","typeModifiers":{"predicate":"flags.5"},"comment":"Attached media"},{"name":"effect","type":"long","typeModifiers":{"predicate":"flags.7"},"comment":"Specifies a message effect » to use for the message."}],"throws":[{"code":400,"name":"ENTITY_BOUNDS_INVALID","comment":"A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.getAllDrafts","type":"Updates","id":1782549861,"comment":"Return all message drafts.
\nReturns all the latest {@link RawUpdateDraftMessage} updates related to all chats with drafts.","arguments":[],"available":"user"},{"kind":"method","name":"messages.getFeaturedStickers","type":"messages.FeaturedStickers","id":1685588756,"comment":"Get featured stickers","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"messages.readFeaturedStickers","type":"Bool","id":1527873830,"comment":"Mark new featured stickers as read","arguments":[{"name":"id","type":"long","typeModifiers":{"isVector":true},"comment":"IDs of stickersets to mark as read"}],"available":"user"},{"kind":"method","name":"messages.getRecentStickers","type":"messages.RecentStickers","id":2645114939,"comment":"Get recent stickers","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"attached","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Get stickers recently attached to photo or video files"},{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"messages.saveRecentSticker","type":"Bool","id":958863608,"comment":"Add/remove sticker from recent stickers list","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"attached","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to add/remove stickers recently attached to photo or video files"},{"name":"id","type":"InputDocument","comment":"Sticker"},{"name":"unsave","type":"Bool","comment":"Whether to save or unsave the sticker"}],"throws":[{"code":400,"name":"STICKER_ID_INVALID","comment":"The provided sticker ID is invalid."}],"available":"user"},{"kind":"method","name":"messages.clearRecentStickers","type":"Bool","id":2308530221,"comment":"Clear recent stickers","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"attached","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Set this flag to clear the list of stickers recently attached to photo or video files"}],"available":"user"},{"kind":"method","name":"messages.getArchivedStickers","type":"messages.ArchivedStickers","typeModifiers":{"constructorId":1338747336},"id":1475442322,"comment":"Get all archived stickers","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"masks","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Get mask stickers"},{"name":"emojis","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Get custom emoji stickers"},{"name":"offset_id","type":"long","comment":"Offsets for pagination, for more info click here"},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"}],"available":"user"},{"kind":"method","name":"messages.getMaskStickers","type":"messages.AllStickers","id":1678738104,"comment":"Get installed mask stickers","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"messages.getAttachedStickers","type":"StickerSetCovered","typeModifiers":{"isVector":true},"id":3428542412,"comment":"Get stickers attached to a photo or video","arguments":[{"name":"media","type":"InputStickeredMedia","comment":"Stickered media"}],"throws":[{"code":400,"name":"MEDIA_EMPTY","comment":"The provided media object is invalid."}],"available":"user"},{"kind":"method","name":"messages.setGameScore","type":"Updates","id":2398678208,"comment":"Use this method to set the score of the specified user in a game sent as a normal message (bots only).","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"edit_message","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Set this flag if the game message should be automatically edited to include the current scoreboard"},{"name":"force","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Set this flag if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters"},{"name":"peer","type":"InputPeer","comment":"Unique identifier of target chat"},{"name":"id","type":"int","comment":"Identifier of the sent message"},{"name":"user_id","type":"InputUser","comment":"User identifier"},{"name":"score","type":"int","comment":"New score"}],"throws":[{"code":400,"name":"BOT_SCORE_NOT_MODIFIED","comment":"The score wasn't modified."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"SCORE_INVALID","comment":"The specified game score is invalid."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},{"kind":"method","name":"messages.setInlineGameScore","type":"Bool","id":363700068,"comment":"Use this method to set the score of the specified user in a game sent as an inline message (bots only).","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"edit_message","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Set this flag if the game message should be automatically edited to include the current scoreboard"},{"name":"force","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Set this flag if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters"},{"name":"id","type":"InputBotInlineMessageID","comment":"ID of the inline message"},{"name":"user_id","type":"InputUser","comment":"User identifier"},{"name":"score","type":"int","comment":"New score"}],"throws":[{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},{"kind":"method","name":"messages.getGameHighScores","type":"messages.HighScores","typeModifiers":{"constructorId":2587622809},"id":3894568093,"comment":"Get highscores of a game","arguments":[{"name":"peer","type":"InputPeer","comment":"Where was the game sent"},{"name":"id","type":"int","comment":"ID of message with game media attachment"},{"name":"user_id","type":"InputUser","comment":"Get high scores made by a certain user"}],"throws":[{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},{"kind":"method","name":"messages.getInlineGameHighScores","type":"messages.HighScores","typeModifiers":{"constructorId":2587622809},"id":258170395,"comment":"Get highscores of a game sent using an inline bot","arguments":[{"name":"id","type":"InputBotInlineMessageID","comment":"ID of inline message"},{"name":"user_id","type":"InputUser","comment":"Get high scores of a certain user"}],"throws":[{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},{"kind":"method","name":"messages.getCommonChats","type":"messages.Chats","id":3826032900,"comment":"Get chats in common with a user","arguments":[{"name":"user_id","type":"InputUser","comment":"User ID"},{"name":"max_id","type":"int53","comment":"Maximum ID of chat to return (see pagination)"},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"}],"throws":[{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"user"},{"kind":"method","name":"messages.getWebPage","type":"messages.WebPage","typeModifiers":{"constructorId":4250800829},"id":2375455395,"comment":"Get instant view page","arguments":[{"name":"url","type":"string","comment":"URL of IV page to fetch"},{"name":"hash","type":"int","comment":"Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the {@link RawWebPage}.hash field returned by a previous call to the method, or pass 0 if this is the first call or if the previous call did not return a {@link RawWebPage}."}],"throws":[{"code":400,"name":"WC_CONVERT_URL_INVALID","comment":"WC convert URL invalid."}],"available":"user"},{"kind":"method","name":"messages.toggleDialogPin","type":"Bool","id":2805064279,"comment":"Pin/unpin a dialog","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"pinned","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to pin or unpin the dialog"},{"name":"peer","type":"InputDialogPeer","comment":"The dialog to pin"}],"throws":[{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"PEER_HISTORY_EMPTY","comment":"You can't pin an empty chat with a user."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"PINNED_DIALOGS_TOO_MUCH","comment":"Too many pinned dialogs."}],"available":"user"},{"kind":"method","name":"messages.reorderPinnedDialogs","type":"Bool","id":991616823,"comment":"Reorder pinned dialogs","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"force","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, dialogs pinned server-side but not present in the order field will be unpinned."},{"name":"folder_id","type":"int","comment":"Peer folder ID, for more info click here"},{"name":"order","type":"InputDialogPeer","typeModifiers":{"isVector":true},"comment":"New dialog order"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.getPinnedDialogs","type":"messages.PeerDialogs","typeModifiers":{"constructorId":863093588},"id":3602468338,"comment":"Get pinned dialogs","arguments":[{"name":"folder_id","type":"int","comment":"Peer folder ID, for more info click here"}],"throws":[{"code":400,"name":"FOLDER_ID_INVALID","comment":"Invalid folder ID."}],"available":"user"},{"kind":"method","name":"messages.setBotShippingResults","type":"Bool","id":3858133754,"comment":"If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the bot will receive an {@link RawUpdateBotShippingQuery} update. Use this method to reply to shipping queries.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"query_id","type":"long","comment":"Unique identifier for the query to be answered"},{"name":"error","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable\"). Telegram will display this message to the user."},{"name":"shipping_options","type":"ShippingOption","typeModifiers":{"predicate":"flags.1","isVector":true},"comment":"A vector of available shipping options."}],"throws":[{"code":400,"name":"QUERY_ID_INVALID","comment":"The query ID is invalid."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},{"kind":"method","name":"messages.setBotPrecheckoutResults","type":"Bool","id":163765653,"comment":"Once the user has confirmed their payment and shipping details, the bot receives an {@link RawUpdateBotPrecheckoutQuery} update.
\nUse this method to respond to such pre-checkout queries.
\nNote: Telegram must receive an answer within 10 seconds after the pre-checkout query was sent.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"success","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Set this flag if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order, otherwise do not set it, and set the error field, instead"},{"name":"query_id","type":"long","comment":"Unique identifier for the query to be answered"},{"name":"error","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Required if the success isn't set. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. \"Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!\"). Telegram will display this message to the user."}],"throws":[{"code":400,"name":"ERROR_TEXT_EMPTY","comment":"The provided error message is empty."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},{"kind":"method","name":"messages.uploadMedia","type":"MessageMedia","id":345405816,"comment":"Upload a file and associate it to a chat (without actually sending it to the chat)","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"business_connection_id","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the media will be used only in the specified business connection », and not directly by the bot."},{"name":"peer","type":"InputPeer","comment":"The chat, can be {@link RawInputPeerEmpty} for bots and {@link RawInputPeerSelf} for users."},{"name":"media","type":"InputMedia","comment":"File uploaded in chunks as described in files »"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_RESTRICTED","comment":"You can't send messages in this chat, you were restricted."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"FILE_PARTS_INVALID","comment":"The number of file parts is invalid."},{"code":400,"name":"FILE_PART_LENGTH_INVALID","comment":"The length of a file part is invalid."},{"code":400,"name":"IMAGE_PROCESS_FAILED","comment":"Failure while processing image."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MEDIA_INVALID","comment":"Media invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"PHOTO_EXT_INVALID","comment":"The extension of the photo is invalid."},{"code":400,"name":"PHOTO_INVALID_DIMENSIONS","comment":"The photo dimensions are invalid."},{"code":400,"name":"PHOTO_SAVE_FILE_INVALID","comment":"Internal issues, try again later."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."},{"code":400,"name":"WEBPAGE_CURL_FAILED","comment":"Failure while fetching the webpage with cURL."}],"available":"both"},{"kind":"method","name":"messages.sendScreenshotNotification","type":"Updates","id":2705348631,"comment":"Notify the other user in a private chat that a screenshot of the chat was taken","arguments":[{"name":"peer","type":"InputPeer","comment":"Other user"},{"name":"reply_to","type":"InputReplyTo","comment":"Indicates the message that was screenshotted (the specified message ID can also be 0 to avoid indicating any specific message)."},{"name":"random_id","type":"long","comment":"Random ID to avoid message resending"}],"throws":[{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"REPLY_MESSAGE_ID_INVALID","comment":"The specified reply-to message ID is invalid."},{"code":400,"name":"STORY_ID_INVALID","comment":"The specified story ID is invalid."},{"code":400,"name":"YOU_BLOCKED_USER","comment":"You blocked this user."}],"available":"user"},{"kind":"method","name":"messages.getFavedStickers","type":"messages.FavedStickers","id":82946729,"comment":"Get faved stickers","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"messages.faveSticker","type":"Bool","id":3120547163,"comment":"Mark or unmark a sticker as favorite","arguments":[{"name":"id","type":"InputDocument","comment":"Sticker in question"},{"name":"unfave","type":"Bool","comment":"Whether to add or remove a sticker from favorites"}],"throws":[{"code":400,"name":"STICKER_ID_INVALID","comment":"The provided sticker ID is invalid."}],"available":"user"},{"kind":"method","name":"messages.getUnreadMentions","type":"messages.Messages","id":4043827088,"comment":"Get unread messages where we were mentioned","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"peer","type":"InputPeer","comment":"Peer where to look for mentions"},{"name":"top_msg_id","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"If set, considers only messages within the specified forum topic"},{"name":"offset_id","type":"int","comment":"Offsets for pagination, for more info click here"},{"name":"add_offset","type":"int","comment":"Offsets for pagination, for more info click here"},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"},{"name":"max_id","type":"int","comment":"Maximum message ID to return, see pagination"},{"name":"min_id","type":"int","comment":"Minimum message ID to return, see pagination"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.readMentions","type":"messages.AffectedHistory","typeModifiers":{"constructorId":3025955281},"id":921026381,"comment":"Mark mentions as read","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"peer","type":"InputPeer","comment":"Dialog"},{"name":"top_msg_id","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Mark as read only mentions within the specified forum topic"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.getRecentLocations","type":"messages.Messages","id":1881817312,"comment":"Get live location history of a certain user","arguments":[{"name":"peer","type":"InputPeer","comment":"User"},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"},{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here"}],"available":"user"},{"kind":"method","name":"messages.sendMultiMedia","type":"Updates","id":934757205,"comment":"Send an album or grouped media","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"silent","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Whether to send the album silently (no notification triggered)"},{"name":"background","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"Send in background?"},{"name":"clear_draft","type":"true","typeModifiers":{"predicate":"flags.7"},"comment":"Whether to clear drafts"},{"name":"noforwards","type":"true","typeModifiers":{"predicate":"flags.14"},"comment":"Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled"},{"name":"update_stickersets_order","type":"true","typeModifiers":{"predicate":"flags.15"},"comment":"Whether to move used stickersets to top, see here for more info on this flag »"},{"name":"invert_media","type":"true","typeModifiers":{"predicate":"flags.16"},"comment":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom."},{"name":"peer","type":"InputPeer","comment":"The destination chat"},{"name":"reply_to","type":"InputReplyTo","typeModifiers":{"predicate":"flags.0"},"comment":"If set, indicates that the message should be sent in reply to the specified message or story."},{"name":"multi_media","type":"InputSingleMedia","typeModifiers":{"isVector":true},"comment":"The medias to send: note that they must be separately uploaded using {@link messages.RawUploadMediaRequest} first, using raw inputMediaUploaded* constructors is not supported."},{"name":"schedule_date","type":"int","typeModifiers":{"predicate":"flags.10"},"comment":"Scheduled message date for scheduled messages"},{"name":"send_as","type":"InputPeer","typeModifiers":{"predicate":"flags.13"},"comment":"Send this message as the specified peer"},{"name":"quick_reply_shortcut","type":"InputQuickReplyShortcut","typeModifiers":{"predicate":"flags.17"},"comment":"Add the message to the specified quick reply shortcut », instead."},{"name":"effect","type":"long","typeModifiers":{"predicate":"flags.18"},"comment":"Specifies a message effect » to use for the message."}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_FORWARDS_RESTRICTED","comment":"You can't forward messages from a protected chat."},{"code":403,"name":"CHAT_SEND_MEDIA_FORBIDDEN","comment":"You can't send media in this chat."},{"code":403,"name":"CHAT_SEND_PHOTOS_FORBIDDEN","comment":"You can't send photos in this chat."},{"code":403,"name":"CHAT_SEND_VIDEOS_FORBIDDEN","comment":"You can't send videos in this chat."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"ENTITY_BOUNDS_INVALID","comment":"A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length."},{"code":400,"name":"FILE_REFERENCE_%d_EXPIRED","comment":"The file reference of the media file at index %d in the passed media array expired, it must be refreshed."},{"code":400,"name":"FILE_REFERENCE_%d_INVALID","comment":"The file reference of the media file at index %d in the passed media array is invalid."},{"code":400,"name":"MEDIA_CAPTION_TOO_LONG","comment":"The caption is too long."},{"code":400,"name":"MEDIA_EMPTY","comment":"The provided media object is invalid."},{"code":400,"name":"MEDIA_INVALID","comment":"Media invalid."},{"code":400,"name":"MULTI_MEDIA_TOO_LONG","comment":"Too many media files for album."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"QUICK_REPLIES_TOO_MUCH","comment":"A maximum of appConfig.quick_replies_limit shortcuts may be created, the limit was reached."},{"code":500,"name":"RANDOM_ID_DUPLICATE","comment":"You provided a random ID that was already used."},{"code":400,"name":"RANDOM_ID_EMPTY","comment":"Random ID empty."},{"code":400,"name":"REPLY_MESSAGES_TOO_MUCH","comment":"Each shortcut can contain a maximum of appConfig.quick_reply_messages_limit messages, the limit was reached."},{"code":400,"name":"SCHEDULE_DATE_TOO_LATE","comment":"You can't schedule a message this far in the future."},{"code":400,"name":"SCHEDULE_TOO_MUCH","comment":"There are too many scheduled messages."},{"code":400,"name":"SEND_AS_PEER_INVALID","comment":"You can't send messages as the specified peer."},{"code":420,"name":"SLOWMODE_WAIT_%d","comment":"Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat."},{"code":400,"name":"TOPIC_CLOSED","comment":"This topic was closed, you can't send messages to it anymore."},{"code":400,"name":"TOPIC_DELETED","comment":"The specified topic was deleted."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."}],"available":"both"},{"kind":"method","name":"messages.uploadEncryptedFile","type":"EncryptedFile","id":1347929239,"comment":"Upload encrypted file and associate it to a secret chat","arguments":[{"name":"peer","type":"InputEncryptedChat","comment":"The secret chat to associate the file to"},{"name":"file","type":"InputEncryptedFile","comment":"The file"}],"throws":[{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."}],"available":"user"},{"kind":"method","name":"messages.searchStickerSets","type":"messages.FoundStickerSets","id":896555914,"comment":"Search for stickersets","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"exclude_featured","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Exclude featured stickersets from results"},{"name":"q","type":"string","comment":"Query string"},{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"messages.getSplitRanges","type":"MessageRange","typeModifiers":{"isVector":true,"constructorId":182649427},"id":486505992,"comment":"Get message ranges for saving the user's chat history","arguments":[],"available":"user"},{"kind":"method","name":"messages.markDialogUnread","type":"Bool","id":3263617423,"comment":"Manually mark dialog as unread","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"unread","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Mark as unread/read"},{"name":"peer","type":"InputDialogPeer","comment":"Dialog"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.getDialogUnreadMarks","type":"DialogPeer","typeModifiers":{"isVector":true},"id":585256482,"comment":"Get dialogs manually marked as unread","arguments":[],"available":"user"},{"kind":"method","name":"messages.clearAllDrafts","type":"Bool","id":2119757468,"comment":"Clear all drafts.","arguments":[],"available":"user"},{"kind":"method","name":"messages.updatePinnedMessage","type":"Updates","id":3534419948,"comment":"Pin a message","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"silent","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Pin the message silently, without triggering a notification"},{"name":"unpin","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the message should unpinned or pinned"},{"name":"pm_oneside","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether the message should only be pinned on the local side of a one-to-one chat"},{"name":"peer","type":"InputPeer","comment":"The peer where to pin the message"},{"name":"id","type":"int","comment":"The message to pin or unpin"}],"throws":[{"code":400,"name":"BOT_ONESIDE_NOT_AVAIL","comment":"Bots can't pin messages in PM just for themselves."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"PIN_RESTRICTED","comment":"You can't pin messages."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."}],"available":"both"},{"kind":"method","name":"messages.sendVote","type":"Updates","id":283795844,"comment":"Vote in a {@link RawPoll}\n\nStarting from layer 159, the vote will be sent from the peer specified using {@link messages.RawSaveDefaultSendAsRequest}.","arguments":[{"name":"peer","type":"InputPeer","comment":"The chat where the poll was sent"},{"name":"msg_id","type":"int","comment":"The message ID of the poll"},{"name":"options","type":"bytes","typeModifiers":{"isVector":true},"comment":"The options that were chosen"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"MESSAGE_POLL_CLOSED","comment":"Poll closed."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"OPTIONS_TOO_MUCH","comment":"Too many options provided."},{"code":400,"name":"OPTION_INVALID","comment":"Invalid option selected."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"REVOTE_NOT_ALLOWED","comment":"You cannot change your vote."}],"available":"user"},{"kind":"method","name":"messages.getPollResults","type":"Updates","id":1941660731,"comment":"Get poll results","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer where the poll was found"},{"name":"msg_id","type":"int","comment":"Message ID of poll message"}],"throws":[{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.getOnlines","type":"ChatOnlines","typeModifiers":{"constructorId":4030849616},"id":1848369232,"comment":"Get count of online users in a chat","arguments":[{"name":"peer","type":"InputPeer","comment":"The chat"}],"throws":[{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.editChatAbout","type":"Bool","id":3740665751,"comment":"Edit the description of a group/supergroup/channel.","arguments":[{"name":"peer","type":"InputPeer","comment":"The group/supergroup/channel."},{"name":"about","type":"string","comment":"The new description"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ABOUT_NOT_MODIFIED","comment":"About text has not changed."},{"code":400,"name":"CHAT_ABOUT_TOO_LONG","comment":"Chat about too long."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"both"},{"kind":"method","name":"messages.editChatDefaultBannedRights","type":"Updates","id":2777049921,"comment":"Edit the default banned rights of a channel/supergroup/group.","arguments":[{"name":"peer","type":"InputPeer","comment":"The peer"},{"name":"banned_rights","type":"ChatBannedRights","comment":"The new global rights"}],"throws":[{"code":400,"name":"BANNED_RIGHTS_INVALID","comment":"You provided some invalid flags in the banned rights."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"UNTIL_DATE_INVALID","comment":"Invalid until date provided."}],"available":"both"},{"kind":"method","name":"messages.getEmojiKeywords","type":"EmojiKeywordsDifference","typeModifiers":{"constructorId":1556570557},"id":899735650,"comment":"Get localized emoji keywords ».","arguments":[{"name":"lang_code","type":"string","comment":"Language code"}],"available":"user"},{"kind":"method","name":"messages.getEmojiKeywordsDifference","type":"EmojiKeywordsDifference","typeModifiers":{"constructorId":1556570557},"id":352892591,"comment":"Get changed emoji keywords ».","arguments":[{"name":"lang_code","type":"string","comment":"Language code"},{"name":"from_version","type":"int","comment":"Previous stored emoji keyword list version"}],"available":"user"},{"kind":"method","name":"messages.getEmojiKeywordsLanguages","type":"EmojiLanguage","typeModifiers":{"isVector":true,"constructorId":3019592545},"id":1318675378,"comment":"Obtain a list of related languages that must be used when fetching emoji keyword lists ».\n\nUsually the method will return the passed language codes (if localized) + en + some language codes for similar languages (if applicable).","arguments":[{"name":"lang_codes","type":"string","typeModifiers":{"isVector":true},"comment":"The user's language codes"}],"available":"user"},{"kind":"method","name":"messages.getEmojiURL","type":"EmojiURL","typeModifiers":{"constructorId":2775937949},"id":3585149990,"comment":"Returns an HTTP URL which can be used to automatically log in into translation platform and suggest new emoji keywords ». The URL will be valid for 30 seconds after generation.","arguments":[{"name":"lang_code","type":"string","comment":"Language code for which the emoji keywords will be suggested"}],"available":"user"},{"kind":"method","name":"messages.getSearchCounters","type":"messages.SearchCounter","typeModifiers":{"isVector":true,"constructorId":3896830975},"id":465367808,"comment":"Get the number of results that would be found by a {@link messages.RawSearchRequest} call with the same parameters","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"peer","type":"InputPeer","comment":"Peer where to search"},{"name":"saved_peer_id","type":"InputPeer","typeModifiers":{"predicate":"flags.2"},"comment":"Search within the saved message dialog » with this ID."},{"name":"top_msg_id","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"If set, consider only messages within the specified forum topic"},{"name":"filters","type":"MessagesFilter","typeModifiers":{"isVector":true},"comment":"Search filters"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.requestUrlAuth","type":"UrlAuthResult","id":428848198,"comment":"Get more info about a Seamless Telegram Login authorization request, for more info click here »","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"peer","type":"InputPeer","typeModifiers":{"predicate":"flags.1"},"comment":"Peer where the message is located"},{"name":"msg_id","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"The message"},{"name":"button_id","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"The ID of the button with the authorization request"},{"name":"url","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"URL used for link URL authorization, click here for more info »"}],"available":"user"},{"kind":"method","name":"messages.acceptUrlAuth","type":"UrlAuthResult","id":2972479781,"comment":"Use this to accept a Seamless Telegram Login authorization request, for more info click here »","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"write_allowed","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Set this flag to allow the bot to send messages to you (if requested)"},{"name":"peer","type":"InputPeer","typeModifiers":{"predicate":"flags.1"},"comment":"The location of the message"},{"name":"msg_id","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Message ID of the message with the login button"},{"name":"button_id","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"ID of the login button"},{"name":"url","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"URL used for link URL authorization, click here for more info »"}],"available":"user"},{"kind":"method","name":"messages.hidePeerSettingsBar","type":"Bool","id":1336717624,"comment":"Should be called after the user hides the report spam/add as contact bar of a new chat, effectively prevents the user from executing the actions specified in the action bar ».","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.getScheduledHistory","type":"messages.Messages","id":4111889931,"comment":"Get scheduled messages","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer"},{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here.
To generate the hash, populate the ids array with the id, date and edit_date (in this order) of the previously returned messages (in order, i.e. ids = [id1, date1, edit_date1, id2, date2, edit_date2, ...])."}],"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.getScheduledMessages","type":"messages.Messages","id":3183150180,"comment":"Get scheduled messages","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer"},{"name":"id","type":"int","typeModifiers":{"isVector":true},"comment":"IDs of scheduled messages"}],"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.sendScheduledMessages","type":"Updates","id":3174597898,"comment":"Send scheduled messages right away","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer"},{"name":"id","type":"int","typeModifiers":{"isVector":true},"comment":"Scheduled message IDs"}],"throws":[{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":500,"name":"RANDOM_ID_DUPLICATE","comment":"You provided a random ID that was already used."}],"available":"user"},{"kind":"method","name":"messages.deleteScheduledMessages","type":"Updates","id":1504586518,"comment":"Delete scheduled messages","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer"},{"name":"id","type":"int","typeModifiers":{"isVector":true},"comment":"Scheduled message IDs"}],"throws":[{"code":403,"name":"MESSAGE_DELETE_FORBIDDEN","comment":"You can't delete one of the messages you tried to delete, most likely because it is a service message."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.getPollVotes","type":"messages.VotesList","typeModifiers":{"constructorId":1218005070},"id":3094231054,"comment":"Get poll results for non-anonymous polls","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"peer","type":"InputPeer","comment":"Chat where the poll was sent"},{"name":"id","type":"int","comment":"Message ID"},{"name":"option","type":"bytes","typeModifiers":{"predicate":"flags.0"},"comment":"Get only results for the specified poll option"},{"name":"offset","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Offset for results, taken from the next_offset field of {@link messages.RawVotesList}, initially an empty string.
Note: if no more results are available, the method call will return an empty next_offset; thus, avoid providing the next_offset returned in {@link messages.RawVotesList} if it is empty, to avoid an infinite loop."},{"name":"limit","type":"int","comment":"Number of results to return"}],"throws":[{"code":403,"name":"BROADCAST_FORBIDDEN","comment":"Channel poll voters and reactions cannot be fetched to prevent deanonymization."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":403,"name":"POLL_VOTE_REQUIRED","comment":"Cast a vote in the poll before calling this method."}],"available":"user"},{"kind":"method","name":"messages.toggleStickerSets","type":"Bool","id":3037016042,"comment":"Apply changes to multiple stickersets","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"uninstall","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Uninstall the specified stickersets"},{"name":"archive","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Archive the specified stickersets"},{"name":"unarchive","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Unarchive the specified stickersets"},{"name":"stickersets","type":"InputStickerSet","typeModifiers":{"isVector":true},"comment":"Stickersets to act upon"}],"available":"user"},{"kind":"method","name":"messages.getDialogFilters","type":"messages.DialogFilters","typeModifiers":{"constructorId":718878489},"id":4023684233,"comment":"Get folders","arguments":[],"available":"user"},{"kind":"method","name":"messages.getSuggestedDialogFilters","type":"DialogFilterSuggested","typeModifiers":{"isVector":true,"constructorId":2004110666},"id":2728186924,"comment":"Get suggested folders","arguments":[],"available":"user"},{"kind":"method","name":"messages.updateDialogFilter","type":"Bool","id":450142282,"comment":"Update folder","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"id","type":"int","comment":"Folder ID"},{"name":"filter","type":"DialogFilter","typeModifiers":{"predicate":"flags.0"},"comment":"Folder info"}],"throws":[{"code":400,"name":"CHATLIST_EXCLUDE_INVALID","comment":"The specified exclude_peers are invalid."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"FILTER_ID_INVALID","comment":"The specified filter ID is invalid."},{"code":400,"name":"FILTER_INCLUDE_EMPTY","comment":"The include_peers vector of the filter is empty."},{"code":400,"name":"FILTER_TITLE_EMPTY","comment":"The title field of the filter is empty."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.updateDialogFiltersOrder","type":"Bool","id":3311649252,"comment":"Reorder folders","arguments":[{"name":"order","type":"int","typeModifiers":{"isVector":true},"comment":"New folder order"}],"available":"user"},{"kind":"method","name":"messages.getOldFeaturedStickers","type":"messages.FeaturedStickers","id":2127598753,"comment":"Method for fetching previously featured stickers","arguments":[{"name":"offset","type":"int","comment":"Offset"},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"},{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"messages.getReplies","type":"messages.Messages","id":584962828,"comment":"Get messages in a reply thread","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer"},{"name":"msg_id","type":"int","comment":"Message ID"},{"name":"offset_id","type":"int","comment":"Offsets for pagination, for more info click here"},{"name":"offset_date","type":"int","comment":"Offsets for pagination, for more info click here"},{"name":"add_offset","type":"int","comment":"Offsets for pagination, for more info click here"},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"},{"name":"max_id","type":"int","comment":"If a positive value was transferred, the method will return only messages with ID smaller than max_id"},{"name":"min_id","type":"int","comment":"If a positive value was transferred, the method will return only messages with ID bigger than min_id"},{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"TOPIC_ID_INVALID","comment":"The specified topic ID is invalid."}],"available":"user"},{"kind":"method","name":"messages.getDiscussionMessage","type":"messages.DiscussionMessage","typeModifiers":{"constructorId":2788431746},"id":1147761405,"comment":"Get discussion message from the associated discussion group of a channel to show it on top of the comment section, without actually joining the group","arguments":[{"name":"peer","type":"InputPeer","comment":"Channel ID"},{"name":"msg_id","type":"int","comment":"Message ID"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"TOPIC_ID_INVALID","comment":"The specified topic ID is invalid."}],"available":"user"},{"kind":"method","name":"messages.readDiscussion","type":"Bool","id":4147227124,"comment":"Mark a thread as read","arguments":[{"name":"peer","type":"InputPeer","comment":"Group ID"},{"name":"msg_id","type":"int","comment":"ID of message that started the thread"},{"name":"read_max_id","type":"int","comment":"ID up to which thread messages were read"}],"throws":[{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.unpinAllMessages","type":"messages.AffectedHistory","typeModifiers":{"constructorId":3025955281},"id":3995253160,"comment":"Unpin all pinned messages","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"peer","type":"InputPeer","comment":"Chat where to unpin"},{"name":"top_msg_id","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Forum topic where to unpin"}],"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"both"},{"kind":"method","name":"messages.deleteChat","type":"Bool","id":1540419152,"comment":"Delete a chat","arguments":[{"name":"chat_id","type":"int53","comment":"Chat ID"}],"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.deletePhoneCallHistory","type":"messages.AffectedFoundMessages","typeModifiers":{"constructorId":4019011180},"id":4190888969,"comment":"Delete the entire phone call history.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"revoke","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to remove phone call history for participants as well"}],"available":"user"},{"kind":"method","name":"messages.checkHistoryImport","type":"messages.HistoryImportParsed","typeModifiers":{"constructorId":1578088377},"id":1140726259,"comment":"Obtains information about a chat export file, generated by a foreign chat app, click here for more info about imported chats ».","arguments":[{"name":"import_head","type":"string","comment":"Beginning of the message file; up to 100 lines."}],"throws":[{"code":400,"name":"IMPORT_FORMAT_UNRECOGNIZED","comment":"The specified chat export file was exported from an unsupported chat app."}],"available":"user"},{"kind":"method","name":"messages.initHistoryImport","type":"messages.HistoryImport","typeModifiers":{"constructorId":375566091},"id":873008187,"comment":"Import chat history from a foreign chat app into a specific Telegram chat, click here for more info about imported chats ».","arguments":[{"name":"peer","type":"InputPeer","comment":"The Telegram chat where the history should be imported."},{"name":"file","type":"InputFile","comment":"File with messages to import."},{"name":"media_count","type":"int","comment":"Number of media files associated with the chat that will be uploaded using {@link messages.RawUploadImportedMediaRequest}."}],"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"IMPORT_FILE_INVALID","comment":"The specified chat export file is invalid."},{"code":400,"name":"IMPORT_FORMAT_DATE_INVALID","comment":"The date specified in the import file is invalid."},{"code":400,"name":"IMPORT_FORMAT_UNRECOGNIZED","comment":"The specified chat export file was exported from an unsupported chat app."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":406,"name":"PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_%dMIN","comment":"Import for this chat is already in progress, wait %d minutes before starting a new one."}],"available":"user"},{"kind":"method","name":"messages.uploadImportedMedia","type":"MessageMedia","id":713433234,"comment":"Upload a media file associated with an imported chat, click here for more info ».","arguments":[{"name":"peer","type":"InputPeer","comment":"The Telegram chat where the media will be imported"},{"name":"import_id","type":"long","comment":"Identifier of a history import session, returned by {@link messages.RawInitHistoryImportRequest}"},{"name":"file_name","type":"string","comment":"File name"},{"name":"media","type":"InputMedia","comment":"Media metadata"}],"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"IMPORT_ID_INVALID","comment":"The specified import ID is invalid."}],"available":"user"},{"kind":"method","name":"messages.startHistoryImport","type":"Bool","id":3023958852,"comment":"Complete the history import process, importing all messages into the chat.
\nTo be called only after initializing the import with {@link messages.RawInitHistoryImportRequest} and uploading all files using {@link messages.RawUploadImportedMediaRequest}.","arguments":[{"name":"peer","type":"InputPeer","comment":"The Telegram chat where the messages should be imported, click here for more info »"},{"name":"import_id","type":"long","comment":"Identifier of a history import session, returned by {@link messages.RawInitHistoryImportRequest}."}],"throws":[{"code":400,"name":"IMPORT_ID_INVALID","comment":"The specified import ID is invalid."}],"available":"user"},{"kind":"method","name":"messages.getExportedChatInvites","type":"messages.ExportedChatInvites","typeModifiers":{"constructorId":3183881676},"id":2729812982,"comment":"Get info about the chat invites of a specific chat","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"revoked","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether to fetch revoked chat invites"},{"name":"peer","type":"InputPeer","comment":"Chat"},{"name":"admin_id","type":"InputUser","comment":"Whether to only fetch chat invites from this admin"},{"name":"offset_date","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"Offsets for pagination, for more info click here"},{"name":"offset_link","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"Offsets for pagination, for more info click here"},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"}],"throws":[{"code":400,"name":"ADMIN_ID_INVALID","comment":"The specified admin ID is invalid."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.getExportedChatInvite","type":"messages.ExportedChatInvite","id":1937010524,"comment":"Get info about a chat invite","arguments":[{"name":"peer","type":"InputPeer","comment":"Chat"},{"name":"link","type":"string","comment":"Invite link"}],"throws":[{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"INVITE_HASH_EXPIRED","comment":"The invite link has expired."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.editExportedChatInvite","type":"messages.ExportedChatInvite","id":3184144245,"comment":"Edit an exported chat invite","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"revoked","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether to revoke the chat invite"},{"name":"peer","type":"InputPeer","comment":"Chat"},{"name":"link","type":"string","comment":"Invite link"},{"name":"expire_date","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"New expiration date"},{"name":"usage_limit","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"Maximum number of users that can join using this link"},{"name":"request_needed","type":"Bool","typeModifiers":{"predicate":"flags.3"},"comment":"Whether admin confirmation is required before admitting each separate user into the chat"},{"name":"title","type":"string","typeModifiers":{"predicate":"flags.4"},"comment":"Description of the invite link, visible only to administrators"}],"throws":[{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_INVITE_PERMANENT","comment":"You can't set an expiration date on permanent invite links."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":403,"name":"EDIT_BOT_INVITE_FORBIDDEN","comment":"Normal users can't edit invites that were created by bots."},{"code":400,"name":"INVITE_HASH_EXPIRED","comment":"The invite link has expired."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USAGE_LIMIT_INVALID","comment":"The specified usage limit is invalid."}],"available":"both"},{"kind":"method","name":"messages.deleteRevokedExportedChatInvites","type":"Bool","id":1452833749,"comment":"Delete all revoked chat invites","arguments":[{"name":"peer","type":"InputPeer","comment":"Chat"},{"name":"admin_id","type":"InputUser","comment":"ID of the admin that originally generated the revoked chat invites"}],"throws":[{"code":400,"name":"ADMIN_ID_INVALID","comment":"The specified admin ID is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.deleteExportedChatInvite","type":"Bool","id":3563365419,"comment":"Delete a chat invite","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer"},{"name":"link","type":"string","comment":"Invite link"}],"throws":[{"code":400,"name":"INVITE_HASH_EXPIRED","comment":"The invite link has expired."},{"code":400,"name":"INVITE_REVOKED_MISSING","comment":"The specified invite link was already revoked or is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.getAdminsWithInvites","type":"messages.ChatAdminsWithInvites","typeModifiers":{"constructorId":3063640791},"id":958457583,"comment":"Get info about chat invites generated by admins.","arguments":[{"name":"peer","type":"InputPeer","comment":"Chat"}],"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.getChatInviteImporters","type":"messages.ChatInviteImporters","typeModifiers":{"constructorId":2176233482},"id":3741637966,"comment":"Get info about the users that joined the chat using a specific chat invite","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"requested","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, only returns info about users with pending join requests »"},{"name":"peer","type":"InputPeer","comment":"Chat"},{"name":"link","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Invite link"},{"name":"q","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"Search for a user in the pending join requests » list: only available when the requested flag is set, cannot be used together with a specific link."},{"name":"offset_date","type":"int","comment":"Offsets for pagination, for more info click here"},{"name":"offset_user","type":"InputUser","comment":"User ID for pagination: if set, offset_date must also be set."},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"INVITE_HASH_EXPIRED","comment":"The invite link has expired."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"SEARCH_WITH_LINK_NOT_SUPPORTED","comment":"You cannot provide a search query and an invite link at the same time."}],"available":"user"},{"kind":"method","name":"messages.setHistoryTTL","type":"Updates","id":3087949796,"comment":"Set maximum Time-To-Live of all messages in the specified chat","arguments":[{"name":"peer","type":"InputPeer","comment":"The dialog"},{"name":"period","type":"int","comment":"Automatically delete all messages sent in the chat after this many seconds"}],"throws":[{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"TTL_PERIOD_INVALID","comment":"The specified TTL period is invalid."}],"available":"user"},{"kind":"method","name":"messages.checkHistoryImportPeer","type":"messages.CheckedHistoryImportPeer","typeModifiers":{"constructorId":2723014423},"id":1573261059,"comment":"Check whether chat history exported from another chat app can be imported into a specific Telegram chat, click here for more info ».\n\nIf the check succeeds, and no RPC errors are returned, a messages.CheckedHistoryImportPeer constructor will be returned, with a confirmation text to be shown to the user, before actually initializing the import.","arguments":[{"name":"peer","type":"InputPeer","comment":"The chat where we want to import history »."}],"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USER_NOT_MUTUAL_CONTACT","comment":"The provided user is not a mutual contact."}],"available":"user"},{"kind":"method","name":"messages.setChatTheme","type":"Updates","id":3862683967,"comment":"Change the chat theme of a certain chat","arguments":[{"name":"peer","type":"InputPeer","comment":"Private chat where to change theme"},{"name":"emoticon","type":"string","comment":"Emoji, identifying a specific chat theme; a list of chat themes can be fetched using {@link account.RawGetChatThemesRequest}"}],"throws":[{"code":400,"name":"EMOJI_INVALID","comment":"The specified theme emoji is valid."},{"code":400,"name":"EMOJI_NOT_MODIFIED","comment":"The theme wasn't changed."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.getMessageReadParticipants","type":"ReadParticipantDate","typeModifiers":{"isVector":true,"constructorId":1246753138},"id":834782287,"comment":"Get which users read a specific message: only available for groups and supergroups with less than chat_read_mark_size_threshold members, read receipts will be stored for chat_read_mark_expire_period seconds after the message was sent, see client configuration for more info ».","arguments":[{"name":"peer","type":"InputPeer","comment":"Dialog"},{"name":"msg_id","type":"int","comment":"Message ID"}],"throws":[{"code":400,"name":"CHAT_TOO_BIG","comment":"This method is not available for groups with more than chat_read_mark_size_threshold members, see client configuration »."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"MSG_TOO_OLD","comment":"chat_read_mark_expire_period seconds have passed since the message was sent, read receipts were deleted."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.getSearchResultsCalendar","type":"messages.SearchResultsCalendar","typeModifiers":{"constructorId":343859772},"id":1789130429,"comment":"Returns information about the next messages of the specified type in the chat split by days.\n\nReturns the results in reverse chronological order.
\nCan return partial results for the last returned day.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"peer","type":"InputPeer","comment":"Peer where to search"},{"name":"saved_peer_id","type":"InputPeer","typeModifiers":{"predicate":"flags.2"},"comment":"Search within the saved message dialog » with this ID."},{"name":"filter","type":"MessagesFilter","comment":"Message filter, {@link RawInputMessagesFilterEmpty}, {@link RawInputMessagesFilterMyMentions} filters are not supported by this method."},{"name":"offset_id","type":"int","comment":"Offsets for pagination, for more info click here"},{"name":"offset_date","type":"int","comment":"Offsets for pagination, for more info click here"}],"throws":[{"code":400,"name":"FILTER_NOT_SUPPORTED","comment":"The specified filter cannot be used in this context."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.getSearchResultsPositions","type":"messages.SearchResultsPositions","typeModifiers":{"constructorId":1404185519},"id":2625580816,"comment":"Returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation.\n\nReturns the results in reverse chronological order (i.e., in order of decreasing message_id).","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"peer","type":"InputPeer","comment":"Peer where to search"},{"name":"saved_peer_id","type":"InputPeer","typeModifiers":{"predicate":"flags.2"},"comment":"Search within the saved message dialog » with this ID."},{"name":"filter","type":"MessagesFilter","comment":"Message filter, {@link RawInputMessagesFilterEmpty}, {@link RawInputMessagesFilterMyMentions} filters are not supported by this method."},{"name":"offset_id","type":"int","comment":"Offsets for pagination, for more info click here"},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.hideChatJoinRequest","type":"Updates","id":2145904661,"comment":"Dismiss or approve a chat join request related to a specific chat or channel.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"approved","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to dismiss or approve the chat join request »"},{"name":"peer","type":"InputPeer","comment":"The chat or channel"},{"name":"user_id","type":"InputUser","comment":"The user whose join request » should be dismissed or approved"}],"throws":[{"code":400,"name":"CHANNELS_TOO_MUCH","comment":"You have joined too many channels/supergroups."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"HIDE_REQUESTER_MISSING","comment":"The join request was missing or was already handled."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USER_ALREADY_PARTICIPANT","comment":"The user is already in the group."},{"code":403,"name":"USER_CHANNELS_TOO_MUCH","comment":"One of the users you tried to add is already in too many channels/supergroups."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"both"},{"kind":"method","name":"messages.hideAllChatJoinRequests","type":"Updates","id":3766875370,"comment":"Dismiss or approve all join requests related to a specific chat or channel.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"approved","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to dismiss or approve all chat join requests »"},{"name":"peer","type":"InputPeer","comment":"The chat or channel"},{"name":"link","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Only dismiss or approve join requests » initiated using this invite link"}],"throws":[{"code":400,"name":"CHANNELS_TOO_MUCH","comment":"You have joined too many channels/supergroups."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"HIDE_REQUESTER_MISSING","comment":"The join request was missing or was already handled."},{"code":400,"name":"INVITE_HASH_EXPIRED","comment":"The invite link has expired."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USER_CHANNELS_TOO_MUCH","comment":"One of the users you tried to add is already in too many channels/supergroups."}],"available":"user"},{"kind":"method","name":"messages.toggleNoForwards","type":"Updates","id":2971578274,"comment":"Enable or disable content protection on a channel or chat","arguments":[{"name":"peer","type":"InputPeer","comment":"The chat or channel"},{"name":"enabled","type":"Bool","comment":"Enable or disable content protection"}],"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.saveDefaultSendAs","type":"Bool","id":3439189910,"comment":"Change the default peer that should be used when sending messages, reactions, poll votes to a specific group","arguments":[{"name":"peer","type":"InputPeer","comment":"Group"},{"name":"send_as","type":"InputPeer","comment":"The default peer that should be used when sending messages to the group"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"SEND_AS_PEER_INVALID","comment":"You can't send messages as the specified peer."}],"available":"user"},{"kind":"method","name":"messages.sendReaction","type":"Updates","id":3540875476,"comment":"React to message.\n\nStarting from layer 159, the reaction will be sent from the peer specified using {@link messages.RawSaveDefaultSendAsRequest}.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"big","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether a bigger and longer reaction should be shown"},{"name":"add_to_recent","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether to add this reaction to the recent reactions list »."},{"name":"peer","type":"InputPeer","comment":"Peer"},{"name":"msg_id","type":"int","comment":"Message ID to react to"},{"name":"reaction","type":"Reaction","typeModifiers":{"predicate":"flags.0","isVector":true},"comment":"A list of reactions"}],"throws":[{"code":403,"name":"ANONYMOUS_REACTIONS_DISABLED","comment":"Sorry, anonymous administrators cannot leave reactions or participate in polls."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"CUSTOM_REACTIONS_TOO_MANY","comment":"Too many custom reactions were specified."},{"code":400,"name":"DOCUMENT_INVALID","comment":"The specified document is invalid."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"MESSAGE_NOT_MODIFIED","comment":"The provided message data is identical to the previous message data, the message wasn't modified."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."},{"code":400,"name":"REACTIONS_TOO_MANY","comment":"The message already has exactly reactions_uniq_max reaction emojis, you can't react with a new emoji, see the docs for more info »."},{"code":400,"name":"REACTION_EMPTY","comment":"Empty reaction provided."},{"code":400,"name":"REACTION_INVALID","comment":"The specified reaction is invalid."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."}],"available":"user"},{"kind":"method","name":"messages.getMessagesReactions","type":"Updates","id":2344259814,"comment":"Get message reactions »","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer"},{"name":"id","type":"int","typeModifiers":{"isVector":true},"comment":"Message IDs"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."}],"available":"user"},{"kind":"method","name":"messages.getMessageReactionsList","type":"messages.MessageReactionsList","typeModifiers":{"constructorId":834488621},"id":1176190792,"comment":"Get message reaction list, along with the sender of each reaction.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"peer","type":"InputPeer","comment":"Peer"},{"name":"id","type":"int","comment":"Message ID"},{"name":"reaction","type":"Reaction","typeModifiers":{"predicate":"flags.0"},"comment":"Get only reactions of this type"},{"name":"offset","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Offset for pagination (taken from the next_offset field of the returned messages.MessageReactionsList); empty in the first request."},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"}],"throws":[{"code":403,"name":"BROADCAST_FORBIDDEN","comment":"Channel poll voters and reactions cannot be fetched to prevent deanonymization."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."}],"available":"user"},{"kind":"method","name":"messages.setChatAvailableReactions","type":"Updates","id":1511328724,"comment":"Change the set of message reactions » that can be used in a certain group, supergroup or channel","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"peer","type":"InputPeer","comment":"Group where to apply changes"},{"name":"available_reactions","type":"ChatReactions","comment":"Allowed reaction emojis"},{"name":"reactions_limit","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"This flag may be used to impose a custom limit of unique reactions (i.e. a customizable version of appConfig.reactions_uniq_max); this field and the other info set by the method will then be available to users in {@link RawChannelFull} and {@link RawChatFull}."}],"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.getAvailableReactions","type":"messages.AvailableReactions","id":417243308,"comment":"Obtain available message reactions »","arguments":[{"name":"hash","type":"int","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"messages.setDefaultReaction","type":"Bool","id":1330094102,"comment":"Change default emoji reaction to use in the quick reaction menu: the value is synced across devices and can be fetched using {@link help.RawGetConfigRequest}.","arguments":[{"name":"reaction","type":"Reaction","comment":"New emoji reaction"}],"throws":[{"code":400,"name":"REACTION_INVALID","comment":"The specified reaction is invalid."}],"available":"user"},{"kind":"method","name":"messages.translateText","type":"messages.TranslatedText","typeModifiers":{"constructorId":870003448},"id":1662529584,"comment":"Translate a given text.\n\nStyled text entities will only be preserved for Telegram Premium users.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"peer","type":"InputPeer","typeModifiers":{"predicate":"flags.0"},"comment":"If the text is a chat message, the peer ID"},{"name":"id","type":"int","typeModifiers":{"predicate":"flags.0","isVector":true},"comment":"A list of message IDs to translate"},{"name":"text","type":"TextWithEntities","typeModifiers":{"predicate":"flags.1","isVector":true},"comment":"A list of styled messages to translate"},{"name":"to_lang","type":"string","comment":"Two-letter ISO 639-1 language code of the language to which the message is translated"}],"throws":[{"code":400,"name":"INPUT_TEXT_EMPTY","comment":"The specified text is empty."},{"code":400,"name":"INPUT_TEXT_TOO_LONG","comment":"The specified text is too long."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"TO_LANG_INVALID","comment":"The specified destination language is invalid."},{"code":400,"name":"TRANSLATE_REQ_QUOTA_EXCEEDED","comment":"Translation is currently unavailable due to a temporary server-side lack of resources."}],"available":"user"},{"kind":"method","name":"messages.getUnreadReactions","type":"messages.Messages","id":841173339,"comment":"Get unread reactions to messages you sent","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"peer","type":"InputPeer","comment":"Peer"},{"name":"top_msg_id","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"If set, considers only reactions to messages within the specified forum topic"},{"name":"offset_id","type":"int","comment":"Offsets for pagination, for more info click here"},{"name":"add_offset","type":"int","comment":"Offsets for pagination, for more info click here"},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"},{"name":"max_id","type":"int","comment":"Only return reactions for messages up until this message ID"},{"name":"min_id","type":"int","comment":"Only return reactions for messages starting from this message ID"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.readReactions","type":"messages.AffectedHistory","typeModifiers":{"constructorId":3025955281},"id":1420459918,"comment":"Mark message reactions » as read","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"peer","type":"InputPeer","comment":"Peer"},{"name":"top_msg_id","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"Mark as read only reactions to messages within the specified forum topic"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.searchSentMedia","type":"messages.Messages","id":276705696,"comment":"View and search recently sent media.
\nThis method does not support pagination.","arguments":[{"name":"q","type":"string","comment":"Optional search query"},{"name":"filter","type":"MessagesFilter","comment":"Message filter"},{"name":"limit","type":"int","comment":"Maximum number of results to return (max 100)."}],"throws":[{"code":400,"name":"FILTER_NOT_SUPPORTED","comment":"The specified filter cannot be used in this context."}],"available":"user"},{"kind":"method","name":"messages.getAttachMenuBots","type":"AttachMenuBots","id":385663691,"comment":"Returns installed attachment menu bot mini apps »","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"messages.getAttachMenuBot","type":"AttachMenuBotsBot","typeModifiers":{"constructorId":2478794367},"id":1998676370,"comment":"Returns attachment menu entry for a bot mini app that can be launched from the attachment menu »","arguments":[{"name":"bot","type":"InputUser","comment":"Bot ID"}],"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."}],"available":"user"},{"kind":"method","name":"messages.toggleBotInAttachMenu","type":"Bool","id":1777704297,"comment":"Enable or disable web bot attachment menu »","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"write_allowed","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the user authorizes the bot to write messages to them, if requested by {@link RawAttachMenuBot}.request_write_access"},{"name":"bot","type":"InputUser","comment":"Bot ID"},{"name":"enabled","type":"Bool","comment":"Toggle"}],"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."}],"available":"user"},{"kind":"method","name":"messages.requestWebView","type":"WebViewResult","typeModifiers":{"constructorId":1294139288},"id":647873217,"comment":"Open a bot mini app, sending over user information after user confirmation.\n\nAfter calling this method, until the user closes the webview, {@link messages.RawProlongWebViewRequest} must be called every 60 seconds.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"from_bot_menu","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"Whether the webview was opened by clicking on the bot's menu button »."},{"name":"silent","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Whether the inline message that will be sent by the bot on behalf of the user once the web app interaction is {@link messages.RawSendWebViewResultMessageRequest} should be sent silently (no notifications for the receivers)."},{"name":"compact","type":"true","typeModifiers":{"predicate":"flags.7"},"comment":"If set, requests to open the mini app in compact mode (as opposed to fullview mode). Must be set if the mode parameter of the attachment menu deep link is equal to compact."},{"name":"peer","type":"InputPeer","comment":"Dialog where the web app is being opened, and where the resulting message will be sent (see the docs for more info »)."},{"name":"bot","type":"InputUser","comment":"Bot that owns the web app"},{"name":"url","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Web app URL"},{"name":"start_param","type":"string","typeModifiers":{"predicate":"flags.3"},"comment":"If the web app was opened from the attachment menu using a attachment menu deep link, start_param should contain the data from the startattach parameter."},{"name":"theme_params","type":"DataJSON","typeModifiers":{"predicate":"flags.2"},"comment":"Theme parameters »"},{"name":"platform","type":"string","comment":"Short name of the application; 0-64 English letters, digits, and underscores"},{"name":"reply_to","type":"InputReplyTo","typeModifiers":{"predicate":"flags.0"},"comment":"If set, indicates that the inline message that will be sent by the bot on behalf of the user once the web app interaction is {@link messages.RawSendWebViewResultMessageRequest} should be sent in reply to the specified message or story."},{"name":"send_as","type":"InputPeer","typeModifiers":{"predicate":"flags.13"},"comment":"Open the web app as the specified peer, sending the resulting the message as the specified peer."}],"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."},{"code":400,"name":"BOT_WEBVIEW_DISABLED","comment":"A webview cannot be opened in the specified conditions: emitted for example if from_bot_menu or url are set and peer is not the chat with the bot."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":403,"name":"PRIVACY_PREMIUM_REQUIRED","comment":"You need a Telegram Premium subscription to send a message to this user."},{"code":400,"name":"SEND_AS_PEER_INVALID","comment":"You can't send messages as the specified peer."},{"code":400,"name":"YOU_BLOCKED_USER","comment":"You blocked this user."}],"available":"user"},{"kind":"method","name":"messages.prolongWebView","type":"Bool","id":2966952579,"comment":"Indicate to the server (from the user side) that the user is still using a web app.\n\nIf the method returns a QUERY_ID_INVALID error, the webview must be closed.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"silent","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Whether the inline message that will be sent by the bot on behalf of the user once the web app interaction is {@link messages.RawSendWebViewResultMessageRequest} should be sent silently (no notifications for the receivers)."},{"name":"peer","type":"InputPeer","comment":"Dialog where the web app was opened."},{"name":"bot","type":"InputUser","comment":"Bot that owns the web app"},{"name":"query_id","type":"long","comment":"Web app interaction ID obtained from {@link messages.RawRequestWebViewRequest}"},{"name":"reply_to","type":"InputReplyTo","typeModifiers":{"predicate":"flags.0"},"comment":"If set, indicates that the inline message that will be sent by the bot on behalf of the user once the web app interaction is {@link messages.RawSendWebViewResultMessageRequest} should be sent in reply to the specified message or story."},{"name":"send_as","type":"InputPeer","typeModifiers":{"predicate":"flags.13"},"comment":"Open the web app as the specified peer"}],"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."}],"available":"user"},{"kind":"method","name":"messages.requestSimpleWebView","type":"WebViewResult","typeModifiers":{"constructorId":1294139288},"id":1094336115,"comment":"Open a bot mini app.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"from_switch_webview","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the webapp was opened by clicking on the switch_webview button shown on top of the inline results list returned by {@link messages.RawGetInlineBotResultsRequest}."},{"name":"from_side_menu","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Set this flag if opening the Mini App from the installed side menu entry »."},{"name":"compact","type":"true","typeModifiers":{"predicate":"flags.7"},"comment":"Deprecated."},{"name":"bot","type":"InputUser","comment":"Bot that owns the mini app"},{"name":"url","type":"string","typeModifiers":{"predicate":"flags.3"},"comment":"Web app URL, if opening from a keyboard button or inline result"},{"name":"start_param","type":"string","typeModifiers":{"predicate":"flags.4"},"comment":"Deprecated."},{"name":"theme_params","type":"DataJSON","typeModifiers":{"predicate":"flags.0"},"comment":"Theme parameters »"},{"name":"platform","type":"string","comment":"Short name of the application; 0-64 English letters, digits, and underscores"}],"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."},{"code":400,"name":"URL_INVALID","comment":"Invalid URL provided."}],"available":"user"},{"kind":"method","name":"messages.sendWebViewResultMessage","type":"WebViewMessageSent","typeModifiers":{"constructorId":211046684},"id":172168437,"comment":"Terminate webview interaction started with {@link messages.RawRequestWebViewRequest}, sending the specified message to the chat on behalf of the user.","arguments":[{"name":"bot_query_id","type":"string","comment":"Webview interaction ID obtained from {@link messages.RawRequestWebViewRequest}"},{"name":"result","type":"InputBotInlineResult","comment":"Message to send"}],"throws":[{"code":400,"name":"QUERY_ID_INVALID","comment":"The query ID is invalid."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},{"kind":"method","name":"messages.sendWebViewData","type":"Updates","id":3691135688,"comment":"Used by the user to relay data from an opened reply keyboard bot mini app to the bot that owns it.","arguments":[{"name":"bot","type":"InputUser","comment":"Bot that owns the web app"},{"name":"random_id","type":"long","comment":"Unique client message ID to prevent duplicate sending of the same event"},{"name":"button_text","type":"string","comment":"Text of the {@link RawKeyboardButtonSimpleWebView} that was pressed to open the web app."},{"name":"data","type":"string","comment":"Data to relay to the bot, obtained from a web_app_data_send JS event."}],"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."}],"available":"user"},{"kind":"method","name":"messages.transcribeAudio","type":"messages.TranscribedAudio","typeModifiers":{"constructorId":3485063511},"id":647928393,"comment":"Transcribe voice message","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer ID where the voice message was sent"},{"name":"msg_id","type":"int","comment":"Voice message ID"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."},{"code":400,"name":"TRANSCRIPTION_FAILED","comment":"Audio transcription failed."}],"available":"user"},{"kind":"method","name":"messages.rateTranscribedAudio","type":"Bool","id":2132608815,"comment":"Rate transcribed voice message","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer where the voice message was sent"},{"name":"msg_id","type":"int","comment":"Message ID"},{"name":"transcription_id","type":"long","comment":"Transcription ID"},{"name":"good","type":"Bool","comment":"Whether the transcription was correct"}],"available":"user"},{"kind":"method","name":"messages.getCustomEmojiDocuments","type":"Document","typeModifiers":{"isVector":true},"id":3651866452,"comment":"Fetch custom emoji stickers ».\n\nReturns a list of {@link RawDocument} with the animated custom emoji in TGS format, and a {@link RawDocumentAttributeCustomEmoji} attribute with the original emoji and info about the emoji stickerset this custom emoji belongs to.","arguments":[{"name":"document_id","type":"long","typeModifiers":{"isVector":true},"comment":"Custom emoji IDs from a {@link RawMessageEntityCustomEmoji}."}],"available":"both"},{"kind":"method","name":"messages.getEmojiStickers","type":"messages.AllStickers","id":4227637647,"comment":"Gets the list of currently installed custom emoji stickersets.","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"messages.getFeaturedEmojiStickers","type":"messages.FeaturedStickers","id":248473398,"comment":"Gets featured custom emoji stickersets.","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"messages.reportReaction","type":"Bool","id":1063567478,"comment":"Report a message reaction","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer where the message was sent"},{"name":"id","type":"int","comment":"Message ID"},{"name":"reaction_peer","type":"InputPeer","comment":"Peer that sent the reaction"}],"throws":[{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"user"},{"kind":"method","name":"messages.getTopReactions","type":"messages.Reactions","id":3145803194,"comment":"Got popular message reactions","arguments":[{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"},{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"messages.getRecentReactions","type":"messages.Reactions","id":960896434,"comment":"Get recently used message reactions","arguments":[{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"},{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"messages.clearRecentReactions","type":"Bool","id":2650730420,"comment":"Clear recently used message reactions","arguments":[],"available":"user"},{"kind":"method","name":"messages.getExtendedMedia","type":"Updates","id":2230847508,"comment":"Fetch updated information about paid media, see here » for the full flow.\n\nThis method will return an array of {@link RawUpdateMessageExtendedMedia} updates, only for messages containing already bought paid media.
\nNo information will be returned for messages containing not yet bought paid media.","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer with visible paid media messages."},{"name":"id","type":"int","typeModifiers":{"isVector":true},"comment":"IDs of currently visible messages containing paid media."}],"available":"user"},{"kind":"method","name":"messages.setDefaultHistoryTTL","type":"Bool","id":2662667333,"comment":"Changes the default value of the Time-To-Live setting, applied to all new chats.","arguments":[{"name":"period","type":"int","comment":"The new default Time-To-Live of all messages sent in new chats."}],"throws":[{"code":400,"name":"TTL_PERIOD_INVALID","comment":"The specified TTL period is invalid."}],"available":"user"},{"kind":"method","name":"messages.getDefaultHistoryTTL","type":"DefaultHistoryTTL","typeModifiers":{"constructorId":1135897376},"id":1703637384,"comment":"Gets the default value of the Time-To-Live setting, applied to all new chats.","arguments":[],"available":"user"},{"kind":"method","name":"messages.sendBotRequestedPeer","type":"Updates","id":2444415072,"comment":"Send one or more chosen peers, as requested by a {@link RawKeyboardButtonRequestPeer} button.","arguments":[{"name":"peer","type":"InputPeer","comment":"The bot that sent the {@link RawKeyboardButtonRequestPeer} button."},{"name":"msg_id","type":"int","comment":"ID of the message that contained the reply keyboard with the {@link RawKeyboardButtonRequestPeer} button."},{"name":"button_id","type":"int","comment":"The button_id field from the {@link RawKeyboardButtonRequestPeer} constructor."},{"name":"requested_peers","type":"InputPeer","typeModifiers":{"isVector":true},"comment":"The chosen peers."}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.getEmojiGroups","type":"messages.EmojiGroups","id":1955122779,"comment":"Represents a list of emoji categories.","arguments":[{"name":"hash","type":"int","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"messages.getEmojiStatusGroups","type":"messages.EmojiGroups","id":785209037,"comment":"Represents a list of emoji categories, to be used when selecting custom emojis to set as custom emoji status.","arguments":[{"name":"hash","type":"int","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"messages.getEmojiProfilePhotoGroups","type":"messages.EmojiGroups","id":564480243,"comment":"Represents a list of emoji categories, to be used when selecting custom emojis to set as profile picture.","arguments":[{"name":"hash","type":"int","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"messages.searchCustomEmoji","type":"EmojiList","id":739360983,"comment":"Look for custom emojis associated to a UTF8 emoji","arguments":[{"name":"emoticon","type":"string","comment":"The emoji"},{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"throws":[{"code":400,"name":"EMOTICON_EMPTY","comment":"The emoji is empty."}],"available":"user"},{"kind":"method","name":"messages.togglePeerTranslations","type":"Bool","id":3833378169,"comment":"Show or hide the real-time chat translation popup for a certain chat","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"disabled","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to disable or enable the real-time chat translation popup"},{"name":"peer","type":"InputPeer","comment":"The peer"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.getBotApp","type":"messages.BotApp","typeModifiers":{"constructorId":3947933173},"id":889046467,"comment":"Obtain information about a direct link Mini App","arguments":[{"name":"app","type":"InputBotApp","comment":"Bot app information obtained from a Direct Mini App deep link »."},{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here"}],"throws":[{"code":400,"name":"BOT_APP_BOT_INVALID","comment":"The bot_id passed in the inputBotAppShortName constructor is invalid."},{"code":400,"name":"BOT_APP_INVALID","comment":"The specified bot app is invalid."},{"code":400,"name":"BOT_APP_SHORTNAME_INVALID","comment":"The specified bot app short name is invalid."}],"available":"user"},{"kind":"method","name":"messages.requestAppWebView","type":"WebViewResult","typeModifiers":{"constructorId":1294139288},"id":1398901710,"comment":"Open a bot mini app from a direct Mini App deep link, sending over user information after user confirmation.\n\nAfter calling this method, until the user closes the webview, {@link messages.RawProlongWebViewRequest} must be called every 60 seconds.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"write_allowed","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Set this flag if the bot is asking permission to send messages to the user as specified in the direct Mini App deep link docs, and the user agreed."},{"name":"compact","type":"true","typeModifiers":{"predicate":"flags.7"},"comment":"If set, requests to open the mini app in compact mode (as opposed to fullview mode). Must be set if the mode parameter of the direct Mini App deep link is equal to compact."},{"name":"peer","type":"InputPeer","comment":"If the client has clicked on the link in a Telegram chat, pass the chat's peer information; otherwise pass the bot's peer information, instead."},{"name":"app","type":"InputBotApp","comment":"The app obtained by invoking {@link messages.RawGetBotAppRequest} as specified in the direct Mini App deep link docs."},{"name":"start_param","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"If the startapp query string parameter is present in the direct Mini App deep link, pass it to start_param."},{"name":"theme_params","type":"DataJSON","typeModifiers":{"predicate":"flags.2"},"comment":"Theme parameters »"},{"name":"platform","type":"string","comment":"Short name of the application; 0-64 English letters, digits, and underscores"}],"throws":[{"code":400,"name":"BOT_APP_INVALID","comment":"The specified bot app is invalid."},{"code":400,"name":"BOT_APP_SHORTNAME_INVALID","comment":"The specified bot app short name is invalid."}],"available":"user"},{"kind":"method","name":"messages.setChatWallPaper","type":"Updates","id":2415577825,"comment":"Set a custom wallpaper » in a specific private chat with another user.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"for_both","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Only for Premium users, sets the specified wallpaper for both users of the chat, without requiring confirmation from the other user."},{"name":"revert","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"If we don't like the new wallpaper the other user of the chat has chosen for us using the for_both flag, we can re-set our previous wallpaper just on our side using this flag."},{"name":"peer","type":"InputPeer","comment":"The private chat where the wallpaper will be set"},{"name":"wallpaper","type":"InputWallPaper","typeModifiers":{"predicate":"flags.0"},"comment":"The wallpaper », obtained as described in the wallpaper documentation »; must not be provided when installing a wallpaper obtained from a {@link RawMessageActionSetChatWallPaper} service message (id must be provided, instead)."},{"name":"settings","type":"WallPaperSettings","typeModifiers":{"predicate":"flags.2"},"comment":"Wallpaper settings, obtained as described in the wallpaper documentation » or from {@link RawMessageActionSetChatWallPaper}.wallpaper.settings."},{"name":"id","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"If the wallpaper was obtained from a {@link RawMessageActionSetChatWallPaper} service message, must contain the ID of that message."}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"WALLPAPER_INVALID","comment":"The specified wallpaper is invalid."},{"code":400,"name":"WALLPAPER_NOT_FOUND","comment":"The specified wallpaper could not be found."}],"available":"user"},{"kind":"method","name":"messages.searchEmojiStickerSets","type":"messages.FoundStickerSets","id":2461288780,"comment":"Search for custom emoji stickersets »","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"exclude_featured","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Exclude featured stickersets from results"},{"name":"q","type":"string","comment":"Query string"},{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"messages.getSavedDialogs","type":"messages.SavedDialogs","id":1401016858,"comment":"Returns the current saved dialog list, see here » for more info.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"exclude_pinned","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Exclude pinned dialogs"},{"name":"offset_date","type":"int","comment":"Offsets for pagination, for more info click here"},{"name":"offset_id","type":"int","comment":"Offsets for pagination, for more info click here (top_message ID used for pagination)"},{"name":"offset_peer","type":"InputPeer","comment":"Offset peer for pagination"},{"name":"limit","type":"int","comment":"Number of list elements to be returned"},{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here"}],"available":"user"},{"kind":"method","name":"messages.getSavedHistory","type":"messages.Messages","id":1033519437,"comment":"Returns saved messages » forwarded from a specific peer","arguments":[{"name":"peer","type":"InputPeer","comment":"Target peer"},{"name":"offset_id","type":"int","comment":"Only return messages starting from the specified message ID"},{"name":"offset_date","type":"int","comment":"Only return messages sent before the specified date"},{"name":"add_offset","type":"int","comment":"Number of list elements to be skipped, negative values are also accepted."},{"name":"limit","type":"int","comment":"Number of results to return"},{"name":"max_id","type":"int","comment":"If a positive value was transferred, the method will return only messages with IDs less than max_id"},{"name":"min_id","type":"int","comment":"If a positive value was transferred, the method will return only messages with IDs more than min_id"},{"name":"hash","type":"long","comment":"Result hash"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.deleteSavedHistory","type":"messages.AffectedHistory","typeModifiers":{"constructorId":3025955281},"id":1855459371,"comment":"Deletes messages forwarded from a specific peer to saved messages ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"peer","type":"InputPeer","comment":"Peer, whose messages will be deleted from saved messages »"},{"name":"max_id","type":"int","comment":"Maximum ID of message to delete"},{"name":"min_date","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"Delete all messages newer than this UNIX timestamp"},{"name":"max_date","type":"int","typeModifiers":{"predicate":"flags.3"},"comment":"Delete all messages older than this UNIX timestamp"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.getPinnedSavedDialogs","type":"messages.SavedDialogs","id":3594360032,"comment":"Get pinned saved dialogs, see here » for more info.","arguments":[],"available":"user"},{"kind":"method","name":"messages.toggleSavedDialogPin","type":"Bool","id":2894183390,"comment":"Pin or unpin a saved message dialog ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"pinned","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to pin or unpin the dialog"},{"name":"peer","type":"InputDialogPeer","comment":"The dialog to pin"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.reorderPinnedSavedDialogs","type":"Bool","id":2339464583,"comment":"Reorder pinned saved message dialogs ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"force","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, dialogs pinned server-side but not present in the order field will be unpinned."},{"name":"order","type":"InputDialogPeer","typeModifiers":{"isVector":true},"comment":"New dialog order"}],"available":"user"},{"kind":"method","name":"messages.getSavedReactionTags","type":"messages.SavedReactionTags","id":909631579,"comment":"Fetch the full list of saved message tags created by the user.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"peer","type":"InputPeer","typeModifiers":{"predicate":"flags.0"},"comment":"If set, returns tags only used in the specified saved message dialog."},{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"messages.updateSavedReactionTag","type":"Bool","id":1613331948,"comment":"Update the description of a saved message tag ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"reaction","type":"Reaction","comment":"Reaction associated to the tag"},{"name":"title","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Tag description, max 12 UTF-8 characters; to remove the description call the method without setting this flag."}],"throws":[{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."},{"code":400,"name":"REACTION_INVALID","comment":"The specified reaction is invalid."}],"available":"user"},{"kind":"method","name":"messages.getDefaultTagReactions","type":"messages.Reactions","id":3187225640,"comment":"Fetch a default recommended list of saved message tag reactions.","arguments":[{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"messages.getOutboxReadDate","type":"OutboxReadDate","typeModifiers":{"constructorId":1001931436},"id":2353790557,"comment":"Get the exact read date of one of our messages, sent to a private chat with another user.\n\nCan be only done for private outgoing messages not older than appConfig.pm_read_date_expire_period ».\n\nIf the peer's {@link RawUserFull}.read_dates_private flag is set, we will not be able to fetch the exact read date of messages we send to them, and a USER_PRIVACY_RESTRICTED RPC error will be emitted.
\nThe exact read date of messages might still be unavailable for other reasons, see {@link RawGlobalPrivacySettings} for more info.
\nTo set {@link RawUserFull}.read_dates_private for ourselves invoke {@link account.RawSetGlobalPrivacySettingsRequest}, setting the settings.hide_read_marks flag.","arguments":[{"name":"peer","type":"InputPeer","comment":"The user to whom we sent the message."},{"name":"msg_id","type":"int","comment":"The message ID."}],"throws":[{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"MESSAGE_NOT_READ_YET","comment":"The specified message wasn't read yet."},{"code":400,"name":"MESSAGE_TOO_OLD","comment":"The message is too old, the requested information is not available."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":403,"name":"USER_PRIVACY_RESTRICTED","comment":"The user's privacy settings do not allow you to do this."},{"code":403,"name":"YOUR_PRIVACY_RESTRICTED","comment":"You cannot fetch the read date of this message because you have disallowed other users to do so for your messages; to fix, allow other users to see your exact last online date OR purchase a Telegram Premium subscription."}],"available":"user"},{"kind":"method","name":"messages.getQuickReplies","type":"messages.QuickReplies","id":3565417128,"comment":"Fetch basic info about all existing quick reply shortcuts.","arguments":[{"name":"hash","type":"long","comment":"Hash for pagination, generated as specified here » (not the usual algorithm used for hash generation.)"}],"available":"user"},{"kind":"method","name":"messages.reorderQuickReplies","type":"Bool","id":1613961479,"comment":"Reorder quick reply shortcuts.\n\nThis will emit an {@link RawUpdateQuickReplies} update to other logged-in sessions.","arguments":[{"name":"order","type":"int","typeModifiers":{"isVector":true},"comment":"IDs of all created quick reply shortcuts, in the desired order."}],"throws":[{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."}],"available":"user"},{"kind":"method","name":"messages.checkQuickReplyShortcut","type":"Bool","id":4057005011,"comment":"Before offering the user the choice to add a message to a quick reply shortcut, to make sure that none of the limits specified here » were reached.","arguments":[{"name":"shortcut","type":"string","comment":"Shorcut name (not ID!)."}],"throws":[{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."}],"available":"user"},{"kind":"method","name":"messages.editQuickReplyShortcut","type":"Bool","id":1543519471,"comment":"Rename a quick reply shortcut.
\nThis will emit an {@link RawUpdateQuickReplies} update to other logged-in sessions.","arguments":[{"name":"shortcut_id","type":"int","comment":"Shortcut ID."},{"name":"shortcut","type":"string","comment":"New shortcut name."}],"throws":[{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."},{"code":400,"name":"SHORTCUT_INVALID","comment":"The specified shortcut is invalid."}],"available":"user"},{"kind":"method","name":"messages.deleteQuickReplyShortcut","type":"Bool","id":1019234112,"comment":"Completely delete a quick reply shortcut.
\nThis will also emit an {@link RawUpdateDeleteQuickReply} update to other logged-in sessions (and no {@link RawUpdateDeleteQuickReplyMessages} updates, even if all the messages in the shortcuts are also deleted by this method).","arguments":[{"name":"shortcut_id","type":"int","comment":"Shortcut ID"}],"throws":[{"code":400,"name":"SHORTCUT_INVALID","comment":"The specified shortcut is invalid."}],"available":"user"},{"kind":"method","name":"messages.getQuickReplyMessages","type":"messages.Messages","id":2493814211,"comment":"Fetch (a subset or all) messages in a quick reply shortcut ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"shortcut_id","type":"int","comment":"Quick reply shortcut ID."},{"name":"id","type":"int","typeModifiers":{"predicate":"flags.0","isVector":true},"comment":"IDs of the messages to fetch, if empty fetches all of them."},{"name":"hash","type":"long","comment":"Hash used for caching, for more info click here"}],"throws":[{"code":400,"name":"SHORTCUT_INVALID","comment":"The specified shortcut is invalid."}],"available":"user"},{"kind":"method","name":"messages.sendQuickReplyMessages","type":"Updates","id":1819610593,"comment":"Send a quick reply shortcut ».","arguments":[{"name":"peer","type":"InputPeer","comment":"The peer where to send the shortcut (users only, for now)."},{"name":"shortcut_id","type":"int","comment":"The ID of the quick reply shortcut to send."},{"name":"id","type":"int","typeModifiers":{"isVector":true},"comment":"Specify a subset of messages from the shortcut to send; if empty, defaults to all of them."},{"name":"random_id","type":"long","typeModifiers":{"isVector":true},"comment":"Unique client IDs required to prevent message resending, one for each message we're sending, may be empty (but not recommended)."}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."}],"available":"user"},{"kind":"method","name":"messages.deleteQuickReplyMessages","type":"Updates","id":3775260944,"comment":"Delete one or more messages from a quick reply shortcut. This will also emit an {@link RawUpdateDeleteQuickReplyMessages} update.","arguments":[{"name":"shortcut_id","type":"int","comment":"Shortcut ID."},{"name":"id","type":"int","typeModifiers":{"isVector":true},"comment":"IDs of shortcut messages to delete."}],"throws":[{"code":400,"name":"SHORTCUT_INVALID","comment":"The specified shortcut is invalid."}],"available":"user"},{"kind":"method","name":"messages.toggleDialogFilterTags","type":"Bool","id":4247640649,"comment":"Enable or disable folder tags ».","arguments":[{"name":"enabled","type":"Bool","comment":"Enable or disable folder tags."}],"throws":[{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."}],"available":"user"},{"kind":"method","name":"messages.getMyStickers","type":"messages.MyStickers","typeModifiers":{"constructorId":4211040925},"id":3501580796,"comment":"Fetch all stickersets » owned by the current user.","arguments":[{"name":"offset_id","type":"long","comment":"Offsets for pagination, for more info click here"},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"}],"available":"user"},{"kind":"method","name":"messages.getEmojiStickerGroups","type":"messages.EmojiGroups","id":500711669,"comment":"Represents a list of emoji categories, to be used when choosing a sticker.","arguments":[{"name":"hash","type":"int","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"messages.getAvailableEffects","type":"messages.AvailableEffects","id":3735161401,"comment":"Fetch the full list of usable animated message effects ».","arguments":[{"name":"hash","type":"int","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"messages.editFactCheck","type":"Updates","id":92925557,"comment":"Edit/create a fact-check on a message.\n\nCan only be used by independent fact-checkers as specified by the appConfig.can_edit_factcheck configuration flag.","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer where the message was sent"},{"name":"msg_id","type":"int","comment":"Message ID"},{"name":"text","type":"TextWithEntities","comment":"Fact-check (maximum UTF-8 length specified in appConfig.factcheck_length_limit)."}],"throws":[{"code":403,"name":"CHAT_ACTION_FORBIDDEN","comment":"You cannot execute this action."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.deleteFactCheck","type":"Updates","id":3520762892,"comment":"Delete a fact-check from a message.\n\nCan only be used by independent fact-checkers as specified by the appConfig.can_edit_factcheck configuration flag.","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer where the message was sent."},{"name":"msg_id","type":"int","comment":"Message ID"}],"throws":[{"code":403,"name":"CHAT_ACTION_FORBIDDEN","comment":"You cannot execute this action."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.getFactCheck","type":"FactCheck","typeModifiers":{"isVector":true,"constructorId":3097230543},"id":3117270510,"comment":"Fetch one or more factchecks, see here » for the full flow.","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer where the messages were sent."},{"name":"msg_id","type":"int","typeModifiers":{"isVector":true},"comment":"Messages that have associated {@link RawFactCheck} constructors with the need_check flag set."}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"messages.requestMainWebView","type":"WebViewResult","typeModifiers":{"constructorId":1294139288},"id":3386908283,"comment":"Open a Main Mini App.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"compact","type":"true","typeModifiers":{"predicate":"flags.7"},"comment":"If set, requests to open the mini app in compact mode (as opposed to fullview mode). Must be set if the mode parameter of the Main Mini App link is equal to compact."},{"name":"peer","type":"InputPeer","comment":"Currently open chat, may be {@link RawInputPeerEmpty} if no chat is currently open."},{"name":"bot","type":"InputUser","comment":"Bot that owns the main mini app."},{"name":"start_param","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Start parameter, if opening from a Main Mini App link »."},{"name":"theme_params","type":"DataJSON","typeModifiers":{"predicate":"flags.0"},"comment":"Theme parameters »"},{"name":"platform","type":"string","comment":"Short name of the application; 0-64 English letters, digits, and underscores"}],"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."}],"available":"user"},{"kind":"method","name":"updates.getState","type":"updates.State","typeModifiers":{"constructorId":2775329342},"id":3990128682,"comment":"Returns a current state of updates.","arguments":[],"available":"both"},{"kind":"method","name":"updates.getDifference","type":"updates.Difference","id":432207715,"comment":"Get new updates.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"pts","type":"int","comment":"PTS, see updates."},{"name":"pts_limit","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"PTS limit"},{"name":"pts_total_limit","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"For fast updating: if provided and pts + pts_total_limit < remote pts, {@link updates.RawDifferenceTooLong} will be returned.
Simply tells the server to not return the difference if it is bigger than pts_total_limit
If the remote pts is too big (> ~4000000), this field will default to 1000000"},{"name":"date","type":"int","comment":"date, see updates."},{"name":"qts","type":"int","comment":"QTS, see updates."},{"name":"qts_limit","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"QTS limit"}],"throws":[{"code":400,"name":"CDN_METHOD_INVALID","comment":"You can't call this method in a CDN DC."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"DATE_EMPTY","comment":"Date empty."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PERSISTENT_TIMESTAMP_EMPTY","comment":"Persistent timestamp empty."},{"code":400,"name":"PERSISTENT_TIMESTAMP_INVALID","comment":"Persistent timestamp invalid."},{"code":500,"name":"RANDOM_ID_DUPLICATE","comment":"You provided a random ID that was already used."},{"code":400,"name":"USERNAME_INVALID","comment":"The provided username is not valid."},{"code":400,"name":"USER_NOT_PARTICIPANT","comment":"You're not a member of this supergroup/channel."}],"available":"both"},{"kind":"method","name":"updates.getChannelDifference","type":"updates.ChannelDifference","id":51854712,"comment":"Returns the difference between the current state of updates of a certain channel and transmitted.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"force","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Set to true to skip some possibly unneeded updates and reduce server-side load"},{"name":"channel","type":"InputChannel","comment":"The channel"},{"name":"filter","type":"ChannelMessagesFilter","comment":"Messsage filter"},{"name":"pts","type":"int","comment":"Persistent timestamp (see updates)"},{"name":"limit","type":"int","comment":"How many updates to fetch, max 100000
Ordinary (non-bot) users are supposed to pass 10-100"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHANNEL_PUBLIC_GROUP_NA","comment":"channel/supergroup not available."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"FROM_MESSAGE_BOT_DISABLED","comment":"Bots can't use fromMessage min constructors."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PERSISTENT_TIMESTAMP_EMPTY","comment":"Persistent timestamp empty."},{"code":400,"name":"PERSISTENT_TIMESTAMP_INVALID","comment":"Persistent timestamp invalid."},{"code":500,"name":"PERSISTENT_TIMESTAMP_OUTDATED","comment":"Channel internal replication issues, try again later (treat this like an RPC_CALL_FAIL)."},{"code":400,"name":"PINNED_DIALOGS_TOO_MUCH","comment":"Too many pinned dialogs."},{"code":400,"name":"RANGES_INVALID","comment":"Invalid range provided."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."}],"available":"both"},{"kind":"method","name":"photos.updateProfilePhoto","type":"photos.Photo","typeModifiers":{"constructorId":539045032},"id":166207545,"comment":"Installs a previously uploaded photo as a profile photo.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"fallback","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, the chosen profile photo will be shown to users that can't display your main profile photo due to your privacy settings."},{"name":"bot","type":"InputUser","typeModifiers":{"predicate":"flags.1"},"comment":"Can contain info of a bot we own, to change the profile photo of that bot, instead of the current user."},{"name":"id","type":"InputPhoto","comment":"Input photo"}],"throws":[{"code":400,"name":"ALBUM_PHOTOS_TOO_MANY","comment":"You have uploaded too many profile photos, delete some before retrying."},{"code":400,"name":"FILE_PARTS_INVALID","comment":"The number of file parts is invalid."},{"code":400,"name":"IMAGE_PROCESS_FAILED","comment":"Failure while processing image."},{"code":400,"name":"LOCATION_INVALID","comment":"The provided location is invalid."},{"code":400,"name":"PHOTO_CROP_SIZE_SMALL","comment":"Photo is too small."},{"code":400,"name":"PHOTO_EXT_INVALID","comment":"The extension of the photo is invalid."},{"code":400,"name":"PHOTO_ID_INVALID","comment":"Photo ID invalid."}],"available":"both"},{"kind":"method","name":"photos.uploadProfilePhoto","type":"photos.Photo","typeModifiers":{"constructorId":539045032},"id":59286453,"comment":"Updates current user profile photo.\n\nThe file, video and video_emoji_markup flags are mutually exclusive.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"fallback","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"If set, the chosen profile photo will be shown to users that can't display your main profile photo due to your privacy settings."},{"name":"bot","type":"InputUser","typeModifiers":{"predicate":"flags.5"},"comment":"Can contain info of a bot we own, to change the profile photo of that bot, instead of the current user."},{"name":"file","type":"InputFile","typeModifiers":{"predicate":"flags.0"},"comment":"Profile photo"},{"name":"video","type":"InputFile","typeModifiers":{"predicate":"flags.1"},"comment":"Animated profile picture video"},{"name":"video_start_ts","type":"double","typeModifiers":{"predicate":"flags.2"},"comment":"Floating point UNIX timestamp in seconds, indicating the frame of the video/sticker that should be used as static preview; can only be used if video or video_emoji_markup is set."},{"name":"video_emoji_markup","type":"VideoSize","typeModifiers":{"predicate":"flags.4"},"comment":"Animated sticker profile picture, must contain either a {@link RawVideoSizeEmojiMarkup} or a {@link RawVideoSizeStickerMarkup} constructor."}],"throws":[{"code":400,"name":"ALBUM_PHOTOS_TOO_MANY","comment":"You have uploaded too many profile photos, delete some before retrying."},{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."},{"code":400,"name":"EMOJI_MARKUP_INVALID","comment":"The specified video_emoji_markup was invalid."},{"code":400,"name":"FILE_PARTS_INVALID","comment":"The number of file parts is invalid."},{"code":400,"name":"IMAGE_PROCESS_FAILED","comment":"Failure while processing image."},{"code":400,"name":"PHOTO_CROP_FILE_MISSING","comment":"Photo crop file missing."},{"code":400,"name":"PHOTO_CROP_SIZE_SMALL","comment":"Photo is too small."},{"code":400,"name":"PHOTO_EXT_INVALID","comment":"The extension of the photo is invalid."},{"code":400,"name":"PHOTO_FILE_MISSING","comment":"Profile photo file missing."},{"code":400,"name":"PHOTO_INVALID","comment":"Photo invalid."},{"code":400,"name":"STICKER_MIME_INVALID","comment":"The specified sticker MIME type is invalid."},{"code":400,"name":"VIDEO_FILE_INVALID","comment":"The specified video file is invalid."}],"available":"both"},{"kind":"method","name":"photos.deletePhotos","type":"long","typeModifiers":{"isVector":true},"id":2278522671,"comment":"Deletes profile photos. The method returns a list of successfully deleted photo IDs.","arguments":[{"name":"id","type":"InputPhoto","typeModifiers":{"isVector":true},"comment":"Input photos to delete"}],"available":"user"},{"kind":"method","name":"photos.getUserPhotos","type":"photos.Photos","id":2446144168,"comment":"Returns the list of user photos.","arguments":[{"name":"user_id","type":"InputUser","comment":"User ID"},{"name":"offset","type":"int","comment":"Number of list elements to be skipped"},{"name":"max_id","type":"long","comment":"If a positive value was transferred, the method will return only photos with IDs less than the set one. This parameter is often useful when refetching file references », as in conjuction with limit=1 and offset=-1 the {@link RawPhoto} object with the id specified in max_id can be fetched."},{"name":"limit","type":"int","comment":"Number of list elements to be returned"}],"throws":[{"code":400,"name":"MAX_ID_INVALID","comment":"The provided max ID is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"both"},{"kind":"method","name":"photos.uploadContactProfilePhoto","type":"photos.Photo","typeModifiers":{"constructorId":539045032},"id":3779873393,"comment":"Upload a custom profile picture for a contact, or suggest a new profile picture to a contact.\n\nThe file, video and video_emoji_markup flags are mutually exclusive.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"suggest","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"If set, will send a {@link RawMessageActionSuggestProfilePhoto} service message to user_id, suggesting them to use the specified profile picture; otherwise, will set a personal profile picture for the user (only visible to the current user)."},{"name":"save","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"If set, removes a previously set personal profile picture (does not affect suggested profile pictures, to remove them simply deleted the {@link RawMessageActionSuggestProfilePhoto} service message with {@link messages.RawDeleteMessagesRequest})."},{"name":"user_id","type":"InputUser","comment":"The contact"},{"name":"file","type":"InputFile","typeModifiers":{"predicate":"flags.0"},"comment":"Profile photo"},{"name":"video","type":"InputFile","typeModifiers":{"predicate":"flags.1"},"comment":"Animated profile picture video"},{"name":"video_start_ts","type":"double","typeModifiers":{"predicate":"flags.2"},"comment":"Floating point UNIX timestamp in seconds, indicating the frame of the video/sticker that should be used as static preview; can only be used if video or video_emoji_markup is set."},{"name":"video_emoji_markup","type":"VideoSize","typeModifiers":{"predicate":"flags.5"},"comment":"Animated sticker profile picture, must contain either a {@link RawVideoSizeEmojiMarkup} or a {@link RawVideoSizeStickerMarkup} constructor."}],"throws":[{"code":400,"name":"CONTACT_MISSING","comment":"The specified user is not a contact."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"user"},{"kind":"method","name":"upload.saveFilePart","type":"Bool","id":3003426337,"comment":"Saves a part of file for further sending to one of the methods.","arguments":[{"name":"file_id","type":"long","comment":"Random file identifier created by the client"},{"name":"file_part","type":"int","comment":"Numerical order of a part"},{"name":"bytes","type":"bytes","comment":"Binary data, content of a part"}],"throws":[{"code":400,"name":"FILE_PART_EMPTY","comment":"The provided file part is empty."},{"code":400,"name":"FILE_PART_INVALID","comment":"The file part number is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."}],"available":"both"},{"kind":"method","name":"upload.getFile","type":"upload.File","id":3193124286,"comment":"Returns content of a whole file or its part.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"precise","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Disable some checks on limit and offset values, useful for example to stream videos by keyframes"},{"name":"cdn_supported","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether the current client supports CDN downloads"},{"name":"location","type":"InputFileLocation","comment":"File location"},{"name":"offset","type":"int53","comment":"Number of bytes to be skipped"},{"name":"limit","type":"int","comment":"Number of bytes to be returned"}],"throws":[{"code":400,"name":"CDN_METHOD_INVALID","comment":"You can't call this method in a CDN DC."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":406,"name":"FILEREF_UPGRADE_NEEDED","comment":"The client has to be updated in order to support file references."},{"code":400,"name":"FILE_ID_INVALID","comment":"The provided file id is invalid."},{"code":400,"name":"FILE_REFERENCE_EXPIRED","comment":"File reference expired, it must be refetched as described in the documentation."},{"code":420,"name":"FLOOD_PREMIUM_WAIT_%d","comment":"Please wait %d seconds before repeating the action, or purchase a Telegram Premium subscription to remove this rate limit."},{"code":400,"name":"LIMIT_INVALID","comment":"The provided limit is invalid."},{"code":400,"name":"LOCATION_INVALID","comment":"The provided location is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"OFFSET_INVALID","comment":"The provided offset is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"both"},{"kind":"method","name":"upload.saveBigFilePart","type":"Bool","id":3732629309,"comment":"Saves a part of a large file (over 10 MB in size) to be later passed to one of the methods.","arguments":[{"name":"file_id","type":"long","comment":"Random file id, created by the client"},{"name":"file_part","type":"int","comment":"Part sequence number"},{"name":"file_total_parts","type":"int","comment":"Total number of parts"},{"name":"bytes","type":"bytes","comment":"Binary data, part contents"}],"throws":[{"code":400,"name":"FILE_PARTS_INVALID","comment":"The number of file parts is invalid."},{"code":400,"name":"FILE_PART_EMPTY","comment":"The provided file part is empty."},{"code":400,"name":"FILE_PART_INVALID","comment":"The file part number is invalid."},{"code":400,"name":"FILE_PART_SIZE_CHANGED","comment":"Provided file part size has changed."},{"code":400,"name":"FILE_PART_SIZE_INVALID","comment":"The provided file part size is invalid."},{"code":400,"name":"FILE_PART_TOO_BIG","comment":"The uploaded file part is too big."}],"available":"both"},{"kind":"method","name":"upload.getWebFile","type":"upload.WebFile","typeModifiers":{"constructorId":568808380},"id":619086221,"comment":"Returns content of a web file, by proxying the request through telegram, see the webfile docs for more info.\n\nNote: the query must be sent to the DC specified in the webfile_dc_id MTProto configuration field.","arguments":[{"name":"location","type":"InputWebFileLocation","comment":"The file to download"},{"name":"offset","type":"int","comment":"Number of bytes to be skipped"},{"name":"limit","type":"int","comment":"Number of bytes to be returned"}],"throws":[{"code":400,"name":"DOCUMENT_INVALID","comment":"The specified document is invalid."},{"code":400,"name":"LOCATION_INVALID","comment":"The provided location is invalid."}],"available":"user"},{"kind":"method","name":"upload.getCdnFile","type":"upload.CdnFile","id":962554330,"comment":"Download a CDN file.","arguments":[{"name":"file_token","type":"bytes","comment":"File token"},{"name":"offset","type":"int53","comment":"Offset of chunk to download"},{"name":"limit","type":"int","comment":"Length of chunk to download"}],"throws":[{"code":400,"name":"FILE_TOKEN_INVALID","comment":"The master DC did not accept the file_token (e.g., the token has expired). Continue downloading the file from the master DC using upload.getFile."}],"available":"user"},{"kind":"method","name":"upload.reuploadCdnFile","type":"FileHash","typeModifiers":{"isVector":true,"constructorId":4087022428},"id":2603046056,"comment":"Request a reupload of a certain file to a CDN DC.","arguments":[{"name":"file_token","type":"bytes","comment":"File token"},{"name":"request_token","type":"bytes","comment":"Request token"}],"throws":[{"code":400,"name":"CDN_METHOD_INVALID","comment":"You can't call this method in a CDN DC."},{"code":500,"name":"CDN_UPLOAD_TIMEOUT","comment":"A server-side timeout occurred while reuploading the file to the CDN DC."},{"code":400,"name":"FILE_TOKEN_INVALID","comment":"The master DC did not accept the file_token (e.g., the token has expired). Continue downloading the file from the master DC using upload.getFile."},{"code":400,"name":"LOCATION_INVALID","comment":"The provided location is invalid."},{"code":400,"name":"REQUEST_TOKEN_INVALID","comment":"The master DC did not accept the request_token from the CDN DC. Continue downloading the file from the master DC using upload.getFile."},{"code":400,"name":"RSA_DECRYPT_FAILED","comment":"Internal RSA decryption failed."}],"available":"both"},{"kind":"method","name":"upload.getCdnFileHashes","type":"FileHash","typeModifiers":{"isVector":true,"constructorId":4087022428},"id":2447130417,"comment":"Get SHA256 hashes for verifying downloaded CDN files","arguments":[{"name":"file_token","type":"bytes","comment":"File"},{"name":"offset","type":"int53","comment":"Offset from which to start getting hashes"}],"throws":[{"code":400,"name":"CDN_METHOD_INVALID","comment":"You can't call this method in a CDN DC."},{"code":400,"name":"FILE_TOKEN_INVALID","comment":"The master DC did not accept the file_token (e.g., the token has expired). Continue downloading the file from the master DC using upload.getFile."},{"code":400,"name":"RSA_DECRYPT_FAILED","comment":"Internal RSA decryption failed."}],"available":"both"},{"kind":"method","name":"upload.getFileHashes","type":"FileHash","typeModifiers":{"isVector":true,"constructorId":4087022428},"id":2438371370,"comment":"Get SHA256 hashes for verifying downloaded files","arguments":[{"name":"location","type":"InputFileLocation","comment":"File"},{"name":"offset","type":"int53","comment":"Offset from which to get file hashes"}],"throws":[{"code":400,"name":"LOCATION_INVALID","comment":"The provided location is invalid."}],"available":"both"},{"kind":"method","name":"help.getConfig","type":"Config","typeModifiers":{"constructorId":3424265246},"id":3304659051,"comment":"Returns current configuration, including data center configuration.","arguments":[],"throws":[{"code":400,"name":"CONNECTION_API_ID_INVALID","comment":"The provided API id is invalid."},{"code":400,"name":"CONNECTION_APP_VERSION_EMPTY","comment":"App version is empty."},{"code":400,"name":"CONNECTION_LAYER_INVALID","comment":"Layer invalid."},{"code":400,"name":"DATA_INVALID","comment":"Encrypted data invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"USERNAME_INVALID","comment":"The provided username is not valid."},{"code":403,"name":"USER_PRIVACY_RESTRICTED","comment":"The user's privacy settings do not allow you to do this."}],"available":"both"},{"kind":"method","name":"help.getNearestDc","type":"NearestDc","typeModifiers":{"constructorId":2384074613},"id":531836966,"comment":"Returns info on data center nearest to the user.","arguments":[],"available":"user"},{"kind":"method","name":"help.getAppUpdate","type":"help.AppUpdate","id":1378703997,"comment":"Returns information on update availability for the current application.","arguments":[{"name":"source","type":"string","comment":"Source"}],"available":"user"},{"kind":"method","name":"help.getInviteText","type":"help.InviteText","typeModifiers":{"constructorId":415997816},"id":1295590211,"comment":"Returns localized text of a text message with an invitation.","arguments":[],"available":"user"},{"kind":"method","name":"help.getSupport","type":"help.Support","typeModifiers":{"constructorId":398898678},"id":2631862477,"comment":"Returns the support user for the \"ask a question\" feature.","arguments":[],"available":"user"},{"kind":"method","name":"help.setBotUpdatesStatus","type":"Bool","id":3961704397,"comment":"Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only","arguments":[{"name":"pending_updates_count","type":"int","comment":"Number of pending updates"},{"name":"message","type":"string","comment":"Error message, if present"}],"throws":[{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},{"kind":"method","name":"help.getCdnConfig","type":"CdnConfig","typeModifiers":{"constructorId":1462101002},"id":1375900482,"comment":"Get configuration for CDN file downloads.","arguments":[],"available":"both"},{"kind":"method","name":"help.getRecentMeUrls","type":"help.RecentMeUrls","typeModifiers":{"constructorId":235081943},"id":1036054804,"comment":"Get recently used t.me links.\n\nWhen installing official applications from \"Download Telegram\" buttons present in t.me pages, a referral parameter is passed to applications after installation.
\nIf, after downloading the application, the user creates a new account (instead of logging into an existing one), the referral parameter should be imported using this method, which returns the t.me pages the user recently opened, before installing Telegram.","arguments":[{"name":"referer","type":"string","comment":"Referrer"}],"available":"user"},{"kind":"method","name":"help.getTermsOfServiceUpdate","type":"help.TermsOfServiceUpdate","id":749019089,"comment":"Look for updates of telegram's terms of service","arguments":[],"available":"user"},{"kind":"method","name":"help.acceptTermsOfService","type":"Bool","id":4000511898,"comment":"Accept the new terms of service","arguments":[{"name":"id","type":"DataJSON","comment":"ID of terms of service"}],"throws":[{"code":400,"name":"DATA_JSON_INVALID","comment":"The provided JSON data is invalid."}],"available":"user"},{"kind":"method","name":"help.getDeepLinkInfo","type":"help.DeepLinkInfo","id":1072547679,"comment":"Get info about an unsupported deep link, see here for more info ».","arguments":[{"name":"path","type":"string","comment":"Path component of a tg: link"}],"available":"user"},{"kind":"method","name":"help.getAppConfig","type":"help.AppConfig","id":1642330196,"comment":"Get app-specific configuration, see client configuration for more info on the result.","arguments":[{"name":"hash","type":"int","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"help.saveAppLog","type":"Bool","id":1862465352,"comment":"Saves logs of application on the server.","arguments":[{"name":"events","type":"InputAppEvent","typeModifiers":{"isVector":true},"comment":"List of input events"}],"available":"user"},{"kind":"method","name":"help.getPassportConfig","type":"help.PassportConfig","id":3328290056,"comment":"Get passport configuration","arguments":[{"name":"hash","type":"int","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"help.getSupportName","type":"help.SupportName","typeModifiers":{"constructorId":2349199817},"id":3546343212,"comment":"Get localized name of the telegram support user","arguments":[],"throws":[{"code":403,"name":"USER_INVALID","comment":"Invalid user provided."}],"available":"user"},{"kind":"method","name":"help.getUserInfo","type":"help.UserInfo","id":59377875,"comment":"Can only be used by TSF members to obtain internal information.","arguments":[{"name":"user_id","type":"InputUser","comment":"User ID"}],"throws":[{"code":403,"name":"USER_INVALID","comment":"Invalid user provided."}],"available":"user"},{"kind":"method","name":"help.editUserInfo","type":"help.UserInfo","id":1723407216,"comment":"Internal use","arguments":[{"name":"user_id","type":"InputUser","comment":"User"},{"name":"message","type":"string","comment":"Message"},{"name":"entities","type":"MessageEntity","typeModifiers":{"isVector":true},"comment":"Message entities for styled text"}],"throws":[{"code":400,"name":"ENTITY_BOUNDS_INVALID","comment":"A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length."},{"code":403,"name":"USER_INVALID","comment":"Invalid user provided."}],"available":"user"},{"kind":"method","name":"help.getPromoData","type":"help.PromoData","id":3231151137,"comment":"Get MTProxy/Public Service Announcement information","arguments":[],"available":"user"},{"kind":"method","name":"help.hidePromoData","type":"Bool","id":505748629,"comment":"Hide MTProxy/Public Service Announcement information","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer to hide"}],"available":"user"},{"kind":"method","name":"help.dismissSuggestion","type":"Bool","id":4111317665,"comment":"Dismiss a suggestion, see here for more info ».","arguments":[{"name":"peer","type":"InputPeer","comment":"In the case of pending suggestions in {@link RawChannelFull}, the channel ID."},{"name":"suggestion","type":"string","comment":"Suggestion, see here for more info »."}],"available":"user"},{"kind":"method","name":"help.getCountriesList","type":"help.CountriesList","id":1935116200,"comment":"Get name, ISO code, localized name and phone codes/patterns of all available countries","arguments":[{"name":"lang_code","type":"string","comment":"Language code of the current user"},{"name":"hash","type":"int","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"help.getPremiumPromo","type":"help.PremiumPromo","typeModifiers":{"constructorId":1395946908},"id":3088815060,"comment":"Get Telegram Premium promotion information","arguments":[],"available":"user"},{"kind":"method","name":"help.getPeerColors","type":"help.PeerColors","id":3665884207,"comment":"Get the set of accent color palettes » that can be used for message accents.","arguments":[{"name":"hash","type":"int","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"help.getPeerProfileColors","type":"help.PeerColors","id":2882513405,"comment":"Get the set of accent color palettes » that can be used in profile page backgrounds.","arguments":[{"name":"hash","type":"int","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"help.getTimezonesList","type":"help.TimezonesList","id":1236468288,"comment":"Returns timezone information that may be used elsewhere in the API, such as to set Telegram Business opening hours ».","arguments":[{"name":"hash","type":"int","comment":"Hash used for caching, for more info click here."}],"available":"user"},{"kind":"method","name":"channels.readHistory","type":"Bool","id":3423619383,"comment":"Mark channel/supergroup history as read","arguments":[{"name":"channel","type":"InputChannel","comment":"Channel/supergroup"},{"name":"max_id","type":"int","comment":"ID of message up to which messages should be marked as read"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."}],"available":"user"},{"kind":"method","name":"channels.deleteMessages","type":"messages.AffectedMessages","typeModifiers":{"constructorId":2228326789},"id":2227305806,"comment":"Delete messages in a channel/supergroup","arguments":[{"name":"channel","type":"InputChannel","comment":"Channel/supergroup"},{"name":"id","type":"int","typeModifiers":{"isVector":true},"comment":"IDs of messages to delete"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"MESSAGE_DELETE_FORBIDDEN","comment":"You can't delete one of the messages you tried to delete, most likely because it is a service message."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."}],"available":"both"},{"kind":"method","name":"channels.reportSpam","type":"Bool","id":4098523925,"comment":"Reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup","arguments":[{"name":"channel","type":"InputChannel","comment":"Supergroup"},{"name":"participant","type":"InputPeer","comment":"Participant whose messages should be reported"},{"name":"id","type":"int","typeModifiers":{"isVector":true},"comment":"IDs of spam messages"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"user"},{"kind":"method","name":"channels.getMessages","type":"messages.Messages","id":2911672867,"comment":"Get channel/supergroup messages","arguments":[{"name":"channel","type":"InputChannel","comment":"Channel/supergroup"},{"name":"id","type":"InputMessage","typeModifiers":{"isVector":true},"comment":"IDs of messages to get"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MESSAGE_IDS_EMPTY","comment":"No message ids were provided."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."}],"available":"both"},{"kind":"method","name":"channels.getParticipants","type":"channels.ChannelParticipants","id":2010044880,"comment":"Get the participants of a supergroup/channel","arguments":[{"name":"channel","type":"InputChannel","comment":"Channel"},{"name":"filter","type":"ChannelParticipantsFilter","comment":"Which participant types to fetch"},{"name":"offset","type":"int","comment":"Offset"},{"name":"limit","type":"int","comment":"Limit"},{"name":"hash","type":"long","comment":"Hash"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."}],"available":"both"},{"kind":"method","name":"channels.getParticipant","type":"channels.ChannelParticipant","typeModifiers":{"constructorId":3753378583},"id":2695589062,"comment":"Get info about a channel/supergroup participant","arguments":[{"name":"channel","type":"InputChannel","comment":"Channel/supergroup"},{"name":"participant","type":"InputPeer","comment":"Participant to get info about"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PARTICIPANT_ID_INVALID","comment":"The specified participant ID is invalid."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."},{"code":400,"name":"USER_NOT_PARTICIPANT","comment":"You're not a member of this supergroup/channel."}],"available":"both"},{"kind":"method","name":"channels.getChannels","type":"messages.Chats","id":176122811,"comment":"Get info about channels/supergroups","arguments":[{"name":"id","type":"InputChannel","typeModifiers":{"isVector":true},"comment":"IDs of channels/supergroups to get info about"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."}],"available":"both"},{"kind":"method","name":"channels.getFullChannel","type":"messages.ChatFull","typeModifiers":{"constructorId":3856126364},"id":141781513,"comment":"Get full info about a supergroup, gigagroup or channel","arguments":[{"name":"channel","type":"InputChannel","comment":"The channel, supergroup or gigagroup to get info about"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHANNEL_PUBLIC_GROUP_NA","comment":"channel/supergroup not available."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."}],"available":"both"},{"kind":"method","name":"channels.createChannel","type":"Updates","id":2432722695,"comment":"Create a supergroup/channel.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"broadcast","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to create a channel"},{"name":"megagroup","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether to create a supergroup"},{"name":"for_import","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"Whether the supergroup is being created to import messages from a foreign chat service using {@link messages.RawInitHistoryImportRequest}"},{"name":"forum","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Whether to create a forum"},{"name":"title","type":"string","comment":"Channel title"},{"name":"about","type":"string","comment":"Channel description"},{"name":"geo_point","type":"InputGeoPoint","typeModifiers":{"predicate":"flags.2"},"comment":"Geogroup location, see here » for more info on geogroups."},{"name":"address","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"Geogroup address, see here » for more info on geogroups."},{"name":"ttl_period","type":"int","typeModifiers":{"predicate":"flags.4"},"comment":"Time-to-live of all messages that will be sent in the supergroup: once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. You can use {@link messages.RawSetDefaultHistoryTTLRequest} to edit this value later."}],"throws":[{"code":400,"name":"ADDRESS_INVALID","comment":"The specified geopoint address is invalid."},{"code":400,"name":"CHANNELS_ADMIN_LOCATED_TOO_MUCH","comment":"The user has reached the limit of public geogroups."},{"code":400,"name":"CHANNELS_TOO_MUCH","comment":"You have joined too many channels/supergroups."},{"code":400,"name":"CHAT_ABOUT_TOO_LONG","comment":"Chat about too long."},{"code":500,"name":"CHAT_INVALID","comment":"Invalid chat."},{"code":400,"name":"CHAT_TITLE_EMPTY","comment":"No chat title provided."},{"code":400,"name":"TTL_PERIOD_INVALID","comment":"The specified TTL period is invalid."},{"code":406,"name":"USER_RESTRICTED","comment":"You're spamreported, you can't create channels or chats."}],"available":"user"},{"kind":"method","name":"channels.editAdmin","type":"Updates","id":3543959810,"comment":"Modify the admin rights of a user in a supergroup/channel.","arguments":[{"name":"channel","type":"InputChannel","comment":"The supergroup/channel."},{"name":"user_id","type":"InputUser","comment":"The ID of the user whose admin rights should be modified"},{"name":"admin_rights","type":"ChatAdminRights","comment":"The admin rights"},{"name":"rank","type":"string","comment":"Indicates the role (rank) of the admin in the group: just an arbitrary string"}],"throws":[{"code":400,"name":"ADMINS_TOO_MUCH","comment":"There are too many admins."},{"code":400,"name":"ADMIN_RANK_EMOJI_NOT_ALLOWED","comment":"An admin rank cannot contain emojis."},{"code":400,"name":"ADMIN_RANK_INVALID","comment":"The specified admin rank is invalid."},{"code":400,"name":"BOTS_TOO_MUCH","comment":"There are too many bots in this chat/channel."},{"code":400,"name":"BOT_CHANNELS_NA","comment":"Bots can't edit admin privileges."},{"code":400,"name":"BOT_GROUPS_BLOCKED","comment":"This bot can't be added to groups."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_INVITE_REQUIRED","comment":"You do not have the rights to do this."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":406,"name":"FRESH_CHANGE_ADMINS_FORBIDDEN","comment":"You were just elected admin, you can't add or modify other admins yet."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":403,"name":"RIGHT_FORBIDDEN","comment":"Your admin rights do not allow you to do this."},{"code":400,"name":"USERS_TOO_MUCH","comment":"The maximum number of users has been exceeded (to create a chat, for example)."},{"code":400,"name":"USER_BLOCKED","comment":"User blocked."},{"code":403,"name":"USER_CHANNELS_TOO_MUCH","comment":"One of the users you tried to add is already in too many channels/supergroups."},{"code":400,"name":"USER_CREATOR","comment":"For channels.editAdmin: you've tried to edit the admin rights of the owner, but you're not the owner; for channels.leaveChannel: you can't leave this channel, because you're its creator."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."},{"code":403,"name":"USER_NOT_MUTUAL_CONTACT","comment":"The provided user is not a mutual contact."},{"code":403,"name":"USER_PRIVACY_RESTRICTED","comment":"The user's privacy settings do not allow you to do this."},{"code":403,"name":"USER_RESTRICTED","comment":"You're spamreported, you can't create channels or chats."}],"available":"both"},{"kind":"method","name":"channels.editTitle","type":"Updates","id":1450044624,"comment":"Edit the name of a channel/supergroup","arguments":[{"name":"channel","type":"InputChannel","comment":"Channel/supergroup"},{"name":"title","type":"string","comment":"New name"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"CHAT_TITLE_EMPTY","comment":"No chat title provided."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."}],"available":"both"},{"kind":"method","name":"channels.editPhoto","type":"Updates","id":4046346185,"comment":"Change the photo of a channel/supergroup","arguments":[{"name":"channel","type":"InputChannel","comment":"Channel/supergroup whose photo should be edited"},{"name":"photo","type":"InputChatPhoto","comment":"New photo"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"FILE_PARTS_INVALID","comment":"The number of file parts is invalid."},{"code":400,"name":"FILE_REFERENCE_INVALID","comment":"The specified file reference is invalid."},{"code":400,"name":"IMAGE_PROCESS_FAILED","comment":"Failure while processing image."},{"code":400,"name":"PHOTO_CROP_SIZE_SMALL","comment":"Photo is too small."},{"code":400,"name":"PHOTO_EXT_INVALID","comment":"The extension of the photo is invalid."},{"code":400,"name":"PHOTO_INVALID","comment":"Photo invalid."},{"code":400,"name":"STICKER_MIME_INVALID","comment":"The specified sticker MIME type is invalid."}],"available":"both"},{"kind":"method","name":"channels.checkUsername","type":"Bool","id":283557164,"comment":"Check if a username is free and can be assigned to a channel/supergroup","arguments":[{"name":"channel","type":"InputChannel","comment":"The channel/supergroup that will assigned the specified username"},{"name":"username","type":"string","comment":"The username to check"}],"throws":[{"code":400,"name":"CHANNELS_ADMIN_PUBLIC_TOO_MUCH","comment":"You're admin of too many public channels, make some channels private to change the username of this channel."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USERNAME_INVALID","comment":"The provided username is not valid."},{"code":400,"name":"USERNAME_OCCUPIED","comment":"The provided username is already occupied."},{"code":400,"name":"USERNAME_PURCHASE_AVAILABLE","comment":"The specified username can be purchased on https://fragment.com."}],"available":"user"},{"kind":"method","name":"channels.updateUsername","type":"Bool","id":890549214,"comment":"Change or remove the username of a supergroup/channel","arguments":[{"name":"channel","type":"InputChannel","comment":"Channel"},{"name":"username","type":"string","comment":"New username, pass an empty string to remove the username"}],"throws":[{"code":400,"name":"CHANNELS_ADMIN_PUBLIC_TOO_MUCH","comment":"You're admin of too many public channels, make some channels private to change the username of this channel."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"USERNAME_INVALID","comment":"The provided username is not valid."},{"code":400,"name":"USERNAME_NOT_MODIFIED","comment":"The username was not modified."},{"code":400,"name":"USERNAME_OCCUPIED","comment":"The provided username is already occupied."},{"code":400,"name":"USERNAME_PURCHASE_AVAILABLE","comment":"The specified username can be purchased on https://fragment.com."}],"available":"user"},{"kind":"method","name":"channels.joinChannel","type":"Updates","id":615851205,"comment":"Join a channel/supergroup","arguments":[{"name":"channel","type":"InputChannel","comment":"Channel/supergroup to join"}],"throws":[{"code":400,"name":"CHANNELS_TOO_MUCH","comment":"You have joined too many channels/supergroups."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_INVALID","comment":"Invalid chat."},{"code":400,"name":"INVITE_HASH_EMPTY","comment":"The invite hash is empty."},{"code":406,"name":"INVITE_HASH_EXPIRED","comment":"The invite link has expired."},{"code":400,"name":"INVITE_HASH_INVALID","comment":"The invite hash is invalid."},{"code":400,"name":"INVITE_REQUEST_SENT","comment":"You have successfully requested to join this chat or channel."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USERS_TOO_MUCH","comment":"The maximum number of users has been exceeded (to create a chat, for example)."},{"code":400,"name":"USER_ALREADY_PARTICIPANT","comment":"The user is already in the group."},{"code":400,"name":"USER_CHANNELS_TOO_MUCH","comment":"One of the users you tried to add is already in too many channels/supergroups."}],"available":"user"},{"kind":"method","name":"channels.leaveChannel","type":"Updates","id":4164332181,"comment":"Leave a channel/supergroup","arguments":[{"name":"channel","type":"InputChannel","comment":"Channel/supergroup to leave"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHANNEL_PUBLIC_GROUP_NA","comment":"channel/supergroup not available."},{"code":400,"name":"CHAT_INVALID","comment":"Invalid chat."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."},{"code":400,"name":"USER_CREATOR","comment":"For channels.editAdmin: you've tried to edit the admin rights of the owner, but you're not the owner; for channels.leaveChannel: you can't leave this channel, because you're its creator."},{"code":400,"name":"USER_NOT_PARTICIPANT","comment":"You're not a member of this supergroup/channel."}],"available":"both"},{"kind":"method","name":"channels.inviteToChannel","type":"messages.InvitedUsers","typeModifiers":{"constructorId":2136862630},"id":3387112788,"comment":"Invite users to a channel/supergroup","arguments":[{"name":"channel","type":"InputChannel","comment":"Channel/supergroup"},{"name":"users","type":"InputUser","typeModifiers":{"isVector":true},"comment":"Users to invite"}],"throws":[{"code":400,"name":"BOTS_TOO_MUCH","comment":"There are too many bots in this chat/channel."},{"code":400,"name":"BOT_GROUPS_BLOCKED","comment":"This bot can't be added to groups."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_INVALID","comment":"Invalid chat."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"USERS_TOO_MUCH","comment":"The maximum number of users has been exceeded (to create a chat, for example)."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."},{"code":400,"name":"USER_BLOCKED","comment":"User blocked."},{"code":400,"name":"USER_BOT","comment":"Bots can only be admins in channels."},{"code":403,"name":"USER_CHANNELS_TOO_MUCH","comment":"One of the users you tried to add is already in too many channels/supergroups."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."},{"code":400,"name":"USER_KICKED","comment":"This user was kicked from this supergroup/channel."},{"code":403,"name":"USER_NOT_MUTUAL_CONTACT","comment":"The provided user is not a mutual contact."},{"code":403,"name":"USER_PRIVACY_RESTRICTED","comment":"The user's privacy settings do not allow you to do this."}],"available":"user"},{"kind":"method","name":"channels.deleteChannel","type":"Updates","id":3222347747,"comment":"Delete a channel/supergroup","arguments":[{"name":"channel","type":"InputChannel","comment":"Channel/supergroup to delete"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":406,"name":"CHANNEL_TOO_LARGE","comment":"Channel is too large to be deleted; this error is issued when trying to delete channels with more than 1000 members (subject to change)."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."}],"available":"user"},{"kind":"method","name":"channels.exportMessageLink","type":"ExportedMessageLink","typeModifiers":{"constructorId":1571494644},"id":3862932971,"comment":"Get link and embed info of a message in a channel/supergroup","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"grouped","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to include other grouped media (for albums)"},{"name":"thread","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether to also include a thread ID, if available, inside of the link"},{"name":"channel","type":"InputChannel","comment":"Channel"},{"name":"id","type":"int","comment":"Message ID"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."}],"available":"user"},{"kind":"method","name":"channels.toggleSignatures","type":"Updates","id":527021574,"comment":"Enable/disable message signatures in channels","arguments":[{"name":"channel","type":"InputChannel","comment":"Channel"},{"name":"enabled","type":"Bool","comment":"Value"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."}],"available":"user"},{"kind":"method","name":"channels.getAdminedPublicChannels","type":"messages.Chats","id":4172297903,"comment":"Get channels/supergroups/geogroups we're admin in. Usually called when the user exceeds the {@link RawConfig} for owned public channels/supergroups/geogroups, and the user is given the choice to remove one of their channels/supergroups/geogroups.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"by_location","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Get geogroups"},{"name":"check_limit","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"If set and the user has reached the limit of owned public channels/supergroups/geogroups, instead of returning the channel list one of the specified errors will be returned.
Useful to check if a new public channel can indeed be created, even before asking the user to enter a channel username to use in {@link channels.RawCheckUsernameRequest}/{@link channels.RawUpdateUsernameRequest}."},{"name":"for_personal","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Set this flag to only fetch the full list of channels that may be passed to {@link account.RawUpdatePersonalChannelRequest} to display them on our profile page."}],"throws":[{"code":400,"name":"CHANNELS_ADMIN_LOCATED_TOO_MUCH","comment":"The user has reached the limit of public geogroups."},{"code":400,"name":"CHANNELS_ADMIN_PUBLIC_TOO_MUCH","comment":"You're admin of too many public channels, make some channels private to change the username of this channel."}],"available":"user"},{"kind":"method","name":"channels.editBanned","type":"Updates","id":2531708289,"comment":"Ban/unban/kick a user in a supergroup/channel.","arguments":[{"name":"channel","type":"InputChannel","comment":"The supergroup/channel."},{"name":"participant","type":"InputPeer","comment":"Participant to ban"},{"name":"banned_rights","type":"ChatBannedRights","comment":"The banned rights"}],"throws":[{"code":406,"name":"BANNED_RIGHTS_INVALID","comment":"You provided some invalid flags in the banned rights."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PARTICIPANT_ID_INVALID","comment":"The specified participant ID is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USER_ADMIN_INVALID","comment":"You're not an admin."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"both"},{"kind":"method","name":"channels.getAdminLog","type":"channels.AdminLogResults","typeModifiers":{"constructorId":3985307469},"id":870184064,"comment":"Get the admin log of a channel/supergroup","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"channel","type":"InputChannel","comment":"Channel"},{"name":"q","type":"string","comment":"Search query, can be empty"},{"name":"events_filter","type":"ChannelAdminLogEventsFilter","typeModifiers":{"predicate":"flags.0"},"comment":"Event filter"},{"name":"admins","type":"InputUser","typeModifiers":{"predicate":"flags.1","isVector":true},"comment":"Only show events from these admins"},{"name":"max_id","type":"long","comment":"Maximum ID of message to return (see pagination)"},{"name":"min_id","type":"long","comment":"Minimum ID of message to return (see pagination)"},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."}],"available":"user"},{"kind":"method","name":"channels.setStickers","type":"Bool","id":3935085817,"comment":"Associate a stickerset to the supergroup","arguments":[{"name":"channel","type":"InputChannel","comment":"Supergroup"},{"name":"stickerset","type":"InputStickerSet","comment":"The stickerset to associate"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"PARTICIPANTS_TOO_FEW","comment":"Not enough participants."},{"code":406,"name":"STICKERSET_OWNER_ANONYMOUS","comment":"Provided stickerset can't be installed as group stickerset to prevent admin deanonymization."}],"available":"both"},{"kind":"method","name":"channels.readMessageContents","type":"Bool","id":3937786936,"comment":"Mark channel/supergroup message contents as read","arguments":[{"name":"channel","type":"InputChannel","comment":"Channel/supergroup"},{"name":"id","type":"int","typeModifiers":{"isVector":true},"comment":"IDs of messages whose contents should be marked as read"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."}],"available":"user"},{"kind":"method","name":"channels.deleteHistory","type":"Updates","id":2611648071,"comment":"Delete the history of a supergroup","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"for_everyone","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the history should be deleted for everyone"},{"name":"channel","type":"InputChannel","comment":"Supergroup whose history must be deleted"},{"name":"max_id","type":"int","comment":"ID of message up to which the history must be deleted"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PARICIPANT_MISSING","comment":"The current user is not in the channel."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHANNEL_TOO_BIG","comment":"This channel has too many participants (>1000) to be deleted."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."}],"available":"user"},{"kind":"method","name":"channels.togglePreHistoryHidden","type":"Updates","id":3938171212,"comment":"Hide/unhide message history for new channel/supergroup users","arguments":[{"name":"channel","type":"InputChannel","comment":"Channel/supergroup"},{"name":"enabled","type":"Bool","comment":"Hide/unhide"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_LINK_EXISTS","comment":"The chat is public, you can't hide the history to new users."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"FORUM_ENABLED","comment":"You can't execute the specified action because the group is a forum, disable forum functionality to continue."}],"available":"user"},{"kind":"method","name":"channels.getLeftChannels","type":"messages.Chats","id":2202135744,"comment":"Get a list of channels/supergroups we left, requires a takeout session, see here » for more info.","arguments":[{"name":"offset","type":"int","comment":"Offset for pagination"}],"throws":[{"code":403,"name":"TAKEOUT_REQUIRED","comment":"A takeout session needs to be initialized first, see here » for more info."}],"available":"user"},{"kind":"method","name":"channels.getGroupsForDiscussion","type":"messages.Chats","id":4124758904,"comment":"Get all groups that can be used as discussion groups.\n\nReturned basic group chats must be first upgraded to supergroups before they can be set as a discussion group.
\nTo set a returned supergroup as a discussion group, access to its old messages must be enabled using {@link channels.RawTogglePreHistoryHiddenRequest}, first.","arguments":[],"available":"user"},{"kind":"method","name":"channels.setDiscussionGroup","type":"Bool","id":1079520178,"comment":"Associate a group to a channel as discussion group for that channel","arguments":[{"name":"broadcast","type":"InputChannel","comment":"Channel"},{"name":"group","type":"InputChannel","comment":"Discussion group to associate to the channel"}],"throws":[{"code":400,"name":"BROADCAST_ID_INVALID","comment":"Broadcast ID invalid."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"LINK_NOT_MODIFIED","comment":"Discussion link not modified."},{"code":400,"name":"MEGAGROUP_ID_INVALID","comment":"Invalid supergroup ID."},{"code":400,"name":"MEGAGROUP_PREHISTORY_HIDDEN","comment":"Group with hidden history for new members can't be set as discussion groups."}],"available":"user"},{"kind":"method","name":"channels.editCreator","type":"Updates","id":2402864415,"comment":"Transfer channel ownership","arguments":[{"name":"channel","type":"InputChannel","comment":"Channel"},{"name":"user_id","type":"InputUser","comment":"New channel owner"},{"name":"password","type":"InputCheckPasswordSRP","comment":"2FA password of account"}],"throws":[{"code":400,"name":"CHANNELS_ADMIN_PUBLIC_TOO_MUCH","comment":"You're admin of too many public channels, make some channels private to change the username of this channel."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"PASSWORD_HASH_INVALID","comment":"The provided password hash is invalid."},{"code":400,"name":"PASSWORD_MISSING","comment":"You must enable 2FA before executing this operation."},{"code":400,"name":"PASSWORD_TOO_FRESH_%d","comment":"The password was modified less than 24 hours ago, try again in %d seconds."},{"code":400,"name":"SESSION_TOO_FRESH_%d","comment":"This session was created less than 24 hours ago, try again in %d seconds."},{"code":400,"name":"SRP_ID_INVALID","comment":"Invalid SRP ID provided."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"user"},{"kind":"method","name":"channels.editLocation","type":"Bool","id":1491484525,"comment":"Edit location of geo group, see here » for more info on geogroups.","arguments":[{"name":"channel","type":"InputChannel","comment":"Geogroup"},{"name":"geo_point","type":"InputGeoPoint","comment":"New geolocation"},{"name":"address","type":"string","comment":"Address string"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"MEGAGROUP_GEO_REQUIRED","comment":"This method can only be invoked on a geogroup."},{"code":400,"name":"MEGAGROUP_REQUIRED","comment":"You can only use this method on a supergroup."}],"available":"user"},{"kind":"method","name":"channels.toggleSlowMode","type":"Updates","id":3990134512,"comment":"Toggle supergroup slow mode: if enabled, users will only be able to send one message every seconds seconds","arguments":[{"name":"channel","type":"InputChannel","comment":"The supergroup"},{"name":"seconds","type":"int","comment":"Users will only be able to send one message every seconds seconds, 0 to disable the limitation"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"SECONDS_INVALID","comment":"Invalid duration provided."}],"available":"user"},{"kind":"method","name":"channels.getInactiveChannels","type":"messages.InactiveChats","typeModifiers":{"constructorId":2837970629},"id":300429806,"comment":"Get inactive channels and supergroups","arguments":[],"available":"user"},{"kind":"method","name":"channels.convertToGigagroup","type":"Updates","id":187239529,"comment":"Convert a supergroup to a gigagroup, when requested by channel suggestions.","arguments":[{"name":"channel","type":"InputChannel","comment":"The supergroup to convert"}],"throws":[{"code":400,"name":"CHANNEL_ID_INVALID","comment":"The specified supergroup ID is invalid."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"FORUM_ENABLED","comment":"You can't execute the specified action because the group is a forum, disable forum functionality to continue."},{"code":400,"name":"PARTICIPANTS_TOO_FEW","comment":"Not enough participants."}],"available":"user"},{"kind":"method","name":"channels.viewSponsoredMessage","type":"Bool","id":3199130516,"comment":"Mark a specific sponsored message as read","arguments":[{"name":"channel","type":"InputChannel","comment":"Peer"},{"name":"random_id","type":"bytes","comment":"Message ID"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."}],"available":"user"},{"kind":"method","name":"channels.getSponsoredMessages","type":"messages.SponsoredMessages","id":3961589695,"comment":"Get a list of sponsored messages","arguments":[{"name":"channel","type":"InputChannel","comment":"Peer"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."}],"available":"user"},{"kind":"method","name":"channels.getSendAs","type":"channels.SendAsPeers","typeModifiers":{"constructorId":4103516358},"id":231174382,"comment":"Obtains a list of peers that can be used to send messages in a specific group","arguments":[{"name":"peer","type":"InputPeer","comment":"The group where we intend to send messages"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"channels.deleteParticipantHistory","type":"messages.AffectedHistory","typeModifiers":{"constructorId":3025955281},"id":913655003,"comment":"Delete all messages sent by a specific participant of a given supergroup","arguments":[{"name":"channel","type":"InputChannel","comment":"Supergroup"},{"name":"participant","type":"InputPeer","comment":"The participant whose messages should be deleted"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PARTICIPANT_ID_INVALID","comment":"The specified participant ID is invalid."}],"available":"user"},{"kind":"method","name":"channels.toggleJoinToSend","type":"Updates","id":3838547328,"comment":"Set whether all users should join a discussion group in order to comment on a post »","arguments":[{"name":"channel","type":"InputChannel","comment":"Discussion group"},{"name":"enabled","type":"Bool","comment":"Toggle"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."}],"available":"user"},{"kind":"method","name":"channels.toggleJoinRequest","type":"Updates","id":1277789622,"comment":"Set whether all users should request admin approval to join the group ».","arguments":[{"name":"channel","type":"InputChannel","comment":"Group"},{"name":"enabled","type":"Bool","comment":"Toggle"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"CHAT_PUBLIC_REQUIRED","comment":"You can only enable join requests in public groups."}],"available":"user"},{"kind":"method","name":"channels.reorderUsernames","type":"Bool","id":3025988893,"comment":"Reorder active usernames","arguments":[{"name":"channel","type":"InputChannel","comment":"The supergroup or channel"},{"name":"order","type":"string","typeModifiers":{"isVector":true},"comment":"The new order for active usernames. All active usernames must be specified."}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."}],"available":"user"},{"kind":"method","name":"channels.toggleUsername","type":"Bool","id":1358053637,"comment":"Activate or deactivate a purchased fragment.com username associated to a supergroup or channel we own.","arguments":[{"name":"channel","type":"InputChannel","comment":"Supergroup or channel"},{"name":"username","type":"string","comment":"Username"},{"name":"active","type":"Bool","comment":"Whether to activate or deactivate the username"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"USERNAMES_ACTIVE_TOO_MUCH","comment":"The maximum number of active usernames was reached."},{"code":400,"name":"USERNAME_INVALID","comment":"The provided username is not valid."},{"code":400,"name":"USERNAME_NOT_MODIFIED","comment":"The username was not modified."}],"available":"user"},{"kind":"method","name":"channels.deactivateAllUsernames","type":"Bool","id":170155475,"comment":"Disable all purchased usernames of a supergroup or channel","arguments":[{"name":"channel","type":"InputChannel","comment":"Supergroup or channel"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."}],"available":"user"},{"kind":"method","name":"channels.toggleForum","type":"Updates","id":2754186025,"comment":"Enable or disable forum functionality in a supergroup.","arguments":[{"name":"channel","type":"InputChannel","comment":"Supergroup ID"},{"name":"enabled","type":"Bool","comment":"Enable or disable forum functionality"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_DISCUSSION_UNALLOWED","comment":"You can't enable forum topics in a discussion group linked to a channel."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."}],"available":"user"},{"kind":"method","name":"channels.createForumTopic","type":"Updates","id":4094427684,"comment":"Create a forum topic; requires manage_topics rights.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"channel","type":"InputChannel","comment":"The forum"},{"name":"title","type":"string","comment":"Topic title (maximum UTF-8 length: 128)"},{"name":"icon_color","type":"int","typeModifiers":{"predicate":"flags.0"},"comment":"If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F."},{"name":"icon_emoji_id","type":"long","typeModifiers":{"predicate":"flags.3"},"comment":"ID of the custom emoji used as topic icon. Telegram Premium users can use any custom emoji, other users can only use the custom emojis contained in the {@link RawInputStickerSetEmojiDefaultTopicIcons} emoji pack."},{"name":"random_id","type":"long","comment":"Unique client message ID to prevent duplicate sending of the same event"},{"name":"send_as","type":"InputPeer","typeModifiers":{"predicate":"flags.2"},"comment":"Create the topic as the specified peer"}],"throws":[{"code":400,"name":"CHANNEL_FORUM_MISSING","comment":"This supergroup is not a forum."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."},{"code":400,"name":"TOPIC_TITLE_EMPTY","comment":"The specified topic title is empty."}],"available":"both"},{"kind":"method","name":"channels.getForumTopics","type":"messages.ForumTopics","typeModifiers":{"constructorId":913709011},"id":233136337,"comment":"Get topics of a forum","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"channel","type":"InputChannel","comment":"Supergroup"},{"name":"q","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Search query"},{"name":"offset_date","type":"int","comment":"Offsets for pagination, for more info click here, date of the last message of the last found topic. Use 0 or any date in the future to get results from the last topic."},{"name":"offset_id","type":"int","comment":"Offsets for pagination, for more info click here, ID of the last message of the last found topic (or initially 0)."},{"name":"offset_topic","type":"int","comment":"Offsets for pagination, for more info click here, ID of the last found topic (or initially 0)."},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination. For optimal performance, the number of returned topics is chosen by the server and can be smaller than the specified limit."}],"throws":[{"code":400,"name":"CHANNEL_FORUM_MISSING","comment":"This supergroup is not a forum."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."}],"available":"user"},{"kind":"method","name":"channels.getForumTopicsByID","type":"messages.ForumTopics","typeModifiers":{"constructorId":913709011},"id":2961383097,"comment":"Get forum topics by their ID","arguments":[{"name":"channel","type":"InputChannel","comment":"Forum"},{"name":"topics","type":"int","typeModifiers":{"isVector":true},"comment":"Topic IDs"}],"throws":[{"code":400,"name":"CHANNEL_FORUM_MISSING","comment":"This supergroup is not a forum."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"TOPICS_EMPTY","comment":"You specified no topic IDs."}],"available":"user"},{"kind":"method","name":"channels.editForumTopic","type":"Updates","id":4108296581,"comment":"Edit forum topic; requires manage_topics rights.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"channel","type":"InputChannel","comment":"Supergroup"},{"name":"topic_id","type":"int","comment":"Topic ID"},{"name":"title","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"If present, will update the topic title (maximum UTF-8 length: 128)."},{"name":"icon_emoji_id","type":"long","typeModifiers":{"predicate":"flags.1"},"comment":"If present, updates the custom emoji used as topic icon. Telegram Premium users can use any custom emoji, other users can only use the custom emojis contained in the {@link RawInputStickerSetEmojiDefaultTopicIcons} emoji pack. Pass 0 to switch to the fallback topic icon."},{"name":"closed","type":"Bool","typeModifiers":{"predicate":"flags.2"},"comment":"If present, will update the open/closed status of the topic."},{"name":"hidden","type":"Bool","typeModifiers":{"predicate":"flags.3"},"comment":"If present, will hide/unhide the topic (only valid for the \"General\" topic, id=1)."}],"throws":[{"code":400,"name":"CHANNEL_FORUM_MISSING","comment":"This supergroup is not a forum."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"DOCUMENT_INVALID","comment":"The specified document is invalid."},{"code":400,"name":"GENERAL_MODIFY_ICON_FORBIDDEN","comment":"You can't modify the icon of the \"General\" topic."},{"code":400,"name":"TOPIC_CLOSE_SEPARATELY","comment":"The close flag cannot be provided together with any of the other flags."},{"code":400,"name":"TOPIC_HIDE_SEPARATELY","comment":"The hide flag cannot be provided together with any of the other flags."},{"code":400,"name":"TOPIC_ID_INVALID","comment":"The specified topic ID is invalid."},{"code":400,"name":"TOPIC_NOT_MODIFIED","comment":"The updated topic info is equal to the current topic info, nothing was changed."}],"available":"both"},{"kind":"method","name":"channels.updatePinnedForumTopic","type":"Updates","id":1814925350,"comment":"Pin or unpin forum topics","arguments":[{"name":"channel","type":"InputChannel","comment":"Supergroup ID"},{"name":"topic_id","type":"int","comment":"Forum topic ID"},{"name":"pinned","type":"Bool","comment":"Whether to pin or unpin the topic"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"TOPIC_ID_INVALID","comment":"The specified topic ID is invalid."}],"available":"user"},{"kind":"method","name":"channels.deleteTopicHistory","type":"messages.AffectedHistory","typeModifiers":{"constructorId":3025955281},"id":876830509,"comment":"Delete message history of a forum topic","arguments":[{"name":"channel","type":"InputChannel","comment":"Forum"},{"name":"top_msg_id","type":"int","comment":"Topic ID"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"TOPIC_ID_INVALID","comment":"The specified topic ID is invalid."}],"available":"both"},{"kind":"method","name":"channels.reorderPinnedForumTopics","type":"Updates","id":693150095,"comment":"Reorder pinned forum topics","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"force","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If not set, the order of only the topics present both server-side and in order will be changed (i.e. mentioning topics not pinned server-side in order will not pin them, and not mentioning topics pinned server-side will not unpin them).
If set, the entire server-side pinned topic list will be replaced with order (i.e. mentioning topics not pinned server-side in order will pin them, and not mentioning topics pinned server-side will unpin them)"},{"name":"channel","type":"InputChannel","comment":"Supergroup ID"},{"name":"order","type":"int","typeModifiers":{"isVector":true},"comment":"Topic IDs »"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."}],"available":"user"},{"kind":"method","name":"channels.toggleAntiSpam","type":"Updates","id":1760814315,"comment":"Enable or disable the native antispam system.","arguments":[{"name":"channel","type":"InputChannel","comment":"Supergroup ID. The specified supergroup must have at least telegram_antispam_group_size_min members to enable antispam functionality, as specified by the client configuration parameters."},{"name":"enabled","type":"Bool","comment":"Enable or disable the native antispam system."}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."}],"available":"user"},{"kind":"method","name":"channels.reportAntiSpamFalsePositive","type":"Bool","id":2823857811,"comment":"Report a native antispam false positive","arguments":[{"name":"channel","type":"InputChannel","comment":"Supergroup ID"},{"name":"msg_id","type":"int","comment":"Message ID that was mistakenly deleted by the native antispam system, taken from the admin log"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."}],"available":"user"},{"kind":"method","name":"channels.toggleParticipantsHidden","type":"Updates","id":1785624660,"comment":"Hide or display the participants list in a supergroup.\n\nThe supergroup must have at least hidden_members_group_size_min participants in order to use this method, as specified by the client configuration parameters ».","arguments":[{"name":"channel","type":"InputChannel","comment":"Supergroup ID"},{"name":"enabled","type":"Bool","comment":"If true, will hide the participants list; otherwise will unhide it."}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"PARTICIPANTS_TOO_FEW","comment":"Not enough participants."}],"available":"user"},{"kind":"method","name":"channels.clickSponsoredMessage","type":"Bool","id":414170259,"comment":"Informs the server that the user has either:","arguments":[{"name":"channel","type":"InputChannel","comment":"Channel where the sponsored message was posted"},{"name":"random_id","type":"bytes","comment":"Message ID"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."}],"available":"user"},{"kind":"method","name":"channels.updateColor","type":"Updates","id":3635033713,"comment":"Update the accent color and background custom emoji » of a channel.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"for_profile","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether to change the accent color emoji pattern of the profile page; otherwise, the accent color and emoji pattern of messages will be changed.
Channels can change both message and profile palettes; supergroups can only change the profile palette, of course after reaching the appropriate boost level."},{"name":"channel","type":"InputChannel","comment":"Channel whose accent color should be changed."},{"name":"color","type":"int","typeModifiers":{"predicate":"flags.2"},"comment":"ID of the accent color palette » to use (not RGB24, see here » for more info); if not set, the default palette is used."},{"name":"background_emoji_id","type":"long","typeModifiers":{"predicate":"flags.0"},"comment":"Custom emoji ID used in the accent color pattern."}],"throws":[{"code":400,"name":"BOOSTS_REQUIRED","comment":"The specified channel must first be boosted by its users in order to perform this action."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."}],"available":"user"},{"kind":"method","name":"channels.toggleViewForumAsMessages","type":"Updates","id":2537077525,"comment":"Users may also choose to display messages from all topics of a forum as if they were sent to a normal group, using a \"View as messages\" setting in the local client: this setting only affects the current account, and is synced to other logged in sessions using this method.\n\nInvoking this method will update the value of the view_forum_as_messages flag of {@link RawChannelFull} or {@link RawDialog} and emit an {@link RawUpdateChannelViewForumAsMessages}.","arguments":[{"name":"channel","type":"InputChannel","comment":"The forum"},{"name":"enabled","type":"Bool","comment":"The new value of the view_forum_as_messages flag."}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."}],"available":"user"},{"kind":"method","name":"channels.getChannelRecommendations","type":"messages.Chats","id":631707458,"comment":"Obtain a list of similarly themed public channels, selected based on similarities in their subscriber bases.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"channel","type":"InputChannel","typeModifiers":{"predicate":"flags.0"},"comment":"The method will return channels related to the passed channel. If not set, the method will returns channels related to channels the user has joined."}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."}],"available":"user"},{"kind":"method","name":"channels.updateEmojiStatus","type":"Updates","id":4040418984,"comment":"Set an emoji status for a channel or supergroup.","arguments":[{"name":"channel","type":"InputChannel","comment":"The channel/supergroup, must have at least channel_emoji_status_level_min/group_emoji_status_level_min boosts."},{"name":"emoji_status","type":"EmojiStatus","comment":"Emoji status to set"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."}],"available":"user"},{"kind":"method","name":"channels.setBoostsToUnblockRestrictions","type":"Updates","id":2906234094,"comment":"Admins with {@link RawChatAdminRights} may allow users that apply a certain number of booosts » to the group to bypass {@link channels.RawToggleSlowModeRequest} and other » supergroup restrictions, see here » for more info.","arguments":[{"name":"channel","type":"InputChannel","comment":"The supergroup."},{"name":"boosts","type":"int","comment":"The number of required boosts (1-8, 0 to disable)."}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."}],"available":"user"},{"kind":"method","name":"channels.setEmojiStickers","type":"Bool","id":1020866743,"comment":"Set a custom emoji stickerset for supergroups. Only usable after reaching at least the boost level » specified in the group_emoji_stickers_level_min » config parameter.","arguments":[{"name":"channel","type":"InputChannel","comment":"The supergroup"},{"name":"stickerset","type":"InputStickerSet","comment":"The custom emoji stickerset to associate to the supergroup"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."}],"available":"user"},{"kind":"method","name":"channels.reportSponsoredMessage","type":"channels.SponsoredMessageReportResult","id":2945447609,"comment":"Report a sponsored message », see here » for more info on the full flow.","arguments":[{"name":"channel","type":"InputChannel","comment":"The channel where the sponsored message can be seen."},{"name":"random_id","type":"bytes","comment":"ID of the sponsored message."},{"name":"option","type":"bytes","comment":"Chosen report option, initially an empty string, see here » for more info on the full flow."}],"throws":[{"code":400,"name":"AD_EXPIRED","comment":"The ad has expired (too old or not found)."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."}],"available":"user"},{"kind":"method","name":"channels.restrictSponsoredMessages","type":"Updates","id":2598966553,"comment":"Disable ads on the specified channel, for all users.\n\nAvailable only after reaching at least the boost level » specified in the channel_restrict_sponsored_level_min » config parameter.","arguments":[{"name":"channel","type":"InputChannel","comment":"The channel."},{"name":"restricted","type":"Bool","comment":"Whether to disable or re-enable ads."}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."}],"available":"user"},{"kind":"method","name":"channels.searchPosts","type":"messages.Messages","id":3516897403,"comment":"Globally search for posts from public channels » (including those we aren't a member of) containing a specific hashtag.","arguments":[{"name":"hashtag","type":"string","comment":"The hashtag to search, without the # character."},{"name":"offset_rate","type":"int","comment":"Initially 0, then set to the {@link messages.RawMessagesSlice}"},{"name":"offset_peer","type":"InputPeer","comment":"Offsets for pagination, for more info click here"},{"name":"offset_id","type":"int","comment":"Offsets for pagination, for more info click here"},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"}],"available":"user"},{"kind":"method","name":"bots.sendCustomRequest","type":"DataJSON","typeModifiers":{"constructorId":2104790276},"id":2854709741,"comment":"Sends a custom request; for bots only","arguments":[{"name":"custom_method","type":"string","comment":"The method name"},{"name":"params","type":"DataJSON","comment":"JSON-serialized method parameters"}],"throws":[{"code":400,"name":"DATA_JSON_INVALID","comment":"The provided JSON data is invalid."},{"code":400,"name":"METHOD_INVALID","comment":"The specified method is invalid."},{"code":403,"name":"USER_BOT_INVALID","comment":"User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},{"kind":"method","name":"bots.answerWebhookJSONQuery","type":"Bool","id":3860938573,"comment":"Answers a custom query; for bots only","arguments":[{"name":"query_id","type":"long","comment":"Identifier of a custom query"},{"name":"data","type":"DataJSON","comment":"JSON-serialized answer to the query"}],"throws":[{"code":400,"name":"DATA_JSON_INVALID","comment":"The provided JSON data is invalid."},{"code":400,"name":"QUERY_ID_INVALID","comment":"The query ID is invalid."},{"code":403,"name":"USER_BOT_INVALID","comment":"User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},{"kind":"method","name":"bots.setBotCommands","type":"Bool","id":85399130,"comment":"Set bot command list","arguments":[{"name":"scope","type":"BotCommandScope","comment":"Command scope"},{"name":"lang_code","type":"string","comment":"Language code"},{"name":"commands","type":"BotCommand","typeModifiers":{"isVector":true},"comment":"Bot commands"}],"throws":[{"code":400,"name":"BOT_COMMAND_DESCRIPTION_INVALID","comment":"The specified command description is invalid."},{"code":400,"name":"BOT_COMMAND_INVALID","comment":"The specified command is invalid."},{"code":400,"name":"LANG_CODE_INVALID","comment":"The specified language code is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"bot"},{"kind":"method","name":"bots.resetBotCommands","type":"Bool","id":1032708345,"comment":"Clear bot commands for the specified bot scope and language code","arguments":[{"name":"scope","type":"BotCommandScope","comment":"Command scope"},{"name":"lang_code","type":"string","comment":"Language code"}],"throws":[{"code":400,"name":"LANG_CODE_INVALID","comment":"The specified language code is invalid."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},{"kind":"method","name":"bots.getBotCommands","type":"BotCommand","typeModifiers":{"isVector":true,"constructorId":3262826695},"id":3813412310,"comment":"Obtain a list of bot commands for the specified bot scope and language code","arguments":[{"name":"scope","type":"BotCommandScope","comment":"Command scope"},{"name":"lang_code","type":"string","comment":"Language code"}],"throws":[{"code":400,"name":"USER_BOT_INVALID","comment":"User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},{"kind":"method","name":"bots.setBotMenuButton","type":"Bool","id":1157944655,"comment":"Sets the menu button action » for a given user or for all users","arguments":[{"name":"user_id","type":"InputUser","comment":"User ID"},{"name":"button","type":"BotMenuButton","comment":"Bot menu button action"}],"throws":[{"code":400,"name":"BUTTON_TEXT_INVALID","comment":"The specified button text is invalid."},{"code":400,"name":"BUTTON_URL_INVALID","comment":"Button URL invalid."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},{"kind":"method","name":"bots.getBotMenuButton","type":"BotMenuButton","id":2623597352,"comment":"Gets the menu button action for a given user or for all users, previously set using {@link bots.RawSetBotMenuButtonRequest}; users can see this information in the {@link RawBotInfo} constructor.","arguments":[{"name":"user_id","type":"InputUser","comment":"User ID or empty for the default menu button."}],"throws":[{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},{"kind":"method","name":"bots.setBotBroadcastDefaultAdminRights","type":"Bool","id":2021942497,"comment":"Set the default suggested admin rights for bots being added as admins to channels, see here for more info on how to handle them ».","arguments":[{"name":"admin_rights","type":"ChatAdminRights","comment":"Admin rights"}],"throws":[{"code":400,"name":"RIGHTS_NOT_MODIFIED","comment":"The new admin rights are equal to the old rights, no change was made."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},{"kind":"method","name":"bots.setBotGroupDefaultAdminRights","type":"Bool","id":2455685610,"comment":"Set the default suggested admin rights for bots being added as admins to groups, see here for more info on how to handle them ».","arguments":[{"name":"admin_rights","type":"ChatAdminRights","comment":"Admin rights"}],"throws":[{"code":400,"name":"RIGHTS_NOT_MODIFIED","comment":"The new admin rights are equal to the old rights, no change was made."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},{"kind":"method","name":"bots.setBotInfo","type":"Bool","id":282013987,"comment":"Set localized name, about text and description of a bot (or of the current account, if called by a bot).","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"bot","type":"InputUser","typeModifiers":{"predicate":"flags.2"},"comment":"If called by a user, must contain the peer of a bot we own."},{"name":"lang_code","type":"string","comment":"Language code, if left empty update the fallback about text and description"},{"name":"name","type":"string","typeModifiers":{"predicate":"flags.3"},"comment":"New bot name"},{"name":"about","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"New about text"},{"name":"description","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"New description"}],"throws":[{"code":400,"name":"USER_BOT_INVALID","comment":"User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts."}],"available":"both"},{"kind":"method","name":"bots.getBotInfo","type":"bots.BotInfo","typeModifiers":{"constructorId":3903288752},"id":3705214205,"comment":"Get localized name, about text and description of a bot (or of the current account, if called by a bot).","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"bot","type":"InputUser","typeModifiers":{"predicate":"flags.0"},"comment":"If called by a user, must contain the peer of a bot we own."},{"name":"lang_code","type":"string","comment":"Language code, if left empty this method will return the fallback about text and description."}],"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."},{"code":400,"name":"LANG_CODE_INVALID","comment":"The specified language code is invalid."},{"code":400,"name":"USER_BOT_INVALID","comment":"User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts."}],"available":"both"},{"kind":"method","name":"bots.reorderUsernames","type":"Bool","id":2533994946,"comment":"Reorder usernames associated to a bot we own.","arguments":[{"name":"bot","type":"InputUser","comment":"The bot"},{"name":"order","type":"string","typeModifiers":{"isVector":true},"comment":"The new order for active usernames. All active usernames must be specified."}],"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."},{"code":400,"name":"USERNAME_NOT_MODIFIED","comment":"The username was not modified."}],"available":"user"},{"kind":"method","name":"bots.toggleUsername","type":"Bool","id":87861619,"comment":"Activate or deactivate a purchased fragment.com username associated to a bot we own.","arguments":[{"name":"bot","type":"InputUser","comment":"The bot"},{"name":"username","type":"string","comment":"Username"},{"name":"active","type":"Bool","comment":"Whether to activate or deactivate it"}],"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."},{"code":400,"name":"USERNAME_NOT_MODIFIED","comment":"The username was not modified."}],"available":"user"},{"kind":"method","name":"bots.canSendMessage","type":"Bool","id":324662502,"comment":"Check whether the specified bot can send us messages","arguments":[{"name":"bot","type":"InputUser","comment":"The bot"}],"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."}],"available":"user"},{"kind":"method","name":"bots.allowSendMessage","type":"Updates","id":4046644207,"comment":"Allow the specified bot to send us messages","arguments":[{"name":"bot","type":"InputUser","comment":"The bot"}],"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."}],"available":"user"},{"kind":"method","name":"bots.invokeWebViewCustomMethod","type":"DataJSON","typeModifiers":{"constructorId":2104790276},"id":142591463,"comment":"Send a custom request from a mini bot app, triggered by a web_app_invoke_custom_method event ».\n\nThe response should be sent using a custom_method_invoked event, see here » for more info on the flow.","arguments":[{"name":"bot","type":"InputUser","comment":"Identifier of the bot associated to the mini bot app"},{"name":"custom_method","type":"string","comment":"Identifier of the custom method to invoke"},{"name":"params","type":"DataJSON","comment":"Method parameters"}],"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."},{"code":400,"name":"DATA_JSON_INVALID","comment":"The provided JSON data is invalid."}],"available":"user"},{"kind":"method","name":"bots.getPopularAppBots","type":"bots.PopularAppBots","typeModifiers":{"constructorId":428978491},"id":3260088722,"comment":"Fetch popular Main Mini Apps, to be used in the apps tab of global search ».","arguments":[{"name":"offset","type":"string","comment":"Offset for pagination, initially an empty string, then re-use the next_offset returned by the previous query."},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"}],"available":"user"},{"kind":"method","name":"bots.addPreviewMedia","type":"BotPreviewMedia","typeModifiers":{"constructorId":602479523},"id":397326170,"comment":"Add a main mini app preview, see here » for more info.\n\nOnly owners of bots with a configured Main Mini App can use this method, see see here » for more info on how to check if you can invoke this method.","arguments":[{"name":"bot","type":"InputUser","comment":"The bot that owns the Main Mini App."},{"name":"lang_code","type":"string","comment":"ISO 639-1 language code, indicating the localization of the preview to add."},{"name":"media","type":"InputMedia","comment":"The photo/video preview, uploaded using {@link messages.RawUploadMediaRequest}."}],"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."}],"available":"user"},{"kind":"method","name":"bots.editPreviewMedia","type":"BotPreviewMedia","typeModifiers":{"constructorId":602479523},"id":2233819247,"comment":"Edit a main mini app preview, see here » for more info.\n\nOnly owners of bots with a configured Main Mini App can use this method, see see here » for more info on how to check if you can invoke this method.","arguments":[{"name":"bot","type":"InputUser","comment":"The bot that owns the Main Mini App."},{"name":"lang_code","type":"string","comment":"ISO 639-1 language code, indicating the localization of the preview to edit."},{"name":"media","type":"InputMedia","comment":"The photo/video preview to replace, previously fetched as specified here »."},{"name":"new_media","type":"InputMedia","comment":"The new photo/video preview, uploaded using {@link messages.RawUploadMediaRequest}."}],"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."}],"available":"user"},{"kind":"method","name":"bots.deletePreviewMedia","type":"Bool","id":755054003,"comment":"Delete a main mini app preview, see here » for more info.\n\nOnly owners of bots with a configured Main Mini App can use this method, see see here » for more info on how to check if you can invoke this method.","arguments":[{"name":"bot","type":"InputUser","comment":"The bot that owns the Main Mini App."},{"name":"lang_code","type":"string","comment":"ISO 639-1 language code, indicating the localization of the preview to delete."},{"name":"media","type":"InputMedia","typeModifiers":{"isVector":true},"comment":"The photo/video preview to delete, previously fetched as specified here »."}],"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."}],"available":"user"},{"kind":"method","name":"bots.reorderPreviewMedias","type":"Bool","id":3056071594,"comment":"Reorder a main mini app previews, see here » for more info.\n\nOnly owners of bots with a configured Main Mini App can use this method, see see here » for more info on how to check if you can invoke this method.","arguments":[{"name":"bot","type":"InputUser","comment":"The bot that owns the Main Mini App."},{"name":"lang_code","type":"string","comment":"ISO 639-1 language code, indicating the localization of the previews to reorder."},{"name":"order","type":"InputMedia","typeModifiers":{"isVector":true},"comment":"New order of the previews."}],"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."}],"available":"user"},{"kind":"method","name":"bots.getPreviewInfo","type":"bots.PreviewInfo","typeModifiers":{"constructorId":212278628},"id":1111143341,"comment":"Bot owners only, fetch main mini app preview information, see here » for more info.\n\nNote: technically non-owners may also invoke this method, but it will always behave exactly as {@link bots.RawGetPreviewMediasRequest}, returning only previews for the current language and an empty lang_codes array, regardless of the passed lang_code, so please only use {@link bots.RawGetPreviewMediasRequest} if you're not the owner of the bot.","arguments":[{"name":"bot","type":"InputUser","comment":"The bot that owns the Main Mini App."},{"name":"lang_code","type":"string","comment":"Fetch previews for the specified ISO 639-1 language code."}],"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."}],"available":"user"},{"kind":"method","name":"bots.getPreviewMedias","type":"BotPreviewMedia","typeModifiers":{"isVector":true,"constructorId":602479523},"id":2728745293,"comment":"Fetch main mini app previews, see here » for more info.","arguments":[{"name":"bot","type":"InputUser","comment":"The bot that owns the Main Mini App."}],"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."}],"available":"user"},{"kind":"method","name":"payments.getPaymentForm","type":"payments.PaymentForm","id":924093883,"comment":"Get a payment form","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"invoice","type":"InputInvoice","comment":"Invoice"},{"name":"theme_params","type":"DataJSON","typeModifiers":{"predicate":"flags.0"},"comment":"A JSON object with the following keys, containing color theme information (integers, RGB24) to pass to the payment provider, to apply in eventual verification pages:
bg_color - Background color
text_color - Text color
hint_color - Hint text color
link_color - Link color
button_color - Button color
button_text_color - Button text color"}],"throws":[{"code":400,"name":"BOOST_PEER_INVALID","comment":"The specified boost_peer is invalid."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"SLUG_INVALID","comment":"The specified invoice slug is invalid."},{"code":400,"name":"UNTIL_DATE_INVALID","comment":"Invalid until date provided."}],"available":"user"},{"kind":"method","name":"payments.getPaymentReceipt","type":"payments.PaymentReceipt","id":611897804,"comment":"Get payment receipt","arguments":[{"name":"peer","type":"InputPeer","comment":"The peer where the payment receipt was sent"},{"name":"msg_id","type":"int","comment":"Message ID of receipt"}],"throws":[{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."}],"available":"user"},{"kind":"method","name":"payments.validateRequestedInfo","type":"payments.ValidatedRequestedInfo","typeModifiers":{"constructorId":3510966403},"id":3066622251,"comment":"Submit requested order information for validation","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"save","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Save order information to re-use it for future orders"},{"name":"invoice","type":"InputInvoice","comment":"Invoice"},{"name":"info","type":"PaymentRequestedInfo","comment":"Requested order information"}],"throws":[{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"payments.sendPaymentForm","type":"payments.PaymentResult","id":755192367,"comment":"Send compiled payment form","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"form_id","type":"long","comment":"Form ID"},{"name":"invoice","type":"InputInvoice","comment":"Invoice"},{"name":"requested_info_id","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"ID of saved and validated {@link payments.RawValidatedRequestedInfo}"},{"name":"shipping_option_id","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Chosen shipping option ID"},{"name":"credentials","type":"InputPaymentCredentials","comment":"Payment credentials"},{"name":"tip_amount","type":"long","typeModifiers":{"predicate":"flags.2"},"comment":"Tip, in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."}],"throws":[{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"payments.getSavedInfo","type":"payments.SavedInfo","typeModifiers":{"constructorId":4220511292},"id":578650699,"comment":"Get saved payment information","arguments":[],"available":"user"},{"kind":"method","name":"payments.clearSavedInfo","type":"Bool","id":3627905217,"comment":"Clear saved payment information","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"credentials","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Remove saved payment credentials"},{"name":"info","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Clear the last order settings saved by the user"}],"available":"user"},{"kind":"method","name":"payments.getBankCardData","type":"payments.BankCardData","typeModifiers":{"constructorId":1042605427},"id":779736953,"comment":"Get info about a credit card","arguments":[{"name":"number","type":"string","comment":"Credit card number"}],"throws":[{"code":400,"name":"BANK_CARD_NUMBER_INVALID","comment":"The specified card number is invalid."}],"available":"user"},{"kind":"method","name":"payments.exportInvoice","type":"payments.ExportedInvoice","typeModifiers":{"constructorId":2932919257},"id":261206117,"comment":"Generate an invoice deep link","arguments":[{"name":"invoice_media","type":"InputMedia","comment":"Invoice"}],"throws":[{"code":400,"name":"CURRENCY_TOTAL_AMOUNT_INVALID","comment":"The total amount of all prices is invalid."},{"code":400,"name":"INVOICE_PAYLOAD_INVALID","comment":"The specified invoice payload is invalid."},{"code":400,"name":"MEDIA_INVALID","comment":"Media invalid."},{"code":400,"name":"PAYMENT_PROVIDER_INVALID","comment":"The specified payment provider is invalid."}],"available":"both"},{"kind":"method","name":"payments.assignAppStoreTransaction","type":"Updates","id":2163045501,"comment":"Informs server about a purchase made through the App Store: for official applications only.","arguments":[{"name":"receipt","type":"bytes","comment":"Receipt"},{"name":"purpose","type":"InputStorePaymentPurpose","comment":"Payment purpose"}],"throws":[{"code":400,"name":"RECEIPT_EMPTY","comment":"The specified receipt is empty."}],"available":"user"},{"kind":"method","name":"payments.assignPlayMarketTransaction","type":"Updates","id":3757920467,"comment":"Informs server about a purchase made through the Play Store: for official applications only.","arguments":[{"name":"receipt","type":"DataJSON","comment":"Receipt"},{"name":"purpose","type":"InputStorePaymentPurpose","comment":"Payment purpose"}],"throws":[{"code":400,"name":"DATA_JSON_INVALID","comment":"The provided JSON data is invalid."}],"available":"user"},{"kind":"method","name":"payments.canPurchasePremium","type":"Bool","id":2680266422,"comment":"Checks whether Telegram Premium purchase is possible. Must be called before in-store Premium purchase, official apps only.","arguments":[{"name":"purpose","type":"InputStorePaymentPurpose","comment":"Payment purpose"}],"throws":[{"code":406,"name":"PREMIUM_CURRENTLY_UNAVAILABLE","comment":"You cannot currently purchase a Premium subscription."}],"available":"user"},{"kind":"method","name":"payments.getPremiumGiftCodeOptions","type":"PremiumGiftCodeOption","typeModifiers":{"isVector":true,"constructorId":629052971},"id":660060756,"comment":"Obtain a list of Telegram Premium giveaway/gift code » options.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"boost_peer","type":"InputPeer","typeModifiers":{"predicate":"flags.0"},"comment":"The channel that will start the giveaway"}],"available":"user"},{"kind":"method","name":"payments.checkGiftCode","type":"payments.CheckedGiftCode","typeModifiers":{"constructorId":675942550},"id":2387719361,"comment":"Obtain information about a Telegram Premium giftcode »","arguments":[{"name":"slug","type":"string","comment":"The giftcode to check"}],"throws":[{"code":400,"name":"GIFT_SLUG_EXPIRED","comment":"The specified gift slug has expired."},{"code":400,"name":"GIFT_SLUG_INVALID","comment":"The specified slug is invalid."}],"available":"user"},{"kind":"method","name":"payments.applyGiftCode","type":"Updates","id":4142032980,"comment":"Apply a Telegram Premium giftcode »","arguments":[{"name":"slug","type":"string","comment":"The code to apply"}],"throws":[{"code":400,"name":"GIFT_SLUG_EXPIRED","comment":"The specified gift slug has expired."},{"code":400,"name":"GIFT_SLUG_INVALID","comment":"The specified slug is invalid."},{"code":420,"name":"PREMIUM_SUB_ACTIVE_UNTIL_%d","comment":"You already have a premium subscription active until unixtime %d ."}],"available":"user"},{"kind":"method","name":"payments.getGiveawayInfo","type":"payments.GiveawayInfo","id":4095972389,"comment":"Obtain information about a Telegram Premium giveaway ».","arguments":[{"name":"peer","type":"InputPeer","comment":"The peer where the giveaway was posted."},{"name":"msg_id","type":"int","comment":"Message ID of the {@link RawMessageActionGiveawayLaunch} service message"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"payments.launchPrepaidGiveaway","type":"Updates","id":1609928480,"comment":"Launch a prepaid giveaway ».","arguments":[{"name":"peer","type":"InputPeer","comment":"The peer where to launch the giveaway."},{"name":"giveaway_id","type":"long","comment":"The prepaid giveaway ID."},{"name":"purpose","type":"InputStorePaymentPurpose","comment":"Giveway parameters"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"payments.getStarsTopupOptions","type":"StarsTopupOption","typeModifiers":{"isVector":true,"constructorId":198776256},"id":3222194131,"comment":"Obtain a list of Telegram Stars topup options » as {@link RawStarsTopupOption} constructors.","arguments":[],"available":"user"},{"kind":"method","name":"payments.getStarsStatus","type":"payments.StarsStatus","typeModifiers":{"constructorId":2364862048},"id":273665959,"comment":"Get the current Telegram Stars balance of the current account (with peer={@link RawInputPeerSelf}), or the stars balance of the bot specified in peer.","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer of which to get the balance."}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"payments.getStarsTransactions","type":"payments.StarsStatus","typeModifiers":{"constructorId":2364862048},"id":2543029594,"comment":"Fetch Telegram Stars transactions.\n\nThe inbound and outbound flags are mutually exclusive: if none of the two are set, both incoming and outgoing transactions are fetched.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"inbound","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, fetches only incoming transactions."},{"name":"outbound","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"If set, fetches only outgoing transactions."},{"name":"ascending","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Return transactions in ascending order by date (instead of descending order by date)."},{"name":"peer","type":"InputPeer","comment":"Fetch the transaction history of the peer ({@link RawInputPeerSelf} or a bot we own)."},{"name":"offset","type":"string","comment":"Offset for pagination, obtained from the returned next_offset, initially an empty string »."},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"}],"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"both"},{"kind":"method","name":"payments.sendStarsForm","type":"payments.PaymentResult","id":45839133,"comment":"Make a payment using Telegram Stars, see here » for more info.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"form_id","type":"long","comment":"Payment form ID"},{"name":"invoice","type":"InputInvoice","comment":"Invoice"}],"throws":[{"code":400,"name":"BALANCE_TOO_LOW","comment":"The transaction cannot be completed because the current Telegram Stars balance is too low."},{"code":400,"name":"FORM_EXPIRED","comment":"The form was generated more than 10 minutes ago and has expired, please re-generate it using {@link payments.RawGetPaymentFormRequest} and pass the new form_id."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"payments.refundStarsCharge","type":"Updates","id":632196938,"comment":"Refund a Telegram Stars transaction, see here » for more info.","arguments":[{"name":"user_id","type":"InputUser","comment":"User to refund."},{"name":"charge_id","type":"string","comment":"Transaction ID."}],"throws":[{"code":400,"name":"CHARGE_ALREADY_REFUNDED","comment":"The transaction was already refunded."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"bot"},{"kind":"method","name":"payments.getStarsRevenueStats","type":"payments.StarsRevenueStats","typeModifiers":{"constructorId":3375085371},"id":3642751702,"comment":"Get Telegram Star revenue statistics ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"dark","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to enable dark theme for graph colors"},{"name":"peer","type":"InputPeer","comment":"Get statistics for the specified bot, channel or ourselves ({@link RawInputPeerSelf})."}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"payments.getStarsRevenueWithdrawalUrl","type":"payments.StarsRevenueWithdrawalUrl","typeModifiers":{"constructorId":497778871},"id":331081907,"comment":"Withdraw funds from a channel or bot's star balance ».","arguments":[{"name":"peer","type":"InputPeer","comment":"Channel or bot from which to withdraw funds."},{"name":"stars","type":"long","comment":"Amount of stars to withdraw."},{"name":"password","type":"InputCheckPasswordSRP","comment":"2FA password, see here » for more info."}],"throws":[{"code":400,"name":"PASSWORD_HASH_INVALID","comment":"The provided password hash is invalid."},{"code":400,"name":"PASSWORD_MISSING","comment":"You must enable 2FA before executing this operation."},{"code":400,"name":"PASSWORD_TOO_FRESH_%d","comment":"The password was modified less than 24 hours ago, try again in %d seconds."}],"available":"user"},{"kind":"method","name":"payments.getStarsRevenueAdsAccountUrl","type":"payments.StarsRevenueAdsAccountUrl","typeModifiers":{"constructorId":961445665},"id":3520589765,"comment":"Returns a URL for a Telegram Ad platform account that can be used to set up advertisements for channel/bot in peer, paid using the Telegram Stars owned by the specified peer, see here » for more info.","arguments":[{"name":"peer","type":"InputPeer","comment":"Channel or bot that owns the stars."}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"payments.getStarsTransactionsByID","type":"payments.StarsStatus","typeModifiers":{"constructorId":2364862048},"id":662973742,"comment":"Obtain info about Telegram Star transactions » using specific transaction IDs.","arguments":[{"name":"peer","type":"InputPeer","comment":"Channel or bot."},{"name":"id","type":"InputStarsTransaction","typeModifiers":{"isVector":true},"comment":"Transaction IDs."}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"payments.getStarsGiftOptions","type":"StarsGiftOption","typeModifiers":{"isVector":true,"constructorId":1577421297},"id":3553192904,"comment":"Obtain a list of Telegram Stars gift options » as {@link RawStarsGiftOption} constructors.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"user_id","type":"InputUser","typeModifiers":{"predicate":"flags.0"},"comment":"Receiver of the gift (optional)."}],"available":"user"},{"kind":"method","name":"stickers.createStickerSet","type":"messages.StickerSet","id":2418125671,"comment":"Create a stickerset.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"masks","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether this is a mask stickerset"},{"name":"emojis","type":"true","typeModifiers":{"predicate":"flags.5"},"comment":"Whether this is a custom emoji stickerset."},{"name":"text_color","type":"true","typeModifiers":{"predicate":"flags.6"},"comment":"Whether the color of TGS custom emojis contained in this set should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context. For custom emoji stickersets only."},{"name":"user_id","type":"InputUser","comment":"Stickerset owner"},{"name":"title","type":"string","comment":"Stickerset name, 1-64 chars"},{"name":"short_name","type":"string","comment":"Short name of sticker set, to be used in sticker deep links ». Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and, if called by a bot, must end in \"_by_\". is case insensitive. 1-64 characters."},{"name":"thumb","type":"InputDocument","typeModifiers":{"predicate":"flags.2"},"comment":"Thumbnail"},{"name":"stickers","type":"InputStickerSetItem","typeModifiers":{"isVector":true},"comment":"Stickers"},{"name":"software","type":"string","typeModifiers":{"predicate":"flags.3"},"comment":"Used when importing stickers using the sticker import SDKs, specifies the name of the software that created the stickers"},{"name":"animated","type":"true","typeModifiers":{"predicate":"flags.1"}},{"name":"videos","type":"true","typeModifiers":{"predicate":"flags.4"}}],"throws":[{"code":400,"name":"PACK_SHORT_NAME_INVALID","comment":"Short pack name invalid."},{"code":400,"name":"PACK_SHORT_NAME_OCCUPIED","comment":"A stickerpack with this name already exists."},{"code":400,"name":"PACK_TITLE_INVALID","comment":"The stickerpack title is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"STICKERS_EMPTY","comment":"No sticker provided."},{"code":400,"name":"STICKER_EMOJI_INVALID","comment":"Sticker emoji invalid."},{"code":400,"name":"STICKER_FILE_INVALID","comment":"Sticker file invalid."},{"code":400,"name":"STICKER_GIF_DIMENSIONS","comment":"The specified video sticker has invalid dimensions."},{"code":400,"name":"STICKER_PNG_DIMENSIONS","comment":"Sticker png dimensions invalid."},{"code":400,"name":"STICKER_PNG_NOPNG","comment":"One of the specified stickers is not a valid PNG file."},{"code":400,"name":"STICKER_TGS_NODOC","comment":"You must send the animated sticker as a document."},{"code":400,"name":"STICKER_TGS_NOTGS","comment":"Invalid TGS sticker provided."},{"code":400,"name":"STICKER_THUMB_PNG_NOPNG","comment":"Incorrect stickerset thumb file provided, PNG / WEBP expected."},{"code":400,"name":"STICKER_THUMB_TGS_NOTGS","comment":"Incorrect stickerset TGS thumb file provided."},{"code":400,"name":"STICKER_VIDEO_BIG","comment":"The specified video sticker is too big."},{"code":400,"name":"STICKER_VIDEO_NODOC","comment":"You must send the video sticker as a document."},{"code":400,"name":"STICKER_VIDEO_NOWEBM","comment":"The specified video sticker is not in webm format."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"both"},{"kind":"method","name":"stickers.removeStickerFromSet","type":"messages.StickerSet","id":4151709521,"comment":"Remove a sticker from the set where it belongs. The sticker set must have been created by the current user/bot.","arguments":[{"name":"sticker","type":"InputDocument","comment":"The sticker to remove"}],"throws":[{"code":400,"name":"STICKER_INVALID","comment":"The provided sticker is invalid."}],"available":"both"},{"kind":"method","name":"stickers.changeStickerPosition","type":"messages.StickerSet","id":4290172106,"comment":"Changes the absolute position of a sticker in the set to which it belongs. The sticker set must have been created by the current user/bot.","arguments":[{"name":"sticker","type":"InputDocument","comment":"The sticker"},{"name":"position","type":"int","comment":"The new position of the sticker, zero-based"}],"throws":[{"code":400,"name":"STICKER_INVALID","comment":"The provided sticker is invalid."}],"available":"both"},{"kind":"method","name":"stickers.addStickerToSet","type":"messages.StickerSet","id":2253651646,"comment":"Add a sticker to a stickerset. The sticker set must have been created by the current user/bot.","arguments":[{"name":"stickerset","type":"InputStickerSet","comment":"The stickerset"},{"name":"sticker","type":"InputStickerSetItem","comment":"The sticker"}],"throws":[{"code":400,"name":"STICKERPACK_STICKERS_TOO_MUCH","comment":"There are too many stickers in this stickerpack, you can't add any more."},{"code":406,"name":"STICKERSET_INVALID","comment":"The provided sticker set is invalid."},{"code":400,"name":"STICKERS_TOO_MUCH","comment":"There are too many stickers in this stickerpack, you can't add any more."},{"code":400,"name":"STICKER_PNG_NOPNG","comment":"One of the specified stickers is not a valid PNG file."},{"code":400,"name":"STICKER_TGS_NOTGS","comment":"Invalid TGS sticker provided."}],"available":"both"},{"kind":"method","name":"stickers.setStickerSetThumb","type":"messages.StickerSet","id":2808763282,"comment":"Set stickerset thumbnail","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"stickerset","type":"InputStickerSet","comment":"Stickerset"},{"name":"thumb","type":"InputDocument","typeModifiers":{"predicate":"flags.0"},"comment":"Thumbnail (only for normal stickersets, not custom emoji stickersets)."},{"name":"thumb_document_id","type":"long","typeModifiers":{"predicate":"flags.1"},"comment":"Only for custom emoji stickersets, ID of a custom emoji present in the set to use as thumbnail; pass 0 to fallback to the first custom emoji of the set."}],"throws":[{"code":400,"name":"STICKERSET_INVALID","comment":"The provided sticker set is invalid."},{"code":400,"name":"STICKER_THUMB_PNG_NOPNG","comment":"Incorrect stickerset thumb file provided, PNG / WEBP expected."},{"code":400,"name":"STICKER_THUMB_TGS_NOTGS","comment":"Incorrect stickerset TGS thumb file provided."}],"available":"both"},{"kind":"method","name":"stickers.checkShortName","type":"Bool","id":676017721,"comment":"Check whether the given short name is available","arguments":[{"name":"short_name","type":"string","comment":"Short name"}],"throws":[{"code":400,"name":"SHORT_NAME_INVALID","comment":"The specified short name is invalid."},{"code":400,"name":"SHORT_NAME_OCCUPIED","comment":"The specified short name is already in use."}],"available":"user"},{"kind":"method","name":"stickers.suggestShortName","type":"stickers.SuggestedShortName","typeModifiers":{"constructorId":2248056895},"id":1303364867,"comment":"Suggests a short name for a given stickerpack name","arguments":[{"name":"title","type":"string","comment":"Sticker pack name"}],"throws":[{"code":400,"name":"TITLE_INVALID","comment":"The specified stickerpack title is invalid."}],"available":"user"},{"kind":"method","name":"stickers.changeSticker","type":"messages.StickerSet","id":4115889852,"comment":"Update the keywords, emojis or mask coordinates of a sticker.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"sticker","type":"InputDocument","comment":"The sticker"},{"name":"emoji","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"If set, updates the emoji list associated to the sticker"},{"name":"mask_coords","type":"MaskCoords","typeModifiers":{"predicate":"flags.1"},"comment":"If set, updates the mask coordinates"},{"name":"keywords","type":"string","typeModifiers":{"predicate":"flags.2"},"comment":"If set, updates the sticker keywords (separated by commas). Can't be provided for mask stickers."}],"throws":[{"code":400,"name":"STICKER_INVALID","comment":"The provided sticker is invalid."}],"available":"both"},{"kind":"method","name":"stickers.renameStickerSet","type":"messages.StickerSet","id":306912256,"comment":"Renames a stickerset.","arguments":[{"name":"stickerset","type":"InputStickerSet","comment":"Stickerset to rename"},{"name":"title","type":"string","comment":"New stickerset title"}],"throws":[{"code":400,"name":"STICKERSET_INVALID","comment":"The provided sticker set is invalid."}],"available":"both"},{"kind":"method","name":"stickers.deleteStickerSet","type":"Bool","id":2272281492,"comment":"Deletes a stickerset we created.","arguments":[{"name":"stickerset","type":"InputStickerSet","comment":"Stickerset to delete"}],"throws":[{"code":400,"name":"STICKERSET_INVALID","comment":"The provided sticker set is invalid."}],"available":"both"},{"kind":"method","name":"stickers.replaceSticker","type":"messages.StickerSet","id":1184253338,"comment":"Replace a sticker in a stickerset ».","arguments":[{"name":"sticker","type":"InputDocument","comment":"Old sticker document."},{"name":"new_sticker","type":"InputStickerSetItem","comment":"New sticker."}],"throws":[{"code":400,"name":"STICKER_INVALID","comment":"The provided sticker is invalid."}],"available":"both"},{"kind":"method","name":"phone.getCallConfig","type":"DataJSON","typeModifiers":{"constructorId":2104790276},"id":1430593449,"comment":"Get phone call configuration to be passed to libtgvoip's shared config","arguments":[],"available":"user"},{"kind":"method","name":"phone.requestCall","type":"phone.PhoneCall","typeModifiers":{"constructorId":3968000320},"id":1124046573,"comment":"Start a telegram phone call","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"video","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to start a video call"},{"name":"user_id","type":"InputUser","comment":"Destination of the phone call"},{"name":"random_id","type":"int","comment":"Random ID to avoid resending the same object"},{"name":"g_a_hash","type":"bytes","comment":"Parameter for E2E encryption key exchange »"},{"name":"protocol","type":"PhoneCallProtocol","comment":"Phone call settings"}],"throws":[{"code":400,"name":"CALL_PROTOCOL_FLAGS_INVALID","comment":"Call protocol flags invalid."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"PARTICIPANT_VERSION_OUTDATED","comment":"The other participant does not use an up to date telegram client with support for calls."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."},{"code":403,"name":"USER_IS_BLOCKED","comment":"You were blocked by this user."},{"code":403,"name":"USER_PRIVACY_RESTRICTED","comment":"The user's privacy settings do not allow you to do this."}],"available":"user"},{"kind":"method","name":"phone.acceptCall","type":"phone.PhoneCall","typeModifiers":{"constructorId":3968000320},"id":1003664544,"comment":"Accept incoming call","arguments":[{"name":"peer","type":"InputPhoneCall","comment":"The call to accept"},{"name":"g_b","type":"bytes","comment":"Parameter for E2E encryption key exchange »"},{"name":"protocol","type":"PhoneCallProtocol","comment":"Phone call settings"}],"throws":[{"code":400,"name":"CALL_ALREADY_ACCEPTED","comment":"The call was already accepted."},{"code":400,"name":"CALL_ALREADY_DECLINED","comment":"The call was already declined."},{"code":500,"name":"CALL_OCCUPY_FAILED","comment":"The call failed because the user is already making another call."},{"code":400,"name":"CALL_PEER_INVALID","comment":"The provided call peer object is invalid."},{"code":406,"name":"CALL_PROTOCOL_COMPAT_LAYER_INVALID","comment":"The other side of the call does not support any of the VoIP protocols supported by the local client, as specified by the protocol.layer and protocol.library_versions fields."},{"code":400,"name":"CALL_PROTOCOL_FLAGS_INVALID","comment":"Call protocol flags invalid."}],"available":"user"},{"kind":"method","name":"phone.confirmCall","type":"phone.PhoneCall","typeModifiers":{"constructorId":3968000320},"id":788404002,"comment":"Complete phone call E2E encryption key exchange »","arguments":[{"name":"peer","type":"InputPhoneCall","comment":"The phone call"},{"name":"g_a","type":"bytes","comment":"Parameter for E2E encryption key exchange »"},{"name":"key_fingerprint","type":"long","comment":"Key fingerprint"},{"name":"protocol","type":"PhoneCallProtocol","comment":"Phone call settings"}],"throws":[{"code":400,"name":"CALL_ALREADY_DECLINED","comment":"The call was already declined."},{"code":400,"name":"CALL_PEER_INVALID","comment":"The provided call peer object is invalid."}],"available":"user"},{"kind":"method","name":"phone.receivedCall","type":"Bool","id":399855457,"comment":"Optional: notify the server that the user is currently busy in a call: this will automatically refuse all incoming phone calls until the current phone call is ended.","arguments":[{"name":"peer","type":"InputPhoneCall","comment":"The phone call we're currently in"}],"throws":[{"code":400,"name":"CALL_ALREADY_DECLINED","comment":"The call was already declined."},{"code":400,"name":"CALL_PEER_INVALID","comment":"The provided call peer object is invalid."}],"available":"user"},{"kind":"method","name":"phone.discardCall","type":"Updates","id":2999697856,"comment":"Refuse or end running call","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"video","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether this is a video call"},{"name":"peer","type":"InputPhoneCall","comment":"The phone call"},{"name":"duration","type":"int","comment":"Call duration"},{"name":"reason","type":"PhoneCallDiscardReason","comment":"Why was the call discarded"},{"name":"connection_id","type":"long","comment":"Preferred libtgvoip relay ID"}],"throws":[{"code":400,"name":"CALL_ALREADY_ACCEPTED","comment":"The call was already accepted."},{"code":500,"name":"CALL_OCCUPY_FAILED","comment":"The call failed because the user is already making another call."},{"code":400,"name":"CALL_PEER_INVALID","comment":"The provided call peer object is invalid."}],"available":"user"},{"kind":"method","name":"phone.setCallRating","type":"Updates","id":1508562471,"comment":"Rate a call, returns info about the rating message sent to the official VoIP bot.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"user_initiative","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether the user decided on their own initiative to rate the call"},{"name":"peer","type":"InputPhoneCall","comment":"The call to rate"},{"name":"rating","type":"int","comment":"Rating in 1-5 stars"},{"name":"comment","type":"string","comment":"An additional comment"}],"throws":[{"code":400,"name":"CALL_PEER_INVALID","comment":"The provided call peer object is invalid."}],"available":"user"},{"kind":"method","name":"phone.saveCallDebug","type":"Bool","id":662363518,"comment":"Send phone call debug data to server","arguments":[{"name":"peer","type":"InputPhoneCall","comment":"Phone call"},{"name":"debug","type":"DataJSON","comment":"Debug statistics obtained from libtgvoip"}],"throws":[{"code":400,"name":"CALL_PEER_INVALID","comment":"The provided call peer object is invalid."},{"code":400,"name":"DATA_JSON_INVALID","comment":"The provided JSON data is invalid."}],"available":"user"},{"kind":"method","name":"phone.sendSignalingData","type":"Bool","id":4286223235,"comment":"Send VoIP signaling data","arguments":[{"name":"peer","type":"InputPhoneCall","comment":"Phone call"},{"name":"data","type":"bytes","comment":"Signaling payload"}],"throws":[{"code":400,"name":"CALL_PEER_INVALID","comment":"The provided call peer object is invalid."}],"available":"user"},{"kind":"method","name":"phone.createGroupCall","type":"Updates","id":1221445336,"comment":"Create a group call or livestream","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"rtmp_stream","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether RTMP stream support should be enabled: only the group/supergroup/channel owner can use this flag."},{"name":"peer","type":"InputPeer","comment":"Associate the group call or livestream to the provided group/supergroup/channel"},{"name":"random_id","type":"int","comment":"Unique client message ID required to prevent creation of duplicate group calls"},{"name":"title","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Call title"},{"name":"schedule_date","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"For scheduled group call or livestreams, the absolute date when the group call will start"}],"throws":[{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CREATE_CALL_FAILED","comment":"An error occurred while creating the call."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"SCHEDULE_DATE_INVALID","comment":"Invalid schedule date provided."}],"available":"user"},{"kind":"method","name":"phone.joinGroupCall","type":"Updates","id":2972909435,"comment":"Join a group call","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"muted","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"If set, the user will be muted by default upon joining."},{"name":"video_stopped","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"If set, the user's video will be disabled by default upon joining."},{"name":"call","type":"InputGroupCall","comment":"The group call"},{"name":"join_as","type":"InputPeer","comment":"Join the group call, presenting yourself as the specified user/channel"},{"name":"invite_hash","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"The invitation hash from the invite link », if provided allows speaking in a livestream or muted group chat."},{"name":"params","type":"DataJSON","comment":"WebRTC parameters"}],"throws":[{"code":400,"name":"DATA_JSON_INVALID","comment":"The provided JSON data is invalid."},{"code":403,"name":"GROUPCALL_FORBIDDEN","comment":"The group call has already ended."},{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."},{"code":400,"name":"GROUPCALL_SSRC_DUPLICATE_MUCH","comment":"The app needs to retry joining the group call with a new SSRC value."},{"code":400,"name":"JOIN_AS_PEER_INVALID","comment":"The specified peer cannot be used to join a group call."}],"available":"user"},{"kind":"method","name":"phone.leaveGroupCall","type":"Updates","id":1342404601,"comment":"Leave a group call","arguments":[{"name":"call","type":"InputGroupCall","comment":"The group call"},{"name":"source","type":"int","comment":"Your source ID"}],"throws":[{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."}],"available":"user"},{"kind":"method","name":"phone.inviteToGroupCall","type":"Updates","id":2067345760,"comment":"Invite a set of users to a group call.","arguments":[{"name":"call","type":"InputGroupCall","comment":"The group call"},{"name":"users","type":"InputUser","typeModifiers":{"isVector":true},"comment":"The users to invite."}],"throws":[{"code":403,"name":"GROUPCALL_FORBIDDEN","comment":"The group call has already ended."},{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."},{"code":400,"name":"INVITE_FORBIDDEN_WITH_JOINAS","comment":"If the user has anonymously joined a group call as a channel, they can't invite other users to the group call because that would cause deanonymization, because the invite would be sent using the original user ID, not the anonymized channel ID."},{"code":400,"name":"USER_ALREADY_INVITED","comment":"You have already invited this user."},{"code":403,"name":"USER_NOT_PARTICIPANT","comment":"You're not a member of this supergroup/channel."}],"available":"user"},{"kind":"method","name":"phone.discardGroupCall","type":"Updates","id":2054648117,"comment":"Terminate a group call","arguments":[{"name":"call","type":"InputGroupCall","comment":"The group call to terminate"}],"throws":[{"code":400,"name":"GROUPCALL_ALREADY_DISCARDED","comment":"The group call was already discarded."},{"code":403,"name":"GROUPCALL_FORBIDDEN","comment":"The group call has already ended."},{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."}],"available":"user"},{"kind":"method","name":"phone.toggleGroupCallSettings","type":"Updates","id":1958458429,"comment":"Change group call settings","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"reset_invite_hash","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Invalidate existing invite links"},{"name":"call","type":"InputGroupCall","comment":"Group call"},{"name":"join_muted","type":"Bool","typeModifiers":{"predicate":"flags.0"},"comment":"Whether all users will that join this group call are muted by default upon joining the group call"}],"throws":[{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."},{"code":400,"name":"GROUPCALL_NOT_MODIFIED","comment":"Group call settings weren't modified."}],"available":"user"},{"kind":"method","name":"phone.getGroupCall","type":"phone.GroupCall","typeModifiers":{"constructorId":2658302637},"id":68699611,"comment":"Get info about a group call","arguments":[{"name":"call","type":"InputGroupCall","comment":"The group call"},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"}],"throws":[{"code":403,"name":"GROUPCALL_FORBIDDEN","comment":"The group call has already ended."},{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."}],"available":"user"},{"kind":"method","name":"phone.getGroupParticipants","type":"phone.GroupParticipants","typeModifiers":{"constructorId":4101460406},"id":3310934187,"comment":"Get group call participants","arguments":[{"name":"call","type":"InputGroupCall","comment":"Group call"},{"name":"ids","type":"InputPeer","typeModifiers":{"isVector":true},"comment":"If specified, will fetch group participant info about the specified peers"},{"name":"sources","type":"int","typeModifiers":{"isVector":true},"comment":"If specified, will fetch group participant info about the specified WebRTC source IDs"},{"name":"offset","type":"string","comment":"Offset for results, taken from the next_offset field of {@link phone.RawGroupParticipants}, initially an empty string.
Note: if no more results are available, the method call will return an empty next_offset; thus, avoid providing the next_offset returned in {@link phone.RawGroupParticipants} if it is empty, to avoid an infinite loop."},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"}],"throws":[{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."}],"available":"user"},{"kind":"method","name":"phone.checkGroupCall","type":"int","typeModifiers":{"isVector":true},"id":3046963575,"comment":"Check whether the group call Server Forwarding Unit is currently receiving the streams with the specified WebRTC source IDs.
\nReturns an intersection of the source IDs specified in sources, and the source IDs currently being forwarded by the SFU.","arguments":[{"name":"call","type":"InputGroupCall","comment":"Group call"},{"name":"sources","type":"int","typeModifiers":{"isVector":true},"comment":"Source IDs"}],"throws":[{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."},{"code":400,"name":"GROUPCALL_JOIN_MISSING","comment":"You haven't joined this group call."}],"available":"user"},{"kind":"method","name":"phone.toggleGroupCallRecord","type":"Updates","id":4045981448,"comment":"Start or stop recording a group call: the recorded audio and video streams will be automatically sent to Saved messages (the chat with ourselves).","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"start","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to start or stop recording"},{"name":"video","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether to also record video streams"},{"name":"call","type":"InputGroupCall","comment":"The group call or livestream"},{"name":"title","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Recording title"},{"name":"video_portrait","type":"Bool","typeModifiers":{"predicate":"flags.2"},"comment":"If video stream recording is enabled, whether to record in portrait or landscape mode"}],"throws":[{"code":403,"name":"GROUPCALL_FORBIDDEN","comment":"The group call has already ended."},{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."},{"code":400,"name":"GROUPCALL_NOT_MODIFIED","comment":"Group call settings weren't modified."}],"available":"user"},{"kind":"method","name":"phone.editGroupCallParticipant","type":"Updates","id":2770811583,"comment":"Edit information about a given group call participant\n\nNote: flags.N?Bool parameters can have three possible values:","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"call","type":"InputGroupCall","comment":"The group call"},{"name":"participant","type":"InputPeer","comment":"The group call participant (can also be the user itself)"},{"name":"muted","type":"Bool","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to mute or unmute the specified participant"},{"name":"volume","type":"int","typeModifiers":{"predicate":"flags.1"},"comment":"New volume"},{"name":"raise_hand","type":"Bool","typeModifiers":{"predicate":"flags.2"},"comment":"Raise or lower hand"},{"name":"video_stopped","type":"Bool","typeModifiers":{"predicate":"flags.3"},"comment":"Start or stop the video stream"},{"name":"video_paused","type":"Bool","typeModifiers":{"predicate":"flags.4"},"comment":"Pause or resume the video stream"},{"name":"presentation_paused","type":"Bool","typeModifiers":{"predicate":"flags.5"},"comment":"Pause or resume the screen sharing stream"}],"throws":[{"code":403,"name":"GROUPCALL_FORBIDDEN","comment":"The group call has already ended."},{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."},{"code":400,"name":"PARTICIPANT_JOIN_MISSING","comment":"Trying to enable a presentation, when the user hasn't joined the Video Chat with {@link phone.RawJoinGroupCallRequest}."},{"code":400,"name":"RAISE_HAND_FORBIDDEN","comment":"You cannot raise your hand."},{"code":400,"name":"USER_VOLUME_INVALID","comment":"The specified user volume is invalid."},{"code":400,"name":"VIDEO_PAUSE_FORBIDDEN","comment":"You cannot pause the video stream."},{"code":400,"name":"VIDEO_STOP_FORBIDDEN","comment":"You cannot stop the video stream."}],"available":"user"},{"kind":"method","name":"phone.editGroupCallTitle","type":"Updates","id":480685066,"comment":"Edit the title of a group call or livestream","arguments":[{"name":"call","type":"InputGroupCall","comment":"Group call"},{"name":"title","type":"string","comment":"New title"}],"throws":[{"code":403,"name":"GROUPCALL_FORBIDDEN","comment":"The group call has already ended."},{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."}],"available":"user"},{"kind":"method","name":"phone.getGroupCallJoinAs","type":"phone.JoinAsPeers","typeModifiers":{"constructorId":2951045695},"id":4017889594,"comment":"Get a list of peers that can be used to join a group call, presenting yourself as a specific user/channel.","arguments":[{"name":"peer","type":"InputPeer","comment":"The dialog whose group call or livestream we're trying to join"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"phone.exportGroupCallInvite","type":"phone.ExportedGroupCallInvite","typeModifiers":{"constructorId":541839704},"id":3869926527,"comment":"Get an invite link for a group call or livestream","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"can_self_unmute","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"For livestreams or muted group chats, if set, users that join using this link will be able to speak without explicitly requesting permission by (for example by raising their hand)."},{"name":"call","type":"InputGroupCall","comment":"The group call"}],"throws":[{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."},{"code":403,"name":"PUBLIC_CHANNEL_MISSING","comment":"You can only export group call invite links for public chats or channels."}],"available":"user"},{"kind":"method","name":"phone.toggleGroupCallStartSubscription","type":"Updates","id":563885286,"comment":"Subscribe or unsubscribe to a scheduled group call","arguments":[{"name":"call","type":"InputGroupCall","comment":"Scheduled group call"},{"name":"subscribed","type":"Bool","comment":"Enable or disable subscription"}],"throws":[{"code":403,"name":"GROUPCALL_ALREADY_STARTED","comment":"The groupcall has already started, you can join directly using {@link phone.RawJoinGroupCallRequest}."},{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."}],"available":"user"},{"kind":"method","name":"phone.startScheduledGroupCall","type":"Updates","id":1451287362,"comment":"Start a scheduled group call.","arguments":[{"name":"call","type":"InputGroupCall","comment":"The scheduled group call"}],"throws":[{"code":403,"name":"GROUPCALL_ALREADY_STARTED","comment":"The groupcall has already started, you can join directly using {@link phone.RawJoinGroupCallRequest}."},{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."}],"available":"user"},{"kind":"method","name":"phone.saveDefaultGroupCallJoinAs","type":"Bool","id":1465786252,"comment":"Set the default peer that will be used to join a group call in a specific dialog.","arguments":[{"name":"peer","type":"InputPeer","comment":"The dialog"},{"name":"join_as","type":"InputPeer","comment":"The default peer that will be used to join group calls in this dialog, presenting yourself as a specific user/channel."}],"throws":[{"code":400,"name":"JOIN_AS_PEER_INVALID","comment":"The specified peer cannot be used to join a group call."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"phone.joinGroupCallPresentation","type":"Updates","id":3421137860,"comment":"Start screen sharing in a call","arguments":[{"name":"call","type":"InputGroupCall","comment":"The group call"},{"name":"params","type":"DataJSON","comment":"WebRTC parameters"}],"throws":[{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."},{"code":403,"name":"PARTICIPANT_JOIN_MISSING","comment":"Trying to enable a presentation, when the user hasn't joined the Video Chat with {@link phone.RawJoinGroupCallRequest}."}],"available":"user"},{"kind":"method","name":"phone.leaveGroupCallPresentation","type":"Updates","id":475058500,"comment":"Stop screen sharing in a group call","arguments":[{"name":"call","type":"InputGroupCall","comment":"The group call"}],"throws":[{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."}],"available":"user"},{"kind":"method","name":"phone.getGroupCallStreamChannels","type":"phone.GroupCallStreamChannels","typeModifiers":{"constructorId":3504636594},"id":447879488,"comment":"Get info about RTMP streams in a group call or livestream.
\nThis method should be invoked to the same group/channel-related DC used for downloading livestream chunks.
\nAs usual, the media DC is preferred, if available.","arguments":[{"name":"call","type":"InputGroupCall","comment":"Group call or livestream"}],"throws":[{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."},{"code":400,"name":"GROUPCALL_JOIN_MISSING","comment":"You haven't joined this group call."}],"available":"user"},{"kind":"method","name":"phone.getGroupCallStreamRtmpUrl","type":"phone.GroupCallStreamRtmpUrl","typeModifiers":{"constructorId":767505458},"id":3736316863,"comment":"Get RTMP URL and stream key for RTMP livestreams. Can be used even before creating the actual RTMP livestream with {@link phone.RawCreateGroupCallRequest} (the rtmp_stream flag must be set).","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer to livestream into"},{"name":"revoke","type":"Bool","comment":"Whether to revoke the previous stream key or simply return the existing one"}],"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"phone.saveCallLog","type":"Bool","id":1092913030,"comment":"Save phone call debug information","arguments":[{"name":"peer","type":"InputPhoneCall","comment":"Phone call"},{"name":"file","type":"InputFile","comment":"Logs"}],"throws":[{"code":400,"name":"CALL_PEER_INVALID","comment":"The provided call peer object is invalid."}],"available":"user"},{"kind":"method","name":"langpack.getLangPack","type":"LangPackDifference","typeModifiers":{"constructorId":4085629430},"id":4075959050,"comment":"Get localization pack strings","arguments":[{"name":"lang_pack","type":"string","comment":"Platform identifier (i.e. android, tdesktop, etc)."},{"name":"lang_code","type":"string","comment":"Either an ISO 639-1 language code or a language pack name obtained from a language pack link."}],"throws":[{"code":400,"name":"LANGUAGE_INVALID","comment":"The specified lang_code is invalid."},{"code":400,"name":"LANG_CODE_NOT_SUPPORTED","comment":"The specified language code is not supported."},{"code":400,"name":"LANG_PACK_INVALID","comment":"The provided language pack is invalid."}],"available":"user"},{"kind":"method","name":"langpack.getStrings","type":"LangPackString","typeModifiers":{"isVector":true},"id":4025104387,"comment":"Get strings from a language pack","arguments":[{"name":"lang_pack","type":"string","comment":"Platform identifier (i.e. android, tdesktop, etc)."},{"name":"lang_code","type":"string","comment":"Either an ISO 639-1 language code or a language pack name obtained from a language pack link."},{"name":"keys","type":"string","typeModifiers":{"isVector":true},"comment":"Strings to get"}],"throws":[{"code":400,"name":"LANG_CODE_NOT_SUPPORTED","comment":"The specified language code is not supported."},{"code":400,"name":"LANG_PACK_INVALID","comment":"The provided language pack is invalid."}],"available":"user"},{"kind":"method","name":"langpack.getDifference","type":"LangPackDifference","typeModifiers":{"constructorId":4085629430},"id":3449309861,"comment":"Get new strings in language pack","arguments":[{"name":"lang_pack","type":"string","comment":"Platform identifier (i.e. android, tdesktop, etc)."},{"name":"lang_code","type":"string","comment":"Either an ISO 639-1 language code or a language pack name obtained from a language pack link."},{"name":"from_version","type":"int","comment":"Previous localization pack version"}],"throws":[{"code":400,"name":"LANG_PACK_INVALID","comment":"The provided language pack is invalid."}],"available":"user"},{"kind":"method","name":"langpack.getLanguages","type":"LangPackLanguage","typeModifiers":{"isVector":true,"constructorId":4006239459},"id":1120311183,"comment":"Get information about all languages in a localization pack","arguments":[{"name":"lang_pack","type":"string","comment":"Platform identifier (i.e. android, tdesktop, etc)."}],"throws":[{"code":400,"name":"LANG_PACK_INVALID","comment":"The provided language pack is invalid."}],"available":"user"},{"kind":"method","name":"langpack.getLanguage","type":"LangPackLanguage","typeModifiers":{"constructorId":4006239459},"id":1784243458,"comment":"Get information about a language in a localization pack","arguments":[{"name":"lang_pack","type":"string","comment":"Platform identifier (i.e. android, tdesktop, etc)."},{"name":"lang_code","type":"string","comment":"Either an ISO 639-1 language code or a language pack name obtained from a language pack link."}],"throws":[{"code":400,"name":"LANG_CODE_NOT_SUPPORTED","comment":"The specified language code is not supported."},{"code":400,"name":"LANG_PACK_INVALID","comment":"The provided language pack is invalid."}],"available":"user"},{"kind":"method","name":"folders.editPeerFolders","type":"Updates","id":1749536939,"comment":"Edit peers in peer folder","arguments":[{"name":"folder_peers","type":"InputFolderPeer","typeModifiers":{"isVector":true},"comment":"New peer list"}],"throws":[{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"FOLDER_ID_INVALID","comment":"Invalid folder ID."}],"available":"user"},{"kind":"method","name":"stats.getBroadcastStats","type":"stats.BroadcastStats","typeModifiers":{"constructorId":963421692},"id":2873246746,"comment":"Get channel statistics","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"dark","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to enable dark theme for graph colors"},{"name":"channel","type":"InputChannel","comment":"The channel"}],"throws":[{"code":400,"name":"BROADCAST_REQUIRED","comment":"This method can only be called on a channel, please use stats.getMegagroupStats for supergroups."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."}],"available":"user"},{"kind":"method","name":"stats.loadAsyncGraph","type":"StatsGraph","id":1646092192,"comment":"Load channel statistics graph asynchronously","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"token","type":"string","comment":"Graph token from {@link RawStatsGraphAsync} constructor"},{"name":"x","type":"long","typeModifiers":{"predicate":"flags.0"},"comment":"Zoom value, if required"}],"throws":[{"code":400,"name":"GRAPH_EXPIRED_RELOAD","comment":"This graph has expired, please obtain a new graph token."},{"code":400,"name":"GRAPH_INVALID_RELOAD","comment":"Invalid graph token provided, please reload the stats and provide the updated token."},{"code":400,"name":"GRAPH_OUTDATED_RELOAD","comment":"The graph is outdated, please get a new async token using stats.getBroadcastStats."}],"available":"user"},{"kind":"method","name":"stats.getMegagroupStats","type":"stats.MegagroupStats","typeModifiers":{"constructorId":4018141462},"id":3705636359,"comment":"Get supergroup statistics","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"dark","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to enable dark theme for graph colors"},{"name":"channel","type":"InputChannel","comment":"Supergroup ID"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"MEGAGROUP_REQUIRED","comment":"You can only use this method on a supergroup."}],"available":"user"},{"kind":"method","name":"stats.getMessagePublicForwards","type":"stats.PublicForwards","typeModifiers":{"constructorId":2466479648},"id":1595212100,"comment":"Obtains a list of messages, indicating to which other public channels was a channel message forwarded.
\nWill return a list of {@link RawMessage} with peer_id equal to the public channel to which this message was forwarded.","arguments":[{"name":"channel","type":"InputChannel","comment":"Source channel"},{"name":"msg_id","type":"int","comment":"Source message ID"},{"name":"offset","type":"string","comment":"Offset for pagination, empty string on first call, then use the next_offset field of the returned constructor (if present, otherwise no more results are available)."},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"stats.getMessageStats","type":"stats.MessageStats","typeModifiers":{"constructorId":2145983508},"id":3068175349,"comment":"Get message statistics","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"dark","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to enable dark theme for graph colors"},{"name":"channel","type":"InputChannel","comment":"Channel ID"},{"name":"msg_id","type":"int","comment":"Message ID"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"stats.getStoryStats","type":"stats.StoryStats","typeModifiers":{"constructorId":1355613820},"id":927985472,"comment":"Get statistics for a certain story.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"dark","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to enable the dark theme for graph colors"},{"name":"peer","type":"InputPeer","comment":"The peer that posted the story"},{"name":"id","type":"int","comment":"Story ID"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"stats.getStoryPublicForwards","type":"stats.PublicForwards","typeModifiers":{"constructorId":2466479648},"id":2789441270,"comment":"Obtain forwards of a story as a message to public chats and reposts by public channels.","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer where the story was originally posted"},{"name":"id","type":"int","comment":"Story ID"},{"name":"offset","type":"string","comment":"Offset for pagination, from {@link stats.RawPublicForwards}.next_offset."},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"stats.getBroadcastRevenueStats","type":"stats.BroadcastRevenueStats","typeModifiers":{"constructorId":1409802903},"id":1977595505,"comment":"Get channel ad revenue statistics ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"dark","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to enable dark theme for graph colors"},{"name":"channel","type":"InputChannel","comment":"The channel"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."}],"available":"user"},{"kind":"method","name":"stats.getBroadcastRevenueWithdrawalUrl","type":"stats.BroadcastRevenueWithdrawalUrl","typeModifiers":{"constructorId":3966080823},"id":711323507,"comment":"Withdraw funds from a channel's ad revenue balance ».","arguments":[{"name":"channel","type":"InputChannel","comment":"The channel"},{"name":"password","type":"InputCheckPasswordSRP","comment":"2FA password, see here » for more info."}],"throws":[{"code":400,"name":"PASSWORD_HASH_INVALID","comment":"The provided password hash is invalid."},{"code":400,"name":"PASSWORD_MISSING","comment":"You must enable 2FA before executing this operation."},{"code":400,"name":"PASSWORD_TOO_FRESH_%d","comment":"The password was modified less than 24 hours ago, try again in %d seconds."}],"available":"user"},{"kind":"method","name":"stats.getBroadcastRevenueTransactions","type":"stats.BroadcastRevenueTransactions","typeModifiers":{"constructorId":2266334310},"id":6891535,"comment":"Fetch channel ad revenue transaction history ».","arguments":[{"name":"channel","type":"InputChannel","comment":"The channel"},{"name":"offset","type":"int","comment":"Offset for pagination"},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."}],"available":"user"},{"kind":"method","name":"chatlists.exportChatlistInvite","type":"chatlists.ExportedChatlistInvite","typeModifiers":{"constructorId":283567014},"id":2222081934,"comment":"Export a folder », creating a chat folder deep link ».","arguments":[{"name":"chatlist","type":"InputChatlist","comment":"The folder to export"},{"name":"title","type":"string","comment":"An optional name for the link"},{"name":"peers","type":"InputPeer","typeModifiers":{"isVector":true},"comment":"The list of channels, group and supergroups to share with the link. Basic groups will automatically be converted to supergroups when invoking the method."}],"throws":[{"code":400,"name":"FILTER_ID_INVALID","comment":"The specified filter ID is invalid."},{"code":400,"name":"FILTER_NOT_SUPPORTED","comment":"The specified filter cannot be used in this context."},{"code":400,"name":"INVITES_TOO_MUCH","comment":"The maximum number of per-folder invites specified by the chatlist_invites_limit_default/chatlist_invites_limit_premium client configuration parameters » was reached."},{"code":400,"name":"PEERS_LIST_EMPTY","comment":"The specified list of peers is empty."}],"available":"user"},{"kind":"method","name":"chatlists.deleteExportedInvite","type":"Bool","id":1906072670,"comment":"Delete a previously created chat folder deep link ».","arguments":[{"name":"chatlist","type":"InputChatlist","comment":"The related folder"},{"name":"slug","type":"string","comment":"slug obtained from the chat folder deep link »."}],"throws":[{"code":400,"name":"FILTER_ID_INVALID","comment":"The specified filter ID is invalid."},{"code":400,"name":"FILTER_NOT_SUPPORTED","comment":"The specified filter cannot be used in this context."}],"available":"user"},{"kind":"method","name":"chatlists.editExportedInvite","type":"ExportedChatlistInvite","typeModifiers":{"constructorId":206668204},"id":1698543165,"comment":"Edit a chat folder deep link ».","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"chatlist","type":"InputChatlist","comment":"Folder ID"},{"name":"slug","type":"string","comment":"slug obtained from the chat folder deep link »."},{"name":"title","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"If set, sets a new name for the link"},{"name":"peers","type":"InputPeer","typeModifiers":{"predicate":"flags.2","isVector":true},"comment":"If set, changes the list of peers shared with the link"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"FILTER_ID_INVALID","comment":"The specified filter ID is invalid."},{"code":400,"name":"FILTER_NOT_SUPPORTED","comment":"The specified filter cannot be used in this context."},{"code":400,"name":"INVITE_SLUG_EMPTY","comment":"The specified invite slug is empty."},{"code":400,"name":"INVITE_SLUG_EXPIRED","comment":"The specified chat folder link has expired."},{"code":400,"name":"PEERS_LIST_EMPTY","comment":"The specified list of peers is empty."}],"available":"user"},{"kind":"method","name":"chatlists.getExportedInvites","type":"chatlists.ExportedInvites","typeModifiers":{"constructorId":279670215},"id":3456359043,"comment":"List all chat folder deep links » associated to a folder","arguments":[{"name":"chatlist","type":"InputChatlist","comment":"The folder"}],"throws":[{"code":400,"name":"FILTER_ID_INVALID","comment":"The specified filter ID is invalid."}],"available":"user"},{"kind":"method","name":"chatlists.checkChatlistInvite","type":"chatlists.ChatlistInvite","id":1103171583,"comment":"Obtain information about a chat folder deep link ».","arguments":[{"name":"slug","type":"string","comment":"slug obtained from the chat folder deep link »"}],"throws":[{"code":400,"name":"INVITE_SLUG_EMPTY","comment":"The specified invite slug is empty."},{"code":400,"name":"INVITE_SLUG_EXPIRED","comment":"The specified chat folder link has expired."}],"available":"user"},{"kind":"method","name":"chatlists.joinChatlistInvite","type":"Updates","id":2796675994,"comment":"Import a chat folder deep link », joining some or all the chats in the folder.","arguments":[{"name":"slug","type":"string","comment":"slug obtained from a chat folder deep link »."},{"name":"peers","type":"InputPeer","typeModifiers":{"isVector":true},"comment":"List of new chats to join, fetched using {@link chatlists.RawCheckChatlistInviteRequest} and filtered as specified in the documentation »."}],"throws":[{"code":400,"name":"FILTER_INCLUDE_EMPTY","comment":"The include_peers vector of the filter is empty."},{"code":400,"name":"INVITE_SLUG_EMPTY","comment":"The specified invite slug is empty."},{"code":400,"name":"INVITE_SLUG_EXPIRED","comment":"The specified chat folder link has expired."}],"available":"user"},{"kind":"method","name":"chatlists.getChatlistUpdates","type":"chatlists.ChatlistUpdates","typeModifiers":{"constructorId":2478671757},"id":2302776609,"comment":"Fetch new chats associated with an imported chat folder deep link ». Must be invoked at most every chatlist_update_period seconds (as per the related client configuration parameter »).","arguments":[{"name":"chatlist","type":"InputChatlist","comment":"The folder"}],"throws":[{"code":400,"name":"FILTER_ID_INVALID","comment":"The specified filter ID is invalid."},{"code":400,"name":"FILTER_NOT_SUPPORTED","comment":"The specified filter cannot be used in this context."},{"code":400,"name":"INPUT_CHATLIST_INVALID","comment":"The specified folder is invalid."}],"available":"user"},{"kind":"method","name":"chatlists.joinChatlistUpdates","type":"Updates","id":3767138549,"comment":"Join channels and supergroups recently added to a chat folder deep link ».","arguments":[{"name":"chatlist","type":"InputChatlist","comment":"The folder"},{"name":"peers","type":"InputPeer","typeModifiers":{"isVector":true},"comment":"List of new chats to join, fetched using {@link chatlists.RawGetChatlistUpdatesRequest} and filtered as specified in the documentation »."}],"throws":[{"code":400,"name":"FILTER_ID_INVALID","comment":"The specified filter ID is invalid."},{"code":400,"name":"FILTER_INCLUDE_EMPTY","comment":"The include_peers vector of the filter is empty."}],"available":"user"},{"kind":"method","name":"chatlists.hideChatlistUpdates","type":"Bool","id":1726252795,"comment":"Dismiss new pending peers recently added to a chat folder deep link ».","arguments":[{"name":"chatlist","type":"InputChatlist","comment":"The folder"}],"throws":[{"code":400,"name":"FILTER_ID_INVALID","comment":"The specified filter ID is invalid."},{"code":400,"name":"FILTER_NOT_SUPPORTED","comment":"The specified filter cannot be used in this context."}],"available":"user"},{"kind":"method","name":"chatlists.getLeaveChatlistSuggestions","type":"Peer","typeModifiers":{"isVector":true},"id":4257011476,"comment":"Returns identifiers of pinned or always included chats from a chat folder imported using a chat folder deep link », which are suggested to be left when the chat folder is deleted.","arguments":[{"name":"chatlist","type":"InputChatlist","comment":"Folder ID"}],"throws":[{"code":400,"name":"FILTER_ID_INVALID","comment":"The specified filter ID is invalid."},{"code":400,"name":"FILTER_NOT_SUPPORTED","comment":"The specified filter cannot be used in this context."}],"available":"user"},{"kind":"method","name":"chatlists.leaveChatlist","type":"Updates","id":1962598714,"comment":"Delete a folder imported using a chat folder deep link »","arguments":[{"name":"chatlist","type":"InputChatlist","comment":"Folder ID"},{"name":"peers","type":"InputPeer","typeModifiers":{"isVector":true},"comment":"Also leave the specified channels and groups"}],"throws":[{"code":400,"name":"FILTER_ID_INVALID","comment":"The specified filter ID is invalid."}],"available":"user"},{"kind":"method","name":"stories.canSendStory","type":"Bool","id":3353337821,"comment":"Check whether we can post stories as the specified peer.","arguments":[{"name":"peer","type":"InputPeer","comment":"The peer from which we wish to post stories."}],"throws":[{"code":400,"name":"BOOSTS_REQUIRED","comment":"The specified channel must first be boosted by its users in order to perform this action."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."},{"code":400,"name":"STORIES_TOO_MUCH","comment":"You have hit the maximum active stories limit as specified by the story_expiring_limit_* client configuration parameters: you should buy a Premium subscription, delete an active story, or wait for the oldest story to expire."},{"code":400,"name":"STORY_SEND_FLOOD_MONTHLY_%d","comment":"You've hit the monthly story limit as specified by the stories_sent_monthly_limit_* client configuration parameters: wait for the specified number of seconds before posting a new story."},{"code":400,"name":"STORY_SEND_FLOOD_WEEKLY_%d","comment":"You've hit the weekly story limit as specified by the stories_sent_weekly_limit_* client configuration parameters: wait for the specified number of seconds before posting a new story."}],"available":"user"},{"kind":"method","name":"stories.sendStory","type":"Updates","id":3840305483,"comment":"Uploads a Telegram Story.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"pinned","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether to add the story to the profile automatically upon expiration. If not set, the story will only be added to the archive, see here » for more info."},{"name":"noforwards","type":"true","typeModifiers":{"predicate":"flags.4"},"comment":"If set, disables forwards, screenshots, and downloads."},{"name":"fwd_modified","type":"true","typeModifiers":{"predicate":"flags.7"},"comment":"Set this flag when reposting stories with fwd_from_id+fwd_from_id, if the media was modified before reposting."},{"name":"peer","type":"InputPeer","comment":"The peer to send the story as."},{"name":"media","type":"InputMedia","comment":"The story media."},{"name":"media_areas","type":"MediaArea","typeModifiers":{"predicate":"flags.5","isVector":true},"comment":"Media areas associated to the story, see here » for more info."},{"name":"caption","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Story caption."},{"name":"entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.1","isVector":true},"comment":"Message entities for styled text, if allowed by the stories_entities client configuration parameter »."},{"name":"privacy_rules","type":"InputPrivacyRule","typeModifiers":{"isVector":true},"comment":"Privacy rules for the story, indicating who can or can't view the story."},{"name":"random_id","type":"long","comment":"Unique client message ID required to prevent message resending."},{"name":"period","type":"int","typeModifiers":{"predicate":"flags.3"},"comment":"Period after which the story is moved to archive (and to the profile if pinned is set), in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 for Telegram Premium users, and 86400 otherwise."},{"name":"fwd_from_id","type":"InputPeer","typeModifiers":{"predicate":"flags.6"},"comment":"If set, indicates that this story is a repost of story with ID fwd_from_story posted by the peer in fwd_from_id."},{"name":"fwd_from_story","type":"int","typeModifiers":{"predicate":"flags.6"},"comment":"If set, indicates that this story is a repost of story with ID fwd_from_story posted by the peer in fwd_from_id."}],"throws":[{"code":400,"name":"BOOSTS_REQUIRED","comment":"The specified channel must first be boosted by its users in order to perform this action."},{"code":400,"name":"IMAGE_PROCESS_FAILED","comment":"Failure while processing image."},{"code":400,"name":"MEDIA_EMPTY","comment":"The provided media object is invalid."},{"code":400,"name":"MEDIA_FILE_INVALID","comment":"The specified media file is invalid."},{"code":400,"name":"MEDIA_TYPE_INVALID","comment":"The specified media type cannot be used in stories."},{"code":400,"name":"MEDIA_VIDEO_STORY_MISSING","comment":"A non-story video cannot be repubblished as a story (emitted when trying to resend a non-story video as a story using inputDocument)."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."},{"code":400,"name":"STORIES_TOO_MUCH","comment":"You have hit the maximum active stories limit as specified by the story_expiring_limit_* client configuration parameters: you should buy a Premium subscription, delete an active story, or wait for the oldest story to expire."},{"code":400,"name":"STORY_PERIOD_INVALID","comment":"The specified story period is invalid for this account."},{"code":400,"name":"VENUE_ID_INVALID","comment":"The specified venue ID is invalid."}],"available":"user"},{"kind":"method","name":"stories.editStory","type":"Updates","id":3045308998,"comment":"Edit an uploaded story","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"peer","type":"InputPeer","comment":"Peer where the story was posted."},{"name":"id","type":"int","comment":"ID of story to edit."},{"name":"media","type":"InputMedia","typeModifiers":{"predicate":"flags.0"},"comment":"If specified, replaces the story media."},{"name":"media_areas","type":"MediaArea","typeModifiers":{"predicate":"flags.3","isVector":true},"comment":"Media areas associated to the story, see here » for more info."},{"name":"caption","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"If specified, replaces the story caption."},{"name":"entities","type":"MessageEntity","typeModifiers":{"predicate":"flags.1","isVector":true},"comment":"Message entities for styled text in the caption, if allowed by the stories_entities client configuration parameter »."},{"name":"privacy_rules","type":"InputPrivacyRule","typeModifiers":{"predicate":"flags.2","isVector":true},"comment":"If specified, alters the privacy settings » of the story, changing who can or can't view the story."}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"STORY_NOT_MODIFIED","comment":"The new story information you passed is equal to the previous story information, thus it wasn't modified."}],"available":"user"},{"kind":"method","name":"stories.deleteStories","type":"int","typeModifiers":{"isVector":true},"id":2925124447,"comment":"Deletes some posted stories.","arguments":[{"name":"peer","type":"InputPeer","comment":"Channel/user from where to delete stories."},{"name":"id","type":"int","typeModifiers":{"isVector":true},"comment":"IDs of stories to delete."}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"STORY_ID_EMPTY","comment":"You specified no story IDs."}],"available":"user"},{"kind":"method","name":"stories.togglePinned","type":"int","typeModifiers":{"isVector":true},"id":2591400431,"comment":"Pin or unpin one or more stories","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer where to pin or unpin stories"},{"name":"id","type":"int","typeModifiers":{"isVector":true},"comment":"IDs of stories to pin or unpin"},{"name":"pinned","type":"Bool","comment":"Whether to pin or unpin the stories"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"stories.getAllStories","type":"stories.AllStories","id":4004566565,"comment":"Fetch the List of active (or active and hidden) stories, see here » for more info on watching stories.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"next","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"If next and state are both set, uses the passed state to paginate to the next results; if neither state nor next are set, fetches the initial page; if state is set and next is not set, check for changes in the active/hidden peerset, see here » for more info on the full flow."},{"name":"hidden","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"If set, fetches the hidden active story list, otherwise fetches the active story list, see here » for more info on the full flow."},{"name":"state","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"If next and state are both set, uses the passed state to paginate to the next results; if neither state nor next are set, fetches the initial page; if state is set and next is not set, check for changes in the active/hidden peerset, see here » for more info on the full flow."}],"available":"user"},{"kind":"method","name":"stories.getPinnedStories","type":"stories.Stories","typeModifiers":{"constructorId":1673780490},"id":1478600156,"comment":"Fetch the stories pinned on a peer's profile.","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer whose pinned stories should be fetched"},{"name":"offset_id","type":"int","comment":"Offsets for pagination, for more info click here"},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"user"},{"kind":"method","name":"stories.getStoriesArchive","type":"stories.Stories","typeModifiers":{"constructorId":1673780490},"id":3023380502,"comment":"Fetch the story archive » of a peer we control.","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer whose archived stories should be fetched"},{"name":"offset_id","type":"int","comment":"Offsets for pagination, for more info click here"},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"}],"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"stories.getStoriesByID","type":"stories.Stories","typeModifiers":{"constructorId":1673780490},"id":1467271796,"comment":"Obtain full info about a set of stories by their IDs.","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer where the stories were posted"},{"name":"id","type":"int","typeModifiers":{"isVector":true},"comment":"Story IDs"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"STORIES_NEVER_CREATED","comment":"This peer hasn't ever posted any stories."},{"code":400,"name":"STORY_ID_EMPTY","comment":"You specified no story IDs."}],"available":"user"},{"kind":"method","name":"stories.toggleAllStoriesHidden","type":"Bool","id":2082822084,"comment":"Hide the active stories of a specific peer, preventing them from being displayed on the action bar on the homescreen.","arguments":[{"name":"hidden","type":"Bool","comment":"Whether to hide or unhide all active stories of the peer"}],"available":"user"},{"kind":"method","name":"stories.readStories","type":"int","typeModifiers":{"isVector":true},"id":2773932744,"comment":"Mark all stories up to a certain ID as read, for a given peer; will emit an {@link RawUpdateReadStories} update to all logged-in sessions.","arguments":[{"name":"peer","type":"InputPeer","comment":"The peer whose stories should be marked as read."},{"name":"max_id","type":"int","comment":"Mark all stories up to and including this ID as read"}],"throws":[{"code":400,"name":"MAX_ID_INVALID","comment":"The provided max ID is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"STORIES_NEVER_CREATED","comment":"This peer hasn't ever posted any stories."}],"available":"user"},{"kind":"method","name":"stories.incrementStoryViews","type":"Bool","id":2986511099,"comment":"Increment the view counter of one or more stories.","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer where the stories were posted."},{"name":"id","type":"int","typeModifiers":{"isVector":true},"comment":"IDs of the stories (maximum 200 at a time)."}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"STORY_ID_EMPTY","comment":"You specified no story IDs."}],"available":"user"},{"kind":"method","name":"stories.getStoryViewsList","type":"stories.StoryViewsList","typeModifiers":{"constructorId":1507299269},"id":2127707223,"comment":"Obtain the list of users that have viewed a specific story we posted","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"just_contacts","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to only fetch view reaction/views made by our contacts"},{"name":"reactions_first","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"Whether to return {@link RawStoryView} info about users that reacted to the story (i.e. if set, the server will first sort results by view date as usual, and then also additionally sort the list by putting {@link RawStoryView}s with an associated reaction first in the list). Ignored if forwards_first is set."},{"name":"forwards_first","type":"true","typeModifiers":{"predicate":"flags.3"},"comment":"If set, returns forwards and reposts first, then reactions, then other views; otherwise returns interactions sorted just by interaction date."},{"name":"peer","type":"InputPeer","comment":"Peer where the story was posted"},{"name":"q","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Search for specific peers"},{"name":"id","type":"int","comment":"Story ID"},{"name":"offset","type":"string","comment":"Offset for pagination, obtained from {@link stories.RawStoryViewsList}.next_offset"},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"STORY_ID_INVALID","comment":"The specified story ID is invalid."}],"available":"user"},{"kind":"method","name":"stories.getStoriesViews","type":"stories.StoryViews","typeModifiers":{"constructorId":3734957341},"id":685862088,"comment":"Obtain info about the view count, forward count, reactions and recent viewers of one or more stories.","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer whose stories should be fetched"},{"name":"id","type":"int","typeModifiers":{"isVector":true},"comment":"Story IDs"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"STORY_ID_EMPTY","comment":"You specified no story IDs."}],"available":"user"},{"kind":"method","name":"stories.exportStoryLink","type":"ExportedStoryLink","typeModifiers":{"constructorId":1070138683},"id":2072899360,"comment":"Generate a story deep link for a specific story","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer where the story was posted"},{"name":"id","type":"int","comment":"Story ID"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"STORY_ID_EMPTY","comment":"You specified no story IDs."},{"code":400,"name":"USER_PUBLIC_MISSING","comment":"Cannot generate a link to stories posted by a peer without a username."}],"available":"user"},{"kind":"method","name":"stories.report","type":"Bool","id":421788300,"comment":"Report a story.","arguments":[{"name":"peer","type":"InputPeer","comment":"The peer that uploaded the story."},{"name":"id","type":"int","typeModifiers":{"isVector":true},"comment":"IDs of the stories to report."},{"name":"reason","type":"ReportReason","comment":"Why are these storeis being reported."},{"name":"message","type":"string","comment":"Comment for report moderation"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"stories.activateStealthMode","type":"Updates","id":1471926630,"comment":"Activates stories stealth mode, see here » for more info.\n\nWill return an {@link RawUpdateStoriesStealthMode}.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"past","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to erase views from any stories opened in the past stories_stealth_past_period seconds », as specified by the client configuration."},{"name":"future","type":"true","typeModifiers":{"predicate":"flags.1"},"comment":"Whether to hide future story views for the next stories_stealth_future_period seconds », as specified by the client configuration."}],"throws":[{"code":400,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."}],"available":"user"},{"kind":"method","name":"stories.sendReaction","type":"Updates","id":2144810674,"comment":"React to a story.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"add_to_recent","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to add this reaction to the recent reactions list »."},{"name":"peer","type":"InputPeer","comment":"The peer that sent the story"},{"name":"story_id","type":"int","comment":"ID of the story to react to"},{"name":"reaction","type":"Reaction","comment":"Reaction"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"REACTION_INVALID","comment":"The specified reaction is invalid."},{"code":400,"name":"STORY_ID_EMPTY","comment":"You specified no story IDs."},{"code":400,"name":"STORY_ID_INVALID","comment":"The specified story ID is invalid."}],"available":"user"},{"kind":"method","name":"stories.getPeerStories","type":"stories.PeerStories","typeModifiers":{"constructorId":3404105576},"id":743103056,"comment":"Fetch the full active story list of a specific peer.","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer whose stories should be fetched"}],"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"stories.getAllReadPeerStories","type":"Updates","id":2606426105,"comment":"Obtain the latest read story ID for all peers when first logging in, returned as a list of {@link RawUpdateReadStories} updates, see here » for more info.","arguments":[],"available":"user"},{"kind":"method","name":"stories.getPeerMaxIDs","type":"int","typeModifiers":{"isVector":true},"id":1398375363,"comment":"Get the IDs of the maximum read stories for a set of peers.","arguments":[{"name":"id","type":"InputPeer","typeModifiers":{"isVector":true},"comment":"Peers"}],"available":"user"},{"kind":"method","name":"stories.getChatsToSend","type":"messages.Chats","id":2775223136,"comment":"Obtain a list of channels where the user can post stories","arguments":[],"available":"user"},{"kind":"method","name":"stories.togglePeerStoriesHidden","type":"Bool","id":3171161540,"comment":"Hide the active stories of a user, preventing them from being displayed on the action bar on the homescreen, see here » for more info.","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer whose stories should be (un)hidden."},{"name":"hidden","type":"Bool","comment":"Whether to hide or unhide stories."}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"stories.getStoryReactionsList","type":"stories.StoryReactionsList","typeModifiers":{"constructorId":2858383516},"id":3115485215,"comment":"Get the reaction and interaction list of a story posted to a channel, along with the sender of each reaction.\n\nCan only be used by channel admins.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"forwards_first","type":"true","typeModifiers":{"predicate":"flags.2"},"comment":"If set, returns forwards and reposts first, then reactions, then other views; otherwise returns interactions sorted just by interaction date."},{"name":"peer","type":"InputPeer","comment":"Channel"},{"name":"id","type":"int","comment":"Story ID"},{"name":"reaction","type":"Reaction","typeModifiers":{"predicate":"flags.0"},"comment":"Get only reactions of this type"},{"name":"offset","type":"string","typeModifiers":{"predicate":"flags.1"},"comment":"Offset for pagination (taken from the next_offset field of the returned stories.StoryReactionsList); empty in the first request."},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"stories.togglePinnedToTop","type":"Bool","id":187268763,"comment":"Pin some stories to the top of the profile, see here » for more info.","arguments":[{"name":"peer","type":"InputPeer","comment":"Peer where to pin stories."},{"name":"id","type":"int","typeModifiers":{"isVector":true},"comment":"IDs of the stories to pin (max stories_pinned_to_top_count_max)."}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"STORY_ID_INVALID","comment":"The specified story ID is invalid."}],"available":"user"},{"kind":"method","name":"stories.searchPosts","type":"stories.FoundStories","typeModifiers":{"constructorId":3806230327},"id":1827279210,"comment":"Globally search for stories using a hashtag or a location media area, see here » for more info on the full flow.\n\nEither hashtag or area must be set when invoking the method.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"hashtag","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"Hashtag (without the #)"},{"name":"area","type":"MediaArea","typeModifiers":{"predicate":"flags.1"},"comment":"A {@link RawMediaAreaGeoPoint} or a {@link RawMediaAreaVenue}.
Note {@link RawMediaAreaGeoPoint} areas may be searched only if they have an associated address."},{"name":"offset","type":"string","comment":"Offset for pagination: initially an empty string, then the next_offset from the previously returned {@link stories.RawFoundStories}."},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"}],"throws":[{"code":400,"name":"HASHTAG_INVALID","comment":"The specified hashtag is invalid."}],"available":"user"},{"kind":"method","name":"premium.getBoostsList","type":"premium.BoostsList","typeModifiers":{"constructorId":2264424764},"id":1626764896,"comment":"Obtains info about the boosts that were applied to a certain channel or supergroup (admins only)","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"gifts","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Whether to return only info about boosts received from gift codes and giveaways created by the channel/supergroup »"},{"name":"peer","type":"InputPeer","comment":"The channel/supergroup"},{"name":"offset","type":"string","comment":"Offset for pagination, obtained from {@link premium.RawBoostsList}.next_offset"},{"name":"limit","type":"int","comment":"Maximum number of results to return, see pagination"}],"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"premium.getMyBoosts","type":"premium.MyBoosts","typeModifiers":{"constructorId":2598512866},"id":199719754,"comment":"Obtain which peers are we currently boosting, and how many boost slots we have left.","arguments":[],"available":"user"},{"kind":"method","name":"premium.applyBoost","type":"premium.MyBoosts","typeModifiers":{"constructorId":2598512866},"id":1803396934,"comment":"Apply one or more boosts » to a peer.","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"slots","type":"int","typeModifiers":{"predicate":"flags.0","isVector":true},"comment":"Which boost slots to assign to this peer."},{"name":"peer","type":"InputPeer","comment":"The peer to boost."}],"throws":[{"code":400,"name":"BOOSTS_EMPTY","comment":"No boost slots were specified."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"SLOTS_EMPTY","comment":"The specified slot list is empty."}],"available":"user"},{"kind":"method","name":"premium.getBoostsStatus","type":"premium.BoostsStatus","typeModifiers":{"constructorId":1230586490},"id":70197089,"comment":"Gets the current number of boosts of a channel/supergroup.","arguments":[{"name":"peer","type":"InputPeer","comment":"The peer."}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},{"kind":"method","name":"premium.getUserBoosts","type":"premium.BoostsList","typeModifiers":{"constructorId":2264424764},"id":965037343,"comment":"Returns the lists of boost that were applied to a channel/supergroup by a specific user (admins only)","arguments":[{"name":"peer","type":"InputPeer","comment":"The channel/supergroup"},{"name":"user_id","type":"InputUser","comment":"The user"}],"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"both"},{"kind":"method","name":"smsjobs.isEligibleToJoin","type":"smsjobs.EligibilityToJoin","typeModifiers":{"constructorId":3700114639},"id":249313744,"comment":"Check if we can process SMS jobs (official clients only).","arguments":[],"throws":[{"code":403,"name":"NOT_ELIGIBLE","comment":"The current user is not eligible to join the Peer-to-Peer Login Program."}],"available":"user"},{"kind":"method","name":"smsjobs.join","type":"Bool","id":2806959661,"comment":"Enable SMS jobs (official clients only).","arguments":[],"throws":[{"code":400,"name":"NOT_ELIGIBLE","comment":"The current user is not eligible to join the Peer-to-Peer Login Program."}],"available":"user"},{"kind":"method","name":"smsjobs.leave","type":"Bool","id":2560142707,"comment":"Disable SMS jobs (official clients only).","arguments":[],"throws":[{"code":400,"name":"NOT_JOINED","comment":"The current user hasn't joined the Peer-to-Peer Login Program."}],"available":"user"},{"kind":"method","name":"smsjobs.updateSettings","type":"Bool","id":155164863,"comment":"Update SMS job settings (official clients only).","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"allow_international","type":"true","typeModifiers":{"predicate":"flags.0"},"comment":"Allow international numbers?"}],"throws":[{"code":400,"name":"NOT_JOINED","comment":"The current user hasn't joined the Peer-to-Peer Login Program."}],"available":"user"},{"kind":"method","name":"smsjobs.getStatus","type":"smsjobs.Status","typeModifiers":{"constructorId":720277905},"id":279353576,"comment":"Get SMS jobs status (official clients only).","arguments":[],"throws":[{"code":400,"name":"NOT_JOINED","comment":"The current user hasn't joined the Peer-to-Peer Login Program."}],"available":"user"},{"kind":"method","name":"smsjobs.getSmsJob","type":"SmsJob","typeModifiers":{"constructorId":3869372088},"id":2005766191,"comment":"Get info about an SMS job (official clients only).","arguments":[{"name":"job_id","type":"string","comment":"Job ID"}],"throws":[{"code":400,"name":"SMSJOB_ID_INVALID","comment":"The specified job ID is invalid."}],"available":"user"},{"kind":"method","name":"smsjobs.finishJob","type":"Bool","id":1327415076,"comment":"Finish an SMS job (official clients only).","arguments":[{"name":"flags","type":"#","comment":"Flags, see TL conditional fields"},{"name":"job_id","type":"string","comment":"Job ID."},{"name":"error","type":"string","typeModifiers":{"predicate":"flags.0"},"comment":"If failed, the error."}],"throws":[{"code":400,"name":"SMSJOB_ID_INVALID","comment":"The specified job ID is invalid."}],"available":"user"},{"kind":"method","name":"fragment.getCollectibleInfo","type":"fragment.CollectibleInfo","typeModifiers":{"constructorId":1857945489},"id":3189671354,"comment":"Fetch information about a fragment collectible, see here » for more info on the full flow.","arguments":[{"name":"collectible","type":"InputCollectible","comment":"Collectible to fetch info about."}],"throws":[{"code":400,"name":"COLLECTIBLE_INVALID","comment":"The specified collectible is invalid."},{"code":400,"name":"COLLECTIBLE_NOT_FOUND","comment":"The specified collectible could not be found."}],"available":"user"},{"kind":"method","name":"mtcute.customMethod","id":2440218877,"type":"bytes","arguments":[{"name":"bytes","type":"bytes"}],"comment":"temporary solution to allow users to call arbitrary methods not present in the schema, without having to override client's schema readers/writers map. will become redundant after esm tl rewrite"}],"u":{"Error":"An object containing a query error.","InputFileLocation":"Defines the location of a file for download.","InputPeer":"Peer","InputUser":"Defines a user for subsequent interaction.","InputContact":"Object defines a contact from the user's phone book.","InputFile":"Defines a file uploaded by the client.","InputMedia":"Defines media content of a message.","InputChatPhoto":"Defines a new group profile photo.","InputGeoPoint":"Defines a GeoPoint.","InputPhoto":"Defines a photo for further interaction.","Peer":"Identifier of a private chat, basic group, group or channel (see here » for more info).","storage.FileType":"Object describes the file type.","User":"Object defines a user.","UserProfilePhoto":"Object contains info on the user's profile photo.","UserStatus":"User online status","Chat":"Object defines a group.","ChatFull":"Full info about a channel, supergroup, gigagroup or basic group.","ChatParticipant":"Details of a group member.","ChatParticipants":"Object contains info on group members.","ChatPhoto":"Object defines a group profile photo.","Message":"Object describing a message.","MessageMedia":"Media","MessageAction":"Object describing actions connected to a service message.","Dialog":"Chat info.","Photo":"Object describes a photo.","PhotoSize":"Location of a certain size of a picture","GeoPoint":"Object defines a GeoPoint.","auth.SentCode":"Contains info on a confirmation code message sent via SMS, phone call or Telegram.","auth.Authorization":"Object contains info on user authorization.","auth.ExportedAuthorization":"Exported authorization","InputNotifyPeer":"Object defines the set of users and/or groups that generate notifications.","InputPeerNotifySettings":"Notifications settings.","PeerNotifySettings":"Notification settings.","PeerSettings":"List of actions that are possible when interacting with this user, to be shown as suggested actions in the chat bar","WallPaper":"Object contains info on a wallpaper.","ReportReason":"Report reason","UserFull":"Object contains extended user info.","Contact":"A contact of the current user.","ImportedContact":"Object contains info on a successfully imported contact.","ContactStatus":"Contact status: online / offline.","contacts.Contacts":"Info on the current user's contact list.","contacts.ImportedContacts":"Object contains info on successfully imported contacts.","contacts.Blocked":"Info on users from the current user's black list.","messages.Dialogs":"Object contains a list of chats with messages and auxiliary data.","messages.Messages":"Object contains information on list of messages with auxiliary data.","messages.Chats":"Object contains list of chats with auxiliary data.","messages.ChatFull":"Full info about a channel, supergroup, gigagroup or basic group.","messages.AffectedHistory":"Object contains info on affected part of communication history with the user or in a chat.","MessagesFilter":"Object describes message filter.","Update":"Object contains info on events occurred.","updates.State":"Object contains info on state for further updates.","updates.Difference":"Occurred changes.","Updates":"Object which is perceived by the client without a call on its part when an event occurs.","photos.Photos":"Object contains list of photos with auxiliary data.","photos.Photo":"Photo with auxiliary data.","upload.File":"Contains info on file.","DcOption":"Information for connection to data center.","Config":"Object contains info on API configuring parameters.","NearestDc":"Object contains info on nearest data center.","help.AppUpdate":"Contains info on app update availability.","help.InviteText":"Object contains info on the text of a message with an invitation.","EncryptedChat":"Object contains info on an encrypted chat.","InputEncryptedChat":"Object sets an encrypted chat ID.","EncryptedFile":"Seta an encrypted file.","InputEncryptedFile":"Object sets encrypted file for attachment","EncryptedMessage":"Object contains encrypted message.","messages.DhConfig":"Contains Diffie-Hellman key generation protocol parameters.","messages.SentEncryptedMessage":"Contains info on message sent to an encrypted chat.","InputDocument":"Defines a document for subsequent interaction.","Document":"A document.","help.Support":"Info about the support user, relevant to the current user.","NotifyPeer":"Object defines the set of users and/or groups that generate notifications.","SendMessageAction":"User actions. Use this to provide users with detailed info about their chat partner's actions: typing or sending attachments of all kinds.","contacts.Found":"Object contains info on users found by name substring and auxiliary data.","InputPrivacyKey":"Privacy keys together with privacy rules » indicate what can or can't someone do and are specified by a PrivacyKey constructor, and its input counterpart InputPrivacyKey.\n\nSee the privacy documentation » for more info.","PrivacyKey":"Privacy keys together with privacy rules » indicate what can or can't someone do and are specified by a PrivacyKey constructor, and its input counterpart InputPrivacyKey.\n\nSee the privacy documentation » for more info.","InputPrivacyRule":"Privacy rules indicate who can or can't do something and are specified by a PrivacyRule, and its input counterpart InputPrivacyRule.\n\nSee the privacy documentation » for more info.","PrivacyRule":"Privacy rules together with privacy keys indicate what can or can't someone do and are specified by a PrivacyRule constructor, and its input counterpart InputPrivacyRule.\n\nSee the privacy documentation » for more info.","account.PrivacyRules":"Privacy rules","AccountDaysTTL":"Time-to-live of current account","DocumentAttribute":"Various possible attributes of a document (used to define if it's a sticker, a GIF, a video, a mask sticker, an image, an audio, and so on)","messages.Stickers":"Stickers","StickerPack":"Stickerpack","messages.AllStickers":"All stickers","messages.AffectedMessages":"Messages affected by changes","WebPage":"Instant View webpage preview","Authorization":"Represents a logged-in session","account.Authorizations":"Logged-in sessions","account.Password":"Configuration for two-factor authorization","account.PasswordSettings":"Private info associated to the password info (recovery email, telegram passport info & so on)","account.PasswordInputSettings":"Constructor for setting up a new 2FA SRP password","auth.PasswordRecovery":"Recovery info of a 2FA password, only for accounts with a recovery email configured.","ReceivedNotifyMessage":"Confirmation of message receipt","ExportedChatInvite":"Exported chat invite","ChatInvite":"Chat invite","InputStickerSet":"Represents a stickerset","StickerSet":"Represents a stickerset (stickerpack)","messages.StickerSet":"Stickerset","BotCommand":"Describes a bot command that can be used in a chat","BotInfo":"Info about bots (available bot commands, etc)","KeyboardButton":"Bot or inline keyboard buttons","KeyboardButtonRow":"Bot or inline keyboard rows","ReplyMarkup":"Reply markup for bot and inline keyboards","MessageEntity":"Message entities, representing styled text in a message","InputChannel":"Represents a channel","contacts.ResolvedPeer":"Peer returned after resolving a @username","MessageRange":"Indicates a range of chat messages","updates.ChannelDifference":"Contains the difference (new messages) between our local channel state and the remote state","ChannelMessagesFilter":"Filter for fetching only certain types of channel messages","ChannelParticipant":"Channel participant","ChannelParticipantsFilter":"Filter for fetching channel participants","channels.ChannelParticipants":"Channel/supergroup participants","channels.ChannelParticipant":"Channel participant","help.TermsOfService":"Contains info about the latest telegram Terms Of Service.","messages.SavedGifs":"Saved GIFs","InputBotInlineMessage":"Represents a sent inline message from the perspective of a bot","InputBotInlineResult":"Inline bot result","BotInlineMessage":"Inline message","BotInlineResult":"Results of an inline query","messages.BotResults":"Result of a query to an inline bot","ExportedMessageLink":"HTTP link and embed info of channel message","MessageFwdHeader":"Info about a forwarded message","auth.CodeType":"Type of verification code that will be sent next if you call the resendCode method","auth.SentCodeType":"Type of the verification code that was sent","messages.BotCallbackAnswer":"Callback answer of bot","messages.MessageEditData":"Message edit data for media","InputBotInlineMessageID":"Represents a sent inline message from the perspective of a bot","InlineBotSwitchPM":"The bot requested the user to message them in private","messages.PeerDialogs":"List of dialogs","TopPeer":"Top peer","TopPeerCategory":"Top peer category","TopPeerCategoryPeers":"Top peers by top peer category","contacts.TopPeers":"Top peers","DraftMessage":"Represents a message draft.","messages.FeaturedStickers":"Featured stickers","messages.RecentStickers":"Recent stickers","messages.ArchivedStickers":"Archived stickers","messages.StickerSetInstallResult":"Result of stickerset installation process","StickerSetCovered":"Stickerset preview","MaskCoords":"Mask coordinates (if this is a mask sticker, attached to a photo)","InputStickeredMedia":"Represents a media with attached stickers","Game":"Indicates an already sent game","InputGame":"A game to send","HighScore":"Game high score","messages.HighScores":"High scores (in games)","RichText":"Rich text","PageBlock":"Represents an instant view page element","PhoneCallDiscardReason":"Why was the phone call discarded?","DataJSON":"Represent a JSON-encoded object","LabeledPrice":"Labeled pricetag","Invoice":"Invoice","PaymentCharge":"Charged payment","PostAddress":"Shipping address","PaymentRequestedInfo":"Requested payment info","PaymentSavedCredentials":"Saved payment credentials","WebDocument":"Remote document","InputWebDocument":"Specifies a document that will have to be downloaded from the URL by the telegram servers","InputWebFileLocation":"Location of remote file","upload.WebFile":"Remote file","payments.PaymentForm":"Payment form","payments.ValidatedRequestedInfo":"Validated requested info","payments.PaymentResult":"Payment result","payments.PaymentReceipt":"Payment receipt","payments.SavedInfo":"Saved payment info","InputPaymentCredentials":"Payment credentials","account.TmpPassword":"Temporary password","ShippingOption":"Shipping options","InputStickerSetItem":"Sticker","InputPhoneCall":"Phone call","PhoneCall":"Phone call","PhoneConnection":"Phone call connection","PhoneCallProtocol":"Phone call protocol","phone.PhoneCall":"Phone call","upload.CdnFile":"Represents the download status of a CDN file","CdnPublicKey":"Public key to use only during handshakes to CDN DCs.","CdnConfig":"Configuration for CDN file downloads.","LangPackString":"Language pack string","LangPackDifference":"Language pack changes","LangPackLanguage":"Language pack language","ChannelAdminLogEventAction":"Channel admin log event","ChannelAdminLogEvent":"An event in a channel admin log","channels.AdminLogResults":"Admin log events","ChannelAdminLogEventsFilter":"Filter for fetching events in the channel admin log","PopularContact":"Popular contact","messages.FavedStickers":"Favorited stickers","RecentMeUrl":"Recent t.me urls","help.RecentMeUrls":"Recent t.me URLs","InputSingleMedia":"A single media in an album or grouped media sent with {@link messages.RawSendMultiMediaRequest}.","WebAuthorization":"Web authorization","account.WebAuthorizations":"Web authorizations","InputMessage":"A message","InputDialogPeer":"Peer, or all peers in a certain folder","DialogPeer":"Peer, or all peers in a folder","messages.FoundStickerSets":"Found stickersets","FileHash":"Hash of an uploaded file, to be checked for validity after download","InputClientProxy":"Info about an MTProxy used to connect.","help.TermsOfServiceUpdate":"Update of Telegram's terms of service","InputSecureFile":"Secure passport file, for more info see the passport docs »","SecureFile":"Secure passport file, for more info see the passport docs »","SecureData":"Secure passport data, for more info see the passport docs »","SecurePlainData":"Plaintext verified passport data.","SecureValueType":"Secure value type","SecureValue":"Secure Telegram Passport value","InputSecureValue":"Secure value, for more info see the passport docs »","SecureValueHash":"Secure value hash","SecureValueError":"Secure value error","SecureCredentialsEncrypted":"Encrypted secure credentials","account.AuthorizationForm":"Authorization form","account.SentEmailCode":"The email code that was sent","help.DeepLinkInfo":"Contains information about an unsupported deep link »","SavedContact":"Saved contact","account.Takeout":"Takeout info","PasswordKdfAlgo":"Key derivation function to use when generating the password hash for SRP two-factor authorization","SecurePasswordKdfAlgo":"KDF algorithm to use for computing telegram passport hash","SecureSecretSettings":"Telegram passport settings","InputCheckPasswordSRP":"Constructors for checking the validity of a 2FA SRP password.\n\nSee here » for more info on the 2FA authentication flow for methods that require it, before and after login.","SecureRequiredType":"Required secure file type","help.PassportConfig":"Telegram passport configuration","InputAppEvent":"Object contains info about an event that occurred in the application.","JSONObjectValue":"JSON key: value pair","JSONValue":"JSON value","PageTableCell":"Represents a table in an instant view table","PageTableRow":"Table row","PageCaption":"Page caption","PageListItem":"Item in block list","PageListOrderedItem":"Represents an instant view ordered list","PageRelatedArticle":"Related articles","Page":"Instant view page","help.SupportName":"Get localized name for support user","help.UserInfo":"User info","PollAnswer":"Indicates a possible answer to a poll.","Poll":"Indicates a poll message","PollAnswerVoters":"How users voted on a certain poll answer","PollResults":"Results of poll","ChatOnlines":"Number of online users in a chat","StatsURL":"URL with chat statistics","ChatAdminRights":"Represents the rights of an admin in a channel/supergroup.","ChatBannedRights":"Represents the rights of a normal user in a supergroup/channel/chat.","InputWallPaper":"Wallpaper","account.WallPapers":"Wallpapers","CodeSettings":"Settings for the code type to send","WallPaperSettings":"Wallpaper rendering information.","AutoDownloadSettings":"Media autodownload settings","account.AutoDownloadSettings":"Media autodownload settings","EmojiKeyword":"Emoji keyword","EmojiKeywordsDifference":"New emoji keywords","EmojiURL":"Emoji URL","EmojiLanguage":"Emoji language","Folder":"A folder","InputFolderPeer":"Peer in a folder","FolderPeer":"Peer associated to folder","messages.SearchCounter":"Number of results that would be returned by a search","UrlAuthResult":"URL authorization result","ChannelLocation":"Geographical location of supergroup (geogroups)","PeerLocated":"Geolocated peer","RestrictionReason":"Restriction reason","InputTheme":"Cloud theme","Theme":"Cloud theme","account.Themes":"Installed themes","auth.LoginToken":"Login token (for QR code login)","account.ContentSettings":"Sensitive content settings","messages.InactiveChats":"Inactive chat list","BaseTheme":"Basic theme settings","InputThemeSettings":"Theme settings","ThemeSettings":"Theme settings","WebPageAttribute":"Webpage attributes","messages.VotesList":"How users voted in a poll","BankCardOpenUrl":"Credit card info URL provided by the bank","payments.BankCardData":"Credit card info, provided by the card's bank(s)","DialogFilter":"Dialog filter (folder »)","DialogFilterSuggested":"Suggested dialog filters (folder »)","StatsDateRangeDays":"Channel statistics date range","StatsAbsValueAndPrev":"Channel statistics value pair","StatsPercentValue":"Channel statistics percentage","StatsGraph":"Channel statistics graph","stats.BroadcastStats":"Channel statistics","help.PromoData":"Info about pinned MTProxy or Public Service Announcement peers.","VideoSize":"Represents an animated video thumbnail","StatsGroupTopPoster":"Most active user in a supergroup","StatsGroupTopAdmin":"Most active admin in a supergroup","StatsGroupTopInviter":"Most active inviter in a supergroup","stats.MegagroupStats":"Supergroup statistics","GlobalPrivacySettings":"Global privacy settings","help.CountryCode":"Country code and phone number pattern of a specific country","help.Country":"Name, ISO code, localized name and phone codes/patterns of a specific country","help.CountriesList":"Name, ISO code, localized name and phone codes/patterns of all available countries","MessageViews":"View, forward counter + info about replies of a specific message","messages.MessageViews":"View, forward counter + info about replies","messages.DiscussionMessage":"Info about a message thread","MessageReplyHeader":"Reply information","MessageReplies":"Info about post comments (for channels) or message replies (for groups)","PeerBlocked":"Info about a blocked user","stats.MessageStats":"Message statistics","GroupCall":"A group call","InputGroupCall":"Indicates a group call","GroupCallParticipant":"Info about a group call participant","phone.GroupCall":"Contains info about a group call, and partial info about its participants.","phone.GroupParticipants":"Info about the participants of a group call or livestream","InlineQueryPeerType":"Inline query peer type.","messages.HistoryImport":"Identifier of a history import session, click here for more info ».","messages.HistoryImportParsed":"Contains information about a chat export file, generated by a foreign chat app.","messages.AffectedFoundMessages":"Messages found and affected by changes","ChatInviteImporter":"When and which user joined the chat using a chat invite","messages.ExportedChatInvites":"Info about chat invites exported by a certain admin.","messages.ExportedChatInvite":"Contains info about a chat invite, and eventually a pointer to the newest chat invite.","messages.ChatInviteImporters":"List of users that imported a chat invitation link.","ChatAdminWithInvites":"Info about chat invites generated by admins.","messages.ChatAdminsWithInvites":"Info about chat invites generated by admins.","messages.CheckedHistoryImportPeer":"Contains a confirmation text to be shown to the user, upon importing chat history, click here for more info ».","phone.JoinAsPeers":"A list of peers that can be used to join a group call, presenting yourself as a specific user/channel.","phone.ExportedGroupCallInvite":"An exported group call invitation.","GroupCallParticipantVideoSourceGroup":"Describes a group of video synchronization source identifiers","GroupCallParticipantVideo":"Info about a video stream","stickers.SuggestedShortName":"A suggested short name for the specified stickerpack","BotCommandScope":"Represents a scope where the bot commands, specified using {@link bots.RawSetBotCommandsRequest} will be valid.","account.ResetPasswordResult":"Result of an {@link account.RawResetPasswordRequest} request.","SponsoredMessage":"A sponsored message","messages.SponsoredMessages":"A set of sponsored messages associated with a channel","SearchResultsCalendarPeriod":"Information about found messages sent on a specific day, used to split the messages in {@link messages.RawSearchResultsCalendar} constructors by days.","messages.SearchResultsCalendar":"Information about found messages sent on a specific day","SearchResultsPosition":"Information about a message in a specific position","messages.SearchResultsPositions":"Information about sparse positions of messages","channels.SendAsPeers":"A list of peers that can be used to send messages in a specific group","users.UserFull":"Full user information, with attached context peers for reactions","messages.PeerSettings":"Peer settings","auth.LoggedOut":"Future auth token » to be used on subsequent authorizations","ReactionCount":"Number of users that reacted with a certain emoji","MessageReactions":"Message reactions »","messages.MessageReactionsList":"List of peers that reacted to a specific message","AvailableReaction":"Animations associated with a message reaction","messages.AvailableReactions":"Animations and metadata associated with message reactions »","MessagePeerReaction":"How a certain peer reacted to the message","GroupCallStreamChannel":"Info about an RTMP stream in a group call or livestream","phone.GroupCallStreamChannels":"Info about RTMP streams in a group call or livestream","phone.GroupCallStreamRtmpUrl":"RTMP URL and stream key to be used in streaming software","AttachMenuBotIconColor":"Represents an attachment menu icon color for bot mini apps »","AttachMenuBotIcon":"Represents an attachment menu icon for bot mini apps »","AttachMenuBot":"Represents a bot mini app that can be launched from the attachment menu »","AttachMenuBots":"Represents a list of bot mini apps that can be launched from the attachment menu »","AttachMenuBotsBot":"Represents a bot mini app that can be launched from the attachment menu »","WebViewResult":"Contains the webview URL with appropriate theme and user info parameters added","WebViewMessageSent":"Contains information about an inline message sent by a Web App on behalf of a user.","BotMenuButton":"Indicates the action to execute when pressing the in-UI menu button for bots","account.SavedRingtones":"Contains a list of saved notification sounds","NotificationSound":"Represents a notification sound","account.SavedRingtone":"Contains information about a saved notification sound","AttachMenuPeerType":"Indicates a supported peer type for a bot mini app attachment menu","InputInvoice":"An invoice","payments.ExportedInvoice":"Exported invoice","messages.TranscribedAudio":"Transcribed text from a voice message","help.PremiumPromo":"Telegram Premium promotion information","InputStorePaymentPurpose":"Info about a Telegram Premium purchase","PremiumGiftOption":"Telegram Premium gift option","PaymentFormMethod":"Represents a payment method","EmojiStatus":"Emoji status","account.EmojiStatuses":"A list of emoji statuses","Reaction":"Message reaction","ChatReactions":"Available chat reactions","messages.Reactions":"A set of message reactions","EmailVerifyPurpose":"Email verification purpose","EmailVerification":"Email verification code or token","account.EmailVerified":"Email verification status","PremiumSubscriptionOption":"Telegram Premium subscription option","SendAsPeer":"Indicates a peer that can be used to send messages","MessageExtendedMedia":"Paid media, see here » for more info.","StickerKeyword":"Keywords for a certain sticker","Username":"Contains information about a username","ForumTopic":"Contains information about a forum topic","messages.ForumTopics":"Contains information about multiple forum topics","DefaultHistoryTTL":"Contains info about the default value of the Time-To-Live setting, applied to all new chats.","ExportedContactToken":"Describes a temporary profile link.","RequestPeerType":"Filtering criteria to use for the peer selection list shown to the user.","EmojiList":"Represents a list of custom emojis.","EmojiGroup":"Represents an emoji category.","messages.EmojiGroups":"Represents a list of emoji categories.","TextWithEntities":"Styled text with message entities","messages.TranslatedText":"Translated text with entities.","AutoSaveSettings":"Media autosave settings","AutoSaveException":"Peer-specific autosave settings","account.AutoSaveSettings":"Contains media autosave settings","help.AppConfig":"Contains various client configuration parameters","InputBotApp":"Used to fetch information about a direct link Mini App","BotApp":"Contains information about a direct link Mini App.","messages.BotApp":"Contains information about a direct link Mini App","InlineBotWebView":"Specifies an inline mode mini app button, shown on top of the inline query results list.","ReadParticipantDate":"Contains info about when a certain participant has read a message","InputChatlist":"Represents a folder","ExportedChatlistInvite":"An exported chat folder deep link ».","chatlists.ExportedChatlistInvite":"Exported chat folder deep link ».","chatlists.ExportedInvites":"A list of exported chat folder deep links ».","chatlists.ChatlistInvite":"Info about a chat folder deep link ».","chatlists.ChatlistUpdates":"Updated info about a chat folder deep link ».","bots.BotInfo":"Localized name, about text and description of a bot.","MessagePeerVote":"How a user voted in a poll","StoryViews":"Aggregated view and reaction information of a story","StoryItem":"Represents a Telegram Story","stories.AllStories":"Full list of active (or active and hidden) stories.","stories.Stories":"List of stories","StoryView":"Story view date and reaction information","stories.StoryViewsList":"Reaction and view counters for a story","stories.StoryViews":"Reaction and view counters for a list of stories","InputReplyTo":"Contains info about a message or story to reply to.","ExportedStoryLink":"Represents a story deep link","StoriesStealthMode":"Story stealth mode status","MediaAreaCoordinates":"Coordinates and size of a clicable rectangular area on top of a story.","MediaArea":"Represents a story media area »","PeerStories":"Stories associated to a peer","stories.PeerStories":"Active story list of a specific peer.","messages.WebPage":"Contains an instant view webpage.","PremiumGiftCodeOption":"Giveaway option.","payments.CheckedGiftCode":"Info about a Telegram Premium Giftcode.","payments.GiveawayInfo":"Info about a Telegram Premium Giveaway.","PrepaidGiveaway":"Contains info about a prepaid giveaway ».","Boost":"Info about one or more boosts applied by a specific user.","premium.BoostsList":"List of boosts that were applied to a peer by multiple users.","MyBoost":"Contains information about a single boost slot ».","premium.MyBoosts":"A list of peers we are currently boosting, and how many boost slots we have left.","premium.BoostsStatus":"Contains info about the current boost status of a peer.","StoryFwdHeader":"Contains info about the original poster of a reposted story.","PostInteractionCounters":"Interaction counters","stats.StoryStats":"Contains statistics about a story.","PublicForward":"Contains info about the forwards of a story as a message to public chats and reposts by public channels.","stats.PublicForwards":"Contains info about the forwards of a story as a message to public chats and reposts by public channels.","PeerColor":"Represents a color palette ».","help.PeerColorSet":"Contains info about a color palette ».","help.PeerColorOption":"Contains info about a color palette ».","help.PeerColors":"Contains info about multiple color palettes ».","StoryReaction":"How a certain peer reacted to or interacted with a story","stories.StoryReactionsList":"List of peers that reacted to a specific story","SavedDialog":"Represents a saved message dialog ».","messages.SavedDialogs":"Represents some saved message dialogs ».","SavedReactionTag":"Info about a saved message reaction tag ».","messages.SavedReactionTags":"List of reaction tag » names assigned by the user.","OutboxReadDate":"Exact read date of a private message we sent to another user.","smsjobs.EligibilityToJoin":"SMS jobs eligibility","smsjobs.Status":"Status","SmsJob":"Info about an SMS job.","BusinessWeeklyOpen":"A time interval, indicating the opening hours of a Telegram Business.","BusinessWorkHours":"Specifies a set of Telegram Business opening hours.","BusinessLocation":"Represents the location of a Telegram Business ».","InputBusinessRecipients":"Specifies the chats that can receive Telegram Business away » and greeting » messages.\n\nIf exclude_selected is set, specifies all chats that cannot receive Telegram Business away » and greeting » messages.","BusinessRecipients":"Specifies the chats that can receive Telegram Business away » and greeting » messages.","BusinessAwayMessageSchedule":"Specifies when should the Telegram Business away messages be sent.","InputBusinessGreetingMessage":"Describes a Telegram Business greeting, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period.","BusinessGreetingMessage":"Describes a Telegram Business greeting, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period.","InputBusinessAwayMessage":"Describes a Telegram Business away message, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user.","BusinessAwayMessage":"Describes a Telegram Business away message, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user.","Timezone":"Timezone information.","help.TimezonesList":"Timezone information that may be used elsewhere in the API, such as to set Telegram Business opening hours ».","QuickReply":"A quick reply shortcut.","InputQuickReplyShortcut":"Represents a quick reply shortcut ».","messages.QuickReplies":"Info about quick reply shortcuts ».","ConnectedBot":"Contains info about a connected business bot ».","account.ConnectedBots":"Info about currently connected business bots.","messages.DialogFilters":"Folder information","Birthday":"Birthday information for a user.","BotBusinessConnection":"Contains info about a bot business connection.","InputBusinessIntro":"Telegram Business introduction ».","BusinessIntro":"Telegram Business introduction ».","messages.MyStickers":"The list of stickersets owned by the current account ».","InputCollectible":"Represents a Fragment collectible ».","fragment.CollectibleInfo":"Info about a fragment collectible.","InputBusinessBotRecipients":"Specifies the private chats that a connected business bot » may interact with.","BusinessBotRecipients":"Specifies the private chats that a connected business bot » may receive messages and interact with.","ContactBirthday":"Birthday information of a contact.","contacts.ContactBirthdays":"Birthday information of our contacts.","MissingInvitee":"Info about why a specific user could not be invited ».","messages.InvitedUsers":"Contains info about successfully or unsuccessfully invited » users.","InputBusinessChatLink":"Contains info about a business chat deep link » to be created by the current account.","BusinessChatLink":"Contains info about a business chat deep link » created by the current account.","account.BusinessChatLinks":"Contains info about business chat deep links » created by the current account.","account.ResolvedBusinessChatLinks":"Contains info about a single resolved business chat deep link ».","RequestedPeer":"Info about a peer, shared by a user with the currently logged in bot using {@link messages.RawSendBotRequestedPeerRequest}.","SponsoredMessageReportOption":"A report option for a sponsored message ».","channels.SponsoredMessageReportResult":"Status of the method call used to report a sponsored message ».","stats.BroadcastRevenueStats":"Channel revenue ad statistics, see here » for more info.","stats.BroadcastRevenueWithdrawalUrl":"Contains the URL to use to withdraw channel ad revenue.","BroadcastRevenueTransaction":"A channel ad revenue » transaction.","stats.BroadcastRevenueTransactions":"Channel ad revenue transactions ».","ReactionNotificationsFrom":"Reaction notification settings","ReactionsNotifySettings":"Reaction notification settings, see here » for more info.","BroadcastRevenueBalances":"Channel ad revenue balance » information.","AvailableEffect":"Describes a message effect ».","messages.AvailableEffects":"Full list of usable animated message effects ».","FactCheck":"Represents a fact-check » created by an independent fact-checker.","StarsTransactionPeer":"Source of an incoming Telegram Star transaction, or its recipient for outgoing Telegram Star transactions.","StarsTopupOption":"Telegram Stars topup option.","StarsTransaction":"Represents a Telegram Stars transaction ».","payments.StarsStatus":"Info about the current Telegram Star balance and transaction history ».","FoundStory":"A story found using global story search ».","stories.FoundStories":"Stories found using global story search ».","GeoPointAddress":"Address optionally associated to a {@link RawGeoPoint}.","StarsRevenueStatus":"Describes Telegram Star revenue balances ».","payments.StarsRevenueStats":"Star revenue statistics, see here » for more info.\n\nNote that all balances and currency amounts and graph values are in Stars.","payments.StarsRevenueWithdrawalUrl":"Contains the URL to use to withdraw Telegram Star revenue.","payments.StarsRevenueAdsAccountUrl":"Contains a URL leading to a page where the user will be able to place ads for the channel/bot, paying using Telegram Stars.","InputStarsTransaction":"Used to fetch info about a Telegram Star transaction ».","StarsGiftOption":"Telegram Stars gift option.","bots.PopularAppBots":"Popular Main Mini Apps, to be used in the apps tab of global search ».","BotPreviewMedia":"Represents a Main Mini App preview media, see here » for more info.","bots.PreviewInfo":"Contains info about Main Mini App previews, see here » for more info.","SimpleWebViewResult":"Contains the webview URL with appropriate theme parameters added","AppWebViewResult":"Contains the link that must be used to open a direct link Mini App.","SponsoredWebPage":"Represents a sponsored website."}} \ No newline at end of file +{ "l": 185, "e": [{ "kind": "class", "name": "error", "type": "Error", "id": 3300522427, "comment": "Error.", "arguments": [{ "name": "code", "type": "int", "comment": "Error code" }, { "name": "text", "type": "string", "comment": "Message" }] }, { "kind": "class", "name": "ipPort", "id": 3560156531, "type": "IpPort", "arguments": [{ "name": "ipv4", "type": "int" }, { "name": "port", "type": "int" }] }, { "kind": "class", "name": "ipPortSecret", "id": 932718150, "type": "IpPort", "arguments": [{ "name": "ipv4", "type": "int" }, { "name": "port", "type": "int" }, { "name": "secret", "type": "bytes" }] }, { "kind": "class", "name": "accessPointRule", "id": 1182381663, "type": "AccessPointRule", "arguments": [{ "name": "phone_prefix_rules", "type": "string" }, { "name": "dc_id", "type": "int" }, { "name": "ips", "type": "IpPort", "typeModifiers": { "isBareVector": true } }] }, { "kind": "class", "name": "help.configSimple", "id": 1515793004, "type": "help.ConfigSimple", "arguments": [{ "name": "date", "type": "int" }, { "name": "expires", "type": "int" }, { "name": "rules", "type": "AccessPointRule", "typeModifiers": { "isBareVector": true } }] }, { "kind": "class", "name": "inputPeerPhotoFileLocationLegacy", "id": 668375447, "type": "InputFileLocation", "arguments": [{ "name": "flags", "type": "#" }, { "name": "big", "type": "true", "typeModifiers": { "predicate": "flags.0" } }, { "name": "peer", "type": "InputPeer" }, { "name": "volume_id", "type": "long" }, { "name": "local_id", "type": "int" }] }, { "kind": "class", "name": "inputStickerSetThumbLegacy", "id": 230353641, "type": "InputFileLocation", "arguments": [{ "name": "stickerset", "type": "InputStickerSet" }, { "name": "volume_id", "type": "long" }, { "name": "local_id", "type": "int" }] }, { "kind": "class", "name": "inputPeerEmpty", "type": "InputPeer", "id": 2134579434, "comment": "An empty constructor, no user or chat is defined.", "arguments": [] }, { "kind": "class", "name": "inputPeerSelf", "type": "InputPeer", "id": 2107670217, "comment": "Defines the current user.", "arguments": [] }, { "kind": "class", "name": "inputPeerChat", "type": "InputPeer", "id": 900291769, "comment": "Defines a chat for further interaction.", "arguments": [{ "name": "chat_id", "type": "int53", "comment": "Chat identifier" }] }, { "kind": "class", "name": "inputPeerUser", "type": "InputPeer", "id": 3723011404, "comment": "Defines a user for further interaction.", "arguments": [{ "name": "user_id", "type": "int53", "comment": "User identifier" }, { "name": "access_hash", "type": "long", "comment": "access_hash value from the {@link RawUser} constructor" }] }, { "kind": "class", "name": "inputPeerChannel", "type": "InputPeer", "id": 666680316, "comment": "Defines a channel for further interaction.", "arguments": [{ "name": "channel_id", "type": "int53", "comment": "Channel identifier" }, { "name": "access_hash", "type": "long", "comment": "access_hash value from the {@link RawChannel} constructor" }] }, { "kind": "class", "name": "inputPeerUserFromMessage", "type": "InputPeer", "id": 2826635804, "comment": "Defines a min user that was seen in a certain message of a certain chat.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The chat where the user was seen" }, { "name": "msg_id", "type": "int", "comment": "The message ID" }, { "name": "user_id", "type": "int53", "comment": "The identifier of the user that was seen" }] }, { "kind": "class", "name": "inputPeerChannelFromMessage", "type": "InputPeer", "id": 3173648448, "comment": "Defines a min channel that was seen in a certain message of a certain chat.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The chat where the channel's message was seen" }, { "name": "msg_id", "type": "int", "comment": "The message ID" }, { "name": "channel_id", "type": "int53", "comment": "The identifier of the channel that was seen" }] }, { "kind": "class", "name": "inputUserEmpty", "type": "InputUser", "id": 3112732367, "comment": "Empty constructor, does not define a user.", "arguments": [] }, { "kind": "class", "name": "inputUserSelf", "type": "InputUser", "id": 4156666175, "comment": "Defines the current user.", "arguments": [] }, { "kind": "class", "name": "inputUser", "type": "InputUser", "id": 4061223110, "comment": "Defines a user for further interaction.", "arguments": [{ "name": "user_id", "type": "int53", "comment": "User identifier" }, { "name": "access_hash", "type": "long", "comment": "access_hash value from the {@link RawUser} constructor" }] }, { "kind": "class", "name": "inputUserFromMessage", "type": "InputUser", "id": 497305826, "comment": "Defines a min user that was seen in a certain message of a certain chat.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The chat where the user was seen" }, { "name": "msg_id", "type": "int", "comment": "The message ID" }, { "name": "user_id", "type": "int53", "comment": "The identifier of the user that was seen" }] }, { "kind": "class", "name": "inputPhoneContact", "type": "InputContact", "id": 4086478836, "comment": "Phone contact.", "arguments": [{ "name": "client_id", "type": "long", "comment": "An arbitrary 64-bit integer: it should be set, for example, to an incremental number when using {@link contacts.RawImportContactsRequest}, in order to retry importing only the contacts that weren't imported successfully, according to the client_ids returned in {@link contacts.RawImportedContacts}.retry_contacts." }, { "name": "phone", "type": "string", "comment": "Phone number" }, { "name": "first_name", "type": "string", "comment": "Contact's first name" }, { "name": "last_name", "type": "string", "comment": "Contact's last name" }] }, { "kind": "class", "name": "inputFile", "type": "InputFile", "id": 4113560191, "comment": "Defines a file saved in parts using the method {@link upload.RawSaveFilePartRequest}.", "arguments": [{ "name": "id", "type": "long", "comment": "Random file identifier created by the client" }, { "name": "parts", "type": "int", "comment": "Number of parts saved" }, { "name": "name", "type": "string", "comment": "Full name of the file" }, { "name": "md5_checksum", "type": "string", "comment": "In case the file's md5-hash was passed, contents of the file will be checked prior to use" }] }, { "kind": "class", "name": "inputFileBig", "type": "InputFile", "id": 4199484341, "comment": "Assigns a big file (over 10 MB in size), saved in part using the method {@link upload.RawSaveBigFilePartRequest}.", "arguments": [{ "name": "id", "type": "long", "comment": "Random file id, created by the client" }, { "name": "parts", "type": "int", "comment": "Number of parts saved" }, { "name": "name", "type": "string", "comment": "Full file name" }] }, { "kind": "class", "name": "inputFileStoryDocument", "type": "InputFile", "id": 1658620744, "comment": "Used to edit the thumbnail/static preview of a story, see here » for more info on the full flow.", "arguments": [{ "name": "id", "type": "InputDocument", "comment": "The old story video." }] }, { "kind": "class", "name": "inputMediaEmpty", "type": "InputMedia", "id": 2523198847, "comment": "Empty media content of a message.", "arguments": [] }, { "kind": "class", "name": "inputMediaUploadedPhoto", "type": "InputMedia", "id": 505969924, "comment": "Photo", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "spoiler", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether this media should be hidden behind a spoiler warning" }, { "name": "file", "type": "InputFile", "comment": "The uploaded file" }, { "name": "stickers", "type": "InputDocument", "typeModifiers": { "predicate": "flags.0", "isVector": true }, "comment": "Attached mask stickers" }, { "name": "ttl_seconds", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Time to live in seconds of self-destructing photo" }] }, { "kind": "class", "name": "inputMediaPhoto", "type": "InputMedia", "id": 3015312949, "comment": "Forwarded photo", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "spoiler", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether this media should be hidden behind a spoiler warning" }, { "name": "id", "type": "InputPhoto", "comment": "Photo to be forwarded" }, { "name": "ttl_seconds", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Time to live in seconds of self-destructing photo" }] }, { "kind": "class", "name": "inputMediaGeoPoint", "type": "InputMedia", "id": 4190388548, "comment": "Map.", "arguments": [{ "name": "geo_point", "type": "InputGeoPoint", "comment": "GeoPoint" }] }, { "kind": "class", "name": "inputMediaContact", "type": "InputMedia", "id": 4171988475, "comment": "Phone book contact", "arguments": [{ "name": "phone_number", "type": "string", "comment": "Phone number" }, { "name": "first_name", "type": "string", "comment": "Contact's first name" }, { "name": "last_name", "type": "string", "comment": "Contact's last name" }, { "name": "vcard", "type": "string", "comment": "Contact vcard" }] }, { "kind": "class", "name": "inputMediaUploadedDocument", "type": "InputMedia", "id": 1530447553, "comment": "New document", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "nosound_video", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether the specified document is a video file with no audio tracks (a GIF animation (even as MPEG4), for example)" }, { "name": "force_file", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "Force the media file to be uploaded as document" }, { "name": "spoiler", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Whether this media should be hidden behind a spoiler warning" }, { "name": "file", "type": "InputFile", "comment": "The uploaded file" }, { "name": "thumb", "type": "InputFile", "typeModifiers": { "predicate": "flags.2" }, "comment": "Thumbnail of the document, uploaded as for the file" }, { "name": "mime_type", "type": "string", "comment": "MIME type of document" }, { "name": "attributes", "type": "DocumentAttribute", "typeModifiers": { "isVector": true }, "comment": "Attributes that specify the type of the document (video, audio, voice, sticker, etc.)" }, { "name": "stickers", "type": "InputDocument", "typeModifiers": { "predicate": "flags.0", "isVector": true }, "comment": "Attached stickers" }, { "name": "ttl_seconds", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Time to live in seconds of self-destructing document" }] }, { "kind": "class", "name": "inputMediaDocument", "type": "InputMedia", "id": 860303448, "comment": "Forwarded document", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "spoiler", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether this media should be hidden behind a spoiler warning" }, { "name": "id", "type": "InputDocument", "comment": "The document to be forwarded." }, { "name": "ttl_seconds", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Time to live of self-destructing document" }, { "name": "query", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Text query or emoji that was used by the user to find this sticker or GIF: used to improve search result relevance." }] }, { "kind": "class", "name": "inputMediaVenue", "type": "InputMedia", "id": 3242007569, "comment": "Can be used to send a venue geolocation.", "arguments": [{ "name": "geo_point", "type": "InputGeoPoint", "comment": "Geolocation" }, { "name": "title", "type": "string", "comment": "Venue name" }, { "name": "address", "type": "string", "comment": "Physical address of the venue" }, { "name": "provider", "type": "string", "comment": "Venue provider: currently only \"foursquare\" and \"gplaces\" (Google Places) need to be supported" }, { "name": "venue_id", "type": "string", "comment": "Venue ID in the provider's database" }, { "name": "venue_type", "type": "string", "comment": "Venue type in the provider's database" }] }, { "kind": "class", "name": "inputMediaPhotoExternal", "type": "InputMedia", "id": 3854302746, "comment": "New photo that will be uploaded by the server using the specified URL", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "spoiler", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether this media should be hidden behind a spoiler warning" }, { "name": "url", "type": "string", "comment": "URL of the photo" }, { "name": "ttl_seconds", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Self-destruct time to live of photo" }] }, { "kind": "class", "name": "inputMediaDocumentExternal", "type": "InputMedia", "id": 4216511641, "comment": "Document that will be downloaded by the telegram servers", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "spoiler", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether this media should be hidden behind a spoiler warning" }, { "name": "url", "type": "string", "comment": "URL of the document" }, { "name": "ttl_seconds", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Self-destruct time to live of document" }] }, { "kind": "class", "name": "inputMediaGame", "type": "InputMedia", "id": 3544138739, "comment": "A game", "arguments": [{ "name": "id", "type": "InputGame", "comment": "The game to forward" }] }, { "kind": "class", "name": "inputMediaInvoice", "type": "InputMedia", "id": 1080028941, "comment": "Generated invoice of a bot payment", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "title", "type": "string", "comment": "Product name, 1-32 characters" }, { "name": "description", "type": "string", "comment": "Product description, 1-255 characters" }, { "name": "photo", "type": "InputWebDocument", "typeModifiers": { "predicate": "flags.0" }, "comment": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for." }, { "name": "invoice", "type": "Invoice", "comment": "The actual invoice" }, { "name": "payload", "type": "bytes", "comment": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes." }, { "name": "provider", "type": "string", "typeModifiers": { "predicate": "flags.3" }, "comment": "Payments provider token, obtained via Botfather" }, { "name": "provider_data", "type": "DataJSON", "comment": "JSON-encoded data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider." }, { "name": "start_param", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Unique bot deep links start parameter. If present, forwarded copies of the sent message will have a URL button with a deep link to the bot (instead of a Pay button), with the value used as the start parameter. If absent, forwarded copies of the sent message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using the same invoice." }, { "name": "extended_media", "type": "InputMedia", "typeModifiers": { "predicate": "flags.2" }, "comment": "Deprecated" }] }, { "kind": "class", "name": "inputMediaGeoLive", "type": "InputMedia", "id": 2535434307, "comment": "Live geolocation", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "stopped", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether sending of the geolocation was stopped" }, { "name": "geo_point", "type": "InputGeoPoint", "comment": "Current geolocation" }, { "name": "heading", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "For live locations, a direction in which the location moves, in degrees; 1-360." }, { "name": "period", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Validity period of the current location" }, { "name": "proximity_notification_radius", "type": "int", "typeModifiers": { "predicate": "flags.3" }, "comment": "For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000)" }] }, { "kind": "class", "name": "inputMediaPoll", "type": "InputMedia", "id": 261416433, "comment": "A poll", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "poll", "type": "Poll", "comment": "The poll to send" }, { "name": "correct_answers", "type": "bytes", "typeModifiers": { "predicate": "flags.0", "isVector": true }, "comment": "Correct answer IDs (for quiz polls)" }, { "name": "solution", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Explanation of quiz solution" }, { "name": "solution_entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.1", "isVector": true }, "comment": "Message entities for styled text" }] }, { "kind": "class", "name": "inputMediaDice", "type": "InputMedia", "id": 3866083195, "comment": "Send a dice-based animated sticker", "arguments": [{ "name": "emoticon", "type": "string", "comment": "The emoji, for now \"🏀\", \"🎲\" and \"🎯\" are supported" }] }, { "kind": "class", "name": "inputMediaStory", "type": "InputMedia", "id": 2315114360, "comment": "Forwarded story", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer where the story was posted" }, { "name": "id", "type": "int", "comment": "Story ID" }] }, { "kind": "class", "name": "inputMediaWebPage", "type": "InputMedia", "id": 3256584265, "comment": "Specifies options that will be used to generate the link preview for the caption, or even a standalone link preview without an attached message.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "force_large_media", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, specifies that a large media preview should be used." }, { "name": "force_small_media", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "If set, specifies that a small media preview should be used." }, { "name": "optional", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "If not set, a WEBPAGE_NOT_FOUND RPC error will be emitted if a webpage preview cannot be generated for the specified url; otherwise, no error will be emitted (unless the provided message is also empty, in which case a MESSAGE_EMPTY will be emitted, instead)." }, { "name": "url", "type": "string", "comment": "The URL to use for the link preview." }] }, { "kind": "class", "name": "inputMediaPaidMedia", "type": "InputMedia", "id": 2858819523, "comment": "Paid media, see here » for more info.", "arguments": [{ "name": "stars_amount", "type": "long", "comment": "The price of the media in Telegram Stars." }, { "name": "extended_media", "type": "InputMedia", "typeModifiers": { "isVector": true }, "comment": "Photos or videos." }] }, { "kind": "class", "name": "inputChatPhotoEmpty", "type": "InputChatPhoto", "id": 480546647, "comment": "Empty constructor, remove group photo.", "arguments": [] }, { "kind": "class", "name": "inputChatUploadedPhoto", "type": "InputChatPhoto", "id": 3184373440, "comment": "New photo to be set as group profile photo.\n\nThe file, video and video_emoji_markup flags are mutually exclusive.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "file", "type": "InputFile", "typeModifiers": { "predicate": "flags.0" }, "comment": "File saved in parts using the method {@link upload.RawSaveFilePartRequest}" }, { "name": "video", "type": "InputFile", "typeModifiers": { "predicate": "flags.1" }, "comment": "Square video for animated profile picture" }, { "name": "video_start_ts", "type": "double", "typeModifiers": { "predicate": "flags.2" }, "comment": "Floating point UNIX timestamp in seconds, indicating the frame of the video/sticker that should be used as static preview; can only be used if video or video_emoji_markup is set." }, { "name": "video_emoji_markup", "type": "VideoSize", "typeModifiers": { "predicate": "flags.3" }, "comment": "Animated sticker profile picture, must contain either a {@link RawVideoSizeEmojiMarkup} or a {@link RawVideoSizeStickerMarkup} constructor." }] }, { "kind": "class", "name": "inputChatPhoto", "type": "InputChatPhoto", "id": 2303962423, "comment": "Existing photo to be set as a chat profile photo.", "arguments": [{ "name": "id", "type": "InputPhoto", "comment": "Existing photo" }] }, { "kind": "class", "name": "inputGeoPointEmpty", "type": "InputGeoPoint", "id": 3837862870, "comment": "Empty GeoPoint constructor.", "arguments": [] }, { "kind": "class", "name": "inputGeoPoint", "type": "InputGeoPoint", "id": 1210199983, "comment": "Defines a GeoPoint by its coordinates.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "lat", "type": "double", "comment": "Latitude" }, { "name": "long", "type": "double", "comment": "Longitude" }, { "name": "accuracy_radius", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "The estimated horizontal accuracy of the location, in meters; as defined by the sender." }] }, { "kind": "class", "name": "inputPhotoEmpty", "type": "InputPhoto", "id": 483901197, "comment": "Empty constructor.", "arguments": [] }, { "kind": "class", "name": "inputPhoto", "type": "InputPhoto", "id": 1001634122, "comment": "Defines a photo for further interaction.", "arguments": [{ "name": "id", "type": "long", "comment": "Photo identifier" }, { "name": "access_hash", "type": "long", "comment": "access_hash value from the {@link RawPhoto} constructor" }, { "name": "file_reference", "type": "bytes", "comment": "File reference" }] }, { "kind": "class", "name": "inputFileLocation", "type": "InputFileLocation", "id": 3755650017, "comment": "DEPRECATED location of a photo", "arguments": [{ "name": "volume_id", "type": "long", "comment": "Server volume" }, { "name": "local_id", "type": "int", "comment": "File identifier" }, { "name": "secret", "type": "long", "comment": "Check sum to access the file" }, { "name": "file_reference", "type": "bytes", "comment": "File reference" }] }, { "kind": "class", "name": "inputEncryptedFileLocation", "type": "InputFileLocation", "id": 4112735573, "comment": "Location of encrypted secret chat file.", "arguments": [{ "name": "id", "type": "long", "comment": "File ID, id parameter value from {@link RawEncryptedFile}" }, { "name": "access_hash", "type": "long", "comment": "Checksum, access_hash parameter value from {@link RawEncryptedFile}" }] }, { "kind": "class", "name": "inputDocumentFileLocation", "type": "InputFileLocation", "id": 3134223748, "comment": "Document location (video, voice, audio, basically every type except photo)", "arguments": [{ "name": "id", "type": "long", "comment": "Document ID" }, { "name": "access_hash", "type": "long", "comment": "access_hash parameter from the {@link RawDocument} constructor" }, { "name": "file_reference", "type": "bytes", "comment": "File reference" }, { "name": "thumb_size", "type": "string", "comment": "Thumbnail size to download the thumbnail" }] }, { "kind": "class", "name": "inputSecureFileLocation", "type": "InputFileLocation", "id": 3418877480, "comment": "Location of encrypted telegram passport file.", "arguments": [{ "name": "id", "type": "long", "comment": "File ID, id parameter value from {@link RawSecureFile}" }, { "name": "access_hash", "type": "long", "comment": "Checksum, access_hash parameter value from {@link RawSecureFile}" }] }, { "kind": "class", "name": "inputTakeoutFileLocation", "type": "InputFileLocation", "id": 700340377, "comment": "Used to download a JSON file that will contain all personal data related to features that do not have a specialized takeout method yet, see here » for more info on the takeout API.", "arguments": [] }, { "kind": "class", "name": "inputPhotoFileLocation", "type": "InputFileLocation", "id": 1075322878, "comment": "Use this object to download a photo with {@link upload.RawGetFileRequest} method", "arguments": [{ "name": "id", "type": "long", "comment": "Photo ID, obtained from the {@link RawPhoto} object" }, { "name": "access_hash", "type": "long", "comment": "Photo's access hash, obtained from the {@link RawPhoto} object" }, { "name": "file_reference", "type": "bytes", "comment": "File reference" }, { "name": "thumb_size", "type": "string", "comment": "The PhotoSize to download: must be set to the type field of the desired PhotoSize object of the {@link RawPhoto}" }] }, { "kind": "class", "name": "inputPhotoLegacyFileLocation", "type": "InputFileLocation", "id": 3627312883, "comment": "DEPRECATED legacy photo file location", "arguments": [{ "name": "id", "type": "long", "comment": "Photo ID" }, { "name": "access_hash", "type": "long", "comment": "Access hash" }, { "name": "file_reference", "type": "bytes", "comment": "File reference" }, { "name": "volume_id", "type": "long", "comment": "Volume ID" }, { "name": "local_id", "type": "int", "comment": "Local ID" }, { "name": "secret", "type": "long", "comment": "Secret" }] }, { "kind": "class", "name": "inputPeerPhotoFileLocation", "type": "InputFileLocation", "id": 925204121, "comment": "Location of profile photo of channel/group/supergroup/user", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "big", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to download the high-quality version of the picture" }, { "name": "peer", "type": "InputPeer", "comment": "The peer whose profile picture should be downloaded" }, { "name": "photo_id", "type": "long", "comment": "Photo ID" }] }, { "kind": "class", "name": "inputStickerSetThumb", "type": "InputFileLocation", "id": 2642736091, "comment": "Location of stickerset thumbnail (see files)", "arguments": [{ "name": "stickerset", "type": "InputStickerSet", "comment": "Sticker set" }, { "name": "thumb_version", "type": "int", "comment": "Thumbnail version" }] }, { "kind": "class", "name": "inputGroupCallStream", "type": "InputFileLocation", "id": 93890858, "comment": "Chunk of a livestream", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "call", "type": "InputGroupCall", "comment": "Livestream info" }, { "name": "time_ms", "type": "long", "comment": "Timestamp in milliseconds" }, { "name": "scale", "type": "int", "comment": "Specifies the duration of the video segment to fetch in milliseconds, by bitshifting 1000 to the right scale times: duration_ms := 1000 >> scale" }, { "name": "video_channel", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Selected video channel" }, { "name": "video_quality", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Selected video quality (0 = lowest, 1 = medium, 2 = best)" }] }, { "kind": "class", "name": "peerUser", "type": "Peer", "id": 1498486562, "comment": "Chat partner", "arguments": [{ "name": "user_id", "type": "int53", "comment": "User identifier" }] }, { "kind": "class", "name": "peerChat", "type": "Peer", "id": 918946202, "comment": "Group.", "arguments": [{ "name": "chat_id", "type": "int53", "comment": "Group identifier" }] }, { "kind": "class", "name": "peerChannel", "type": "Peer", "id": 2728736542, "comment": "Channel/supergroup", "arguments": [{ "name": "channel_id", "type": "int53", "comment": "Channel ID" }] }, { "kind": "class", "name": "storage.fileUnknown", "type": "storage.FileType", "id": 2861972229, "comment": "Unknown type.", "arguments": [] }, { "kind": "class", "name": "storage.filePartial", "type": "storage.FileType", "id": 1086091090, "comment": "Part of a bigger file.", "arguments": [] }, { "kind": "class", "name": "storage.fileJpeg", "type": "storage.FileType", "id": 8322574, "comment": "JPEG image. MIME type: image/jpeg.", "arguments": [] }, { "kind": "class", "name": "storage.fileGif", "type": "storage.FileType", "id": 3403786975, "comment": "GIF image. MIME type: image/gif.", "arguments": [] }, { "kind": "class", "name": "storage.filePng", "type": "storage.FileType", "id": 172975040, "comment": "PNG image. MIME type: image/png.", "arguments": [] }, { "kind": "class", "name": "storage.filePdf", "type": "storage.FileType", "id": 2921222285, "comment": "PDF document image. MIME type: application/pdf.", "arguments": [] }, { "kind": "class", "name": "storage.fileMp3", "type": "storage.FileType", "id": 1384777335, "comment": "Mp3 audio. MIME type: audio/mpeg.", "arguments": [] }, { "kind": "class", "name": "storage.fileMov", "type": "storage.FileType", "id": 1258941372, "comment": "Quicktime video. MIME type: video/quicktime.", "arguments": [] }, { "kind": "class", "name": "storage.fileMp4", "type": "storage.FileType", "id": 3016663268, "comment": "MPEG-4 video. MIME type: video/mp4.", "arguments": [] }, { "kind": "class", "name": "storage.fileWebp", "type": "storage.FileType", "id": 276907596, "comment": "WEBP image. MIME type: image/webp.", "arguments": [] }, { "kind": "class", "name": "userEmpty", "type": "User", "id": 3552332666, "comment": "Empty constructor, non-existent user.", "arguments": [{ "name": "id", "type": "int53", "comment": "User identifier or 0" }] }, { "kind": "class", "name": "user", "type": "User", "id": 2201046986, "comment": "Indicates info about a certain user.\n\nUnless specified otherwise, when updating the local peer database, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).\n\nSee here » for an implementation of the logic to use when updating the local user peer database.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "self", "type": "true", "typeModifiers": { "predicate": "flags.10" }, "comment": "Whether this user indicates the currently logged in user" }, { "name": "contact", "type": "true", "typeModifiers": { "predicate": "flags.11" }, "comment": "Whether this user is a contact
When updating the local peer database, do not apply changes to this field if the min flag is set." }, { "name": "mutual_contact", "type": "true", "typeModifiers": { "predicate": "flags.12" }, "comment": "Whether this user is a mutual contact.
When updating the local peer database, do not apply changes to this field if the min flag is set." }, { "name": "deleted", "type": "true", "typeModifiers": { "predicate": "flags.13" }, "comment": "Whether the account of this user was deleted.
Changes to this flag should invalidate the local {@link RawUserFull} cache for this user ID, see here » for more info." }, { "name": "bot", "type": "true", "typeModifiers": { "predicate": "flags.14" }, "comment": "Is this user a bot?
Changes to this flag should invalidate the local {@link RawUserFull} cache for this user ID, see here » for more info." }, { "name": "bot_chat_history", "type": "true", "typeModifiers": { "predicate": "flags.15" }, "comment": "Can the bot see all messages in groups?" }, { "name": "bot_nochats", "type": "true", "typeModifiers": { "predicate": "flags.16" }, "comment": "Can the bot be added to groups?" }, { "name": "verified", "type": "true", "typeModifiers": { "predicate": "flags.17" }, "comment": "Whether this user is verified" }, { "name": "restricted", "type": "true", "typeModifiers": { "predicate": "flags.18" }, "comment": "Access to this user must be restricted for the reason specified in restriction_reason" }, { "name": "min", "type": "true", "typeModifiers": { "predicate": "flags.20" }, "comment": "See min" }, { "name": "bot_inline_geo", "type": "true", "typeModifiers": { "predicate": "flags.21" }, "comment": "Whether the bot can request our geolocation in inline mode" }, { "name": "support", "type": "true", "typeModifiers": { "predicate": "flags.23" }, "comment": "Whether this is an official support user" }, { "name": "scam", "type": "true", "typeModifiers": { "predicate": "flags.24" }, "comment": "This may be a scam user" }, { "name": "apply_min_photo", "type": "true", "typeModifiers": { "predicate": "flags.25" }, "comment": "If set and min is set, the value of photo can be used to update the local database, see the documentation of that flag for more info." }, { "name": "fake", "type": "true", "typeModifiers": { "predicate": "flags.26" }, "comment": "If set, this user was reported by many users as a fake or scam user: be careful when interacting with them." }, { "name": "bot_attach_menu", "type": "true", "typeModifiers": { "predicate": "flags.27" }, "comment": "Whether this bot offers an attachment menu web app" }, { "name": "premium", "type": "true", "typeModifiers": { "predicate": "flags.28" }, "comment": "Whether this user is a Telegram Premium user
Changes to this flag should invalidate the local {@link RawUserFull} cache for this user ID, see here » for more info.
Changes to this flag if the self flag is set should also trigger the following calls, to refresh the respective caches:
- The {@link help.RawGetConfigRequest} cache
- The {@link messages.RawGetTopReactionsRequest} cache if the bot flag is not set" }, { "name": "attach_menu_enabled", "type": "true", "typeModifiers": { "predicate": "flags.29" }, "comment": "Whether we installed the attachment menu web app offered by this bot.
When updating the local peer database, do not apply changes to this field if the min flag is set." }, { "name": "flags2", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "bot_can_edit", "type": "true", "typeModifiers": { "predicate": "flags2.1" }, "comment": "Whether we can edit the profile picture, name, about text and description of this bot because we own it.
When updating the local peer database, do not apply changes to this field if the min flag is set.
Changes to this flag (if min is not set) should invalidate the local {@link RawUserFull} cache for this user ID." }, { "name": "close_friend", "type": "true", "typeModifiers": { "predicate": "flags2.2" }, "comment": "Whether we marked this user as a close friend, see here » for more info.
When updating the local peer database, do not apply changes to this field if the min flag is set." }, { "name": "stories_hidden", "type": "true", "typeModifiers": { "predicate": "flags2.3" }, "comment": "Whether we have hidden » all active stories of this user.
When updating the local peer database, do not apply changes to this field if the min flag is set." }, { "name": "stories_unavailable", "type": "true", "typeModifiers": { "predicate": "flags2.4" }, "comment": "No stories from this user are visible." }, { "name": "contact_require_premium", "type": "true", "typeModifiers": { "predicate": "flags2.10" }, "comment": "If set, we can only write to this user if they have already sent some messages to us, if we are subscribed to Telegram Premium, or if they're a mutual contact ({@link RawUser}.mutual_contact).
All the secondary conditions listed above must be checked separately to verify whether we can still write to the user, even if this flag is set (i.e. a mutual contact will have this flag set even if we can still write to them, and so on...); to avoid doing these extra checks if we haven't yet cached all the required information (for example while displaying the chat list in the sharing UI) the {@link users.RawGetIsPremiumRequiredToContactRequest} method may be invoked instead, passing the list of users currently visible in the UI, returning a list of booleans that directly specify whether we can or cannot write to each user; alternatively, the {@link RawUserFull}.contact_require_premium flag contains the same (fully checked, i.e. it's not just a copy of this flag) info returned by {@link users.RawGetIsPremiumRequiredToContactRequest}.
To set this flag for ourselves invoke {@link account.RawSetGlobalPrivacySettingsRequest}, setting the settings.new_noncontact_peers_require_premium flag." }, { "name": "bot_business", "type": "true", "typeModifiers": { "predicate": "flags2.11" }, "comment": "Whether this bot can be connected to a user as specified here »." }, { "name": "bot_has_main_app", "type": "true", "typeModifiers": { "predicate": "flags2.13" }, "comment": "If set, this bot has configured a Main Mini App »." }, { "name": "id", "type": "int53", "comment": "ID of the user, see here » for more info." }, { "name": "access_hash", "type": "long", "typeModifiers": { "predicate": "flags.0" }, "comment": "Access hash of the user, see here » for more info.
If this flag is set, when updating the local peer database, generate a virtual flag called min_access_hash, which is:
- Set to true if min is set AND
- The phone flag is not set OR
- The phone flag is set and the associated phone number string is non-empty
- Set to false otherwise.

Then, apply both access_hash and min_access_hash to the local database if:
- min_access_hash is false OR
- min_access_hash is true AND
- There is no locally cached object for this user OR
- There is no access_hash in the local cache OR
- The cached object's min_access_hash is also true
If the final merged object stored to the database has the min_access_hash field set to true, the related access_hash is only suitable to use in {@link RawInputPeerPhotoFileLocation}, to directly download the profile pictures of users, everywhere else a inputPeer*FromMessage constructor will have to be generated as specified here ».
Bots can also use min access hashes in some conditions, by passing 0 instead of the min access hash." }, { "name": "first_name", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "First name.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
- The min flag of the locally cached user entry is set." }, { "name": "last_name", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "Last name.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
- The min flag of the locally cached user entry is set." }, { "name": "username", "type": "string", "typeModifiers": { "predicate": "flags.3" }, "comment": "Main active username.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
- The min flag of the locally cached user entry is set.
Changes to this flag should invalidate the local {@link RawUserFull} cache for this user ID if the above conditions are respected and the bot_can_edit flag is also set." }, { "name": "phone", "type": "string", "typeModifiers": { "predicate": "flags.4" }, "comment": "Phone number.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
- The min flag of the locally cached user entry is set." }, { "name": "photo", "type": "UserProfilePhoto", "typeModifiers": { "predicate": "flags.5" }, "comment": "Profile picture of user.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
- The apply_min_photo flag is set OR
- The min flag of the locally cached user entry is set." }, { "name": "status", "type": "UserStatus", "typeModifiers": { "predicate": "flags.6" }, "comment": "Online status of user.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
- The min flag of the locally cached user entry is set OR
- The locally cached user entry is equal to {@link RawUserStatusEmpty}." }, { "name": "bot_info_version", "type": "int", "typeModifiers": { "predicate": "flags.14" }, "comment": "Version of the {@link RawUserFull}, incremented every time it changes.
Changes to this flag should invalidate the local {@link RawUserFull} cache for this user ID, see here » for more info." }, { "name": "restriction_reason", "type": "RestrictionReason", "typeModifiers": { "predicate": "flags.18", "isVector": true }, "comment": "Contains the reason why access to this user must be restricted." }, { "name": "bot_inline_placeholder", "type": "string", "typeModifiers": { "predicate": "flags.19" }, "comment": "Inline placeholder for this inline bot" }, { "name": "lang_code", "type": "string", "typeModifiers": { "predicate": "flags.22" }, "comment": "Language code of the user" }, { "name": "emoji_status", "type": "EmojiStatus", "typeModifiers": { "predicate": "flags.30" }, "comment": "Emoji status" }, { "name": "usernames", "type": "Username", "typeModifiers": { "predicate": "flags2.0", "isVector": true }, "comment": "Additional usernames.
When updating the local peer database, apply changes to this field only if:
- The min flag is not set OR
- The min flag is set AND
- The min flag of the locally cached user entry is set.
Changes to this flag (if the above conditions are respected) should invalidate the local {@link RawUserFull} cache for this user ID." }, { "name": "stories_max_id", "type": "int", "typeModifiers": { "predicate": "flags2.5" }, "comment": "ID of the maximum read story.
When updating the local peer database, do not apply changes to this field if the min flag of the incoming constructor is set." }, { "name": "color", "type": "PeerColor", "typeModifiers": { "predicate": "flags2.8" }, "comment": "The user's accent color." }, { "name": "profile_color", "type": "PeerColor", "typeModifiers": { "predicate": "flags2.9" }, "comment": "The user's profile color." }, { "name": "bot_active_users", "type": "int", "typeModifiers": { "predicate": "flags2.12" }, "comment": "Monthly Active Users (MAU) of this bot (may be absent for small bots)." }] }, { "kind": "class", "name": "userProfilePhotoEmpty", "type": "UserProfilePhoto", "id": 1326562017, "comment": "Profile photo has not been set, or was hidden.", "arguments": [] }, { "kind": "class", "name": "userProfilePhoto", "type": "UserProfilePhoto", "id": 2194798342, "comment": "User profile photo.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "has_video", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether an animated profile picture is available for this user" }, { "name": "personal", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether this profile photo is only visible to us (i.e. it was set using {@link photos.RawUploadContactProfilePhotoRequest})." }, { "name": "photo_id", "type": "long", "comment": "Identifier of the respective photo" }, { "name": "stripped_thumb", "type": "bytes", "typeModifiers": { "predicate": "flags.1" }, "comment": "Stripped thumbnail" }, { "name": "dc_id", "type": "int", "comment": "DC ID where the photo is stored" }] }, { "kind": "class", "name": "userStatusEmpty", "type": "UserStatus", "id": 164646985, "comment": "User status has not been set yet.", "arguments": [] }, { "kind": "class", "name": "userStatusOnline", "type": "UserStatus", "id": 3988339017, "comment": "Online status of the user.", "arguments": [{ "name": "expires", "type": "int", "comment": "Time to expiration of the current online status" }] }, { "kind": "class", "name": "userStatusOffline", "type": "UserStatus", "id": 9203775, "comment": "The user's offline status.", "arguments": [{ "name": "was_online", "type": "int", "comment": "Time the user was last seen online" }] }, { "kind": "class", "name": "userStatusRecently", "type": "UserStatus", "id": 2065268168, "comment": "Online status: last seen recently", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "by_me", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, the exact user status of this user is actually available to us, but to view it we must first purchase a Premium subscription, or allow this user to see our exact last online status. See {@link RawPrivacyKeyStatusTimestamp} for more info." }] }, { "kind": "class", "name": "userStatusLastWeek", "type": "UserStatus", "id": 1410997530, "comment": "Online status: last seen last week", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "by_me", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, the exact user status of this user is actually available to us, but to view it we must first purchase a Premium subscription, or allow this user to see our exact last online status. See {@link RawPrivacyKeyStatusTimestamp} for more info." }] }, { "kind": "class", "name": "userStatusLastMonth", "type": "UserStatus", "id": 1703516023, "comment": "Online status: last seen last month", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "by_me", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, the exact user status of this user is actually available to us, but to view it we must first purchase a Premium subscription, or allow this user to see our exact last online status. See {@link RawPrivacyKeyStatusTimestamp} for more info." }] }, { "kind": "class", "name": "chatEmpty", "type": "Chat", "id": 693512293, "comment": "Empty constructor, group doesn't exist", "arguments": [{ "name": "id", "type": "int53", "comment": "Group identifier" }] }, { "kind": "class", "name": "chat", "type": "Chat", "id": 1103884886, "comment": "Info about a group.\n\nWhen updating the local peer database, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).\n\nSee here » for an implementation of the logic to use when updating the local user peer database.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "creator", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the current user is the creator of the group" }, { "name": "left", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether the current user has left the group" }, { "name": "deactivated", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Whether the group was migrated" }, { "name": "call_active", "type": "true", "typeModifiers": { "predicate": "flags.23" }, "comment": "Whether a group call is currently active" }, { "name": "call_not_empty", "type": "true", "typeModifiers": { "predicate": "flags.24" }, "comment": "Whether there's anyone in the group call" }, { "name": "noforwards", "type": "true", "typeModifiers": { "predicate": "flags.25" }, "comment": "Whether this group is protected, thus does not allow forwarding messages from it" }, { "name": "id", "type": "int53", "comment": "ID of the group, see here » for more info" }, { "name": "title", "type": "string", "comment": "Title" }, { "name": "photo", "type": "ChatPhoto", "comment": "Chat photo" }, { "name": "participants_count", "type": "int", "comment": "Participant count" }, { "name": "date", "type": "int", "comment": "Date of creation of the group" }, { "name": "version", "type": "int", "comment": "Used in basic groups to reorder updates and make sure that all of them were received." }, { "name": "migrated_to", "type": "InputChannel", "typeModifiers": { "predicate": "flags.6" }, "comment": "Means this chat was upgraded to a supergroup" }, { "name": "admin_rights", "type": "ChatAdminRights", "typeModifiers": { "predicate": "flags.14" }, "comment": "Admin rights of the user in the group" }, { "name": "default_banned_rights", "type": "ChatBannedRights", "typeModifiers": { "predicate": "flags.18" }, "comment": "Default banned rights of all users in the group" }] }, { "kind": "class", "name": "chatForbidden", "type": "Chat", "id": 1704108455, "comment": "A group to which the user has no access. E.g., because the user was kicked from the group.", "arguments": [{ "name": "id", "type": "int53", "comment": "User identifier" }, { "name": "title", "type": "string", "comment": "Group name" }] }, { "kind": "class", "name": "channel", "type": "Chat", "id": 179174543, "comment": "Channel/supergroup info\n\nWhen updating the local peer database, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).\n\nThe only exception to the above rule is when the min flag is set, in which case only the following fields must be applied over any locally stored version:\n\nSee here » for an implementation of the logic to use when updating the local user peer database.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "creator", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the current user is the creator of this channel" }, { "name": "left", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether the current user has left or is not a member of this channel" }, { "name": "broadcast", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Is this a channel?" }, { "name": "verified", "type": "true", "typeModifiers": { "predicate": "flags.7" }, "comment": "Is this channel verified by telegram?" }, { "name": "megagroup", "type": "true", "typeModifiers": { "predicate": "flags.8" }, "comment": "Is this a supergroup?
Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info." }, { "name": "restricted", "type": "true", "typeModifiers": { "predicate": "flags.9" }, "comment": "Whether viewing/writing in this channel for a reason (see restriction_reason)" }, { "name": "signatures", "type": "true", "typeModifiers": { "predicate": "flags.11" }, "comment": "Whether signatures are enabled (channels)" }, { "name": "min", "type": "true", "typeModifiers": { "predicate": "flags.12" }, "comment": "See min" }, { "name": "scam", "type": "true", "typeModifiers": { "predicate": "flags.19" }, "comment": "This channel/supergroup is probably a scam
Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info." }, { "name": "has_link", "type": "true", "typeModifiers": { "predicate": "flags.20" }, "comment": "Whether this channel has a linked discussion group » (or this supergroup is a channel's discussion group). The actual ID of the linked channel/supergroup is contained in {@link RawChannelFull}.linked_chat_id.
Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info." }, { "name": "has_geo", "type": "true", "typeModifiers": { "predicate": "flags.21" }, "comment": "Whether this channel has a geo position" }, { "name": "slowmode_enabled", "type": "true", "typeModifiers": { "predicate": "flags.22" }, "comment": "Whether slow mode is enabled for groups to prevent flood in chat.
Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info." }, { "name": "call_active", "type": "true", "typeModifiers": { "predicate": "flags.23" }, "comment": "Whether a group call or livestream is currently active" }, { "name": "call_not_empty", "type": "true", "typeModifiers": { "predicate": "flags.24" }, "comment": "Whether there's anyone in the group call or livestream" }, { "name": "fake", "type": "true", "typeModifiers": { "predicate": "flags.25" }, "comment": "If set, this supergroup/channel was reported by many users as a fake or scam: be careful when interacting with it.
Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info." }, { "name": "gigagroup", "type": "true", "typeModifiers": { "predicate": "flags.26" }, "comment": "Whether this supergroup is a gigagroup
Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info." }, { "name": "noforwards", "type": "true", "typeModifiers": { "predicate": "flags.27" }, "comment": "Whether this channel or group is protected, thus does not allow forwarding messages from it" }, { "name": "join_to_send", "type": "true", "typeModifiers": { "predicate": "flags.28" }, "comment": "Whether a user needs to join the supergroup before they can send messages: can be false only for discussion groups », toggle using {@link channels.RawToggleJoinToSendRequest}
Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info." }, { "name": "join_request", "type": "true", "typeModifiers": { "predicate": "flags.29" }, "comment": "Whether a user's join request will have to be approved by administrators, toggle using {@link channels.RawToggleJoinRequestRequest}
Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info." }, { "name": "forum", "type": "true", "typeModifiers": { "predicate": "flags.30" }, "comment": "Whether this supergroup is a forum.
Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info." }, { "name": "flags2", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "stories_hidden", "type": "true", "typeModifiers": { "predicate": "flags2.1" }, "comment": "Whether we have hidden all stories posted by this channel »." }, { "name": "stories_hidden_min", "type": "true", "typeModifiers": { "predicate": "flags2.2" }, "comment": "If set, indicates that the stories_hidden flag was not populated, and its value must cannot be relied on; use the previously cached value, or re-fetch the constructor using {@link channels.RawGetChannelsRequest} to obtain the latest value of the stories_hidden flag." }, { "name": "stories_unavailable", "type": "true", "typeModifiers": { "predicate": "flags2.3" }, "comment": "No stories from the channel are visible." }, { "name": "id", "type": "int53", "comment": "ID of the channel, see here » for more info" }, { "name": "access_hash", "type": "long", "typeModifiers": { "predicate": "flags.13" }, "comment": "Access hash, see here » for more info" }, { "name": "title", "type": "string", "comment": "Title" }, { "name": "username", "type": "string", "typeModifiers": { "predicate": "flags.6" }, "comment": "Main active username." }, { "name": "photo", "type": "ChatPhoto", "comment": "Profile photo" }, { "name": "date", "type": "int", "comment": "Date when the user joined the supergroup/channel, or if the user isn't a member, its creation date" }, { "name": "restriction_reason", "type": "RestrictionReason", "typeModifiers": { "predicate": "flags.9", "isVector": true }, "comment": "Contains the reason why access to this channel must be restricted.
Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info." }, { "name": "admin_rights", "type": "ChatAdminRights", "typeModifiers": { "predicate": "flags.14" }, "comment": "Admin rights of the user in this channel (see rights)" }, { "name": "banned_rights", "type": "ChatBannedRights", "typeModifiers": { "predicate": "flags.15" }, "comment": "Banned rights of the user in this channel (see rights)" }, { "name": "default_banned_rights", "type": "ChatBannedRights", "typeModifiers": { "predicate": "flags.18" }, "comment": "Default chat rights (see rights)" }, { "name": "participants_count", "type": "int", "typeModifiers": { "predicate": "flags.17" }, "comment": "Participant count" }, { "name": "usernames", "type": "Username", "typeModifiers": { "predicate": "flags2.0", "isVector": true }, "comment": "Additional usernames" }, { "name": "stories_max_id", "type": "int", "typeModifiers": { "predicate": "flags2.4" }, "comment": "ID of the maximum read story." }, { "name": "color", "type": "PeerColor", "typeModifiers": { "predicate": "flags2.7" }, "comment": "The channel's accent color." }, { "name": "profile_color", "type": "PeerColor", "typeModifiers": { "predicate": "flags2.8" }, "comment": "The channel's profile color." }, { "name": "emoji_status", "type": "EmojiStatus", "typeModifiers": { "predicate": "flags2.9" }, "comment": "Emoji status" }, { "name": "level", "type": "int", "typeModifiers": { "predicate": "flags2.10" }, "comment": "Boost level.
Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info." }] }, { "kind": "class", "name": "channelForbidden", "type": "Chat", "id": 399807445, "comment": "Indicates a channel/supergroup we can't access because we were banned, or for some other reason.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "broadcast", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Is this a channel" }, { "name": "megagroup", "type": "true", "typeModifiers": { "predicate": "flags.8" }, "comment": "Is this a supergroup" }, { "name": "id", "type": "int53", "comment": "Channel ID" }, { "name": "access_hash", "type": "long", "comment": "Access hash" }, { "name": "title", "type": "string", "comment": "Title" }, { "name": "until_date", "type": "int", "typeModifiers": { "predicate": "flags.16" }, "comment": "The ban is valid until the specified date" }] }, { "kind": "class", "name": "chatFull", "type": "ChatFull", "id": 640893467, "comment": "Full info about a basic group.\n\nWhen updating the local peer database », all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "can_set_username", "type": "true", "typeModifiers": { "predicate": "flags.7" }, "comment": "Can we change the username of this chat" }, { "name": "has_scheduled", "type": "true", "typeModifiers": { "predicate": "flags.8" }, "comment": "Whether scheduled messages are available" }, { "name": "translations_disabled", "type": "true", "typeModifiers": { "predicate": "flags.19" }, "comment": "Whether the real-time chat translation popup should be hidden." }, { "name": "id", "type": "int53", "comment": "ID of the chat" }, { "name": "about", "type": "string", "comment": "About string for this chat" }, { "name": "participants", "type": "ChatParticipants", "comment": "Participant list" }, { "name": "chat_photo", "type": "Photo", "typeModifiers": { "predicate": "flags.2" }, "comment": "Chat photo" }, { "name": "notify_settings", "type": "PeerNotifySettings", "comment": "Notification settings" }, { "name": "exported_invite", "type": "ExportedChatInvite", "typeModifiers": { "predicate": "flags.13" }, "comment": "Chat invite" }, { "name": "bot_info", "type": "BotInfo", "typeModifiers": { "predicate": "flags.3", "isVector": true }, "comment": "Info about bots that are in this chat" }, { "name": "pinned_msg_id", "type": "int", "typeModifiers": { "predicate": "flags.6" }, "comment": "Message ID of the last pinned message" }, { "name": "folder_id", "type": "int", "typeModifiers": { "predicate": "flags.11" }, "comment": "Peer folder ID, for more info click here" }, { "name": "call", "type": "InputGroupCall", "typeModifiers": { "predicate": "flags.12" }, "comment": "Group call information" }, { "name": "ttl_period", "type": "int", "typeModifiers": { "predicate": "flags.14" }, "comment": "Time-To-Live of messages sent by the current user to this chat" }, { "name": "groupcall_default_join_as", "type": "Peer", "typeModifiers": { "predicate": "flags.15" }, "comment": "When using {@link phone.RawGetGroupCallJoinAsRequest} to get a list of peers that can be used to join a group call, this field indicates the peer that should be selected by default." }, { "name": "theme_emoticon", "type": "string", "typeModifiers": { "predicate": "flags.16" }, "comment": "Emoji representing a specific chat theme" }, { "name": "requests_pending", "type": "int", "typeModifiers": { "predicate": "flags.17" }, "comment": "Pending join requests »" }, { "name": "recent_requesters", "type": "long", "typeModifiers": { "predicate": "flags.17", "isVector": true }, "comment": "IDs of users who requested to join recently" }, { "name": "available_reactions", "type": "ChatReactions", "typeModifiers": { "predicate": "flags.18" }, "comment": "Allowed message reactions »" }, { "name": "reactions_limit", "type": "int", "typeModifiers": { "predicate": "flags.20" }, "comment": "This flag may be used to impose a custom limit of unique reactions (i.e. a customizable version of appConfig.reactions_uniq_max)." }] }, { "kind": "class", "name": "channelFull", "type": "ChatFull", "id": 3148559501, "comment": "Full info about a channel, supergroup or gigagroup.\n\nWhen updating the local peer database », all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "can_view_participants", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Can we view the participant list?" }, { "name": "can_set_username", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "Can we set the channel's username?" }, { "name": "can_set_stickers", "type": "true", "typeModifiers": { "predicate": "flags.7" }, "comment": "Can we {@link channels.RawSetStickersRequest} a stickerpack to the supergroup?" }, { "name": "hidden_prehistory", "type": "true", "typeModifiers": { "predicate": "flags.10" }, "comment": "Is the history before we joined hidden to us?" }, { "name": "can_set_location", "type": "true", "typeModifiers": { "predicate": "flags.16" }, "comment": "Can we set the geolocation of this group (for geogroups)" }, { "name": "has_scheduled", "type": "true", "typeModifiers": { "predicate": "flags.19" }, "comment": "Whether scheduled messages are available" }, { "name": "can_view_stats", "type": "true", "typeModifiers": { "predicate": "flags.20" }, "comment": "Can the user view channel/supergroup statistics" }, { "name": "blocked", "type": "true", "typeModifiers": { "predicate": "flags.22" }, "comment": "Whether any anonymous admin of this supergroup was blocked: if set, you won't receive messages from anonymous group admins in discussion replies via @replies" }, { "name": "flags2", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "can_delete_channel", "type": "true", "typeModifiers": { "predicate": "flags2.0" }, "comment": "Can we delete this channel?" }, { "name": "antispam", "type": "true", "typeModifiers": { "predicate": "flags2.1" }, "comment": "Whether native antispam functionality is enabled in this supergroup." }, { "name": "participants_hidden", "type": "true", "typeModifiers": { "predicate": "flags2.2" }, "comment": "Whether the participant list is hidden." }, { "name": "translations_disabled", "type": "true", "typeModifiers": { "predicate": "flags2.3" }, "comment": "Whether the real-time chat translation popup should be hidden." }, { "name": "stories_pinned_available", "type": "true", "typeModifiers": { "predicate": "flags2.5" }, "comment": "Whether this user has some pinned stories." }, { "name": "view_forum_as_messages", "type": "true", "typeModifiers": { "predicate": "flags2.6" }, "comment": "Users may also choose to display messages from all topics of a forum as if they were sent to a normal group, using a \"View as messages\" setting in the local client.
This setting only affects the current account, and is synced to other logged in sessions using the {@link channels.RawToggleViewForumAsMessagesRequest} method; invoking this method will update the value of this flag." }, { "name": "restricted_sponsored", "type": "true", "typeModifiers": { "predicate": "flags2.11" }, "comment": "Whether ads on this channel were disabled as specified here » (this flag is only visible to the owner of the channel)." }, { "name": "can_view_revenue", "type": "true", "typeModifiers": { "predicate": "flags2.12" }, "comment": "If set, this user can view ad revenue statistics » for this channel." }, { "name": "paid_media_allowed", "type": "true", "typeModifiers": { "predicate": "flags2.14" }, "comment": "Whether the current user can send or forward paid media » to this channel." }, { "name": "can_view_stars_revenue", "type": "true", "typeModifiers": { "predicate": "flags2.15" }, "comment": "If set, this user can view Telegram Star revenue statistics » for this channel." }, { "name": "id", "type": "int53", "comment": "ID of the channel" }, { "name": "about", "type": "string", "comment": "Info about the channel" }, { "name": "participants_count", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Number of participants of the channel" }, { "name": "admins_count", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Number of channel admins" }, { "name": "kicked_count", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "Number of users kicked from the channel" }, { "name": "banned_count", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "Number of users banned from the channel" }, { "name": "online_count", "type": "int", "typeModifiers": { "predicate": "flags.13" }, "comment": "Number of users currently online" }, { "name": "read_inbox_max_id", "type": "int", "comment": "Position up to which all incoming messages are read." }, { "name": "read_outbox_max_id", "type": "int", "comment": "Position up to which all outgoing messages are read." }, { "name": "unread_count", "type": "int", "comment": "Count of unread messages" }, { "name": "chat_photo", "type": "Photo", "comment": "Channel picture" }, { "name": "notify_settings", "type": "PeerNotifySettings", "comment": "Notification settings" }, { "name": "exported_invite", "type": "ExportedChatInvite", "typeModifiers": { "predicate": "flags.23" }, "comment": "Invite link" }, { "name": "bot_info", "type": "BotInfo", "typeModifiers": { "isVector": true }, "comment": "Info about bots in the channel/supergroup" }, { "name": "migrated_from_chat_id", "type": "long", "typeModifiers": { "predicate": "flags.4" }, "comment": "The chat ID from which this group was migrated" }, { "name": "migrated_from_max_id", "type": "int", "typeModifiers": { "predicate": "flags.4" }, "comment": "The message ID in the original chat at which this group was migrated" }, { "name": "pinned_msg_id", "type": "int", "typeModifiers": { "predicate": "flags.5" }, "comment": "Message ID of the last pinned message" }, { "name": "stickerset", "type": "StickerSet", "typeModifiers": { "predicate": "flags.8" }, "comment": "Associated stickerset" }, { "name": "available_min_id", "type": "int", "typeModifiers": { "predicate": "flags.9" }, "comment": "Identifier of a maximum unavailable message in a channel due to hidden history." }, { "name": "folder_id", "type": "int", "typeModifiers": { "predicate": "flags.11" }, "comment": "Peer folder ID, for more info click here" }, { "name": "linked_chat_id", "type": "int53", "typeModifiers": { "predicate": "flags.14" }, "comment": "ID of the linked discussion chat for channels (and vice versa, the ID of the linked channel for discussion chats)." }, { "name": "location", "type": "ChannelLocation", "typeModifiers": { "predicate": "flags.15" }, "comment": "Location of the geo group" }, { "name": "slowmode_seconds", "type": "int", "typeModifiers": { "predicate": "flags.17" }, "comment": "If specified, users in supergroups will only be able to send one message every slowmode_seconds seconds" }, { "name": "slowmode_next_send_date", "type": "int", "typeModifiers": { "predicate": "flags.18" }, "comment": "Indicates when the user will be allowed to send another message in the supergroup (unixtime)" }, { "name": "stats_dc", "type": "int", "typeModifiers": { "predicate": "flags.12" }, "comment": "If set, specifies the DC to use for fetching channel statistics" }, { "name": "pts", "type": "int", "comment": "Latest PTS for this channel" }, { "name": "call", "type": "InputGroupCall", "typeModifiers": { "predicate": "flags.21" }, "comment": "Livestream or group call information" }, { "name": "ttl_period", "type": "int", "typeModifiers": { "predicate": "flags.24" }, "comment": "Time-To-Live of messages in this channel or supergroup" }, { "name": "pending_suggestions", "type": "string", "typeModifiers": { "predicate": "flags.25", "isVector": true }, "comment": "A list of suggested actions for the supergroup admin, see here for more info »." }, { "name": "groupcall_default_join_as", "type": "Peer", "typeModifiers": { "predicate": "flags.26" }, "comment": "When using {@link phone.RawGetGroupCallJoinAsRequest} to get a list of peers that can be used to join a group call, this field indicates the peer that should be selected by default." }, { "name": "theme_emoticon", "type": "string", "typeModifiers": { "predicate": "flags.27" }, "comment": "Emoji representing a specific chat theme" }, { "name": "requests_pending", "type": "int", "typeModifiers": { "predicate": "flags.28" }, "comment": "Pending join requests »" }, { "name": "recent_requesters", "type": "long", "typeModifiers": { "predicate": "flags.28", "isVector": true }, "comment": "IDs of users who requested to join recently" }, { "name": "default_send_as", "type": "Peer", "typeModifiers": { "predicate": "flags.29" }, "comment": "Default peer used for sending messages to this channel" }, { "name": "available_reactions", "type": "ChatReactions", "typeModifiers": { "predicate": "flags.30" }, "comment": "Allowed message reactions »" }, { "name": "reactions_limit", "type": "int", "typeModifiers": { "predicate": "flags2.13" }, "comment": "This flag may be used to impose a custom limit of unique reactions (i.e. a customizable version of appConfig.reactions_uniq_max)." }, { "name": "stories", "type": "PeerStories", "typeModifiers": { "predicate": "flags2.4" }, "comment": "Channel stories" }, { "name": "wallpaper", "type": "WallPaper", "typeModifiers": { "predicate": "flags2.7" }, "comment": "Wallpaper" }, { "name": "boosts_applied", "type": "int", "typeModifiers": { "predicate": "flags2.8" }, "comment": "The number of boosts the current user has applied to the current supergroup." }, { "name": "boosts_unrestrict", "type": "int", "typeModifiers": { "predicate": "flags2.9" }, "comment": "The number of boosts this supergroup requires to bypass slowmode and other restrictions, see here » for more info." }, { "name": "emojiset", "type": "StickerSet", "typeModifiers": { "predicate": "flags2.10" }, "comment": "Custom emoji stickerset associated to the current supergroup, set using {@link channels.RawSetEmojiStickersRequest} after reaching the appropriate boost level, see here » for more info." }] }, { "kind": "class", "name": "chatParticipant", "type": "ChatParticipant", "id": 3224190983, "comment": "Group member.", "arguments": [{ "name": "user_id", "type": "int53", "comment": "Member user ID" }, { "name": "inviter_id", "type": "int53", "comment": "ID of the user that added the member to the group" }, { "name": "date", "type": "int", "comment": "Date added to the group" }] }, { "kind": "class", "name": "chatParticipantCreator", "type": "ChatParticipant", "id": 3832270564, "comment": "Represents the creator of the group", "arguments": [{ "name": "user_id", "type": "int53", "comment": "ID of the user that created the group" }] }, { "kind": "class", "name": "chatParticipantAdmin", "type": "ChatParticipant", "id": 2694004571, "comment": "Chat admin", "arguments": [{ "name": "user_id", "type": "int53", "comment": "ID of a group member that is admin" }, { "name": "inviter_id", "type": "int53", "comment": "ID of the user that added the member to the group" }, { "name": "date", "type": "int", "comment": "Date when the user was added" }] }, { "kind": "class", "name": "chatParticipantsForbidden", "type": "ChatParticipants", "id": 2271466465, "comment": "Info on members is unavailable", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "chat_id", "type": "int53", "comment": "Group ID" }, { "name": "self_participant", "type": "ChatParticipant", "typeModifiers": { "predicate": "flags.0" }, "comment": "Info about the group membership of the current user" }] }, { "kind": "class", "name": "chatParticipants", "type": "ChatParticipants", "id": 1018991608, "comment": "Group members.", "arguments": [{ "name": "chat_id", "type": "int53", "comment": "Group identifier" }, { "name": "participants", "type": "ChatParticipant", "typeModifiers": { "isVector": true }, "comment": "List of group members" }, { "name": "version", "type": "int", "comment": "Group version number" }] }, { "kind": "class", "name": "chatPhotoEmpty", "type": "ChatPhoto", "id": 935395612, "comment": "Group photo is not set.", "arguments": [] }, { "kind": "class", "name": "chatPhoto", "type": "ChatPhoto", "id": 476978193, "comment": "Group profile photo.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "has_video", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the user has an animated profile picture" }, { "name": "photo_id", "type": "long", "comment": "Photo ID" }, { "name": "stripped_thumb", "type": "bytes", "typeModifiers": { "predicate": "flags.1" }, "comment": "Stripped thumbnail" }, { "name": "dc_id", "type": "int", "comment": "DC where this photo is stored" }] }, { "kind": "class", "name": "messageEmpty", "type": "Message", "id": 2426849924, "comment": "Empty constructor, non-existent message.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "id", "type": "int", "comment": "Message identifier" }, { "name": "peer_id", "type": "Peer", "typeModifiers": { "predicate": "flags.0" }, "comment": "Peer ID, the chat where this message was sent" }] }, { "kind": "class", "name": "message", "type": "Message", "id": 2486456898, "comment": "A message", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "out", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Is this an outgoing message" }, { "name": "mentioned", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "Whether we were mentioned in this message" }, { "name": "media_unread", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Whether there are unread media attachments in this message" }, { "name": "silent", "type": "true", "typeModifiers": { "predicate": "flags.13" }, "comment": "Whether this is a silent message (no notification triggered)" }, { "name": "post", "type": "true", "typeModifiers": { "predicate": "flags.14" }, "comment": "Whether this is a channel post" }, { "name": "from_scheduled", "type": "true", "typeModifiers": { "predicate": "flags.18" }, "comment": "Whether this is a scheduled message" }, { "name": "legacy", "type": "true", "typeModifiers": { "predicate": "flags.19" }, "comment": "This is a legacy message: it has to be refetched with the new layer" }, { "name": "edit_hide", "type": "true", "typeModifiers": { "predicate": "flags.21" }, "comment": "Whether the message should be shown as not modified to the user, even if an edit date is present" }, { "name": "pinned", "type": "true", "typeModifiers": { "predicate": "flags.24" }, "comment": "Whether this message is pinned" }, { "name": "noforwards", "type": "true", "typeModifiers": { "predicate": "flags.26" }, "comment": "Whether this message is protected and thus cannot be forwarded; clients should also prevent users from saving attached media (i.e. videos should only be streamed, photos should be kept in RAM, et cetera)." }, { "name": "invert_media", "type": "true", "typeModifiers": { "predicate": "flags.27" }, "comment": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom." }, { "name": "flags2", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "offline", "type": "true", "typeModifiers": { "predicate": "flags2.1" }, "comment": "If set, the message was sent because of a scheduled action by the message sender, for example, as away, or a greeting service message." }, { "name": "id", "type": "int", "comment": "ID of the message" }, { "name": "from_id", "type": "Peer", "typeModifiers": { "predicate": "flags.8" }, "comment": "ID of the sender of the message" }, { "name": "from_boosts_applied", "type": "int", "typeModifiers": { "predicate": "flags.29" }, "comment": "Supergroups only, contains the number of boosts this user has given the current supergroup, and should be shown in the UI in the header of the message.
Only present for incoming messages from non-anonymous supergroup members that have boosted the supergroup.
Note that this counter should be locally overridden for non-anonymous outgoing messages, according to the current value of {@link RawChannelFull}.boosts_applied, to ensure the value is correct even for messages sent by the current user before a supergroup was boosted (or after a boost has expired or the number of boosts has changed); do not update this value for incoming messages from other users, even if their boosts have changed." }, { "name": "peer_id", "type": "Peer", "comment": "Peer ID, the chat where this message was sent" }, { "name": "saved_peer_id", "type": "Peer", "typeModifiers": { "predicate": "flags.28" }, "comment": "Messages fetched from a saved messages dialog » will have peer={@link RawInputPeerSelf} and the saved_peer_id flag set to the ID of the saved dialog.
" }, { "name": "fwd_from", "type": "MessageFwdHeader", "typeModifiers": { "predicate": "flags.2" }, "comment": "Info about forwarded messages" }, { "name": "via_bot_id", "type": "int53", "typeModifiers": { "predicate": "flags.11" }, "comment": "ID of the inline bot that generated the message" }, { "name": "via_business_bot_id", "type": "int53", "typeModifiers": { "predicate": "flags2.0" }, "comment": "Whether the message was sent by the business bot specified in via_bot_id on behalf of the user." }, { "name": "reply_to", "type": "MessageReplyHeader", "typeModifiers": { "predicate": "flags.3" }, "comment": "Reply information" }, { "name": "date", "type": "int", "comment": "Date of the message" }, { "name": "message", "type": "string", "comment": "The message" }, { "name": "media", "type": "MessageMedia", "typeModifiers": { "predicate": "flags.9" }, "comment": "Media attachment" }, { "name": "reply_markup", "type": "ReplyMarkup", "typeModifiers": { "predicate": "flags.6" }, "comment": "Reply markup (bot/inline keyboards)" }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.7", "isVector": true }, "comment": "Message entities for styled text" }, { "name": "views", "type": "int", "typeModifiers": { "predicate": "flags.10" }, "comment": "View count for channel posts" }, { "name": "forwards", "type": "int", "typeModifiers": { "predicate": "flags.10" }, "comment": "Forward counter" }, { "name": "replies", "type": "MessageReplies", "typeModifiers": { "predicate": "flags.23" }, "comment": "Info about post comments (for channels) or message replies (for groups)" }, { "name": "edit_date", "type": "int", "typeModifiers": { "predicate": "flags.15" }, "comment": "Last edit date of this message" }, { "name": "post_author", "type": "string", "typeModifiers": { "predicate": "flags.16" }, "comment": "Name of the author of this message for channel posts (with signatures enabled)" }, { "name": "grouped_id", "type": "long", "typeModifiers": { "predicate": "flags.17" }, "comment": "Multiple media messages sent using {@link messages.RawSendMultiMediaRequest} with the same grouped ID indicate an album or media group" }, { "name": "reactions", "type": "MessageReactions", "typeModifiers": { "predicate": "flags.20" }, "comment": "Reactions to this message" }, { "name": "restriction_reason", "type": "RestrictionReason", "typeModifiers": { "predicate": "flags.22", "isVector": true }, "comment": "Contains the reason why access to this message must be restricted." }, { "name": "ttl_period", "type": "int", "typeModifiers": { "predicate": "flags.25" }, "comment": "Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well." }, { "name": "quick_reply_shortcut_id", "type": "int", "typeModifiers": { "predicate": "flags.30" }, "comment": "If set, this message is a quick reply shortcut message » (note that quick reply shortcut messages sent to a private chat will not have this field set)." }, { "name": "effect", "type": "long", "typeModifiers": { "predicate": "flags2.2" }, "comment": "A message effect that should be played as specified here »." }, { "name": "factcheck", "type": "FactCheck", "typeModifiers": { "predicate": "flags2.3" }, "comment": "Represents a fact-check »." }] }, { "kind": "class", "name": "messageService", "type": "Message", "id": 721967202, "comment": "Indicates a service message", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "out", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the message is outgoing" }, { "name": "mentioned", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "Whether we were mentioned in the message" }, { "name": "media_unread", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Whether the message contains unread media" }, { "name": "silent", "type": "true", "typeModifiers": { "predicate": "flags.13" }, "comment": "Whether the message is silent" }, { "name": "post", "type": "true", "typeModifiers": { "predicate": "flags.14" }, "comment": "Whether it's a channel post" }, { "name": "legacy", "type": "true", "typeModifiers": { "predicate": "flags.19" }, "comment": "This is a legacy message: it has to be refetched with the new layer" }, { "name": "id", "type": "int", "comment": "Message ID" }, { "name": "from_id", "type": "Peer", "typeModifiers": { "predicate": "flags.8" }, "comment": "ID of the sender of this message" }, { "name": "peer_id", "type": "Peer", "comment": "Sender of service message" }, { "name": "reply_to", "type": "MessageReplyHeader", "typeModifiers": { "predicate": "flags.3" }, "comment": "Reply (thread) information" }, { "name": "date", "type": "int", "comment": "Message date" }, { "name": "action", "type": "MessageAction", "comment": "Event connected with the service message" }, { "name": "ttl_period", "type": "int", "typeModifiers": { "predicate": "flags.25" }, "comment": "Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well." }] }, { "kind": "class", "name": "messageMediaEmpty", "type": "MessageMedia", "id": 1038967584, "comment": "Empty constructor.", "arguments": [] }, { "kind": "class", "name": "messageMediaPhoto", "type": "MessageMedia", "id": 1766936791, "comment": "Attached photo.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "spoiler", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether this media should be hidden behind a spoiler warning" }, { "name": "photo", "type": "Photo", "typeModifiers": { "predicate": "flags.0" }, "comment": "Photo" }, { "name": "ttl_seconds", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "Time to live in seconds of self-destructing photo" }] }, { "kind": "class", "name": "messageMediaGeo", "type": "MessageMedia", "id": 1457575028, "comment": "Attached map.", "arguments": [{ "name": "geo", "type": "GeoPoint", "comment": "GeoPoint" }] }, { "kind": "class", "name": "messageMediaContact", "type": "MessageMedia", "id": 1882335561, "comment": "Attached contact.", "arguments": [{ "name": "phone_number", "type": "string", "comment": "Phone number" }, { "name": "first_name", "type": "string", "comment": "Contact's first name" }, { "name": "last_name", "type": "string", "comment": "Contact's last name" }, { "name": "vcard", "type": "string", "comment": "VCARD of contact" }, { "name": "user_id", "type": "int53", "comment": "User identifier or 0, if the user with the given phone number is not registered" }] }, { "kind": "class", "name": "messageMediaUnsupported", "type": "MessageMedia", "id": 2676290718, "comment": "Current version of the client does not support this media type.", "arguments": [] }, { "kind": "class", "name": "messageMediaDocument", "type": "MessageMedia", "id": 1291114285, "comment": "Document (video, audio, voice, sticker, any media type except photo)", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "nopremium", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether this is a normal sticker, if not set this is a premium sticker and a premium sticker animation must be played." }, { "name": "spoiler", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "Whether this media should be hidden behind a spoiler warning" }, { "name": "video", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "Whether this is a video." }, { "name": "round", "type": "true", "typeModifiers": { "predicate": "flags.7" }, "comment": "Whether this is a round video." }, { "name": "voice", "type": "true", "typeModifiers": { "predicate": "flags.8" }, "comment": "Whether this is a voice message." }, { "name": "document", "type": "Document", "typeModifiers": { "predicate": "flags.0" }, "comment": "Attached document" }, { "name": "alt_document", "type": "Document", "typeModifiers": { "predicate": "flags.5" }, "comment": "Currently only used for story videos, may contain an alternative version of the story video, explicitly encoded using H.264 (in MPEG4 transport) at a lower resolution than document." }, { "name": "ttl_seconds", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "Time to live of self-destructing document" }] }, { "kind": "class", "name": "messageMediaWebPage", "type": "MessageMedia", "id": 3723562043, "comment": "Preview of webpage", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "force_large_media", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, specifies that a large media preview should be used." }, { "name": "force_small_media", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "If set, specifies that a small media preview should be used." }, { "name": "manual", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "If set, indicates that the URL used for the webpage preview was specified manually using {@link RawInputMediaWebPage}, and may not be related to any of the URLs specified in the message." }, { "name": "safe", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "If set, the webpage can be opened directly without user confirmation; otherwise, user confirmation is required, showing the exact URL that will be opened." }, { "name": "webpage", "type": "WebPage", "comment": "Webpage preview" }] }, { "kind": "class", "name": "messageMediaVenue", "type": "MessageMedia", "id": 784356159, "comment": "Venue", "arguments": [{ "name": "geo", "type": "GeoPoint", "comment": "Geolocation of venue" }, { "name": "title", "type": "string", "comment": "Venue name" }, { "name": "address", "type": "string", "comment": "Address" }, { "name": "provider", "type": "string", "comment": "Venue provider: currently only \"foursquare\" and \"gplaces\" (Google Places) need to be supported" }, { "name": "venue_id", "type": "string", "comment": "Venue ID in the provider's database" }, { "name": "venue_type", "type": "string", "comment": "Venue type in the provider's database" }] }, { "kind": "class", "name": "messageMediaGame", "type": "MessageMedia", "id": 4256272392, "comment": "Telegram game", "arguments": [{ "name": "game", "type": "Game", "comment": "Game" }] }, { "kind": "class", "name": "messageMediaInvoice", "type": "MessageMedia", "id": 4138027219, "comment": "Invoice", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "shipping_address_requested", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the shipping address was requested" }, { "name": "test", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether this is an example invoice" }, { "name": "title", "type": "string", "comment": "Product name, 1-32 characters" }, { "name": "description", "type": "string", "comment": "Product description, 1-255 characters" }, { "name": "photo", "type": "WebDocument", "typeModifiers": { "predicate": "flags.0" }, "comment": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for." }, { "name": "receipt_msg_id", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "Message ID of receipt: if set, clients should change the text of the first {@link RawKeyboardButtonBuy} button always attached to the {@link RawMessage} to a localized version of the word Receipt" }, { "name": "currency", "type": "string", "comment": "Three-letter ISO 4217 currency code, or XTR for Telegram Stars." }, { "name": "total_amount", "type": "long", "comment": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." }, { "name": "start_param", "type": "string", "comment": "Unique bot deep-linking parameter that can be used to generate this invoice" }, { "name": "extended_media", "type": "MessageExtendedMedia", "typeModifiers": { "predicate": "flags.4" }, "comment": "Deprecated" }] }, { "kind": "class", "name": "messageMediaGeoLive", "type": "MessageMedia", "id": 3108030054, "comment": "Indicates a live geolocation", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "geo", "type": "GeoPoint", "comment": "Geolocation" }, { "name": "heading", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "For live locations, a direction in which the location moves, in degrees; 1-360" }, { "name": "period", "type": "int", "comment": "Validity period of provided geolocation" }, { "name": "proximity_notification_radius", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000)." }] }, { "kind": "class", "name": "messageMediaPoll", "type": "MessageMedia", "id": 1272375192, "comment": "Poll", "arguments": [{ "name": "poll", "type": "Poll", "comment": "The poll" }, { "name": "results", "type": "PollResults", "comment": "The results of the poll" }] }, { "kind": "class", "name": "messageMediaDice", "type": "MessageMedia", "id": 1065280907, "comment": "Dice-based animated sticker", "arguments": [{ "name": "value", "type": "int", "comment": "Dice value" }, { "name": "emoticon", "type": "string", "comment": "The emoji, for now \"🏀\", \"🎲\" and \"🎯\" are supported" }] }, { "kind": "class", "name": "messageMediaStory", "type": "MessageMedia", "id": 1758159491, "comment": "Represents a forwarded story or a story mention.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "via_mention", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "If set, indicates that this someone has mentioned us in this story (i.e. by tagging us in the description) or vice versa, we have mentioned the other peer (if the message is outgoing)." }, { "name": "peer", "type": "Peer", "comment": "Peer that posted the story." }, { "name": "id", "type": "int", "comment": "Story ID" }, { "name": "story", "type": "StoryItem", "typeModifiers": { "predicate": "flags.0" }, "comment": "The story itself, if absent fetch it using {@link stories.RawGetStoriesByIDRequest} and the peer/id parameters specified above." }] }, { "kind": "class", "name": "messageMediaGiveaway", "type": "MessageMedia", "id": 3668805040, "comment": "Contains info about a giveaway, see here » for more info.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "only_new_subscribers", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, only new subscribers starting from the giveaway creation date will be able to participate to the giveaway." }, { "name": "winners_are_visible", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "If set, giveaway winners are public and will be listed in a {@link RawMessageMediaGiveawayResults} message that will be automatically sent to the channel once the giveaway ends." }, { "name": "channels", "type": "int53", "typeModifiers": { "isVector": true }, "comment": "The channels that the user must join to participate in the giveaway." }, { "name": "countries_iso2", "type": "string", "typeModifiers": { "predicate": "flags.1", "isVector": true }, "comment": "If set, only users residing in these countries can participate in the giveaway, (specified as a list of two-letter ISO 3166-1 alpha-2 country codes); otherwise there are no country-based limitations." }, { "name": "prize_description", "type": "string", "typeModifiers": { "predicate": "flags.3" }, "comment": "Can contain a textual description of additional giveaway prizes." }, { "name": "quantity", "type": "int", "comment": "Number of Telegram Premium subscriptions given away." }, { "name": "months", "type": "int", "comment": "Duration in months of each Telegram Premium subscription in the giveaway." }, { "name": "until_date", "type": "int", "comment": "The end date of the giveaway." }] }, { "kind": "class", "name": "messageMediaGiveawayResults", "type": "MessageMedia", "id": 3331919976, "comment": "A giveaway with public winners has finished, this constructor contains info about the winners.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "only_new_subscribers", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, only new subscribers starting from the giveaway creation date participated in the giveaway." }, { "name": "refunded", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "If set, the giveaway was canceled and was fully refunded." }, { "name": "channel_id", "type": "long", "comment": "ID of the channel/supergroup that was automatically boosted by the winners of the giveaway for duration of the Premium subscription." }, { "name": "additional_peers_count", "type": "int", "typeModifiers": { "predicate": "flags.3" }, "comment": "Number of other channels that participated in the giveaway." }, { "name": "launch_msg_id", "type": "int", "comment": "Identifier of the message with the giveaway in channel_id." }, { "name": "winners_count", "type": "int", "comment": "Total number of winners in the giveaway." }, { "name": "unclaimed_count", "type": "int", "comment": "Number of not-yet-claimed prizes." }, { "name": "winners", "type": "long", "typeModifiers": { "isVector": true }, "comment": "Up to 100 user identifiers of the winners of the giveaway." }, { "name": "months", "type": "int", "comment": "Duration in months of each Telegram Premium subscription in the giveaway." }, { "name": "prize_description", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Can contain a textual description of additional giveaway prizes." }, { "name": "until_date", "type": "int", "comment": "Point in time (UNIX timestamp in seconds) when the winners were selected. May be bigger than winners selection date specified in initial parameters of the giveaway." }] }, { "kind": "class", "name": "messageMediaPaidMedia", "type": "MessageMedia", "id": 2827297937, "comment": "Paid media, see here » for more info.", "arguments": [{ "name": "stars_amount", "type": "long", "comment": "The price of the media in Telegram Stars." }, { "name": "extended_media", "type": "MessageExtendedMedia", "typeModifiers": { "isVector": true }, "comment": "Either the paid-for media, or super low resolution media previews if the media wasn't purchased yet, see here » for more info." }] }, { "kind": "class", "name": "messageActionEmpty", "type": "MessageAction", "id": 3064919984, "comment": "Empty constructor.", "arguments": [] }, { "kind": "class", "name": "messageActionChatCreate", "type": "MessageAction", "id": 3175599021, "comment": "Group created", "arguments": [{ "name": "title", "type": "string", "comment": "Group name" }, { "name": "users", "type": "int53", "typeModifiers": { "isVector": true }, "comment": "List of group members" }] }, { "kind": "class", "name": "messageActionChatEditTitle", "type": "MessageAction", "id": 3047280218, "comment": "Group name changed.", "arguments": [{ "name": "title", "type": "string", "comment": "New group name" }] }, { "kind": "class", "name": "messageActionChatEditPhoto", "type": "MessageAction", "id": 2144015272, "comment": "Group profile changed", "arguments": [{ "name": "photo", "type": "Photo", "comment": "New group profile photo" }] }, { "kind": "class", "name": "messageActionChatDeletePhoto", "type": "MessageAction", "id": 2514746351, "comment": "Group profile photo removed.", "arguments": [] }, { "kind": "class", "name": "messageActionChatAddUser", "type": "MessageAction", "id": 365886720, "comment": "New member in the group", "arguments": [{ "name": "users", "type": "int53", "typeModifiers": { "isVector": true }, "comment": "Users that were invited to the chat" }] }, { "kind": "class", "name": "messageActionChatDeleteUser", "type": "MessageAction", "id": 2755604684, "comment": "User left the group.", "arguments": [{ "name": "user_id", "type": "int53", "comment": "Leaving user ID" }] }, { "kind": "class", "name": "messageActionChatJoinedByLink", "type": "MessageAction", "id": 51520707, "comment": "A user joined the chat via an invite link", "arguments": [{ "name": "inviter_id", "type": "int53", "comment": "ID of the user that created the invite link" }] }, { "kind": "class", "name": "messageActionChannelCreate", "type": "MessageAction", "id": 2513611922, "comment": "The channel was created", "arguments": [{ "name": "title", "type": "string", "comment": "Original channel/supergroup title" }] }, { "kind": "class", "name": "messageActionChatMigrateTo", "type": "MessageAction", "id": 3775102866, "comment": "Indicates the chat was migrated to the specified supergroup", "arguments": [{ "name": "channel_id", "type": "int53", "comment": "The supergroup it was migrated to" }] }, { "kind": "class", "name": "messageActionChannelMigrateFrom", "type": "MessageAction", "id": 3929622761, "comment": "Indicates the channel was migrated from the specified chat", "arguments": [{ "name": "title", "type": "string", "comment": "The old chat title" }, { "name": "chat_id", "type": "int53", "comment": "The old chat ID" }] }, { "kind": "class", "name": "messageActionPinMessage", "type": "MessageAction", "id": 2495428845, "comment": "A message was pinned", "arguments": [] }, { "kind": "class", "name": "messageActionHistoryClear", "type": "MessageAction", "id": 2679813636, "comment": "Chat history was cleared", "arguments": [] }, { "kind": "class", "name": "messageActionGameScore", "type": "MessageAction", "id": 2460428406, "comment": "Someone scored in a game", "arguments": [{ "name": "game_id", "type": "long", "comment": "Game ID" }, { "name": "score", "type": "int", "comment": "Score" }] }, { "kind": "class", "name": "messageActionPaymentSentMe", "type": "MessageAction", "id": 2402399015, "comment": "A user just sent a payment to me (a bot)", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "recurring_init", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether this is the first payment of a recurring payment we just subscribed to" }, { "name": "recurring_used", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether this payment is part of a recurring payment" }, { "name": "currency", "type": "string", "comment": "Three-letter ISO 4217 currency code, or XTR for Telegram Stars." }, { "name": "total_amount", "type": "long", "comment": "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." }, { "name": "payload", "type": "bytes", "comment": "Bot specified invoice payload" }, { "name": "info", "type": "PaymentRequestedInfo", "typeModifiers": { "predicate": "flags.0" }, "comment": "Order info provided by the user" }, { "name": "shipping_option_id", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Identifier of the shipping option chosen by the user" }, { "name": "charge", "type": "PaymentCharge", "comment": "Provider payment identifier" }] }, { "kind": "class", "name": "messageActionPaymentSent", "type": "MessageAction", "id": 2518040406, "comment": "A payment was sent", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "recurring_init", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether this is the first payment of a recurring payment we just subscribed to" }, { "name": "recurring_used", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether this payment is part of a recurring payment" }, { "name": "currency", "type": "string", "comment": "Three-letter ISO 4217 currency code, or XTR for Telegram Stars." }, { "name": "total_amount", "type": "long", "comment": "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." }, { "name": "invoice_slug", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "An invoice slug taken from an invoice deep link or from the premium_invoice_slug app config parameter »" }] }, { "kind": "class", "name": "messageActionPhoneCall", "type": "MessageAction", "id": 2162236031, "comment": "A phone call", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "video", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Is this a video call?" }, { "name": "call_id", "type": "long", "comment": "Call ID" }, { "name": "reason", "type": "PhoneCallDiscardReason", "typeModifiers": { "predicate": "flags.0" }, "comment": "If the call has ended, the reason why it ended" }, { "name": "duration", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Duration of the call in seconds" }] }, { "kind": "class", "name": "messageActionScreenshotTaken", "type": "MessageAction", "id": 1200788123, "comment": "A screenshot of the chat was taken", "arguments": [] }, { "kind": "class", "name": "messageActionCustomAction", "type": "MessageAction", "id": 4209418070, "comment": "Custom action (most likely not supported by the current layer, an upgrade might be needed)", "arguments": [{ "name": "message", "type": "string", "comment": "Action message" }] }, { "kind": "class", "name": "messageActionBotAllowed", "type": "MessageAction", "id": 3306608249, "comment": "We have given the bot permission to send us direct messages.\n\nThe optional fields specify how did we authorize the bot to send us messages.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "attach_menu", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "We have authorized the bot to send us messages by installing the bot's attachment menu." }, { "name": "from_request", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "We have allowed the bot to send us messages using {@link bots.RawAllowSendMessageRequest}." }, { "name": "domain", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "We have authorized the bot to send us messages by logging into a website via Telegram Login »; this field contains the domain name of the website on which the user has logged in." }, { "name": "app", "type": "BotApp", "typeModifiers": { "predicate": "flags.2" }, "comment": "We have authorized the bot to send us messages by opening the specified bot mini app." }] }, { "kind": "class", "name": "messageActionSecureValuesSentMe", "type": "MessageAction", "id": 455635795, "comment": "Secure telegram passport values were received", "arguments": [{ "name": "values", "type": "SecureValue", "typeModifiers": { "isVector": true }, "comment": "Vector with information about documents and other Telegram Passport elements that were shared with the bot" }, { "name": "credentials", "type": "SecureCredentialsEncrypted", "comment": "Encrypted credentials required to decrypt the data" }] }, { "kind": "class", "name": "messageActionSecureValuesSent", "type": "MessageAction", "id": 3646710100, "comment": "Request for secure telegram passport values was sent", "arguments": [{ "name": "types", "type": "SecureValueType", "typeModifiers": { "isVector": true }, "comment": "Secure value types" }] }, { "kind": "class", "name": "messageActionContactSignUp", "type": "MessageAction", "id": 4092747638, "comment": "A contact just signed up to telegram", "arguments": [] }, { "kind": "class", "name": "messageActionGeoProximityReached", "type": "MessageAction", "id": 2564871831, "comment": "A user of the chat is now in proximity of another user", "arguments": [{ "name": "from_id", "type": "Peer", "comment": "The user or chat that is now in proximity of to_id" }, { "name": "to_id", "type": "Peer", "comment": "The user or chat that subscribed to live geolocation proximity alerts" }, { "name": "distance", "type": "int", "comment": "Distance, in meters (0-100000)" }] }, { "kind": "class", "name": "messageActionGroupCall", "type": "MessageAction", "id": 2047704898, "comment": "The group call has ended", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "call", "type": "InputGroupCall", "comment": "Group call" }, { "name": "duration", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Group call duration" }] }, { "kind": "class", "name": "messageActionInviteToGroupCall", "type": "MessageAction", "id": 1345295095, "comment": "A set of users was invited to the group call", "arguments": [{ "name": "call", "type": "InputGroupCall", "comment": "The group call" }, { "name": "users", "type": "int53", "typeModifiers": { "isVector": true }, "comment": "The invited users" }] }, { "kind": "class", "name": "messageActionSetMessagesTTL", "type": "MessageAction", "id": 1007897979, "comment": "The Time-To-Live of messages in this chat was changed.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "period", "type": "int", "comment": "New Time-To-Live of all messages sent in this chat; if 0, autodeletion was disabled." }, { "name": "auto_setting_from", "type": "long", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, the chat TTL setting was set not due to a manual change by one of participants, but automatically because one of the participants has the {@link messages.RawSetDefaultHistoryTTLRequest}. For example, when a user writes to us for the first time and we have set a default messages TTL of 1 week, this service message (with auto_setting_from=our_userid) will be emitted before our first message." }] }, { "kind": "class", "name": "messageActionGroupCallScheduled", "type": "MessageAction", "id": 3013637729, "comment": "A group call was scheduled", "arguments": [{ "name": "call", "type": "InputGroupCall", "comment": "The group call" }, { "name": "schedule_date", "type": "int", "comment": "When is this group call scheduled to start" }] }, { "kind": "class", "name": "messageActionSetChatTheme", "type": "MessageAction", "id": 2860016453, "comment": "The chat theme was changed", "arguments": [{ "name": "emoticon", "type": "string", "comment": "The emoji that identifies a chat theme" }] }, { "kind": "class", "name": "messageActionChatJoinedByRequest", "type": "MessageAction", "id": 3955008459, "comment": "A user was accepted into the group by an admin", "arguments": [] }, { "kind": "class", "name": "messageActionWebViewDataSentMe", "type": "MessageAction", "id": 1205698681, "comment": "Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (bot side service message).", "arguments": [{ "name": "text", "type": "string", "comment": "Text of the {@link RawKeyboardButtonSimpleWebView} that was pressed to open the web app." }, { "name": "data", "type": "string", "comment": "Relayed data." }] }, { "kind": "class", "name": "messageActionWebViewDataSent", "type": "MessageAction", "id": 3032714421, "comment": "Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (user side service message).\n\nClients should display a service message with the text Data from the «$text» button was transferred to the bot.", "arguments": [{ "name": "text", "type": "string", "comment": "Text of the {@link RawKeyboardButtonSimpleWebView} that was pressed to open the web app." }] }, { "kind": "class", "name": "messageActionGiftPremium", "type": "MessageAction", "id": 3359468268, "comment": "Info about a gifted Telegram Premium subscription", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "currency", "type": "string", "comment": "Three-letter ISO 4217 currency code" }, { "name": "amount", "type": "long", "comment": "Price of the gift in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." }, { "name": "months", "type": "int", "comment": "Duration of the gifted Telegram Premium subscription" }, { "name": "crypto_currency", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "If the gift was bought using a cryptocurrency, the cryptocurrency name." }, { "name": "crypto_amount", "type": "long", "typeModifiers": { "predicate": "flags.0" }, "comment": "If the gift was bought using a cryptocurrency, price of the gift in the smallest units of a cryptocurrency." }] }, { "kind": "class", "name": "messageActionTopicCreate", "type": "MessageAction", "id": 228168278, "comment": "A forum topic was created.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "title", "type": "string", "comment": "Topic name." }, { "name": "icon_color", "type": "int", "comment": "If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F." }, { "name": "icon_emoji_id", "type": "long", "typeModifiers": { "predicate": "flags.0" }, "comment": "ID of the custom emoji used as topic icon." }] }, { "kind": "class", "name": "messageActionTopicEdit", "type": "MessageAction", "id": 3230943264, "comment": "Forum topic information was edited.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "title", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "New topic title." }, { "name": "icon_emoji_id", "type": "long", "typeModifiers": { "predicate": "flags.1" }, "comment": "ID of the new custom emoji used as topic icon, or if it was removed." }, { "name": "closed", "type": "Bool", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether the topic was opened or closed." }, { "name": "hidden", "type": "Bool", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether the topic was hidden or unhidden (only valid for the \"General\" topic, id=1)." }] }, { "kind": "class", "name": "messageActionSuggestProfilePhoto", "type": "MessageAction", "id": 1474192222, "comment": "A new profile picture was suggested using {@link photos.RawUploadContactProfilePhotoRequest}.", "arguments": [{ "name": "photo", "type": "Photo", "comment": "The photo that the user suggested we set as profile picture." }] }, { "kind": "class", "name": "messageActionRequestedPeer", "type": "MessageAction", "id": 827428507, "comment": "Contains info about one or more peers that the we (the user) shared with the bot after clicking on a {@link RawKeyboardButtonRequestPeer} button (service message sent by the user).", "arguments": [{ "name": "button_id", "type": "int", "comment": "button_id contained in the {@link RawKeyboardButtonRequestPeer}" }, { "name": "peers", "type": "Peer", "typeModifiers": { "isVector": true }, "comment": "The shared peers" }] }, { "kind": "class", "name": "messageActionSetChatWallPaper", "type": "MessageAction", "id": 1348510708, "comment": "The wallpaper » of the current chat was changed.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "same", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, indicates the user applied a wallpaper » previously sent by the other user in a {@link RawMessageActionSetChatWallPaper} message." }, { "name": "for_both", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "If set, indicates the wallpaper was forcefully applied for both sides, without explicit confirmation from the other side.
If the message is incoming, and we did not like the new wallpaper the other user has chosen for us, we can re-set our previous wallpaper just on our side, by invoking {@link messages.RawSetChatWallPaperRequest}, providing only the revert flag (and obviously the peer parameter)." }, { "name": "wallpaper", "type": "WallPaper", "comment": "New wallpaper" }] }, { "kind": "class", "name": "messageActionGiftCode", "type": "MessageAction", "id": 1737240073, "comment": "Contains a Telegram Premium giftcode link.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "via_giveaway", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, this gift code was received from a giveaway » started by a channel/supergroup we're subscribed to." }, { "name": "unclaimed", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "If set, the link was not redeemed yet." }, { "name": "boost_peer", "type": "Peer", "typeModifiers": { "predicate": "flags.1" }, "comment": "Identifier of the channel/supergroup that created the gift code either directly or through a giveaway: if we import this giftcode link, we will also automatically boost this channel/supergroup." }, { "name": "months", "type": "int", "comment": "Duration in months of the gifted Telegram Premium subscription." }, { "name": "slug", "type": "string", "comment": "Slug of the Telegram Premium giftcode link" }, { "name": "currency", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "Three-letter ISO 4217 currency code" }, { "name": "amount", "type": "long", "typeModifiers": { "predicate": "flags.2" }, "comment": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." }, { "name": "crypto_currency", "type": "string", "typeModifiers": { "predicate": "flags.3" }, "comment": "If set, the gift was made using the specified cryptocurrency." }, { "name": "crypto_amount", "type": "long", "typeModifiers": { "predicate": "flags.3" }, "comment": "If crypto_currency is set, contains the paid amount, in the smallest units of the cryptocurrency." }] }, { "kind": "class", "name": "messageActionGiveawayLaunch", "type": "MessageAction", "id": 858499565, "comment": "A giveaway was started.", "arguments": [] }, { "kind": "class", "name": "messageActionGiveawayResults", "type": "MessageAction", "id": 715107781, "comment": "A giveaway has ended.", "arguments": [{ "name": "winners_count", "type": "int", "comment": "Number of winners in the giveaway" }, { "name": "unclaimed_count", "type": "int", "comment": "Number of undistributed prizes" }] }, { "kind": "class", "name": "messageActionBoostApply", "type": "MessageAction", "id": 3422726765, "comment": "Some boosts » were applied to the channel or supergroup.", "arguments": [{ "name": "boosts", "type": "int", "comment": "Number of applied boosts." }] }, { "kind": "class", "name": "messageActionRequestedPeerSentMe", "type": "MessageAction", "id": 2477987912, "comment": "Contains info about one or more peers that the a user shared with the me (the bot) after clicking on a {@link RawKeyboardButtonRequestPeer} button (service message received by the bot).", "arguments": [{ "name": "button_id", "type": "int", "comment": "button_id contained in the {@link RawKeyboardButtonRequestPeer}" }, { "name": "peers", "type": "RequestedPeer", "typeModifiers": { "isVector": true }, "comment": "Info about the shared peers." }] }, { "kind": "class", "name": "messageActionPaymentRefunded", "type": "MessageAction", "id": 1102307842, "comment": "Describes a payment refund (service message received by both users and bots).", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "peer", "type": "Peer", "comment": "Identifier of the peer that returned the funds." }, { "name": "currency", "type": "string", "comment": "Currency, XTR for Telegram Stars." }, { "name": "total_amount", "type": "long", "comment": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." }, { "name": "payload", "type": "bytes", "typeModifiers": { "predicate": "flags.0" }, "comment": "Bot specified invoice payload (only received by bots)." }, { "name": "charge", "type": "PaymentCharge", "comment": "Provider payment identifier" }] }, { "kind": "class", "name": "messageActionGiftStars", "type": "MessageAction", "id": 1171632161, "comment": "You gifted or were gifted some Telegram Stars.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "currency", "type": "string", "comment": "Three-letter ISO 4217 currency code" }, { "name": "amount", "type": "long", "comment": "Price of the gift in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." }, { "name": "stars", "type": "long", "comment": "Amount of gifted stars" }, { "name": "crypto_currency", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "If the gift was bought using a cryptocurrency, the cryptocurrency name." }, { "name": "crypto_amount", "type": "long", "typeModifiers": { "predicate": "flags.0" }, "comment": "If the gift was bought using a cryptocurrency, price of the gift in the smallest units of a cryptocurrency." }, { "name": "transaction_id", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Identifier of the transaction, only visible to the receiver of the gift." }] }, { "kind": "class", "name": "dialog", "type": "Dialog", "id": 3582593222, "comment": "Chat", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "pinned", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Is the dialog pinned" }, { "name": "unread_mark", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether the chat was manually marked as unread" }, { "name": "view_forum_as_messages", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "Users may also choose to display messages from all topics of a forum as if they were sent to a normal group, using a \"View as messages\" setting in the local client.
This setting only affects the current account, and is synced to other logged in sessions using the {@link channels.RawToggleViewForumAsMessagesRequest} method; invoking this method will update the value of this flag." }, { "name": "peer", "type": "Peer", "comment": "The chat" }, { "name": "top_message", "type": "int", "comment": "The latest message ID" }, { "name": "read_inbox_max_id", "type": "int", "comment": "Position up to which all incoming messages are read." }, { "name": "read_outbox_max_id", "type": "int", "comment": "Position up to which all outgoing messages are read." }, { "name": "unread_count", "type": "int", "comment": "Number of unread messages" }, { "name": "unread_mentions_count", "type": "int", "comment": "Number of unread mentions" }, { "name": "unread_reactions_count", "type": "int", "comment": "Number of unread reactions to messages you sent" }, { "name": "notify_settings", "type": "PeerNotifySettings", "comment": "Notification settings" }, { "name": "pts", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "PTS" }, { "name": "draft", "type": "DraftMessage", "typeModifiers": { "predicate": "flags.1" }, "comment": "Message draft" }, { "name": "folder_id", "type": "int", "typeModifiers": { "predicate": "flags.4" }, "comment": "Peer folder ID, for more info click here" }, { "name": "ttl_period", "type": "int", "typeModifiers": { "predicate": "flags.5" }, "comment": "Time-to-live of all messages sent in this dialog" }] }, { "kind": "class", "name": "dialogFolder", "type": "Dialog", "id": 1908216652, "comment": "Dialog in folder", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "pinned", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Is this folder pinned" }, { "name": "folder", "type": "Folder", "comment": "The folder" }, { "name": "peer", "type": "Peer", "comment": "Peer in folder" }, { "name": "top_message", "type": "int", "comment": "Latest message ID of dialog" }, { "name": "unread_muted_peers_count", "type": "int", "comment": "Number of unread muted peers in folder" }, { "name": "unread_unmuted_peers_count", "type": "int", "comment": "Number of unread unmuted peers in folder" }, { "name": "unread_muted_messages_count", "type": "int", "comment": "Number of unread messages from muted peers in folder" }, { "name": "unread_unmuted_messages_count", "type": "int", "comment": "Number of unread messages from unmuted peers in folder" }] }, { "kind": "class", "name": "photoEmpty", "type": "Photo", "id": 590459437, "comment": "Empty constructor, non-existent photo", "arguments": [{ "name": "id", "type": "long", "comment": "Photo identifier" }] }, { "kind": "class", "name": "photo", "type": "Photo", "id": 4212750949, "comment": "Photo", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "has_stickers", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the photo has mask stickers attached to it" }, { "name": "id", "type": "long", "comment": "ID" }, { "name": "access_hash", "type": "long", "comment": "Access hash" }, { "name": "file_reference", "type": "bytes", "comment": "file reference" }, { "name": "date", "type": "int", "comment": "Date of upload" }, { "name": "sizes", "type": "PhotoSize", "typeModifiers": { "isVector": true }, "comment": "Available sizes for download" }, { "name": "video_sizes", "type": "VideoSize", "typeModifiers": { "predicate": "flags.1", "isVector": true }, "comment": "For animated profiles, the MPEG4 videos" }, { "name": "dc_id", "type": "int", "comment": "DC ID to use for download" }] }, { "kind": "class", "name": "photoSizeEmpty", "type": "PhotoSize", "id": 236446268, "comment": "Empty constructor. Image with this thumbnail is unavailable.", "arguments": [{ "name": "type", "type": "string", "comment": "Thumbnail type »" }] }, { "kind": "class", "name": "photoSize", "type": "PhotoSize", "id": 1976012384, "comment": "Image description.", "arguments": [{ "name": "type", "type": "string", "comment": "Thumbnail type »" }, { "name": "w", "type": "int", "comment": "Image width" }, { "name": "h", "type": "int", "comment": "Image height" }, { "name": "size", "type": "int", "comment": "File size" }] }, { "kind": "class", "name": "photoCachedSize", "type": "PhotoSize", "id": 35527382, "comment": "Description of an image and its content.", "arguments": [{ "name": "type", "type": "string", "comment": "Thumbnail type" }, { "name": "w", "type": "int", "comment": "Image width" }, { "name": "h", "type": "int", "comment": "Image height" }, { "name": "bytes", "type": "bytes", "comment": "Binary data, file content" }] }, { "kind": "class", "name": "photoStrippedSize", "type": "PhotoSize", "id": 3769678894, "comment": "A low-resolution compressed JPG payload", "arguments": [{ "name": "type", "type": "string", "comment": "Thumbnail type" }, { "name": "bytes", "type": "bytes", "comment": "Thumbnail data, see here for more info on decompression »" }] }, { "kind": "class", "name": "photoSizeProgressive", "type": "PhotoSize", "id": 4198431637, "comment": "Progressively encoded photosize", "arguments": [{ "name": "type", "type": "string", "comment": "Photosize type »" }, { "name": "w", "type": "int", "comment": "Photo width" }, { "name": "h", "type": "int", "comment": "Photo height" }, { "name": "sizes", "type": "int", "typeModifiers": { "isVector": true }, "comment": "Sizes of progressive JPEG file prefixes, which can be used to preliminarily show the image." }] }, { "kind": "class", "name": "photoPathSize", "type": "PhotoSize", "id": 3626061121, "comment": "Messages with animated stickers can have a compressed svg (< 300 bytes) to show the outline of the sticker before fetching the actual lottie animation.", "arguments": [{ "name": "type", "type": "string", "comment": "Always j" }, { "name": "bytes", "type": "bytes", "comment": "Compressed SVG path payload, see here for decompression instructions" }] }, { "kind": "class", "name": "geoPointEmpty", "type": "GeoPoint", "id": 286776671, "comment": "Empty constructor.", "arguments": [] }, { "kind": "class", "name": "geoPoint", "type": "GeoPoint", "id": 2997024355, "comment": "GeoPoint.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "long", "type": "double", "comment": "Longitude" }, { "name": "lat", "type": "double", "comment": "Latitude" }, { "name": "access_hash", "type": "long", "comment": "Access hash" }, { "name": "accuracy_radius", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "The estimated horizontal accuracy of the location, in meters; as defined by the sender." }] }, { "kind": "class", "name": "auth.sentCode", "type": "auth.SentCode", "id": 1577067778, "comment": "Contains info about a sent verification code.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "type", "type": "auth.SentCodeType", "comment": "Phone code type" }, { "name": "phone_code_hash", "type": "string", "comment": "Phone code hash, to be stored and later re-used with {@link auth.RawSignInRequest}" }, { "name": "next_type", "type": "auth.CodeType", "typeModifiers": { "predicate": "flags.1" }, "comment": "Phone code type that will be sent next, if the phone code is not received within timeout seconds: to send it use {@link auth.RawResendCodeRequest}" }, { "name": "timeout", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "Timeout for reception of the phone code" }] }, { "kind": "class", "name": "auth.sentCodeSuccess", "type": "auth.SentCode", "id": 596704836, "comment": "The user successfully authorized using future auth tokens", "arguments": [{ "name": "authorization", "type": "auth.Authorization", "comment": "Authorization info" }] }, { "kind": "class", "name": "auth.authorization", "type": "auth.Authorization", "id": 782418132, "comment": "Contains user authorization info.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "setup_password_required", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Suggests the user to set up a 2-step verification password to be able to log in again" }, { "name": "otherwise_relogin_days", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Iff setup_password_required is set and the user declines to set a 2-step verification password, they will be able to log into their account via SMS again only after this many days pass." }, { "name": "tmp_sessions", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Temporary passport sessions" }, { "name": "future_auth_token", "type": "bytes", "typeModifiers": { "predicate": "flags.2" }, "comment": "A future auth token" }, { "name": "user", "type": "User", "comment": "Info on authorized user" }] }, { "kind": "class", "name": "auth.authorizationSignUpRequired", "type": "auth.Authorization", "id": 1148485274, "comment": "An account with this phone number doesn't exist on telegram: the user has to enter basic information and sign up", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "terms_of_service", "type": "help.TermsOfService", "typeModifiers": { "predicate": "flags.0" }, "comment": "Telegram's terms of service: the user must read and accept the terms of service before signing up to telegram" }] }, { "kind": "class", "name": "auth.exportedAuthorization", "type": "auth.ExportedAuthorization", "id": 3023364792, "comment": "Data for copying of authorization between data centers.", "arguments": [{ "name": "id", "type": "long", "comment": "current user identifier" }, { "name": "bytes", "type": "bytes", "comment": "authorizes key" }] }, { "kind": "class", "name": "inputNotifyPeer", "type": "InputNotifyPeer", "id": 3099351820, "comment": "Notifications generated by a certain user or group.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "User or group" }] }, { "kind": "class", "name": "inputNotifyUsers", "type": "InputNotifyPeer", "id": 423314455, "comment": "Notifications generated by all users.", "arguments": [] }, { "kind": "class", "name": "inputNotifyChats", "type": "InputNotifyPeer", "id": 1251338318, "comment": "Notifications generated by all groups.", "arguments": [] }, { "kind": "class", "name": "inputNotifyBroadcasts", "type": "InputNotifyPeer", "id": 2983951486, "comment": "All channels", "arguments": [] }, { "kind": "class", "name": "inputNotifyForumTopic", "type": "InputNotifyPeer", "id": 1548122514, "comment": "Notifications generated by a topic in a forum.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Forum ID" }, { "name": "top_msg_id", "type": "int", "comment": "Topic ID" }] }, { "kind": "class", "name": "inputPeerNotifySettings", "type": "InputPeerNotifySettings", "id": 3402328802, "comment": "Notification settings.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "show_previews", "type": "Bool", "typeModifiers": { "predicate": "flags.0" }, "comment": "If the text of the message shall be displayed in notification" }, { "name": "silent", "type": "Bool", "typeModifiers": { "predicate": "flags.1" }, "comment": "Peer was muted?" }, { "name": "mute_until", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "Date until which all notifications shall be switched off" }, { "name": "sound", "type": "NotificationSound", "typeModifiers": { "predicate": "flags.3" }, "comment": "Identifier of an audio file to play for notifications." }, { "name": "stories_muted", "type": "Bool", "typeModifiers": { "predicate": "flags.6" }, "comment": "Whether story notifications should be disabled." }, { "name": "stories_hide_sender", "type": "Bool", "typeModifiers": { "predicate": "flags.7" }, "comment": "Whether the sender name should be displayed in story notifications." }, { "name": "stories_sound", "type": "NotificationSound", "typeModifiers": { "predicate": "flags.8" }, "comment": "Identifier of an audio file to play for story notifications." }] }, { "kind": "class", "name": "peerNotifySettings", "type": "PeerNotifySettings", "id": 2573347852, "comment": "Notification settings.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "show_previews", "type": "Bool", "typeModifiers": { "predicate": "flags.0" }, "comment": "(Ternary value) If set, indicates whether or not to display previews of messages in notifications; otherwise the default behavior should be used." }, { "name": "silent", "type": "Bool", "typeModifiers": { "predicate": "flags.1" }, "comment": "(Ternary value) If set, indicates whether to mute or unmute the peer; otherwise the default behavior should be used." }, { "name": "mute_until", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "Mute all notifications until this date" }, { "name": "ios_sound", "type": "NotificationSound", "typeModifiers": { "predicate": "flags.3" }, "comment": "Notification sound for the official iOS application" }, { "name": "android_sound", "type": "NotificationSound", "typeModifiers": { "predicate": "flags.4" }, "comment": "Notification sound for the official android application" }, { "name": "other_sound", "type": "NotificationSound", "typeModifiers": { "predicate": "flags.5" }, "comment": "Notification sound for other applications" }, { "name": "stories_muted", "type": "Bool", "typeModifiers": { "predicate": "flags.6" }, "comment": "Whether story notifications should be disabled." }, { "name": "stories_hide_sender", "type": "Bool", "typeModifiers": { "predicate": "flags.7" }, "comment": "Whether the sender name should be displayed in story notifications." }, { "name": "stories_ios_sound", "type": "NotificationSound", "typeModifiers": { "predicate": "flags.8" }, "comment": "Sound for story notifications on the official iOS application" }, { "name": "stories_android_sound", "type": "NotificationSound", "typeModifiers": { "predicate": "flags.9" }, "comment": "Sound for story notifications on the official Android application" }, { "name": "stories_other_sound", "type": "NotificationSound", "typeModifiers": { "predicate": "flags.10" }, "comment": "Sound for story notifications on other applications" }] }, { "kind": "class", "name": "peerSettings", "type": "PeerSettings", "id": 2899733598, "comment": "List of actions that are possible when interacting with this user, to be shown as suggested actions in the chat action bar », see here » for more info.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "report_spam", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether we can still report the user for spam" }, { "name": "add_contact", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether we can add the user as contact" }, { "name": "block_contact", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether we can block the user" }, { "name": "share_contact", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether we can share the user's contact" }, { "name": "need_contacts_exception", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "Whether a special exception for contacts is needed" }, { "name": "report_geo", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Whether we can report a geo group as irrelevant for this location" }, { "name": "autoarchived", "type": "true", "typeModifiers": { "predicate": "flags.7" }, "comment": "Whether this peer was automatically archived according to {@link RawGlobalPrivacySettings} and can be unarchived" }, { "name": "invite_members", "type": "true", "typeModifiers": { "predicate": "flags.8" }, "comment": "If set, this is a recently created group chat to which new members can be invited" }, { "name": "request_chat_broadcast", "type": "true", "typeModifiers": { "predicate": "flags.10" }, "comment": "This flag is set if request_chat_title and request_chat_date fields are set and the join request » is related to a channel (otherwise if only the request fields are set, the join request » is related to a chat)." }, { "name": "business_bot_paused", "type": "true", "typeModifiers": { "predicate": "flags.11" }, "comment": "This flag is set if both business_bot_id and business_bot_manage_url are set and all connected business bots » were paused in this chat using {@link account.RawToggleConnectedBotPausedRequest}." }, { "name": "business_bot_can_reply", "type": "true", "typeModifiers": { "predicate": "flags.12" }, "comment": "This flag is set if both business_bot_id and business_bot_manage_url are set and connected business bots » can reply to messages in this chat, as specified by the settings during initial configuration." }, { "name": "geo_distance", "type": "int", "typeModifiers": { "predicate": "flags.6" }, "comment": "Distance in meters between us and this peer" }, { "name": "request_chat_title", "type": "string", "typeModifiers": { "predicate": "flags.9" }, "comment": "If set, this is a private chat with an administrator of a chat or channel to which the user sent a join request, and this field contains the chat/channel's title." }, { "name": "request_chat_date", "type": "int", "typeModifiers": { "predicate": "flags.9" }, "comment": "If set, this is a private chat with an administrator of a chat or channel to which the user sent a join request, and this field contains the timestamp when the join request » was sent." }, { "name": "business_bot_id", "type": "int53", "typeModifiers": { "predicate": "flags.13" }, "comment": "Contains the ID of the business bot » managing this chat, used to display info about the bot in the action bar." }, { "name": "business_bot_manage_url", "type": "string", "typeModifiers": { "predicate": "flags.13" }, "comment": "Contains a deep link », used to open a management menu in the business bot. This flag is set if and only if business_bot_id is set." }] }, { "kind": "class", "name": "wallPaper", "type": "WallPaper", "id": 2755118061, "comment": "Represents a wallpaper based on an image.", "arguments": [{ "name": "id", "type": "long", "comment": "Identifier" }, { "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "creator", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether we created this wallpaper" }, { "name": "default", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether this is the default wallpaper" }, { "name": "pattern", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether this is a pattern wallpaper »" }, { "name": "dark", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "Whether this wallpaper should be used in dark mode." }, { "name": "access_hash", "type": "long", "comment": "Access hash" }, { "name": "slug", "type": "string", "comment": "Unique wallpaper ID, used when generating wallpaper links or importing wallpaper links." }, { "name": "document", "type": "Document", "comment": "The actual wallpaper" }, { "name": "settings", "type": "WallPaperSettings", "typeModifiers": { "predicate": "flags.2" }, "comment": "Info on how to generate the wallpaper, according to these instructions »." }] }, { "kind": "class", "name": "wallPaperNoFile", "type": "WallPaper", "id": 3766501654, "comment": "Represents a wallpaper only based on colors/gradients.", "arguments": [{ "name": "id", "type": "long", "comment": "Wallpaper ID" }, { "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "default", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether this is the default wallpaper" }, { "name": "dark", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "Whether this wallpaper should be used in dark mode." }, { "name": "settings", "type": "WallPaperSettings", "typeModifiers": { "predicate": "flags.2" }, "comment": "Info on how to generate the wallpaper." }] }, { "kind": "class", "name": "inputReportReasonSpam", "type": "ReportReason", "id": 1490799288, "comment": "Report for spam", "arguments": [] }, { "kind": "class", "name": "inputReportReasonViolence", "type": "ReportReason", "id": 505595789, "comment": "Report for violence", "arguments": [] }, { "kind": "class", "name": "inputReportReasonPornography", "type": "ReportReason", "id": 777640226, "comment": "Report for pornography", "arguments": [] }, { "kind": "class", "name": "inputReportReasonChildAbuse", "type": "ReportReason", "id": 2918469347, "comment": "Report for child abuse", "arguments": [] }, { "kind": "class", "name": "inputReportReasonOther", "type": "ReportReason", "id": 3252986545, "comment": "Other", "arguments": [] }, { "kind": "class", "name": "inputReportReasonCopyright", "type": "ReportReason", "id": 2609510714, "comment": "Report for copyrighted content", "arguments": [] }, { "kind": "class", "name": "inputReportReasonGeoIrrelevant", "type": "ReportReason", "id": 3688169197, "comment": "Report an irrelevant geo group", "arguments": [] }, { "kind": "class", "name": "inputReportReasonFake", "type": "ReportReason", "id": 4124956391, "comment": "Report for impersonation", "arguments": [] }, { "kind": "class", "name": "inputReportReasonIllegalDrugs", "type": "ReportReason", "id": 177124030, "comment": "Report for illegal drugs", "arguments": [] }, { "kind": "class", "name": "inputReportReasonPersonalDetails", "type": "ReportReason", "id": 2663876157, "comment": "Report for divulgation of personal details", "arguments": [] }, { "kind": "class", "name": "userFull", "type": "UserFull", "id": 3432609568, "comment": "Extended user info\n\nWhen updating the local peer database », all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "blocked", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether you have blocked this user" }, { "name": "phone_calls_available", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "Whether this user can make VoIP calls" }, { "name": "phone_calls_private", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Whether this user's privacy settings allow you to call them" }, { "name": "can_pin_message", "type": "true", "typeModifiers": { "predicate": "flags.7" }, "comment": "Whether you can pin messages in the chat with this user, you can do this only for a chat with yourself" }, { "name": "has_scheduled", "type": "true", "typeModifiers": { "predicate": "flags.12" }, "comment": "Whether scheduled messages are available" }, { "name": "video_calls_available", "type": "true", "typeModifiers": { "predicate": "flags.13" }, "comment": "Whether the user can receive video calls" }, { "name": "voice_messages_forbidden", "type": "true", "typeModifiers": { "predicate": "flags.20" }, "comment": "Whether this user doesn't allow sending voice messages in a private chat with them" }, { "name": "translations_disabled", "type": "true", "typeModifiers": { "predicate": "flags.23" }, "comment": "Whether the real-time chat translation popup should be hidden." }, { "name": "stories_pinned_available", "type": "true", "typeModifiers": { "predicate": "flags.26" }, "comment": "Whether this user has some pinned stories." }, { "name": "blocked_my_stories_from", "type": "true", "typeModifiers": { "predicate": "flags.27" }, "comment": "Whether we've blocked this user, preventing them from seeing our stories »." }, { "name": "wallpaper_overridden", "type": "true", "typeModifiers": { "predicate": "flags.28" }, "comment": "Whether the other user has chosen a custom wallpaper for us using {@link messages.RawSetChatWallPaperRequest} and the for_both flag, see here » for more info." }, { "name": "contact_require_premium", "type": "true", "typeModifiers": { "predicate": "flags.29" }, "comment": "If set, we cannot write to this user: subscribe to Telegram Premium to get permission to write to this user.
To set this flag for ourselves invoke {@link account.RawSetGlobalPrivacySettingsRequest}, setting the settings.new_noncontact_peers_require_premium flag, see here » for more info." }, { "name": "read_dates_private", "type": "true", "typeModifiers": { "predicate": "flags.30" }, "comment": "If set, we cannot fetch the exact read date of messages we send to this user using {@link messages.RawGetOutboxReadDateRequest}.
The exact read date of messages might still be unavailable for other reasons, see {@link messages.RawGetOutboxReadDateRequest} for more info.
To set this flag for ourselves invoke {@link account.RawSetGlobalPrivacySettingsRequest}, setting the settings.hide_read_marks flag." }, { "name": "flags2", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "sponsored_enabled", "type": "true", "typeModifiers": { "predicate": "flags2.7" }, "comment": "Whether ads were re-enabled for the current account (only accessible to the currently logged-in user), see here » for more info." }, { "name": "id", "type": "int53", "comment": "User ID" }, { "name": "about", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Bio of the user" }, { "name": "settings", "type": "PeerSettings", "comment": "Peer settings" }, { "name": "personal_photo", "type": "Photo", "typeModifiers": { "predicate": "flags.21" }, "comment": "Personal profile photo, to be shown instead of profile_photo." }, { "name": "profile_photo", "type": "Photo", "typeModifiers": { "predicate": "flags.2" }, "comment": "Profile photo" }, { "name": "fallback_photo", "type": "Photo", "typeModifiers": { "predicate": "flags.22" }, "comment": "Fallback profile photo, displayed if no photo is present in profile_photo or personal_photo, due to privacy settings." }, { "name": "notify_settings", "type": "PeerNotifySettings", "comment": "Notification settings" }, { "name": "bot_info", "type": "BotInfo", "typeModifiers": { "predicate": "flags.3" }, "comment": "For bots, info about the bot (bot commands, etc)" }, { "name": "pinned_msg_id", "type": "int", "typeModifiers": { "predicate": "flags.6" }, "comment": "Message ID of the last pinned message" }, { "name": "common_chats_count", "type": "int", "comment": "Chats in common with this user" }, { "name": "folder_id", "type": "int", "typeModifiers": { "predicate": "flags.11" }, "comment": "Peer folder ID, for more info click here" }, { "name": "ttl_period", "type": "int", "typeModifiers": { "predicate": "flags.14" }, "comment": "Time To Live of all messages in this chat; once a message is this many seconds old, it must be deleted." }, { "name": "theme_emoticon", "type": "string", "typeModifiers": { "predicate": "flags.15" }, "comment": "Emoji associated with chat theme" }, { "name": "private_forward_name", "type": "string", "typeModifiers": { "predicate": "flags.16" }, "comment": "Anonymized text to be shown instead of the user's name on forwarded messages" }, { "name": "bot_group_admin_rights", "type": "ChatAdminRights", "typeModifiers": { "predicate": "flags.17" }, "comment": "A suggested set of administrator rights for the bot, to be shown when adding the bot as admin to a group, see here for more info on how to handle them »." }, { "name": "bot_broadcast_admin_rights", "type": "ChatAdminRights", "typeModifiers": { "predicate": "flags.18" }, "comment": "A suggested set of administrator rights for the bot, to be shown when adding the bot as admin to a channel, see here for more info on how to handle them »." }, { "name": "premium_gifts", "type": "PremiumGiftOption", "typeModifiers": { "predicate": "flags.19", "isVector": true }, "comment": "Telegram Premium subscriptions gift options" }, { "name": "wallpaper", "type": "WallPaper", "typeModifiers": { "predicate": "flags.24" }, "comment": "Wallpaper to use in the private chat with the user." }, { "name": "stories", "type": "PeerStories", "typeModifiers": { "predicate": "flags.25" }, "comment": "Active stories »" }, { "name": "business_work_hours", "type": "BusinessWorkHours", "typeModifiers": { "predicate": "flags2.0" }, "comment": "Telegram Business working hours »." }, { "name": "business_location", "type": "BusinessLocation", "typeModifiers": { "predicate": "flags2.1" }, "comment": "Telegram Business location »." }, { "name": "business_greeting_message", "type": "BusinessGreetingMessage", "typeModifiers": { "predicate": "flags2.2" }, "comment": "Telegram Business greeting message »." }, { "name": "business_away_message", "type": "BusinessAwayMessage", "typeModifiers": { "predicate": "flags2.3" }, "comment": "Telegram Business away message »." }, { "name": "business_intro", "type": "BusinessIntro", "typeModifiers": { "predicate": "flags2.4" }, "comment": "Specifies a custom Telegram Business profile introduction »." }, { "name": "birthday", "type": "Birthday", "typeModifiers": { "predicate": "flags2.5" }, "comment": "Contains info about the user's birthday »." }, { "name": "personal_channel_id", "type": "int53", "typeModifiers": { "predicate": "flags2.6" }, "comment": "ID of the associated personal channel », that should be shown in the profile page." }, { "name": "personal_channel_message", "type": "int", "typeModifiers": { "predicate": "flags2.6" }, "comment": "ID of the latest message of the associated personal channel », that should be previewed in the profile page." }] }, { "kind": "class", "name": "contact", "type": "Contact", "id": 341499403, "comment": "A contact of the current user that is registered in the system.", "arguments": [{ "name": "user_id", "type": "int53", "comment": "User identifier" }, { "name": "mutual", "type": "Bool", "comment": "Current user is in the user's contact list" }] }, { "kind": "class", "name": "importedContact", "type": "ImportedContact", "id": 3242081360, "comment": "Successfully imported contact.", "arguments": [{ "name": "user_id", "type": "int53", "comment": "User identifier" }, { "name": "client_id", "type": "long", "comment": "The contact's client identifier (passed to one of the InputContact constructors)" }] }, { "kind": "class", "name": "contactStatus", "type": "ContactStatus", "id": 383348795, "comment": "Contact status: online / offline.", "arguments": [{ "name": "user_id", "type": "int53", "comment": "User identifier" }, { "name": "status", "type": "UserStatus", "comment": "Online status" }] }, { "kind": "class", "name": "contacts.contactsNotModified", "type": "contacts.Contacts", "id": 3075189202, "comment": "Contact list on the server is the same as the list on the client.", "arguments": [] }, { "kind": "class", "name": "contacts.contacts", "type": "contacts.Contacts", "id": 3941105218, "comment": "The current user's contact list and info on users.", "arguments": [{ "name": "contacts", "type": "Contact", "typeModifiers": { "isVector": true }, "comment": "Contact list" }, { "name": "saved_count", "type": "int", "comment": "Number of contacts that were saved successfully" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "User list" }] }, { "kind": "class", "name": "contacts.importedContacts", "type": "contacts.ImportedContacts", "id": 2010127419, "comment": "Info on successfully imported contacts.", "arguments": [{ "name": "imported", "type": "ImportedContact", "typeModifiers": { "isVector": true }, "comment": "List of successfully imported contacts" }, { "name": "popular_invites", "type": "PopularContact", "typeModifiers": { "isVector": true }, "comment": "Popular contacts" }, { "name": "retry_contacts", "type": "long", "typeModifiers": { "isVector": true }, "comment": "List of contact ids that could not be imported due to system limitation and will need to be imported at a later date." }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "List of users" }] }, { "kind": "class", "name": "contacts.blocked", "type": "contacts.Blocked", "id": 182326673, "comment": "Full list of blocked users.", "arguments": [{ "name": "blocked", "type": "PeerBlocked", "typeModifiers": { "isVector": true }, "comment": "List of blocked users" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Blocked chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "List of users" }] }, { "kind": "class", "name": "contacts.blockedSlice", "type": "contacts.Blocked", "id": 3781575060, "comment": "Incomplete list of blocked users.", "arguments": [{ "name": "count", "type": "int", "comment": "Total number of elements in the list" }, { "name": "blocked", "type": "PeerBlocked", "typeModifiers": { "isVector": true }, "comment": "List of blocked users" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Blocked chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "List of users" }] }, { "kind": "class", "name": "messages.dialogs", "type": "messages.Dialogs", "id": 364538944, "comment": "Full list of chats with messages and auxiliary data.", "arguments": [{ "name": "dialogs", "type": "Dialog", "typeModifiers": { "isVector": true }, "comment": "List of chats" }, { "name": "messages", "type": "Message", "typeModifiers": { "isVector": true }, "comment": "List of last messages from each chat" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "List of groups mentioned in the chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "List of users mentioned in messages and groups" }] }, { "kind": "class", "name": "messages.dialogsSlice", "type": "messages.Dialogs", "id": 1910543603, "comment": "Incomplete list of dialogs with messages and auxiliary data.", "arguments": [{ "name": "count", "type": "int", "comment": "Total number of dialogs" }, { "name": "dialogs", "type": "Dialog", "typeModifiers": { "isVector": true }, "comment": "List of dialogs" }, { "name": "messages", "type": "Message", "typeModifiers": { "isVector": true }, "comment": "List of last messages from dialogs" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "List of chats mentioned in dialogs" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "List of users mentioned in messages and chats" }] }, { "kind": "class", "name": "messages.dialogsNotModified", "type": "messages.Dialogs", "id": 4041467286, "comment": "Dialogs haven't changed", "arguments": [{ "name": "count", "type": "int", "comment": "Number of dialogs found server-side by the query" }] }, { "kind": "class", "name": "messages.messages", "type": "messages.Messages", "id": 2356252295, "comment": "Full list of messages with auxiliary data.", "arguments": [{ "name": "messages", "type": "Message", "typeModifiers": { "isVector": true }, "comment": "List of messages" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "List of chats mentioned in dialogs" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "List of users mentioned in messages and chats" }] }, { "kind": "class", "name": "messages.messagesSlice", "type": "messages.Messages", "id": 978610270, "comment": "Incomplete list of messages and auxiliary data.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "inexact", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "If set, indicates that the results may be inexact" }, { "name": "count", "type": "int", "comment": "Total number of messages in the list" }, { "name": "next_rate", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Rate to use in the offset_rate parameter in the next call to {@link messages.RawSearchGlobalRequest}" }, { "name": "offset_id_offset", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "Indicates the absolute position of messages[0] within the total result set with count count.
This is useful, for example, if the result was fetched using offset_id, and we need to display a progress/total counter (like photo 134 of 200, for all media in a chat, we could simply use photo ${offset_id_offset} of ${count}." }, { "name": "messages", "type": "Message", "typeModifiers": { "isVector": true }, "comment": "List of messages" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "List of chats mentioned in messages" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "List of users mentioned in messages and chats" }] }, { "kind": "class", "name": "messages.channelMessages", "type": "messages.Messages", "id": 3346446926, "comment": "Channel messages", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "inexact", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "If set, returned results may be inexact" }, { "name": "pts", "type": "int", "comment": "Event count after generation" }, { "name": "count", "type": "int", "comment": "Total number of results were found server-side (may not be all included here)" }, { "name": "offset_id_offset", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "Indicates the absolute position of messages[0] within the total result set with count count.
This is useful, for example, if the result was fetched using offset_id, and we need to display a progress/total counter (like photo 134 of 200, for all media in a chat, we could simply use photo ${offset_id_offset} of ${count}." }, { "name": "messages", "type": "Message", "typeModifiers": { "isVector": true }, "comment": "Found messages" }, { "name": "topics", "type": "ForumTopic", "typeModifiers": { "isVector": true }, "comment": "Forum topic information" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Users" }] }, { "kind": "class", "name": "messages.messagesNotModified", "type": "messages.Messages", "id": 1951620897, "comment": "No new messages matching the query were found", "arguments": [{ "name": "count", "type": "int", "comment": "Number of results found server-side by the given query" }] }, { "kind": "class", "name": "messages.chats", "type": "messages.Chats", "id": 1694474197, "comment": "List of chats with auxiliary data.", "arguments": [{ "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "List of chats" }] }, { "kind": "class", "name": "messages.chatsSlice", "type": "messages.Chats", "id": 2631405892, "comment": "Partial list of chats, more would have to be fetched with pagination", "arguments": [{ "name": "count", "type": "int", "comment": "Total number of results that were found server-side (not all are included in chats)" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Chats" }] }, { "kind": "class", "name": "messages.chatFull", "type": "messages.ChatFull", "id": 3856126364, "comment": "Full info about a channel, supergroup, gigagroup or basic group.", "arguments": [{ "name": "full_chat", "type": "ChatFull", "comment": "Full info" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Mentioned chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Mentioned users" }] }, { "kind": "class", "name": "messages.affectedHistory", "type": "messages.AffectedHistory", "id": 3025955281, "comment": "Affected part of communication history with the user or in a chat.", "arguments": [{ "name": "pts", "type": "int", "comment": "Number of events occurred in a text box" }, { "name": "pts_count", "type": "int", "comment": "Number of affected events" }, { "name": "offset", "type": "int", "comment": "If a parameter contains positive value, it is necessary to repeat the method call using the given value; during the proceeding of all the history the value itself shall gradually decrease" }] }, { "kind": "class", "name": "inputMessagesFilterEmpty", "type": "MessagesFilter", "id": 1474492012, "comment": "Filter is absent.", "arguments": [] }, { "kind": "class", "name": "inputMessagesFilterPhotos", "type": "MessagesFilter", "id": 2517214492, "comment": "Filter for messages containing photos.", "arguments": [] }, { "kind": "class", "name": "inputMessagesFilterVideo", "type": "MessagesFilter", "id": 2680163941, "comment": "Filter for messages containing videos.", "arguments": [] }, { "kind": "class", "name": "inputMessagesFilterPhotoVideo", "type": "MessagesFilter", "id": 1458172132, "comment": "Filter for messages containing photos or videos.", "arguments": [] }, { "kind": "class", "name": "inputMessagesFilterDocument", "type": "MessagesFilter", "id": 2665345416, "comment": "Filter for messages containing documents.", "arguments": [] }, { "kind": "class", "name": "inputMessagesFilterUrl", "type": "MessagesFilter", "id": 2129714567, "comment": "Return only messages containing URLs", "arguments": [] }, { "kind": "class", "name": "inputMessagesFilterGif", "type": "MessagesFilter", "id": 4291323271, "comment": "Return only messages containing gifs", "arguments": [] }, { "kind": "class", "name": "inputMessagesFilterVoice", "type": "MessagesFilter", "id": 1358283666, "comment": "Return only messages containing voice notes", "arguments": [] }, { "kind": "class", "name": "inputMessagesFilterMusic", "type": "MessagesFilter", "id": 928101534, "comment": "Return only messages containing audio files", "arguments": [] }, { "kind": "class", "name": "inputMessagesFilterChatPhotos", "type": "MessagesFilter", "id": 975236280, "comment": "Return only chat photo changes", "arguments": [] }, { "kind": "class", "name": "inputMessagesFilterPhoneCalls", "type": "MessagesFilter", "id": 2160695144, "comment": "Return only phone calls", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "missed", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Return only missed phone calls" }] }, { "kind": "class", "name": "inputMessagesFilterRoundVoice", "type": "MessagesFilter", "id": 2054952868, "comment": "Return only round videos and voice notes", "arguments": [] }, { "kind": "class", "name": "inputMessagesFilterRoundVideo", "type": "MessagesFilter", "id": 3041516115, "comment": "Return only round videos", "arguments": [] }, { "kind": "class", "name": "inputMessagesFilterMyMentions", "type": "MessagesFilter", "id": 3254314650, "comment": "Return only messages where the current user was mentioned.", "arguments": [] }, { "kind": "class", "name": "inputMessagesFilterGeo", "type": "MessagesFilter", "id": 3875695885, "comment": "Return only messages containing geolocations", "arguments": [] }, { "kind": "class", "name": "inputMessagesFilterContacts", "type": "MessagesFilter", "id": 3764575107, "comment": "Return only messages containing contacts", "arguments": [] }, { "kind": "class", "name": "inputMessagesFilterPinned", "type": "MessagesFilter", "id": 464520273, "comment": "Fetch only pinned messages", "arguments": [] }, { "kind": "class", "name": "updateNewMessage", "type": "Update", "id": 522914557, "comment": "New message in a private chat or in a basic group.", "arguments": [{ "name": "message", "type": "Message", "comment": "Message" }, { "name": "pts", "type": "int", "comment": "New quantity of actions in a message box" }, { "name": "pts_count", "type": "int", "comment": "Number of generated events" }] }, { "kind": "class", "name": "updateMessageID", "type": "Update", "id": 1318109142, "comment": "Sent message with random_id client identifier was assigned an identifier.", "arguments": [{ "name": "id", "type": "int", "comment": "id identifier of a respective Message" }, { "name": "random_id", "type": "long", "comment": "Previously transferred client random_id identifier" }] }, { "kind": "class", "name": "updateDeleteMessages", "type": "Update", "id": 2718806245, "comment": "Messages were deleted.", "arguments": [{ "name": "messages", "type": "int", "typeModifiers": { "isVector": true }, "comment": "List of identifiers of deleted messages" }, { "name": "pts", "type": "int", "comment": "New quality of actions in a message box" }, { "name": "pts_count", "type": "int", "comment": "Number of generated events" }] }, { "kind": "class", "name": "updateUserTyping", "type": "Update", "id": 3223225727, "comment": "The user is preparing a message; typing, recording, uploading, etc. This update is valid for 6 seconds. If no further updates of this kind are received after 6 seconds, it should be considered that the user stopped doing whatever they were doing", "arguments": [{ "name": "user_id", "type": "int53", "comment": "User id" }, { "name": "action", "type": "SendMessageAction", "comment": "Action type" }] }, { "kind": "class", "name": "updateChatUserTyping", "type": "Update", "id": 2202565360, "comment": "The user is preparing a message in a group; typing, recording, uploading, etc. This update is valid for 6 seconds. If no further updates of this kind are received after 6 seconds, it should be considered that the user stopped doing whatever they were doing", "arguments": [{ "name": "chat_id", "type": "int53", "comment": "Group id" }, { "name": "from_id", "type": "Peer", "comment": "Peer that started typing (can be the chat itself, in case of anonymous admins)." }, { "name": "action", "type": "SendMessageAction", "comment": "Type of action" }] }, { "kind": "class", "name": "updateChatParticipants", "type": "Update", "id": 125178264, "comment": "Composition of chat participants changed.", "arguments": [{ "name": "participants", "type": "ChatParticipants", "comment": "Updated chat participants" }] }, { "kind": "class", "name": "updateUserStatus", "type": "Update", "id": 3854432478, "comment": "Contact status update.", "arguments": [{ "name": "user_id", "type": "int53", "comment": "User identifier" }, { "name": "status", "type": "UserStatus", "comment": "New status" }] }, { "kind": "class", "name": "updateUserName", "type": "Update", "id": 2810480932, "comment": "Changes the user's first name, last name and username.", "arguments": [{ "name": "user_id", "type": "int53", "comment": "User identifier" }, { "name": "first_name", "type": "string", "comment": "New first name. Corresponds to the new value of real_first_name field of the {@link RawUserFull} constructor." }, { "name": "last_name", "type": "string", "comment": "New last name. Corresponds to the new value of real_last_name field of the {@link RawUserFull} constructor." }, { "name": "usernames", "type": "Username", "typeModifiers": { "isVector": true }, "comment": "Usernames." }] }, { "kind": "class", "name": "updateNewAuthorization", "type": "Update", "id": 2303831023, "comment": "A new session logged into the current user's account through an unknown device.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "unconfirmed", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the session is unconfirmed, see here » for more info." }, { "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here" }, { "name": "date", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Authorization date" }, { "name": "device", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Name of device, for example Android" }, { "name": "location", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Location, for example USA, NY (IP=1.2.3.4)" }] }, { "kind": "class", "name": "updateNewEncryptedMessage", "type": "Update", "id": 314359194, "comment": "New encrypted message.", "arguments": [{ "name": "message", "type": "EncryptedMessage", "comment": "Message" }, { "name": "qts", "type": "int", "comment": "New qts value, see updates » for more info." }] }, { "kind": "class", "name": "updateEncryptedChatTyping", "type": "Update", "id": 386986326, "comment": "Interlocutor is typing a message in an encrypted chat. Update period is 6 second. If upon this time there is no repeated update, it shall be considered that the interlocutor stopped typing.", "arguments": [{ "name": "chat_id", "type": "int", "comment": "Chat ID" }] }, { "kind": "class", "name": "updateEncryption", "type": "Update", "id": 3030575245, "comment": "Change of state in an encrypted chat.", "arguments": [{ "name": "chat", "type": "EncryptedChat", "comment": "Encrypted chat" }, { "name": "date", "type": "int", "comment": "Date of change" }] }, { "kind": "class", "name": "updateEncryptedMessagesRead", "type": "Update", "id": 956179895, "comment": "Communication history in an encrypted chat was marked as read.", "arguments": [{ "name": "chat_id", "type": "int", "comment": "Chat ID" }, { "name": "max_date", "type": "int", "comment": "Maximum value of data for read messages" }, { "name": "date", "type": "int", "comment": "Time when messages were read" }] }, { "kind": "class", "name": "updateChatParticipantAdd", "type": "Update", "id": 1037718609, "comment": "New group member.", "arguments": [{ "name": "chat_id", "type": "int53", "comment": "Group ID" }, { "name": "user_id", "type": "int53", "comment": "ID of the new member" }, { "name": "inviter_id", "type": "int53", "comment": "ID of the user, who added member to the group" }, { "name": "date", "type": "int", "comment": "When was the participant added" }, { "name": "version", "type": "int", "comment": "Chat version number" }] }, { "kind": "class", "name": "updateChatParticipantDelete", "type": "Update", "id": 3811523959, "comment": "A member has left the group.", "arguments": [{ "name": "chat_id", "type": "int53", "comment": "Group ID" }, { "name": "user_id", "type": "int53", "comment": "ID of the user" }, { "name": "version", "type": "int", "comment": "Used in basic groups to reorder updates and make sure that all of them was received." }] }, { "kind": "class", "name": "updateDcOptions", "type": "Update", "id": 2388564083, "comment": "Changes in the data center configuration options.", "arguments": [{ "name": "dc_options", "type": "DcOption", "typeModifiers": { "isVector": true }, "comment": "New connection options" }] }, { "kind": "class", "name": "updateNotifySettings", "type": "Update", "id": 3200411887, "comment": "Changes in notification settings.", "arguments": [{ "name": "peer", "type": "NotifyPeer", "comment": "Notification source" }, { "name": "notify_settings", "type": "PeerNotifySettings", "comment": "New notification settings" }] }, { "kind": "class", "name": "updateServiceNotification", "type": "Update", "id": 3957614617, "comment": "A service message for the user.\n\nThe app must show the message to the user upon receiving this update. In case the popup parameter was passed, the text message must be displayed in a popup alert immediately upon receipt. It is recommended to handle the text as you would an ordinary message in terms of highlighting links, etc. The message must also be stored locally as part of the message history with the user id 777000 (Telegram Notifications).", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "popup", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, the message must be displayed in a popup." }, { "name": "invert_media", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom." }, { "name": "inbox_date", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "When was the notification received
The message must also be stored locally as part of the message history with the user id 777000 (Telegram Notifications)." }, { "name": "type", "type": "string", "comment": "String, identical in format and contents to the type field in API errors. Describes type of service message. It is acceptable to ignore repeated messages of the same type within a short period of time (15 minutes)." }, { "name": "message", "type": "string", "comment": "Message text" }, { "name": "media", "type": "MessageMedia", "comment": "Media content (optional)" }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "isVector": true }, "comment": "Message entities for styled text" }] }, { "kind": "class", "name": "updatePrivacy", "type": "Update", "id": 3996854058, "comment": "Privacy rules were changed", "arguments": [{ "name": "key", "type": "PrivacyKey", "comment": "Peers to which the privacy rules apply" }, { "name": "rules", "type": "PrivacyRule", "typeModifiers": { "isVector": true }, "comment": "New privacy rules" }] }, { "kind": "class", "name": "updateUserPhone", "type": "Update", "id": 88680979, "comment": "A user's phone number was changed", "arguments": [{ "name": "user_id", "type": "int53", "comment": "User ID" }, { "name": "phone", "type": "string", "comment": "New phone number" }] }, { "kind": "class", "name": "updateReadHistoryInbox", "type": "Update", "id": 2627162079, "comment": "Incoming messages were read", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "folder_id", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Peer folder ID, for more info click here" }, { "name": "peer", "type": "Peer", "comment": "Peer" }, { "name": "max_id", "type": "int", "comment": "Maximum ID of messages read" }, { "name": "still_unread_count", "type": "int", "comment": "Number of messages that are still unread" }, { "name": "pts", "type": "int", "comment": "Event count after generation" }, { "name": "pts_count", "type": "int", "comment": "Number of events that were generated" }] }, { "kind": "class", "name": "updateReadHistoryOutbox", "type": "Update", "id": 791617983, "comment": "Outgoing messages were read", "arguments": [{ "name": "peer", "type": "Peer", "comment": "Peer" }, { "name": "max_id", "type": "int", "comment": "Maximum ID of read outgoing messages" }, { "name": "pts", "type": "int", "comment": "Event count after generation" }, { "name": "pts_count", "type": "int", "comment": "Number of events that were generated" }] }, { "kind": "class", "name": "updateWebPage", "type": "Update", "id": 2139689491, "comment": "An instant view webpage preview was generated", "arguments": [{ "name": "webpage", "type": "WebPage", "comment": "Webpage preview" }, { "name": "pts", "type": "int", "comment": "Event count after generation" }, { "name": "pts_count", "type": "int", "comment": "Number of events that were generated" }] }, { "kind": "class", "name": "updateReadMessagesContents", "type": "Update", "id": 4163006849, "comment": "Contents of messages in the common message box were read", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "messages", "type": "int", "typeModifiers": { "isVector": true }, "comment": "IDs of read messages" }, { "name": "pts", "type": "int", "comment": "Event count after generation" }, { "name": "pts_count", "type": "int", "comment": "Number of events that were generated" }, { "name": "date", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "When was the last message in messages marked as read." }] }, { "kind": "class", "name": "updateChannelTooLong", "type": "Update", "id": 277713951, "comment": "There are new updates in the specified channel, the client must fetch them.
\nIf the difference is too long or if the channel isn't currently in the states, start fetching from the specified pts.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "channel_id", "type": "int53", "comment": "The channel" }, { "name": "pts", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "The PTS." }] }, { "kind": "class", "name": "updateChannel", "type": "Update", "id": 1666927625, "comment": "Channel/supergroup ({@link RawChannel} and/or {@link RawChannelFull}) information was updated.\n\nThis update can only be received through getDifference or in {@link RawUpdates}/{@link RawUpdatesCombined} constructors, so it will always come bundled with the updated {@link RawChannel}, that should be applied as usual », without re-fetching the info manually.\n\nHowever, full peer information will not come bundled in updates, so the full peer cache ({@link RawChannelFull}) must be invalidated for channel_id when receiving this update.", "arguments": [{ "name": "channel_id", "type": "int53", "comment": "Channel ID" }] }, { "kind": "class", "name": "updateNewChannelMessage", "type": "Update", "id": 1656358105, "comment": "A new message was sent in a channel/supergroup", "arguments": [{ "name": "message", "type": "Message", "comment": "New message" }, { "name": "pts", "type": "int", "comment": "Event count after generation" }, { "name": "pts_count", "type": "int", "comment": "Number of events that were generated" }] }, { "kind": "class", "name": "updateReadChannelInbox", "type": "Update", "id": 2452516368, "comment": "Incoming messages in a channel/supergroup were read", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "folder_id", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Peer folder ID, for more info click here" }, { "name": "channel_id", "type": "int53", "comment": "Channel/supergroup ID" }, { "name": "max_id", "type": "int", "comment": "Position up to which all incoming messages are read." }, { "name": "still_unread_count", "type": "int", "comment": "Count of messages weren't read yet" }, { "name": "pts", "type": "int", "comment": "Event count after generation" }] }, { "kind": "class", "name": "updateDeleteChannelMessages", "type": "Update", "id": 3274529554, "comment": "Some messages in a supergroup/channel were deleted", "arguments": [{ "name": "channel_id", "type": "int53", "comment": "Channel ID" }, { "name": "messages", "type": "int", "typeModifiers": { "isVector": true }, "comment": "IDs of messages that were deleted" }, { "name": "pts", "type": "int", "comment": "Event count after generation" }, { "name": "pts_count", "type": "int", "comment": "Number of events that were generated" }] }, { "kind": "class", "name": "updateChannelMessageViews", "type": "Update", "id": 4062620680, "comment": "The view counter of a message in a channel has changed", "arguments": [{ "name": "channel_id", "type": "int53", "comment": "Channel ID" }, { "name": "id", "type": "int", "comment": "ID of the message" }, { "name": "views", "type": "int", "comment": "New view counter" }] }, { "kind": "class", "name": "updateChatParticipantAdmin", "type": "Update", "id": 3620364706, "comment": "Admin permissions of a user in a basic group were changed", "arguments": [{ "name": "chat_id", "type": "int53", "comment": "Chat ID" }, { "name": "user_id", "type": "int53", "comment": "ID of the (de)admined user" }, { "name": "is_admin", "type": "Bool", "comment": "Whether the user was rendered admin" }, { "name": "version", "type": "int", "comment": "Used in basic groups to reorder updates and make sure that all of them was received." }] }, { "kind": "class", "name": "updateNewStickerSet", "type": "Update", "id": 1753886890, "comment": "A new stickerset was installed", "arguments": [{ "name": "stickerset", "type": "messages.StickerSet", "comment": "The installed stickerset" }] }, { "kind": "class", "name": "updateStickerSetsOrder", "type": "Update", "id": 196268545, "comment": "The order of stickersets was changed", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "masks", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the updated stickers are mask stickers" }, { "name": "emojis", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the updated stickers are custom emoji stickers" }, { "name": "order", "type": "long", "typeModifiers": { "isVector": true }, "comment": "New sticker order by sticker ID" }] }, { "kind": "class", "name": "updateStickerSets", "type": "Update", "id": 834816008, "comment": "Installed stickersets have changed, the client should refetch them as described in the docs.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "masks", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether mask stickersets have changed" }, { "name": "emojis", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the list of installed custom emoji stickersets has changed" }] }, { "kind": "class", "name": "updateSavedGifs", "type": "Update", "id": 2473931806, "comment": "The saved gif list has changed, the client should refetch it using {@link messages.RawGetSavedGifsRequest}", "arguments": [] }, { "kind": "class", "name": "updateBotInlineQuery", "type": "Update", "id": 1232025500, "comment": "An incoming inline query", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "query_id", "type": "long", "comment": "Query ID" }, { "name": "user_id", "type": "int53", "comment": "User that sent the query" }, { "name": "query", "type": "string", "comment": "Text of query" }, { "name": "geo", "type": "GeoPoint", "typeModifiers": { "predicate": "flags.0" }, "comment": "Attached geolocation" }, { "name": "peer_type", "type": "InlineQueryPeerType", "typeModifiers": { "predicate": "flags.1" }, "comment": "Type of the chat from which the inline query was sent." }, { "name": "offset", "type": "string", "comment": "Offset to navigate through results" }] }, { "kind": "class", "name": "updateBotInlineSend", "type": "Update", "id": 317794823, "comment": "The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "user_id", "type": "int53", "comment": "The user that chose the result" }, { "name": "query", "type": "string", "comment": "The query that was used to obtain the result" }, { "name": "geo", "type": "GeoPoint", "typeModifiers": { "predicate": "flags.0" }, "comment": "Optional. Sender location, only for bots that require user location" }, { "name": "id", "type": "string", "comment": "The unique identifier for the result that was chosen" }, { "name": "msg_id", "type": "InputBotInlineMessageID", "typeModifiers": { "predicate": "flags.1" }, "comment": "Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message." }] }, { "kind": "class", "name": "updateEditChannelMessage", "type": "Update", "id": 457133559, "comment": "A message was edited in a channel/supergroup", "arguments": [{ "name": "message", "type": "Message", "comment": "The new message" }, { "name": "pts", "type": "int", "comment": "Event count after generation" }, { "name": "pts_count", "type": "int", "comment": "Number of events that were generated" }] }, { "kind": "class", "name": "updateBotCallbackQuery", "type": "Update", "id": 3117401229, "comment": "A callback button was pressed, and the button data was sent to the bot that created the button", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "query_id", "type": "long", "comment": "Query ID" }, { "name": "user_id", "type": "int53", "comment": "ID of the user that pressed the button" }, { "name": "peer", "type": "Peer", "comment": "Chat where the inline keyboard was sent" }, { "name": "msg_id", "type": "int", "comment": "Message ID" }, { "name": "chat_instance", "type": "long", "comment": "Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games." }, { "name": "data", "type": "bytes", "typeModifiers": { "predicate": "flags.0" }, "comment": "Callback data" }, { "name": "game_short_name", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Short name of a Game to be returned, serves as the unique identifier for the game" }] }, { "kind": "class", "name": "updateEditMessage", "type": "Update", "id": 3825430691, "comment": "A message was edited", "arguments": [{ "name": "message", "type": "Message", "comment": "The new edited message" }, { "name": "pts", "type": "int", "comment": "PTS" }, { "name": "pts_count", "type": "int", "comment": "PTS count" }] }, { "kind": "class", "name": "updateInlineBotCallbackQuery", "type": "Update", "id": 1763610706, "comment": "This notification is received by bots when a button is pressed", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "query_id", "type": "long", "comment": "Query ID" }, { "name": "user_id", "type": "int53", "comment": "ID of the user that pressed the button" }, { "name": "msg_id", "type": "InputBotInlineMessageID", "comment": "ID of the inline message with the button" }, { "name": "chat_instance", "type": "long", "comment": "Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games." }, { "name": "data", "type": "bytes", "typeModifiers": { "predicate": "flags.0" }, "comment": "Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field." }, { "name": "game_short_name", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Short name of a Game to be returned, serves as the unique identifier for the game" }] }, { "kind": "class", "name": "updateReadChannelOutbox", "type": "Update", "id": 3076495785, "comment": "Outgoing messages in a channel/supergroup were read", "arguments": [{ "name": "channel_id", "type": "int53", "comment": "Channel/supergroup ID" }, { "name": "max_id", "type": "int", "comment": "Position up to which all outgoing messages are read." }] }, { "kind": "class", "name": "updateDraftMessage", "type": "Update", "id": 457829485, "comment": "Notifies a change of a message draft.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "peer", "type": "Peer", "comment": "The peer to which the draft is associated" }, { "name": "top_msg_id", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "ID of the forum topic to which the draft is associated" }, { "name": "draft", "type": "DraftMessage", "comment": "The draft" }] }, { "kind": "class", "name": "updateReadFeaturedStickers", "type": "Update", "id": 1461528386, "comment": "Some featured stickers were marked as read", "arguments": [] }, { "kind": "class", "name": "updateRecentStickers", "type": "Update", "id": 2588027936, "comment": "The recent sticker list was updated", "arguments": [] }, { "kind": "class", "name": "updateConfig", "type": "Update", "id": 2720652550, "comment": "The server-side configuration has changed; the client should re-fetch the config using {@link help.RawGetConfigRequest} and {@link help.RawGetAppConfigRequest}.", "arguments": [] }, { "kind": "class", "name": "updatePtsChanged", "type": "Update", "id": 861169551, "comment": "Common message box sequence PTS has changed, state has to be refetched using updates.getState", "arguments": [] }, { "kind": "class", "name": "updateChannelWebPage", "type": "Update", "id": 791390623, "comment": "A webpage preview of a link in a channel/supergroup message was generated", "arguments": [{ "name": "channel_id", "type": "int53", "comment": "Channel/supergroup ID" }, { "name": "webpage", "type": "WebPage", "comment": "Generated webpage preview" }, { "name": "pts", "type": "int", "comment": "Event count after generation" }, { "name": "pts_count", "type": "int", "comment": "Number of events that were generated" }] }, { "kind": "class", "name": "updateDialogPinned", "type": "Update", "id": 1852826908, "comment": "A dialog was pinned/unpinned", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "pinned", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the dialog was pinned" }, { "name": "folder_id", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Peer folder ID, for more info click here" }, { "name": "peer", "type": "DialogPeer", "comment": "The dialog" }] }, { "kind": "class", "name": "updatePinnedDialogs", "type": "Update", "id": 4195302562, "comment": "Pinned dialogs were updated", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "folder_id", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Peer folder ID, for more info click here" }, { "name": "order", "type": "DialogPeer", "typeModifiers": { "predicate": "flags.0", "isVector": true }, "comment": "New order of pinned dialogs" }] }, { "kind": "class", "name": "updateBotWebhookJSON", "type": "Update", "id": 2199371971, "comment": "A new incoming event; for bots only", "arguments": [{ "name": "data", "type": "DataJSON", "comment": "The event" }] }, { "kind": "class", "name": "updateBotWebhookJSONQuery", "type": "Update", "id": 2610053286, "comment": "A new incoming query; for bots only", "arguments": [{ "name": "query_id", "type": "long", "comment": "Query identifier" }, { "name": "data", "type": "DataJSON", "comment": "Query data" }, { "name": "timeout", "type": "int", "comment": "Query timeout" }] }, { "kind": "class", "name": "updateBotShippingQuery", "type": "Update", "id": 3048144253, "comment": "This object contains information about an incoming shipping query.", "arguments": [{ "name": "query_id", "type": "long", "comment": "Unique query identifier" }, { "name": "user_id", "type": "int53", "comment": "User who sent the query" }, { "name": "payload", "type": "bytes", "comment": "Bot specified invoice payload" }, { "name": "shipping_address", "type": "PostAddress", "comment": "User specified shipping address" }] }, { "kind": "class", "name": "updateBotPrecheckoutQuery", "type": "Update", "id": 2359990934, "comment": "This object contains information about an incoming pre-checkout query.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "query_id", "type": "long", "comment": "Unique query identifier" }, { "name": "user_id", "type": "int53", "comment": "User who sent the query" }, { "name": "payload", "type": "bytes", "comment": "Bot specified invoice payload" }, { "name": "info", "type": "PaymentRequestedInfo", "typeModifiers": { "predicate": "flags.0" }, "comment": "Order info provided by the user" }, { "name": "shipping_option_id", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Identifier of the shipping option chosen by the user" }, { "name": "currency", "type": "string", "comment": "Three-letter ISO 4217 currency code, or XTR for Telegram Stars." }, { "name": "total_amount", "type": "long", "comment": "Total amount in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." }] }, { "kind": "class", "name": "updatePhoneCall", "type": "Update", "id": 2869914398, "comment": "An incoming phone call", "arguments": [{ "name": "phone_call", "type": "PhoneCall", "comment": "Phone call" }] }, { "kind": "class", "name": "updateLangPackTooLong", "type": "Update", "id": 1180041828, "comment": "A language pack has changed, the client should manually fetch the changed strings using {@link langpack.RawGetDifferenceRequest}", "arguments": [{ "name": "lang_code", "type": "string", "comment": "Language code" }] }, { "kind": "class", "name": "updateLangPack", "type": "Update", "id": 1442983757, "comment": "Language pack updated", "arguments": [{ "name": "difference", "type": "LangPackDifference", "comment": "Changed strings" }] }, { "kind": "class", "name": "updateFavedStickers", "type": "Update", "id": 3843135853, "comment": "The list of favorited stickers was changed, the client should call {@link messages.RawGetFavedStickersRequest} to refetch the new list", "arguments": [] }, { "kind": "class", "name": "updateChannelReadMessagesContents", "type": "Update", "id": 3928556893, "comment": "The specified channel/supergroup messages were read", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "channel_id", "type": "int53", "comment": "Channel/supergroup ID" }, { "name": "top_msg_id", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Forum topic ID." }, { "name": "messages", "type": "int", "typeModifiers": { "isVector": true }, "comment": "IDs of messages that were read" }] }, { "kind": "class", "name": "updateContactsReset", "type": "Update", "id": 1887741886, "comment": "All contacts were deleted", "arguments": [] }, { "kind": "class", "name": "updateChannelAvailableMessages", "type": "Update", "id": 2990524056, "comment": "The history of a channel/supergroup was hidden.", "arguments": [{ "name": "channel_id", "type": "int53", "comment": "Channel/supergroup ID" }, { "name": "available_min_id", "type": "int", "comment": "Identifier of a maximum unavailable message in a channel due to hidden history." }] }, { "kind": "class", "name": "updateDialogUnreadMark", "type": "Update", "id": 3781450179, "comment": "The manual unread mark of a chat was changed", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "unread", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Was the chat marked or unmarked as read" }, { "name": "peer", "type": "DialogPeer", "comment": "The dialog" }] }, { "kind": "class", "name": "updateMessagePoll", "type": "Update", "id": 2896258427, "comment": "The results of a poll have changed", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "poll_id", "type": "long", "comment": "Poll ID" }, { "name": "poll", "type": "Poll", "typeModifiers": { "predicate": "flags.0" }, "comment": "If the server knows the client hasn't cached this poll yet, the poll itself" }, { "name": "results", "type": "PollResults", "comment": "New poll results" }] }, { "kind": "class", "name": "updateChatDefaultBannedRights", "type": "Update", "id": 1421875280, "comment": "Default banned rights in a normal chat were updated", "arguments": [{ "name": "peer", "type": "Peer", "comment": "The chat" }, { "name": "default_banned_rights", "type": "ChatBannedRights", "comment": "New default banned rights" }, { "name": "version", "type": "int", "comment": "Version" }] }, { "kind": "class", "name": "updateFolderPeers", "type": "Update", "id": 422972864, "comment": "The peer list of a peer folder was updated", "arguments": [{ "name": "folder_peers", "type": "FolderPeer", "typeModifiers": { "isVector": true }, "comment": "New peer list" }, { "name": "pts", "type": "int", "comment": "Event count after generation" }, { "name": "pts_count", "type": "int", "comment": "Number of events that were generated" }] }, { "kind": "class", "name": "updatePeerSettings", "type": "Update", "id": 1786671974, "comment": "Settings of a certain peer have changed", "arguments": [{ "name": "peer", "type": "Peer", "comment": "The peer" }, { "name": "settings", "type": "PeerSettings", "comment": "Associated peer settings" }] }, { "kind": "class", "name": "updatePeerLocated", "type": "Update", "id": 3031420848, "comment": "List of peers near you was updated", "arguments": [{ "name": "peers", "type": "PeerLocated", "typeModifiers": { "isVector": true }, "comment": "Geolocated peer list update" }] }, { "kind": "class", "name": "updateNewScheduledMessage", "type": "Update", "id": 967122427, "comment": "A message was added to the schedule queue of a chat", "arguments": [{ "name": "message", "type": "Message", "comment": "Message" }] }, { "kind": "class", "name": "updateDeleteScheduledMessages", "type": "Update", "id": 2424728814, "comment": "Some scheduled messages were deleted from the schedule queue of a chat", "arguments": [{ "name": "peer", "type": "Peer", "comment": "Peer" }, { "name": "messages", "type": "int", "typeModifiers": { "isVector": true }, "comment": "Deleted scheduled messages" }] }, { "kind": "class", "name": "updateTheme", "type": "Update", "id": 2182544291, "comment": "A cloud theme was updated", "arguments": [{ "name": "theme", "type": "Theme", "comment": "Theme" }] }, { "kind": "class", "name": "updateGeoLiveViewed", "type": "Update", "id": 2267003193, "comment": "Live geo position message was viewed", "arguments": [{ "name": "peer", "type": "Peer", "comment": "The user that viewed the live geo position" }, { "name": "msg_id", "type": "int", "comment": "Message ID of geo position message" }] }, { "kind": "class", "name": "updateLoginToken", "type": "Update", "id": 1448076945, "comment": "A login token (for login via QR code) was accepted.", "arguments": [] }, { "kind": "class", "name": "updateMessagePollVote", "type": "Update", "id": 619974263, "comment": "A specific peer has voted in a poll", "arguments": [{ "name": "poll_id", "type": "long", "comment": "Poll ID" }, { "name": "peer", "type": "Peer", "comment": "The peer that voted in the poll" }, { "name": "options", "type": "bytes", "typeModifiers": { "isVector": true }, "comment": "Chosen option(s)" }, { "name": "qts", "type": "int", "comment": "New qts value, see updates » for more info." }] }, { "kind": "class", "name": "updateDialogFilter", "type": "Update", "id": 654302845, "comment": "A new folder was added", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "id", "type": "int", "comment": "Folder ID" }, { "name": "filter", "type": "DialogFilter", "typeModifiers": { "predicate": "flags.0" }, "comment": "Folder info" }] }, { "kind": "class", "name": "updateDialogFilterOrder", "type": "Update", "id": 2782339333, "comment": "New folder order", "arguments": [{ "name": "order", "type": "int", "typeModifiers": { "isVector": true }, "comment": "Ordered folder IDs" }] }, { "kind": "class", "name": "updateDialogFilters", "type": "Update", "id": 889491791, "comment": "Clients should update folder info", "arguments": [] }, { "kind": "class", "name": "updatePhoneCallSignalingData", "type": "Update", "id": 643940105, "comment": "Incoming phone call signaling payload", "arguments": [{ "name": "phone_call_id", "type": "long", "comment": "Phone call ID" }, { "name": "data", "type": "bytes", "comment": "Signaling payload" }] }, { "kind": "class", "name": "updateChannelMessageForwards", "type": "Update", "id": 3533318132, "comment": "The forward counter of a message in a channel has changed", "arguments": [{ "name": "channel_id", "type": "int53", "comment": "Channel ID" }, { "name": "id", "type": "int", "comment": "ID of the message" }, { "name": "forwards", "type": "int", "comment": "New forward counter" }] }, { "kind": "class", "name": "updateReadChannelDiscussionInbox", "type": "Update", "id": 3601962310, "comment": "Incoming comments in a discussion thread were marked as read", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "channel_id", "type": "int53", "comment": "Discussion group ID" }, { "name": "top_msg_id", "type": "int", "comment": "ID of the group message that started the thread (message in linked discussion group)" }, { "name": "read_max_id", "type": "int", "comment": "Message ID of latest read incoming message for this thread" }, { "name": "broadcast_id", "type": "int53", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, contains the ID of the channel that contains the post that started the comment thread in the discussion group (channel_id)" }, { "name": "broadcast_post", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, contains the ID of the channel post that started the comment thread" }] }, { "kind": "class", "name": "updateReadChannelDiscussionOutbox", "type": "Update", "id": 1767677564, "comment": "Outgoing comments in a discussion thread were marked as read", "arguments": [{ "name": "channel_id", "type": "int53", "comment": "Supergroup ID" }, { "name": "top_msg_id", "type": "int", "comment": "ID of the group message that started the thread" }, { "name": "read_max_id", "type": "int", "comment": "Message ID of latest read outgoing message for this thread" }] }, { "kind": "class", "name": "updatePeerBlocked", "type": "Update", "id": 3957356370, "comment": "We blocked a peer, see here » for more info on blocklists.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "blocked", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the peer was blocked or unblocked" }, { "name": "blocked_my_stories_from", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the peer was added/removed to/from the story blocklist; if not set, this update affects the main blocklist, see here » for more info." }, { "name": "peer_id", "type": "Peer", "comment": "The (un)blocked peer" }] }, { "kind": "class", "name": "updateChannelUserTyping", "type": "Update", "id": 2357774627, "comment": "A user is typing in a supergroup, channel or message thread", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "channel_id", "type": "int53", "comment": "Channel ID" }, { "name": "top_msg_id", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Thread ID" }, { "name": "from_id", "type": "Peer", "comment": "The peer that is typing" }, { "name": "action", "type": "SendMessageAction", "comment": "Whether the user is typing, sending a media or doing something else" }] }, { "kind": "class", "name": "updatePinnedMessages", "type": "Update", "id": 3984976565, "comment": "Some messages were pinned in a chat", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "pinned", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the messages were pinned or unpinned" }, { "name": "peer", "type": "Peer", "comment": "Peer" }, { "name": "messages", "type": "int", "typeModifiers": { "isVector": true }, "comment": "Message IDs" }, { "name": "pts", "type": "int", "comment": "Event count after generation" }, { "name": "pts_count", "type": "int", "comment": "Number of events that were generated" }] }, { "kind": "class", "name": "updatePinnedChannelMessages", "type": "Update", "id": 1538885128, "comment": "Messages were pinned/unpinned in a channel/supergroup", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "pinned", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the messages were pinned or unpinned" }, { "name": "channel_id", "type": "int53", "comment": "Channel ID" }, { "name": "messages", "type": "int", "typeModifiers": { "isVector": true }, "comment": "Messages" }, { "name": "pts", "type": "int", "comment": "Event count after generation" }, { "name": "pts_count", "type": "int", "comment": "Number of events that were generated" }] }, { "kind": "class", "name": "updateChat", "type": "Update", "id": 4170869326, "comment": "Chat ({@link RawChat} and/or {@link RawChatFull}) information was updated.\n\nThis update can only be received through getDifference or in {@link RawUpdates}/{@link RawUpdatesCombined} constructors, so it will always come bundled with the updated {@link RawChat}, that should be applied as usual », without re-fetching the info manually.\n\nHowever, full peer information will not come bundled in updates, so the full peer cache ({@link RawChatFull}) must be invalidated for chat_id when receiving this update.", "arguments": [{ "name": "chat_id", "type": "int53", "comment": "Chat ID" }] }, { "kind": "class", "name": "updateGroupCallParticipants", "type": "Update", "id": 4075543374, "comment": "The participant list of a certain group call has changed", "arguments": [{ "name": "call", "type": "InputGroupCall", "comment": "Group call" }, { "name": "participants", "type": "GroupCallParticipant", "typeModifiers": { "isVector": true }, "comment": "New participant list" }, { "name": "version", "type": "int", "comment": "Version" }] }, { "kind": "class", "name": "updateGroupCall", "type": "Update", "id": 347227392, "comment": "A new groupcall was started", "arguments": [{ "name": "chat_id", "type": "int53", "comment": "The channel/supergroup where this group call or livestream takes place" }, { "name": "call", "type": "GroupCall", "comment": "Info about the group call or livestream" }] }, { "kind": "class", "name": "updatePeerHistoryTTL", "type": "Update", "id": 3147544997, "comment": "The Time-To-Live for messages sent by the current user in a specific chat has changed", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "peer", "type": "Peer", "comment": "The chat" }, { "name": "ttl_period", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "The new Time-To-Live" }] }, { "kind": "class", "name": "updateChatParticipant", "type": "Update", "id": 3498534458, "comment": "A user has joined or left a specific chat", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "chat_id", "type": "int53", "comment": "Chat ID" }, { "name": "date", "type": "int", "comment": "When did this event occur" }, { "name": "actor_id", "type": "int53", "comment": "User that triggered the change (inviter, admin that kicked the user, or the even the user_id itself)" }, { "name": "user_id", "type": "int53", "comment": "User that was affected by the change" }, { "name": "prev_participant", "type": "ChatParticipant", "typeModifiers": { "predicate": "flags.0" }, "comment": "Previous participant info (empty if this participant just joined)" }, { "name": "new_participant", "type": "ChatParticipant", "typeModifiers": { "predicate": "flags.1" }, "comment": "New participant info (empty if this participant just left)" }, { "name": "invite", "type": "ExportedChatInvite", "typeModifiers": { "predicate": "flags.2" }, "comment": "The invite that was used to join the group" }, { "name": "qts", "type": "int", "comment": "New qts value, see updates » for more info." }] }, { "kind": "class", "name": "updateChannelParticipant", "type": "Update", "id": 2556246715, "comment": "A participant has left, joined, was banned or admined in a channel or supergroup.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "via_chatlist", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether the participant joined using a chat folder deep link »." }, { "name": "channel_id", "type": "int53", "comment": "Channel ID" }, { "name": "date", "type": "int", "comment": "Date of the event" }, { "name": "actor_id", "type": "int53", "comment": "User that triggered the change (inviter, admin that kicked the user, or the even the user_id itself)" }, { "name": "user_id", "type": "int53", "comment": "User that was affected by the change" }, { "name": "prev_participant", "type": "ChannelParticipant", "typeModifiers": { "predicate": "flags.0" }, "comment": "Previous participant status" }, { "name": "new_participant", "type": "ChannelParticipant", "typeModifiers": { "predicate": "flags.1" }, "comment": "New participant status" }, { "name": "invite", "type": "ExportedChatInvite", "typeModifiers": { "predicate": "flags.2" }, "comment": "Chat invite used to join the channel/supergroup" }, { "name": "qts", "type": "int", "comment": "New qts value, see updates » for more info." }] }, { "kind": "class", "name": "updateBotStopped", "type": "Update", "id": 3297184329, "comment": "A bot was stopped or re-started.", "arguments": [{ "name": "user_id", "type": "int53", "comment": "The user ID" }, { "name": "date", "type": "int", "comment": "When did this action occur" }, { "name": "stopped", "type": "Bool", "comment": "Whether the bot was stopped or started" }, { "name": "qts", "type": "int", "comment": "New qts value, see updates » for more info." }] }, { "kind": "class", "name": "updateGroupCallConnection", "type": "Update", "id": 192428418, "comment": "New WebRTC parameters", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "presentation", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Are these parameters related to the screen capture session currently in progress?" }, { "name": "params", "type": "DataJSON", "comment": "WebRTC parameters" }] }, { "kind": "class", "name": "updateBotCommands", "type": "Update", "id": 1299263278, "comment": "The command set of a certain bot in a certain chat has changed.", "arguments": [{ "name": "peer", "type": "Peer", "comment": "The affected chat" }, { "name": "bot_id", "type": "int53", "comment": "ID of the bot that changed its command set" }, { "name": "commands", "type": "BotCommand", "typeModifiers": { "isVector": true }, "comment": "New bot commands" }] }, { "kind": "class", "name": "updatePendingJoinRequests", "type": "Update", "id": 1885586395, "comment": "Someone has requested to join a chat or channel", "arguments": [{ "name": "peer", "type": "Peer", "comment": "Chat or channel" }, { "name": "requests_pending", "type": "int", "comment": "Number of pending join requests » for the chat or channel" }, { "name": "recent_requesters", "type": "int53", "typeModifiers": { "isVector": true }, "comment": "IDs of users that have recently requested to join" }] }, { "kind": "class", "name": "updateBotChatInviteRequester", "type": "Update", "id": 299870598, "comment": "Someone has requested to join a chat or channel (bots only, users will receive an {@link RawUpdatePendingJoinRequests}, instead)", "arguments": [{ "name": "peer", "type": "Peer", "comment": "The chat or channel in question" }, { "name": "date", "type": "int", "comment": "When was the join request » made" }, { "name": "user_id", "type": "int53", "comment": "The user ID that is asking to join the chat or channel" }, { "name": "about", "type": "string", "comment": "Bio of the user" }, { "name": "invite", "type": "ExportedChatInvite", "comment": "Chat invite link that was used by the user to send the join request »" }, { "name": "qts", "type": "int", "comment": "QTS event sequence identifier" }] }, { "kind": "class", "name": "updateMessageReactions", "type": "Update", "id": 1578843320, "comment": "New message reactions » are available", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "peer", "type": "Peer", "comment": "Peer" }, { "name": "msg_id", "type": "int", "comment": "Message ID" }, { "name": "top_msg_id", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Forum topic ID" }, { "name": "reactions", "type": "MessageReactions", "comment": "Reactions" }] }, { "kind": "class", "name": "updateAttachMenuBots", "type": "Update", "id": 397910539, "comment": "The list of installed attachment menu entries » has changed, use {@link messages.RawGetAttachMenuBotsRequest} to fetch the updated list.", "arguments": [] }, { "kind": "class", "name": "updateWebViewResultSent", "type": "Update", "id": 361936797, "comment": "Indicates to a bot that a webview was closed and an inline message was sent on behalf of the user using {@link messages.RawSendWebViewResultMessageRequest}", "arguments": [{ "name": "query_id", "type": "long", "comment": "Web app interaction ID" }] }, { "kind": "class", "name": "updateBotMenuButton", "type": "Update", "id": 347625491, "comment": "The menu button behavior for the specified bot has changed", "arguments": [{ "name": "bot_id", "type": "int53", "comment": "Bot ID" }, { "name": "button", "type": "BotMenuButton", "comment": "New menu button" }] }, { "kind": "class", "name": "updateSavedRingtones", "type": "Update", "id": 1960361625, "comment": "The list of saved notification sounds has changed, use {@link account.RawGetSavedRingtonesRequest} to fetch the new list.", "arguments": [] }, { "kind": "class", "name": "updateTranscribedAudio", "type": "Update", "id": 8703322, "comment": "A pending voice message transcription » initiated with {@link messages.RawTranscribeAudioRequest} was updated.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "pending", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether this transcription is still pending and further {@link RawUpdateTranscribedAudio} about it will be sent in the future." }, { "name": "peer", "type": "Peer", "comment": "Peer of the transcribed message" }, { "name": "msg_id", "type": "int", "comment": "Transcribed message ID" }, { "name": "transcription_id", "type": "long", "comment": "Transcription ID" }, { "name": "text", "type": "string", "comment": "Transcribed text" }] }, { "kind": "class", "name": "updateReadFeaturedEmojiStickers", "type": "Update", "id": 4216080748, "comment": "Some featured custom emoji stickers were marked as read", "arguments": [] }, { "kind": "class", "name": "updateUserEmojiStatus", "type": "Update", "id": 674706841, "comment": "The emoji status of a certain user has changed", "arguments": [{ "name": "user_id", "type": "int53", "comment": "User ID" }, { "name": "emoji_status", "type": "EmojiStatus", "comment": "New emoji status" }] }, { "kind": "class", "name": "updateRecentEmojiStatuses", "type": "Update", "id": 821314523, "comment": "The list of recent emoji statuses has changed", "arguments": [] }, { "kind": "class", "name": "updateRecentReactions", "type": "Update", "id": 1870160884, "comment": "The list of recent message reactions has changed", "arguments": [] }, { "kind": "class", "name": "updateMoveStickerSetToTop", "type": "Update", "id": 2264715141, "comment": "A stickerset was just moved to top, see here for more info »", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "masks", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "This update is referring to a mask stickerset" }, { "name": "emojis", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "This update is referring to a custom emoji stickerset" }, { "name": "stickerset", "type": "long", "comment": "Stickerset ID" }] }, { "kind": "class", "name": "updateMessageExtendedMedia", "type": "Update", "id": 3584300836, "comment": "You bought a paid media »: this update contains the revealed media.", "arguments": [{ "name": "peer", "type": "Peer", "comment": "Peer where the paid media was posted" }, { "name": "msg_id", "type": "int", "comment": "ID of the message containing the paid media" }, { "name": "extended_media", "type": "MessageExtendedMedia", "typeModifiers": { "isVector": true }, "comment": "Revealed media, contains only {@link RawMessageExtendedMedia} constructors." }] }, { "kind": "class", "name": "updateChannelPinnedTopic", "type": "Update", "id": 422509539, "comment": "A forum topic » was pinned or unpinned.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "pinned", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the topic was pinned or unpinned" }, { "name": "channel_id", "type": "int53", "comment": "The forum ID" }, { "name": "topic_id", "type": "int", "comment": "The topic ID" }] }, { "kind": "class", "name": "updateChannelPinnedTopics", "type": "Update", "id": 4263085570, "comment": "The pinned topics of a forum have changed.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "channel_id", "type": "int53", "comment": "Forum ID." }, { "name": "order", "type": "int", "typeModifiers": { "predicate": "flags.0", "isVector": true }, "comment": "Ordered list containing the IDs of all pinned topics." }] }, { "kind": "class", "name": "updateUser", "type": "Update", "id": 542282808, "comment": "User ({@link RawUser} and/or {@link RawUserFull}) information was updated.\n\nThis update can only be received through getDifference or in {@link RawUpdates}/{@link RawUpdatesCombined} constructors, so it will always come bundled with the updated {@link RawUser}, that should be applied as usual », without re-fetching the info manually.\n\nHowever, full peer information will not come bundled in updates, so the full peer cache ({@link RawUserFull}) must be invalidated for user_id when receiving this update.", "arguments": [{ "name": "user_id", "type": "int53", "comment": "User ID" }] }, { "kind": "class", "name": "updateAutoSaveSettings", "type": "Update", "id": 3959795863, "comment": "Media autosave settings have changed and must be refetched using {@link account.RawGetAutoSaveSettingsRequest}.", "arguments": [] }, { "kind": "class", "name": "updateStory", "type": "Update", "id": 1974712216, "comment": "A new story was posted.", "arguments": [{ "name": "peer", "type": "Peer", "comment": "ID of the poster." }, { "name": "story", "type": "StoryItem", "comment": "The story that was posted." }] }, { "kind": "class", "name": "updateReadStories", "type": "Update", "id": 4149121835, "comment": "Stories of a specific peer were marked as read.", "arguments": [{ "name": "peer", "type": "Peer", "comment": "The peer" }, { "name": "max_id", "type": "int", "comment": "ID of the last story that was marked as read" }] }, { "kind": "class", "name": "updateStoryID", "type": "Update", "id": 468923833, "comment": "A story was successfully uploaded.\n\nOnce a story is successfully uploaded, an {@link RawUpdateStoryID} will be returned, indicating the story ID (id) that was attributed to the story (like for messages, random_id indicates the random_id that was passed to {@link stories.RawSendStoryRequest}: this way, you can tell which story was assigned a specific id by checking which {@link stories.RawSendStoryRequest} call has the returned random_id).", "arguments": [{ "name": "id", "type": "int", "comment": "The id that was attributed to the story." }, { "name": "random_id", "type": "long", "comment": "The random_id that was passed to {@link stories.RawSendStoryRequest}." }] }, { "kind": "class", "name": "updateStoriesStealthMode", "type": "Update", "id": 738741697, "comment": "Indicates that stories stealth mode was activated.", "arguments": [{ "name": "stealth_mode", "type": "StoriesStealthMode", "comment": "Information about the current stealth mode session." }] }, { "kind": "class", "name": "updateSentStoryReaction", "type": "Update", "id": 2103604867, "comment": "Indicates we reacted to a story ».", "arguments": [{ "name": "peer", "type": "Peer", "comment": "The peer that sent the story" }, { "name": "story_id", "type": "int", "comment": "ID of the story we reacted to" }, { "name": "reaction", "type": "Reaction", "comment": "The reaction that was sent" }] }, { "kind": "class", "name": "updateBotChatBoost", "type": "Update", "id": 2421019804, "comment": "A channel/supergroup boost has changed (bots only)", "arguments": [{ "name": "peer", "type": "Peer", "comment": "Channel" }, { "name": "boost", "type": "Boost", "comment": "New boost information" }, { "name": "qts", "type": "int", "comment": "QTS event sequence identifier" }] }, { "kind": "class", "name": "updateChannelViewForumAsMessages", "type": "Update", "id": 129403168, "comment": "Users may also choose to display messages from all topics as if they were sent to a normal group, using a \"View as messages\" setting in the local client.
\nThis setting only affects the current account, and is synced to other logged in sessions using the {@link channels.RawToggleViewForumAsMessagesRequest} method; invoking this method will update the value of the view_forum_as_messages flag of {@link RawChannelFull} or {@link RawDialog} and emit an {@link RawUpdateChannelViewForumAsMessages}.", "arguments": [{ "name": "channel_id", "type": "int53", "comment": "The forum ID" }, { "name": "enabled", "type": "Bool", "comment": "The new value of the toggle." }] }, { "kind": "class", "name": "updatePeerWallpaper", "type": "Update", "id": 2923368477, "comment": "The wallpaper » of a given peer has changed.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "wallpaper_overridden", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the other user has chosen a custom wallpaper for us using {@link messages.RawSetChatWallPaperRequest} and the for_both flag, see here » for more info." }, { "name": "peer", "type": "Peer", "comment": "The peer where the wallpaper has changed." }, { "name": "wallpaper", "type": "WallPaper", "typeModifiers": { "predicate": "flags.0" }, "comment": "The new wallpaper, if none the wallpaper was removed and the default wallpaper should be used." }] }, { "kind": "class", "name": "updateBotMessageReaction", "type": "Update", "id": 2887898062, "comment": "Bots only: a user has changed their reactions on a message with public reactions.", "arguments": [{ "name": "peer", "type": "Peer", "comment": "Peer of the reacted-to message." }, { "name": "msg_id", "type": "int", "comment": "ID of the reacted-to message." }, { "name": "date", "type": "int", "comment": "Date of the change." }, { "name": "actor", "type": "Peer", "comment": "The user that (un)reacted to the message." }, { "name": "old_reactions", "type": "Reaction", "typeModifiers": { "isVector": true }, "comment": "Old reactions" }, { "name": "new_reactions", "type": "Reaction", "typeModifiers": { "isVector": true }, "comment": "New reactions" }, { "name": "qts", "type": "int", "comment": "QTS event sequence identifier" }] }, { "kind": "class", "name": "updateBotMessageReactions", "type": "Update", "id": 164329305, "comment": "Bots only: the number of reactions on a message with anonymous reactions has changed.", "arguments": [{ "name": "peer", "type": "Peer", "comment": "Peer of the reacted-to message." }, { "name": "msg_id", "type": "int", "comment": "ID of the reacted-to message." }, { "name": "date", "type": "int", "comment": "Date of the change." }, { "name": "reactions", "type": "ReactionCount", "typeModifiers": { "isVector": true }, "comment": "New reaction counters." }, { "name": "qts", "type": "int", "comment": "QTS event sequence identifier" }] }, { "kind": "class", "name": "updateSavedDialogPinned", "type": "Update", "id": 2930744948, "comment": "A saved message dialog was pinned/unpinned", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "pinned", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the dialog was pinned" }, { "name": "peer", "type": "DialogPeer", "comment": "The dialog" }] }, { "kind": "class", "name": "updatePinnedSavedDialogs", "type": "Update", "id": 1751942566, "comment": "Pinned saved dialogs » were updated", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "order", "type": "DialogPeer", "typeModifiers": { "predicate": "flags.0", "isVector": true }, "comment": "New order of pinned saved dialogs" }] }, { "kind": "class", "name": "updateSavedReactionTags", "type": "Update", "id": 969307186, "comment": "The list of reaction tag » names assigned by the user has changed and should be refetched using {@link messages.RawGetSavedReactionTagsRequest}.", "arguments": [] }, { "kind": "class", "name": "updateSmsJob", "type": "Update", "id": 4049758676, "comment": "A new SMS job was received", "arguments": [{ "name": "job_id", "type": "string", "comment": "SMS job ID" }] }, { "kind": "class", "name": "updateQuickReplies", "type": "Update", "id": 4182182578, "comment": "Info about or the order of quick reply shortcuts » was changed.", "arguments": [{ "name": "quick_replies", "type": "QuickReply", "typeModifiers": { "isVector": true }, "comment": "New quick reply shortcut order and information." }] }, { "kind": "class", "name": "updateNewQuickReply", "type": "Update", "id": 4114458391, "comment": "A new quick reply shortcut » was created.", "arguments": [{ "name": "quick_reply", "type": "QuickReply", "comment": "Quick reply shortcut." }] }, { "kind": "class", "name": "updateDeleteQuickReply", "type": "Update", "id": 1407644140, "comment": "A quick reply shortcut » was deleted. This will not emit {@link RawUpdateDeleteQuickReplyMessages} updates, even if all the messages in the shortcut are also deleted by this update.", "arguments": [{ "name": "shortcut_id", "type": "int", "comment": "ID of the quick reply shortcut that was deleted." }] }, { "kind": "class", "name": "updateQuickReplyMessage", "type": "Update", "id": 1040518415, "comment": "A new message was added to a quick reply shortcut ».", "arguments": [{ "name": "message", "type": "Message", "comment": "The message that was added (the {@link RawMessage}.quick_reply_shortcut_id field will contain the shortcut ID)." }] }, { "kind": "class", "name": "updateDeleteQuickReplyMessages", "type": "Update", "id": 1450174413, "comment": "One or more messages in a quick reply shortcut » were deleted.", "arguments": [{ "name": "shortcut_id", "type": "int", "comment": "Quick reply shortcut ID." }, { "name": "messages", "type": "int", "typeModifiers": { "isVector": true }, "comment": "IDs of the deleted messages." }] }, { "kind": "class", "name": "updateBotBusinessConnect", "type": "Update", "id": 2330315130, "comment": "Connecting or disconnecting a business bot or changing the connection settings will emit an {@link RawUpdateBotBusinessConnect} update to the bot, with the new settings and a connection_id that will be used by the bot to handle updates from and send messages as the user.", "arguments": [{ "name": "connection", "type": "BotBusinessConnection", "comment": "Business connection settings" }, { "name": "qts", "type": "int", "comment": "New qts value, see updates » for more info." }] }, { "kind": "class", "name": "updateBotNewBusinessMessage", "type": "Update", "id": 2648388732, "comment": "A message was received via a connected business chat ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "connection_id", "type": "string", "comment": "Connection ID." }, { "name": "message", "type": "Message", "comment": "New message." }, { "name": "reply_to_message", "type": "Message", "typeModifiers": { "predicate": "flags.0" }, "comment": "The message that message is replying to." }, { "name": "qts", "type": "int", "comment": "New qts value, see updates » for more info." }] }, { "kind": "class", "name": "updateBotEditBusinessMessage", "type": "Update", "id": 132077692, "comment": "A message was edited in a connected business chat ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "connection_id", "type": "string", "comment": "Business connection ID" }, { "name": "message", "type": "Message", "comment": "New message." }, { "name": "reply_to_message", "type": "Message", "typeModifiers": { "predicate": "flags.0" }, "comment": "The message that message is replying to." }, { "name": "qts", "type": "int", "comment": "New qts value, see updates » for more info." }] }, { "kind": "class", "name": "updateBotDeleteBusinessMessage", "type": "Update", "id": 2687146030, "comment": "A message was deleted in a connected business chat ».", "arguments": [{ "name": "connection_id", "type": "string", "comment": "Business connection ID." }, { "name": "peer", "type": "Peer", "comment": "Peer where the messages were deleted." }, { "name": "messages", "type": "int", "typeModifiers": { "isVector": true }, "comment": "IDs of the messages that were deleted." }, { "name": "qts", "type": "int", "comment": "New qts value, see updates » for more info." }] }, { "kind": "class", "name": "updateNewStoryReaction", "type": "Update", "id": 405070859, "comment": "Represents a new reaction to a story.", "arguments": [{ "name": "story_id", "type": "int", "comment": "Story ID." }, { "name": "peer", "type": "Peer", "comment": "The peer where the story was posted." }, { "name": "reaction", "type": "Reaction", "comment": "The reaction." }] }, { "kind": "class", "name": "updateBroadcastRevenueTransactions", "type": "Update", "id": 3755565557, "comment": "A new channel ad revenue transaction was made, see here » for more info.", "arguments": [{ "name": "peer", "type": "Peer", "comment": "Channel" }, { "name": "balances", "type": "BroadcastRevenueBalances", "comment": "New ad revenue balance." }] }, { "kind": "class", "name": "updateStarsBalance", "type": "Update", "id": 263737752, "comment": "The current account's Telegram Stars balance » has changed.", "arguments": [{ "name": "balance", "type": "long", "comment": "New balance." }] }, { "kind": "class", "name": "updateBusinessBotCallbackQuery", "type": "Update", "id": 513998247, "comment": "A callback button sent via a business connection was pressed, and the button data was sent to the bot that created the button.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "query_id", "type": "long", "comment": "Query ID" }, { "name": "user_id", "type": "int53", "comment": "ID of the user that pressed the button" }, { "name": "connection_id", "type": "string", "comment": "Business connection ID" }, { "name": "message", "type": "Message", "comment": "Message that contains the keyboard (also contains info about the chat where the message was sent)." }, { "name": "reply_to_message", "type": "Message", "typeModifiers": { "predicate": "flags.2" }, "comment": "The message that message is replying to." }, { "name": "chat_instance", "type": "long", "comment": "Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games." }, { "name": "data", "type": "bytes", "typeModifiers": { "predicate": "flags.0" }, "comment": "Callback data" }] }, { "kind": "class", "name": "updateStarsRevenueStatus", "type": "Update", "id": 2776936473, "comment": "The Telegram Star balance of a channel/bot we own has changed ».", "arguments": [{ "name": "peer", "type": "Peer", "comment": "Channel/bot" }, { "name": "status", "type": "StarsRevenueStatus", "comment": "New Telegram Star balance." }] }, { "kind": "class", "name": "updates.state", "type": "updates.State", "id": 2775329342, "comment": "Updates state.", "arguments": [{ "name": "pts", "type": "int", "comment": "Number of events occurred in a text box" }, { "name": "qts", "type": "int", "comment": "Position in a sequence of updates in secret chats. For further details refer to article secret chats" }, { "name": "date", "type": "int", "comment": "Date of condition" }, { "name": "seq", "type": "int", "comment": "Number of sent updates" }, { "name": "unread_count", "type": "int", "comment": "Number of unread messages" }] }, { "kind": "class", "name": "updates.differenceEmpty", "type": "updates.Difference", "id": 1567990072, "comment": "No events.", "arguments": [{ "name": "date", "type": "int", "comment": "Current date" }, { "name": "seq", "type": "int", "comment": "Number of sent updates" }] }, { "kind": "class", "name": "updates.difference", "type": "updates.Difference", "id": 16030880, "comment": "Full list of occurred events.", "arguments": [{ "name": "new_messages", "type": "Message", "typeModifiers": { "isVector": true }, "comment": "List of new messages" }, { "name": "new_encrypted_messages", "type": "EncryptedMessage", "typeModifiers": { "isVector": true }, "comment": "List of new encrypted secret chat messages" }, { "name": "other_updates", "type": "Update", "typeModifiers": { "isVector": true }, "comment": "List of updates" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "List of chats mentioned in events" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "List of users mentioned in events" }, { "name": "state", "type": "updates.State", "comment": "Current state" }] }, { "kind": "class", "name": "updates.differenceSlice", "type": "updates.Difference", "id": 2835028353, "comment": "Incomplete list of occurred events.", "arguments": [{ "name": "new_messages", "type": "Message", "typeModifiers": { "isVector": true }, "comment": "List of new messages" }, { "name": "new_encrypted_messages", "type": "EncryptedMessage", "typeModifiers": { "isVector": true }, "comment": "New messages from the encrypted event sequence" }, { "name": "other_updates", "type": "Update", "typeModifiers": { "isVector": true }, "comment": "List of updates" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "List of chats mentioned in events" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "List of users mentioned in events" }, { "name": "intermediate_state", "type": "updates.State", "comment": "Intermediary state" }] }, { "kind": "class", "name": "updates.differenceTooLong", "type": "updates.Difference", "id": 1258196845, "comment": "The difference is too long, and the specified state must be used to refetch updates.", "arguments": [{ "name": "pts", "type": "int", "comment": "The new state to use." }] }, { "kind": "class", "name": "updatesTooLong", "type": "Updates", "id": 3809980286, "comment": "Too many updates, it is necessary to execute {@link updates.RawGetDifferenceRequest}.", "arguments": [] }, { "kind": "class", "name": "updateShortMessage", "type": "Updates", "id": 826001400, "comment": "Info about a message sent to (received from) another user", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "out", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the message is outgoing" }, { "name": "mentioned", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "Whether we were mentioned in the message" }, { "name": "media_unread", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Whether there are some unread mentions in this message" }, { "name": "silent", "type": "true", "typeModifiers": { "predicate": "flags.13" }, "comment": "If true, the message is a silent message, no notifications should be triggered" }, { "name": "id", "type": "int", "comment": "The message ID" }, { "name": "user_id", "type": "int53", "comment": "The ID of the sender (if outgoing will be the ID of the destination) of the message" }, { "name": "message", "type": "string", "comment": "The message" }, { "name": "pts", "type": "int", "comment": "PTS" }, { "name": "pts_count", "type": "int", "comment": "PTS count" }, { "name": "date", "type": "int", "comment": "date" }, { "name": "fwd_from", "type": "MessageFwdHeader", "typeModifiers": { "predicate": "flags.2" }, "comment": "Info about a forwarded message" }, { "name": "via_bot_id", "type": "int53", "typeModifiers": { "predicate": "flags.11" }, "comment": "Info about the inline bot used to generate this message" }, { "name": "reply_to", "type": "MessageReplyHeader", "typeModifiers": { "predicate": "flags.3" }, "comment": "Reply and thread information" }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.7", "isVector": true }, "comment": "Entities for styled text" }, { "name": "ttl_period", "type": "int", "typeModifiers": { "predicate": "flags.25" }, "comment": "Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well." }] }, { "kind": "class", "name": "updateShortChatMessage", "type": "Updates", "id": 1299050149, "comment": "Shortened constructor containing info on one new incoming text message from a chat", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "out", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the message is outgoing" }, { "name": "mentioned", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "Whether we were mentioned in this message" }, { "name": "media_unread", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Whether the message contains some unread mentions" }, { "name": "silent", "type": "true", "typeModifiers": { "predicate": "flags.13" }, "comment": "If true, the message is a silent message, no notifications should be triggered" }, { "name": "id", "type": "int", "comment": "ID of the message" }, { "name": "from_id", "type": "int53", "comment": "ID of the sender of the message" }, { "name": "chat_id", "type": "int53", "comment": "ID of the chat where the message was sent" }, { "name": "message", "type": "string", "comment": "Message" }, { "name": "pts", "type": "int", "comment": "PTS" }, { "name": "pts_count", "type": "int", "comment": "PTS count" }, { "name": "date", "type": "int", "comment": "date" }, { "name": "fwd_from", "type": "MessageFwdHeader", "typeModifiers": { "predicate": "flags.2" }, "comment": "Info about a forwarded message" }, { "name": "via_bot_id", "type": "int53", "typeModifiers": { "predicate": "flags.11" }, "comment": "Info about the inline bot used to generate this message" }, { "name": "reply_to", "type": "MessageReplyHeader", "typeModifiers": { "predicate": "flags.3" }, "comment": "Reply (thread) information" }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.7", "isVector": true }, "comment": "Entities for styled text" }, { "name": "ttl_period", "type": "int", "typeModifiers": { "predicate": "flags.25" }, "comment": "Time To Live of the message, once updateShortChatMessage.date+updateShortChatMessage.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well." }] }, { "kind": "class", "name": "updateShort", "type": "Updates", "id": 2027216577, "comment": "Shortened constructor containing info on one update not requiring auxiliary data", "arguments": [{ "name": "update", "type": "Update", "comment": "Update" }, { "name": "date", "type": "int", "comment": "Date of event" }] }, { "kind": "class", "name": "updatesCombined", "type": "Updates", "id": 1918567619, "comment": "Constructor for a group of updates.", "arguments": [{ "name": "updates", "type": "Update", "typeModifiers": { "isVector": true }, "comment": "List of updates" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "List of users mentioned in updates" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "List of chats mentioned in updates" }, { "name": "date", "type": "int", "comment": "Current date" }, { "name": "seq_start", "type": "int", "comment": "Value seq for the earliest update in a group" }, { "name": "seq", "type": "int", "comment": "Value seq for the latest update in a group" }] }, { "kind": "class", "name": "updates", "type": "Updates", "id": 1957577280, "comment": "Full constructor of updates", "arguments": [{ "name": "updates", "type": "Update", "typeModifiers": { "isVector": true }, "comment": "List of updates" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "List of users mentioned in updates" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "List of chats mentioned in updates" }, { "name": "date", "type": "int", "comment": "Current date" }, { "name": "seq", "type": "int", "comment": "Total number of sent updates" }] }, { "kind": "class", "name": "updateShortSentMessage", "type": "Updates", "id": 2417352961, "comment": "Shortened constructor containing info on one outgoing message to a contact (the destination chat has to be extracted from the method call that returned this object).", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "out", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the message is outgoing" }, { "name": "id", "type": "int", "comment": "ID of the sent message" }, { "name": "pts", "type": "int", "comment": "PTS" }, { "name": "pts_count", "type": "int", "comment": "PTS count" }, { "name": "date", "type": "int", "comment": "date" }, { "name": "media", "type": "MessageMedia", "typeModifiers": { "predicate": "flags.9" }, "comment": "Attached media" }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.7", "isVector": true }, "comment": "Entities for styled text" }, { "name": "ttl_period", "type": "int", "typeModifiers": { "predicate": "flags.25" }, "comment": "Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well." }] }, { "kind": "class", "name": "photos.photos", "type": "photos.Photos", "id": 2378853029, "comment": "Full list of photos with auxiliary data.", "arguments": [{ "name": "photos", "type": "Photo", "typeModifiers": { "isVector": true }, "comment": "List of photos" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "List of mentioned users" }] }, { "kind": "class", "name": "photos.photosSlice", "type": "photos.Photos", "id": 352657236, "comment": "Incomplete list of photos with auxiliary data.", "arguments": [{ "name": "count", "type": "int", "comment": "Total number of photos" }, { "name": "photos", "type": "Photo", "typeModifiers": { "isVector": true }, "comment": "List of photos" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "List of mentioned users" }] }, { "kind": "class", "name": "photos.photo", "type": "photos.Photo", "id": 539045032, "comment": "Photo with auxiliary data.", "arguments": [{ "name": "photo", "type": "Photo", "comment": "Photo" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Users" }] }, { "kind": "class", "name": "upload.file", "type": "upload.File", "id": 157948117, "comment": "File content.", "arguments": [{ "name": "type", "type": "storage.FileType", "comment": "File type" }, { "name": "mtime", "type": "int", "comment": "Modification time" }, { "name": "bytes", "type": "bytes", "comment": "Binary data, file content" }] }, { "kind": "class", "name": "upload.fileCdnRedirect", "type": "upload.File", "id": 4052539972, "comment": "The file must be downloaded from a CDN DC.", "arguments": [{ "name": "dc_id", "type": "int", "comment": "CDN DC ID" }, { "name": "file_token", "type": "bytes", "comment": "File token (see CDN files)" }, { "name": "encryption_key", "type": "bytes", "comment": "Encryption key (see CDN files)" }, { "name": "encryption_iv", "type": "bytes", "comment": "Encryption IV (see CDN files)" }, { "name": "file_hashes", "type": "FileHash", "typeModifiers": { "isVector": true }, "comment": "File hashes (see CDN files)" }] }, { "kind": "class", "name": "dcOption", "type": "DcOption", "id": 414687501, "comment": "Data center", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "ipv6", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the specified IP is an IPv6 address" }, { "name": "media_only", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether this DC should only be used to download or upload files" }, { "name": "tcpo_only", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether this DC only supports connection with transport obfuscation" }, { "name": "cdn", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether this is a CDN DC." }, { "name": "static", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "If set, this IP should be used when connecting through a proxy" }, { "name": "this_port_only", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "If set, clients must connect using only the specified port, without trying any other port." }, { "name": "id", "type": "int", "comment": "DC ID" }, { "name": "ip_address", "type": "string", "comment": "IP address of DC" }, { "name": "port", "type": "int", "comment": "Port" }, { "name": "secret", "type": "bytes", "typeModifiers": { "predicate": "flags.10" }, "comment": "If the tcpo_only flag is set, specifies the secret to use when connecting using transport obfuscation" }] }, { "kind": "class", "name": "config", "type": "Config", "id": 3424265246, "comment": "Current configuration", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "default_p2p_contacts", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether the client should use P2P by default for phone calls with contacts" }, { "name": "preload_featured_stickers", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "Whether the client should preload featured stickers" }, { "name": "revoke_pm_inbox", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "Whether incoming private messages can be deleted for both participants" }, { "name": "blocked_mode", "type": "true", "typeModifiers": { "predicate": "flags.8" }, "comment": "Indicates that telegram is probably censored by governments/ISPs in the current region" }, { "name": "force_try_ipv6", "type": "true", "typeModifiers": { "predicate": "flags.14" }, "comment": "Whether to forcefully connect using IPv6 dcOptions, even if the client knows that IPv4 is available." }, { "name": "date", "type": "int", "comment": "Current date at the server" }, { "name": "expires", "type": "int", "comment": "Expiration date of this config: when it expires it'll have to be refetched using {@link help.RawGetConfigRequest}" }, { "name": "test_mode", "type": "Bool", "comment": "Whether we're connected to the test DCs" }, { "name": "this_dc", "type": "int", "comment": "ID of the DC that returned the reply" }, { "name": "dc_options", "type": "DcOption", "typeModifiers": { "isVector": true }, "comment": "DC IP list" }, { "name": "dc_txt_domain_name", "type": "string", "comment": "Domain name for fetching encrypted DC list from DNS TXT record" }, { "name": "chat_size_max", "type": "int", "comment": "Maximum member count for normal groups" }, { "name": "megagroup_size_max", "type": "int", "comment": "Maximum member count for supergroups" }, { "name": "forwarded_count_max", "type": "int", "comment": "Maximum number of messages that can be forwarded at once using {@link messages.RawForwardMessagesRequest}." }, { "name": "online_update_period_ms", "type": "int", "comment": "The client should {@link account.RawUpdateStatusRequest} every N milliseconds" }, { "name": "offline_blur_timeout_ms", "type": "int", "comment": "Delay before offline status needs to be sent to the server" }, { "name": "offline_idle_timeout_ms", "type": "int", "comment": "Time without any user activity after which it should be treated offline" }, { "name": "online_cloud_timeout_ms", "type": "int", "comment": "If we are offline, but were online from some other client in last online_cloud_timeout_ms milliseconds after we had gone offline, then delay offline notification for notify_cloud_delay_ms milliseconds." }, { "name": "notify_cloud_delay_ms", "type": "int", "comment": "If we are offline, but online from some other client then delay sending the offline notification for notify_cloud_delay_ms milliseconds." }, { "name": "notify_default_delay_ms", "type": "int", "comment": "If some other client is online, then delay notification for notification_default_delay_ms milliseconds" }, { "name": "push_chat_period_ms", "type": "int", "comment": "Not for client use" }, { "name": "push_chat_limit", "type": "int", "comment": "Not for client use" }, { "name": "edit_time_limit", "type": "int", "comment": "Only messages with age smaller than the one specified can be edited" }, { "name": "revoke_time_limit", "type": "int", "comment": "Only channel/supergroup messages with age smaller than the specified can be deleted" }, { "name": "revoke_pm_time_limit", "type": "int", "comment": "Only private messages with age smaller than the specified can be deleted" }, { "name": "rating_e_decay", "type": "int", "comment": "Exponential decay rate for computing top peer rating" }, { "name": "stickers_recent_limit", "type": "int", "comment": "Maximum number of recent stickers" }, { "name": "channels_read_media_period", "type": "int", "comment": "Indicates that round videos (video notes) and voice messages sent in channels and older than the specified period must be marked as read" }, { "name": "tmp_sessions", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Temporary passport sessions" }, { "name": "call_receive_timeout_ms", "type": "int", "comment": "Maximum allowed outgoing ring time in VoIP calls: if the user we're calling doesn't reply within the specified time (in milliseconds), we should hang up the call" }, { "name": "call_ring_timeout_ms", "type": "int", "comment": "Maximum allowed incoming ring time in VoIP calls: if the current user doesn't reply within the specified time (in milliseconds), the call will be automatically refused" }, { "name": "call_connect_timeout_ms", "type": "int", "comment": "VoIP connection timeout: if the instance of libtgvoip on the other side of the call doesn't connect to our instance of libtgvoip within the specified time (in milliseconds), the call must be aborted" }, { "name": "call_packet_timeout_ms", "type": "int", "comment": "If during a VoIP call a packet isn't received for the specified period of time, the call must be aborted" }, { "name": "me_url_prefix", "type": "string", "comment": "The domain to use to parse deep links »." }, { "name": "autoupdate_url_prefix", "type": "string", "typeModifiers": { "predicate": "flags.7" }, "comment": "URL to use to auto-update the current app" }, { "name": "gif_search_username", "type": "string", "typeModifiers": { "predicate": "flags.9" }, "comment": "Username of the bot to use to search for GIFs" }, { "name": "venue_search_username", "type": "string", "typeModifiers": { "predicate": "flags.10" }, "comment": "Username of the bot to use to search for venues" }, { "name": "img_search_username", "type": "string", "typeModifiers": { "predicate": "flags.11" }, "comment": "Username of the bot to use for image search" }, { "name": "static_maps_provider", "type": "string", "typeModifiers": { "predicate": "flags.12" }, "comment": "ID of the map provider to use for venues" }, { "name": "caption_length_max", "type": "int", "comment": "Maximum length of caption (length in utf8 codepoints)" }, { "name": "message_length_max", "type": "int", "comment": "Maximum length of messages (length in utf8 codepoints)" }, { "name": "webfile_dc_id", "type": "int", "comment": "DC ID to use to download webfiles" }, { "name": "suggested_lang_code", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "Suggested language code" }, { "name": "lang_pack_version", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "Language pack version" }, { "name": "base_lang_pack_version", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "Basic language pack version" }, { "name": "reactions_default", "type": "Reaction", "typeModifiers": { "predicate": "flags.15" }, "comment": "Default message reaction" }, { "name": "autologin_token", "type": "string", "typeModifiers": { "predicate": "flags.16" }, "comment": "Autologin token, click here for more info on URL authorization »." }] }, { "kind": "class", "name": "nearestDc", "type": "NearestDc", "id": 2384074613, "comment": "Nearest data center, according to geo-ip.", "arguments": [{ "name": "country", "type": "string", "comment": "Country code determined by geo-ip" }, { "name": "this_dc", "type": "int", "comment": "Number of current data center" }, { "name": "nearest_dc", "type": "int", "comment": "Number of nearest data center" }] }, { "kind": "class", "name": "help.appUpdate", "type": "help.AppUpdate", "id": 3434860080, "comment": "An update is available for the application.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "can_not_skip", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Unskippable, the new info must be shown to the user (with a popup or something else)" }, { "name": "id", "type": "int", "comment": "Update ID" }, { "name": "version", "type": "string", "comment": "New version name" }, { "name": "text", "type": "string", "comment": "Text description of the update" }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "isVector": true }, "comment": "Message entities for styled text" }, { "name": "document", "type": "Document", "typeModifiers": { "predicate": "flags.1" }, "comment": "Application binary" }, { "name": "url", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "Application download URL" }, { "name": "sticker", "type": "Document", "typeModifiers": { "predicate": "flags.3" }, "comment": "Associated sticker" }] }, { "kind": "class", "name": "help.noAppUpdate", "type": "help.AppUpdate", "id": 3294258486, "comment": "No updates are available for the application.", "arguments": [] }, { "kind": "class", "name": "help.inviteText", "type": "help.InviteText", "id": 415997816, "comment": "Text of a text message with an invitation to install Telegram.", "arguments": [{ "name": "message", "type": "string", "comment": "Text of the message" }] }, { "kind": "class", "name": "encryptedChatEmpty", "type": "EncryptedChat", "id": 2877210784, "comment": "Empty constructor.", "arguments": [{ "name": "id", "type": "int", "comment": "Chat ID" }] }, { "kind": "class", "name": "encryptedChatWaiting", "type": "EncryptedChat", "id": 1722964307, "comment": "Chat waiting for approval of second participant.", "arguments": [{ "name": "id", "type": "int", "comment": "Chat ID" }, { "name": "access_hash", "type": "long", "comment": "Checking sum depending on user ID" }, { "name": "date", "type": "int", "comment": "Date of chat creation" }, { "name": "admin_id", "type": "int53", "comment": "Chat creator ID" }, { "name": "participant_id", "type": "int53", "comment": "ID of second chat participant" }] }, { "kind": "class", "name": "encryptedChatRequested", "type": "EncryptedChat", "id": 1223809356, "comment": "Request to create an encrypted chat.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "folder_id", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Peer folder ID, for more info click here" }, { "name": "id", "type": "int", "comment": "Chat ID" }, { "name": "access_hash", "type": "long", "comment": "Check sum depending on user ID" }, { "name": "date", "type": "int", "comment": "Chat creation date" }, { "name": "admin_id", "type": "int53", "comment": "Chat creator ID" }, { "name": "participant_id", "type": "int53", "comment": "ID of second chat participant" }, { "name": "g_a", "type": "bytes", "comment": "A = g ^ a mod p, see Wikipedia" }] }, { "kind": "class", "name": "encryptedChat", "type": "EncryptedChat", "id": 1643173063, "comment": "Encrypted chat", "arguments": [{ "name": "id", "type": "int", "comment": "Chat ID" }, { "name": "access_hash", "type": "long", "comment": "Check sum dependent on the user ID" }, { "name": "date", "type": "int", "comment": "Date chat was created" }, { "name": "admin_id", "type": "int53", "comment": "Chat creator ID" }, { "name": "participant_id", "type": "int53", "comment": "ID of the second chat participant" }, { "name": "g_a_or_b", "type": "bytes", "comment": "B = g ^ b mod p, if the currently authorized user is the chat's creator,
or A = g ^ a mod p otherwise
See Wikipedia for more info" }, { "name": "key_fingerprint", "type": "long", "comment": "64-bit fingerprint of received key" }] }, { "kind": "class", "name": "encryptedChatDiscarded", "type": "EncryptedChat", "id": 505183301, "comment": "Discarded or deleted chat.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "history_deleted", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether both users of this secret chat should also remove all of its messages" }, { "name": "id", "type": "int", "comment": "Chat ID" }] }, { "kind": "class", "name": "inputEncryptedChat", "type": "InputEncryptedChat", "id": 4047615457, "comment": "Creates an encrypted chat.", "arguments": [{ "name": "chat_id", "type": "int", "comment": "Chat ID" }, { "name": "access_hash", "type": "long", "comment": "Checking sum from constructor {@link RawEncryptedChat}, {@link RawEncryptedChatWaiting} or {@link RawEncryptedChatRequested}" }] }, { "kind": "class", "name": "encryptedFileEmpty", "type": "EncryptedFile", "id": 3256830334, "comment": "Empty constructor, non-existing file.", "arguments": [] }, { "kind": "class", "name": "encryptedFile", "type": "EncryptedFile", "id": 2818608344, "comment": "Encrypted file.", "arguments": [{ "name": "id", "type": "long", "comment": "File ID" }, { "name": "access_hash", "type": "long", "comment": "Checking sum depending on user ID" }, { "name": "size", "type": "int53", "comment": "File size in bytes" }, { "name": "dc_id", "type": "int", "comment": "Number of data center" }, { "name": "key_fingerprint", "type": "int", "comment": "32-bit fingerprint of key used for file encryption" }] }, { "kind": "class", "name": "inputEncryptedFileEmpty", "type": "InputEncryptedFile", "id": 406307684, "comment": "Empty constructor.", "arguments": [] }, { "kind": "class", "name": "inputEncryptedFileUploaded", "type": "InputEncryptedFile", "id": 1690108678, "comment": "Sets new encrypted file saved by parts using upload.saveFilePart method.", "arguments": [{ "name": "id", "type": "long", "comment": "Random file ID created by client" }, { "name": "parts", "type": "int", "comment": "Number of saved parts" }, { "name": "md5_checksum", "type": "string", "comment": "In case md5-HASH of the (already encrypted) file was transmitted, file content will be checked prior to use" }, { "name": "key_fingerprint", "type": "int", "comment": "32-bit fingerprint of the key used to encrypt a file" }] }, { "kind": "class", "name": "inputEncryptedFile", "type": "InputEncryptedFile", "id": 1511503333, "comment": "Sets forwarded encrypted file for attachment.", "arguments": [{ "name": "id", "type": "long", "comment": "File ID, value of id parameter from {@link RawEncryptedFile}" }, { "name": "access_hash", "type": "long", "comment": "Checking sum, value of access_hash parameter from {@link RawEncryptedFile}" }] }, { "kind": "class", "name": "inputEncryptedFileBigUploaded", "type": "InputEncryptedFile", "id": 767652808, "comment": "Assigns a new big encrypted file (over 10 MB in size), saved in parts using the method {@link upload.RawSaveBigFilePartRequest}.", "arguments": [{ "name": "id", "type": "long", "comment": "Random file id, created by the client" }, { "name": "parts", "type": "int", "comment": "Number of saved parts" }, { "name": "key_fingerprint", "type": "int", "comment": "32-bit imprint of the key used to encrypt the file" }] }, { "kind": "class", "name": "encryptedMessage", "type": "EncryptedMessage", "id": 3977822488, "comment": "Encrypted message.", "arguments": [{ "name": "random_id", "type": "long", "comment": "Random message ID, assigned by the author of message" }, { "name": "chat_id", "type": "int", "comment": "ID of encrypted chat" }, { "name": "date", "type": "int", "comment": "Date of sending" }, { "name": "bytes", "type": "bytes", "comment": "TL-serialization of DecryptedMessage type, encrypted with the key created at chat initialization" }, { "name": "file", "type": "EncryptedFile", "comment": "Attached encrypted file" }] }, { "kind": "class", "name": "encryptedMessageService", "type": "EncryptedMessage", "id": 594758406, "comment": "Encrypted service message", "arguments": [{ "name": "random_id", "type": "long", "comment": "Random message ID, assigned by the author of message" }, { "name": "chat_id", "type": "int", "comment": "ID of encrypted chat" }, { "name": "date", "type": "int", "comment": "Date of sending" }, { "name": "bytes", "type": "bytes", "comment": "TL-serialization of the DecryptedMessage type, encrypted with the key created at chat initialization" }] }, { "kind": "class", "name": "messages.dhConfigNotModified", "type": "messages.DhConfig", "id": 3236054581, "comment": "Configuring parameters did not change.", "arguments": [{ "name": "random", "type": "bytes", "comment": "Random sequence of bytes of assigned length" }] }, { "kind": "class", "name": "messages.dhConfig", "type": "messages.DhConfig", "id": 740433629, "comment": "New set of configuring parameters.", "arguments": [{ "name": "g", "type": "int", "comment": "New value prime, see Wikipedia" }, { "name": "p", "type": "bytes", "comment": "New value primitive root, see Wikipedia" }, { "name": "version", "type": "int", "comment": "Version of set of parameters" }, { "name": "random", "type": "bytes", "comment": "Random sequence of bytes of assigned length" }] }, { "kind": "class", "name": "messages.sentEncryptedMessage", "type": "messages.SentEncryptedMessage", "id": 1443858741, "comment": "Message without file attachments sent to an encrypted file.", "arguments": [{ "name": "date", "type": "int", "comment": "Date of sending" }] }, { "kind": "class", "name": "messages.sentEncryptedFile", "type": "messages.SentEncryptedMessage", "id": 2492727090, "comment": "Message with a file enclosure sent to a protected chat", "arguments": [{ "name": "date", "type": "int", "comment": "Sending date" }, { "name": "file", "type": "EncryptedFile", "comment": "Attached file" }] }, { "kind": "class", "name": "inputDocumentEmpty", "type": "InputDocument", "id": 1928391342, "comment": "Empty constructor.", "arguments": [] }, { "kind": "class", "name": "inputDocument", "type": "InputDocument", "id": 448771445, "comment": "Defines a document for subsequent interaction.", "arguments": [{ "name": "id", "type": "long", "comment": "Document ID" }, { "name": "access_hash", "type": "long", "comment": "access_hash parameter from the {@link RawDocument} constructor" }, { "name": "file_reference", "type": "bytes", "comment": "File reference" }] }, { "kind": "class", "name": "documentEmpty", "type": "Document", "id": 922273905, "comment": "Empty constructor, document doesn't exist.", "arguments": [{ "name": "id", "type": "long", "comment": "Document ID or 0" }] }, { "kind": "class", "name": "document", "type": "Document", "id": 2413085912, "comment": "Document", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "id", "type": "long", "comment": "Document ID" }, { "name": "access_hash", "type": "long", "comment": "Check sum, dependent on document ID" }, { "name": "file_reference", "type": "bytes", "comment": "File reference" }, { "name": "date", "type": "int", "comment": "Creation date" }, { "name": "mime_type", "type": "string", "comment": "MIME type" }, { "name": "size", "type": "int53", "comment": "Size" }, { "name": "thumbs", "type": "PhotoSize", "typeModifiers": { "predicate": "flags.0", "isVector": true }, "comment": "Thumbnails" }, { "name": "video_thumbs", "type": "VideoSize", "typeModifiers": { "predicate": "flags.1", "isVector": true }, "comment": "Video thumbnails" }, { "name": "dc_id", "type": "int", "comment": "DC ID" }, { "name": "attributes", "type": "DocumentAttribute", "typeModifiers": { "isVector": true }, "comment": "Attributes" }] }, { "kind": "class", "name": "help.support", "type": "help.Support", "id": 398898678, "comment": "Info on support user.", "arguments": [{ "name": "phone_number", "type": "string", "comment": "Phone number" }, { "name": "user", "type": "User", "comment": "User" }] }, { "kind": "class", "name": "notifyPeer", "type": "NotifyPeer", "id": 2681474008, "comment": "Notifications generated by a certain user or group.", "arguments": [{ "name": "peer", "type": "Peer", "comment": "user or group" }] }, { "kind": "class", "name": "notifyUsers", "type": "NotifyPeer", "id": 3033021260, "comment": "Notifications generated by all users.", "arguments": [] }, { "kind": "class", "name": "notifyChats", "type": "NotifyPeer", "id": 3221737155, "comment": "Notifications generated by all groups.", "arguments": [] }, { "kind": "class", "name": "notifyBroadcasts", "type": "NotifyPeer", "id": 3591563503, "comment": "Channel notification settings", "arguments": [] }, { "kind": "class", "name": "notifyForumTopic", "type": "NotifyPeer", "id": 577659656, "comment": "Notifications generated by a topic in a forum.", "arguments": [{ "name": "peer", "type": "Peer", "comment": "Forum ID" }, { "name": "top_msg_id", "type": "int", "comment": "Topic ID" }] }, { "kind": "class", "name": "sendMessageTypingAction", "type": "SendMessageAction", "id": 381645902, "comment": "User is typing.", "arguments": [] }, { "kind": "class", "name": "sendMessageCancelAction", "type": "SendMessageAction", "id": 4250847477, "comment": "Invalidate all previous action updates. E.g. when user deletes entered text or aborts a video upload.", "arguments": [] }, { "kind": "class", "name": "sendMessageRecordVideoAction", "type": "SendMessageAction", "id": 2710034031, "comment": "User is recording a video.", "arguments": [] }, { "kind": "class", "name": "sendMessageUploadVideoAction", "type": "SendMessageAction", "id": 3916839660, "comment": "User is uploading a video.", "arguments": [{ "name": "progress", "type": "int", "comment": "Progress percentage" }] }, { "kind": "class", "name": "sendMessageRecordAudioAction", "type": "SendMessageAction", "id": 3576656887, "comment": "User is recording a voice message.", "arguments": [] }, { "kind": "class", "name": "sendMessageUploadAudioAction", "type": "SendMessageAction", "id": 4082227115, "comment": "User is uploading a voice message.", "arguments": [{ "name": "progress", "type": "int", "comment": "Progress percentage" }] }, { "kind": "class", "name": "sendMessageUploadPhotoAction", "type": "SendMessageAction", "id": 3520285222, "comment": "User is uploading a photo.", "arguments": [{ "name": "progress", "type": "int", "comment": "Progress percentage" }] }, { "kind": "class", "name": "sendMessageUploadDocumentAction", "type": "SendMessageAction", "id": 2852968932, "comment": "User is uploading a file.", "arguments": [{ "name": "progress", "type": "int", "comment": "Progress percentage" }] }, { "kind": "class", "name": "sendMessageGeoLocationAction", "type": "SendMessageAction", "id": 393186209, "comment": "User is selecting a location to share.", "arguments": [] }, { "kind": "class", "name": "sendMessageChooseContactAction", "type": "SendMessageAction", "id": 1653390447, "comment": "User is selecting a contact to share.", "arguments": [] }, { "kind": "class", "name": "sendMessageGamePlayAction", "type": "SendMessageAction", "id": 3714748232, "comment": "User is playing a game", "arguments": [] }, { "kind": "class", "name": "sendMessageRecordRoundAction", "type": "SendMessageAction", "id": 2297593788, "comment": "User is recording a round video to share", "arguments": [] }, { "kind": "class", "name": "sendMessageUploadRoundAction", "type": "SendMessageAction", "id": 608050278, "comment": "User is uploading a round video", "arguments": [{ "name": "progress", "type": "int", "comment": "Progress percentage" }] }, { "kind": "class", "name": "speakingInGroupCallAction", "type": "SendMessageAction", "id": 3643548293, "comment": "User is currently speaking in the group call", "arguments": [] }, { "kind": "class", "name": "sendMessageHistoryImportAction", "type": "SendMessageAction", "id": 3688534598, "comment": "Chat history is being imported", "arguments": [{ "name": "progress", "type": "int", "comment": "Progress percentage" }] }, { "kind": "class", "name": "sendMessageChooseStickerAction", "type": "SendMessageAction", "id": 2958739121, "comment": "User is choosing a sticker", "arguments": [] }, { "kind": "class", "name": "sendMessageEmojiInteraction", "type": "SendMessageAction", "id": 630664139, "comment": "User has clicked on an animated emoji triggering a reaction, click here for more info ».", "arguments": [{ "name": "emoticon", "type": "string", "comment": "Emoji" }, { "name": "msg_id", "type": "int", "comment": "Message ID of the animated emoji that was clicked" }, { "name": "interaction", "type": "DataJSON", "comment": "A JSON object with interaction info, click here for more info »" }] }, { "kind": "class", "name": "sendMessageEmojiInteractionSeen", "type": "SendMessageAction", "id": 3060109358, "comment": "User is watching an animated emoji reaction triggered by another user, click here for more info ».", "arguments": [{ "name": "emoticon", "type": "string", "comment": "Emoji" }] }, { "kind": "class", "name": "contacts.found", "type": "contacts.Found", "id": 3004386717, "comment": "Users found by name substring and auxiliary data.", "arguments": [{ "name": "my_results", "type": "Peer", "typeModifiers": { "isVector": true }, "comment": "Personalized results" }, { "name": "results", "type": "Peer", "typeModifiers": { "isVector": true }, "comment": "List of found user identifiers" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Found chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "List of users" }] }, { "kind": "class", "name": "inputPrivacyKeyStatusTimestamp", "type": "InputPrivacyKey", "id": 1335282456, "comment": "Whether people will be able to see our exact last online timestamp.\n\nNote that if we decide to hide our exact last online timestamp to someone (i.e., users A, B, C, or all users) and we do not have a Premium subscription, we won't be able to see the exact last online timestamp of those users (A, B, C, or all users), even if those users do share it with us.\n\nIf those users do share their exact online status with us, but we can't see it due to the reason mentioned above, the by_me flag of {@link RawUserStatusRecently}, {@link RawUserStatusLastWeek}, {@link RawUserStatusLastMonth} will be set.", "arguments": [] }, { "kind": "class", "name": "inputPrivacyKeyChatInvite", "type": "InputPrivacyKey", "id": 3187344422, "comment": "Whether people will be able to invite you to chats", "arguments": [] }, { "kind": "class", "name": "inputPrivacyKeyPhoneCall", "type": "InputPrivacyKey", "id": 4206550111, "comment": "Whether you will accept phone calls", "arguments": [] }, { "kind": "class", "name": "inputPrivacyKeyPhoneP2P", "type": "InputPrivacyKey", "id": 3684593874, "comment": "Whether to allow P2P communication during VoIP calls", "arguments": [] }, { "kind": "class", "name": "inputPrivacyKeyForwards", "type": "InputPrivacyKey", "id": 2765966344, "comment": "Whether messages forwarded from you will be anonymous", "arguments": [] }, { "kind": "class", "name": "inputPrivacyKeyProfilePhoto", "type": "InputPrivacyKey", "id": 1461304012, "comment": "Whether people will be able to see your profile picture", "arguments": [] }, { "kind": "class", "name": "inputPrivacyKeyPhoneNumber", "type": "InputPrivacyKey", "id": 55761658, "comment": "Whether people will be able to see your phone number", "arguments": [] }, { "kind": "class", "name": "inputPrivacyKeyAddedByPhone", "type": "InputPrivacyKey", "id": 3508640733, "comment": "Whether people can add you to their contact list by your phone number", "arguments": [] }, { "kind": "class", "name": "inputPrivacyKeyVoiceMessages", "type": "InputPrivacyKey", "id": 2934349160, "comment": "Whether people can send you voice messages or round videos (Premium users only).", "arguments": [] }, { "kind": "class", "name": "inputPrivacyKeyAbout", "type": "InputPrivacyKey", "id": 941870144, "comment": "Whether people can see your bio", "arguments": [] }, { "kind": "class", "name": "inputPrivacyKeyBirthday", "type": "InputPrivacyKey", "id": 3596227020, "comment": "Whether the user can see our birthday.", "arguments": [] }, { "kind": "class", "name": "privacyKeyStatusTimestamp", "type": "PrivacyKey", "id": 3157175088, "comment": "Whether we can see the last online timestamp of this user.\n\nNote that if we decide to hide our exact last online timestamp to someone (i.e., users A, B, C, or all users) and we do not have a Premium subscription, we won't be able to see the exact last online timestamp of those users (A, B, C, or all users), even if those users do share it with us.\n\nIf those users do share their exact online status with us, but we can't see it due to the reason mentioned above, the by_me flag of {@link RawUserStatusRecently}, {@link RawUserStatusLastWeek}, {@link RawUserStatusLastMonth} will be set.", "arguments": [] }, { "kind": "class", "name": "privacyKeyChatInvite", "type": "PrivacyKey", "id": 1343122938, "comment": "Whether the user can be invited to chats", "arguments": [] }, { "kind": "class", "name": "privacyKeyPhoneCall", "type": "PrivacyKey", "id": 1030105979, "comment": "Whether the user accepts phone calls", "arguments": [] }, { "kind": "class", "name": "privacyKeyPhoneP2P", "type": "PrivacyKey", "id": 961092808, "comment": "Whether P2P connections in phone calls with this user are allowed", "arguments": [] }, { "kind": "class", "name": "privacyKeyForwards", "type": "PrivacyKey", "id": 1777096355, "comment": "Whether messages forwarded from the user will be anonymously forwarded", "arguments": [] }, { "kind": "class", "name": "privacyKeyProfilePhoto", "type": "PrivacyKey", "id": 2517966829, "comment": "Whether the profile picture of the user is visible", "arguments": [] }, { "kind": "class", "name": "privacyKeyPhoneNumber", "type": "PrivacyKey", "id": 3516589165, "comment": "Whether the user allows us to see their phone number", "arguments": [] }, { "kind": "class", "name": "privacyKeyAddedByPhone", "type": "PrivacyKey", "id": 1124062251, "comment": "Whether this user can be added to our contact list by their phone number", "arguments": [] }, { "kind": "class", "name": "privacyKeyVoiceMessages", "type": "PrivacyKey", "id": 110621716, "comment": "Whether the user accepts voice messages", "arguments": [] }, { "kind": "class", "name": "privacyKeyAbout", "type": "PrivacyKey", "id": 2760292193, "comment": "Whether people can see your bio", "arguments": [] }, { "kind": "class", "name": "privacyKeyBirthday", "type": "PrivacyKey", "id": 536913176, "comment": "Whether the user can see our birthday.", "arguments": [] }, { "kind": "class", "name": "inputPrivacyValueAllowContacts", "type": "InputPrivacyRule", "id": 218751099, "comment": "Allow only contacts", "arguments": [] }, { "kind": "class", "name": "inputPrivacyValueAllowAll", "type": "InputPrivacyRule", "id": 407582158, "comment": "Allow all users", "arguments": [] }, { "kind": "class", "name": "inputPrivacyValueAllowUsers", "type": "InputPrivacyRule", "id": 320652927, "comment": "Allow only certain users", "arguments": [{ "name": "users", "type": "InputUser", "typeModifiers": { "isVector": true }, "comment": "Allowed users" }] }, { "kind": "class", "name": "inputPrivacyValueDisallowContacts", "type": "InputPrivacyRule", "id": 195371015, "comment": "Disallow only contacts", "arguments": [] }, { "kind": "class", "name": "inputPrivacyValueDisallowAll", "type": "InputPrivacyRule", "id": 3597362889, "comment": "Disallow all", "arguments": [] }, { "kind": "class", "name": "inputPrivacyValueDisallowUsers", "type": "InputPrivacyRule", "id": 2417034343, "comment": "Disallow only certain users", "arguments": [{ "name": "users", "type": "InputUser", "typeModifiers": { "isVector": true }, "comment": "Users to disallow" }] }, { "kind": "class", "name": "inputPrivacyValueAllowChatParticipants", "type": "InputPrivacyRule", "id": 2215004623, "comment": "Allow only participants of certain chats", "arguments": [{ "name": "chats", "type": "int53", "typeModifiers": { "isVector": true }, "comment": "Allowed chat IDs" }] }, { "kind": "class", "name": "inputPrivacyValueDisallowChatParticipants", "type": "InputPrivacyRule", "id": 3914272646, "comment": "Disallow only participants of certain chats", "arguments": [{ "name": "chats", "type": "int53", "typeModifiers": { "isVector": true }, "comment": "Disallowed chat IDs" }] }, { "kind": "class", "name": "inputPrivacyValueAllowCloseFriends", "type": "InputPrivacyRule", "id": 793067081, "comment": "Allow only close friends »", "arguments": [] }, { "kind": "class", "name": "inputPrivacyValueAllowPremium", "type": "InputPrivacyRule", "id": 2009975281, "comment": "Allow only users with a Premium subscription », currently only usable for {@link RawInputPrivacyKeyChatInvite}.", "arguments": [] }, { "kind": "class", "name": "privacyValueAllowContacts", "type": "PrivacyRule", "id": 4294843308, "comment": "Allow all contacts", "arguments": [] }, { "kind": "class", "name": "privacyValueAllowAll", "type": "PrivacyRule", "id": 1698855810, "comment": "Allow all users", "arguments": [] }, { "kind": "class", "name": "privacyValueAllowUsers", "type": "PrivacyRule", "id": 3096469426, "comment": "Allow only certain users", "arguments": [{ "name": "users", "type": "int53", "typeModifiers": { "isVector": true }, "comment": "Allowed users" }] }, { "kind": "class", "name": "privacyValueDisallowContacts", "type": "PrivacyRule", "id": 4169726490, "comment": "Disallow only contacts", "arguments": [] }, { "kind": "class", "name": "privacyValueDisallowAll", "type": "PrivacyRule", "id": 2339628899, "comment": "Disallow all users", "arguments": [] }, { "kind": "class", "name": "privacyValueDisallowUsers", "type": "PrivacyRule", "id": 3831632193, "comment": "Disallow only certain users", "arguments": [{ "name": "users", "type": "int53", "typeModifiers": { "isVector": true }, "comment": "Disallowed users" }] }, { "kind": "class", "name": "privacyValueAllowChatParticipants", "type": "PrivacyRule", "id": 1796427406, "comment": "Allow all participants of certain chats", "arguments": [{ "name": "chats", "type": "int53", "typeModifiers": { "isVector": true }, "comment": "Allowed chats" }] }, { "kind": "class", "name": "privacyValueDisallowChatParticipants", "type": "PrivacyRule", "id": 1103656293, "comment": "Disallow only participants of certain chats", "arguments": [{ "name": "chats", "type": "int53", "typeModifiers": { "isVector": true }, "comment": "Disallowed chats" }] }, { "kind": "class", "name": "privacyValueAllowCloseFriends", "type": "PrivacyRule", "id": 4159232155, "comment": "Allow only close friends »", "arguments": [] }, { "kind": "class", "name": "privacyValueAllowPremium", "type": "PrivacyRule", "id": 3974725963, "comment": "Allow only users with a Premium subscription », currently only usable for {@link RawInputPrivacyKeyChatInvite}.", "arguments": [] }, { "kind": "class", "name": "account.privacyRules", "type": "account.PrivacyRules", "id": 1352683077, "comment": "Privacy rules", "arguments": [{ "name": "rules", "type": "PrivacyRule", "typeModifiers": { "isVector": true }, "comment": "Privacy rules" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Chats to which the rules apply" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Users to which the rules apply" }] }, { "kind": "class", "name": "accountDaysTTL", "type": "AccountDaysTTL", "id": 3100684255, "comment": "Time to live in days of the current account", "arguments": [{ "name": "days", "type": "int", "comment": "This account will self-destruct in the specified number of days" }] }, { "kind": "class", "name": "documentAttributeImageSize", "type": "DocumentAttribute", "id": 1815593308, "comment": "Defines the width and height of an image uploaded as document", "arguments": [{ "name": "w", "type": "int", "comment": "Width of image" }, { "name": "h", "type": "int", "comment": "Height of image" }] }, { "kind": "class", "name": "documentAttributeAnimated", "type": "DocumentAttribute", "id": 297109817, "comment": "Defines an animated GIF", "arguments": [] }, { "kind": "class", "name": "documentAttributeSticker", "type": "DocumentAttribute", "id": 1662637586, "comment": "Defines a sticker", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "mask", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether this is a mask sticker" }, { "name": "alt", "type": "string", "comment": "Alternative emoji representation of sticker" }, { "name": "stickerset", "type": "InputStickerSet", "comment": "Associated stickerset" }, { "name": "mask_coords", "type": "MaskCoords", "typeModifiers": { "predicate": "flags.0" }, "comment": "Mask coordinates (if this is a mask sticker, attached to a photo)" }] }, { "kind": "class", "name": "documentAttributeVideo", "type": "DocumentAttribute", "id": 389652397, "comment": "Defines a video", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "round_message", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether this is a round video" }, { "name": "supports_streaming", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the video supports streaming" }, { "name": "nosound", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether the specified document is a video file with no audio tracks (a GIF animation (even as MPEG4), for example)" }, { "name": "duration", "type": "double", "comment": "Duration in seconds" }, { "name": "w", "type": "int", "comment": "Video width" }, { "name": "h", "type": "int", "comment": "Video height" }, { "name": "preload_prefix_size", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "Number of bytes to preload when preloading videos (particularly video stories)." }, { "name": "video_start_ts", "type": "double", "typeModifiers": { "predicate": "flags.4" }, "comment": "Floating point UNIX timestamp in seconds, indicating the frame of the video that should be used as static preview and thumbnail." }] }, { "kind": "class", "name": "documentAttributeAudio", "type": "DocumentAttribute", "id": 2555574726, "comment": "Represents an audio file", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "voice", "type": "true", "typeModifiers": { "predicate": "flags.10" }, "comment": "Whether this is a voice message" }, { "name": "duration", "type": "int", "comment": "Duration in seconds" }, { "name": "title", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Name of song" }, { "name": "performer", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Performer" }, { "name": "waveform", "type": "bytes", "typeModifiers": { "predicate": "flags.2" }, "comment": "Waveform: consists in a series of bitpacked 5-bit values.
Example implementation: android." }] }, { "kind": "class", "name": "documentAttributeFilename", "type": "DocumentAttribute", "id": 358154344, "comment": "A simple document with a file name", "arguments": [{ "name": "file_name", "type": "string", "comment": "The file name" }] }, { "kind": "class", "name": "documentAttributeHasStickers", "type": "DocumentAttribute", "id": 2550256375, "comment": "Whether the current document has stickers attached", "arguments": [] }, { "kind": "class", "name": "documentAttributeCustomEmoji", "type": "DocumentAttribute", "id": 4245985433, "comment": "Info about a custom emoji", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "free", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether this custom emoji can be sent by non-Premium users" }, { "name": "text_color", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the color of this TGS custom emoji should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context." }, { "name": "alt", "type": "string", "comment": "The actual emoji" }, { "name": "stickerset", "type": "InputStickerSet", "comment": "The emoji stickerset to which this emoji belongs." }] }, { "kind": "class", "name": "messages.stickersNotModified", "type": "messages.Stickers", "id": 4050950690, "comment": "No new stickers were found for the given query", "arguments": [] }, { "kind": "class", "name": "messages.stickers", "type": "messages.Stickers", "id": 816245886, "comment": "Found stickers", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here" }, { "name": "stickers", "type": "Document", "typeModifiers": { "isVector": true }, "comment": "Stickers" }] }, { "kind": "class", "name": "stickerPack", "type": "StickerPack", "id": 313694676, "comment": "A stickerpack is a group of stickers associated to the same emoji.
\nIt is not a sticker pack the way it is usually intended, you may be looking for a StickerSet.", "arguments": [{ "name": "emoticon", "type": "string", "comment": "Emoji" }, { "name": "documents", "type": "long", "typeModifiers": { "isVector": true }, "comment": "Stickers" }] }, { "kind": "class", "name": "messages.allStickersNotModified", "type": "messages.AllStickers", "id": 3898999491, "comment": "Info about all installed stickers hasn't changed", "arguments": [] }, { "kind": "class", "name": "messages.allStickers", "type": "messages.AllStickers", "id": 3451637435, "comment": "Info about all installed stickers", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here" }, { "name": "sets", "type": "StickerSet", "typeModifiers": { "isVector": true }, "comment": "All stickersets" }] }, { "kind": "class", "name": "messages.affectedMessages", "type": "messages.AffectedMessages", "id": 2228326789, "comment": "Events affected by operation", "arguments": [{ "name": "pts", "type": "int", "comment": "Event count after generation" }, { "name": "pts_count", "type": "int", "comment": "Number of events that were generated" }] }, { "kind": "class", "name": "webPageEmpty", "type": "WebPage", "id": 555358088, "comment": "No preview is available for the webpage", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "id", "type": "long", "comment": "Preview ID" }, { "name": "url", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "URL of the webpage." }] }, { "kind": "class", "name": "webPagePending", "type": "WebPage", "id": 2966502983, "comment": "A preview of the webpage is currently being generated", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "id", "type": "long", "comment": "ID of preview" }, { "name": "url", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "URL of the webpage" }, { "name": "date", "type": "int", "comment": "When was the processing started" }] }, { "kind": "class", "name": "webPage", "type": "WebPage", "id": 3902555570, "comment": "Webpage preview", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "has_large_media", "type": "true", "typeModifiers": { "predicate": "flags.13" }, "comment": "Whether the size of the media in the preview can be changed." }, { "name": "id", "type": "long", "comment": "Preview ID" }, { "name": "url", "type": "string", "comment": "URL of previewed webpage" }, { "name": "display_url", "type": "string", "comment": "Webpage URL to be displayed to the user" }, { "name": "hash", "type": "int", "comment": "Hash used for caching, for more info click here" }, { "name": "type", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else, see here » for a full list." }, { "name": "site_name", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Short name of the site (e.g., Google Docs, App Store)" }, { "name": "title", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "Title of the content" }, { "name": "description", "type": "string", "typeModifiers": { "predicate": "flags.3" }, "comment": "Content description" }, { "name": "photo", "type": "Photo", "typeModifiers": { "predicate": "flags.4" }, "comment": "Image representing the content" }, { "name": "embed_url", "type": "string", "typeModifiers": { "predicate": "flags.5" }, "comment": "URL to show in the embedded preview" }, { "name": "embed_type", "type": "string", "typeModifiers": { "predicate": "flags.5" }, "comment": "MIME type of the embedded preview, (e.g., text/html or video/mp4)" }, { "name": "embed_width", "type": "int", "typeModifiers": { "predicate": "flags.6" }, "comment": "Width of the embedded preview" }, { "name": "embed_height", "type": "int", "typeModifiers": { "predicate": "flags.6" }, "comment": "Height of the embedded preview" }, { "name": "duration", "type": "int", "typeModifiers": { "predicate": "flags.7" }, "comment": "Duration of the content, in seconds" }, { "name": "author", "type": "string", "typeModifiers": { "predicate": "flags.8" }, "comment": "Author of the content" }, { "name": "document", "type": "Document", "typeModifiers": { "predicate": "flags.9" }, "comment": "Preview of the content as a media file" }, { "name": "cached_page", "type": "Page", "typeModifiers": { "predicate": "flags.10" }, "comment": "Page contents in instant view format" }, { "name": "attributes", "type": "WebPageAttribute", "typeModifiers": { "predicate": "flags.12", "isVector": true }, "comment": "Webpage attributes" }] }, { "kind": "class", "name": "webPageNotModified", "type": "WebPage", "id": 1930545681, "comment": "The preview of the webpage hasn't changed", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "cached_page_views", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Page view count" }] }, { "kind": "class", "name": "authorization", "type": "Authorization", "id": 2902578717, "comment": "Logged-in session", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "current", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether this is the current session" }, { "name": "official_app", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the session is from an official app" }, { "name": "password_pending", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether the session is still waiting for a 2FA password" }, { "name": "encrypted_requests_disabled", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether this session will accept encrypted chats" }, { "name": "call_requests_disabled", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "Whether this session will accept phone calls" }, { "name": "unconfirmed", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Whether the session is unconfirmed, see here » for more info." }, { "name": "hash", "type": "long", "comment": "Identifier" }, { "name": "device_model", "type": "string", "comment": "Device model" }, { "name": "platform", "type": "string", "comment": "Platform" }, { "name": "system_version", "type": "string", "comment": "System version" }, { "name": "api_id", "type": "int", "comment": "API ID" }, { "name": "app_name", "type": "string", "comment": "App name" }, { "name": "app_version", "type": "string", "comment": "App version" }, { "name": "date_created", "type": "int", "comment": "When was the session created" }, { "name": "date_active", "type": "int", "comment": "When was the session last active" }, { "name": "ip", "type": "string", "comment": "Last known IP" }, { "name": "country", "type": "string", "comment": "Country determined from IP" }, { "name": "region", "type": "string", "comment": "Region determined from IP" }] }, { "kind": "class", "name": "account.authorizations", "type": "account.Authorizations", "id": 1275039392, "comment": "Logged-in sessions", "arguments": [{ "name": "authorization_ttl_days", "type": "int", "comment": "Time-to-live of session" }, { "name": "authorizations", "type": "Authorization", "typeModifiers": { "isVector": true }, "comment": "Logged-in sessions" }] }, { "kind": "class", "name": "account.password", "type": "account.Password", "id": 2507886843, "comment": "Configuration for two-factor authorization", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "has_recovery", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the user has a recovery method configured" }, { "name": "has_secure_values", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether telegram passport is enabled" }, { "name": "has_password", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether the user has a password" }, { "name": "current_algo", "type": "PasswordKdfAlgo", "typeModifiers": { "predicate": "flags.2" }, "comment": "The KDF algorithm for SRP two-factor authentication of the current password" }, { "name": "srp_B", "type": "bytes", "typeModifiers": { "predicate": "flags.2" }, "comment": "Srp B param for SRP authorization" }, { "name": "srp_id", "type": "long", "typeModifiers": { "predicate": "flags.2" }, "comment": "Srp ID param for SRP authorization" }, { "name": "hint", "type": "string", "typeModifiers": { "predicate": "flags.3" }, "comment": "Text hint for the password" }, { "name": "email_unconfirmed_pattern", "type": "string", "typeModifiers": { "predicate": "flags.4" }, "comment": "A password recovery email with the specified pattern is still awaiting verification" }, { "name": "new_algo", "type": "PasswordKdfAlgo", "comment": "The KDF algorithm for SRP two-factor authentication to use when creating new passwords" }, { "name": "new_secure_algo", "type": "SecurePasswordKdfAlgo", "comment": "The KDF algorithm for telegram passport" }, { "name": "secure_random", "type": "bytes", "comment": "Secure random string" }, { "name": "pending_reset_date", "type": "int", "typeModifiers": { "predicate": "flags.5" }, "comment": "The 2FA password will be automatically removed at this date, unless the user cancels the operation" }, { "name": "login_email_pattern", "type": "string", "typeModifiers": { "predicate": "flags.6" }, "comment": "A verified login email with the specified pattern is configured" }] }, { "kind": "class", "name": "account.passwordSettings", "type": "account.PasswordSettings", "id": 2589733861, "comment": "Private info associated to the password info (recovery email, telegram passport info & so on)", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "email", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "2FA Recovery email" }, { "name": "secure_settings", "type": "SecureSecretSettings", "typeModifiers": { "predicate": "flags.1" }, "comment": "Telegram passport settings" }] }, { "kind": "class", "name": "account.passwordInputSettings", "type": "account.PasswordInputSettings", "id": 3258394569, "comment": "Settings for setting up a new password", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "new_algo", "type": "PasswordKdfAlgo", "typeModifiers": { "predicate": "flags.0" }, "comment": "The SRP algorithm to use" }, { "name": "new_password_hash", "type": "bytes", "typeModifiers": { "predicate": "flags.0" }, "comment": "The computed password hash" }, { "name": "hint", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Text hint for the password" }, { "name": "email", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Password recovery email" }, { "name": "new_secure_settings", "type": "SecureSecretSettings", "typeModifiers": { "predicate": "flags.2" }, "comment": "Telegram passport settings" }] }, { "kind": "class", "name": "auth.passwordRecovery", "type": "auth.PasswordRecovery", "id": 326715557, "comment": "Recovery info of a 2FA password, only for accounts with a recovery email configured.", "arguments": [{ "name": "email_pattern", "type": "string", "comment": "The email to which the recovery code was sent must match this pattern." }] }, { "kind": "class", "name": "receivedNotifyMessage", "type": "ReceivedNotifyMessage", "id": 2743383929, "comment": "Message ID, for which PUSH-notifications were cancelled.", "arguments": [{ "name": "id", "type": "int", "comment": "Message ID, for which PUSH-notifications were canceled" }, { "name": "flags", "type": "int", "comment": "Reserved for future use" }] }, { "kind": "class", "name": "chatInviteExported", "type": "ExportedChatInvite", "id": 179611673, "comment": "Exported chat invite", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "revoked", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether this chat invite was revoked" }, { "name": "permanent", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Whether this chat invite has no expiration" }, { "name": "request_needed", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "Whether users importing this invite link will have to be approved to join the channel or group" }, { "name": "link", "type": "string", "comment": "Chat invitation link" }, { "name": "admin_id", "type": "int53", "comment": "ID of the admin that created this chat invite" }, { "name": "date", "type": "int", "comment": "When was this chat invite created" }, { "name": "start_date", "type": "int", "typeModifiers": { "predicate": "flags.4" }, "comment": "When was this chat invite last modified" }, { "name": "expire_date", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "When does this chat invite expire" }, { "name": "usage_limit", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "Maximum number of users that can join using this link" }, { "name": "usage", "type": "int", "typeModifiers": { "predicate": "flags.3" }, "comment": "How many users joined using this link" }, { "name": "requested", "type": "int", "typeModifiers": { "predicate": "flags.7" }, "comment": "Number of users that have already used this link to join" }, { "name": "title", "type": "string", "typeModifiers": { "predicate": "flags.8" }, "comment": "Custom description for the invite link, visible only to admins" }] }, { "kind": "class", "name": "chatInvitePublicJoinRequests", "type": "ExportedChatInvite", "id": 3977280183, "comment": "Used in updates and in the channel log to indicate when a user is requesting to join or has joined a discussion group", "arguments": [] }, { "kind": "class", "name": "chatInviteAlready", "type": "ChatInvite", "id": 1516793212, "comment": "The user has already joined this chat", "arguments": [{ "name": "chat", "type": "Chat", "comment": "The chat connected to the invite" }] }, { "kind": "class", "name": "chatInvite", "type": "ChatInvite", "id": 3454069824, "comment": "Chat invite info", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "channel", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether this is a channel/supergroup or a normal group" }, { "name": "broadcast", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether this is a channel" }, { "name": "public", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether this is a public channel/supergroup" }, { "name": "megagroup", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether this is a supergroup" }, { "name": "request_needed", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "Whether the join request » must be first approved by an administrator" }, { "name": "verified", "type": "true", "typeModifiers": { "predicate": "flags.7" }, "comment": "Is this chat or channel verified by Telegram?" }, { "name": "scam", "type": "true", "typeModifiers": { "predicate": "flags.8" }, "comment": "This chat is probably a scam" }, { "name": "fake", "type": "true", "typeModifiers": { "predicate": "flags.9" }, "comment": "If set, this chat was reported by many users as a fake or scam: be careful when interacting with it." }, { "name": "title", "type": "string", "comment": "Chat/supergroup/channel title" }, { "name": "about", "type": "string", "typeModifiers": { "predicate": "flags.5" }, "comment": "Description of the group of channel" }, { "name": "photo", "type": "Photo", "comment": "Chat/supergroup/channel photo" }, { "name": "participants_count", "type": "int", "comment": "Participant count" }, { "name": "participants", "type": "User", "typeModifiers": { "predicate": "flags.4", "isVector": true }, "comment": "A few of the participants that are in the group" }, { "name": "color", "type": "int", "comment": "Profile color palette ID" }] }, { "kind": "class", "name": "chatInvitePeek", "type": "ChatInvite", "id": 1634294960, "comment": "A chat invitation that also allows peeking into the group to read messages without joining it.", "arguments": [{ "name": "chat", "type": "Chat", "comment": "Chat information" }, { "name": "expires", "type": "int", "comment": "Read-only anonymous access to this group will be revoked at this date" }] }, { "kind": "class", "name": "inputStickerSetEmpty", "type": "InputStickerSet", "id": 4290128789, "comment": "Empty constructor", "arguments": [] }, { "kind": "class", "name": "inputStickerSetID", "type": "InputStickerSet", "id": 2649203305, "comment": "Stickerset by ID", "arguments": [{ "name": "id", "type": "long", "comment": "ID" }, { "name": "access_hash", "type": "long", "comment": "Access hash" }] }, { "kind": "class", "name": "inputStickerSetShortName", "type": "InputStickerSet", "id": 2250033312, "comment": "Stickerset by short name, from a stickerset deep link »", "arguments": [{ "name": "short_name", "type": "string", "comment": "Short name from a stickerset deep link »" }] }, { "kind": "class", "name": "inputStickerSetAnimatedEmoji", "type": "InputStickerSet", "id": 42402760, "comment": "Animated emojis stickerset", "arguments": [] }, { "kind": "class", "name": "inputStickerSetDice", "type": "InputStickerSet", "id": 3867103758, "comment": "Used for fetching animated dice stickers", "arguments": [{ "name": "emoticon", "type": "string", "comment": "The emoji, for now \"🏀\", \"🎲\" and \"🎯\" are supported" }] }, { "kind": "class", "name": "inputStickerSetAnimatedEmojiAnimations", "type": "InputStickerSet", "id": 215889721, "comment": "Animated emoji reaction stickerset (contains animations to play when a user clicks on a given animated emoji)", "arguments": [] }, { "kind": "class", "name": "inputStickerSetPremiumGifts", "type": "InputStickerSet", "id": 3364567810, "comment": "Stickers to show when receiving a gifted Telegram Premium subscription", "arguments": [] }, { "kind": "class", "name": "inputStickerSetEmojiGenericAnimations", "type": "InputStickerSet", "id": 80008398, "comment": "Generic animation stickerset containing animations to play when reacting to messages using a normal emoji without a custom animation", "arguments": [] }, { "kind": "class", "name": "inputStickerSetEmojiDefaultStatuses", "type": "InputStickerSet", "id": 701560302, "comment": "Default custom emoji status stickerset", "arguments": [] }, { "kind": "class", "name": "inputStickerSetEmojiDefaultTopicIcons", "type": "InputStickerSet", "id": 1153562857, "comment": "Default custom emoji stickerset for forum topic icons", "arguments": [] }, { "kind": "class", "name": "inputStickerSetEmojiChannelDefaultStatuses", "type": "InputStickerSet", "id": 1232373075, "comment": "Default custom emoji status stickerset for channel statuses", "arguments": [] }, { "kind": "class", "name": "stickerSet", "type": "StickerSet", "id": 768691932, "comment": "Represents a stickerset (stickerpack)", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "archived", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether this stickerset was archived (due to too many saved stickers in the current account)" }, { "name": "official", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Is this stickerset official" }, { "name": "masks", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Is this a mask stickerset" }, { "name": "emojis", "type": "true", "typeModifiers": { "predicate": "flags.7" }, "comment": "This is a custom emoji stickerset" }, { "name": "text_color", "type": "true", "typeModifiers": { "predicate": "flags.9" }, "comment": "Whether the color of this TGS custom emoji stickerset should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context." }, { "name": "channel_emoji_status", "type": "true", "typeModifiers": { "predicate": "flags.10" }, "comment": "If set, this custom emoji stickerset can be used in channel/supergroup emoji statuses." }, { "name": "creator", "type": "true", "typeModifiers": { "predicate": "flags.11" }, "comment": "Whether we created this stickerset" }, { "name": "installed_date", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "When was this stickerset installed" }, { "name": "id", "type": "long", "comment": "ID of the stickerset" }, { "name": "access_hash", "type": "long", "comment": "Access hash of stickerset" }, { "name": "title", "type": "string", "comment": "Title of stickerset" }, { "name": "short_name", "type": "string", "comment": "Short name of stickerset, used when sharing stickerset using stickerset deep links." }, { "name": "thumbs", "type": "PhotoSize", "typeModifiers": { "predicate": "flags.4", "isVector": true }, "comment": "Stickerset thumbnail" }, { "name": "thumb_dc_id", "type": "int", "typeModifiers": { "predicate": "flags.4" }, "comment": "DC ID of thumbnail" }, { "name": "thumb_version", "type": "int", "typeModifiers": { "predicate": "flags.4" }, "comment": "Thumbnail version" }, { "name": "thumb_document_id", "type": "long", "typeModifiers": { "predicate": "flags.8" }, "comment": "Document ID of custom emoji thumbnail, fetch the document using {@link messages.RawGetCustomEmojiDocumentsRequest}" }, { "name": "animated", "type": "true", "typeModifiers": { "predicate": "flags.5" } }, { "name": "videos", "type": "true", "typeModifiers": { "predicate": "flags.6" } }, { "name": "count", "type": "int", "comment": "Number of stickers in pack" }, { "name": "hash", "type": "int", "comment": "Hash" }] }, { "kind": "class", "name": "messages.stickerSet", "type": "messages.StickerSet", "id": 1846886166, "comment": "Stickerset and stickers inside it", "arguments": [{ "name": "set", "type": "StickerSet", "comment": "The stickerset" }, { "name": "packs", "type": "StickerPack", "typeModifiers": { "isVector": true }, "comment": "Emoji info for stickers" }, { "name": "keywords", "type": "StickerKeyword", "typeModifiers": { "isVector": true }, "comment": "Keywords for some or every sticker in the stickerset." }, { "name": "documents", "type": "Document", "typeModifiers": { "isVector": true }, "comment": "Stickers in stickerset" }] }, { "kind": "class", "name": "messages.stickerSetNotModified", "type": "messages.StickerSet", "id": 3556320491, "comment": "The stickerset hasn't changed", "arguments": [] }, { "kind": "class", "name": "botCommand", "type": "BotCommand", "id": 3262826695, "comment": "Describes a bot command that can be used in a chat", "arguments": [{ "name": "command", "type": "string", "comment": "/command name" }, { "name": "description", "type": "string", "comment": "Description of the command" }] }, { "kind": "class", "name": "botInfo", "type": "BotInfo", "id": 2402290519, "comment": "Info about bots (available bot commands, etc)", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "has_preview_medias", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "If set, the bot has some preview medias for the configured Main Mini App, see here » for more info on Main Mini App preview medias." }, { "name": "user_id", "type": "int53", "typeModifiers": { "predicate": "flags.0" }, "comment": "ID of the bot" }, { "name": "description", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Description of the bot" }, { "name": "description_photo", "type": "Photo", "typeModifiers": { "predicate": "flags.4" }, "comment": "Description photo" }, { "name": "description_document", "type": "Document", "typeModifiers": { "predicate": "flags.5" }, "comment": "Description animation in MPEG4 format" }, { "name": "commands", "type": "BotCommand", "typeModifiers": { "predicate": "flags.2", "isVector": true }, "comment": "Bot commands that can be used in the chat" }, { "name": "menu_button", "type": "BotMenuButton", "typeModifiers": { "predicate": "flags.3" }, "comment": "Indicates the action to execute when pressing the in-UI menu button for bots" }] }, { "kind": "class", "name": "keyboardButton", "type": "KeyboardButton", "id": 2734311552, "comment": "Bot keyboard button", "arguments": [{ "name": "text", "type": "string", "comment": "Button text" }] }, { "kind": "class", "name": "keyboardButtonUrl", "type": "KeyboardButton", "id": 629866245, "comment": "URL button", "arguments": [{ "name": "text", "type": "string", "comment": "Button label" }, { "name": "url", "type": "string", "comment": "URL" }] }, { "kind": "class", "name": "keyboardButtonCallback", "type": "KeyboardButton", "id": 901503851, "comment": "Callback button", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "requires_password", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the user should verify their identity by entering their 2FA SRP parameters to the {@link messages.RawGetBotCallbackAnswerRequest} method. NOTE: telegram and the bot WILL NOT have access to the plaintext password, thanks to SRP. This button is mainly used by the official @botfather bot, for verifying the user's identity before transferring ownership of a bot to another user." }, { "name": "text", "type": "string", "comment": "Button text" }, { "name": "data", "type": "bytes", "comment": "Callback data" }] }, { "kind": "class", "name": "keyboardButtonRequestPhone", "type": "KeyboardButton", "id": 2976541737, "comment": "Button to request a user's phone number", "arguments": [{ "name": "text", "type": "string", "comment": "Button text" }] }, { "kind": "class", "name": "keyboardButtonRequestGeoLocation", "type": "KeyboardButton", "id": 4235815743, "comment": "Button to request a user's geolocation", "arguments": [{ "name": "text", "type": "string", "comment": "Button text" }] }, { "kind": "class", "name": "keyboardButtonSwitchInline", "type": "KeyboardButton", "id": 2478439349, "comment": "Button to force a user to switch to inline mode: pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "same_peer", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field." }, { "name": "text", "type": "string", "comment": "Button label" }, { "name": "query", "type": "string", "comment": "The inline query to use" }, { "name": "peer_types", "type": "InlineQueryPeerType", "typeModifiers": { "predicate": "flags.1", "isVector": true }, "comment": "Filter to use when selecting chats." }] }, { "kind": "class", "name": "keyboardButtonGame", "type": "KeyboardButton", "id": 1358175439, "comment": "Button to start a game", "arguments": [{ "name": "text", "type": "string", "comment": "Button text" }] }, { "kind": "class", "name": "keyboardButtonBuy", "type": "KeyboardButton", "id": 2950250427, "comment": "Button to buy a product", "arguments": [{ "name": "text", "type": "string", "comment": "Button text" }] }, { "kind": "class", "name": "keyboardButtonUrlAuth", "type": "KeyboardButton", "id": 280464681, "comment": "Button to request a user to authorize via URL using Seamless Telegram Login. When the user clicks on such a button, {@link messages.RawRequestUrlAuthRequest} should be called, providing the button_id and the ID of the container message. The returned {@link RawUrlAuthResultRequest} object will contain more details about the authorization request (request_write_access if the bot would like to send messages to the user along with the username of the bot which will be used for user authorization). Finally, the user can choose to call {@link messages.RawAcceptUrlAuthRequest} to get a {@link RawUrlAuthResultAccepted} with the URL to open instead of the url of this constructor, or a {@link RawUrlAuthResultDefault}, in which case the url of this constructor must be opened, instead. If the user refuses the authorization request but still wants to open the link, the url of this constructor must be used.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "text", "type": "string", "comment": "Button label" }, { "name": "fwd_text", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "New text of the button in forwarded messages." }, { "name": "url", "type": "string", "comment": "An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.

NOTE: Services must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization." }, { "name": "button_id", "type": "int", "comment": "ID of the button to pass to {@link messages.RawRequestUrlAuthRequest}" }] }, { "kind": "class", "name": "inputKeyboardButtonUrlAuth", "type": "KeyboardButton", "id": 3492708308, "comment": "Button to request a user to {@link messages.RawAcceptUrlAuthRequest} via URL using Seamless Telegram Login.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "request_write_access", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Set this flag to request the permission for your bot to send messages to the user." }, { "name": "text", "type": "string", "comment": "Button text" }, { "name": "fwd_text", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "New text of the button in forwarded messages." }, { "name": "url", "type": "string", "comment": "An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.
NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization." }, { "name": "bot", "type": "InputUser", "comment": "Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details." }] }, { "kind": "class", "name": "keyboardButtonRequestPoll", "type": "KeyboardButton", "id": 3150401885, "comment": "A button that allows the user to create and send a poll when pressed; available only in private", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "quiz", "type": "Bool", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, only quiz polls can be sent" }, { "name": "text", "type": "string", "comment": "Button text" }] }, { "kind": "class", "name": "inputKeyboardButtonUserProfile", "type": "KeyboardButton", "id": 3918005115, "comment": "Button that links directly to a user profile", "arguments": [{ "name": "text", "type": "string", "comment": "Button text" }, { "name": "user_id", "type": "InputUser", "comment": "User ID" }] }, { "kind": "class", "name": "keyboardButtonUserProfile", "type": "KeyboardButton", "id": 814112961, "comment": "Button that links directly to a user profile", "arguments": [{ "name": "text", "type": "string", "comment": "Button text" }, { "name": "user_id", "type": "int53", "comment": "User ID" }] }, { "kind": "class", "name": "keyboardButtonWebView", "type": "KeyboardButton", "id": 326529584, "comment": "Button to open a bot mini app using {@link messages.RawRequestWebViewRequest}, sending over user information after user confirmation.\n\nCan only be sent or received as part of an inline keyboard, use {@link RawKeyboardButtonSimpleWebView} for reply keyboards.", "arguments": [{ "name": "text", "type": "string", "comment": "Button text" }, { "name": "url", "type": "string", "comment": "Web app url" }] }, { "kind": "class", "name": "keyboardButtonSimpleWebView", "type": "KeyboardButton", "id": 2696958044, "comment": "Button to open a bot mini app using {@link messages.RawRequestSimpleWebViewRequest}, without sending user information to the web app.\n\nCan only be sent or received as part of a reply keyboard, use {@link RawKeyboardButtonWebView} for inline keyboards.", "arguments": [{ "name": "text", "type": "string", "comment": "Button text" }, { "name": "url", "type": "string", "comment": "Web app URL" }] }, { "kind": "class", "name": "keyboardButtonRequestPeer", "type": "KeyboardButton", "id": 1406648280, "comment": "Prompts the user to select and share one or more peers with the bot using {@link messages.RawSendBotRequestedPeerRequest}", "arguments": [{ "name": "text", "type": "string", "comment": "Button text" }, { "name": "button_id", "type": "int", "comment": "Button ID, to be passed to {@link messages.RawSendBotRequestedPeerRequest}." }, { "name": "peer_type", "type": "RequestPeerType", "comment": "Filtering criteria to use for the peer selection list shown to the user.
The list should display all existing peers of the specified type, and should also offer an option for the user to create and immediately use one or more (up to max_quantity) peers of the specified type, if needed." }, { "name": "max_quantity", "type": "int", "comment": "Maximum number of peers that can be chosen." }] }, { "kind": "class", "name": "inputKeyboardButtonRequestPeer", "type": "KeyboardButton", "id": 3378916613, "comment": "Prompts the user to select and share one or more peers with the bot using {@link messages.RawSendBotRequestedPeerRequest}.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "name_requested", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Set this flag to request the peer's name." }, { "name": "username_requested", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Set this flag to request the peer's @username (if any)." }, { "name": "photo_requested", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Set this flag to request the peer's photo (if any)." }, { "name": "text", "type": "string", "comment": "Button text" }, { "name": "button_id", "type": "int", "comment": "Button ID, to be passed to {@link messages.RawSendBotRequestedPeerRequest}." }, { "name": "peer_type", "type": "RequestPeerType", "comment": "Filtering criteria to use for the peer selection list shown to the user.
The list should display all existing peers of the specified type, and should also offer an option for the user to create and immediately use one or more (up to max_quantity) peers of the specified type, if needed." }, { "name": "max_quantity", "type": "int", "comment": "Maximum number of peers that can be chosen." }] }, { "kind": "class", "name": "keyboardButtonRow", "type": "KeyboardButtonRow", "id": 2002815875, "comment": "Inline keyboard row", "arguments": [{ "name": "buttons", "type": "KeyboardButton", "typeModifiers": { "isVector": true }, "comment": "Bot or inline keyboard buttons" }] }, { "kind": "class", "name": "replyKeyboardHide", "type": "ReplyMarkup", "id": 2688441221, "comment": "Hide sent bot keyboard", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "selective", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Use this flag if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.

Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet" }] }, { "kind": "class", "name": "replyKeyboardForceReply", "type": "ReplyMarkup", "id": 2259946248, "comment": "Force the user to send a reply", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "single_use", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again." }, { "name": "selective", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.
Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard." }, { "name": "placeholder", "type": "string", "typeModifiers": { "predicate": "flags.3" }, "comment": "The placeholder to be shown in the input field when the keyboard is active; 1-64 characters." }] }, { "kind": "class", "name": "replyKeyboardMarkup", "type": "ReplyMarkup", "id": 2245892561, "comment": "Bot keyboard", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "resize", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). If not set, the custom keyboard is always of the same height as the app's standard keyboard." }, { "name": "single_use", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again." }, { "name": "selective", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.

Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard." }, { "name": "persistent", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "Requests clients to always show the keyboard when the regular keyboard is hidden." }, { "name": "rows", "type": "KeyboardButtonRow", "typeModifiers": { "isVector": true }, "comment": "Button row" }, { "name": "placeholder", "type": "string", "typeModifiers": { "predicate": "flags.3" }, "comment": "The placeholder to be shown in the input field when the keyboard is active; 1-64 characters." }] }, { "kind": "class", "name": "replyInlineMarkup", "type": "ReplyMarkup", "id": 1218642516, "comment": "Bot or inline keyboard", "arguments": [{ "name": "rows", "type": "KeyboardButtonRow", "typeModifiers": { "isVector": true }, "comment": "Bot or inline keyboard rows" }] }, { "kind": "class", "name": "messageEntityUnknown", "type": "MessageEntity", "id": 3146955413, "comment": "Unknown message entity", "arguments": [{ "name": "offset", "type": "int", "comment": "Offset of message entity within message (in UTF-16 code units)" }, { "name": "length", "type": "int", "comment": "Length of message entity within message (in UTF-16 code units)" }] }, { "kind": "class", "name": "messageEntityMention", "type": "MessageEntity", "id": 4194588573, "comment": "Message entity mentioning a user by @username; {@link RawMessageEntityMentionName} can also be used to mention users by their ID.", "arguments": [{ "name": "offset", "type": "int", "comment": "Offset of message entity within message (in UTF-16 code units)" }, { "name": "length", "type": "int", "comment": "Length of message entity within message (in UTF-16 code units)" }] }, { "kind": "class", "name": "messageEntityHashtag", "type": "MessageEntity", "id": 1868782349, "comment": "#hashtag message entity", "arguments": [{ "name": "offset", "type": "int", "comment": "Offset of message entity within message (in UTF-16 code units)" }, { "name": "length", "type": "int", "comment": "Length of message entity within message (in UTF-16 code units)" }] }, { "kind": "class", "name": "messageEntityBotCommand", "type": "MessageEntity", "id": 1827637959, "comment": "Message entity representing a bot /command", "arguments": [{ "name": "offset", "type": "int", "comment": "Offset of message entity within message (in UTF-16 code units)" }, { "name": "length", "type": "int", "comment": "Length of message entity within message (in UTF-16 code units)" }] }, { "kind": "class", "name": "messageEntityUrl", "type": "MessageEntity", "id": 1859134776, "comment": "Message entity representing an in-text url: https://google.com; for text urls, use {@link RawMessageEntityTextUrl}.", "arguments": [{ "name": "offset", "type": "int", "comment": "Offset of message entity within message (in UTF-16 code units)" }, { "name": "length", "type": "int", "comment": "Length of message entity within message (in UTF-16 code units)" }] }, { "kind": "class", "name": "messageEntityEmail", "type": "MessageEntity", "id": 1692693954, "comment": "Message entity representing an email@example.com.", "arguments": [{ "name": "offset", "type": "int", "comment": "Offset of message entity within message (in UTF-16 code units)" }, { "name": "length", "type": "int", "comment": "Length of message entity within message (in UTF-16 code units)" }] }, { "kind": "class", "name": "messageEntityBold", "type": "MessageEntity", "id": 3177253833, "comment": "Message entity representing bold text.", "arguments": [{ "name": "offset", "type": "int", "comment": "Offset of message entity within message (in UTF-16 code units)" }, { "name": "length", "type": "int", "comment": "Length of message entity within message (in UTF-16 code units)" }] }, { "kind": "class", "name": "messageEntityItalic", "type": "MessageEntity", "id": 2188348256, "comment": "Message entity representing italic text.", "arguments": [{ "name": "offset", "type": "int", "comment": "Offset of message entity within message (in UTF-16 code units)" }, { "name": "length", "type": "int", "comment": "Length of message entity within message (in UTF-16 code units)" }] }, { "kind": "class", "name": "messageEntityCode", "type": "MessageEntity", "id": 681706865, "comment": "Message entity representing a codeblock.", "arguments": [{ "name": "offset", "type": "int", "comment": "Offset of message entity within message (in UTF-16 code units)" }, { "name": "length", "type": "int", "comment": "Length of message entity within message (in UTF-16 code units)" }] }, { "kind": "class", "name": "messageEntityPre", "type": "MessageEntity", "id": 1938967520, "comment": "Message entity representing a preformatted codeblock, allowing the user to specify a programming language for the codeblock.", "arguments": [{ "name": "offset", "type": "int", "comment": "Offset of message entity within message (in UTF-16 code units)" }, { "name": "length", "type": "int", "comment": "Length of message entity within message (in UTF-16 code units)" }, { "name": "language", "type": "string", "comment": "Programming language of the code" }] }, { "kind": "class", "name": "messageEntityTextUrl", "type": "MessageEntity", "id": 1990644519, "comment": "Message entity representing a text url: for in-text urls like https://google.com use {@link RawMessageEntityUrl}.\n\nNote that an additional confirmation popup with the full URL must be displayed to the user before opening this link, unless the domain satisfies the conditions specified in the domain whitelist documentation ».", "arguments": [{ "name": "offset", "type": "int", "comment": "Offset of message entity within message (in UTF-16 code units)" }, { "name": "length", "type": "int", "comment": "Length of message entity within message (in UTF-16 code units)" }, { "name": "url", "type": "string", "comment": "The actual URL" }] }, { "kind": "class", "name": "messageEntityMentionName", "type": "MessageEntity", "id": 3699052864, "comment": "Message entity representing a user mention: for creating a mention use {@link RawInputMessageEntityMentionName}.", "arguments": [{ "name": "offset", "type": "int", "comment": "Offset of message entity within message (in UTF-16 code units)" }, { "name": "length", "type": "int", "comment": "Length of message entity within message (in UTF-16 code units)" }, { "name": "user_id", "type": "int53", "comment": "Identifier of the user that was mentioned" }] }, { "kind": "class", "name": "inputMessageEntityMentionName", "type": "MessageEntity", "id": 546203849, "comment": "Message entity that can be used to create a user user mention: received mentions use the {@link RawMessageEntityMentionName} constructor, instead.", "arguments": [{ "name": "offset", "type": "int", "comment": "Offset of message entity within message (in UTF-16 code units)" }, { "name": "length", "type": "int", "comment": "Length of message entity within message (in UTF-16 code units)" }, { "name": "user_id", "type": "InputUser", "comment": "Identifier of the user that was mentioned" }] }, { "kind": "class", "name": "messageEntityPhone", "type": "MessageEntity", "id": 2607407947, "comment": "Message entity representing a phone number.", "arguments": [{ "name": "offset", "type": "int", "comment": "Offset of message entity within message (in UTF-16 code units)" }, { "name": "length", "type": "int", "comment": "Length of message entity within message (in UTF-16 code units)" }] }, { "kind": "class", "name": "messageEntityCashtag", "type": "MessageEntity", "id": 1280209983, "comment": "Message entity representing a $cashtag.", "arguments": [{ "name": "offset", "type": "int", "comment": "Offset of message entity within message (in UTF-16 code units)" }, { "name": "length", "type": "int", "comment": "Length of message entity within message (in UTF-16 code units)" }] }, { "kind": "class", "name": "messageEntityUnderline", "type": "MessageEntity", "id": 2622389899, "comment": "Message entity representing underlined text.", "arguments": [{ "name": "offset", "type": "int", "comment": "Offset of message entity within message (in UTF-16 code units)" }, { "name": "length", "type": "int", "comment": "Length of message entity within message (in UTF-16 code units)" }] }, { "kind": "class", "name": "messageEntityStrike", "type": "MessageEntity", "id": 3204879316, "comment": "Message entity representing strikethrough text.", "arguments": [{ "name": "offset", "type": "int", "comment": "Offset of message entity within message (in UTF-16 code units)" }, { "name": "length", "type": "int", "comment": "Length of message entity within message (in UTF-16 code units)" }] }, { "kind": "class", "name": "messageEntityBankCard", "type": "MessageEntity", "id": 1981704948, "comment": "Indicates a credit card number", "arguments": [{ "name": "offset", "type": "int", "comment": "Offset of message entity within message (in UTF-16 code units)" }, { "name": "length", "type": "int", "comment": "Length of message entity within message (in UTF-16 code units)" }] }, { "kind": "class", "name": "messageEntitySpoiler", "type": "MessageEntity", "id": 852137487, "comment": "Message entity representing a spoiler", "arguments": [{ "name": "offset", "type": "int", "comment": "Offset of message entity within message (in UTF-16 code units)" }, { "name": "length", "type": "int", "comment": "Length of message entity within message (in UTF-16 code units)" }] }, { "kind": "class", "name": "messageEntityCustomEmoji", "type": "MessageEntity", "id": 3369010680, "comment": "Represents a custom emoji.
\nNote that this entity must wrap exactly one regular emoji (the one contained in {@link RawDocumentAttributeCustomEmoji}.alt) in the related text, otherwise the server will ignore it.", "arguments": [{ "name": "offset", "type": "int", "comment": "Offset of message entity within message (in UTF-16 code units)" }, { "name": "length", "type": "int", "comment": "Length of message entity within message (in UTF-16 code units)" }, { "name": "document_id", "type": "long", "comment": "Document ID of the custom emoji, use {@link messages.RawGetCustomEmojiDocumentsRequest} to fetch the emoji animation and the actual emoji it represents." }] }, { "kind": "class", "name": "messageEntityBlockquote", "type": "MessageEntity", "id": 4056722092, "comment": "Message entity representing a block quote.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "collapsed", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the quote is collapsed by default." }, { "name": "offset", "type": "int", "comment": "Offset of message entity within message (in UTF-16 code units)" }, { "name": "length", "type": "int", "comment": "Length of message entity within message (in UTF-16 code units)" }] }, { "kind": "class", "name": "inputChannelEmpty", "type": "InputChannel", "id": 4002160262, "comment": "Represents the absence of a channel", "arguments": [] }, { "kind": "class", "name": "inputChannel", "type": "InputChannel", "id": 4082822184, "comment": "Represents a channel", "arguments": [{ "name": "channel_id", "type": "int53", "comment": "Channel ID" }, { "name": "access_hash", "type": "long", "comment": "Access hash taken from the {@link RawChannel} constructor" }] }, { "kind": "class", "name": "inputChannelFromMessage", "type": "InputChannel", "id": 1536380829, "comment": "Defines a min channel that was seen in a certain message of a certain chat.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The chat where the channel was seen" }, { "name": "msg_id", "type": "int", "comment": "The message ID in the chat where the channel was seen" }, { "name": "channel_id", "type": "int53", "comment": "The channel ID" }] }, { "kind": "class", "name": "contacts.resolvedPeer", "type": "contacts.ResolvedPeer", "id": 2131196633, "comment": "Resolved peer", "arguments": [{ "name": "peer", "type": "Peer", "comment": "The peer" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Users" }] }, { "kind": "class", "name": "messageRange", "type": "MessageRange", "id": 182649427, "comment": "Indicates a range of chat messages", "arguments": [{ "name": "min_id", "type": "int", "comment": "Start of range (message ID)" }, { "name": "max_id", "type": "int", "comment": "End of range (message ID)" }] }, { "kind": "class", "name": "updates.channelDifferenceEmpty", "type": "updates.ChannelDifference", "id": 1041346555, "comment": "There are no new updates", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "final", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether there are more updates that must be fetched (always false)" }, { "name": "pts", "type": "int", "comment": "The latest PTS" }, { "name": "timeout", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Clients are supposed to refetch the channel difference after timeout seconds have elapsed, if the user is currently viewing the chat, see here » for more info." }] }, { "kind": "class", "name": "updates.channelDifferenceTooLong", "type": "updates.ChannelDifference", "id": 2763835134, "comment": "The provided pts + limit < remote pts. Simply, there are too many updates to be fetched (more than limit), the client has to resolve the update gap in one of the following ways (assuming the existence of a persistent database to locally store messages):\n\nIt should be also noted that some messages like live location messages shouldn't be deleted.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "final", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether there are more updates that must be fetched (always false)" }, { "name": "timeout", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Clients are supposed to refetch the channel difference after timeout seconds have elapsed" }, { "name": "dialog", "type": "Dialog", "comment": "Dialog containing the latest PTS that can be used to reset the channel state" }, { "name": "messages", "type": "Message", "typeModifiers": { "isVector": true }, "comment": "The latest messages" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Chats from messages" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Users from messages" }] }, { "kind": "class", "name": "updates.channelDifference", "type": "updates.ChannelDifference", "id": 543450958, "comment": "The new updates", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "final", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether there are more updates to be fetched using getDifference, starting from the provided pts" }, { "name": "pts", "type": "int", "comment": "The PTS from which to start getting updates the next time" }, { "name": "timeout", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Clients are supposed to refetch the channel difference after timeout seconds have elapsed, if the user is currently viewing the chat, see here » for more info." }, { "name": "new_messages", "type": "Message", "typeModifiers": { "isVector": true }, "comment": "New messages" }, { "name": "other_updates", "type": "Update", "typeModifiers": { "isVector": true }, "comment": "Other updates" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Users" }] }, { "kind": "class", "name": "channelMessagesFilterEmpty", "type": "ChannelMessagesFilter", "id": 2496933607, "comment": "No filter", "arguments": [] }, { "kind": "class", "name": "channelMessagesFilter", "type": "ChannelMessagesFilter", "id": 3447183703, "comment": "Filter for getting only certain types of channel messages", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "exclude_new_messages", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether to exclude new messages from the search" }, { "name": "ranges", "type": "MessageRange", "typeModifiers": { "isVector": true }, "comment": "A range of messages to fetch" }] }, { "kind": "class", "name": "channelParticipant", "type": "ChannelParticipant", "id": 3222013888, "comment": "Channel/supergroup participant", "arguments": [{ "name": "user_id", "type": "int53", "comment": "Participant user ID" }, { "name": "date", "type": "int", "comment": "Date joined" }] }, { "kind": "class", "name": "channelParticipantSelf", "type": "ChannelParticipant", "id": 900251559, "comment": "Myself", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "via_request", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether I joined upon specific approval of an admin" }, { "name": "user_id", "type": "int53", "comment": "User ID" }, { "name": "inviter_id", "type": "int53", "comment": "User that invited me to the channel/supergroup" }, { "name": "date", "type": "int", "comment": "When did I join the channel/supergroup" }] }, { "kind": "class", "name": "channelParticipantCreator", "type": "ChannelParticipant", "id": 803602899, "comment": "Channel/supergroup creator", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "user_id", "type": "int53", "comment": "User ID" }, { "name": "admin_rights", "type": "ChatAdminRights", "comment": "Creator admin rights" }, { "name": "rank", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "The role (rank) of the group creator in the group: just an arbitrary string, admin by default" }] }, { "kind": "class", "name": "channelParticipantAdmin", "type": "ChannelParticipant", "id": 885242707, "comment": "Admin", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "can_edit", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Can this admin promote other admins with the same permissions?" }, { "name": "self", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Is this the current user" }, { "name": "user_id", "type": "int53", "comment": "Admin user ID" }, { "name": "inviter_id", "type": "int53", "typeModifiers": { "predicate": "flags.1" }, "comment": "User that invited the admin to the channel/group" }, { "name": "promoted_by", "type": "int53", "comment": "User that promoted the user to admin" }, { "name": "date", "type": "int", "comment": "When did the user join" }, { "name": "admin_rights", "type": "ChatAdminRights", "comment": "Admin rights" }, { "name": "rank", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "The role (rank) of the admin in the group: just an arbitrary string, admin by default" }] }, { "kind": "class", "name": "channelParticipantBanned", "type": "ChannelParticipant", "id": 1844969806, "comment": "Banned/kicked user", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "left", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the user has left the group" }, { "name": "peer", "type": "Peer", "comment": "The banned peer" }, { "name": "kicked_by", "type": "int53", "comment": "User was kicked by the specified admin" }, { "name": "date", "type": "int", "comment": "When did the user join the group" }, { "name": "banned_rights", "type": "ChatBannedRights", "comment": "Banned rights" }] }, { "kind": "class", "name": "channelParticipantLeft", "type": "ChannelParticipant", "id": 453242886, "comment": "A participant that left the channel/supergroup", "arguments": [{ "name": "peer", "type": "Peer", "comment": "The peer that left" }] }, { "kind": "class", "name": "channelParticipantsRecent", "type": "ChannelParticipantsFilter", "id": 3728686201, "comment": "Fetch only recent participants", "arguments": [] }, { "kind": "class", "name": "channelParticipantsAdmins", "type": "ChannelParticipantsFilter", "id": 3026225513, "comment": "Fetch only admin participants", "arguments": [] }, { "kind": "class", "name": "channelParticipantsKicked", "type": "ChannelParticipantsFilter", "id": 2746567045, "comment": "Fetch only kicked participants", "arguments": [{ "name": "q", "type": "string", "comment": "Optional filter for searching kicked participants by name (otherwise empty)" }] }, { "kind": "class", "name": "channelParticipantsBots", "type": "ChannelParticipantsFilter", "id": 2966521435, "comment": "Fetch only bot participants", "arguments": [] }, { "kind": "class", "name": "channelParticipantsBanned", "type": "ChannelParticipantsFilter", "id": 338142689, "comment": "Fetch only banned participants", "arguments": [{ "name": "q", "type": "string", "comment": "Optional filter for searching banned participants by name (otherwise empty)" }] }, { "kind": "class", "name": "channelParticipantsSearch", "type": "ChannelParticipantsFilter", "id": 106343499, "comment": "Query participants by name", "arguments": [{ "name": "q", "type": "string", "comment": "Search query" }] }, { "kind": "class", "name": "channelParticipantsContacts", "type": "ChannelParticipantsFilter", "id": 3144345741, "comment": "Fetch only participants that are also contacts", "arguments": [{ "name": "q", "type": "string", "comment": "Optional search query for searching contact participants by name" }] }, { "kind": "class", "name": "channelParticipantsMentions", "type": "ChannelParticipantsFilter", "id": 3763035371, "comment": "This filter is used when looking for supergroup members to mention.
\nThis filter will automatically remove anonymous admins, and return even non-participant users that replied to a specific thread through the comment section of a channel.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "q", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Filter by user name or username" }, { "name": "top_msg_id", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Look only for users that posted in this thread" }] }, { "kind": "class", "name": "channels.channelParticipants", "type": "channels.ChannelParticipants", "id": 2595290799, "comment": "Represents multiple channel participants", "arguments": [{ "name": "count", "type": "int", "comment": "Total number of participants that correspond to the given query" }, { "name": "participants", "type": "ChannelParticipant", "typeModifiers": { "isVector": true }, "comment": "Participants" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Mentioned chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Users mentioned in participant info" }] }, { "kind": "class", "name": "channels.channelParticipantsNotModified", "type": "channels.ChannelParticipants", "id": 4028055529, "comment": "No new participant info could be found", "arguments": [] }, { "kind": "class", "name": "channels.channelParticipant", "type": "channels.ChannelParticipant", "id": 3753378583, "comment": "Represents a channel participant", "arguments": [{ "name": "participant", "type": "ChannelParticipant", "comment": "The channel participant" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Mentioned chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Users" }] }, { "kind": "class", "name": "help.termsOfService", "type": "help.TermsOfService", "id": 2013922064, "comment": "Info about the latest telegram Terms Of Service", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "popup", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether a prompt must be showed to the user, in order to accept the new terms." }, { "name": "id", "type": "DataJSON", "comment": "ID of the new terms" }, { "name": "text", "type": "string", "comment": "Text of the new terms" }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "isVector": true }, "comment": "Message entities for styled text" }, { "name": "min_age_confirm", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Minimum age required to sign up to telegram, the user must confirm that they is older than the minimum age." }] }, { "kind": "class", "name": "messages.savedGifsNotModified", "type": "messages.SavedGifs", "id": 3892468898, "comment": "No new saved gifs were found", "arguments": [] }, { "kind": "class", "name": "messages.savedGifs", "type": "messages.SavedGifs", "id": 2225089037, "comment": "Saved gifs", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here" }, { "name": "gifs", "type": "Document", "typeModifiers": { "isVector": true }, "comment": "List of saved gifs" }] }, { "kind": "class", "name": "inputBotInlineMessageMediaAuto", "type": "InputBotInlineMessage", "id": 864077702, "comment": "A media", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "invert_media", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom." }, { "name": "message", "type": "string", "comment": "Caption" }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.1", "isVector": true }, "comment": "Message entities for styled text" }, { "name": "reply_markup", "type": "ReplyMarkup", "typeModifiers": { "predicate": "flags.2" }, "comment": "Inline keyboard" }] }, { "kind": "class", "name": "inputBotInlineMessageText", "type": "InputBotInlineMessage", "id": 1036876423, "comment": "Simple text message", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "no_webpage", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Disable webpage preview" }, { "name": "invert_media", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom." }, { "name": "message", "type": "string", "comment": "Message" }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.1", "isVector": true }, "comment": "Message entities for styled text" }, { "name": "reply_markup", "type": "ReplyMarkup", "typeModifiers": { "predicate": "flags.2" }, "comment": "Inline keyboard" }] }, { "kind": "class", "name": "inputBotInlineMessageMediaGeo", "type": "InputBotInlineMessage", "id": 2526190213, "comment": "Geolocation", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "geo_point", "type": "InputGeoPoint", "comment": "Geolocation" }, { "name": "heading", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "For live locations, a direction in which the location moves, in degrees; 1-360" }, { "name": "period", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Validity period" }, { "name": "proximity_notification_radius", "type": "int", "typeModifiers": { "predicate": "flags.3" }, "comment": "For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000)" }, { "name": "reply_markup", "type": "ReplyMarkup", "typeModifiers": { "predicate": "flags.2" }, "comment": "Reply markup for bot/inline keyboards" }] }, { "kind": "class", "name": "inputBotInlineMessageMediaVenue", "type": "InputBotInlineMessage", "id": 1098628881, "comment": "Venue", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "geo_point", "type": "InputGeoPoint", "comment": "Geolocation" }, { "name": "title", "type": "string", "comment": "Venue name" }, { "name": "address", "type": "string", "comment": "Address" }, { "name": "provider", "type": "string", "comment": "Venue provider: currently only \"foursquare\" and \"gplaces\" (Google Places) need to be supported" }, { "name": "venue_id", "type": "string", "comment": "Venue ID in the provider's database" }, { "name": "venue_type", "type": "string", "comment": "Venue type in the provider's database" }, { "name": "reply_markup", "type": "ReplyMarkup", "typeModifiers": { "predicate": "flags.2" }, "comment": "Inline keyboard" }] }, { "kind": "class", "name": "inputBotInlineMessageMediaContact", "type": "InputBotInlineMessage", "id": 2800599037, "comment": "A contact", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "phone_number", "type": "string", "comment": "Phone number" }, { "name": "first_name", "type": "string", "comment": "First name" }, { "name": "last_name", "type": "string", "comment": "Last name" }, { "name": "vcard", "type": "string", "comment": "VCard info" }, { "name": "reply_markup", "type": "ReplyMarkup", "typeModifiers": { "predicate": "flags.2" }, "comment": "Inline keyboard" }] }, { "kind": "class", "name": "inputBotInlineMessageGame", "type": "InputBotInlineMessage", "id": 1262639204, "comment": "A game", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "reply_markup", "type": "ReplyMarkup", "typeModifiers": { "predicate": "flags.2" }, "comment": "Inline keyboard" }] }, { "kind": "class", "name": "inputBotInlineMessageMediaInvoice", "type": "InputBotInlineMessage", "id": 3622273573, "comment": "An invoice", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "title", "type": "string", "comment": "Product name, 1-32 characters" }, { "name": "description", "type": "string", "comment": "Product description, 1-255 characters" }, { "name": "photo", "type": "InputWebDocument", "typeModifiers": { "predicate": "flags.0" }, "comment": "Invoice photo" }, { "name": "invoice", "type": "Invoice", "comment": "The invoice" }, { "name": "payload", "type": "bytes", "comment": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes." }, { "name": "provider", "type": "string", "comment": "Payments provider token, obtained via Botfather" }, { "name": "provider_data", "type": "DataJSON", "comment": "A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider." }, { "name": "reply_markup", "type": "ReplyMarkup", "typeModifiers": { "predicate": "flags.2" }, "comment": "Inline keyboard" }] }, { "kind": "class", "name": "inputBotInlineMessageMediaWebPage", "type": "InputBotInlineMessage", "id": 3185362192, "comment": "Specifies options that will be used to generate the link preview for the message, or even a standalone link preview without an attached message.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "invert_media", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom." }, { "name": "force_large_media", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "If set, specifies that a large media preview should be used." }, { "name": "force_small_media", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "If set, specifies that a small media preview should be used." }, { "name": "optional", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "If not set, a WEBPAGE_NOT_FOUND RPC error will be emitted if a webpage preview cannot be generated for the specified url; otherwise, no error will be emitted (unless the provided message is also empty, in which case a MESSAGE_EMPTY will be emitted, instead)." }, { "name": "message", "type": "string", "comment": "The message, can be empty." }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.1", "isVector": true }, "comment": "Message entities for styled text" }, { "name": "url", "type": "string", "comment": "The URL to use for the link preview." }, { "name": "reply_markup", "type": "ReplyMarkup", "typeModifiers": { "predicate": "flags.2" }, "comment": "Inline keyboard" }] }, { "kind": "class", "name": "inputBotInlineResult", "type": "InputBotInlineResult", "id": 2294256409, "comment": "An inline bot result", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "id", "type": "string", "comment": "ID of result" }, { "name": "type", "type": "string", "comment": "Result type (see bot API docs)" }, { "name": "title", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Result title" }, { "name": "description", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "Result description" }, { "name": "url", "type": "string", "typeModifiers": { "predicate": "flags.3" }, "comment": "URL of result" }, { "name": "thumb", "type": "InputWebDocument", "typeModifiers": { "predicate": "flags.4" }, "comment": "Thumbnail for result" }, { "name": "content", "type": "InputWebDocument", "typeModifiers": { "predicate": "flags.5" }, "comment": "Result contents" }, { "name": "send_message", "type": "InputBotInlineMessage", "comment": "Message to send when the result is selected" }] }, { "kind": "class", "name": "inputBotInlineResultPhoto", "type": "InputBotInlineResult", "id": 2832753831, "comment": "Photo", "arguments": [{ "name": "id", "type": "string", "comment": "Result ID" }, { "name": "type", "type": "string", "comment": "Result type (see bot API docs)" }, { "name": "photo", "type": "InputPhoto", "comment": "Photo to send" }, { "name": "send_message", "type": "InputBotInlineMessage", "comment": "Message to send when the result is selected" }] }, { "kind": "class", "name": "inputBotInlineResultDocument", "type": "InputBotInlineResult", "id": 4294507972, "comment": "Document (media of any type except for photos)", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "id", "type": "string", "comment": "Result ID" }, { "name": "type", "type": "string", "comment": "Result type (see bot API docs)" }, { "name": "title", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Result title" }, { "name": "description", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "Result description" }, { "name": "document", "type": "InputDocument", "comment": "Document to send" }, { "name": "send_message", "type": "InputBotInlineMessage", "comment": "Message to send when the result is selected" }] }, { "kind": "class", "name": "inputBotInlineResultGame", "type": "InputBotInlineResult", "id": 1336154098, "comment": "Game", "arguments": [{ "name": "id", "type": "string", "comment": "Result ID" }, { "name": "short_name", "type": "string", "comment": "Game short name" }, { "name": "send_message", "type": "InputBotInlineMessage", "comment": "Message to send when the result is selected" }] }, { "kind": "class", "name": "botInlineMessageMediaAuto", "type": "BotInlineMessage", "id": 1984755728, "comment": "Send whatever media is attached to the {@link RawBotInlineMediaResult}", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "invert_media", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom." }, { "name": "message", "type": "string", "comment": "Caption" }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.1", "isVector": true }, "comment": "Message entities for styled text" }, { "name": "reply_markup", "type": "ReplyMarkup", "typeModifiers": { "predicate": "flags.2" }, "comment": "Inline keyboard" }] }, { "kind": "class", "name": "botInlineMessageText", "type": "BotInlineMessage", "id": 2357159394, "comment": "Send a simple text message", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "no_webpage", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Disable webpage preview" }, { "name": "invert_media", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom." }, { "name": "message", "type": "string", "comment": "The message" }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.1", "isVector": true }, "comment": "Message entities for styled text" }, { "name": "reply_markup", "type": "ReplyMarkup", "typeModifiers": { "predicate": "flags.2" }, "comment": "Inline keyboard" }] }, { "kind": "class", "name": "botInlineMessageMediaGeo", "type": "BotInlineMessage", "id": 85477117, "comment": "Send a geolocation", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "geo", "type": "GeoPoint", "comment": "Geolocation" }, { "name": "heading", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "For live locations, a direction in which the location moves, in degrees; 1-360." }, { "name": "period", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Validity period" }, { "name": "proximity_notification_radius", "type": "int", "typeModifiers": { "predicate": "flags.3" }, "comment": "For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000)." }, { "name": "reply_markup", "type": "ReplyMarkup", "typeModifiers": { "predicate": "flags.2" }, "comment": "Inline keyboard" }] }, { "kind": "class", "name": "botInlineMessageMediaVenue", "type": "BotInlineMessage", "id": 2324063644, "comment": "Send a venue", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "geo", "type": "GeoPoint", "comment": "Geolocation of venue" }, { "name": "title", "type": "string", "comment": "Venue name" }, { "name": "address", "type": "string", "comment": "Address" }, { "name": "provider", "type": "string", "comment": "Venue provider: currently only \"foursquare\" and \"gplaces\" (Google Places) need to be supported" }, { "name": "venue_id", "type": "string", "comment": "Venue ID in the provider's database" }, { "name": "venue_type", "type": "string", "comment": "Venue type in the provider's database" }, { "name": "reply_markup", "type": "ReplyMarkup", "typeModifiers": { "predicate": "flags.2" }, "comment": "Inline keyboard" }] }, { "kind": "class", "name": "botInlineMessageMediaContact", "type": "BotInlineMessage", "id": 416402882, "comment": "Send a contact", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "phone_number", "type": "string", "comment": "Phone number" }, { "name": "first_name", "type": "string", "comment": "First name" }, { "name": "last_name", "type": "string", "comment": "Last name" }, { "name": "vcard", "type": "string", "comment": "VCard info" }, { "name": "reply_markup", "type": "ReplyMarkup", "typeModifiers": { "predicate": "flags.2" }, "comment": "Inline keyboard" }] }, { "kind": "class", "name": "botInlineMessageMediaInvoice", "type": "BotInlineMessage", "id": 894081801, "comment": "Send an invoice", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "shipping_address_requested", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Set this flag if you require the user's shipping address to complete the order" }, { "name": "test", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Test invoice" }, { "name": "title", "type": "string", "comment": "Product name, 1-32 characters" }, { "name": "description", "type": "string", "comment": "Product description, 1-255 characters" }, { "name": "photo", "type": "WebDocument", "typeModifiers": { "predicate": "flags.0" }, "comment": "Product photo" }, { "name": "currency", "type": "string", "comment": "Three-letter ISO 4217 currency code, or XTR for Telegram Stars." }, { "name": "total_amount", "type": "long", "comment": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." }, { "name": "reply_markup", "type": "ReplyMarkup", "typeModifiers": { "predicate": "flags.2" }, "comment": "Inline keyboard" }] }, { "kind": "class", "name": "botInlineMessageMediaWebPage", "type": "BotInlineMessage", "id": 2157631910, "comment": "Specifies options that must be used to generate the link preview for the message, or even a standalone link preview without an attached message.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "invert_media", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom." }, { "name": "force_large_media", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "If set, specifies that a large media preview should be used." }, { "name": "force_small_media", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "If set, specifies that a small media preview should be used." }, { "name": "manual", "type": "true", "typeModifiers": { "predicate": "flags.7" }, "comment": "If set, indicates that the URL used for the webpage preview was specified manually using {@link RawInputMediaWebPage}, and may not be related to any of the URLs specified in the message." }, { "name": "safe", "type": "true", "typeModifiers": { "predicate": "flags.8" }, "comment": "If set, the link can be opened directly without user confirmation." }, { "name": "message", "type": "string", "comment": "The message, can be empty." }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.1", "isVector": true }, "comment": "Message entities for styled text" }, { "name": "url", "type": "string", "comment": "The URL to use for the link preview." }, { "name": "reply_markup", "type": "ReplyMarkup", "typeModifiers": { "predicate": "flags.2" }, "comment": "Reply markup for sending bot buttons" }] }, { "kind": "class", "name": "botInlineResult", "type": "BotInlineResult", "id": 295067450, "comment": "Generic result", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "id", "type": "string", "comment": "Result ID" }, { "name": "type", "type": "string", "comment": "Result type (see bot API docs)" }, { "name": "title", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Result title" }, { "name": "description", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "Result description" }, { "name": "url", "type": "string", "typeModifiers": { "predicate": "flags.3" }, "comment": "URL of article or webpage" }, { "name": "thumb", "type": "WebDocument", "typeModifiers": { "predicate": "flags.4" }, "comment": "Thumbnail for the result" }, { "name": "content", "type": "WebDocument", "typeModifiers": { "predicate": "flags.5" }, "comment": "Content of the result" }, { "name": "send_message", "type": "BotInlineMessage", "comment": "Message to send" }] }, { "kind": "class", "name": "botInlineMediaResult", "type": "BotInlineResult", "id": 400266251, "comment": "Media result", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "id", "type": "string", "comment": "Result ID" }, { "name": "type", "type": "string", "comment": "Result type (see bot API docs)" }, { "name": "photo", "type": "Photo", "typeModifiers": { "predicate": "flags.0" }, "comment": "If type is photo, the photo to send" }, { "name": "document", "type": "Document", "typeModifiers": { "predicate": "flags.1" }, "comment": "If type is document, the document to send" }, { "name": "title", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "Result title" }, { "name": "description", "type": "string", "typeModifiers": { "predicate": "flags.3" }, "comment": "Description" }, { "name": "send_message", "type": "BotInlineMessage", "comment": "Depending on the type and on the constructor, contains the caption of the media or the content of the message to be sent instead of the media" }] }, { "kind": "class", "name": "messages.botResults", "type": "messages.BotResults", "id": 3760321270, "comment": "Result of a query to an inline bot", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "gallery", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the result is a picture gallery" }, { "name": "query_id", "type": "long", "comment": "Query ID" }, { "name": "next_offset", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "The next offset to use when navigating through results" }, { "name": "switch_pm", "type": "InlineBotSwitchPM", "typeModifiers": { "predicate": "flags.2" }, "comment": "Shown as a button on top of the remaining inline result list; if clicked, redirects the user to a private chat with the bot with the specified start parameter." }, { "name": "switch_webview", "type": "InlineBotWebView", "typeModifiers": { "predicate": "flags.3" }, "comment": "Shown as a button on top of the remaining inline result list; if clicked, opens the specified inline mode mini app." }, { "name": "results", "type": "BotInlineResult", "typeModifiers": { "isVector": true }, "comment": "The results" }, { "name": "cache_time", "type": "int", "comment": "Caching validity of the results" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Users mentioned in the results" }] }, { "kind": "class", "name": "exportedMessageLink", "type": "ExportedMessageLink", "id": 1571494644, "comment": "Link to a message in a supergroup/channel", "arguments": [{ "name": "link", "type": "string", "comment": "URL" }, { "name": "html", "type": "string", "comment": "Embed code" }] }, { "kind": "class", "name": "messageFwdHeader", "type": "MessageFwdHeader", "id": 1313731771, "comment": "Info about a forwarded message", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "imported", "type": "true", "typeModifiers": { "predicate": "flags.7" }, "comment": "Whether this message was imported from a foreign chat service, click here for more info »" }, { "name": "saved_out", "type": "true", "typeModifiers": { "predicate": "flags.11" }, "comment": "Only for messages forwarded to saved messages », set if the original message was outgoing (though the message may have been originally outgoing even if this flag is not set, if from_id points to the current user)." }, { "name": "from_id", "type": "Peer", "typeModifiers": { "predicate": "flags.0" }, "comment": "The ID of the user that originally sent the message" }, { "name": "from_name", "type": "string", "typeModifiers": { "predicate": "flags.5" }, "comment": "The name of the user that originally sent the message" }, { "name": "date", "type": "int", "comment": "When was the message originally sent" }, { "name": "channel_post", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "ID of the channel message that was forwarded" }, { "name": "post_author", "type": "string", "typeModifiers": { "predicate": "flags.3" }, "comment": "For channels and if signatures are enabled, author of the channel message" }, { "name": "saved_from_peer", "type": "Peer", "typeModifiers": { "predicate": "flags.4" }, "comment": "Only for messages forwarded to saved messages », contains the dialog where the message was originally sent." }, { "name": "saved_from_msg_id", "type": "int", "typeModifiers": { "predicate": "flags.4" }, "comment": "Only for messages forwarded to saved messages », contains the original ID of the message in saved_from_peer." }, { "name": "saved_from_id", "type": "Peer", "typeModifiers": { "predicate": "flags.8" }, "comment": "Only for forwarded messages reforwarded to saved messages », contains the sender of the original message (i.e. if user A sends a message, then user B forwards it somewhere, then user C saves it to saved messages, this field will contain the ID of user B and from_id will contain the ID of user A)." }, { "name": "saved_from_name", "type": "string", "typeModifiers": { "predicate": "flags.9" }, "comment": "Only for forwarded messages from users with forward privacy enabled, sent by users with forward privacy enabled, reforwarded to saved messages », contains the sender of the original message (i.e. if user A (fwd privacy enabled) sends a message, then user B (fwd privacy enabled) forwards it somewhere, then user C saves it to saved messages, this field will contain the name of user B and from_name will contain the name of user A)." }, { "name": "saved_date", "type": "int", "typeModifiers": { "predicate": "flags.10" }, "comment": "Only for forwarded messages reforwarded to saved messages », indicates when was the original message sent (i.e. if user A sends a message @ unixtime 1, then user B forwards it somewhere @ unixtime 2, then user C saves it to saved messages @ unixtime 3, this field will contain 2, date will contain 1 and the date of the containing {@link RawMessage} will contain 3)." }, { "name": "psa_type", "type": "string", "typeModifiers": { "predicate": "flags.6" }, "comment": "PSA type" }] }, { "kind": "class", "name": "auth.codeTypeSms", "type": "auth.CodeType", "id": 1923290508, "comment": "The next time, the authentication code will be delivered via an immediately canceled incoming call.", "arguments": [] }, { "kind": "class", "name": "auth.codeTypeCall", "type": "auth.CodeType", "id": 1948046307, "comment": "The next time, the authentication code is to be delivered via an outgoing phone call.", "arguments": [] }, { "kind": "class", "name": "auth.codeTypeFlashCall", "type": "auth.CodeType", "id": 577556219, "comment": "The next time, the authentication code will be delivered via an immediately canceled incoming call.", "arguments": [] }, { "kind": "class", "name": "auth.codeTypeMissedCall", "type": "auth.CodeType", "id": 3592083182, "comment": "The next time, the authentication code will be delivered via an immediately canceled incoming call, handled manually by the user.", "arguments": [] }, { "kind": "class", "name": "auth.codeTypeFragmentSms", "type": "auth.CodeType", "id": 116234636, "comment": "The next time, the authentication code will be delivered via fragment.com", "arguments": [] }, { "kind": "class", "name": "auth.sentCodeTypeApp", "type": "auth.SentCodeType", "id": 1035688326, "comment": "The code was sent through the telegram app", "arguments": [{ "name": "length", "type": "int", "comment": "Length of the code in bytes" }] }, { "kind": "class", "name": "auth.sentCodeTypeSms", "type": "auth.SentCodeType", "id": 3221273506, "comment": "The code was sent via SMS", "arguments": [{ "name": "length", "type": "int", "comment": "Length of the code in bytes" }] }, { "kind": "class", "name": "auth.sentCodeTypeCall", "type": "auth.SentCodeType", "id": 1398007207, "comment": "The code will be sent via a phone call: a synthesized voice will tell the user which verification code to input.", "arguments": [{ "name": "length", "type": "int", "comment": "Length of the verification code" }] }, { "kind": "class", "name": "auth.sentCodeTypeFlashCall", "type": "auth.SentCodeType", "id": 2869151449, "comment": "The code will be sent via a flash phone call, that will be closed immediately. The phone code will then be the phone number itself, just make sure that the phone number matches the specified pattern.", "arguments": [{ "name": "pattern", "type": "string", "comment": "pattern to match" }] }, { "kind": "class", "name": "auth.sentCodeTypeMissedCall", "type": "auth.SentCodeType", "id": 2181063812, "comment": "The code will be sent via a flash phone call, that will be closed immediately. The last digits of the phone number that calls are the code that must be entered manually by the user.", "arguments": [{ "name": "prefix", "type": "string", "comment": "Prefix of the phone number from which the call will be made" }, { "name": "length", "type": "int", "comment": "Length of the verification code" }] }, { "kind": "class", "name": "auth.sentCodeTypeEmailCode", "type": "auth.SentCodeType", "id": 4098946459, "comment": "The code was sent via the previously configured login email »", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "apple_signin_allowed", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether authorization through Apple ID is allowed" }, { "name": "google_signin_allowed", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether authorization through Google ID is allowed" }, { "name": "email_pattern", "type": "string", "comment": "Pattern of the email" }, { "name": "length", "type": "int", "comment": "Length of the sent verification code" }, { "name": "reset_available_period", "type": "int", "typeModifiers": { "predicate": "flags.3" }, "comment": "Clients should wait for the specified amount of seconds before allowing the user to invoke {@link auth.RawResetLoginEmailRequest} (will be 0 for Premium users)." }, { "name": "reset_pending_date", "type": "int", "typeModifiers": { "predicate": "flags.4" }, "comment": "An email reset was already requested, and will occur at the specified date." }] }, { "kind": "class", "name": "auth.sentCodeTypeSetUpEmailRequired", "type": "auth.SentCodeType", "id": 2773032426, "comment": "The user should add and verify an email address in order to login as described here ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "apple_signin_allowed", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether authorization through Apple ID is allowed" }, { "name": "google_signin_allowed", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether authorization through Google ID is allowed" }] }, { "kind": "class", "name": "auth.sentCodeTypeFragmentSms", "type": "auth.SentCodeType", "id": 3646315577, "comment": "The code was delivered via fragment.com.", "arguments": [{ "name": "url", "type": "string", "comment": "Open the specified URL to log into fragment.com with the wallet that owns the specified phone number and view the code." }, { "name": "length", "type": "int", "comment": "Length of the delivered code." }] }, { "kind": "class", "name": "auth.sentCodeTypeFirebaseSms", "type": "auth.SentCodeType", "id": 10475318, "comment": "An authentication code should be delivered via SMS after Firebase attestation, as described in the auth documentation ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "nonce", "type": "bytes", "typeModifiers": { "predicate": "flags.0" }, "comment": "On Android, the nonce to be used as described in the auth documentation »" }, { "name": "play_integrity_project_id", "type": "long", "typeModifiers": { "predicate": "flags.2" }, "comment": "Google Play Integrity project ID" }, { "name": "play_integrity_nonce", "type": "bytes", "typeModifiers": { "predicate": "flags.2" }, "comment": "Play Integrity API nonce" }, { "name": "receipt", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "On iOS, must be compared with the receipt extracted from the received push notification." }, { "name": "push_timeout", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "On iOS: if a push notification with the ios_push_secret isn't received within push_timeout seconds, the next_type authentication method must be used, with {@link auth.RawResendCodeRequest}." }, { "name": "length", "type": "int", "comment": "Length of the code that will be delivered." }] }, { "kind": "class", "name": "auth.sentCodeTypeSmsWord", "type": "auth.SentCodeType", "id": 2752949377, "comment": "The code was sent via SMS as a secret word, starting with the letter specified in beginning", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "beginning", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, the secret word in the sent SMS (which may contain multiple words) starts with this letter." }] }, { "kind": "class", "name": "auth.sentCodeTypeSmsPhrase", "type": "auth.SentCodeType", "id": 3010958511, "comment": "The code was sent via SMS as a secret phrase starting with the word specified in beginning", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "beginning", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, the secret phrase (and the SMS) starts with this word." }] }, { "kind": "class", "name": "messages.botCallbackAnswer", "type": "messages.BotCallbackAnswer", "id": 911761060, "comment": "Callback answer sent by the bot in response to a button press", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "alert", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether an alert should be shown to the user instead of a toast notification" }, { "name": "has_url", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether an URL is present" }, { "name": "native_ui", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "Whether to show games in WebView or in native UI." }, { "name": "message", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Alert to show" }, { "name": "url", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "URL to open" }, { "name": "cache_time", "type": "int", "comment": "For how long should this answer be cached" }] }, { "kind": "class", "name": "messages.messageEditData", "type": "messages.MessageEditData", "id": 649453030, "comment": "Message edit data for media", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "caption", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Media caption, if the specified media's caption can be edited" }] }, { "kind": "class", "name": "inputBotInlineMessageID", "type": "InputBotInlineMessageID", "id": 2299280777, "comment": "Represents a sent inline message from the perspective of a bot (legacy constructor)", "arguments": [{ "name": "dc_id", "type": "int", "comment": "DC ID to use when working with this inline message" }, { "name": "id", "type": "long", "comment": "ID of message, contains both the (32-bit, legacy) owner ID and the message ID, used only for Bot API backwards compatibility with 32-bit user ID." }, { "name": "access_hash", "type": "long", "comment": "Access hash of message" }] }, { "kind": "class", "name": "inputBotInlineMessageID64", "type": "InputBotInlineMessageID", "id": 3067680215, "comment": "Represents a sent inline message from the perspective of a bot", "arguments": [{ "name": "dc_id", "type": "int", "comment": "DC ID to use when working with this inline message" }, { "name": "owner_id", "type": "long", "comment": "ID of the owner of this message" }, { "name": "id", "type": "int", "comment": "ID of message" }, { "name": "access_hash", "type": "long", "comment": "Access hash of message" }] }, { "kind": "class", "name": "inlineBotSwitchPM", "type": "InlineBotSwitchPM", "id": 1008755359, "comment": "The bot requested the user to message them in private", "arguments": [{ "name": "text", "type": "string", "comment": "Text for the button that switches the user to a private chat with the bot and sends the bot a start message with the parameter start_parameter (can be empty)" }, { "name": "start_param", "type": "string", "comment": "The parameter for the /start parameter" }] }, { "kind": "class", "name": "messages.peerDialogs", "type": "messages.PeerDialogs", "id": 863093588, "comment": "Dialog info of multiple peers", "arguments": [{ "name": "dialogs", "type": "Dialog", "typeModifiers": { "isVector": true }, "comment": "Dialog info" }, { "name": "messages", "type": "Message", "typeModifiers": { "isVector": true }, "comment": "Messages mentioned in dialog info" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Users" }, { "name": "state", "type": "updates.State", "comment": "Current update state of dialog" }] }, { "kind": "class", "name": "topPeer", "type": "TopPeer", "id": 3989684315, "comment": "Top peer", "arguments": [{ "name": "peer", "type": "Peer", "comment": "Peer" }, { "name": "rating", "type": "double", "comment": "Rating as computed in top peer rating »" }] }, { "kind": "class", "name": "topPeerCategoryBotsPM", "type": "TopPeerCategory", "id": 2875595611, "comment": "Most used bots", "arguments": [] }, { "kind": "class", "name": "topPeerCategoryBotsInline", "type": "TopPeerCategory", "id": 344356834, "comment": "Most used inline bots", "arguments": [] }, { "kind": "class", "name": "topPeerCategoryCorrespondents", "type": "TopPeerCategory", "id": 104314861, "comment": "Users we've chatted most frequently with", "arguments": [] }, { "kind": "class", "name": "topPeerCategoryGroups", "type": "TopPeerCategory", "id": 3172442442, "comment": "Often-opened groups and supergroups", "arguments": [] }, { "kind": "class", "name": "topPeerCategoryChannels", "type": "TopPeerCategory", "id": 371037736, "comment": "Most frequently visited channels", "arguments": [] }, { "kind": "class", "name": "topPeerCategoryPhoneCalls", "type": "TopPeerCategory", "id": 511092620, "comment": "Most frequently called users", "arguments": [] }, { "kind": "class", "name": "topPeerCategoryForwardUsers", "type": "TopPeerCategory", "id": 2822794409, "comment": "Users to which the users often forwards messages to", "arguments": [] }, { "kind": "class", "name": "topPeerCategoryForwardChats", "type": "TopPeerCategory", "id": 4226728176, "comment": "Chats to which the users often forwards messages to", "arguments": [] }, { "kind": "class", "name": "topPeerCategoryBotsApp", "type": "TopPeerCategory", "id": 4255022060, "comment": "Most frequently used Main Mini Bot Apps.", "arguments": [] }, { "kind": "class", "name": "topPeerCategoryPeers", "type": "TopPeerCategoryPeers", "id": 4219683473, "comment": "Top peer category", "arguments": [{ "name": "category", "type": "TopPeerCategory", "comment": "Top peer category of peers" }, { "name": "count", "type": "int", "comment": "Count of peers" }, { "name": "peers", "type": "TopPeer", "typeModifiers": { "isVector": true }, "comment": "Peers" }] }, { "kind": "class", "name": "contacts.topPeersNotModified", "type": "contacts.TopPeers", "id": 3727060725, "comment": "Top peer info hasn't changed", "arguments": [] }, { "kind": "class", "name": "contacts.topPeers", "type": "contacts.TopPeers", "id": 1891070632, "comment": "Top peers", "arguments": [{ "name": "categories", "type": "TopPeerCategoryPeers", "typeModifiers": { "isVector": true }, "comment": "Top peers by top peer category" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Users" }] }, { "kind": "class", "name": "contacts.topPeersDisabled", "type": "contacts.TopPeers", "id": 3039597469, "comment": "Top peers disabled", "arguments": [] }, { "kind": "class", "name": "draftMessageEmpty", "type": "DraftMessage", "id": 453805082, "comment": "Empty draft", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "date", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "When was the draft last updated" }] }, { "kind": "class", "name": "draftMessage", "type": "DraftMessage", "id": 761606687, "comment": "Represents a message draft.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "no_webpage", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether no webpage preview will be generated" }, { "name": "invert_media", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom." }, { "name": "reply_to", "type": "InputReplyTo", "typeModifiers": { "predicate": "flags.4" }, "comment": "If set, indicates that the message should be sent in reply to the specified message or story." }, { "name": "message", "type": "string", "comment": "The draft" }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.3", "isVector": true }, "comment": "Message entities for styled text." }, { "name": "media", "type": "InputMedia", "typeModifiers": { "predicate": "flags.5" }, "comment": "Media." }, { "name": "date", "type": "int", "comment": "Date of last update of the draft." }, { "name": "effect", "type": "long", "typeModifiers": { "predicate": "flags.7" }, "comment": "A message effect that should be played as specified here »." }] }, { "kind": "class", "name": "messages.featuredStickersNotModified", "type": "messages.FeaturedStickers", "id": 3336309862, "comment": "Featured stickers haven't changed", "arguments": [{ "name": "count", "type": "int", "comment": "Total number of featured stickers" }] }, { "kind": "class", "name": "messages.featuredStickers", "type": "messages.FeaturedStickers", "id": 3191351558, "comment": "Featured stickersets", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "premium", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether this is a premium stickerset" }, { "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here" }, { "name": "count", "type": "int", "comment": "Total number of featured stickers" }, { "name": "sets", "type": "StickerSetCovered", "typeModifiers": { "isVector": true }, "comment": "Featured stickersets" }, { "name": "unread", "type": "long", "typeModifiers": { "isVector": true }, "comment": "IDs of new featured stickersets" }] }, { "kind": "class", "name": "messages.recentStickersNotModified", "type": "messages.RecentStickers", "id": 186120336, "comment": "No new recent sticker was found", "arguments": [] }, { "kind": "class", "name": "messages.recentStickers", "type": "messages.RecentStickers", "id": 2295561302, "comment": "Recently used stickers", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here" }, { "name": "packs", "type": "StickerPack", "typeModifiers": { "isVector": true }, "comment": "Emojis associated to stickers" }, { "name": "stickers", "type": "Document", "typeModifiers": { "isVector": true }, "comment": "Recent stickers" }, { "name": "dates", "type": "int", "typeModifiers": { "isVector": true }, "comment": "When was each sticker last used" }] }, { "kind": "class", "name": "messages.archivedStickers", "type": "messages.ArchivedStickers", "id": 1338747336, "comment": "Archived stickersets", "arguments": [{ "name": "count", "type": "int", "comment": "Number of archived stickers" }, { "name": "sets", "type": "StickerSetCovered", "typeModifiers": { "isVector": true }, "comment": "Archived stickersets" }] }, { "kind": "class", "name": "messages.stickerSetInstallResultSuccess", "type": "messages.StickerSetInstallResult", "id": 946083368, "comment": "The stickerset was installed successfully", "arguments": [] }, { "kind": "class", "name": "messages.stickerSetInstallResultArchive", "type": "messages.StickerSetInstallResult", "id": 904138920, "comment": "The stickerset was installed, but since there are too many stickersets some were archived", "arguments": [{ "name": "sets", "type": "StickerSetCovered", "typeModifiers": { "isVector": true }, "comment": "Archived stickersets" }] }, { "kind": "class", "name": "stickerSetCovered", "type": "StickerSetCovered", "id": 1678812626, "comment": "Stickerset with a single sticker as preview", "arguments": [{ "name": "set", "type": "StickerSet", "comment": "Stickerset" }, { "name": "cover", "type": "Document", "comment": "Preview" }] }, { "kind": "class", "name": "stickerSetMultiCovered", "type": "StickerSetCovered", "id": 872932635, "comment": "Stickerset, with multiple stickers as preview", "arguments": [{ "name": "set", "type": "StickerSet", "comment": "Stickerset" }, { "name": "covers", "type": "Document", "typeModifiers": { "isVector": true }, "comment": "Preview stickers" }] }, { "kind": "class", "name": "stickerSetFullCovered", "type": "StickerSetCovered", "id": 1087454222, "comment": "Stickerset preview with all stickers of the stickerset included.
\nCurrently used only for custom emoji stickersets, to avoid a further call to {@link messages.RawGetStickerSetRequest}.", "arguments": [{ "name": "set", "type": "StickerSet", "comment": "Stickerset" }, { "name": "packs", "type": "StickerPack", "typeModifiers": { "isVector": true }, "comment": "Emoji information about every sticker in the stickerset" }, { "name": "keywords", "type": "StickerKeyword", "typeModifiers": { "isVector": true }, "comment": "Keywords for some or every sticker in the stickerset." }, { "name": "documents", "type": "Document", "typeModifiers": { "isVector": true }, "comment": "Stickers" }] }, { "kind": "class", "name": "stickerSetNoCovered", "type": "StickerSetCovered", "id": 2008112412, "comment": "Just the stickerset information, with no previews.", "arguments": [{ "name": "set", "type": "StickerSet", "comment": "Stickerset information." }] }, { "kind": "class", "name": "maskCoords", "type": "MaskCoords", "id": 2933316530, "comment": "Position on a photo where a mask should be placed when attaching stickers to media »\n\nThe n position indicates where the mask should be placed:", "arguments": [{ "name": "n", "type": "int", "comment": "Part of the face, relative to which the mask should be placed" }, { "name": "x", "type": "double", "comment": "Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position)" }, { "name": "y", "type": "double", "comment": "Shift by Y-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just below the default mask position)" }, { "name": "zoom", "type": "double", "comment": "Mask scaling coefficient. (For example, 2.0 means a doubled size)" }] }, { "kind": "class", "name": "inputStickeredMediaPhoto", "type": "InputStickeredMedia", "id": 1251549527, "comment": "A photo with stickers attached", "arguments": [{ "name": "id", "type": "InputPhoto", "comment": "The photo" }] }, { "kind": "class", "name": "inputStickeredMediaDocument", "type": "InputStickeredMedia", "id": 70813275, "comment": "A document with stickers attached", "arguments": [{ "name": "id", "type": "InputDocument", "comment": "The document" }] }, { "kind": "class", "name": "game", "type": "Game", "id": 3187238203, "comment": "Indicates an already sent game", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "id", "type": "long", "comment": "ID of the game" }, { "name": "access_hash", "type": "long", "comment": "Access hash of the game" }, { "name": "short_name", "type": "string", "comment": "Short name for the game" }, { "name": "title", "type": "string", "comment": "Title of the game" }, { "name": "description", "type": "string", "comment": "Game description" }, { "name": "photo", "type": "Photo", "comment": "Game preview" }, { "name": "document", "type": "Document", "typeModifiers": { "predicate": "flags.0" }, "comment": "Optional attached document" }] }, { "kind": "class", "name": "inputGameID", "type": "InputGame", "id": 53231223, "comment": "Indicates an already sent game", "arguments": [{ "name": "id", "type": "long", "comment": "game ID from Game constructor" }, { "name": "access_hash", "type": "long", "comment": "access hash from Game constructor" }] }, { "kind": "class", "name": "inputGameShortName", "type": "InputGame", "id": 3274827786, "comment": "Game by short name", "arguments": [{ "name": "bot_id", "type": "InputUser", "comment": "The bot that provides the game" }, { "name": "short_name", "type": "string", "comment": "The game's short name, usually obtained from a game link »" }] }, { "kind": "class", "name": "highScore", "type": "HighScore", "id": 1940093419, "comment": "Game highscore", "arguments": [{ "name": "pos", "type": "int", "comment": "Position in highscore list" }, { "name": "user_id", "type": "int53", "comment": "User ID" }, { "name": "score", "type": "int", "comment": "Score" }] }, { "kind": "class", "name": "messages.highScores", "type": "messages.HighScores", "id": 2587622809, "comment": "Highscores in a game", "arguments": [{ "name": "scores", "type": "HighScore", "typeModifiers": { "isVector": true }, "comment": "Highscores" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Users, associated to the highscores" }] }, { "kind": "class", "name": "textEmpty", "type": "RichText", "id": 3695018575, "comment": "Empty rich text element", "arguments": [] }, { "kind": "class", "name": "textPlain", "type": "RichText", "id": 1950782688, "comment": "Plain text", "arguments": [{ "name": "text", "type": "string", "comment": "Text" }] }, { "kind": "class", "name": "textBold", "type": "RichText", "id": 1730456516, "comment": "Bold text", "arguments": [{ "name": "text", "type": "RichText", "comment": "Text" }] }, { "kind": "class", "name": "textItalic", "type": "RichText", "id": 3641877916, "comment": "Italic text", "arguments": [{ "name": "text", "type": "RichText", "comment": "Text" }] }, { "kind": "class", "name": "textUnderline", "type": "RichText", "id": 3240501956, "comment": "Underlined text", "arguments": [{ "name": "text", "type": "RichText", "comment": "Text" }] }, { "kind": "class", "name": "textStrike", "type": "RichText", "id": 2616769429, "comment": "Strikethrough text", "arguments": [{ "name": "text", "type": "RichText", "comment": "Text" }] }, { "kind": "class", "name": "textFixed", "type": "RichText", "id": 1816074681, "comment": "fixed-width rich text", "arguments": [{ "name": "text", "type": "RichText", "comment": "Text" }] }, { "kind": "class", "name": "textUrl", "type": "RichText", "id": 1009288385, "comment": "Link", "arguments": [{ "name": "text", "type": "RichText", "comment": "Text of link" }, { "name": "url", "type": "string", "comment": "Webpage HTTP URL" }, { "name": "webpage_id", "type": "long", "comment": "If a preview was already generated for the page, the page ID" }] }, { "kind": "class", "name": "textEmail", "type": "RichText", "id": 3730443734, "comment": "Rich text email link", "arguments": [{ "name": "text", "type": "RichText", "comment": "Link text" }, { "name": "email", "type": "string", "comment": "Email address" }] }, { "kind": "class", "name": "textConcat", "type": "RichText", "id": 2120376535, "comment": "Concatenation of rich texts", "arguments": [{ "name": "texts", "type": "RichText", "typeModifiers": { "isVector": true }, "comment": "Concatenated rich texts" }] }, { "kind": "class", "name": "textSubscript", "type": "RichText", "id": 3983181060, "comment": "Subscript text", "arguments": [{ "name": "text", "type": "RichText", "comment": "Text" }] }, { "kind": "class", "name": "textSuperscript", "type": "RichText", "id": 3355139585, "comment": "Superscript text", "arguments": [{ "name": "text", "type": "RichText", "comment": "Text" }] }, { "kind": "class", "name": "textMarked", "type": "RichText", "id": 55281185, "comment": "Highlighted text", "arguments": [{ "name": "text", "type": "RichText", "comment": "Text" }] }, { "kind": "class", "name": "textPhone", "type": "RichText", "id": 483104362, "comment": "Rich text linked to a phone number", "arguments": [{ "name": "text", "type": "RichText", "comment": "Text" }, { "name": "phone", "type": "string", "comment": "Phone number" }] }, { "kind": "class", "name": "textImage", "type": "RichText", "id": 136105807, "comment": "Inline image", "arguments": [{ "name": "document_id", "type": "long", "comment": "Document ID" }, { "name": "w", "type": "int", "comment": "Width" }, { "name": "h", "type": "int", "comment": "Height" }] }, { "kind": "class", "name": "textAnchor", "type": "RichText", "id": 894777186, "comment": "Text linking to another section of the page", "arguments": [{ "name": "text", "type": "RichText", "comment": "Text" }, { "name": "name", "type": "string", "comment": "Section name" }] }, { "kind": "class", "name": "pageBlockUnsupported", "type": "PageBlock", "id": 324435594, "comment": "Unsupported IV element", "arguments": [] }, { "kind": "class", "name": "pageBlockTitle", "type": "PageBlock", "id": 1890305021, "comment": "Title", "arguments": [{ "name": "text", "type": "RichText", "comment": "Title" }] }, { "kind": "class", "name": "pageBlockSubtitle", "type": "PageBlock", "id": 2415565343, "comment": "Subtitle", "arguments": [{ "name": "text", "type": "RichText", "comment": "Text" }] }, { "kind": "class", "name": "pageBlockAuthorDate", "type": "PageBlock", "id": 3132089824, "comment": "Author and date of creation of article", "arguments": [{ "name": "author", "type": "RichText", "comment": "Author name" }, { "name": "published_date", "type": "int", "comment": "Date of publication" }] }, { "kind": "class", "name": "pageBlockHeader", "type": "PageBlock", "id": 3218105580, "comment": "Page header", "arguments": [{ "name": "text", "type": "RichText", "comment": "Contents" }] }, { "kind": "class", "name": "pageBlockSubheader", "type": "PageBlock", "id": 4046173921, "comment": "Subheader", "arguments": [{ "name": "text", "type": "RichText", "comment": "Subheader" }] }, { "kind": "class", "name": "pageBlockParagraph", "type": "PageBlock", "id": 1182402406, "comment": "A paragraph", "arguments": [{ "name": "text", "type": "RichText", "comment": "Text" }] }, { "kind": "class", "name": "pageBlockPreformatted", "type": "PageBlock", "id": 3228621118, "comment": "Preformatted (
 text)", "arguments": [{ "name": "text", "type": "RichText", "comment": "Text" }, { "name": "language", "type": "string", "comment": "Programming language of preformatted text" }] }, { "kind": "class", "name": "pageBlockFooter", "type": "PageBlock", "id": 1216809369, "comment": "Page footer", "arguments": [{ "name": "text", "type": "RichText", "comment": "Contents" }] }, { "kind": "class", "name": "pageBlockDivider", "type": "PageBlock", "id": 3676352904, "comment": "An empty block separating a page", "arguments": [] }, { "kind": "class", "name": "pageBlockAnchor", "type": "PageBlock", "id": 3456972720, "comment": "Link to section within the page itself (like anchor)", "arguments": [{ "name": "name", "type": "string", "comment": "Name of target section" }] }, { "kind": "class", "name": "pageBlockList", "type": "PageBlock", "id": 3840442385, "comment": "Unordered list of IV blocks", "arguments": [{ "name": "items", "type": "PageListItem", "typeModifiers": { "isVector": true }, "comment": "List of blocks in an IV page" }] }, { "kind": "class", "name": "pageBlockBlockquote", "type": "PageBlock", "id": 641563686, "comment": "Quote (equivalent to the HTML 
)", "arguments": [{ "name": "text", "type": "RichText", "comment": "Quote contents" }, { "name": "caption", "type": "RichText", "comment": "Caption" }] }, { "kind": "class", "name": "pageBlockPullquote", "type": "PageBlock", "id": 1329878739, "comment": "Pullquote", "arguments": [{ "name": "text", "type": "RichText", "comment": "Text" }, { "name": "caption", "type": "RichText", "comment": "Caption" }] }, { "kind": "class", "name": "pageBlockPhoto", "type": "PageBlock", "id": 391759200, "comment": "A photo", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "photo_id", "type": "long", "comment": "Photo ID" }, { "name": "caption", "type": "PageCaption", "comment": "Caption" }, { "name": "url", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "HTTP URL of page the photo leads to when clicked" }, { "name": "webpage_id", "type": "long", "typeModifiers": { "predicate": "flags.0" }, "comment": "ID of preview of the page the photo leads to when clicked" }] }, { "kind": "class", "name": "pageBlockVideo", "type": "PageBlock", "id": 2089805750, "comment": "Video", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "autoplay", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the video is set to autoplay" }, { "name": "loop", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the video is set to loop" }, { "name": "video_id", "type": "long", "comment": "Video ID" }, { "name": "caption", "type": "PageCaption", "comment": "Caption" }] }, { "kind": "class", "name": "pageBlockCover", "type": "PageBlock", "id": 972174080, "comment": "A page cover", "arguments": [{ "name": "cover", "type": "PageBlock", "comment": "Cover" }] }, { "kind": "class", "name": "pageBlockEmbed", "type": "PageBlock", "id": 2826014149, "comment": "An embedded webpage", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "full_width", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the block should be full width" }, { "name": "allow_scrolling", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether scrolling should be allowed" }, { "name": "url", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Web page URL, if available" }, { "name": "html", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "HTML-markup of the embedded page" }, { "name": "poster_photo_id", "type": "long", "typeModifiers": { "predicate": "flags.4" }, "comment": "Poster photo, if available" }, { "name": "w", "type": "int", "typeModifiers": { "predicate": "flags.5" }, "comment": "Block width, if known" }, { "name": "h", "type": "int", "typeModifiers": { "predicate": "flags.5" }, "comment": "Block height, if known" }, { "name": "caption", "type": "PageCaption", "comment": "Caption" }] }, { "kind": "class", "name": "pageBlockEmbedPost", "type": "PageBlock", "id": 4065961995, "comment": "An embedded post", "arguments": [{ "name": "url", "type": "string", "comment": "Web page URL" }, { "name": "webpage_id", "type": "long", "comment": "ID of generated webpage preview" }, { "name": "author_photo_id", "type": "long", "comment": "ID of the author's photo" }, { "name": "author", "type": "string", "comment": "Author name" }, { "name": "date", "type": "int", "comment": "Creation date" }, { "name": "blocks", "type": "PageBlock", "typeModifiers": { "isVector": true }, "comment": "Post contents" }, { "name": "caption", "type": "PageCaption", "comment": "Caption" }] }, { "kind": "class", "name": "pageBlockCollage", "type": "PageBlock", "id": 1705048653, "comment": "Collage of media", "arguments": [{ "name": "items", "type": "PageBlock", "typeModifiers": { "isVector": true }, "comment": "Media elements" }, { "name": "caption", "type": "PageCaption", "comment": "Caption" }] }, { "kind": "class", "name": "pageBlockSlideshow", "type": "PageBlock", "id": 52401552, "comment": "Slideshow", "arguments": [{ "name": "items", "type": "PageBlock", "typeModifiers": { "isVector": true }, "comment": "Slideshow items" }, { "name": "caption", "type": "PageCaption", "comment": "Caption" }] }, { "kind": "class", "name": "pageBlockChannel", "type": "PageBlock", "id": 4011282869, "comment": "Reference to a telegram channel", "arguments": [{ "name": "channel", "type": "Chat", "comment": "The channel/supergroup/chat" }] }, { "kind": "class", "name": "pageBlockAudio", "type": "PageBlock", "id": 2151899626, "comment": "Audio", "arguments": [{ "name": "audio_id", "type": "long", "comment": "Audio ID (to be fetched from the container {@link RawPage} constructor" }, { "name": "caption", "type": "PageCaption", "comment": "Audio caption" }] }, { "kind": "class", "name": "pageBlockKicker", "type": "PageBlock", "id": 504660880, "comment": "Kicker", "arguments": [{ "name": "text", "type": "RichText", "comment": "Contents" }] }, { "kind": "class", "name": "pageBlockTable", "type": "PageBlock", "id": 3209554562, "comment": "Table", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "bordered", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Does the table have a visible border?" }, { "name": "striped", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Is the table striped?" }, { "name": "title", "type": "RichText", "comment": "Title" }, { "name": "rows", "type": "PageTableRow", "typeModifiers": { "isVector": true }, "comment": "Table rows" }] }, { "kind": "class", "name": "pageBlockOrderedList", "type": "PageBlock", "id": 2592793057, "comment": "Ordered list of IV blocks", "arguments": [{ "name": "items", "type": "PageListOrderedItem", "typeModifiers": { "isVector": true }, "comment": "List items" }] }, { "kind": "class", "name": "pageBlockDetails", "type": "PageBlock", "id": 1987480557, "comment": "A collapsible details block", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "open", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the block is open by default" }, { "name": "blocks", "type": "PageBlock", "typeModifiers": { "isVector": true }, "comment": "Block contents" }, { "name": "title", "type": "RichText", "comment": "Always visible heading for the block" }] }, { "kind": "class", "name": "pageBlockRelatedArticles", "type": "PageBlock", "id": 370236054, "comment": "Related articles", "arguments": [{ "name": "title", "type": "RichText", "comment": "Title" }, { "name": "articles", "type": "PageRelatedArticle", "typeModifiers": { "isVector": true }, "comment": "Related articles" }] }, { "kind": "class", "name": "pageBlockMap", "type": "PageBlock", "id": 2756656886, "comment": "A map", "arguments": [{ "name": "geo", "type": "GeoPoint", "comment": "Location of the map center" }, { "name": "zoom", "type": "int", "comment": "Map zoom level; 13-20" }, { "name": "w", "type": "int", "comment": "Map width in pixels before applying scale; 16-102" }, { "name": "h", "type": "int", "comment": "Map height in pixels before applying scale; 16-1024" }, { "name": "caption", "type": "PageCaption", "comment": "Caption" }] }, { "kind": "class", "name": "phoneCallDiscardReasonMissed", "type": "PhoneCallDiscardReason", "id": 2246320897, "comment": "The phone call was missed", "arguments": [] }, { "kind": "class", "name": "phoneCallDiscardReasonDisconnect", "type": "PhoneCallDiscardReason", "id": 3767910816, "comment": "The phone call was disconnected", "arguments": [] }, { "kind": "class", "name": "phoneCallDiscardReasonHangup", "type": "PhoneCallDiscardReason", "id": 1471006352, "comment": "The phone call was ended normally", "arguments": [] }, { "kind": "class", "name": "phoneCallDiscardReasonBusy", "type": "PhoneCallDiscardReason", "id": 4210550985, "comment": "The phone call was discarded because the user is busy in another call", "arguments": [] }, { "kind": "class", "name": "dataJSON", "type": "DataJSON", "id": 2104790276, "comment": "Represents a json-encoded object", "arguments": [{ "name": "data", "type": "string", "comment": "JSON-encoded object" }] }, { "kind": "class", "name": "labeledPrice", "type": "LabeledPrice", "id": 3408489464, "comment": "This object represents a portion of the price for goods or services.", "arguments": [{ "name": "label", "type": "string", "comment": "Portion label" }, { "name": "amount", "type": "long", "comment": "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." }] }, { "kind": "class", "name": "invoice", "type": "Invoice", "id": 1572428309, "comment": "Invoice", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "test", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Test invoice" }, { "name": "name_requested", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Set this flag if you require the user's full name to complete the order" }, { "name": "phone_requested", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Set this flag if you require the user's phone number to complete the order" }, { "name": "email_requested", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Set this flag if you require the user's email address to complete the order" }, { "name": "shipping_address_requested", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "Set this flag if you require the user's shipping address to complete the order" }, { "name": "flexible", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Set this flag if the final price depends on the shipping method" }, { "name": "phone_to_provider", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "Set this flag if user's phone number should be sent to provider" }, { "name": "email_to_provider", "type": "true", "typeModifiers": { "predicate": "flags.7" }, "comment": "Set this flag if user's email address should be sent to provider" }, { "name": "recurring", "type": "true", "typeModifiers": { "predicate": "flags.9" }, "comment": "Whether this is a recurring payment" }, { "name": "currency", "type": "string", "comment": "Three-letter ISO 4217 currency code, or XTR for Telegram Stars." }, { "name": "prices", "type": "LabeledPrice", "typeModifiers": { "isVector": true }, "comment": "Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)" }, { "name": "max_tip_amount", "type": "long", "typeModifiers": { "predicate": "flags.8" }, "comment": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." }, { "name": "suggested_tip_amounts", "type": "long", "typeModifiers": { "predicate": "flags.8", "isVector": true }, "comment": "A vector of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount." }, { "name": "terms_url", "type": "string", "typeModifiers": { "predicate": "flags.10" }, "comment": "Terms of service URL" }] }, { "kind": "class", "name": "paymentCharge", "type": "PaymentCharge", "id": 3926049406, "comment": "Payment identifier", "arguments": [{ "name": "id", "type": "string", "comment": "Telegram payment identifier" }, { "name": "provider_charge_id", "type": "string", "comment": "Provider payment identifier" }] }, { "kind": "class", "name": "postAddress", "type": "PostAddress", "id": 512535275, "comment": "Shipping address", "arguments": [{ "name": "street_line1", "type": "string", "comment": "First line for the address" }, { "name": "street_line2", "type": "string", "comment": "Second line for the address" }, { "name": "city", "type": "string", "comment": "City" }, { "name": "state", "type": "string", "comment": "State, if applicable (empty otherwise)" }, { "name": "country_iso2", "type": "string", "comment": "ISO 3166-1 alpha-2 country code" }, { "name": "post_code", "type": "string", "comment": "Address post code" }] }, { "kind": "class", "name": "paymentRequestedInfo", "type": "PaymentRequestedInfo", "id": 2426158996, "comment": "Order info provided by the user", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "name", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "User's full name" }, { "name": "phone", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "User's phone number" }, { "name": "email", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "User's email address" }, { "name": "shipping_address", "type": "PostAddress", "typeModifiers": { "predicate": "flags.3" }, "comment": "User's shipping address" }] }, { "kind": "class", "name": "paymentSavedCredentialsCard", "type": "PaymentSavedCredentials", "id": 3452074527, "comment": "Saved credit card", "arguments": [{ "name": "id", "type": "string", "comment": "Card ID" }, { "name": "title", "type": "string", "comment": "Title" }] }, { "kind": "class", "name": "webDocument", "type": "WebDocument", "id": 475467473, "comment": "Remote document", "arguments": [{ "name": "url", "type": "string", "comment": "Document URL" }, { "name": "access_hash", "type": "long", "comment": "Access hash" }, { "name": "size", "type": "int", "comment": "File size" }, { "name": "mime_type", "type": "string", "comment": "MIME type" }, { "name": "attributes", "type": "DocumentAttribute", "typeModifiers": { "isVector": true }, "comment": "Attributes for media types" }] }, { "kind": "class", "name": "webDocumentNoProxy", "type": "WebDocument", "id": 4190682310, "comment": "Remote document that can be downloaded without proxying through telegram", "arguments": [{ "name": "url", "type": "string", "comment": "Document URL" }, { "name": "size", "type": "int", "comment": "File size" }, { "name": "mime_type", "type": "string", "comment": "MIME type" }, { "name": "attributes", "type": "DocumentAttribute", "typeModifiers": { "isVector": true }, "comment": "Attributes for media types" }] }, { "kind": "class", "name": "inputWebDocument", "type": "InputWebDocument", "id": 2616017741, "comment": "The document", "arguments": [{ "name": "url", "type": "string", "comment": "Remote document URL to be downloaded using the appropriate method" }, { "name": "size", "type": "int", "comment": "Remote file size" }, { "name": "mime_type", "type": "string", "comment": "Mime type" }, { "name": "attributes", "type": "DocumentAttribute", "typeModifiers": { "isVector": true }, "comment": "Attributes for media types" }] }, { "kind": "class", "name": "inputWebFileLocation", "type": "InputWebFileLocation", "id": 3258570374, "comment": "Location of a remote HTTP(s) file", "arguments": [{ "name": "url", "type": "string", "comment": "HTTP URL of file" }, { "name": "access_hash", "type": "long", "comment": "Access hash" }] }, { "kind": "class", "name": "inputWebFileGeoPointLocation", "type": "InputWebFileLocation", "id": 2669814217, "comment": "Used to download a server-generated image with the map preview from a {@link RawGeoPoint}, see the webfile docs for more info ».", "arguments": [{ "name": "geo_point", "type": "InputGeoPoint", "comment": "Generated from the lat, long and accuracy_radius parameters of the {@link RawGeoPoint}" }, { "name": "access_hash", "type": "long", "comment": "Access hash of the {@link RawGeoPoint}" }, { "name": "w", "type": "int", "comment": "Map width in pixels before applying scale; 16-1024" }, { "name": "h", "type": "int", "comment": "Map height in pixels before applying scale; 16-1024" }, { "name": "zoom", "type": "int", "comment": "Map zoom level; 13-20" }, { "name": "scale", "type": "int", "comment": "Map scale; 1-3" }] }, { "kind": "class", "name": "inputWebFileAudioAlbumThumbLocation", "type": "InputWebFileLocation", "id": 4100974884, "comment": "Used to download an album cover for any music file using {@link upload.RawGetWebFileRequest}, see the webfile docs for more info ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "small", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Used to return a thumbnail with 100x100 resolution (instead of the default 600x600)" }, { "name": "document", "type": "InputDocument", "typeModifiers": { "predicate": "flags.0" }, "comment": "The audio file in question: must NOT be provided in secret chats, provide the title and performer fields instead." }, { "name": "title", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Song title: should only be used in secret chats, in normal chats provide document instead, as it has more lax rate limits." }, { "name": "performer", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Song performer: should only be used in secret chats, in normal chats provide document instead, as it has more lax rate limits." }] }, { "kind": "class", "name": "upload.webFile", "type": "upload.WebFile", "id": 568808380, "comment": "Represents a chunk of an HTTP webfile downloaded through telegram's secure MTProto servers", "arguments": [{ "name": "size", "type": "int", "comment": "File size" }, { "name": "mime_type", "type": "string", "comment": "Mime type" }, { "name": "file_type", "type": "storage.FileType", "comment": "File type" }, { "name": "mtime", "type": "int", "comment": "Modified time" }, { "name": "bytes", "type": "bytes", "comment": "Data" }] }, { "kind": "class", "name": "payments.paymentForm", "type": "payments.PaymentForm", "id": 2684716881, "comment": "Payment form", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "can_save_credentials", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether the user can choose to save credentials." }, { "name": "password_missing", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Indicates that the user can save payment credentials, but only after setting up a 2FA password (currently the account doesn't have a 2FA password)" }, { "name": "form_id", "type": "long", "comment": "Form ID" }, { "name": "bot_id", "type": "int53", "comment": "Bot ID" }, { "name": "title", "type": "string", "comment": "Form title" }, { "name": "description", "type": "string", "comment": "Description" }, { "name": "photo", "type": "WebDocument", "typeModifiers": { "predicate": "flags.5" }, "comment": "Product photo" }, { "name": "invoice", "type": "Invoice", "comment": "Invoice" }, { "name": "provider_id", "type": "long", "comment": "Payment provider ID." }, { "name": "url", "type": "string", "comment": "Payment form URL" }, { "name": "native_provider", "type": "string", "typeModifiers": { "predicate": "flags.4" }, "comment": "Payment provider name.
One of the following:
- stripe" }, { "name": "native_params", "type": "DataJSON", "typeModifiers": { "predicate": "flags.4" }, "comment": "Contains information about the payment provider, if available, to support it natively without the need for opening the URL.
A JSON object that can contain the following fields:

- apple_pay_merchant_id: Apple Pay merchant ID
- google_pay_public_key: Google Pay public key
- need_country: True, if the user country must be provided,
- need_zip: True, if the user ZIP/postal code must be provided,
- need_cardholder_name: True, if the cardholder name must be provided
" }, { "name": "additional_methods", "type": "PaymentFormMethod", "typeModifiers": { "predicate": "flags.6", "isVector": true }, "comment": "Additional payment methods" }, { "name": "saved_info", "type": "PaymentRequestedInfo", "typeModifiers": { "predicate": "flags.0" }, "comment": "Saved server-side order information" }, { "name": "saved_credentials", "type": "PaymentSavedCredentials", "typeModifiers": { "predicate": "flags.1", "isVector": true }, "comment": "Contains information about saved card credentials" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Users" }] }, { "kind": "class", "name": "payments.paymentFormStars", "type": "payments.PaymentForm", "id": 2079764828, "comment": "Represents a payment form, for payments to be using Telegram Stars, see here » for more info.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "form_id", "type": "long", "comment": "Form ID." }, { "name": "bot_id", "type": "int53", "comment": "Bot ID." }, { "name": "title", "type": "string", "comment": "Form title" }, { "name": "description", "type": "string", "comment": "Description" }, { "name": "photo", "type": "WebDocument", "typeModifiers": { "predicate": "flags.5" }, "comment": "Product photo" }, { "name": "invoice", "type": "Invoice", "comment": "Invoice" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Info about users mentioned in the other fields." }] }, { "kind": "class", "name": "payments.validatedRequestedInfo", "type": "payments.ValidatedRequestedInfo", "id": 3510966403, "comment": "Validated user-provided info", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "id", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "ID" }, { "name": "shipping_options", "type": "ShippingOption", "typeModifiers": { "predicate": "flags.1", "isVector": true }, "comment": "Shipping options" }] }, { "kind": "class", "name": "payments.paymentResult", "type": "payments.PaymentResult", "id": 1314881805, "comment": "Payment result", "arguments": [{ "name": "updates", "type": "Updates", "comment": "Info about the payment" }] }, { "kind": "class", "name": "payments.paymentVerificationNeeded", "type": "payments.PaymentResult", "id": 3628142905, "comment": "Payment was not successful, additional verification is needed", "arguments": [{ "name": "url", "type": "string", "comment": "URL for additional payment credentials verification" }] }, { "kind": "class", "name": "payments.paymentReceipt", "type": "payments.PaymentReceipt", "id": 1891958275, "comment": "Receipt", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "date", "type": "int", "comment": "Date of generation" }, { "name": "bot_id", "type": "int53", "comment": "Bot ID" }, { "name": "provider_id", "type": "long", "comment": "Provider ID" }, { "name": "title", "type": "string", "comment": "Title" }, { "name": "description", "type": "string", "comment": "Description" }, { "name": "photo", "type": "WebDocument", "typeModifiers": { "predicate": "flags.2" }, "comment": "Photo" }, { "name": "invoice", "type": "Invoice", "comment": "Invoice" }, { "name": "info", "type": "PaymentRequestedInfo", "typeModifiers": { "predicate": "flags.0" }, "comment": "Info" }, { "name": "shipping", "type": "ShippingOption", "typeModifiers": { "predicate": "flags.1" }, "comment": "Selected shipping option" }, { "name": "tip_amount", "type": "long", "typeModifiers": { "predicate": "flags.3" }, "comment": "Tipped amount" }, { "name": "currency", "type": "string", "comment": "Three-letter ISO 4217 currency code" }, { "name": "total_amount", "type": "long", "comment": "Total amount in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." }, { "name": "credentials_title", "type": "string", "comment": "Payment credential name" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Users" }] }, { "kind": "class", "name": "payments.paymentReceiptStars", "type": "payments.PaymentReceipt", "id": 3669751866, "comment": "Receipt for payment made using Telegram Stars.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "date", "type": "int", "comment": "Date of generation" }, { "name": "bot_id", "type": "int53", "comment": "Bot ID" }, { "name": "title", "type": "string", "comment": "Title" }, { "name": "description", "type": "string", "comment": "Description" }, { "name": "photo", "type": "WebDocument", "typeModifiers": { "predicate": "flags.2" }, "comment": "Product photo" }, { "name": "invoice", "type": "Invoice", "comment": "Invoice" }, { "name": "currency", "type": "string", "comment": "Currency, always XTR." }, { "name": "total_amount", "type": "long", "comment": "Amount of Telegram Stars." }, { "name": "transaction_id", "type": "string", "comment": "Transaction ID" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Info about users mentioned in the other fields." }] }, { "kind": "class", "name": "payments.savedInfo", "type": "payments.SavedInfo", "id": 4220511292, "comment": "Saved server-side order information", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "has_saved_credentials", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the user has some saved payment credentials" }, { "name": "saved_info", "type": "PaymentRequestedInfo", "typeModifiers": { "predicate": "flags.0" }, "comment": "Saved server-side order information" }] }, { "kind": "class", "name": "inputPaymentCredentialsSaved", "type": "InputPaymentCredentials", "id": 3238965967, "comment": "Saved payment credentials", "arguments": [{ "name": "id", "type": "string", "comment": "Credential ID" }, { "name": "tmp_password", "type": "bytes", "comment": "Temporary password" }] }, { "kind": "class", "name": "inputPaymentCredentials", "type": "InputPaymentCredentials", "id": 873977640, "comment": "Payment credentials", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "save", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Save payment credential for future use" }, { "name": "data", "type": "DataJSON", "comment": "Payment credentials" }] }, { "kind": "class", "name": "inputPaymentCredentialsApplePay", "type": "InputPaymentCredentials", "id": 178373535, "comment": "Apple pay payment credentials", "arguments": [{ "name": "payment_data", "type": "DataJSON", "comment": "Payment data" }] }, { "kind": "class", "name": "inputPaymentCredentialsGooglePay", "type": "InputPaymentCredentials", "id": 2328045569, "comment": "Google Pay payment credentials", "arguments": [{ "name": "payment_token", "type": "DataJSON", "comment": "Payment token" }] }, { "kind": "class", "name": "account.tmpPassword", "type": "account.TmpPassword", "id": 3680828724, "comment": "Temporary payment password", "arguments": [{ "name": "tmp_password", "type": "bytes", "comment": "Temporary password" }, { "name": "valid_until", "type": "int", "comment": "Validity period" }] }, { "kind": "class", "name": "shippingOption", "type": "ShippingOption", "id": 3055631583, "comment": "Shipping option", "arguments": [{ "name": "id", "type": "string", "comment": "Option ID" }, { "name": "title", "type": "string", "comment": "Title" }, { "name": "prices", "type": "LabeledPrice", "typeModifiers": { "isVector": true }, "comment": "List of price portions" }] }, { "kind": "class", "name": "inputStickerSetItem", "type": "InputStickerSetItem", "id": 853188252, "comment": "Sticker in a stickerset", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "document", "type": "InputDocument", "comment": "The sticker" }, { "name": "emoji", "type": "string", "comment": "Associated emoji" }, { "name": "mask_coords", "type": "MaskCoords", "typeModifiers": { "predicate": "flags.0" }, "comment": "Coordinates for mask sticker" }, { "name": "keywords", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Set of keywords, separated by commas (can't be provided for mask stickers)" }] }, { "kind": "class", "name": "inputPhoneCall", "type": "InputPhoneCall", "id": 506920429, "comment": "Phone call", "arguments": [{ "name": "id", "type": "long", "comment": "Call ID" }, { "name": "access_hash", "type": "long", "comment": "Access hash" }] }, { "kind": "class", "name": "phoneCallEmpty", "type": "PhoneCall", "id": 1399245077, "comment": "Empty constructor", "arguments": [{ "name": "id", "type": "long", "comment": "Call ID" }] }, { "kind": "class", "name": "phoneCallWaiting", "type": "PhoneCall", "id": 3307368215, "comment": "Incoming phone call", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "video", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "Is this a video call" }, { "name": "id", "type": "long", "comment": "Call ID" }, { "name": "access_hash", "type": "long", "comment": "Access hash" }, { "name": "date", "type": "int", "comment": "Date" }, { "name": "admin_id", "type": "int53", "comment": "Admin ID" }, { "name": "participant_id", "type": "int53", "comment": "Participant ID" }, { "name": "protocol", "type": "PhoneCallProtocol", "comment": "Phone call protocol info" }, { "name": "receive_date", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "When was the phone call received" }] }, { "kind": "class", "name": "phoneCallRequested", "type": "PhoneCall", "id": 347139340, "comment": "Requested phone call", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "video", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "Whether this is a video call" }, { "name": "id", "type": "long", "comment": "Phone call ID" }, { "name": "access_hash", "type": "long", "comment": "Access hash" }, { "name": "date", "type": "int", "comment": "When was the phone call created" }, { "name": "admin_id", "type": "int53", "comment": "ID of the creator of the phone call" }, { "name": "participant_id", "type": "int53", "comment": "ID of the other participant of the phone call" }, { "name": "g_a_hash", "type": "bytes", "comment": "Parameter for key exchange" }, { "name": "protocol", "type": "PhoneCallProtocol", "comment": "Call protocol info to be passed to libtgvoip" }] }, { "kind": "class", "name": "phoneCallAccepted", "type": "PhoneCall", "id": 912311057, "comment": "An accepted phone call", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "video", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "Whether this is a video call" }, { "name": "id", "type": "long", "comment": "ID of accepted phone call" }, { "name": "access_hash", "type": "long", "comment": "Access hash of phone call" }, { "name": "date", "type": "int", "comment": "When was the call accepted" }, { "name": "admin_id", "type": "int53", "comment": "ID of the call creator" }, { "name": "participant_id", "type": "int53", "comment": "ID of the other user in the call" }, { "name": "g_b", "type": "bytes", "comment": "B parameter for secure E2E phone call key exchange" }, { "name": "protocol", "type": "PhoneCallProtocol", "comment": "Protocol to use for phone call" }] }, { "kind": "class", "name": "phoneCall", "type": "PhoneCall", "id": 810769141, "comment": "Phone call", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "p2p_allowed", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Whether P2P connection to the other peer is allowed" }, { "name": "video", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "Whether this is a video call" }, { "name": "id", "type": "long", "comment": "Call ID" }, { "name": "access_hash", "type": "long", "comment": "Access hash" }, { "name": "date", "type": "int", "comment": "Date of creation of the call" }, { "name": "admin_id", "type": "int53", "comment": "User ID of the creator of the call" }, { "name": "participant_id", "type": "int53", "comment": "User ID of the other participant in the call" }, { "name": "g_a_or_b", "type": "bytes", "comment": "Parameter for key exchange" }, { "name": "key_fingerprint", "type": "long", "comment": "Key fingerprint" }, { "name": "protocol", "type": "PhoneCallProtocol", "comment": "Call protocol info to be passed to libtgvoip" }, { "name": "connections", "type": "PhoneConnection", "typeModifiers": { "isVector": true }, "comment": "List of endpoints the user can connect to exchange call data" }, { "name": "start_date", "type": "int", "comment": "When was the call actually started" }, { "name": "custom_parameters", "type": "DataJSON", "typeModifiers": { "predicate": "flags.7" }, "comment": "Custom JSON-encoded call parameters to be passed to tgcalls." }] }, { "kind": "class", "name": "phoneCallDiscarded", "type": "PhoneCall", "id": 1355435489, "comment": "Indicates a discarded phone call", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "need_rating", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether the server required the user to {@link phone.RawSetCallRatingRequest} the call" }, { "name": "need_debug", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether the server required the client to {@link phone.RawSaveCallDebugRequest} the libtgvoip call debug data" }, { "name": "video", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "Whether the call was a video call" }, { "name": "id", "type": "long", "comment": "Call ID" }, { "name": "reason", "type": "PhoneCallDiscardReason", "typeModifiers": { "predicate": "flags.0" }, "comment": "Why was the phone call discarded" }, { "name": "duration", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Duration of the phone call in seconds" }] }, { "kind": "class", "name": "phoneConnection", "type": "PhoneConnection", "id": 2629903303, "comment": "Identifies an endpoint that can be used to connect to the other user in a phone call", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "tcp", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether TCP should be used" }, { "name": "id", "type": "long", "comment": "Endpoint ID" }, { "name": "ip", "type": "string", "comment": "IP address of endpoint" }, { "name": "ipv6", "type": "string", "comment": "IPv6 address of endpoint" }, { "name": "port", "type": "int", "comment": "Port ID" }, { "name": "peer_tag", "type": "bytes", "comment": "Our peer tag" }] }, { "kind": "class", "name": "phoneConnectionWebrtc", "type": "PhoneConnection", "id": 1667228533, "comment": "WebRTC connection parameters", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "turn", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether this is a TURN endpoint" }, { "name": "stun", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether this is a STUN endpoint" }, { "name": "id", "type": "long", "comment": "Endpoint ID" }, { "name": "ip", "type": "string", "comment": "IP address" }, { "name": "ipv6", "type": "string", "comment": "IPv6 address" }, { "name": "port", "type": "int", "comment": "Port" }, { "name": "username", "type": "string", "comment": "Username" }, { "name": "password", "type": "string", "comment": "Password" }] }, { "kind": "class", "name": "phoneCallProtocol", "type": "PhoneCallProtocol", "id": 4236742600, "comment": "Protocol info for libtgvoip", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "udp_p2p", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to allow P2P connection to the other participant" }, { "name": "udp_reflector", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether to allow connection to the other participants through the reflector servers" }, { "name": "min_layer", "type": "int", "comment": "Minimum layer for remote libtgvoip" }, { "name": "max_layer", "type": "int", "comment": "Maximum layer for remote libtgvoip" }, { "name": "library_versions", "type": "string", "typeModifiers": { "isVector": true }, "comment": "When using {@link phone.RawRequestCallRequest} and {@link phone.RawAcceptCallRequest}, specify all library versions supported by the client.
The server will merge and choose the best library version supported by both peers, returning only the best value in the result of the callee's {@link phone.RawAcceptCallRequest} and in the {@link RawPhoneCallAccepted} update received by the caller." }] }, { "kind": "class", "name": "phone.phoneCall", "type": "phone.PhoneCall", "id": 3968000320, "comment": "A VoIP phone call", "arguments": [{ "name": "phone_call", "type": "PhoneCall", "comment": "The VoIP phone call" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "VoIP phone call participants" }] }, { "kind": "class", "name": "upload.cdnFileReuploadNeeded", "type": "upload.CdnFile", "id": 4004045934, "comment": "The file was cleared from the temporary RAM cache of the CDN and has to be re-uploaded.", "arguments": [{ "name": "request_token", "type": "bytes", "comment": "Request token (see CDN)" }] }, { "kind": "class", "name": "upload.cdnFile", "type": "upload.CdnFile", "id": 2845821519, "comment": "Represent a chunk of a CDN file.", "arguments": [{ "name": "bytes", "type": "bytes", "comment": "The data" }] }, { "kind": "class", "name": "cdnPublicKey", "type": "CdnPublicKey", "id": 3380800186, "comment": "Public key to use only during handshakes to CDN DCs.", "arguments": [{ "name": "dc_id", "type": "int", "comment": "CDN DC ID" }, { "name": "public_key", "type": "string", "comment": "RSA public key" }] }, { "kind": "class", "name": "cdnConfig", "type": "CdnConfig", "id": 1462101002, "comment": "Configuration for CDN file downloads.", "arguments": [{ "name": "public_keys", "type": "CdnPublicKey", "typeModifiers": { "isVector": true }, "comment": "Vector of public keys to use only during handshakes to CDN DCs." }] }, { "kind": "class", "name": "langPackString", "type": "LangPackString", "id": 3402727926, "comment": "Translated localization string", "arguments": [{ "name": "key", "type": "string", "comment": "Language key" }, { "name": "value", "type": "string", "comment": "Value" }] }, { "kind": "class", "name": "langPackStringPluralized", "type": "LangPackString", "id": 1816636575, "comment": "A language pack string which has different forms based on the number of some object it mentions. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "key", "type": "string", "comment": "Localization key" }, { "name": "zero_value", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Value for zero objects" }, { "name": "one_value", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Value for one object" }, { "name": "two_value", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "Value for two objects" }, { "name": "few_value", "type": "string", "typeModifiers": { "predicate": "flags.3" }, "comment": "Value for a few objects" }, { "name": "many_value", "type": "string", "typeModifiers": { "predicate": "flags.4" }, "comment": "Value for many objects" }, { "name": "other_value", "type": "string", "comment": "Default value" }] }, { "kind": "class", "name": "langPackStringDeleted", "type": "LangPackString", "id": 695856818, "comment": "Deleted localization string", "arguments": [{ "name": "key", "type": "string", "comment": "Localization key" }] }, { "kind": "class", "name": "langPackDifference", "type": "LangPackDifference", "id": 4085629430, "comment": "Changes to the app's localization pack", "arguments": [{ "name": "lang_code", "type": "string", "comment": "Language code" }, { "name": "from_version", "type": "int", "comment": "Previous version number" }, { "name": "version", "type": "int", "comment": "New version number" }, { "name": "strings", "type": "LangPackString", "typeModifiers": { "isVector": true }, "comment": "Localized strings" }] }, { "kind": "class", "name": "langPackLanguage", "type": "LangPackLanguage", "id": 4006239459, "comment": "Identifies a localization pack", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "official", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the language pack is official" }, { "name": "rtl", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Is this a localization pack for an RTL language" }, { "name": "beta", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Is this a beta localization pack?" }, { "name": "name", "type": "string", "comment": "Language name" }, { "name": "native_name", "type": "string", "comment": "Language name in the language itself" }, { "name": "lang_code", "type": "string", "comment": "Language code (pack identifier)" }, { "name": "base_lang_code", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Identifier of a base language pack; may be empty. If a string is missed in the language pack, then it should be fetched from base language pack. Unsupported in custom language packs" }, { "name": "plural_code", "type": "string", "comment": "A language code to be used to apply plural forms. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info" }, { "name": "strings_count", "type": "int", "comment": "Total number of non-deleted strings from the language pack" }, { "name": "translated_count", "type": "int", "comment": "Total number of translated strings from the language pack" }, { "name": "translations_url", "type": "string", "comment": "Link to language translation interface; empty for custom local language packs" }] }, { "kind": "class", "name": "channelAdminLogEventActionChangeTitle", "type": "ChannelAdminLogEventAction", "id": 3873421349, "comment": "Channel/supergroup title was changed", "arguments": [{ "name": "prev_value", "type": "string", "comment": "Previous title" }, { "name": "new_value", "type": "string", "comment": "New title" }] }, { "kind": "class", "name": "channelAdminLogEventActionChangeAbout", "type": "ChannelAdminLogEventAction", "id": 1427671598, "comment": "The description was changed", "arguments": [{ "name": "prev_value", "type": "string", "comment": "Previous description" }, { "name": "new_value", "type": "string", "comment": "New description" }] }, { "kind": "class", "name": "channelAdminLogEventActionChangeUsername", "type": "ChannelAdminLogEventAction", "id": 1783299128, "comment": "Channel/supergroup username was changed", "arguments": [{ "name": "prev_value", "type": "string", "comment": "Old username" }, { "name": "new_value", "type": "string", "comment": "New username" }] }, { "kind": "class", "name": "channelAdminLogEventActionChangePhoto", "type": "ChannelAdminLogEventAction", "id": 1129042607, "comment": "The channel/supergroup's picture was changed", "arguments": [{ "name": "prev_photo", "type": "Photo", "comment": "Previous picture" }, { "name": "new_photo", "type": "Photo", "comment": "New picture" }] }, { "kind": "class", "name": "channelAdminLogEventActionToggleInvites", "type": "ChannelAdminLogEventAction", "id": 460916654, "comment": "Invites were enabled/disabled", "arguments": [{ "name": "new_value", "type": "Bool", "comment": "New value" }] }, { "kind": "class", "name": "channelAdminLogEventActionToggleSignatures", "type": "ChannelAdminLogEventAction", "id": 648939889, "comment": "Channel signatures were enabled/disabled", "arguments": [{ "name": "new_value", "type": "Bool", "comment": "New value" }] }, { "kind": "class", "name": "channelAdminLogEventActionUpdatePinned", "type": "ChannelAdminLogEventAction", "id": 3924306968, "comment": "A message was pinned", "arguments": [{ "name": "message", "type": "Message", "comment": "The message that was pinned" }] }, { "kind": "class", "name": "channelAdminLogEventActionEditMessage", "type": "ChannelAdminLogEventAction", "id": 1889215493, "comment": "A message was edited", "arguments": [{ "name": "prev_message", "type": "Message", "comment": "Old message" }, { "name": "new_message", "type": "Message", "comment": "New message" }] }, { "kind": "class", "name": "channelAdminLogEventActionDeleteMessage", "type": "ChannelAdminLogEventAction", "id": 1121994683, "comment": "A message was deleted", "arguments": [{ "name": "message", "type": "Message", "comment": "The message that was deleted" }] }, { "kind": "class", "name": "channelAdminLogEventActionParticipantJoin", "type": "ChannelAdminLogEventAction", "id": 405815507, "comment": "A user has joined the group (in the case of big groups, info of the user that has joined isn't shown)", "arguments": [] }, { "kind": "class", "name": "channelAdminLogEventActionParticipantLeave", "type": "ChannelAdminLogEventAction", "id": 4170676210, "comment": "A user left the channel/supergroup (in the case of big groups, info of the user that has joined isn't shown)", "arguments": [] }, { "kind": "class", "name": "channelAdminLogEventActionParticipantInvite", "type": "ChannelAdminLogEventAction", "id": 3810276568, "comment": "A user was invited to the group", "arguments": [{ "name": "participant", "type": "ChannelParticipant", "comment": "The user that was invited" }] }, { "kind": "class", "name": "channelAdminLogEventActionParticipantToggleBan", "type": "ChannelAdminLogEventAction", "id": 3872931198, "comment": "The banned rights of a user were changed", "arguments": [{ "name": "prev_participant", "type": "ChannelParticipant", "comment": "Old banned rights of user" }, { "name": "new_participant", "type": "ChannelParticipant", "comment": "New banned rights of user" }] }, { "kind": "class", "name": "channelAdminLogEventActionParticipantToggleAdmin", "type": "ChannelAdminLogEventAction", "id": 3580323600, "comment": "The admin rights of a user were changed", "arguments": [{ "name": "prev_participant", "type": "ChannelParticipant", "comment": "Previous admin rights" }, { "name": "new_participant", "type": "ChannelParticipant", "comment": "New admin rights" }] }, { "kind": "class", "name": "channelAdminLogEventActionChangeStickerSet", "type": "ChannelAdminLogEventAction", "id": 2982398631, "comment": "The supergroup's stickerset was changed", "arguments": [{ "name": "prev_stickerset", "type": "InputStickerSet", "comment": "Previous stickerset" }, { "name": "new_stickerset", "type": "InputStickerSet", "comment": "New stickerset" }] }, { "kind": "class", "name": "channelAdminLogEventActionTogglePreHistoryHidden", "type": "ChannelAdminLogEventAction", "id": 1599903217, "comment": "The hidden prehistory setting was {@link channels.RawTogglePreHistoryHiddenRequest}", "arguments": [{ "name": "new_value", "type": "Bool", "comment": "New value" }] }, { "kind": "class", "name": "channelAdminLogEventActionDefaultBannedRights", "type": "ChannelAdminLogEventAction", "id": 771095562, "comment": "The default banned rights were modified", "arguments": [{ "name": "prev_banned_rights", "type": "ChatBannedRights", "comment": "Previous global banned rights" }, { "name": "new_banned_rights", "type": "ChatBannedRights", "comment": "New global banned rights." }] }, { "kind": "class", "name": "channelAdminLogEventActionStopPoll", "type": "ChannelAdminLogEventAction", "id": 2399639107, "comment": "A poll was stopped", "arguments": [{ "name": "message", "type": "Message", "comment": "The poll that was stopped" }] }, { "kind": "class", "name": "channelAdminLogEventActionChangeLinkedChat", "type": "ChannelAdminLogEventAction", "id": 84703944, "comment": "The linked chat was changed", "arguments": [{ "name": "prev_value", "type": "int53", "comment": "Previous linked chat" }, { "name": "new_value", "type": "int53", "comment": "New linked chat" }] }, { "kind": "class", "name": "channelAdminLogEventActionChangeLocation", "type": "ChannelAdminLogEventAction", "id": 241923758, "comment": "The geo group location was changed", "arguments": [{ "name": "prev_value", "type": "ChannelLocation", "comment": "Previous location" }, { "name": "new_value", "type": "ChannelLocation", "comment": "New location" }] }, { "kind": "class", "name": "channelAdminLogEventActionToggleSlowMode", "type": "ChannelAdminLogEventAction", "id": 1401984889, "comment": "{@link channels.RawToggleSlowModeRequest}", "arguments": [{ "name": "prev_value", "type": "int", "comment": "Previous slow mode value" }, { "name": "new_value", "type": "int", "comment": "New slow mode value" }] }, { "kind": "class", "name": "channelAdminLogEventActionStartGroupCall", "type": "ChannelAdminLogEventAction", "id": 589338437, "comment": "A group call was started", "arguments": [{ "name": "call", "type": "InputGroupCall", "comment": "Group call" }] }, { "kind": "class", "name": "channelAdminLogEventActionDiscardGroupCall", "type": "ChannelAdminLogEventAction", "id": 3684667712, "comment": "A group call was terminated", "arguments": [{ "name": "call", "type": "InputGroupCall", "comment": "The group call that was terminated" }] }, { "kind": "class", "name": "channelAdminLogEventActionParticipantMute", "type": "ChannelAdminLogEventAction", "id": 4179895506, "comment": "A group call participant was muted", "arguments": [{ "name": "participant", "type": "GroupCallParticipant", "comment": "The participant that was muted" }] }, { "kind": "class", "name": "channelAdminLogEventActionParticipantUnmute", "type": "ChannelAdminLogEventAction", "id": 3863226816, "comment": "A group call participant was unmuted", "arguments": [{ "name": "participant", "type": "GroupCallParticipant", "comment": "The participant that was unmuted" }] }, { "kind": "class", "name": "channelAdminLogEventActionToggleGroupCallSetting", "type": "ChannelAdminLogEventAction", "id": 1456906823, "comment": "Group call settings were changed", "arguments": [{ "name": "join_muted", "type": "Bool", "comment": "Whether all users are muted by default upon joining" }] }, { "kind": "class", "name": "channelAdminLogEventActionParticipantJoinByInvite", "type": "ChannelAdminLogEventAction", "id": 4271882584, "comment": "A user joined the supergroup/channel using a specific invite link", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "via_chatlist", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "The participant joined by importing a chat folder deep link »." }, { "name": "invite", "type": "ExportedChatInvite", "comment": "The invite link used to join the supergroup/channel" }] }, { "kind": "class", "name": "channelAdminLogEventActionExportedInviteDelete", "type": "ChannelAdminLogEventAction", "id": 1515256996, "comment": "A chat invite was deleted", "arguments": [{ "name": "invite", "type": "ExportedChatInvite", "comment": "The deleted chat invite" }] }, { "kind": "class", "name": "channelAdminLogEventActionExportedInviteRevoke", "type": "ChannelAdminLogEventAction", "id": 1091179342, "comment": "A specific invite link was revoked", "arguments": [{ "name": "invite", "type": "ExportedChatInvite", "comment": "The invite link that was revoked" }] }, { "kind": "class", "name": "channelAdminLogEventActionExportedInviteEdit", "type": "ChannelAdminLogEventAction", "id": 3910056793, "comment": "A chat invite was edited", "arguments": [{ "name": "prev_invite", "type": "ExportedChatInvite", "comment": "Previous chat invite information" }, { "name": "new_invite", "type": "ExportedChatInvite", "comment": "New chat invite information" }] }, { "kind": "class", "name": "channelAdminLogEventActionParticipantVolume", "type": "ChannelAdminLogEventAction", "id": 1048537159, "comment": "channelAdminLogEvent.user_id has set the volume of participant.peer to participant.volume", "arguments": [{ "name": "participant", "type": "GroupCallParticipant", "comment": "The participant whose volume was changed" }] }, { "kind": "class", "name": "channelAdminLogEventActionChangeHistoryTTL", "type": "ChannelAdminLogEventAction", "id": 1855199800, "comment": "The Time-To-Live of messages in this chat was changed", "arguments": [{ "name": "prev_value", "type": "int", "comment": "Previous value" }, { "name": "new_value", "type": "int", "comment": "New value" }] }, { "kind": "class", "name": "channelAdminLogEventActionParticipantJoinByRequest", "type": "ChannelAdminLogEventAction", "id": 2947945546, "comment": "A new member was accepted to the chat by an admin", "arguments": [{ "name": "invite", "type": "ExportedChatInvite", "comment": "The invite link that was used to join the chat" }, { "name": "approved_by", "type": "int53", "comment": "ID of the admin that approved the invite" }] }, { "kind": "class", "name": "channelAdminLogEventActionToggleNoForwards", "type": "ChannelAdminLogEventAction", "id": 3408578406, "comment": "Forwards were enabled or disabled", "arguments": [{ "name": "new_value", "type": "Bool", "comment": "Old value" }] }, { "kind": "class", "name": "channelAdminLogEventActionSendMessage", "type": "ChannelAdminLogEventAction", "id": 663693416, "comment": "A message was posted in a channel", "arguments": [{ "name": "message", "type": "Message", "comment": "The message that was sent" }] }, { "kind": "class", "name": "channelAdminLogEventActionChangeAvailableReactions", "type": "ChannelAdminLogEventAction", "id": 3192786680, "comment": "The set of allowed message reactions » for this channel has changed", "arguments": [{ "name": "prev_value", "type": "ChatReactions", "comment": "Previously allowed reaction emojis" }, { "name": "new_value", "type": "ChatReactions", "comment": "New allowed reaction emojis" }] }, { "kind": "class", "name": "channelAdminLogEventActionChangeUsernames", "type": "ChannelAdminLogEventAction", "id": 4031755177, "comment": "The list of usernames associated with the channel was changed", "arguments": [{ "name": "prev_value", "type": "string", "typeModifiers": { "isVector": true }, "comment": "Previous set of usernames" }, { "name": "new_value", "type": "string", "typeModifiers": { "isVector": true }, "comment": "New set of usernames" }] }, { "kind": "class", "name": "channelAdminLogEventActionToggleForum", "type": "ChannelAdminLogEventAction", "id": 46949251, "comment": "Forum functionality was enabled or disabled.", "arguments": [{ "name": "new_value", "type": "Bool", "comment": "Whether forum functionality was enabled or disabled." }] }, { "kind": "class", "name": "channelAdminLogEventActionCreateTopic", "type": "ChannelAdminLogEventAction", "id": 1483767080, "comment": "A forum topic was created", "arguments": [{ "name": "topic", "type": "ForumTopic", "comment": "The forum topic that was created" }] }, { "kind": "class", "name": "channelAdminLogEventActionEditTopic", "type": "ChannelAdminLogEventAction", "id": 4033864200, "comment": "A forum topic was edited", "arguments": [{ "name": "prev_topic", "type": "ForumTopic", "comment": "Previous topic information" }, { "name": "new_topic", "type": "ForumTopic", "comment": "New topic information" }] }, { "kind": "class", "name": "channelAdminLogEventActionDeleteTopic", "type": "ChannelAdminLogEventAction", "id": 2920712457, "comment": "A forum topic was deleted", "arguments": [{ "name": "topic", "type": "ForumTopic", "comment": "The forum topic that was deleted" }] }, { "kind": "class", "name": "channelAdminLogEventActionPinTopic", "type": "ChannelAdminLogEventAction", "id": 1569535291, "comment": "A forum topic was pinned or unpinned", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "prev_topic", "type": "ForumTopic", "typeModifiers": { "predicate": "flags.0" }, "comment": "Previous topic information" }, { "name": "new_topic", "type": "ForumTopic", "typeModifiers": { "predicate": "flags.1" }, "comment": "New topic information" }] }, { "kind": "class", "name": "channelAdminLogEventActionToggleAntiSpam", "type": "ChannelAdminLogEventAction", "id": 1693675004, "comment": "Native antispam functionality was enabled or disabled.", "arguments": [{ "name": "new_value", "type": "Bool", "comment": "Whether antispam functionality was enabled or disabled." }] }, { "kind": "class", "name": "channelAdminLogEventActionChangePeerColor", "type": "ChannelAdminLogEventAction", "id": 1469507456, "comment": "The message accent color was changed", "arguments": [{ "name": "prev_value", "type": "PeerColor", "comment": "Previous accent palette" }, { "name": "new_value", "type": "PeerColor", "comment": "New accent palette" }] }, { "kind": "class", "name": "channelAdminLogEventActionChangeProfilePeerColor", "type": "ChannelAdminLogEventAction", "id": 1581742885, "comment": "The profile accent color was changed", "arguments": [{ "name": "prev_value", "type": "PeerColor", "comment": "Previous accent palette" }, { "name": "new_value", "type": "PeerColor", "comment": "New accent palette" }] }, { "kind": "class", "name": "channelAdminLogEventActionChangeWallpaper", "type": "ChannelAdminLogEventAction", "id": 834362706, "comment": "The wallpaper was changed", "arguments": [{ "name": "prev_value", "type": "WallPaper", "comment": "Previous wallpaper" }, { "name": "new_value", "type": "WallPaper", "comment": "New wallpaper" }] }, { "kind": "class", "name": "channelAdminLogEventActionChangeEmojiStatus", "type": "ChannelAdminLogEventAction", "id": 1051328177, "comment": "The emoji status was changed", "arguments": [{ "name": "prev_value", "type": "EmojiStatus", "comment": "Previous emoji status" }, { "name": "new_value", "type": "EmojiStatus", "comment": "New emoji status" }] }, { "kind": "class", "name": "channelAdminLogEventActionChangeEmojiStickerSet", "type": "ChannelAdminLogEventAction", "id": 1188577451, "comment": "The supergroup's custom emoji stickerset was changed.", "arguments": [{ "name": "prev_stickerset", "type": "InputStickerSet", "comment": "Old value" }, { "name": "new_stickerset", "type": "InputStickerSet", "comment": "New value" }] }, { "kind": "class", "name": "channelAdminLogEvent", "type": "ChannelAdminLogEvent", "id": 531458253, "comment": "Admin log event", "arguments": [{ "name": "id", "type": "long", "comment": "Event ID" }, { "name": "date", "type": "int", "comment": "Date" }, { "name": "user_id", "type": "int53", "comment": "User ID" }, { "name": "action", "type": "ChannelAdminLogEventAction", "comment": "Action" }] }, { "kind": "class", "name": "channels.adminLogResults", "type": "channels.AdminLogResults", "id": 3985307469, "comment": "Admin log events", "arguments": [{ "name": "events", "type": "ChannelAdminLogEvent", "typeModifiers": { "isVector": true }, "comment": "Admin log events" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Chats mentioned in events" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Users mentioned in events" }] }, { "kind": "class", "name": "channelAdminLogEventsFilter", "type": "ChannelAdminLogEventsFilter", "id": 3926948580, "comment": "Filter only certain admin log events", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "join", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "{@link RawChannelAdminLogEventActionParticipantJoin}, including {@link RawChannelAdminLogEventActionParticipantJoinByInvite} and {@link RawChannelAdminLogEventActionParticipantJoinByRequest}." }, { "name": "leave", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "{@link RawChannelAdminLogEventActionParticipantLeave}" }, { "name": "invite", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "{@link RawChannelAdminLogEventActionParticipantInvite}" }, { "name": "ban", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "{@link RawChannelAdminLogEventActionParticipantToggleBan}" }, { "name": "unban", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "{@link RawChannelAdminLogEventActionParticipantToggleBan}" }, { "name": "kick", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "{@link RawChannelAdminLogEventActionParticipantToggleBan}" }, { "name": "unkick", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "{@link RawChannelAdminLogEventActionParticipantToggleBan}" }, { "name": "promote", "type": "true", "typeModifiers": { "predicate": "flags.7" }, "comment": "{@link RawChannelAdminLogEventActionParticipantToggleAdmin}" }, { "name": "demote", "type": "true", "typeModifiers": { "predicate": "flags.8" }, "comment": "{@link RawChannelAdminLogEventActionParticipantToggleAdmin}" }, { "name": "info", "type": "true", "typeModifiers": { "predicate": "flags.9" }, "comment": "Info change events (when {@link RawChannelAdminLogEventActionChangeAbout}, {@link RawChannelAdminLogEventActionChangeLinkedChat}, {@link RawChannelAdminLogEventActionChangeLocation}, {@link RawChannelAdminLogEventActionChangePhoto}, {@link RawChannelAdminLogEventActionChangeStickerSet}, {@link RawChannelAdminLogEventActionChangeTitle} or {@link RawChannelAdminLogEventActionChangeUsername}, {@link RawChannelAdminLogEventActionToggleSlowMode}, {@link RawChannelAdminLogEventActionChangeHistoryTTL} settings of a channel gets modified)" }, { "name": "settings", "type": "true", "typeModifiers": { "predicate": "flags.10" }, "comment": "Settings change events ({@link RawChannelAdminLogEventActionToggleInvites}, {@link RawChannelAdminLogEventActionTogglePreHistoryHidden}, {@link RawChannelAdminLogEventActionToggleSignatures}, {@link RawChannelAdminLogEventActionDefaultBannedRights}, {@link RawChannelAdminLogEventActionToggleForum})" }, { "name": "pinned", "type": "true", "typeModifiers": { "predicate": "flags.11" }, "comment": "{@link RawChannelAdminLogEventActionUpdatePinned}" }, { "name": "edit", "type": "true", "typeModifiers": { "predicate": "flags.12" }, "comment": "{@link RawChannelAdminLogEventActionEditMessage}" }, { "name": "delete", "type": "true", "typeModifiers": { "predicate": "flags.13" }, "comment": "{@link RawChannelAdminLogEventActionDeleteMessage}" }, { "name": "group_call", "type": "true", "typeModifiers": { "predicate": "flags.14" }, "comment": "Group call events" }, { "name": "invites", "type": "true", "typeModifiers": { "predicate": "flags.15" }, "comment": "Invite events" }, { "name": "send", "type": "true", "typeModifiers": { "predicate": "flags.16" }, "comment": "A message was posted in a channel" }, { "name": "forums", "type": "true", "typeModifiers": { "predicate": "flags.17" }, "comment": "Forum-related events" }] }, { "kind": "class", "name": "popularContact", "type": "PopularContact", "id": 1558266229, "comment": "Popular contact", "arguments": [{ "name": "client_id", "type": "long", "comment": "Contact identifier" }, { "name": "importers", "type": "int", "comment": "How many people imported this contact" }] }, { "kind": "class", "name": "messages.favedStickersNotModified", "type": "messages.FavedStickers", "id": 2660214483, "comment": "No new favorited stickers were found", "arguments": [] }, { "kind": "class", "name": "messages.favedStickers", "type": "messages.FavedStickers", "id": 750063767, "comment": "Favorited stickers", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here" }, { "name": "packs", "type": "StickerPack", "typeModifiers": { "isVector": true }, "comment": "Emojis associated to stickers" }, { "name": "stickers", "type": "Document", "typeModifiers": { "isVector": true }, "comment": "Favorited stickers" }] }, { "kind": "class", "name": "recentMeUrlUnknown", "type": "RecentMeUrl", "id": 1189204285, "comment": "Unknown t.me url", "arguments": [{ "name": "url", "type": "string", "comment": "URL" }] }, { "kind": "class", "name": "recentMeUrlUser", "type": "RecentMeUrl", "id": 3106671074, "comment": "Recent t.me link to a user", "arguments": [{ "name": "url", "type": "string", "comment": "URL" }, { "name": "user_id", "type": "int53", "comment": "User ID" }] }, { "kind": "class", "name": "recentMeUrlChat", "type": "RecentMeUrl", "id": 3000660434, "comment": "Recent t.me link to a chat", "arguments": [{ "name": "url", "type": "string", "comment": "t.me URL" }, { "name": "chat_id", "type": "int53", "comment": "Chat ID" }] }, { "kind": "class", "name": "recentMeUrlChatInvite", "type": "RecentMeUrl", "id": 3947431965, "comment": "Recent t.me invite link to a chat", "arguments": [{ "name": "url", "type": "string", "comment": "t.me URL" }, { "name": "chat_invite", "type": "ChatInvite", "comment": "Chat invitation" }] }, { "kind": "class", "name": "recentMeUrlStickerSet", "type": "RecentMeUrl", "id": 3154794460, "comment": "Recent t.me stickerset installation URL", "arguments": [{ "name": "url", "type": "string", "comment": "t.me URL" }, { "name": "set", "type": "StickerSetCovered", "comment": "Stickerset" }] }, { "kind": "class", "name": "help.recentMeUrls", "type": "help.RecentMeUrls", "id": 235081943, "comment": "Recent t.me URLs", "arguments": [{ "name": "urls", "type": "RecentMeUrl", "typeModifiers": { "isVector": true }, "comment": "URLs" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Users" }] }, { "kind": "class", "name": "inputSingleMedia", "type": "InputSingleMedia", "id": 482797855, "comment": "A single media in an album or grouped media sent with {@link messages.RawSendMultiMediaRequest}.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "media", "type": "InputMedia", "comment": "The media" }, { "name": "random_id", "type": "long", "comment": "Unique client media ID required to prevent message resending" }, { "name": "message", "type": "string", "comment": "A caption for the media" }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.0", "isVector": true }, "comment": "Message entities for styled text" }] }, { "kind": "class", "name": "webAuthorization", "type": "WebAuthorization", "id": 2801333330, "comment": "Represents a bot logged in using the Telegram login widget", "arguments": [{ "name": "hash", "type": "long", "comment": "Authorization hash" }, { "name": "bot_id", "type": "int53", "comment": "Bot ID" }, { "name": "domain", "type": "string", "comment": "The domain name of the website on which the user has logged in." }, { "name": "browser", "type": "string", "comment": "Browser user-agent" }, { "name": "platform", "type": "string", "comment": "Platform" }, { "name": "date_created", "type": "int", "comment": "When was the web session created" }, { "name": "date_active", "type": "int", "comment": "When was the web session last active" }, { "name": "ip", "type": "string", "comment": "IP address" }, { "name": "region", "type": "string", "comment": "Region, determined from IP address" }] }, { "kind": "class", "name": "account.webAuthorizations", "type": "account.WebAuthorizations", "id": 3981887996, "comment": "Web authorizations", "arguments": [{ "name": "authorizations", "type": "WebAuthorization", "typeModifiers": { "isVector": true }, "comment": "Web authorization list" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Users" }] }, { "kind": "class", "name": "inputMessageID", "type": "InputMessage", "id": 2792792866, "comment": "Message by ID", "arguments": [{ "name": "id", "type": "int", "comment": "Message ID" }] }, { "kind": "class", "name": "inputMessageReplyTo", "type": "InputMessage", "id": 3134751637, "comment": "Message to which the specified message replies to", "arguments": [{ "name": "id", "type": "int", "comment": "ID of the message that replies to the message we need" }] }, { "kind": "class", "name": "inputMessagePinned", "type": "InputMessage", "id": 2257003832, "comment": "Pinned message", "arguments": [] }, { "kind": "class", "name": "inputMessageCallbackQuery", "type": "InputMessage", "id": 2902071934, "comment": "Used by bots for fetching information about the message that originated a callback query", "arguments": [{ "name": "id", "type": "int", "comment": "Message ID" }, { "name": "query_id", "type": "long", "comment": "Callback query ID" }] }, { "kind": "class", "name": "inputDialogPeer", "type": "InputDialogPeer", "id": 4239064759, "comment": "A peer", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer" }] }, { "kind": "class", "name": "inputDialogPeerFolder", "type": "InputDialogPeer", "id": 1684014375, "comment": "All peers in a peer folder", "arguments": [{ "name": "folder_id", "type": "int", "comment": "Peer folder ID, for more info click here" }] }, { "kind": "class", "name": "dialogPeer", "type": "DialogPeer", "id": 3849174789, "comment": "Peer", "arguments": [{ "name": "peer", "type": "Peer", "comment": "Peer" }] }, { "kind": "class", "name": "dialogPeerFolder", "type": "DialogPeer", "id": 1363483106, "comment": "Peer folder", "arguments": [{ "name": "folder_id", "type": "int", "comment": "Peer folder ID, for more info click here" }] }, { "kind": "class", "name": "messages.foundStickerSetsNotModified", "type": "messages.FoundStickerSets", "id": 223655517, "comment": "No further results were found", "arguments": [] }, { "kind": "class", "name": "messages.foundStickerSets", "type": "messages.FoundStickerSets", "id": 2331024850, "comment": "Found stickersets", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here" }, { "name": "sets", "type": "StickerSetCovered", "typeModifiers": { "isVector": true }, "comment": "Found stickersets" }] }, { "kind": "class", "name": "fileHash", "type": "FileHash", "id": 4087022428, "comment": "SHA256 Hash of an uploaded file, to be checked for validity after download", "arguments": [{ "name": "offset", "type": "int53", "comment": "Offset from where to start computing SHA-256 hash" }, { "name": "limit", "type": "int", "comment": "Length" }, { "name": "hash", "type": "bytes", "comment": "SHA-256 Hash of file chunk, to be checked for validity after download" }] }, { "kind": "class", "name": "inputClientProxy", "type": "InputClientProxy", "id": 1968737087, "comment": "Info about an MTProxy used to connect.", "arguments": [{ "name": "address", "type": "string", "comment": "Proxy address" }, { "name": "port", "type": "int", "comment": "Proxy port" }] }, { "kind": "class", "name": "help.termsOfServiceUpdateEmpty", "type": "help.TermsOfServiceUpdate", "id": 3811614591, "comment": "No changes were made to telegram's terms of service", "arguments": [{ "name": "expires", "type": "int", "comment": "New TOS updates will have to be queried using {@link help.RawGetTermsOfServiceUpdateRequest} in expires seconds" }] }, { "kind": "class", "name": "help.termsOfServiceUpdate", "type": "help.TermsOfServiceUpdate", "id": 686618977, "comment": "Info about an update of telegram's terms of service. If the terms of service are declined, then the {@link account.RawDeleteAccountRequest} method should be called with the reason \"Decline ToS update\"", "arguments": [{ "name": "expires", "type": "int", "comment": "New TOS updates will have to be queried using {@link help.RawGetTermsOfServiceUpdateRequest} in expires seconds" }, { "name": "terms_of_service", "type": "help.TermsOfService", "comment": "New terms of service" }] }, { "kind": "class", "name": "inputSecureFileUploaded", "type": "InputSecureFile", "id": 859091184, "comment": "Uploaded secure file, for more info see the passport docs »", "arguments": [{ "name": "id", "type": "long", "comment": "Secure file ID" }, { "name": "parts", "type": "int", "comment": "Secure file part count" }, { "name": "md5_checksum", "type": "string", "comment": "MD5 hash of encrypted uploaded file, to be checked server-side" }, { "name": "file_hash", "type": "bytes", "comment": "File hash" }, { "name": "secret", "type": "bytes", "comment": "Secret" }] }, { "kind": "class", "name": "inputSecureFile", "type": "InputSecureFile", "id": 1399317950, "comment": "Pre-uploaded passport file, for more info see the passport docs »", "arguments": [{ "name": "id", "type": "long", "comment": "Secure file ID" }, { "name": "access_hash", "type": "long", "comment": "Secure file access hash" }] }, { "kind": "class", "name": "secureFileEmpty", "type": "SecureFile", "id": 1679398724, "comment": "Empty constructor", "arguments": [] }, { "kind": "class", "name": "secureFile", "type": "SecureFile", "id": 2097791614, "comment": "Secure passport file, for more info see the passport docs »", "arguments": [{ "name": "id", "type": "long", "comment": "ID" }, { "name": "access_hash", "type": "long", "comment": "Access hash" }, { "name": "size", "type": "int53", "comment": "File size" }, { "name": "dc_id", "type": "int", "comment": "DC ID" }, { "name": "date", "type": "int", "comment": "Date of upload" }, { "name": "file_hash", "type": "bytes", "comment": "File hash" }, { "name": "secret", "type": "bytes", "comment": "Secret" }] }, { "kind": "class", "name": "secureData", "type": "SecureData", "id": 2330640067, "comment": "Secure passport data, for more info see the passport docs »", "arguments": [{ "name": "data", "type": "bytes", "comment": "Data" }, { "name": "data_hash", "type": "bytes", "comment": "Data hash" }, { "name": "secret", "type": "bytes", "comment": "Secret" }] }, { "kind": "class", "name": "securePlainPhone", "type": "SecurePlainData", "id": 2103482845, "comment": "Phone number to use in telegram passport: it must be verified, first ».", "arguments": [{ "name": "phone", "type": "string", "comment": "Phone number" }] }, { "kind": "class", "name": "securePlainEmail", "type": "SecurePlainData", "id": 569137759, "comment": "Email address to use in telegram passport: it must be verified, first ».", "arguments": [{ "name": "email", "type": "string", "comment": "Email address" }] }, { "kind": "class", "name": "secureValueTypePersonalDetails", "type": "SecureValueType", "id": 2636808675, "comment": "Personal details", "arguments": [] }, { "kind": "class", "name": "secureValueTypePassport", "type": "SecureValueType", "id": 1034709504, "comment": "Passport", "arguments": [] }, { "kind": "class", "name": "secureValueTypeDriverLicense", "type": "SecureValueType", "id": 115615172, "comment": "Driver's license", "arguments": [] }, { "kind": "class", "name": "secureValueTypeIdentityCard", "type": "SecureValueType", "id": 2698015819, "comment": "Identity card", "arguments": [] }, { "kind": "class", "name": "secureValueTypeInternalPassport", "type": "SecureValueType", "id": 2577698595, "comment": "Internal passport", "arguments": [] }, { "kind": "class", "name": "secureValueTypeAddress", "type": "SecureValueType", "id": 3420659238, "comment": "Address", "arguments": [] }, { "kind": "class", "name": "secureValueTypeUtilityBill", "type": "SecureValueType", "id": 4231435598, "comment": "Utility bill", "arguments": [] }, { "kind": "class", "name": "secureValueTypeBankStatement", "type": "SecureValueType", "id": 2299755533, "comment": "Bank statement", "arguments": [] }, { "kind": "class", "name": "secureValueTypeRentalAgreement", "type": "SecureValueType", "id": 2340959368, "comment": "Rental agreement", "arguments": [] }, { "kind": "class", "name": "secureValueTypePassportRegistration", "type": "SecureValueType", "id": 2581823594, "comment": "Internal registration passport", "arguments": [] }, { "kind": "class", "name": "secureValueTypeTemporaryRegistration", "type": "SecureValueType", "id": 3926060083, "comment": "Temporary registration", "arguments": [] }, { "kind": "class", "name": "secureValueTypePhone", "type": "SecureValueType", "id": 3005262555, "comment": "Phone", "arguments": [] }, { "kind": "class", "name": "secureValueTypeEmail", "type": "SecureValueType", "id": 2386339822, "comment": "Email", "arguments": [] }, { "kind": "class", "name": "secureValue", "type": "SecureValue", "id": 411017418, "comment": "Secure value", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "type", "type": "SecureValueType", "comment": "Secure passport value type" }, { "name": "data", "type": "SecureData", "typeModifiers": { "predicate": "flags.0" }, "comment": "Encrypted Telegram Passport element data" }, { "name": "front_side", "type": "SecureFile", "typeModifiers": { "predicate": "flags.1" }, "comment": "Encrypted passport file with the front side of the document" }, { "name": "reverse_side", "type": "SecureFile", "typeModifiers": { "predicate": "flags.2" }, "comment": "Encrypted passport file with the reverse side of the document" }, { "name": "selfie", "type": "SecureFile", "typeModifiers": { "predicate": "flags.3" }, "comment": "Encrypted passport file with a selfie of the user holding the document" }, { "name": "translation", "type": "SecureFile", "typeModifiers": { "predicate": "flags.6", "isVector": true }, "comment": "Array of encrypted passport files with translated versions of the provided documents" }, { "name": "files", "type": "SecureFile", "typeModifiers": { "predicate": "flags.4", "isVector": true }, "comment": "Array of encrypted passport files with photos the of the documents" }, { "name": "plain_data", "type": "SecurePlainData", "typeModifiers": { "predicate": "flags.5" }, "comment": "Plaintext verified passport data" }, { "name": "hash", "type": "bytes", "comment": "Data hash" }] }, { "kind": "class", "name": "inputSecureValue", "type": "InputSecureValue", "id": 3676426407, "comment": "Secure value, for more info see the passport docs »", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "type", "type": "SecureValueType", "comment": "Secure passport value type" }, { "name": "data", "type": "SecureData", "typeModifiers": { "predicate": "flags.0" }, "comment": "Encrypted Telegram Passport element data" }, { "name": "front_side", "type": "InputSecureFile", "typeModifiers": { "predicate": "flags.1" }, "comment": "Encrypted passport file with the front side of the document" }, { "name": "reverse_side", "type": "InputSecureFile", "typeModifiers": { "predicate": "flags.2" }, "comment": "Encrypted passport file with the reverse side of the document" }, { "name": "selfie", "type": "InputSecureFile", "typeModifiers": { "predicate": "flags.3" }, "comment": "Encrypted passport file with a selfie of the user holding the document" }, { "name": "translation", "type": "InputSecureFile", "typeModifiers": { "predicate": "flags.6", "isVector": true }, "comment": "Array of encrypted passport files with translated versions of the provided documents" }, { "name": "files", "type": "InputSecureFile", "typeModifiers": { "predicate": "flags.4", "isVector": true }, "comment": "Array of encrypted passport files with photos the of the documents" }, { "name": "plain_data", "type": "SecurePlainData", "typeModifiers": { "predicate": "flags.5" }, "comment": "Plaintext verified passport data" }] }, { "kind": "class", "name": "secureValueHash", "type": "SecureValueHash", "id": 3978218928, "comment": "Secure value hash", "arguments": [{ "name": "type", "type": "SecureValueType", "comment": "Secure value type" }, { "name": "hash", "type": "bytes", "comment": "Hash" }] }, { "kind": "class", "name": "secureValueErrorData", "type": "SecureValueError", "id": 3903065049, "comment": "Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.", "arguments": [{ "name": "type", "type": "SecureValueType", "comment": "The section of the user's Telegram Passport which has the error, one of {@link RawSecureValueTypePersonalDetails}, {@link RawSecureValueTypePassport}, {@link RawSecureValueTypeDriverLicense}, {@link RawSecureValueTypeIdentityCard}, {@link RawSecureValueTypeInternalPassport}, {@link RawSecureValueTypeAddress}" }, { "name": "data_hash", "type": "bytes", "comment": "Data hash" }, { "name": "field", "type": "string", "comment": "Name of the data field which has the error" }, { "name": "text", "type": "string", "comment": "Error message" }] }, { "kind": "class", "name": "secureValueErrorFrontSide", "type": "SecureValueError", "id": 12467706, "comment": "Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.", "arguments": [{ "name": "type", "type": "SecureValueType", "comment": "One of {@link RawSecureValueTypePassport}, {@link RawSecureValueTypeDriverLicense}, {@link RawSecureValueTypeIdentityCard}, {@link RawSecureValueTypeInternalPassport}" }, { "name": "file_hash", "type": "bytes", "comment": "File hash" }, { "name": "text", "type": "string", "comment": "Error message" }] }, { "kind": "class", "name": "secureValueErrorReverseSide", "type": "SecureValueError", "id": 2257201829, "comment": "Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.", "arguments": [{ "name": "type", "type": "SecureValueType", "comment": "One of {@link RawSecureValueTypeDriverLicense}, {@link RawSecureValueTypeIdentityCard}" }, { "name": "file_hash", "type": "bytes", "comment": "File hash" }, { "name": "text", "type": "string", "comment": "Error message" }] }, { "kind": "class", "name": "secureValueErrorSelfie", "type": "SecureValueError", "id": 3845639894, "comment": "Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.", "arguments": [{ "name": "type", "type": "SecureValueType", "comment": "One of {@link RawSecureValueTypePassport}, {@link RawSecureValueTypeDriverLicense}, {@link RawSecureValueTypeIdentityCard}, {@link RawSecureValueTypeInternalPassport}" }, { "name": "file_hash", "type": "bytes", "comment": "File hash" }, { "name": "text", "type": "string", "comment": "Error message" }] }, { "kind": "class", "name": "secureValueErrorFile", "type": "SecureValueError", "id": 2054162547, "comment": "Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.", "arguments": [{ "name": "type", "type": "SecureValueType", "comment": "One of {@link RawSecureValueTypeUtilityBill}, {@link RawSecureValueTypeBankStatement}, {@link RawSecureValueTypeRentalAgreement}, {@link RawSecureValueTypePassportRegistration}, {@link RawSecureValueTypeTemporaryRegistration}" }, { "name": "file_hash", "type": "bytes", "comment": "File hash" }, { "name": "text", "type": "string", "comment": "Error message" }] }, { "kind": "class", "name": "secureValueErrorFiles", "type": "SecureValueError", "id": 1717706985, "comment": "Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.", "arguments": [{ "name": "type", "type": "SecureValueType", "comment": "One of {@link RawSecureValueTypeUtilityBill}, {@link RawSecureValueTypeBankStatement}, {@link RawSecureValueTypeRentalAgreement}, {@link RawSecureValueTypePassportRegistration}, {@link RawSecureValueTypeTemporaryRegistration}" }, { "name": "file_hash", "type": "bytes", "typeModifiers": { "isVector": true }, "comment": "File hash" }, { "name": "text", "type": "string", "comment": "Error message" }] }, { "kind": "class", "name": "secureValueError", "type": "SecureValueError", "id": 2258466191, "comment": "Secure value error", "arguments": [{ "name": "type", "type": "SecureValueType", "comment": "Type of element which has the issue" }, { "name": "hash", "type": "bytes", "comment": "Hash" }, { "name": "text", "type": "string", "comment": "Error message" }] }, { "kind": "class", "name": "secureValueErrorTranslationFile", "type": "SecureValueError", "id": 2702460784, "comment": "Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.", "arguments": [{ "name": "type", "type": "SecureValueType", "comment": "One of {@link RawSecureValueTypePersonalDetails}, {@link RawSecureValueTypePassport}, {@link RawSecureValueTypeDriverLicense}, {@link RawSecureValueTypeIdentityCard}, {@link RawSecureValueTypeInternalPassport}, {@link RawSecureValueTypeUtilityBill}, {@link RawSecureValueTypeBankStatement}, {@link RawSecureValueTypeRentalAgreement}, {@link RawSecureValueTypePassportRegistration}, {@link RawSecureValueTypeTemporaryRegistration}" }, { "name": "file_hash", "type": "bytes", "comment": "File hash" }, { "name": "text", "type": "string", "comment": "Error message" }] }, { "kind": "class", "name": "secureValueErrorTranslationFiles", "type": "SecureValueError", "id": 878931416, "comment": "Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation changes.", "arguments": [{ "name": "type", "type": "SecureValueType", "comment": "One of {@link RawSecureValueTypePersonalDetails}, {@link RawSecureValueTypePassport}, {@link RawSecureValueTypeDriverLicense}, {@link RawSecureValueTypeIdentityCard}, {@link RawSecureValueTypeInternalPassport}, {@link RawSecureValueTypeUtilityBill}, {@link RawSecureValueTypeBankStatement}, {@link RawSecureValueTypeRentalAgreement}, {@link RawSecureValueTypePassportRegistration}, {@link RawSecureValueTypeTemporaryRegistration}" }, { "name": "file_hash", "type": "bytes", "typeModifiers": { "isVector": true }, "comment": "Hash" }, { "name": "text", "type": "string", "comment": "Error message" }] }, { "kind": "class", "name": "secureCredentialsEncrypted", "type": "SecureCredentialsEncrypted", "id": 871426631, "comment": "Encrypted credentials required to decrypt telegram passport data.", "arguments": [{ "name": "data", "type": "bytes", "comment": "Encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication, as described in decrypting data »" }, { "name": "hash", "type": "bytes", "comment": "Data hash for data authentication as described in decrypting data »" }, { "name": "secret", "type": "bytes", "comment": "Secret, encrypted with the bot's public RSA key, required for data decryption as described in decrypting data »" }] }, { "kind": "class", "name": "account.authorizationForm", "type": "account.AuthorizationForm", "id": 2905480408, "comment": "Telegram Passport authorization form", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "required_types", "type": "SecureRequiredType", "typeModifiers": { "isVector": true }, "comment": "Required Telegram Passport documents" }, { "name": "values", "type": "SecureValue", "typeModifiers": { "isVector": true }, "comment": "Already submitted Telegram Passport documents" }, { "name": "errors", "type": "SecureValueError", "typeModifiers": { "isVector": true }, "comment": "Telegram Passport errors" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Info about the bot to which the form will be submitted" }, { "name": "privacy_policy_url", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "URL of the service's privacy policy" }] }, { "kind": "class", "name": "account.sentEmailCode", "type": "account.SentEmailCode", "id": 2166326607, "comment": "The sent email code", "arguments": [{ "name": "email_pattern", "type": "string", "comment": "The email (to which the code was sent) must match this pattern" }, { "name": "length", "type": "int", "comment": "The length of the verification code" }] }, { "kind": "class", "name": "help.deepLinkInfoEmpty", "type": "help.DeepLinkInfo", "id": 1722786150, "comment": "Deep link info empty", "arguments": [] }, { "kind": "class", "name": "help.deepLinkInfo", "type": "help.DeepLinkInfo", "id": 1783556146, "comment": "Deep link info, see the here for more details", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "update_app", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "An update of the app is required to parse this link" }, { "name": "message", "type": "string", "comment": "Message to show to the user" }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.1", "isVector": true }, "comment": "Message entities for styled text" }] }, { "kind": "class", "name": "savedPhoneContact", "type": "SavedContact", "id": 289586518, "comment": "Saved contact", "arguments": [{ "name": "phone", "type": "string", "comment": "Phone number" }, { "name": "first_name", "type": "string", "comment": "First name" }, { "name": "last_name", "type": "string", "comment": "Last name" }, { "name": "date", "type": "int", "comment": "Date added" }] }, { "kind": "class", "name": "account.takeout", "type": "account.Takeout", "id": 1304052993, "comment": "Takeout info", "arguments": [{ "name": "id", "type": "long", "comment": "Takeout ID" }] }, { "kind": "class", "name": "passwordKdfAlgoUnknown", "type": "PasswordKdfAlgo", "id": 3562713238, "comment": "Unknown KDF (most likely, the client is outdated and does not support the specified KDF algorithm)", "arguments": [] }, { "kind": "class", "name": "passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow", "type": "PasswordKdfAlgo", "id": 982592842, "comment": "This key derivation algorithm defines that SRP 2FA login must be used", "arguments": [{ "name": "salt1", "type": "bytes", "comment": "One of two salts used by the derivation function (see SRP 2FA login)" }, { "name": "salt2", "type": "bytes", "comment": "One of two salts used by the derivation function (see SRP 2FA login)" }, { "name": "g", "type": "int", "comment": "Base (see SRP 2FA login)" }, { "name": "p", "type": "bytes", "comment": "2048-bit modulus (see SRP 2FA login)" }] }, { "kind": "class", "name": "securePasswordKdfAlgoUnknown", "type": "SecurePasswordKdfAlgo", "id": 4883767, "comment": "Unknown KDF algo (most likely the client has to be updated)", "arguments": [] }, { "kind": "class", "name": "securePasswordKdfAlgoPBKDF2HMACSHA512iter100000", "type": "SecurePasswordKdfAlgo", "id": 3153255840, "comment": "PBKDF2 with SHA512 and 100000 iterations KDF algo", "arguments": [{ "name": "salt", "type": "bytes", "comment": "Salt" }] }, { "kind": "class", "name": "securePasswordKdfAlgoSHA512", "type": "SecurePasswordKdfAlgo", "id": 2252807570, "comment": "SHA512 KDF algo", "arguments": [{ "name": "salt", "type": "bytes", "comment": "Salt" }] }, { "kind": "class", "name": "secureSecretSettings", "type": "SecureSecretSettings", "id": 354925740, "comment": "Secure settings", "arguments": [{ "name": "secure_algo", "type": "SecurePasswordKdfAlgo", "comment": "Secure KDF algo" }, { "name": "secure_secret", "type": "bytes", "comment": "Secure secret" }, { "name": "secure_secret_id", "type": "long", "comment": "Secret ID" }] }, { "kind": "class", "name": "inputCheckPasswordEmpty", "type": "InputCheckPasswordSRP", "id": 2558588504, "comment": "There is no password", "arguments": [] }, { "kind": "class", "name": "inputCheckPasswordSRP", "type": "InputCheckPasswordSRP", "id": 3531600002, "comment": "Constructor for checking the validity of a 2FA SRP password (see SRP)", "arguments": [{ "name": "srp_id", "type": "long", "comment": "SRP ID" }, { "name": "A", "type": "bytes", "comment": "A parameter (see SRP)" }, { "name": "M1", "type": "bytes", "comment": "M1 parameter (see SRP)" }] }, { "kind": "class", "name": "secureRequiredType", "type": "SecureRequiredType", "id": 2191366618, "comment": "Required type", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "native_names", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Native names" }, { "name": "selfie_required", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Is a selfie required" }, { "name": "translation_required", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Is a translation required" }, { "name": "type", "type": "SecureValueType", "comment": "Secure value type" }] }, { "kind": "class", "name": "secureRequiredTypeOneOf", "type": "SecureRequiredType", "id": 41187252, "comment": "One of", "arguments": [{ "name": "types", "type": "SecureRequiredType", "typeModifiers": { "isVector": true }, "comment": "Secure required value types" }] }, { "kind": "class", "name": "help.passportConfigNotModified", "type": "help.PassportConfig", "id": 3216634967, "comment": "Password configuration not modified", "arguments": [] }, { "kind": "class", "name": "help.passportConfig", "type": "help.PassportConfig", "id": 2694370991, "comment": "Telegram passport configuration", "arguments": [{ "name": "hash", "type": "int", "comment": "Hash used for caching, for more info click here" }, { "name": "countries_langs", "type": "DataJSON", "comment": "Localization" }] }, { "kind": "class", "name": "inputAppEvent", "type": "InputAppEvent", "id": 488313413, "comment": "Event that occurred in the application.", "arguments": [{ "name": "time", "type": "double", "comment": "Client's exact timestamp for the event" }, { "name": "type", "type": "string", "comment": "Type of event" }, { "name": "peer", "type": "long", "comment": "Arbitrary numeric value for more convenient selection of certain event types, or events referring to a certain object" }, { "name": "data", "type": "JSONValue", "comment": "Details of the event" }] }, { "kind": "class", "name": "jsonObjectValue", "type": "JSONObjectValue", "id": 3235781593, "comment": "JSON key: value pair", "arguments": [{ "name": "key", "type": "string", "comment": "Key" }, { "name": "value", "type": "JSONValue", "comment": "Value" }] }, { "kind": "class", "name": "jsonNull", "type": "JSONValue", "id": 1064139624, "comment": "null JSON value", "arguments": [] }, { "kind": "class", "name": "jsonBool", "type": "JSONValue", "id": 3342098026, "comment": "JSON boolean value", "arguments": [{ "name": "value", "type": "Bool", "comment": "Value" }] }, { "kind": "class", "name": "jsonNumber", "type": "JSONValue", "id": 736157604, "comment": "JSON numeric value", "arguments": [{ "name": "value", "type": "double", "comment": "Value" }] }, { "kind": "class", "name": "jsonString", "type": "JSONValue", "id": 3072226938, "comment": "JSON string", "arguments": [{ "name": "value", "type": "string", "comment": "Value" }] }, { "kind": "class", "name": "jsonArray", "type": "JSONValue", "id": 4148447075, "comment": "JSON array", "arguments": [{ "name": "value", "type": "JSONValue", "typeModifiers": { "isVector": true }, "comment": "JSON values" }] }, { "kind": "class", "name": "jsonObject", "type": "JSONValue", "id": 2579616925, "comment": "JSON object value", "arguments": [{ "name": "value", "type": "JSONObjectValue", "typeModifiers": { "isVector": true }, "comment": "Values" }] }, { "kind": "class", "name": "pageTableCell", "type": "PageTableCell", "id": 878078826, "comment": "Table cell", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "header", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Is this element part of the column header" }, { "name": "align_center", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Horizontally centered block" }, { "name": "align_right", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "Right-aligned block" }, { "name": "valign_middle", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Vertically centered block" }, { "name": "valign_bottom", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "Block vertically-aligned to the bottom" }, { "name": "text", "type": "RichText", "typeModifiers": { "predicate": "flags.7" }, "comment": "Content" }, { "name": "colspan", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "For how many columns should this cell extend" }, { "name": "rowspan", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "For how many rows should this cell extend" }] }, { "kind": "class", "name": "pageTableRow", "type": "PageTableRow", "id": 3770729957, "comment": "Table row", "arguments": [{ "name": "cells", "type": "PageTableCell", "typeModifiers": { "isVector": true }, "comment": "Table cells" }] }, { "kind": "class", "name": "pageCaption", "type": "PageCaption", "id": 1869903447, "comment": "Page caption", "arguments": [{ "name": "text", "type": "RichText", "comment": "Caption" }, { "name": "credit", "type": "RichText", "comment": "Credits" }] }, { "kind": "class", "name": "pageListItemText", "type": "PageListItem", "id": 3106911949, "comment": "List item", "arguments": [{ "name": "text", "type": "RichText", "comment": "Text" }] }, { "kind": "class", "name": "pageListItemBlocks", "type": "PageListItem", "id": 635466748, "comment": "List item", "arguments": [{ "name": "blocks", "type": "PageBlock", "typeModifiers": { "isVector": true }, "comment": "Blocks" }] }, { "kind": "class", "name": "pageListOrderedItemText", "type": "PageListOrderedItem", "id": 1577484359, "comment": "Ordered list of text items", "arguments": [{ "name": "num", "type": "string", "comment": "Number of element within ordered list" }, { "name": "text", "type": "RichText", "comment": "Text" }] }, { "kind": "class", "name": "pageListOrderedItemBlocks", "type": "PageListOrderedItem", "id": 2564655414, "comment": "Ordered list of IV blocks", "arguments": [{ "name": "num", "type": "string", "comment": "Number of element within ordered list" }, { "name": "blocks", "type": "PageBlock", "typeModifiers": { "isVector": true }, "comment": "Item contents" }] }, { "kind": "class", "name": "pageRelatedArticle", "type": "PageRelatedArticle", "id": 3012615176, "comment": "Related article", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "url", "type": "string", "comment": "URL of article" }, { "name": "webpage_id", "type": "long", "comment": "Webpage ID of generated IV preview" }, { "name": "title", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Title" }, { "name": "description", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Description" }, { "name": "photo_id", "type": "long", "typeModifiers": { "predicate": "flags.2" }, "comment": "ID of preview photo" }, { "name": "author", "type": "string", "typeModifiers": { "predicate": "flags.3" }, "comment": "Author name" }, { "name": "published_date", "type": "int", "typeModifiers": { "predicate": "flags.4" }, "comment": "Date of publication" }] }, { "kind": "class", "name": "page", "type": "Page", "id": 2556788493, "comment": "Instant view page", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "part", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Indicates that not full page preview is available to the client and it will need to fetch full Instant View from the server using {@link messages.RawGetWebPagePreviewRequest}." }, { "name": "rtl", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the page contains RTL text" }, { "name": "v2", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether this is an IV v2 page" }, { "name": "url", "type": "string", "comment": "Original page HTTP URL" }, { "name": "blocks", "type": "PageBlock", "typeModifiers": { "isVector": true }, "comment": "Page elements (like with HTML elements, only as TL constructors)" }, { "name": "photos", "type": "Photo", "typeModifiers": { "isVector": true }, "comment": "Photos in page" }, { "name": "documents", "type": "Document", "typeModifiers": { "isVector": true }, "comment": "Media in page" }, { "name": "views", "type": "int", "typeModifiers": { "predicate": "flags.3" }, "comment": "View count" }] }, { "kind": "class", "name": "help.supportName", "type": "help.SupportName", "id": 2349199817, "comment": "Localized name for telegram support", "arguments": [{ "name": "name", "type": "string", "comment": "Localized name" }] }, { "kind": "class", "name": "help.userInfoEmpty", "type": "help.UserInfo", "id": 4088278765, "comment": "Internal use", "arguments": [] }, { "kind": "class", "name": "help.userInfo", "type": "help.UserInfo", "id": 32192344, "comment": "Internal use", "arguments": [{ "name": "message", "type": "string", "comment": "Info" }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "isVector": true }, "comment": "Message entities for styled text" }, { "name": "author", "type": "string", "comment": "Author" }, { "name": "date", "type": "int", "comment": "Date" }] }, { "kind": "class", "name": "pollAnswer", "type": "PollAnswer", "id": 4279689930, "comment": "A possible answer of a poll", "arguments": [{ "name": "text", "type": "TextWithEntities", "comment": "Textual representation of the answer (only Premium users can use custom emoji entities here)." }, { "name": "option", "type": "bytes", "comment": "The param that has to be passed to {@link messages.RawSendVoteRequest}." }] }, { "kind": "class", "name": "poll", "type": "Poll", "id": 1484026161, "comment": "Poll", "arguments": [{ "name": "id", "type": "long", "comment": "ID of the poll" }, { "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "closed", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the poll is closed and doesn't accept any more answers" }, { "name": "public_voters", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether cast votes are publicly visible to all users (non-anonymous poll)" }, { "name": "multiple_choice", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether multiple options can be chosen as answer" }, { "name": "quiz", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether this is a quiz (with wrong and correct answers, results shown in the return type)" }, { "name": "question", "type": "TextWithEntities", "comment": "The question of the poll (only Premium users can use custom emoji entities here)." }, { "name": "answers", "type": "PollAnswer", "typeModifiers": { "isVector": true }, "comment": "The possible answers, vote using {@link messages.RawSendVoteRequest}." }, { "name": "close_period", "type": "int", "typeModifiers": { "predicate": "flags.4" }, "comment": "Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date." }, { "name": "close_date", "type": "int", "typeModifiers": { "predicate": "flags.5" }, "comment": "Point in time (UNIX timestamp in seconds) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future; can't be used together with close_period." }] }, { "kind": "class", "name": "pollAnswerVoters", "type": "PollAnswerVoters", "id": 997055186, "comment": "A poll answer, and how users voted on it", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "chosen", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether we have chosen this answer" }, { "name": "correct", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "For quizzes, whether the option we have chosen is correct" }, { "name": "option", "type": "bytes", "comment": "The param that has to be passed to {@link messages.RawSendVoteRequest}." }, { "name": "voters", "type": "int", "comment": "How many users voted for this option" }] }, { "kind": "class", "name": "pollResults", "type": "PollResults", "id": 2061444128, "comment": "Results of poll", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "min", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Similar to min objects, used for poll constructors that are the same for all users so they don't have the option chosen by the current user (you can use {@link messages.RawGetPollResultsRequest} to get the full poll results)." }, { "name": "results", "type": "PollAnswerVoters", "typeModifiers": { "predicate": "flags.1", "isVector": true }, "comment": "Poll results" }, { "name": "total_voters", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "Total number of people that voted in the poll" }, { "name": "recent_voters", "type": "Peer", "typeModifiers": { "predicate": "flags.3", "isVector": true }, "comment": "IDs of the last users that recently voted in the poll" }, { "name": "solution", "type": "string", "typeModifiers": { "predicate": "flags.4" }, "comment": "Explanation of quiz solution" }, { "name": "solution_entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.4", "isVector": true }, "comment": "Message entities for styled text in quiz solution" }] }, { "kind": "class", "name": "chatOnlines", "type": "ChatOnlines", "id": 4030849616, "comment": "Number of online users in a chat", "arguments": [{ "name": "onlines", "type": "int", "comment": "Number of online users" }] }, { "kind": "class", "name": "statsURL", "type": "StatsURL", "id": 1202287072, "comment": "URL with chat statistics", "arguments": [{ "name": "url", "type": "string", "comment": "Chat statistics" }] }, { "kind": "class", "name": "chatAdminRights", "type": "ChatAdminRights", "id": 1605510357, "comment": "Represents the rights of an admin in a channel/supergroup.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "change_info", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, allows the admin to modify the description of the channel/supergroup" }, { "name": "post_messages", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "If set, allows the admin to post messages in the channel" }, { "name": "edit_messages", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "If set, allows the admin to also edit messages from other admins in the channel" }, { "name": "delete_messages", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "If set, allows the admin to also delete messages from other admins in the channel" }, { "name": "ban_users", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "If set, allows the admin to ban users from the channel/supergroup" }, { "name": "invite_users", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "If set, allows the admin to invite users in the channel/supergroup" }, { "name": "pin_messages", "type": "true", "typeModifiers": { "predicate": "flags.7" }, "comment": "If set, allows the admin to pin messages in the channel/supergroup" }, { "name": "add_admins", "type": "true", "typeModifiers": { "predicate": "flags.9" }, "comment": "If set, allows the admin to add other admins with the same (or more limited) permissions in the channel/supergroup" }, { "name": "anonymous", "type": "true", "typeModifiers": { "predicate": "flags.10" }, "comment": "Whether this admin is anonymous" }, { "name": "manage_call", "type": "true", "typeModifiers": { "predicate": "flags.11" }, "comment": "If set, allows the admin to change group call/livestream settings" }, { "name": "other", "type": "true", "typeModifiers": { "predicate": "flags.12" }, "comment": "Set this flag if none of the other flags are set, but you still want the user to be an admin: if this or any of the other flags are set, the admin can get the chat admin log, get chat statistics, get message statistics in channels, get channel members, see anonymous administrators in supergroups and ignore slow mode." }, { "name": "manage_topics", "type": "true", "typeModifiers": { "predicate": "flags.13" }, "comment": "If set, allows the admin to create, delete or modify forum topics »." }, { "name": "post_stories", "type": "true", "typeModifiers": { "predicate": "flags.14" }, "comment": "If set, allows the admin to post stories as the channel." }, { "name": "edit_stories", "type": "true", "typeModifiers": { "predicate": "flags.15" }, "comment": "If set, allows the admin to edit stories posted by the other admins of the channel." }, { "name": "delete_stories", "type": "true", "typeModifiers": { "predicate": "flags.16" }, "comment": "If set, allows the admin to delete stories posted by the other admins of the channel." }] }, { "kind": "class", "name": "chatBannedRights", "type": "ChatBannedRights", "id": 2668758040, "comment": "Represents the rights of a normal user in a supergroup/channel/chat. In this case, the flags are inverted: if set, a flag does not allow a user to do X.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "view_messages", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, does not allow a user to view messages in a supergroup/channel/chat" }, { "name": "send_messages", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "If set, does not allow a user to send messages in a supergroup/chat" }, { "name": "send_media", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "If set, does not allow a user to send any media in a supergroup/chat" }, { "name": "send_stickers", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "If set, does not allow a user to send stickers in a supergroup/chat" }, { "name": "send_gifs", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "If set, does not allow a user to send gifs in a supergroup/chat" }, { "name": "send_games", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "If set, does not allow a user to send games in a supergroup/chat" }, { "name": "send_inline", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "If set, does not allow a user to use inline bots in a supergroup/chat." }, { "name": "embed_links", "type": "true", "typeModifiers": { "predicate": "flags.7" }, "comment": "If set, does not allow a user to embed links in the messages of a supergroup/chat" }, { "name": "send_polls", "type": "true", "typeModifiers": { "predicate": "flags.8" }, "comment": "If set, does not allow a user to send polls in a supergroup/chat" }, { "name": "change_info", "type": "true", "typeModifiers": { "predicate": "flags.10" }, "comment": "If set, does not allow any user to change the description of a supergroup/chat" }, { "name": "invite_users", "type": "true", "typeModifiers": { "predicate": "flags.15" }, "comment": "If set, does not allow any user to invite users in a supergroup/chat" }, { "name": "pin_messages", "type": "true", "typeModifiers": { "predicate": "flags.17" }, "comment": "If set, does not allow any user to pin messages in a supergroup/chat" }, { "name": "manage_topics", "type": "true", "typeModifiers": { "predicate": "flags.18" }, "comment": "If set, does not allow any user to create, delete or modify forum topics »." }, { "name": "send_photos", "type": "true", "typeModifiers": { "predicate": "flags.19" }, "comment": "If set, does not allow a user to send photos in a supergroup/chat." }, { "name": "send_videos", "type": "true", "typeModifiers": { "predicate": "flags.20" }, "comment": "If set, does not allow a user to send videos in a supergroup/chat." }, { "name": "send_roundvideos", "type": "true", "typeModifiers": { "predicate": "flags.21" }, "comment": "If set, does not allow a user to send round videos in a supergroup/chat." }, { "name": "send_audios", "type": "true", "typeModifiers": { "predicate": "flags.22" }, "comment": "If set, does not allow a user to send audio files in a supergroup/chat." }, { "name": "send_voices", "type": "true", "typeModifiers": { "predicate": "flags.23" }, "comment": "If set, does not allow a user to send voice messages in a supergroup/chat." }, { "name": "send_docs", "type": "true", "typeModifiers": { "predicate": "flags.24" }, "comment": "If set, does not allow a user to send documents in a supergroup/chat." }, { "name": "send_plain", "type": "true", "typeModifiers": { "predicate": "flags.25" }, "comment": "If set, does not allow a user to send text messages in a supergroup/chat." }, { "name": "until_date", "type": "int", "comment": "Validity of said permissions (it is considered forever any value less then 30 seconds or more then 366 days)." }] }, { "kind": "class", "name": "inputWallPaper", "type": "InputWallPaper", "id": 3861952889, "comment": "Wallpaper", "arguments": [{ "name": "id", "type": "long", "comment": "Wallpaper ID" }, { "name": "access_hash", "type": "long", "comment": "Access hash" }] }, { "kind": "class", "name": "inputWallPaperSlug", "type": "InputWallPaper", "id": 1913199744, "comment": "Wallpaper by slug (a unique ID, obtained from a wallpaper link »)", "arguments": [{ "name": "slug", "type": "string", "comment": "Unique wallpaper ID" }] }, { "kind": "class", "name": "inputWallPaperNoFile", "type": "InputWallPaper", "id": 2524595758, "comment": "Wallpaper with no file access hash, used for example when deleting (unsave=true) wallpapers using {@link account.RawSaveWallPaperRequest}, specifying just the wallpaper ID.", "arguments": [{ "name": "id", "type": "long", "comment": "Wallpaper ID" }] }, { "kind": "class", "name": "account.wallPapersNotModified", "type": "account.WallPapers", "id": 471437699, "comment": "No new wallpapers were found", "arguments": [] }, { "kind": "class", "name": "account.wallPapers", "type": "account.WallPapers", "id": 3452142988, "comment": "Installed wallpapers", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here" }, { "name": "wallpapers", "type": "WallPaper", "typeModifiers": { "isVector": true }, "comment": "Wallpapers" }] }, { "kind": "class", "name": "codeSettings", "type": "CodeSettings", "id": 2904898936, "comment": "Settings used by telegram servers for sending the confirm code.\n\nExample implementations: telegram for android, tdlib.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "allow_flashcall", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to allow phone verification via phone calls." }, { "name": "current_number", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Pass true if the phone number is used on the current device. Ignored if allow_flashcall is not set." }, { "name": "allow_app_hash", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "If a token that will be included in eventually sent SMSs is required: required in newer versions of android, to use the android SMS receiver APIs" }, { "name": "allow_missed_call", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Whether this device supports receiving the code using the {@link auth.RawCodeTypeMissedCall} method" }, { "name": "allow_firebase", "type": "true", "typeModifiers": { "predicate": "flags.7" }, "comment": "Whether Firebase auth is supported" }, { "name": "unknown_number", "type": "true", "typeModifiers": { "predicate": "flags.9" }, "comment": "Set this flag if there is a SIM card in the current device, but it is not possible to check whether the specified phone number matches the SIM's phone number." }, { "name": "logout_tokens", "type": "bytes", "typeModifiers": { "predicate": "flags.6", "isVector": true }, "comment": "Previously stored future auth tokens, see the documentation for more info »" }, { "name": "token", "type": "string", "typeModifiers": { "predicate": "flags.8" }, "comment": "Used only by official iOS apps for Firebase auth: device token for apple push." }, { "name": "app_sandbox", "type": "Bool", "typeModifiers": { "predicate": "flags.8" }, "comment": "Used only by official iOS apps for firebase auth: whether a sandbox-certificate will be used during transmission of the push notification." }] }, { "kind": "class", "name": "wallPaperSettings", "type": "WallPaperSettings", "id": 925826256, "comment": "Wallpaper rendering information.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "blur", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "For image wallpapers »: if set, the JPEG must be downscaled to fit in 450x450 square and then box-blurred with radius 12." }, { "name": "motion", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "If set, the background needs to be slightly moved when the device is rotated." }, { "name": "background_color", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Used for solid », gradient » and freeform gradient » fills." }, { "name": "second_background_color", "type": "int", "typeModifiers": { "predicate": "flags.4" }, "comment": "Used for gradient » and freeform gradient » fills." }, { "name": "third_background_color", "type": "int", "typeModifiers": { "predicate": "flags.5" }, "comment": "Used for freeform gradient » fills." }, { "name": "fourth_background_color", "type": "int", "typeModifiers": { "predicate": "flags.6" }, "comment": "Used for freeform gradient » fills." }, { "name": "intensity", "type": "int", "typeModifiers": { "predicate": "flags.3" }, "comment": "Used for pattern wallpapers »." }, { "name": "rotation", "type": "int", "typeModifiers": { "predicate": "flags.4" }, "comment": "Clockwise rotation angle of the gradient, in degrees; 0-359. Should be always divisible by 45." }, { "name": "emoticon", "type": "string", "typeModifiers": { "predicate": "flags.7" }, "comment": "If set, this wallpaper can be used as a channel wallpaper and is represented by the specified UTF-8 emoji." }] }, { "kind": "class", "name": "autoDownloadSettings", "type": "AutoDownloadSettings", "id": 3131405864, "comment": "Autodownload settings", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "disabled", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Disable automatic media downloads?" }, { "name": "video_preload_large", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether to preload the first seconds of videos larger than the specified limit" }, { "name": "audio_preload_next", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether to preload the next audio track when you're listening to music" }, { "name": "phonecalls_less_data", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether to enable data saving mode in phone calls" }, { "name": "stories_preload", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "Whether to preload stories; in particular, the first {@link RawDocumentAttributeVideo}.preload_prefix_size bytes of story videos should be preloaded." }, { "name": "photo_size_max", "type": "int", "comment": "Maximum size of photos to preload" }, { "name": "video_size_max", "type": "int53", "comment": "Maximum size of videos to preload" }, { "name": "file_size_max", "type": "int53", "comment": "Maximum size of other files to preload" }, { "name": "video_upload_maxbitrate", "type": "int", "comment": "Maximum suggested bitrate for uploading videos" }, { "name": "small_queue_active_operations_max", "type": "int", "comment": "A limit, specifying the maximum number of files that should be downloaded in parallel from the same DC, for files smaller than 20MB." }, { "name": "large_queue_active_operations_max", "type": "int", "comment": "A limit, specifying the maximum number of files that should be downloaded in parallel from the same DC, for files bigger than 20MB." }] }, { "kind": "class", "name": "account.autoDownloadSettings", "type": "account.AutoDownloadSettings", "id": 1674235686, "comment": "Media autodownload settings", "arguments": [{ "name": "low", "type": "AutoDownloadSettings", "comment": "Low data usage preset" }, { "name": "medium", "type": "AutoDownloadSettings", "comment": "Medium data usage preset" }, { "name": "high", "type": "AutoDownloadSettings", "comment": "High data usage preset" }] }, { "kind": "class", "name": "emojiKeyword", "type": "EmojiKeyword", "id": 3585325561, "comment": "Emoji keyword", "arguments": [{ "name": "keyword", "type": "string", "comment": "Keyword" }, { "name": "emoticons", "type": "string", "typeModifiers": { "isVector": true }, "comment": "Emojis associated to keyword" }] }, { "kind": "class", "name": "emojiKeywordDeleted", "type": "EmojiKeyword", "id": 594408994, "comment": "Deleted emoji keyword", "arguments": [{ "name": "keyword", "type": "string", "comment": "Keyword" }, { "name": "emoticons", "type": "string", "typeModifiers": { "isVector": true }, "comment": "Emojis that were associated to keyword" }] }, { "kind": "class", "name": "emojiKeywordsDifference", "type": "EmojiKeywordsDifference", "id": 1556570557, "comment": "Changes to emoji keywords", "arguments": [{ "name": "lang_code", "type": "string", "comment": "Language code for keywords" }, { "name": "from_version", "type": "int", "comment": "Previous emoji keyword list version" }, { "name": "version", "type": "int", "comment": "Current version of emoji keyword list" }, { "name": "keywords", "type": "EmojiKeyword", "typeModifiers": { "isVector": true }, "comment": "Emojis associated to keywords" }] }, { "kind": "class", "name": "emojiURL", "type": "EmojiURL", "id": 2775937949, "comment": "An HTTP URL which can be used to automatically log in into translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation", "arguments": [{ "name": "url", "type": "string", "comment": "An HTTP URL which can be used to automatically log in into translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation" }] }, { "kind": "class", "name": "emojiLanguage", "type": "EmojiLanguage", "id": 3019592545, "comment": "Emoji language", "arguments": [{ "name": "lang_code", "type": "string", "comment": "Language code" }] }, { "kind": "class", "name": "folder", "type": "Folder", "id": 4283715173, "comment": "Folder", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "autofill_new_broadcasts", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Automatically add new channels to this folder" }, { "name": "autofill_public_groups", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Automatically add joined new public supergroups to this folder" }, { "name": "autofill_new_correspondents", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Automatically add new private chats to this folder" }, { "name": "id", "type": "int", "comment": "Folder ID" }, { "name": "title", "type": "string", "comment": "Folder title" }, { "name": "photo", "type": "ChatPhoto", "typeModifiers": { "predicate": "flags.3" }, "comment": "Folder picture" }] }, { "kind": "class", "name": "inputFolderPeer", "type": "InputFolderPeer", "id": 4224893590, "comment": "Peer in a folder", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer" }, { "name": "folder_id", "type": "int", "comment": "Peer folder ID, for more info click here" }] }, { "kind": "class", "name": "folderPeer", "type": "FolderPeer", "id": 3921323624, "comment": "Peer in a folder", "arguments": [{ "name": "peer", "type": "Peer", "comment": "Folder peer info" }, { "name": "folder_id", "type": "int", "comment": "Peer folder ID, for more info click here" }] }, { "kind": "class", "name": "messages.searchCounter", "type": "messages.SearchCounter", "id": 3896830975, "comment": "Indicates how many results would be found by a {@link messages.RawSearchRequest} call with the same parameters", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "inexact", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "If set, the results may be inexact" }, { "name": "filter", "type": "MessagesFilter", "comment": "Provided message filter" }, { "name": "count", "type": "int", "comment": "Number of results that were found server-side" }] }, { "kind": "class", "name": "urlAuthResultRequest", "type": "UrlAuthResult", "id": 2463316494, "comment": "Details about the authorization request, for more info click here »", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "request_write_access", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the bot would like to send messages to the user" }, { "name": "bot", "type": "User", "comment": "Username of a bot, which will be used for user authorization. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details." }, { "name": "domain", "type": "string", "comment": "The domain name of the website on which the user will log in." }] }, { "kind": "class", "name": "urlAuthResultAccepted", "type": "UrlAuthResult", "id": 2408320590, "comment": "Details about an accepted authorization request, for more info click here »", "arguments": [{ "name": "url", "type": "string", "comment": "The URL name of the website on which the user has logged in." }] }, { "kind": "class", "name": "urlAuthResultDefault", "type": "UrlAuthResult", "id": 2849430303, "comment": "Details about an accepted authorization request, for more info click here »", "arguments": [] }, { "kind": "class", "name": "channelLocationEmpty", "type": "ChannelLocation", "id": 3216354699, "comment": "No location (normal supergroup)", "arguments": [] }, { "kind": "class", "name": "channelLocation", "type": "ChannelLocation", "id": 547062491, "comment": "Geographical location of supergroup (geogroups)", "arguments": [{ "name": "geo_point", "type": "GeoPoint", "comment": "Geographical location of supergroup" }, { "name": "address", "type": "string", "comment": "Textual description of the address" }] }, { "kind": "class", "name": "peerLocated", "type": "PeerLocated", "id": 3393592157, "comment": "Peer geolocated nearby", "arguments": [{ "name": "peer", "type": "Peer", "comment": "Peer" }, { "name": "expires", "type": "int", "comment": "Validity period of current data" }, { "name": "distance", "type": "int", "comment": "Distance from the peer in meters" }] }, { "kind": "class", "name": "peerSelfLocated", "type": "PeerLocated", "id": 4176226379, "comment": "Current peer", "arguments": [{ "name": "expires", "type": "int", "comment": "Expiry of geolocation info for current peer" }] }, { "kind": "class", "name": "restrictionReason", "type": "RestrictionReason", "id": 3497176244, "comment": "Restriction reason.\n\nContains the reason why access to a certain object must be restricted. Clients are supposed to deny access to the channel if the platform field is equal to all or to the current platform (ios, android, wp, etc.). Platforms can be concatenated (ios-android, ios-wp), unknown platforms are to be ignored. The text is the error message that should be shown to the user.", "arguments": [{ "name": "platform", "type": "string", "comment": "Platform identifier (ios, android, wp, all, etc.), can be concatenated with a dash as separator (android-ios, ios-wp, etc)" }, { "name": "reason", "type": "string", "comment": "Restriction reason (porno, terms, etc.)" }, { "name": "text", "type": "string", "comment": "Error message to be shown to the user" }] }, { "kind": "class", "name": "inputTheme", "type": "InputTheme", "id": 1012306921, "comment": "Theme", "arguments": [{ "name": "id", "type": "long", "comment": "ID" }, { "name": "access_hash", "type": "long", "comment": "Access hash" }] }, { "kind": "class", "name": "inputThemeSlug", "type": "InputTheme", "id": 4119399921, "comment": "Theme by theme ID", "arguments": [{ "name": "slug", "type": "string", "comment": "Unique theme ID obtained from a theme deep link »" }] }, { "kind": "class", "name": "theme", "type": "Theme", "id": 2685298646, "comment": "Theme", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "creator", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the current user is the creator of this theme" }, { "name": "default", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether this is the default theme" }, { "name": "for_chat", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Whether this theme is meant to be used as a chat theme" }, { "name": "id", "type": "long", "comment": "Theme ID" }, { "name": "access_hash", "type": "long", "comment": "Theme access hash" }, { "name": "slug", "type": "string", "comment": "Unique theme ID" }, { "name": "title", "type": "string", "comment": "Theme name" }, { "name": "document", "type": "Document", "typeModifiers": { "predicate": "flags.2" }, "comment": "Theme" }, { "name": "settings", "type": "ThemeSettings", "typeModifiers": { "predicate": "flags.3", "isVector": true }, "comment": "Theme settings" }, { "name": "emoticon", "type": "string", "typeModifiers": { "predicate": "flags.6" }, "comment": "Theme emoji" }, { "name": "installs_count", "type": "int", "typeModifiers": { "predicate": "flags.4" }, "comment": "Installation count" }] }, { "kind": "class", "name": "account.themesNotModified", "type": "account.Themes", "id": 4095653410, "comment": "No new themes were installed", "arguments": [] }, { "kind": "class", "name": "account.themes", "type": "account.Themes", "id": 2587724909, "comment": "Installed themes", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here" }, { "name": "themes", "type": "Theme", "typeModifiers": { "isVector": true }, "comment": "Themes" }] }, { "kind": "class", "name": "auth.loginToken", "type": "auth.LoginToken", "id": 1654593920, "comment": "Login token (for QR code login)", "arguments": [{ "name": "expires", "type": "int", "comment": "Expiration date of QR code" }, { "name": "token", "type": "bytes", "comment": "Token to render in QR code" }] }, { "kind": "class", "name": "auth.loginTokenMigrateTo", "type": "auth.LoginToken", "id": 110008598, "comment": "Repeat the query to the specified DC", "arguments": [{ "name": "dc_id", "type": "int", "comment": "DC ID" }, { "name": "token", "type": "bytes", "comment": "Token to use for login" }] }, { "kind": "class", "name": "auth.loginTokenSuccess", "type": "auth.LoginToken", "id": 957176926, "comment": "Login via token (QR code) succeeded!", "arguments": [{ "name": "authorization", "type": "auth.Authorization", "comment": "Authorization info" }] }, { "kind": "class", "name": "account.contentSettings", "type": "account.ContentSettings", "id": 1474462241, "comment": "Sensitive content settings", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "sensitive_enabled", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether viewing of sensitive (NSFW) content is enabled" }, { "name": "sensitive_can_change", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the current client can change the sensitive content settings to view NSFW content" }] }, { "kind": "class", "name": "messages.inactiveChats", "type": "messages.InactiveChats", "id": 2837970629, "comment": "Inactive chat list", "arguments": [{ "name": "dates", "type": "int", "typeModifiers": { "isVector": true }, "comment": "When was the chat last active" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Chat list" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Users mentioned in the chat list" }] }, { "kind": "class", "name": "baseThemeClassic", "type": "BaseTheme", "id": 3282117730, "comment": "Classic theme", "arguments": [] }, { "kind": "class", "name": "baseThemeDay", "type": "BaseTheme", "id": 4225242760, "comment": "Day theme", "arguments": [] }, { "kind": "class", "name": "baseThemeNight", "type": "BaseTheme", "id": 3081969320, "comment": "Night theme", "arguments": [] }, { "kind": "class", "name": "baseThemeTinted", "type": "BaseTheme", "id": 1834973166, "comment": "Tinted theme", "arguments": [] }, { "kind": "class", "name": "baseThemeArctic", "type": "BaseTheme", "id": 1527845466, "comment": "Arctic theme", "arguments": [] }, { "kind": "class", "name": "inputThemeSettings", "type": "InputThemeSettings", "id": 2413711439, "comment": "Theme settings", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "message_colors_animated", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "If set, the freeform gradient fill needs to be animated on every sent message" }, { "name": "base_theme", "type": "BaseTheme", "comment": "Default theme on which this theme is based" }, { "name": "accent_color", "type": "int", "comment": "Accent color, ARGB format" }, { "name": "outbox_accent_color", "type": "int", "typeModifiers": { "predicate": "flags.3" }, "comment": "Accent color of outgoing messages in ARGB format" }, { "name": "message_colors", "type": "int", "typeModifiers": { "predicate": "flags.0", "isVector": true }, "comment": "The fill to be used as a background for outgoing messages, in RGB24 format.
If just one or two equal colors are provided, describes a solid fill of a background.
If two different colors are provided, describes the top and bottom colors of a 0-degree gradient.
If three or four colors are provided, describes a freeform gradient fill of a background." }, { "name": "wallpaper", "type": "InputWallPaper", "typeModifiers": { "predicate": "flags.1" }, "comment": "{@link RawInputWallPaper} or {@link RawInputWallPaper} when passing wallpaper files for image or pattern wallpapers, {@link RawInputWallPaperNoFile} with id=0 otherwise." }, { "name": "wallpaper_settings", "type": "WallPaperSettings", "typeModifiers": { "predicate": "flags.1" }, "comment": "Wallpaper settings." }] }, { "kind": "class", "name": "themeSettings", "type": "ThemeSettings", "id": 4200117972, "comment": "Theme settings", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "message_colors_animated", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "If set, the freeform gradient fill needs to be animated on every sent message." }, { "name": "base_theme", "type": "BaseTheme", "comment": "Base theme" }, { "name": "accent_color", "type": "int", "comment": "Accent color, ARGB format" }, { "name": "outbox_accent_color", "type": "int", "typeModifiers": { "predicate": "flags.3" }, "comment": "Accent color of outgoing messages in ARGB format" }, { "name": "message_colors", "type": "int", "typeModifiers": { "predicate": "flags.0", "isVector": true }, "comment": "The fill to be used as a background for outgoing messages, in RGB24 format.
If just one or two equal colors are provided, describes a solid fill of a background.
If two different colors are provided, describes the top and bottom colors of a 0-degree gradient.
If three or four colors are provided, describes a freeform gradient fill of a background." }, { "name": "wallpaper", "type": "WallPaper", "typeModifiers": { "predicate": "flags.1" }, "comment": "Wallpaper" }] }, { "kind": "class", "name": "webPageAttributeTheme", "type": "WebPageAttribute", "id": 1421174295, "comment": "Page theme", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "documents", "type": "Document", "typeModifiers": { "predicate": "flags.0", "isVector": true }, "comment": "Theme files" }, { "name": "settings", "type": "ThemeSettings", "typeModifiers": { "predicate": "flags.1" }, "comment": "Theme settings" }] }, { "kind": "class", "name": "webPageAttributeStory", "type": "WebPageAttribute", "id": 781501415, "comment": "Webpage preview of a Telegram story", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "peer", "type": "Peer", "comment": "Peer that posted the story" }, { "name": "id", "type": "int", "comment": "Story ID" }, { "name": "story", "type": "StoryItem", "typeModifiers": { "predicate": "flags.0" }, "comment": "May contain the story, if not the story should be fetched when and if needed using {@link stories.RawGetStoriesByIDRequest} with the above id and peer." }] }, { "kind": "class", "name": "webPageAttributeStickerSet", "type": "WebPageAttribute", "id": 1355547603, "comment": "Contains info about a stickerset », for a {@link RawWebPage} preview of a stickerset deep link » (the {@link RawWebPage} will have a type of telegram_stickerset).", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "emojis", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether this i s a custom emoji stickerset." }, { "name": "text_color", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the color of this TGS custom emoji stickerset should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context." }, { "name": "stickers", "type": "Document", "typeModifiers": { "isVector": true }, "comment": "A subset of the stickerset in the stickerset." }] }, { "kind": "class", "name": "messages.votesList", "type": "messages.VotesList", "id": 1218005070, "comment": "How users voted in a poll", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "count", "type": "int", "comment": "Total number of votes for all options (or only for the chosen option, if provided to {@link messages.RawGetPollVotesRequest})" }, { "name": "votes", "type": "MessagePeerVote", "typeModifiers": { "isVector": true }, "comment": "Vote info for each user" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Mentioned chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Info about users that voted in the poll" }, { "name": "next_offset", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Offset to use with the next {@link messages.RawGetPollVotesRequest} request, empty string if no more results are available." }] }, { "kind": "class", "name": "bankCardOpenUrl", "type": "BankCardOpenUrl", "id": 4117234314, "comment": "Credit card info URL provided by the bank", "arguments": [{ "name": "url", "type": "string", "comment": "Info URL" }, { "name": "name", "type": "string", "comment": "Bank name" }] }, { "kind": "class", "name": "payments.bankCardData", "type": "payments.BankCardData", "id": 1042605427, "comment": "Credit card info, provided by the card's bank(s)", "arguments": [{ "name": "title", "type": "string", "comment": "Credit card title" }, { "name": "open_urls", "type": "BankCardOpenUrl", "typeModifiers": { "isVector": true }, "comment": "Info URL(s) provided by the card's bank(s)" }] }, { "kind": "class", "name": "dialogFilter", "type": "DialogFilter", "id": 1605718587, "comment": "Dialog filter AKA folder", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "contacts", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to include all contacts in this folder" }, { "name": "non_contacts", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether to include all non-contacts in this folder" }, { "name": "groups", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether to include all groups in this folder" }, { "name": "broadcasts", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether to include all channels in this folder" }, { "name": "bots", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "Whether to include all bots in this folder" }, { "name": "exclude_muted", "type": "true", "typeModifiers": { "predicate": "flags.11" }, "comment": "Whether to exclude muted chats from this folder" }, { "name": "exclude_read", "type": "true", "typeModifiers": { "predicate": "flags.12" }, "comment": "Whether to exclude read chats from this folder" }, { "name": "exclude_archived", "type": "true", "typeModifiers": { "predicate": "flags.13" }, "comment": "Whether to exclude archived chats from this folder" }, { "name": "id", "type": "int", "comment": "Folder ID" }, { "name": "title", "type": "string", "comment": "Folder name (max 12 UTF-8 chars)" }, { "name": "emoticon", "type": "string", "typeModifiers": { "predicate": "flags.25" }, "comment": "Emoji to use as icon for the folder." }, { "name": "color", "type": "int", "typeModifiers": { "predicate": "flags.27" }, "comment": "A color ID for the folder tag associated to this folder, see here » for more info." }, { "name": "pinned_peers", "type": "InputPeer", "typeModifiers": { "isVector": true }, "comment": "Pinned chats, folders can have unlimited pinned chats" }, { "name": "include_peers", "type": "InputPeer", "typeModifiers": { "isVector": true }, "comment": "Include the following chats in this folder" }, { "name": "exclude_peers", "type": "InputPeer", "typeModifiers": { "isVector": true }, "comment": "Exclude the following chats from this folder" }] }, { "kind": "class", "name": "dialogFilterDefault", "type": "DialogFilter", "id": 909284270, "comment": "Used only when reordering folders to indicate the default (all chats) folder.", "arguments": [] }, { "kind": "class", "name": "dialogFilterChatlist", "type": "DialogFilter", "id": 2682424996, "comment": "A folder imported using a chat folder deep link ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "has_my_invites", "type": "true", "typeModifiers": { "predicate": "flags.26" }, "comment": "Whether the current user has created some chat folder deep links » to share the folder as well." }, { "name": "id", "type": "int", "comment": "ID of the folder" }, { "name": "title", "type": "string", "comment": "Name of the folder (max 12 UTF-8 chars)" }, { "name": "emoticon", "type": "string", "typeModifiers": { "predicate": "flags.25" }, "comment": "Emoji to use as icon for the folder." }, { "name": "color", "type": "int", "typeModifiers": { "predicate": "flags.27" }, "comment": "A color ID for the folder tag associated to this folder, see here » for more info." }, { "name": "pinned_peers", "type": "InputPeer", "typeModifiers": { "isVector": true }, "comment": "Pinned chats, folders can have unlimited pinned chats" }, { "name": "include_peers", "type": "InputPeer", "typeModifiers": { "isVector": true }, "comment": "Chats to include in the folder" }] }, { "kind": "class", "name": "dialogFilterSuggested", "type": "DialogFilterSuggested", "id": 2004110666, "comment": "Suggested folders", "arguments": [{ "name": "filter", "type": "DialogFilter", "comment": "Folder info" }, { "name": "description", "type": "string", "comment": "Folder description" }] }, { "kind": "class", "name": "statsDateRangeDays", "type": "StatsDateRangeDays", "id": 3057118639, "comment": "Channel statistics date range", "arguments": [{ "name": "min_date", "type": "int", "comment": "Initial date" }, { "name": "max_date", "type": "int", "comment": "Final date" }] }, { "kind": "class", "name": "statsAbsValueAndPrev", "type": "StatsAbsValueAndPrev", "id": 3410210014, "comment": "Statistics value couple; initial and final value for period of time currently in consideration", "arguments": [{ "name": "current", "type": "double", "comment": "Current value" }, { "name": "previous", "type": "double", "comment": "Previous value" }] }, { "kind": "class", "name": "statsPercentValue", "type": "StatsPercentValue", "id": 3419287520, "comment": "Channel statistics percentage.
\nCompute the percentage simply by doing part * total / 100", "arguments": [{ "name": "part", "type": "double", "comment": "Partial value" }, { "name": "total", "type": "double", "comment": "Total value" }] }, { "kind": "class", "name": "statsGraphAsync", "type": "StatsGraph", "id": 1244130093, "comment": "This channel statistics graph must be generated asynchronously using {@link stats.RawLoadAsyncGraphRequest} to reduce server load", "arguments": [{ "name": "token", "type": "string", "comment": "Token to use for fetching the async graph" }] }, { "kind": "class", "name": "statsGraphError", "type": "StatsGraph", "id": 3202127906, "comment": "An error occurred while generating the statistics graph", "arguments": [{ "name": "error", "type": "string", "comment": "The error" }] }, { "kind": "class", "name": "statsGraph", "type": "StatsGraph", "id": 2393138358, "comment": "Channel statistics graph", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "json", "type": "DataJSON", "comment": "Statistics data" }, { "name": "zoom_token", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Zoom token" }] }, { "kind": "class", "name": "stats.broadcastStats", "type": "stats.BroadcastStats", "id": 963421692, "comment": "Channel statistics.", "arguments": [{ "name": "period", "type": "StatsDateRangeDays", "comment": "Period in consideration" }, { "name": "followers", "type": "StatsAbsValueAndPrev", "comment": "Follower count change for period in consideration" }, { "name": "views_per_post", "type": "StatsAbsValueAndPrev", "comment": "total_viewcount/postcount, for posts posted during the period in consideration.
Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)." }, { "name": "shares_per_post", "type": "StatsAbsValueAndPrev", "comment": "total_sharecount/postcount, for posts posted during the period in consideration.
Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)" }, { "name": "reactions_per_post", "type": "StatsAbsValueAndPrev", "comment": "total_reactions/postcount, for posts posted during the period in consideration.
Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)" }, { "name": "views_per_story", "type": "StatsAbsValueAndPrev", "comment": "total_views/storycount, for posts posted during the period in consideration.
Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)" }, { "name": "shares_per_story", "type": "StatsAbsValueAndPrev", "comment": "total_shares/storycount, for posts posted during the period in consideration.
Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)" }, { "name": "reactions_per_story", "type": "StatsAbsValueAndPrev", "comment": "total_reactions/storycount, for posts posted during the period in consideration.
Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)" }, { "name": "enabled_notifications", "type": "StatsPercentValue", "comment": "Percentage of subscribers with enabled notifications" }, { "name": "growth_graph", "type": "StatsGraph", "comment": "Channel growth graph (absolute subscriber count)" }, { "name": "followers_graph", "type": "StatsGraph", "comment": "Followers growth graph (relative subscriber count)" }, { "name": "mute_graph", "type": "StatsGraph", "comment": "Muted users graph (relative)" }, { "name": "top_hours_graph", "type": "StatsGraph", "comment": "Views per hour graph (absolute)" }, { "name": "interactions_graph", "type": "StatsGraph", "comment": "Interactions graph (absolute)" }, { "name": "iv_interactions_graph", "type": "StatsGraph", "comment": "IV interactions graph (absolute)" }, { "name": "views_by_source_graph", "type": "StatsGraph", "comment": "Views by source graph (absolute)" }, { "name": "new_followers_by_source_graph", "type": "StatsGraph", "comment": "New followers by source graph (absolute)" }, { "name": "languages_graph", "type": "StatsGraph", "comment": "Subscriber language graph (pie chart)" }, { "name": "reactions_by_emotion_graph", "type": "StatsGraph", "comment": "A graph containing the number of reactions on posts categorized by emotion" }, { "name": "story_interactions_graph", "type": "StatsGraph", "comment": "A graph containing the number of story views and shares" }, { "name": "story_reactions_by_emotion_graph", "type": "StatsGraph", "comment": "A graph containing the number of reactions on stories categorized by emotion" }, { "name": "recent_posts_interactions", "type": "PostInteractionCounters", "typeModifiers": { "isVector": true }, "comment": "Detailed statistics about number of views and shares of recently sent messages and stories" }] }, { "kind": "class", "name": "help.promoDataEmpty", "type": "help.PromoData", "id": 2566302837, "comment": "No PSA/MTProxy info is available", "arguments": [{ "name": "expires", "type": "int", "comment": "Re-fetch PSA/MTProxy info after the specified number of seconds" }] }, { "kind": "class", "name": "help.promoData", "type": "help.PromoData", "id": 2352576831, "comment": "MTProxy/Public Service Announcement information", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "proxy", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "MTProxy-related channel" }, { "name": "expires", "type": "int", "comment": "Expiry of PSA/MTProxy info" }, { "name": "peer", "type": "Peer", "comment": "MTProxy/PSA peer" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Chat info" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "User info" }, { "name": "psa_type", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "PSA type" }, { "name": "psa_message", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "PSA message" }] }, { "kind": "class", "name": "videoSize", "type": "VideoSize", "id": 3727929492, "comment": "An animated profile picture in MPEG4 format", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "type", "type": "string", "comment": "u for animated profile pictures, and v for trimmed and downscaled video previews" }, { "name": "w", "type": "int", "comment": "Video width" }, { "name": "h", "type": "int", "comment": "Video height" }, { "name": "size", "type": "int", "comment": "File size" }, { "name": "video_start_ts", "type": "double", "typeModifiers": { "predicate": "flags.0" }, "comment": "Timestamp that should be shown as static preview to the user (seconds)" }] }, { "kind": "class", "name": "videoSizeEmojiMarkup", "type": "VideoSize", "id": 4166795580, "comment": "An animated profile picture based on a custom emoji sticker.", "arguments": [{ "name": "emoji_id", "type": "long", "comment": "Custom emoji ID: the custom emoji sticker is shown at the center of the profile picture and occupies at most 67% of it." }, { "name": "background_colors", "type": "int", "typeModifiers": { "isVector": true }, "comment": "1, 2, 3 or 4 RBG-24 colors used to generate a solid (1), gradient (2) or freeform gradient (3, 4) background, similar to how fill wallpapers are generated. The rotation angle for gradient backgrounds is 0." }] }, { "kind": "class", "name": "videoSizeStickerMarkup", "type": "VideoSize", "id": 228623102, "comment": "An animated profile picture based on a sticker.", "arguments": [{ "name": "stickerset", "type": "InputStickerSet", "comment": "Stickerset" }, { "name": "sticker_id", "type": "long", "comment": "Sticker ID" }, { "name": "background_colors", "type": "int", "typeModifiers": { "isVector": true }, "comment": "1, 2, 3 or 4 RBG-24 colors used to generate a solid (1), gradient (2) or freeform gradient (3, 4) background, similar to how fill wallpapers are generated. The rotation angle for gradient backgrounds is 0." }] }, { "kind": "class", "name": "statsGroupTopPoster", "type": "StatsGroupTopPoster", "id": 2634330011, "comment": "Information about an active user in a supergroup", "arguments": [{ "name": "user_id", "type": "int53", "comment": "User ID" }, { "name": "messages", "type": "int", "comment": "Number of messages for statistics period in consideration" }, { "name": "avg_chars", "type": "int", "comment": "Average number of characters per message" }] }, { "kind": "class", "name": "statsGroupTopAdmin", "type": "StatsGroupTopAdmin", "id": 3612888199, "comment": "Information about an active admin in a supergroup", "arguments": [{ "name": "user_id", "type": "int53", "comment": "User ID" }, { "name": "deleted", "type": "int", "comment": "Number of deleted messages for statistics period in consideration" }, { "name": "kicked", "type": "int", "comment": "Number of kicked users for statistics period in consideration" }, { "name": "banned", "type": "int", "comment": "Number of banned users for statistics period in consideration" }] }, { "kind": "class", "name": "statsGroupTopInviter", "type": "StatsGroupTopInviter", "id": 1398765469, "comment": "Information about an active supergroup inviter", "arguments": [{ "name": "user_id", "type": "int53", "comment": "User ID" }, { "name": "invitations", "type": "int", "comment": "Number of invitations for statistics period in consideration" }] }, { "kind": "class", "name": "stats.megagroupStats", "type": "stats.MegagroupStats", "id": 4018141462, "comment": "Supergroup statistics", "arguments": [{ "name": "period", "type": "StatsDateRangeDays", "comment": "Period in consideration" }, { "name": "members", "type": "StatsAbsValueAndPrev", "comment": "Member count change for period in consideration" }, { "name": "messages", "type": "StatsAbsValueAndPrev", "comment": "Message number change for period in consideration" }, { "name": "viewers", "type": "StatsAbsValueAndPrev", "comment": "Number of users that viewed messages, for range in consideration" }, { "name": "posters", "type": "StatsAbsValueAndPrev", "comment": "Number of users that posted messages, for range in consideration" }, { "name": "growth_graph", "type": "StatsGraph", "comment": "Supergroup growth graph (absolute subscriber count)" }, { "name": "members_graph", "type": "StatsGraph", "comment": "Members growth (relative subscriber count)" }, { "name": "new_members_by_source_graph", "type": "StatsGraph", "comment": "New members by source graph" }, { "name": "languages_graph", "type": "StatsGraph", "comment": "Subscriber language graph (pie chart)" }, { "name": "messages_graph", "type": "StatsGraph", "comment": "Message activity graph (stacked bar graph, message type)" }, { "name": "actions_graph", "type": "StatsGraph", "comment": "Group activity graph (deleted, modified messages, blocked users)" }, { "name": "top_hours_graph", "type": "StatsGraph", "comment": "Activity per hour graph (absolute)" }, { "name": "weekdays_graph", "type": "StatsGraph", "comment": "Activity per day of week graph (absolute)" }, { "name": "top_posters", "type": "StatsGroupTopPoster", "typeModifiers": { "isVector": true }, "comment": "Info about most active group members" }, { "name": "top_admins", "type": "StatsGroupTopAdmin", "typeModifiers": { "isVector": true }, "comment": "Info about most active group admins" }, { "name": "top_inviters", "type": "StatsGroupTopInviter", "typeModifiers": { "isVector": true }, "comment": "Info about most active group inviters" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Info about users mentioned in statistics" }] }, { "kind": "class", "name": "globalPrivacySettings", "type": "GlobalPrivacySettings", "id": 1934380235, "comment": "Global privacy settings", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "archive_and_mute_new_noncontact_peers", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to archive and mute new chats from non-contacts" }, { "name": "keep_archived_unmuted", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether unmuted chats will be kept in the Archive chat list when they get a new message." }, { "name": "keep_archived_folders", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether unmuted chats that are always included or pinned in a folder, will be kept in the Archive chat list when they get a new message. Ignored if keep_archived_unmuted is set." }, { "name": "hide_read_marks", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "If this flag is set, the {@link RawInputPrivacyKeyStatusTimestamp} key will also apply to the ability to use {@link messages.RawGetOutboxReadDateRequest} on messages sent to us.
Meaning, users that cannot see our exact last online date due to the current value of the {@link RawInputPrivacyKeyStatusTimestamp} key will receive a 403 USER_PRIVACY_RESTRICTED error when invoking {@link messages.RawGetOutboxReadDateRequest} to fetch the exact read date of a message they sent to us.
The {@link RawUserFull}.read_dates_private flag will be set for users that have this flag enabled." }, { "name": "new_noncontact_peers_require_premium", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "If set, only users that have a premium account, are in our contact list, or already have a private chat with us can write to us; a 403 PRIVACY_PREMIUM_REQUIRED error will be emitted otherwise.
The {@link RawUserFull}.contact_require_premium flag will be set for users that have this flag enabled.
To check whether we can write to a user with this flag enabled, if we haven't yet cached all the required information (for example we don't have the {@link RawUserFull} or history of all users while displaying the chat list in the sharing UI) the {@link users.RawGetIsPremiumRequiredToContactRequest} method may be invoked, passing the list of users currently visible in the UI, returning a list of booleans that directly specify whether we can or cannot write to each user.
Premium users only, non-Premium users will receive a PREMIUM_ACCOUNT_REQUIRED error when trying to enable this flag." }] }, { "kind": "class", "name": "help.countryCode", "type": "help.CountryCode", "id": 1107543535, "comment": "Country code and phone number pattern of a specific country", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "country_code", "type": "string", "comment": "ISO country code" }, { "name": "prefixes", "type": "string", "typeModifiers": { "predicate": "flags.0", "isVector": true }, "comment": "Possible phone prefixes" }, { "name": "patterns", "type": "string", "typeModifiers": { "predicate": "flags.1", "isVector": true }, "comment": "Phone patterns: for example, XXX XXX XXX" }] }, { "kind": "class", "name": "help.country", "type": "help.Country", "id": 3280440867, "comment": "Name, ISO code, localized name and phone codes/patterns of a specific country", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "hidden", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether this country should not be shown in the list" }, { "name": "iso2", "type": "string", "comment": "ISO code of country" }, { "name": "default_name", "type": "string", "comment": "Name of the country in the country's language" }, { "name": "name", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Name of the country in the user's language, if different from the original name" }, { "name": "country_codes", "type": "help.CountryCode", "typeModifiers": { "isVector": true }, "comment": "Phone codes/patterns" }] }, { "kind": "class", "name": "help.countriesListNotModified", "type": "help.CountriesList", "id": 2479628082, "comment": "The country list has not changed", "arguments": [] }, { "kind": "class", "name": "help.countriesList", "type": "help.CountriesList", "id": 2278585758, "comment": "Name, ISO code, localized name and phone codes/patterns of all available countries", "arguments": [{ "name": "countries", "type": "help.Country", "typeModifiers": { "isVector": true }, "comment": "Name, ISO code, localized name and phone codes/patterns of all available countries" }, { "name": "hash", "type": "int", "comment": "Hash used for caching, for more info click here" }] }, { "kind": "class", "name": "messageViews", "type": "MessageViews", "id": 1163625789, "comment": "View, forward counter + info about replies of a specific message", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "views", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "View count of message" }, { "name": "forwards", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Forward count of message" }, { "name": "replies", "type": "MessageReplies", "typeModifiers": { "predicate": "flags.2" }, "comment": "Reply and thread information of message" }] }, { "kind": "class", "name": "messages.messageViews", "type": "messages.MessageViews", "id": 3066361155, "comment": "View, forward counter + info about replies", "arguments": [{ "name": "views", "type": "MessageViews", "typeModifiers": { "isVector": true }, "comment": "View, forward counter + info about replies" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Chats mentioned in constructor" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Users mentioned in constructor" }] }, { "kind": "class", "name": "messages.discussionMessage", "type": "messages.DiscussionMessage", "id": 2788431746, "comment": "Information about a message thread", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "messages", "type": "Message", "typeModifiers": { "isVector": true }, "comment": "The messages from which the thread starts. The messages are returned in reverse chronological order (i.e., in order of decreasing message ID)." }, { "name": "max_id", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Message ID of latest reply in this thread" }, { "name": "read_inbox_max_id", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Message ID of latest read incoming message in this thread" }, { "name": "read_outbox_max_id", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "Message ID of latest read outgoing message in this thread" }, { "name": "unread_count", "type": "int", "comment": "Number of unread messages" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Chats mentioned in constructor" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Users mentioned in constructor" }] }, { "kind": "class", "name": "messageReplyHeader", "type": "MessageReplyHeader", "id": 2948336091, "comment": "Message replies and thread information", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "reply_to_scheduled", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "This is a reply to a scheduled message." }, { "name": "forum_topic", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether this message was sent in a forum topic (except for the General topic)." }, { "name": "quote", "type": "true", "typeModifiers": { "predicate": "flags.9" }, "comment": "Whether this message is quoting a part of another message." }, { "name": "reply_to_msg_id", "type": "int", "typeModifiers": { "predicate": "flags.4" }, "comment": "ID of message to which this message is replying" }, { "name": "reply_to_peer_id", "type": "Peer", "typeModifiers": { "predicate": "flags.0" }, "comment": "For replies sent in channel discussion threads of which the current user is not a member, the discussion group ID" }, { "name": "reply_from", "type": "MessageFwdHeader", "typeModifiers": { "predicate": "flags.5" }, "comment": "When replying to a message sent by a certain peer to another chat, contains info about the peer that originally sent the message to that other chat." }, { "name": "reply_media", "type": "MessageMedia", "typeModifiers": { "predicate": "flags.8" }, "comment": "When replying to a media sent by a certain peer to another chat, contains the media of the replied-to message." }, { "name": "reply_to_top_id", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "ID of the message that started this message thread" }, { "name": "quote_text", "type": "string", "typeModifiers": { "predicate": "flags.6" }, "comment": "Used to quote-reply to only a certain section (specified here) of the original message." }, { "name": "quote_entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.7", "isVector": true }, "comment": "Message entities for styled text from the quote_text field." }, { "name": "quote_offset", "type": "int", "typeModifiers": { "predicate": "flags.10" }, "comment": "Offset of the message quote_text within the original message (in UTF-16 code units)." }] }, { "kind": "class", "name": "messageReplyStoryHeader", "type": "MessageReplyHeader", "id": 240843065, "comment": "Represents a reply to a story", "arguments": [{ "name": "peer", "type": "Peer", "comment": "Sender of the story." }, { "name": "story_id", "type": "int", "comment": "Story ID" }] }, { "kind": "class", "name": "messageReplies", "type": "MessageReplies", "id": 2211844034, "comment": "Info about the comment section of a channel post, or a simple message thread", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "comments", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether this constructor contains information about the comment section of a channel post, or a simple message thread" }, { "name": "replies", "type": "int", "comment": "Contains the total number of replies in this thread or comment section." }, { "name": "replies_pts", "type": "int", "comment": "PTS of the message that started this thread." }, { "name": "recent_repliers", "type": "Peer", "typeModifiers": { "predicate": "flags.1", "isVector": true }, "comment": "For channel post comments, contains information about the last few comment posters for a specific thread, to show a small list of commenter profile pictures in client previews." }, { "name": "channel_id", "type": "int53", "typeModifiers": { "predicate": "flags.0" }, "comment": "For channel post comments, contains the ID of the associated discussion supergroup" }, { "name": "max_id", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "ID of the latest message in this thread or comment section." }, { "name": "read_max_id", "type": "int", "typeModifiers": { "predicate": "flags.3" }, "comment": "Contains the ID of the latest read message in this thread or comment section." }] }, { "kind": "class", "name": "peerBlocked", "type": "PeerBlocked", "id": 3908927508, "comment": "Information about a blocked peer", "arguments": [{ "name": "peer_id", "type": "Peer", "comment": "Peer ID" }, { "name": "date", "type": "int", "comment": "When was the peer blocked" }] }, { "kind": "class", "name": "stats.messageStats", "type": "stats.MessageStats", "id": 2145983508, "comment": "Message statistics", "arguments": [{ "name": "views_graph", "type": "StatsGraph", "comment": "Message view graph" }, { "name": "reactions_by_emotion_graph", "type": "StatsGraph", "comment": "A graph containing the number of reactions on stories categorized by emotion" }] }, { "kind": "class", "name": "groupCallDiscarded", "type": "GroupCall", "id": 2004925620, "comment": "An ended group call", "arguments": [{ "name": "id", "type": "long", "comment": "Group call ID" }, { "name": "access_hash", "type": "long", "comment": "Group call access hash" }, { "name": "duration", "type": "int", "comment": "Group call duration" }] }, { "kind": "class", "name": "groupCall", "type": "GroupCall", "id": 3583468812, "comment": "Info about a group call or livestream", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "join_muted", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the user should be muted upon joining the call" }, { "name": "can_change_join_muted", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether the current user can change the value of the join_muted flag using {@link phone.RawToggleGroupCallSettingsRequest}" }, { "name": "join_date_asc", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "Specifies the ordering to use when locally sorting by date and displaying in the UI group call participants." }, { "name": "schedule_start_subscribed", "type": "true", "typeModifiers": { "predicate": "flags.8" }, "comment": "Whether we subscribed to the scheduled call" }, { "name": "can_start_video", "type": "true", "typeModifiers": { "predicate": "flags.9" }, "comment": "Whether you can start streaming video into the call" }, { "name": "record_video_active", "type": "true", "typeModifiers": { "predicate": "flags.11" }, "comment": "Whether the group call is currently being recorded" }, { "name": "rtmp_stream", "type": "true", "typeModifiers": { "predicate": "flags.12" }, "comment": "Whether RTMP streams are allowed" }, { "name": "listeners_hidden", "type": "true", "typeModifiers": { "predicate": "flags.13" }, "comment": "Whether the listeners list is hidden and cannot be fetched using {@link phone.RawGetGroupParticipantsRequest}. The phone.groupParticipants.count and groupCall.participants_count counters will still include listeners." }, { "name": "id", "type": "long", "comment": "Group call ID" }, { "name": "access_hash", "type": "long", "comment": "Group call access hash" }, { "name": "participants_count", "type": "int", "comment": "Participant count" }, { "name": "title", "type": "string", "typeModifiers": { "predicate": "flags.3" }, "comment": "Group call title" }, { "name": "stream_dc_id", "type": "int", "typeModifiers": { "predicate": "flags.4" }, "comment": "DC ID to be used for livestream chunks" }, { "name": "record_start_date", "type": "int", "typeModifiers": { "predicate": "flags.5" }, "comment": "When was the recording started" }, { "name": "schedule_date", "type": "int", "typeModifiers": { "predicate": "flags.7" }, "comment": "When is the call scheduled to start" }, { "name": "unmuted_video_count", "type": "int", "typeModifiers": { "predicate": "flags.10" }, "comment": "Number of people currently streaming video into the call" }, { "name": "unmuted_video_limit", "type": "int", "comment": "Maximum number of people allowed to stream video into the call" }, { "name": "version", "type": "int", "comment": "Version" }] }, { "kind": "class", "name": "inputGroupCall", "type": "InputGroupCall", "id": 3635053583, "comment": "Points to a specific group call", "arguments": [{ "name": "id", "type": "long", "comment": "Group call ID" }, { "name": "access_hash", "type": "long", "comment": "Group call access hash" }] }, { "kind": "class", "name": "groupCallParticipant", "type": "GroupCallParticipant", "id": 3953538814, "comment": "Info about a group call participant", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "muted", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the participant is muted" }, { "name": "left", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the participant has left" }, { "name": "can_self_unmute", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether the participant can unmute themselves" }, { "name": "just_joined", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "Whether the participant has just joined" }, { "name": "versioned", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "If set, and {@link RawUpdateGroupCallParticipants}.version < locally stored call.version, info about this participant should be ignored. If (...), and {@link RawUpdateGroupCallParticipants}.version > call.version+1, the participant list should be refetched using {@link phone.RawGetGroupParticipantsRequest}." }, { "name": "min", "type": "true", "typeModifiers": { "predicate": "flags.8" }, "comment": "If not set, the volume and muted_by_you fields can be safely used to overwrite locally cached information; otherwise, volume will contain valid information only if volume_by_admin is set both in the cache and in the received constructor." }, { "name": "muted_by_you", "type": "true", "typeModifiers": { "predicate": "flags.9" }, "comment": "Whether this participant was muted by the current user" }, { "name": "volume_by_admin", "type": "true", "typeModifiers": { "predicate": "flags.10" }, "comment": "Whether our volume can only changed by an admin" }, { "name": "self", "type": "true", "typeModifiers": { "predicate": "flags.12" }, "comment": "Whether this participant is the current user" }, { "name": "video_joined", "type": "true", "typeModifiers": { "predicate": "flags.15" }, "comment": "Whether this participant is currently broadcasting video" }, { "name": "peer", "type": "Peer", "comment": "Peer information" }, { "name": "date", "type": "int", "comment": "When did this participant join the group call" }, { "name": "active_date", "type": "int", "typeModifiers": { "predicate": "flags.3" }, "comment": "When was this participant last active in the group call" }, { "name": "source", "type": "int", "comment": "Source ID" }, { "name": "volume", "type": "int", "typeModifiers": { "predicate": "flags.7" }, "comment": "Volume, if not set the volume is set to 100%." }, { "name": "about", "type": "string", "typeModifiers": { "predicate": "flags.11" }, "comment": "Info about this participant" }, { "name": "raise_hand_rating", "type": "long", "typeModifiers": { "predicate": "flags.13" }, "comment": "Specifies the UI visualization order of peers with raised hands: peers with a higher rating should be showed first in the list." }, { "name": "video", "type": "GroupCallParticipantVideo", "typeModifiers": { "predicate": "flags.6" }, "comment": "Info about the video stream the participant is currently broadcasting" }, { "name": "presentation", "type": "GroupCallParticipantVideo", "typeModifiers": { "predicate": "flags.14" }, "comment": "Info about the screen sharing stream the participant is currently broadcasting" }] }, { "kind": "class", "name": "phone.groupCall", "type": "phone.GroupCall", "id": 2658302637, "comment": "Contains info about a group call, and partial info about its participants.", "arguments": [{ "name": "call", "type": "GroupCall", "comment": "Info about the group call" }, { "name": "participants", "type": "GroupCallParticipant", "typeModifiers": { "isVector": true }, "comment": "A partial list of participants." }, { "name": "participants_next_offset", "type": "string", "comment": "Next offset to use when fetching the remaining participants using {@link phone.RawGetGroupParticipantsRequest}" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Chats mentioned in the participants vector" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Users mentioned in the participants vector" }] }, { "kind": "class", "name": "phone.groupParticipants", "type": "phone.GroupParticipants", "id": 4101460406, "comment": "Info about the participants of a group call or livestream", "arguments": [{ "name": "count", "type": "int", "comment": "Number of participants" }, { "name": "participants", "type": "GroupCallParticipant", "typeModifiers": { "isVector": true }, "comment": "List of participants" }, { "name": "next_offset", "type": "string", "comment": "If not empty, the specified list of participants is partial, and more participants can be fetched specifying this parameter as offset in {@link phone.RawGetGroupParticipantsRequest}." }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Mentioned chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Mentioned users" }, { "name": "version", "type": "int", "comment": "Version info" }] }, { "kind": "class", "name": "inlineQueryPeerTypeSameBotPM", "type": "InlineQueryPeerType", "id": 813821341, "comment": "Peer type: private chat with the bot itself", "arguments": [] }, { "kind": "class", "name": "inlineQueryPeerTypePM", "type": "InlineQueryPeerType", "id": 2201751468, "comment": "Peer type: private chat", "arguments": [] }, { "kind": "class", "name": "inlineQueryPeerTypeChat", "type": "InlineQueryPeerType", "id": 3613836554, "comment": "Peer type: chat", "arguments": [] }, { "kind": "class", "name": "inlineQueryPeerTypeMegagroup", "type": "InlineQueryPeerType", "id": 1589952067, "comment": "Peer type: supergroup", "arguments": [] }, { "kind": "class", "name": "inlineQueryPeerTypeBroadcast", "type": "InlineQueryPeerType", "id": 1664413338, "comment": "Peer type: channel", "arguments": [] }, { "kind": "class", "name": "inlineQueryPeerTypeBotPM", "type": "InlineQueryPeerType", "id": 238759180, "comment": "Peer type: private chat with a bot.", "arguments": [] }, { "kind": "class", "name": "messages.historyImport", "type": "messages.HistoryImport", "id": 375566091, "comment": "ID of a specific chat import session, click here for more info ».", "arguments": [{ "name": "id", "type": "long", "comment": "History import ID" }] }, { "kind": "class", "name": "messages.historyImportParsed", "type": "messages.HistoryImportParsed", "id": 1578088377, "comment": "Contains information about a chat export file generated by a foreign chat app, click here for more info.
\nIf neither the pm or group flags are set, the specified chat export was generated from a chat of unknown type.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "pm", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "The chat export file was generated from a private chat." }, { "name": "group", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "The chat export file was generated from a group chat." }, { "name": "title", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "Title of the chat." }] }, { "kind": "class", "name": "messages.affectedFoundMessages", "type": "messages.AffectedFoundMessages", "id": 4019011180, "comment": "Messages found and affected by changes", "arguments": [{ "name": "pts", "type": "int", "comment": "Event count after generation" }, { "name": "pts_count", "type": "int", "comment": "Number of events that were generated" }, { "name": "offset", "type": "int", "comment": "If bigger than zero, the request must be repeated to remove more messages" }, { "name": "messages", "type": "int", "typeModifiers": { "isVector": true }, "comment": "Affected message IDs" }] }, { "kind": "class", "name": "chatInviteImporter", "type": "ChatInviteImporter", "id": 2354765785, "comment": "When and which user joined the chat using a chat invite", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "requested", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether this user currently has a pending join request »" }, { "name": "via_chatlist", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "The participant joined by importing a chat folder deep link »." }, { "name": "user_id", "type": "int53", "comment": "The user" }, { "name": "date", "type": "int", "comment": "When did the user join" }, { "name": "about", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "For users with pending requests, contains bio of the user that requested to join" }, { "name": "approved_by", "type": "int53", "typeModifiers": { "predicate": "flags.1" }, "comment": "The administrator that approved the join request » of the user" }] }, { "kind": "class", "name": "messages.exportedChatInvites", "type": "messages.ExportedChatInvites", "id": 3183881676, "comment": "Info about chat invites exported by a certain admin.", "arguments": [{ "name": "count", "type": "int", "comment": "Number of invites exported by the admin" }, { "name": "invites", "type": "ExportedChatInvite", "typeModifiers": { "isVector": true }, "comment": "Exported invites" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Info about the admin" }] }, { "kind": "class", "name": "messages.exportedChatInvite", "type": "messages.ExportedChatInvite", "id": 410107472, "comment": "Info about a chat invite", "arguments": [{ "name": "invite", "type": "ExportedChatInvite", "comment": "Info about the chat invite" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Mentioned users" }] }, { "kind": "class", "name": "messages.exportedChatInviteReplaced", "type": "messages.ExportedChatInvite", "id": 572915951, "comment": "The specified chat invite was replaced with another one", "arguments": [{ "name": "invite", "type": "ExportedChatInvite", "comment": "The replaced chat invite" }, { "name": "new_invite", "type": "ExportedChatInvite", "comment": "The invite that replaces the previous invite" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Mentioned users" }] }, { "kind": "class", "name": "messages.chatInviteImporters", "type": "messages.ChatInviteImporters", "id": 2176233482, "comment": "Info about the users that joined the chat using a specific chat invite", "arguments": [{ "name": "count", "type": "int", "comment": "Number of users that joined" }, { "name": "importers", "type": "ChatInviteImporter", "typeModifiers": { "isVector": true }, "comment": "The users that joined" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "The users that joined" }] }, { "kind": "class", "name": "chatAdminWithInvites", "type": "ChatAdminWithInvites", "id": 4075613987, "comment": "Info about chat invites generated by admins.", "arguments": [{ "name": "admin_id", "type": "int53", "comment": "The admin" }, { "name": "invites_count", "type": "int", "comment": "Number of invites generated by the admin" }, { "name": "revoked_invites_count", "type": "int", "comment": "Number of revoked invites" }] }, { "kind": "class", "name": "messages.chatAdminsWithInvites", "type": "messages.ChatAdminsWithInvites", "id": 3063640791, "comment": "Info about chat invites generated by admins.", "arguments": [{ "name": "admins", "type": "ChatAdminWithInvites", "typeModifiers": { "isVector": true }, "comment": "Info about chat invites generated by admins." }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Mentioned users" }] }, { "kind": "class", "name": "messages.checkedHistoryImportPeer", "type": "messages.CheckedHistoryImportPeer", "id": 2723014423, "comment": "Contains a confirmation text to be shown to the user, upon importing chat history, click here for more info ».", "arguments": [{ "name": "confirm_text", "type": "string", "comment": "A confirmation text to be shown to the user, upon importing chat history »." }] }, { "kind": "class", "name": "phone.joinAsPeers", "type": "phone.JoinAsPeers", "id": 2951045695, "comment": "A list of peers that can be used to join a group call, presenting yourself as a specific user/channel.", "arguments": [{ "name": "peers", "type": "Peer", "typeModifiers": { "isVector": true }, "comment": "Peers" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Chats mentioned in the peers vector" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Users mentioned in the peers vector" }] }, { "kind": "class", "name": "phone.exportedGroupCallInvite", "type": "phone.ExportedGroupCallInvite", "id": 541839704, "comment": "An invite to a group call or livestream", "arguments": [{ "name": "link", "type": "string", "comment": "Invite link" }] }, { "kind": "class", "name": "groupCallParticipantVideoSourceGroup", "type": "GroupCallParticipantVideoSourceGroup", "id": 3702593719, "comment": "Describes a group of video synchronization source identifiers", "arguments": [{ "name": "semantics", "type": "string", "comment": "SDP semantics" }, { "name": "sources", "type": "int", "typeModifiers": { "isVector": true }, "comment": "Source IDs" }] }, { "kind": "class", "name": "groupCallParticipantVideo", "type": "GroupCallParticipantVideo", "id": 1735736008, "comment": "Info about a video stream", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "paused", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the stream is currently paused" }, { "name": "endpoint", "type": "string", "comment": "Endpoint" }, { "name": "source_groups", "type": "GroupCallParticipantVideoSourceGroup", "typeModifiers": { "isVector": true }, "comment": "Source groups" }, { "name": "audio_source", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Audio source ID" }] }, { "kind": "class", "name": "stickers.suggestedShortName", "type": "stickers.SuggestedShortName", "id": 2248056895, "comment": "A suggested short name for a stickerpack", "arguments": [{ "name": "short_name", "type": "string", "comment": "Suggested short name" }] }, { "kind": "class", "name": "botCommandScopeDefault", "type": "BotCommandScope", "id": 795652779, "comment": "The commands will be valid in all dialogs", "arguments": [] }, { "kind": "class", "name": "botCommandScopeUsers", "type": "BotCommandScope", "id": 1011811544, "comment": "The specified bot commands will only be valid in all private chats with users.", "arguments": [] }, { "kind": "class", "name": "botCommandScopeChats", "type": "BotCommandScope", "id": 1877059713, "comment": "The specified bot commands will be valid in all groups and supergroups.", "arguments": [] }, { "kind": "class", "name": "botCommandScopeChatAdmins", "type": "BotCommandScope", "id": 3114950762, "comment": "The specified bot commands will be valid only for chat administrators, in all groups and supergroups.", "arguments": [] }, { "kind": "class", "name": "botCommandScopePeer", "type": "BotCommandScope", "id": 3684534653, "comment": "The specified bot commands will be valid only in a specific dialog.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The dialog" }] }, { "kind": "class", "name": "botCommandScopePeerAdmins", "type": "BotCommandScope", "id": 1071145937, "comment": "The specified bot commands will be valid for all admins of the specified group or supergroup.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The chat" }] }, { "kind": "class", "name": "botCommandScopePeerUser", "type": "BotCommandScope", "id": 169026035, "comment": "The specified bot commands will be valid only for a specific user in the specified group or supergroup.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The chat" }, { "name": "user_id", "type": "InputUser", "comment": "The user" }] }, { "kind": "class", "name": "account.resetPasswordFailedWait", "type": "account.ResetPasswordResult", "id": 3816265825, "comment": "You recently requested a password reset that was canceled, please wait until the specified date before requesting another reset.", "arguments": [{ "name": "retry_date", "type": "int", "comment": "Wait until this date before requesting another reset." }] }, { "kind": "class", "name": "account.resetPasswordRequestedWait", "type": "account.ResetPasswordResult", "id": 3924819069, "comment": "You successfully requested a password reset, please wait until the specified date before finalizing the reset.", "arguments": [{ "name": "until_date", "type": "int", "comment": "Wait until this date before finalizing the reset." }] }, { "kind": "class", "name": "account.resetPasswordOk", "type": "account.ResetPasswordResult", "id": 3911636542, "comment": "The 2FA password was reset successfully.", "arguments": [] }, { "kind": "class", "name": "sponsoredMessage", "type": "SponsoredMessage", "id": 3186488678, "comment": "A sponsored message.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "recommended", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Whether the message needs to be labeled as \"recommended\" instead of \"sponsored\"" }, { "name": "can_report", "type": "true", "typeModifiers": { "predicate": "flags.12" }, "comment": "Whether this message can be reported as specified here »." }, { "name": "random_id", "type": "bytes", "comment": "Message ID" }, { "name": "url", "type": "string", "comment": "Contains the URL to open when the user clicks on the sponsored message." }, { "name": "title", "type": "string", "comment": "Contains the title of the sponsored message." }, { "name": "message", "type": "string", "comment": "Sponsored message" }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.1", "isVector": true }, "comment": "Message entities for styled text in message." }, { "name": "photo", "type": "Photo", "typeModifiers": { "predicate": "flags.6" }, "comment": "If set, contains a custom profile photo bubble that should be displayed for the sponsored message, like for messages sent in groups." }, { "name": "color", "type": "PeerColor", "typeModifiers": { "predicate": "flags.13" }, "comment": "If set, the sponsored message should use the message accent color » specified in color." }, { "name": "button_text", "type": "string", "comment": "Label of the sponsored message button." }, { "name": "sponsor_info", "type": "string", "typeModifiers": { "predicate": "flags.7" }, "comment": "If set, contains additional information about the sponsor to be shown along with the message." }, { "name": "additional_info", "type": "string", "typeModifiers": { "predicate": "flags.8" }, "comment": "If set, contains additional information about the sponsored message to be shown along with the message." }] }, { "kind": "class", "name": "messages.sponsoredMessages", "type": "messages.SponsoredMessages", "id": 3387825543, "comment": "A set of sponsored messages associated to a channel", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "posts_between", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, specifies the minimum number of messages between shown sponsored messages; otherwise, only one sponsored message must be shown after all ordinary messages." }, { "name": "messages", "type": "SponsoredMessage", "typeModifiers": { "isVector": true }, "comment": "Sponsored messages" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Chats mentioned in the sponsored messages" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Users mentioned in the sponsored messages" }] }, { "kind": "class", "name": "messages.sponsoredMessagesEmpty", "type": "messages.SponsoredMessages", "id": 406407439, "comment": "No sponsored messages are available.", "arguments": [] }, { "kind": "class", "name": "searchResultsCalendarPeriod", "type": "SearchResultsCalendarPeriod", "id": 3383776159, "comment": "Information about found messages sent on a specific day, used to split the messages in {@link messages.RawSearchResultsCalendar} constructors by days.\n\nMultiple searchResultsCalendarPeriod constructors are returned in {@link messages.RawSearchResultsCalendar}, each containing information about the first, last and total number of messages matching the filter that were sent on a specific day.", "arguments": [{ "name": "date", "type": "int", "comment": "The day this object is referring to." }, { "name": "min_msg_id", "type": "int", "comment": "First message ID that was sent on this day." }, { "name": "max_msg_id", "type": "int", "comment": "Last message ID that was sent on this day." }, { "name": "count", "type": "int", "comment": "All messages that were sent on this day." }] }, { "kind": "class", "name": "messages.searchResultsCalendar", "type": "messages.SearchResultsCalendar", "id": 343859772, "comment": "Information about found messages sent on a specific day", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "inexact", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, indicates that the results may be inexact" }, { "name": "count", "type": "int", "comment": "Total number of results matching query" }, { "name": "min_date", "type": "int", "comment": "Starting timestamp of attached messages" }, { "name": "min_msg_id", "type": "int", "comment": "Ending timestamp of attached messages" }, { "name": "offset_id_offset", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Indicates the absolute position of messages[0] within the total result set with count count.
This is useful, for example, if we need to display a progress/total counter (like photo 134 of 200, for all media in a chat, we could simply use photo ${offset_id_offset} of ${count}." }, { "name": "periods", "type": "SearchResultsCalendarPeriod", "typeModifiers": { "isVector": true }, "comment": "Used to split the messages by days: multiple SearchResultsCalendarPeriod constructors are returned, each containing information about the first, last and total number of messages matching the filter that were sent on a specific day.
This information can be easily used to split the returned messages by day." }, { "name": "messages", "type": "Message", "typeModifiers": { "isVector": true }, "comment": "Messages" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Mentioned chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Mentioned users" }] }, { "kind": "class", "name": "searchResultPosition", "type": "SearchResultsPosition", "id": 2137295719, "comment": "Information about a message in a specific position", "arguments": [{ "name": "msg_id", "type": "int", "comment": "Message ID" }, { "name": "date", "type": "int", "comment": "When was the message sent" }, { "name": "offset", "type": "int", "comment": "0-based message position in the full list of suitable messages" }] }, { "kind": "class", "name": "messages.searchResultsPositions", "type": "messages.SearchResultsPositions", "id": 1404185519, "comment": "Information about sparse positions of messages", "arguments": [{ "name": "count", "type": "int", "comment": "Total number of found messages" }, { "name": "positions", "type": "SearchResultsPosition", "typeModifiers": { "isVector": true }, "comment": "List of message positions" }] }, { "kind": "class", "name": "channels.sendAsPeers", "type": "channels.SendAsPeers", "id": 4103516358, "comment": "A list of peers that can be used to send messages in a specific group", "arguments": [{ "name": "peers", "type": "SendAsPeer", "typeModifiers": { "isVector": true }, "comment": "Peers that can be used to send messages to the group" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Mentioned chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Mentioned users" }] }, { "kind": "class", "name": "users.userFull", "type": "users.UserFull", "id": 997004590, "comment": "Full user information", "arguments": [{ "name": "full_user", "type": "UserFull", "comment": "Full user information" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Mentioned chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Mentioned users" }] }, { "kind": "class", "name": "messages.peerSettings", "type": "messages.PeerSettings", "id": 1753266509, "comment": "Peer settings", "arguments": [{ "name": "settings", "type": "PeerSettings", "comment": "Peer settings" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Mentioned chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Mentioned users" }] }, { "kind": "class", "name": "auth.loggedOut", "type": "auth.LoggedOut", "id": 3282207583, "comment": "Future auth token » to be used on subsequent authorizations", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "future_auth_token", "type": "bytes", "typeModifiers": { "predicate": "flags.0" }, "comment": "Future auth token » to be used on subsequent authorizations" }] }, { "kind": "class", "name": "reactionCount", "type": "ReactionCount", "id": 2748435328, "comment": "Reactions", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "chosen_order", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, indicates that the current user also sent this reaction.
The integer value indicates when was the reaction added: the bigger the value, the newer the reaction." }, { "name": "reaction", "type": "Reaction", "comment": "The reaction." }, { "name": "count", "type": "int", "comment": "Number of users that reacted with this emoji." }] }, { "kind": "class", "name": "messageReactions", "type": "MessageReactions", "id": 1328256121, "comment": "Message reactions »", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "min", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Similar to min objects, used for message reaction » constructors that are the same for all users so they don't have the reactions sent by the current user (you can use {@link messages.RawGetMessagesReactionsRequest} to get the full reaction info)." }, { "name": "can_see_list", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether {@link messages.RawGetMessageReactionsListRequest} can be used to see how each specific peer reacted to the message" }, { "name": "reactions_as_tags", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "If set or if there are no reactions, all present and future reactions should be treated as message tags, see here » for more info." }, { "name": "results", "type": "ReactionCount", "typeModifiers": { "isVector": true }, "comment": "Reactions" }, { "name": "recent_reactions", "type": "MessagePeerReaction", "typeModifiers": { "predicate": "flags.1", "isVector": true }, "comment": "List of recent peers and their reactions" }] }, { "kind": "class", "name": "messages.messageReactionsList", "type": "messages.MessageReactionsList", "id": 834488621, "comment": "List of peers that reacted to a specific message", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "count", "type": "int", "comment": "Total number of reactions matching query" }, { "name": "reactions", "type": "MessagePeerReaction", "typeModifiers": { "isVector": true }, "comment": "List of peers that reacted to a specific message" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Mentioned chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Mentioned users" }, { "name": "next_offset", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, indicates the next offset to use to load more results by invoking {@link messages.RawGetMessageReactionsListRequest}." }] }, { "kind": "class", "name": "availableReaction", "type": "AvailableReaction", "id": 3229084673, "comment": "Animations associated with a message reaction", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "inactive", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If not set, the reaction can be added to new messages and enabled in chats." }, { "name": "premium", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether this reaction can only be used by Telegram Premium users" }, { "name": "reaction", "type": "string", "comment": "Reaction emoji" }, { "name": "title", "type": "string", "comment": "Reaction description" }, { "name": "static_icon", "type": "Document", "comment": "Static icon for the reaction" }, { "name": "appear_animation", "type": "Document", "comment": "The animated sticker to show when the user opens the reaction dropdown" }, { "name": "select_animation", "type": "Document", "comment": "The animated sticker to show when the user hovers over the reaction" }, { "name": "activate_animation", "type": "Document", "comment": "The animated sticker to show when the reaction is chosen and activated" }, { "name": "effect_animation", "type": "Document", "comment": "The background effect (still an animated sticker) to play under the activate_animation, when the reaction is chosen and activated" }, { "name": "around_animation", "type": "Document", "typeModifiers": { "predicate": "flags.1" }, "comment": "The animation that plays around the button when you press an existing reaction (played together with center_icon)." }, { "name": "center_icon", "type": "Document", "typeModifiers": { "predicate": "flags.1" }, "comment": "The animation of the emoji inside the button when you press an existing reaction (played together with around_animation)." }] }, { "kind": "class", "name": "messages.availableReactionsNotModified", "type": "messages.AvailableReactions", "id": 2668042583, "comment": "No new reactions are available", "arguments": [] }, { "kind": "class", "name": "messages.availableReactions", "type": "messages.AvailableReactions", "id": 1989032621, "comment": "Animations and metadata associated with message reactions »", "arguments": [{ "name": "hash", "type": "int", "comment": "Hash used for caching, for more info click here" }, { "name": "reactions", "type": "AvailableReaction", "typeModifiers": { "isVector": true }, "comment": "Animations and metadata associated with message reactions »" }] }, { "kind": "class", "name": "messagePeerReaction", "type": "MessagePeerReaction", "id": 2356786748, "comment": "How a certain peer reacted to the message", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "big", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the specified message reaction » should elicit a bigger and longer reaction" }, { "name": "unread", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the reaction wasn't yet marked as read by the current user" }, { "name": "my", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Starting from layer 159, {@link messages.RawSendReactionRequest} will send reactions from the peer (user or channel) specified using {@link messages.RawSaveDefaultSendAsRequest}.
If set, this flag indicates that this reaction was sent by us, even if the peer doesn't point to the current account." }, { "name": "peer_id", "type": "Peer", "comment": "Peer that reacted to the message" }, { "name": "date", "type": "int", "comment": "When was this reaction added" }, { "name": "reaction", "type": "Reaction", "comment": "Reaction emoji" }] }, { "kind": "class", "name": "groupCallStreamChannel", "type": "GroupCallStreamChannel", "id": 2162903215, "comment": "Info about an RTMP stream in a group call or livestream", "arguments": [{ "name": "channel", "type": "int", "comment": "Channel ID" }, { "name": "scale", "type": "int", "comment": "Specifies the duration of the video segment to fetch in milliseconds, by bitshifting 1000 to the right scale times: duration_ms := 1000 >> scale." }, { "name": "last_timestamp_ms", "type": "long", "comment": "Last seen timestamp to easily start fetching livestream chunks using {@link RawInputGroupCallStream}" }] }, { "kind": "class", "name": "phone.groupCallStreamChannels", "type": "phone.GroupCallStreamChannels", "id": 3504636594, "comment": "Info about RTMP streams in a group call or livestream", "arguments": [{ "name": "channels", "type": "GroupCallStreamChannel", "typeModifiers": { "isVector": true }, "comment": "RTMP streams" }] }, { "kind": "class", "name": "phone.groupCallStreamRtmpUrl", "type": "phone.GroupCallStreamRtmpUrl", "id": 767505458, "comment": "RTMP URL and stream key to be used in streaming software", "arguments": [{ "name": "url", "type": "string", "comment": "RTMP URL" }, { "name": "key", "type": "string", "comment": "Stream key" }] }, { "kind": "class", "name": "attachMenuBotIconColor", "type": "AttachMenuBotIconColor", "id": 1165423600, "comment": "Represents an attachment menu icon color for bot mini apps »", "arguments": [{ "name": "name", "type": "string", "comment": "One of the following values:
light_icon - Color of the attachment menu icon (light mode)
light_text - Color of the attachment menu label, once selected (light mode)
dark_icon - Color of the attachment menu icon (dark mode)
dark_text - Color of the attachment menu label, once selected (dark mode)" }, { "name": "color", "type": "int", "comment": "Color in RGB24 format" }] }, { "kind": "class", "name": "attachMenuBotIcon", "type": "AttachMenuBotIcon", "id": 2997303403, "comment": "Represents an attachment menu icon for bot mini apps »", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "name", "type": "string", "comment": "One of the following values: note that animated icons must be played when the user clicks on the button, activating the bot mini app.

default_static - Default attachment menu icon in SVG format
placeholder_static - Default placeholder for opened Web Apps in SVG format
ios_static - Attachment menu icon in SVG format for the official iOS app
ios_animated - Animated attachment menu icon in TGS format for the official iOS app
android_animated - Animated attachment menu icon in TGS format for the official Android app
macos_animated - Animated attachment menu icon in TGS format for the official native Mac OS app
ios_side_menu_static - Side menu icon in PNG format for the official iOS app
android_side_menu_static - Side menu icon in SVG format for the official android app
macos_side_menu_static - Side menu icon in PNG format for the official native Mac OS app" }, { "name": "icon", "type": "Document", "comment": "The actual icon file." }, { "name": "colors", "type": "AttachMenuBotIconColor", "typeModifiers": { "predicate": "flags.0", "isVector": true }, "comment": "Attachment menu icon colors." }] }, { "kind": "class", "name": "attachMenuBot", "type": "AttachMenuBot", "id": 3641544190, "comment": "Represents a bot mini app that can be launched from the attachment/side menu »\n\nAt least one of the show_in_attach_menu or the show_in_side_menu flags will always be set.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "inactive", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, before launching the mini app the client should ask the user to add the mini app to the attachment/side menu, and only if the user accepts, after invoking {@link messages.RawToggleBotInAttachMenuRequest} the app should be opened." }, { "name": "has_settings", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Deprecated flag, can be ignored." }, { "name": "request_write_access", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether the bot would like to send messages to the user." }, { "name": "show_in_attach_menu", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether, when installed, an attachment menu entry should be shown for the Mini App." }, { "name": "show_in_side_menu", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "Whether, when installed, an entry in the main view side menu should be shown for the Mini App." }, { "name": "side_menu_disclaimer_needed", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "If inactive if set and the user hasn't previously accepted the third-party mini apps Terms of Service for this bot, when showing the mini app installation prompt, an additional mandatory checkbox to accept the mini apps TOS and a disclaimer indicating that this Mini App is not affiliated to Telegram should be shown." }, { "name": "bot_id", "type": "int53", "comment": "Bot ID" }, { "name": "short_name", "type": "string", "comment": "Attachment menu item name" }, { "name": "peer_types", "type": "AttachMenuPeerType", "typeModifiers": { "predicate": "flags.3", "isVector": true }, "comment": "List of dialog types where this attachment menu entry should be shown" }, { "name": "icons", "type": "AttachMenuBotIcon", "typeModifiers": { "isVector": true }, "comment": "List of platform-specific static icons and animations to use for the attachment menu button" }] }, { "kind": "class", "name": "attachMenuBotsNotModified", "type": "AttachMenuBots", "id": 4057500252, "comment": "The list of bot mini apps hasn't changed", "arguments": [] }, { "kind": "class", "name": "attachMenuBots", "type": "AttachMenuBots", "id": 1011024320, "comment": "Represents a list of bot mini apps that can be launched from the attachment menu »", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here" }, { "name": "bots", "type": "AttachMenuBot", "typeModifiers": { "isVector": true }, "comment": "List of bot mini apps that can be launched from the attachment menu »" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Info about related users/bots" }] }, { "kind": "class", "name": "attachMenuBotsBot", "type": "AttachMenuBotsBot", "id": 2478794367, "comment": "Represents a bot mini app that can be launched from the attachment menu »", "arguments": [{ "name": "bot", "type": "AttachMenuBot", "comment": "Represents a bot mini app that can be launched from the attachment menu »
" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Info about related users and bots" }] }, { "kind": "class", "name": "webViewResultUrl", "type": "WebViewResult", "id": 1294139288, "comment": "Contains the webview URL with appropriate theme and user info parameters added", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "fullsize", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "If set, the app must be opened in fullsize mode instead of compact mode." }, { "name": "query_id", "type": "long", "typeModifiers": { "predicate": "flags.0" }, "comment": "Webview session ID (only returned by inline button mini apps, menu button mini apps, attachment menu mini apps)." }, { "name": "url", "type": "string", "comment": "Webview URL to open" }] }, { "kind": "class", "name": "webViewMessageSent", "type": "WebViewMessageSent", "id": 211046684, "comment": "Info about a sent inline webview message", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "msg_id", "type": "InputBotInlineMessageID", "typeModifiers": { "predicate": "flags.0" }, "comment": "Message ID" }] }, { "kind": "class", "name": "botMenuButtonDefault", "type": "BotMenuButton", "id": 1966318984, "comment": "Placeholder bot menu button never returned to users: see the docs for more info.", "arguments": [] }, { "kind": "class", "name": "botMenuButtonCommands", "type": "BotMenuButton", "id": 1113113093, "comment": "Bot menu button that opens the bot command list when clicked.", "arguments": [] }, { "kind": "class", "name": "botMenuButton", "type": "BotMenuButton", "id": 3350559974, "comment": "Bot menu button that opens a web app when clicked.", "arguments": [{ "name": "text", "type": "string", "comment": "Title to be displayed on the menu button instead of 'Menu'" }, { "name": "url", "type": "string", "comment": "URL of a web app to open when the user clicks on the button" }] }, { "kind": "class", "name": "account.savedRingtonesNotModified", "type": "account.SavedRingtones", "id": 4227262641, "comment": "The notification sound list hasn't changed.", "arguments": [] }, { "kind": "class", "name": "account.savedRingtones", "type": "account.SavedRingtones", "id": 3253284037, "comment": "A list of saved notification sounds", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here" }, { "name": "ringtones", "type": "Document", "typeModifiers": { "isVector": true }, "comment": "Saved notification sounds" }] }, { "kind": "class", "name": "notificationSoundDefault", "type": "NotificationSound", "id": 2548612798, "comment": "Indicates the default notification sound should be used", "arguments": [] }, { "kind": "class", "name": "notificationSoundNone", "type": "NotificationSound", "id": 1863070943, "comment": "No notification sound should be used", "arguments": [] }, { "kind": "class", "name": "notificationSoundLocal", "type": "NotificationSound", "id": 2198575844, "comment": "Indicates a specific local notification sound should be used", "arguments": [{ "name": "title", "type": "string", "comment": "Notification sound title" }, { "name": "data", "type": "string", "comment": "Notification sound identifier (arbitrary data used by the client to identify a specific local notification sound)" }] }, { "kind": "class", "name": "notificationSoundRingtone", "type": "NotificationSound", "id": 4285300809, "comment": "A specific previously uploaded notification sound should be used", "arguments": [{ "name": "id", "type": "long", "comment": "Document ID of notification sound uploaded using {@link account.RawUploadRingtoneRequest}" }] }, { "kind": "class", "name": "account.savedRingtone", "type": "account.SavedRingtone", "id": 3072737133, "comment": "The notification sound was already in MP3 format and was saved without any modification", "arguments": [] }, { "kind": "class", "name": "account.savedRingtoneConverted", "type": "account.SavedRingtone", "id": 523271863, "comment": "The notification sound was not in MP3 format and was successfully converted and saved, use the returned Document to refer to the notification sound from now on", "arguments": [{ "name": "document", "type": "Document", "comment": "The converted notification sound" }] }, { "kind": "class", "name": "attachMenuPeerTypeSameBotPM", "type": "AttachMenuPeerType", "id": 2104224014, "comment": "The bot attachment menu entry is available in the chat with the bot that offers it", "arguments": [] }, { "kind": "class", "name": "attachMenuPeerTypeBotPM", "type": "AttachMenuPeerType", "id": 3274439194, "comment": "The bot attachment menu entry is available in private chats with other bots (excluding the bot that offers the current attachment menu)", "arguments": [] }, { "kind": "class", "name": "attachMenuPeerTypePM", "type": "AttachMenuPeerType", "id": 4047950623, "comment": "The bot attachment menu entry is available in private chats with other users (not bots)", "arguments": [] }, { "kind": "class", "name": "attachMenuPeerTypeChat", "type": "AttachMenuPeerType", "id": 84480319, "comment": "The bot attachment menu entry is available in groups and supergroups", "arguments": [] }, { "kind": "class", "name": "attachMenuPeerTypeBroadcast", "type": "AttachMenuPeerType", "id": 2080104188, "comment": "The bot attachment menu entry is available in channels", "arguments": [] }, { "kind": "class", "name": "inputInvoiceMessage", "type": "InputInvoice", "id": 3317000281, "comment": "An invoice contained in a {@link RawMessageMediaInvoice} message or paid media ».", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Chat where the invoice/paid media was sent" }, { "name": "msg_id", "type": "int", "comment": "Message ID" }] }, { "kind": "class", "name": "inputInvoiceSlug", "type": "InputInvoice", "id": 3274099439, "comment": "An invoice slug taken from an invoice deep link or from the premium_invoice_slug app config parameter »", "arguments": [{ "name": "slug", "type": "string", "comment": "The invoice slug" }] }, { "kind": "class", "name": "inputInvoicePremiumGiftCode", "type": "InputInvoice", "id": 2560125965, "comment": "Used if the user wishes to start a channel/supergroup giveaway or send some giftcodes to members of a channel/supergroup, in exchange for boosts.", "arguments": [{ "name": "purpose", "type": "InputStorePaymentPurpose", "comment": "Should be populated with {@link RawInputStorePaymentPremiumGiveaway} for giveaways and {@link RawInputStorePaymentPremiumGiftCode} for gifts." }, { "name": "option", "type": "PremiumGiftCodeOption", "comment": "Should be populated with one of the giveaway options returned by {@link payments.RawGetPremiumGiftCodeOptionsRequest}, see the giveaways » documentation for more info." }] }, { "kind": "class", "name": "inputInvoiceStars", "type": "InputInvoice", "id": 1710230755, "comment": "Used to top up the Telegram Stars balance of the current account or someone else's account.", "arguments": [{ "name": "purpose", "type": "InputStorePaymentPurpose", "comment": "Either an {@link RawInputStorePaymentStarsTopup} or an {@link RawInputStorePaymentStarsGift}." }] }, { "kind": "class", "name": "payments.exportedInvoice", "type": "payments.ExportedInvoice", "id": 2932919257, "comment": "Exported invoice deep link", "arguments": [{ "name": "url", "type": "string", "comment": "Exported invoice deep link" }] }, { "kind": "class", "name": "messages.transcribedAudio", "type": "messages.TranscribedAudio", "id": 3485063511, "comment": "Transcribed text from a voice message »", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "pending", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the transcription is partial because audio transcription is still in progress, if set the user may receive further {@link RawUpdateTranscribedAudio} updates with the updated transcription." }, { "name": "transcription_id", "type": "long", "comment": "Transcription ID" }, { "name": "text", "type": "string", "comment": "Transcripted text" }, { "name": "trial_remains_num", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "For non-Premium users, this flag will be set, indicating the remaining transcriptions in the free trial period." }, { "name": "trial_remains_until_date", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "For non-Premium users, this flag will be set, indicating the date when the trial_remains_num counter will be reset to the maximum value of transcribe_audio_trial_weekly_number." }] }, { "kind": "class", "name": "help.premiumPromo", "type": "help.PremiumPromo", "id": 1395946908, "comment": "Telegram Premium promotion information\n\nNote that the video_sections+videos fields are a list of videos, and the corresponding premium feature identifiers.
\nThey're equivalent to a section => video dictionary, with keys from video_section and values from videos.
\nThe keys in video_sections correspond to a specific feature identifier, and the associated promotional video should be shown when the associated feature row is clicked.", "arguments": [{ "name": "status_text", "type": "string", "comment": "Description of the current state of the user's Telegram Premium subscription" }, { "name": "status_entities", "type": "MessageEntity", "typeModifiers": { "isVector": true }, "comment": "Message entities for styled text" }, { "name": "video_sections", "type": "string", "typeModifiers": { "isVector": true }, "comment": "A list of premium feature identifiers », associated to each video" }, { "name": "videos", "type": "Document", "typeModifiers": { "isVector": true }, "comment": "A list of videos" }, { "name": "period_options", "type": "PremiumSubscriptionOption", "typeModifiers": { "isVector": true }, "comment": "Telegram Premium subscription options" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Related user information" }] }, { "kind": "class", "name": "inputStorePaymentPremiumSubscription", "type": "InputStorePaymentPurpose", "id": 2792693350, "comment": "Info about a Telegram Premium purchase", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "restore", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Pass true if this is a restore of a Telegram Premium purchase; only for the App Store" }, { "name": "upgrade", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Pass true if this is an upgrade from a monthly subscription to a yearly subscription; only for App Store" }] }, { "kind": "class", "name": "inputStorePaymentGiftPremium", "type": "InputStorePaymentPurpose", "id": 1634697192, "comment": "Info about a gifted Telegram Premium purchase", "arguments": [{ "name": "user_id", "type": "InputUser", "comment": "The user to which the Telegram Premium subscription was gifted" }, { "name": "currency", "type": "string", "comment": "Three-letter ISO 4217 currency code" }, { "name": "amount", "type": "long", "comment": "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." }] }, { "kind": "class", "name": "inputStorePaymentPremiumGiftCode", "type": "InputStorePaymentPurpose", "id": 2743099199, "comment": "Used to gift Telegram Premium subscriptions only to some specific subscribers of a channel/supergroup or to some of our contacts, see here » for more info on giveaways and gifts.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "users", "type": "InputUser", "typeModifiers": { "isVector": true }, "comment": "The users that will receive the Telegram Premium subscriptions." }, { "name": "boost_peer", "type": "InputPeer", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, the gifts will be sent on behalf of a channel/supergroup we are an admin of, which will also assign some boosts to it. Otherwise, the gift will be sent directly from the currently logged in user, and we will gain some extra boost slots. See here » for more info on giveaways and gifts." }, { "name": "currency", "type": "string", "comment": "Three-letter ISO 4217 currency code" }, { "name": "amount", "type": "long", "comment": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." }] }, { "kind": "class", "name": "inputStorePaymentPremiumGiveaway", "type": "InputStorePaymentPurpose", "id": 369444042, "comment": "Used to pay for a giveaway, see here » for more info.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "only_new_subscribers", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, only new subscribers starting from the giveaway creation date will be able to participate to the giveaway." }, { "name": "winners_are_visible", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "If set, giveaway winners are public and will be listed in a {@link RawMessageMediaGiveawayResults} message that will be automatically sent to the channel once the giveaway ends." }, { "name": "boost_peer", "type": "InputPeer", "comment": "The channel/supergroup starting the giveaway, that the user must join to participate, that will receive the giveaway boosts; see here » for more info on giveaways." }, { "name": "additional_peers", "type": "InputPeer", "typeModifiers": { "predicate": "flags.1", "isVector": true }, "comment": "Additional channels that the user must join to participate to the giveaway can be specified here." }, { "name": "countries_iso2", "type": "string", "typeModifiers": { "predicate": "flags.2", "isVector": true }, "comment": "The set of users that can participate to the giveaway can be restricted by passing here an explicit whitelist of up to giveaway_countries_max countries, specified as two-letter ISO 3166-1 alpha-2 country codes." }, { "name": "prize_description", "type": "string", "typeModifiers": { "predicate": "flags.4" }, "comment": "Can contain a textual description of additional giveaway prizes." }, { "name": "random_id", "type": "long", "comment": "Random ID to avoid resending the giveaway" }, { "name": "until_date", "type": "int", "comment": "The end date of the giveaway, must be at most giveaway_period_max seconds in the future; see here » for more info on giveaways." }, { "name": "currency", "type": "string", "comment": "Three-letter ISO 4217 currency code" }, { "name": "amount", "type": "long", "comment": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." }] }, { "kind": "class", "name": "inputStorePaymentStarsTopup", "type": "InputStorePaymentPurpose", "id": 3722252118, "comment": "Used to top up the Telegram Stars balance of the current account.", "arguments": [{ "name": "stars", "type": "long", "comment": "Amount of stars to topup" }, { "name": "currency", "type": "string", "comment": "Three-letter ISO 4217 currency code" }, { "name": "amount", "type": "long", "comment": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." }] }, { "kind": "class", "name": "inputStorePaymentStarsGift", "type": "InputStorePaymentPurpose", "id": 494149367, "comment": "Used to gift Telegram Stars to a friend.", "arguments": [{ "name": "user_id", "type": "InputUser", "comment": "The user to which the stars should be gifted." }, { "name": "stars", "type": "long", "comment": "Amount of stars to gift" }, { "name": "currency", "type": "string", "comment": "Three-letter ISO 4217 currency code" }, { "name": "amount", "type": "long", "comment": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." }] }, { "kind": "class", "name": "premiumGiftOption", "type": "PremiumGiftOption", "id": 1958953753, "comment": "Telegram Premium gift option", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "months", "type": "int", "comment": "Duration of gifted Telegram Premium subscription" }, { "name": "currency", "type": "string", "comment": "Three-letter ISO 4217 currency code" }, { "name": "amount", "type": "long", "comment": "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." }, { "name": "bot_url", "type": "string", "comment": "An invoice deep link » to an invoice for in-app payment, using the official Premium bot; may be empty if direct payment isn't available." }, { "name": "store_product", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "An identifier for the App Store/Play Store product associated with the Premium gift." }] }, { "kind": "class", "name": "paymentFormMethod", "type": "PaymentFormMethod", "id": 2298016283, "comment": "Represents an additional payment method", "arguments": [{ "name": "url", "type": "string", "comment": "URL to open in a webview to process the payment" }, { "name": "title", "type": "string", "comment": "Payment method description" }] }, { "kind": "class", "name": "emojiStatusEmpty", "type": "EmojiStatus", "id": 769727150, "comment": "No emoji status is set", "arguments": [] }, { "kind": "class", "name": "emojiStatus", "type": "EmojiStatus", "id": 2459656605, "comment": "An emoji status", "arguments": [{ "name": "document_id", "type": "long", "comment": "Custom emoji document ID" }] }, { "kind": "class", "name": "emojiStatusUntil", "type": "EmojiStatus", "id": 4197492935, "comment": "An emoji status valid until the specified date", "arguments": [{ "name": "document_id", "type": "long", "comment": "Custom emoji document ID" }, { "name": "until", "type": "int", "comment": "This status is valid until this date" }] }, { "kind": "class", "name": "account.emojiStatusesNotModified", "type": "account.EmojiStatuses", "id": 3498894917, "comment": "The server-side list of emoji statuses hasn't changed", "arguments": [] }, { "kind": "class", "name": "account.emojiStatuses", "type": "account.EmojiStatuses", "id": 2428790737, "comment": "A list of emoji statuses", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here" }, { "name": "statuses", "type": "EmojiStatus", "typeModifiers": { "isVector": true }, "comment": "Emoji statuses" }] }, { "kind": "class", "name": "reactionEmpty", "type": "Reaction", "id": 2046153753, "comment": "No reaction", "arguments": [] }, { "kind": "class", "name": "reactionEmoji", "type": "Reaction", "id": 455247544, "comment": "Normal emoji message reaction", "arguments": [{ "name": "emoticon", "type": "string", "comment": "Emoji" }] }, { "kind": "class", "name": "reactionCustomEmoji", "type": "Reaction", "id": 2302016627, "comment": "Custom emoji message reaction", "arguments": [{ "name": "document_id", "type": "long", "comment": "Custom emoji document ID" }] }, { "kind": "class", "name": "chatReactionsNone", "type": "ChatReactions", "id": 3942396604, "comment": "No reactions are allowed", "arguments": [] }, { "kind": "class", "name": "chatReactionsAll", "type": "ChatReactions", "id": 1385335754, "comment": "All reactions or all non-custom reactions are allowed", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "allow_custom", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to allow custom reactions" }] }, { "kind": "class", "name": "chatReactionsSome", "type": "ChatReactions", "id": 1713193015, "comment": "Some reactions are allowed", "arguments": [{ "name": "reactions", "type": "Reaction", "typeModifiers": { "isVector": true }, "comment": "Allowed set of reactions: the reactions_in_chat_max configuration field indicates the maximum number of reactions that can be specified in this field." }] }, { "kind": "class", "name": "messages.reactionsNotModified", "type": "messages.Reactions", "id": 2960120799, "comment": "The server-side list of message reactions hasn't changed", "arguments": [] }, { "kind": "class", "name": "messages.reactions", "type": "messages.Reactions", "id": 3942512406, "comment": "List of message reactions", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here" }, { "name": "reactions", "type": "Reaction", "typeModifiers": { "isVector": true }, "comment": "Reactions" }] }, { "kind": "class", "name": "emailVerifyPurposeLoginSetup", "type": "EmailVerifyPurpose", "id": 1128644211, "comment": "Email verification purpose: setup login email", "arguments": [{ "name": "phone_number", "type": "string", "comment": "Phone number" }, { "name": "phone_code_hash", "type": "string", "comment": "Phone code hash as specified by the documentation" }] }, { "kind": "class", "name": "emailVerifyPurposeLoginChange", "type": "EmailVerifyPurpose", "id": 1383932651, "comment": "Email verification purpose: change login email", "arguments": [] }, { "kind": "class", "name": "emailVerifyPurposePassport", "type": "EmailVerifyPurpose", "id": 3153401477, "comment": "Verify an email for use in telegram passport", "arguments": [] }, { "kind": "class", "name": "emailVerificationCode", "type": "EmailVerification", "id": 2452510121, "comment": "Email verification code", "arguments": [{ "name": "code", "type": "string", "comment": "Received verification code" }] }, { "kind": "class", "name": "emailVerificationGoogle", "type": "EmailVerification", "id": 3683688130, "comment": "Google ID email verification token", "arguments": [{ "name": "token", "type": "string", "comment": "Token" }] }, { "kind": "class", "name": "emailVerificationApple", "type": "EmailVerification", "id": 2530243837, "comment": "Apple ID email verification token", "arguments": [{ "name": "token", "type": "string", "comment": "Token" }] }, { "kind": "class", "name": "account.emailVerified", "type": "account.EmailVerified", "id": 731303195, "comment": "The email was verified correctly.", "arguments": [{ "name": "email", "type": "string", "comment": "The verified email address." }] }, { "kind": "class", "name": "account.emailVerifiedLogin", "type": "account.EmailVerified", "id": 3787132257, "comment": "The email was verified correctly, and a login code was just sent to it.", "arguments": [{ "name": "email", "type": "string", "comment": "The verified email address." }, { "name": "sent_code", "type": "auth.SentCode", "comment": "Info about the sent login code" }] }, { "kind": "class", "name": "premiumSubscriptionOption", "type": "PremiumSubscriptionOption", "id": 1596792306, "comment": "Describes a Telegram Premium subscription option", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "current", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether this subscription option is currently in use." }, { "name": "can_purchase_upgrade", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether this subscription option can be used to upgrade the existing Telegram Premium subscription. When upgrading Telegram Premium subscriptions bought through stores, make sure that the store transaction ID is equal to transaction, to avoid upgrading someone else's account, if the client is currently logged into multiple accounts." }, { "name": "transaction", "type": "string", "typeModifiers": { "predicate": "flags.3" }, "comment": "Identifier of the last in-store transaction for the currently used subscription on the current account." }, { "name": "months", "type": "int", "comment": "Duration of subscription in months" }, { "name": "currency", "type": "string", "comment": "Three-letter ISO 4217 currency code" }, { "name": "amount", "type": "long", "comment": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." }, { "name": "bot_url", "type": "string", "comment": "Deep link used to initiate payment" }, { "name": "store_product", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Store product ID, only for official apps" }] }, { "kind": "class", "name": "sendAsPeer", "type": "SendAsPeer", "id": 3088871476, "comment": "Indicates a peer that can be used to send messages", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "premium_required", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether a Telegram Premium account is required to send messages as this peer" }, { "name": "peer", "type": "Peer", "comment": "Peer" }] }, { "kind": "class", "name": "messageExtendedMediaPreview", "type": "MessageExtendedMedia", "id": 2908916936, "comment": "Paid media preview for not yet purchased paid media, see here » for more info.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "w", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Width" }, { "name": "h", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Height" }, { "name": "thumb", "type": "PhotoSize", "typeModifiers": { "predicate": "flags.1" }, "comment": "Extremely low resolution thumbnail." }, { "name": "video_duration", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "Video duration for videos." }] }, { "kind": "class", "name": "messageExtendedMedia", "type": "MessageExtendedMedia", "id": 3997670500, "comment": "Already purchased paid media, see here » for more info.", "arguments": [{ "name": "media", "type": "MessageMedia", "comment": "The media we purchased." }] }, { "kind": "class", "name": "stickerKeyword", "type": "StickerKeyword", "id": 4244550300, "comment": "Keywords for a certain sticker", "arguments": [{ "name": "document_id", "type": "long", "comment": "Sticker ID" }, { "name": "keyword", "type": "string", "typeModifiers": { "isVector": true }, "comment": "Keywords" }] }, { "kind": "class", "name": "username", "type": "Username", "id": 3020371527, "comment": "Contains information about a username.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "editable", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the username is editable, meaning it wasn't bought on fragment." }, { "name": "active", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the username is active." }, { "name": "username", "type": "string", "comment": "The username." }] }, { "kind": "class", "name": "forumTopicDeleted", "type": "ForumTopic", "id": 37687451, "comment": "Represents a deleted forum topic.", "arguments": [{ "name": "id", "type": "int", "comment": "The ID of the deleted forum topic." }] }, { "kind": "class", "name": "forumTopic", "type": "ForumTopic", "id": 1903173033, "comment": "Represents a forum topic.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "my", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the topic was created by the current user" }, { "name": "closed", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether the topic is closed (no messages can be sent to it)" }, { "name": "pinned", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether the topic is pinned" }, { "name": "short", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Whether this constructor is a reduced version of the full topic information.
If set, only the my, closed, id, date, title, icon_color, icon_emoji_id and from_id parameters will contain valid information.
Reduced info is usually only returned in topic-related admin log events » and in the {@link messages.RawChannelMessages} constructor: if needed, full information can be fetched using {@link channels.RawGetForumTopicsByIDRequest}." }, { "name": "hidden", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "Whether the topic is hidden (only valid for the \"General\" topic, id=1)" }, { "name": "id", "type": "int", "comment": "Topic ID" }, { "name": "date", "type": "int", "comment": "Topic creation date" }, { "name": "title", "type": "string", "comment": "Topic title" }, { "name": "icon_color", "type": "int", "comment": "If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F." }, { "name": "icon_emoji_id", "type": "long", "typeModifiers": { "predicate": "flags.0" }, "comment": "ID of the custom emoji used as topic icon." }, { "name": "top_message", "type": "int", "comment": "ID of the last message that was sent to this topic" }, { "name": "read_inbox_max_id", "type": "int", "comment": "Position up to which all incoming messages are read." }, { "name": "read_outbox_max_id", "type": "int", "comment": "Position up to which all outgoing messages are read." }, { "name": "unread_count", "type": "int", "comment": "Number of unread messages" }, { "name": "unread_mentions_count", "type": "int", "comment": "Number of unread mentions" }, { "name": "unread_reactions_count", "type": "int", "comment": "Number of unread reactions to messages you sent" }, { "name": "from_id", "type": "Peer", "comment": "ID of the peer that created the topic" }, { "name": "notify_settings", "type": "PeerNotifySettings", "comment": "Notification settings" }, { "name": "draft", "type": "DraftMessage", "typeModifiers": { "predicate": "flags.4" }, "comment": "Message draft" }] }, { "kind": "class", "name": "messages.forumTopics", "type": "messages.ForumTopics", "id": 913709011, "comment": "Contains information about multiple forum topics", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "order_by_create_date", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the returned topics are ordered by creation date; if set, pagination by offset_date should use {@link RawForumTopic}.date; otherwise topics are ordered by the last message date, so paginate by the date of the message referenced by {@link RawForumTopic}.top_message." }, { "name": "count", "type": "int", "comment": "Total number of topics matching query; may be more than the topics contained in topics, in which case pagination is required." }, { "name": "topics", "type": "ForumTopic", "typeModifiers": { "isVector": true }, "comment": "Forum topics" }, { "name": "messages", "type": "Message", "typeModifiers": { "isVector": true }, "comment": "Related messages (contains the messages mentioned by {@link RawForumTopic}.top_message)." }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Related chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Related users" }, { "name": "pts", "type": "int", "comment": "Event count after generation" }] }, { "kind": "class", "name": "defaultHistoryTTL", "type": "DefaultHistoryTTL", "id": 1135897376, "comment": "Contains info about the default value of the Time-To-Live setting, applied to all new chats.", "arguments": [{ "name": "period", "type": "int", "comment": "Time-To-Live setting applied to all new chats." }] }, { "kind": "class", "name": "exportedContactToken", "type": "ExportedContactToken", "id": 1103040667, "comment": "Describes a temporary profile link.", "arguments": [{ "name": "url", "type": "string", "comment": "The temporary profile link." }, { "name": "expires", "type": "int", "comment": "Its expiration date" }] }, { "kind": "class", "name": "requestPeerTypeUser", "type": "RequestPeerType", "id": 1597737472, "comment": "Choose a user.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "bot", "type": "Bool", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to allow choosing only bots." }, { "name": "premium", "type": "Bool", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether to allow choosing only Premium users." }] }, { "kind": "class", "name": "requestPeerTypeChat", "type": "RequestPeerType", "id": 3387977243, "comment": "Choose a chat or supergroup", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "creator", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to allow only choosing chats or supergroups that were created by the current user." }, { "name": "bot_participant", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Whether to allow only choosing chats or supergroups where the bot is a participant." }, { "name": "has_username", "type": "Bool", "typeModifiers": { "predicate": "flags.3" }, "comment": "If specified, allows only choosing channels with or without a username, according to the value of Bool." }, { "name": "forum", "type": "Bool", "typeModifiers": { "predicate": "flags.4" }, "comment": "If specified, allows only choosing chats or supergroups that are or aren't forums, according to the value of Bool." }, { "name": "user_admin_rights", "type": "ChatAdminRights", "typeModifiers": { "predicate": "flags.1" }, "comment": "If specified, allows only choosing chats or supergroups where the current user is an admin with at least the specified admin rights." }, { "name": "bot_admin_rights", "type": "ChatAdminRights", "typeModifiers": { "predicate": "flags.2" }, "comment": "If specified, allows only choosing chats or supergroups where the bot is an admin with at least the specified admin rights." }] }, { "kind": "class", "name": "requestPeerTypeBroadcast", "type": "RequestPeerType", "id": 865857388, "comment": "Choose a channel", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "creator", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to allow only choosing channels that were created by the current user." }, { "name": "has_username", "type": "Bool", "typeModifiers": { "predicate": "flags.3" }, "comment": "If specified, allows only choosing channels with or without a username, according to the value of Bool." }, { "name": "user_admin_rights", "type": "ChatAdminRights", "typeModifiers": { "predicate": "flags.1" }, "comment": "If specified, allows only choosing channels where the current user is an admin with at least the specified admin rights." }, { "name": "bot_admin_rights", "type": "ChatAdminRights", "typeModifiers": { "predicate": "flags.2" }, "comment": "If specified, allows only choosing channels where the bot is an admin with at least the specified admin rights." }] }, { "kind": "class", "name": "emojiListNotModified", "type": "EmojiList", "id": 1209970170, "comment": "The list of custom emojis hasn't changed.", "arguments": [] }, { "kind": "class", "name": "emojiList", "type": "EmojiList", "id": 2048790993, "comment": "Represents a list of custom emojis.", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here" }, { "name": "document_id", "type": "long", "typeModifiers": { "isVector": true }, "comment": "Custom emoji IDs" }] }, { "kind": "class", "name": "emojiGroup", "type": "EmojiGroup", "id": 2056961449, "comment": "Represents an emoji category.", "arguments": [{ "name": "title", "type": "string", "comment": "Category name, i.e. \"Animals\", \"Flags\", \"Faces\" and so on..." }, { "name": "icon_emoji_id", "type": "long", "comment": "A single custom emoji used as preview for the category." }, { "name": "emoticons", "type": "string", "typeModifiers": { "isVector": true }, "comment": "A list of UTF-8 emojis, matching the category." }] }, { "kind": "class", "name": "emojiGroupGreeting", "type": "EmojiGroup", "id": 2161274055, "comment": "Represents an emoji category, that should be moved to the top of the list when choosing a sticker for a business introduction", "arguments": [{ "name": "title", "type": "string", "comment": "Category name, i.e. \"Animals\", \"Flags\", \"Faces\" and so on..." }, { "name": "icon_emoji_id", "type": "long", "comment": "A single custom emoji used as preview for the category." }, { "name": "emoticons", "type": "string", "typeModifiers": { "isVector": true }, "comment": "A list of UTF-8 emojis, matching the category." }] }, { "kind": "class", "name": "emojiGroupPremium", "type": "EmojiGroup", "id": 154914612, "comment": "An emoji category, used to select all Premium-only stickers (i.e. those with a Premium effect »)/Premium-only custom emojis (i.e. those where the {@link RawDocumentAttributeCustomEmoji}.free flag is not set)", "arguments": [{ "name": "title", "type": "string", "comment": "Category name, i.e. \"Animals\", \"Flags\", \"Faces\" and so on..." }, { "name": "icon_emoji_id", "type": "long", "comment": "A single custom emoji used as preview for the category." }] }, { "kind": "class", "name": "messages.emojiGroupsNotModified", "type": "messages.EmojiGroups", "id": 1874111879, "comment": "The list of emoji categories hasn't changed.", "arguments": [] }, { "kind": "class", "name": "messages.emojiGroups", "type": "messages.EmojiGroups", "id": 2283780427, "comment": "Represents a list of emoji categories.", "arguments": [{ "name": "hash", "type": "int", "comment": "Hash used for caching, for more info click here" }, { "name": "groups", "type": "EmojiGroup", "typeModifiers": { "isVector": true }, "comment": "A list of emoji categories." }] }, { "kind": "class", "name": "textWithEntities", "type": "TextWithEntities", "id": 1964978502, "comment": "Styled text with message entities", "arguments": [{ "name": "text", "type": "string", "comment": "Text" }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "isVector": true }, "comment": "Message entities for styled text" }] }, { "kind": "class", "name": "messages.translateResult", "type": "messages.TranslatedText", "id": 870003448, "comment": "Translated text with entities", "arguments": [{ "name": "result", "type": "TextWithEntities", "typeModifiers": { "isVector": true }, "comment": "Text+entities, for each input message." }] }, { "kind": "class", "name": "autoSaveSettings", "type": "AutoSaveSettings", "id": 3360175310, "comment": "Media autosave settings", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "photos", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether photos should be autosaved to the gallery." }, { "name": "videos", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether videos should be autosaved to the gallery." }, { "name": "video_max_size", "type": "long", "typeModifiers": { "predicate": "flags.2" }, "comment": "If set, specifies a size limit for autosavable videos" }] }, { "kind": "class", "name": "autoSaveException", "type": "AutoSaveException", "id": 2170563911, "comment": "Peer-specific media autosave settings", "arguments": [{ "name": "peer", "type": "Peer", "comment": "The peer" }, { "name": "settings", "type": "AutoSaveSettings", "comment": "Media autosave settings" }] }, { "kind": "class", "name": "account.autoSaveSettings", "type": "account.AutoSaveSettings", "id": 1279133341, "comment": "Contains media autosave settings", "arguments": [{ "name": "users_settings", "type": "AutoSaveSettings", "comment": "Default media autosave settings for private chats" }, { "name": "chats_settings", "type": "AutoSaveSettings", "comment": "Default media autosave settings for groups and supergroups" }, { "name": "broadcasts_settings", "type": "AutoSaveSettings", "comment": "Default media autosave settings for channels" }, { "name": "exceptions", "type": "AutoSaveException", "typeModifiers": { "isVector": true }, "comment": "Peer-specific granular autosave settings" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Chats mentioned in the peer-specific granular autosave settings" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Users mentioned in the peer-specific granular autosave settings" }] }, { "kind": "class", "name": "help.appConfigNotModified", "type": "help.AppConfig", "id": 2094949405, "comment": "The client configuration parameters haven't changed", "arguments": [] }, { "kind": "class", "name": "help.appConfig", "type": "help.AppConfig", "id": 3709368366, "comment": "Contains various client configuration parameters", "arguments": [{ "name": "hash", "type": "int", "comment": "Hash used for caching, for more info click here" }, { "name": "config", "type": "JSONValue", "comment": "Client configuration parameters" }] }, { "kind": "class", "name": "inputBotAppID", "type": "InputBotApp", "id": 2837495162, "comment": "Used to fetch information about a direct link Mini App by its ID", "arguments": [{ "name": "id", "type": "long", "comment": "direct link Mini App ID." }, { "name": "access_hash", "type": "long", "comment": "Access hash, obtained from the {@link RawBotApp} constructor." }] }, { "kind": "class", "name": "inputBotAppShortName", "type": "InputBotApp", "id": 2425095175, "comment": "Used to fetch information about a direct link Mini App by its short name", "arguments": [{ "name": "bot_id", "type": "InputUser", "comment": "ID of the bot that owns the bot mini app" }, { "name": "short_name", "type": "string", "comment": "Short name, obtained from a Direct Mini App deep link" }] }, { "kind": "class", "name": "botAppNotModified", "type": "BotApp", "id": 1571189943, "comment": "Bot app info hasn't changed.", "arguments": [] }, { "kind": "class", "name": "botApp", "type": "BotApp", "id": 2516373974, "comment": "Contains information about a direct link Mini App.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "id", "type": "long", "comment": "bot mini app ID" }, { "name": "access_hash", "type": "long", "comment": "bot mini app access hash" }, { "name": "short_name", "type": "string", "comment": "bot mini app short name, used to generate Direct Mini App deep links." }, { "name": "title", "type": "string", "comment": "bot mini app title." }, { "name": "description", "type": "string", "comment": "bot mini app description." }, { "name": "photo", "type": "Photo", "comment": "bot mini app photo." }, { "name": "document", "type": "Document", "typeModifiers": { "predicate": "flags.0" }, "comment": "bot mini app animation." }, { "name": "hash", "type": "long", "comment": "Hash to pass to {@link messages.RawGetBotAppRequest}, to avoid refetching bot app info if it hasn't changed." }] }, { "kind": "class", "name": "messages.botApp", "type": "messages.BotApp", "id": 3947933173, "comment": "Contains information about a direct link Mini App", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "inactive", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the web app was never used by the user, and confirmation must be asked from the user before opening it." }, { "name": "request_write_access", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "The bot is asking permission to send messages to the user: if the user agrees, set the write_allowed flag when invoking {@link messages.RawRequestAppWebViewRequest}." }, { "name": "has_settings", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Deprecated flag, can be ignored." }, { "name": "app", "type": "BotApp", "comment": "Bot app information" }] }, { "kind": "class", "name": "inlineBotWebView", "type": "InlineBotWebView", "id": 3044185557, "comment": "Specifies an inline mode mini app button, shown on top of the inline query results list.", "arguments": [{ "name": "text", "type": "string", "comment": "Text of the button" }, { "name": "url", "type": "string", "comment": "Webapp URL" }] }, { "kind": "class", "name": "readParticipantDate", "type": "ReadParticipantDate", "id": 1246753138, "comment": "Contains info about when a certain participant has read a message", "arguments": [{ "name": "user_id", "type": "int53", "comment": "User ID" }, { "name": "date", "type": "int", "comment": "When the user read the message" }] }, { "kind": "class", "name": "inputChatlistDialogFilter", "type": "InputChatlist", "id": 4091599411, "comment": "Folder ID", "arguments": [{ "name": "filter_id", "type": "int", "comment": "Folder ID" }] }, { "kind": "class", "name": "exportedChatlistInvite", "type": "ExportedChatlistInvite", "id": 206668204, "comment": "Exported chat folder deep link ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "title", "type": "string", "comment": "Name of the link" }, { "name": "url", "type": "string", "comment": "The chat folder deep link »." }, { "name": "peers", "type": "Peer", "typeModifiers": { "isVector": true }, "comment": "Peers to import" }] }, { "kind": "class", "name": "chatlists.exportedChatlistInvite", "type": "chatlists.ExportedChatlistInvite", "id": 283567014, "comment": "Info about an exported chat folder deep link ».", "arguments": [{ "name": "filter", "type": "DialogFilter", "comment": "Folder ID" }, { "name": "invite", "type": "ExportedChatlistInvite", "comment": "The exported chat folder deep link »." }] }, { "kind": "class", "name": "chatlists.exportedInvites", "type": "chatlists.ExportedInvites", "id": 279670215, "comment": "Info about multiple chat folder deep links ».", "arguments": [{ "name": "invites", "type": "ExportedChatlistInvite", "typeModifiers": { "isVector": true }, "comment": "The chat folder deep links »." }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Related chat information" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Related user information" }] }, { "kind": "class", "name": "chatlists.chatlistInviteAlready", "type": "chatlists.ChatlistInvite", "id": 4203214425, "comment": "Updated info about a chat folder deep link » we already imported.", "arguments": [{ "name": "filter_id", "type": "int", "comment": "ID of the imported folder" }, { "name": "missing_peers", "type": "Peer", "typeModifiers": { "isVector": true }, "comment": "New peers to be imported" }, { "name": "already_peers", "type": "Peer", "typeModifiers": { "isVector": true }, "comment": "Peers that were already imported" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Related chat information" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Related user information" }] }, { "kind": "class", "name": "chatlists.chatlistInvite", "type": "chatlists.ChatlistInvite", "id": 500007837, "comment": "Info about a chat folder deep link ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "title", "type": "string", "comment": "Name of the link" }, { "name": "emoticon", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Emoji to use as icon for the folder." }, { "name": "peers", "type": "Peer", "typeModifiers": { "isVector": true }, "comment": "Supergroups and channels to join" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Related chat information" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Related user information" }] }, { "kind": "class", "name": "chatlists.chatlistUpdates", "type": "chatlists.ChatlistUpdates", "id": 2478671757, "comment": "Updated information about a chat folder deep link ».", "arguments": [{ "name": "missing_peers", "type": "Peer", "typeModifiers": { "isVector": true }, "comment": "New peers to join" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Related chat information" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Related user information" }] }, { "kind": "class", "name": "bots.botInfo", "type": "bots.BotInfo", "id": 3903288752, "comment": "Localized information about a bot.", "arguments": [{ "name": "name", "type": "string", "comment": "Bot name" }, { "name": "about", "type": "string", "comment": "Bot about text" }, { "name": "description", "type": "string", "comment": "Bot description" }] }, { "kind": "class", "name": "messagePeerVote", "type": "MessagePeerVote", "id": 3066834268, "comment": "How a peer voted in a poll", "arguments": [{ "name": "peer", "type": "Peer", "comment": "Peer ID" }, { "name": "option", "type": "bytes", "comment": "The option chosen by the peer" }, { "name": "date", "type": "int", "comment": "When did the peer cast the vote" }] }, { "kind": "class", "name": "messagePeerVoteInputOption", "type": "MessagePeerVote", "id": 1959634180, "comment": "How a peer voted in a poll (reduced constructor, returned if an option was provided to {@link messages.RawGetPollVotesRequest})", "arguments": [{ "name": "peer", "type": "Peer", "comment": "The peer that voted for the queried option" }, { "name": "date", "type": "int", "comment": "When did the peer cast the vote" }] }, { "kind": "class", "name": "messagePeerVoteMultiple", "type": "MessagePeerVote", "id": 1177089766, "comment": "How a peer voted in a multiple-choice poll", "arguments": [{ "name": "peer", "type": "Peer", "comment": "Peer ID" }, { "name": "options", "type": "bytes", "typeModifiers": { "isVector": true }, "comment": "Options chosen by the peer" }, { "name": "date", "type": "int", "comment": "When did the peer cast their votes" }] }, { "kind": "class", "name": "storyViews", "type": "StoryViews", "id": 2371443926, "comment": "Aggregated view and reaction information of a story.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "has_viewers", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "If set, indicates that the viewers list is currently viewable, and was not yet deleted because the story has expired while the user didn't have a Premium account." }, { "name": "views_count", "type": "int", "comment": "View counter of the story" }, { "name": "forwards_count", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "Forward counter of the story" }, { "name": "reactions", "type": "ReactionCount", "typeModifiers": { "predicate": "flags.3", "isVector": true }, "comment": "All reactions sent to this story" }, { "name": "reactions_count", "type": "int", "typeModifiers": { "predicate": "flags.4" }, "comment": "Number of reactions added to the story" }, { "name": "recent_viewers", "type": "int53", "typeModifiers": { "predicate": "flags.0", "isVector": true }, "comment": "User IDs of some recent viewers of the story" }] }, { "kind": "class", "name": "storyItemDeleted", "type": "StoryItem", "id": 1374088783, "comment": "Represents a previously active story, that was deleted", "arguments": [{ "name": "id", "type": "int", "comment": "Story ID" }] }, { "kind": "class", "name": "storyItemSkipped", "type": "StoryItem", "id": 4289579283, "comment": "Represents an active story, whose full information was omitted for space and performance reasons; use {@link stories.RawGetStoriesByIDRequest} to fetch full info about the skipped story when and if needed.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "close_friends", "type": "true", "typeModifiers": { "predicate": "flags.8" }, "comment": "Whether this story can only be viewed by our close friends, see here » for more info" }, { "name": "id", "type": "int", "comment": "Story ID" }, { "name": "date", "type": "int", "comment": "When was the story posted." }, { "name": "expire_date", "type": "int", "comment": "When does the story expire." }] }, { "kind": "class", "name": "storyItem", "type": "StoryItem", "id": 2041735716, "comment": "Represents a story.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "pinned", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Whether this story is pinned on the user's profile" }, { "name": "public", "type": "true", "typeModifiers": { "predicate": "flags.7" }, "comment": "Whether this story is public and can be viewed by everyone" }, { "name": "close_friends", "type": "true", "typeModifiers": { "predicate": "flags.8" }, "comment": "Whether this story can only be viewed by our close friends, see here » for more info" }, { "name": "min", "type": "true", "typeModifiers": { "predicate": "flags.9" }, "comment": "Full information about this story was omitted for space and performance reasons; use {@link stories.RawGetStoriesByIDRequest} to fetch full info about this story when and if needed." }, { "name": "noforwards", "type": "true", "typeModifiers": { "predicate": "flags.10" }, "comment": "Whether this story is protected and thus cannot be forwarded; clients should also prevent users from saving attached media (i.e. videos should only be streamed, photos should be kept in RAM, et cetera)." }, { "name": "edited", "type": "true", "typeModifiers": { "predicate": "flags.11" }, "comment": "Indicates whether the story was edited." }, { "name": "contacts", "type": "true", "typeModifiers": { "predicate": "flags.12" }, "comment": "Whether this story can only be viewed by our contacts" }, { "name": "selected_contacts", "type": "true", "typeModifiers": { "predicate": "flags.13" }, "comment": "Whether this story can only be viewed by a select list of our contacts" }, { "name": "out", "type": "true", "typeModifiers": { "predicate": "flags.16" }, "comment": "indicates whether we sent this story." }, { "name": "id", "type": "int", "comment": "ID of the story." }, { "name": "date", "type": "int", "comment": "When was the story posted." }, { "name": "from_id", "type": "Peer", "typeModifiers": { "predicate": "flags.18" }, "comment": "Sender of the story." }, { "name": "fwd_from", "type": "StoryFwdHeader", "typeModifiers": { "predicate": "flags.17" }, "comment": "For reposted stories », contains info about the original story." }, { "name": "expire_date", "type": "int", "comment": "When does the story expire." }, { "name": "caption", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Story caption." }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.1", "isVector": true }, "comment": "Message entities for styled text" }, { "name": "media", "type": "MessageMedia", "comment": "Story media." }, { "name": "media_areas", "type": "MediaArea", "typeModifiers": { "predicate": "flags.14", "isVector": true }, "comment": "List of media areas, see here » for more info on media areas." }, { "name": "privacy", "type": "PrivacyRule", "typeModifiers": { "predicate": "flags.2", "isVector": true }, "comment": "Privacy rules indicating who can and can't view this story" }, { "name": "views", "type": "StoryViews", "typeModifiers": { "predicate": "flags.3" }, "comment": "View date and reaction information" }, { "name": "sent_reaction", "type": "Reaction", "typeModifiers": { "predicate": "flags.15" }, "comment": "The reaction we sent." }] }, { "kind": "class", "name": "stories.allStoriesNotModified", "type": "stories.AllStories", "id": 291044926, "comment": "The list of active (or active and hidden) stories has not changed.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "state", "type": "string", "comment": "State to use to ask for updates" }, { "name": "stealth_mode", "type": "StoriesStealthMode", "comment": "Current stealth mode information" }] }, { "kind": "class", "name": "stories.allStories", "type": "stories.AllStories", "id": 1862033025, "comment": "Full list of active (or active and hidden) stories.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "has_more", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether more results can be fetched as described here »." }, { "name": "count", "type": "int", "comment": "Total number of active (or active and hidden) stories" }, { "name": "state", "type": "string", "comment": "State to use for pagination" }, { "name": "peer_stories", "type": "PeerStories", "typeModifiers": { "isVector": true }, "comment": "Stories" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Mentioned chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Mentioned users" }, { "name": "stealth_mode", "type": "StoriesStealthMode", "comment": "Current stealth mode information" }] }, { "kind": "class", "name": "stories.stories", "type": "stories.Stories", "id": 1673780490, "comment": "List of stories", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "count", "type": "int", "comment": "Total number of stories that can be fetched" }, { "name": "stories", "type": "StoryItem", "typeModifiers": { "isVector": true }, "comment": "Stories" }, { "name": "pinned_to_top", "type": "int", "typeModifiers": { "predicate": "flags.0", "isVector": true }, "comment": "IDs of pinned stories." }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Mentioned chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Mentioned users" }] }, { "kind": "class", "name": "storyView", "type": "StoryView", "id": 2965236421, "comment": "Story view date and reaction information", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "blocked", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether we have completely blocked this user, including from viewing more of our stories." }, { "name": "blocked_my_stories_from", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether we have blocked this user from viewing more of our stories." }, { "name": "user_id", "type": "int53", "comment": "The user that viewed the story" }, { "name": "date", "type": "int", "comment": "When did the user view the story" }, { "name": "reaction", "type": "Reaction", "typeModifiers": { "predicate": "flags.2" }, "comment": "If present, contains the reaction that the user left on the story" }] }, { "kind": "class", "name": "storyViewPublicForward", "type": "StoryView", "id": 2424530699, "comment": "A certain peer has forwarded the story as a message to a public chat or channel.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "blocked", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether we have completely blocked this user, including from viewing more of our stories." }, { "name": "blocked_my_stories_from", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether we have blocked this user from viewing more of our stories." }, { "name": "message", "type": "Message", "comment": "The message with the forwarded story." }] }, { "kind": "class", "name": "storyViewPublicRepost", "type": "StoryView", "id": 3178549065, "comment": "A certain peer has reposted the story.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "blocked", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether we have completely blocked this user, including from viewing more of our stories." }, { "name": "blocked_my_stories_from", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether we have blocked this user from viewing more of our stories." }, { "name": "peer_id", "type": "Peer", "comment": "The peer that reposted the story." }, { "name": "story", "type": "StoryItem", "comment": "The reposted story." }] }, { "kind": "class", "name": "stories.storyViewsList", "type": "stories.StoryViewsList", "id": 1507299269, "comment": "Reaction and view counters for a story", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "count", "type": "int", "comment": "Total number of results that can be fetched" }, { "name": "views_count", "type": "int", "comment": "Total number of story views" }, { "name": "forwards_count", "type": "int", "comment": "Total number of story forwards/reposts" }, { "name": "reactions_count", "type": "int", "comment": "Number of reactions that were added to the story" }, { "name": "views", "type": "StoryView", "typeModifiers": { "isVector": true }, "comment": "Story view date and reaction information" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Mentioned chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Mentioned users" }, { "name": "next_offset", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Offset for pagination" }] }, { "kind": "class", "name": "stories.storyViews", "type": "stories.StoryViews", "id": 3734957341, "comment": "Reaction and view counters for a list of stories", "arguments": [{ "name": "views", "type": "StoryViews", "typeModifiers": { "isVector": true }, "comment": "View date and reaction information of multiple stories" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Mentioned users" }] }, { "kind": "class", "name": "inputReplyToMessage", "type": "InputReplyTo", "id": 583071445, "comment": "Reply to a message.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "reply_to_msg_id", "type": "int", "comment": "The message ID to reply to." }, { "name": "top_msg_id", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "This field must contain the topic ID only when replying to messages in forum topics different from the \"General\" topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1).
If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the \"General\" topic." }, { "name": "reply_to_peer_id", "type": "InputPeer", "typeModifiers": { "predicate": "flags.1" }, "comment": "Used to reply to messages sent to another chat (specified here), can only be used for non-protected chats and messages." }, { "name": "quote_text", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "Used to quote-reply to only a certain section (specified here) of the original message. The maximum UTF-8 length for quotes is specified in the quote_length_max config key." }, { "name": "quote_entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.3", "isVector": true }, "comment": "Message entities for styled text from the quote_text field." }, { "name": "quote_offset", "type": "int", "typeModifiers": { "predicate": "flags.4" }, "comment": "Offset of the message quote_text within the original message (in UTF-16 code units)." }] }, { "kind": "class", "name": "inputReplyToStory", "type": "InputReplyTo", "id": 1484862010, "comment": "Reply to a story.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Sender of the story" }, { "name": "story_id", "type": "int", "comment": "ID of the story to reply to." }] }, { "kind": "class", "name": "exportedStoryLink", "type": "ExportedStoryLink", "id": 1070138683, "comment": "Represents a story deep link.", "arguments": [{ "name": "link", "type": "string", "comment": "The story deep link." }] }, { "kind": "class", "name": "storiesStealthMode", "type": "StoriesStealthMode", "id": 1898850301, "comment": "Information about the current stealth mode session.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "active_until_date", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "The date up to which stealth mode will be active." }, { "name": "cooldown_until_date", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "The date starting from which the user will be allowed to re-enable stealth mode again." }] }, { "kind": "class", "name": "mediaAreaCoordinates", "type": "MediaAreaCoordinates", "id": 3486113794, "comment": "Coordinates and size of a clicable rectangular area on top of a story.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "x", "type": "double", "comment": "The abscissa of the rectangle's center, as a percentage of the media width (0-100)." }, { "name": "y", "type": "double", "comment": "The ordinate of the rectangle's center, as a percentage of the media height (0-100)." }, { "name": "w", "type": "double", "comment": "The width of the rectangle, as a percentage of the media width (0-100)." }, { "name": "h", "type": "double", "comment": "The height of the rectangle, as a percentage of the media height (0-100)." }, { "name": "rotation", "type": "double", "comment": "Clockwise rotation angle of the rectangle, in degrees (0-360)." }, { "name": "radius", "type": "double", "typeModifiers": { "predicate": "flags.0" }, "comment": "The radius of the rectangle corner rounding, as a percentage of the media width." }] }, { "kind": "class", "name": "mediaAreaVenue", "type": "MediaArea", "id": 3196246940, "comment": "Represents a location tag attached to a story, with additional venue information.", "arguments": [{ "name": "coordinates", "type": "MediaAreaCoordinates", "comment": "The size and location of the media area corresponding to the location sticker on top of the story media." }, { "name": "geo", "type": "GeoPoint", "comment": "Coordinates of the venue" }, { "name": "title", "type": "string", "comment": "Venue name" }, { "name": "address", "type": "string", "comment": "Address" }, { "name": "provider", "type": "string", "comment": "Venue provider: currently only \"foursquare\" and \"gplaces\" need to be supported." }, { "name": "venue_id", "type": "string", "comment": "Venue ID in the provider's database" }, { "name": "venue_type", "type": "string", "comment": "Venue type in the provider's database" }] }, { "kind": "class", "name": "inputMediaAreaVenue", "type": "MediaArea", "id": 2994872703, "comment": "Represents a location tag attached to a story, with additional venue information.", "arguments": [{ "name": "coordinates", "type": "MediaAreaCoordinates", "comment": "The size and location of the media area corresponding to the location sticker on top of the story media." }, { "name": "query_id", "type": "long", "comment": "The query_id from {@link messages.RawBotResults}, see here » for more info." }, { "name": "result_id", "type": "string", "comment": "The id of the chosen result, see here » for more info." }] }, { "kind": "class", "name": "mediaAreaGeoPoint", "type": "MediaArea", "id": 3402974509, "comment": "Represents a geolocation tag attached to a story.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "coordinates", "type": "MediaAreaCoordinates", "comment": "The size and position of the media area corresponding to the location sticker on top of the story media." }, { "name": "geo", "type": "GeoPoint", "comment": "Coordinates of the geolocation tag." }, { "name": "address", "type": "GeoPointAddress", "typeModifiers": { "predicate": "flags.0" }, "comment": "Optional textual representation of the address." }] }, { "kind": "class", "name": "mediaAreaSuggestedReaction", "type": "MediaArea", "id": 340088945, "comment": "Represents a reaction bubble.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "dark", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the reaction bubble has a dark background." }, { "name": "flipped", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the reaction bubble is mirrored (see here » for more info)." }, { "name": "coordinates", "type": "MediaAreaCoordinates", "comment": "The coordinates of the media area corresponding to the reaction button." }, { "name": "reaction", "type": "Reaction", "comment": "The reaction that should be sent when this area is clicked." }] }, { "kind": "class", "name": "mediaAreaChannelPost", "type": "MediaArea", "id": 1996756655, "comment": "Represents a channel post.", "arguments": [{ "name": "coordinates", "type": "MediaAreaCoordinates", "comment": "The size and location of the media area corresponding to the location sticker on top of the story media." }, { "name": "channel_id", "type": "int53", "comment": "The channel that posted the message" }, { "name": "msg_id", "type": "int", "comment": "ID of the channel message" }] }, { "kind": "class", "name": "inputMediaAreaChannelPost", "type": "MediaArea", "id": 577893055, "comment": "Represents a channel post", "arguments": [{ "name": "coordinates", "type": "MediaAreaCoordinates", "comment": "The size and location of the media area corresponding to the location sticker on top of the story media." }, { "name": "channel", "type": "InputChannel", "comment": "The channel that posted the message" }, { "name": "msg_id", "type": "int", "comment": "ID of the channel message" }] }, { "kind": "class", "name": "mediaAreaUrl", "type": "MediaArea", "id": 926421125, "comment": "Represents a URL media area.", "arguments": [{ "name": "coordinates", "type": "MediaAreaCoordinates", "comment": "The size and location of the media area corresponding to the URL button on top of the story media." }, { "name": "url", "type": "string", "comment": "URL to open when clicked." }] }, { "kind": "class", "name": "mediaAreaWeather", "type": "MediaArea", "id": 1235637404, "comment": "Represents a weather widget ».", "arguments": [{ "name": "coordinates", "type": "MediaAreaCoordinates", "comment": "The size and location of the media area corresponding to the widget on top of the story media." }, { "name": "emoji", "type": "string", "comment": "Weather emoji, should be rendered as an animated emoji." }, { "name": "temperature_c", "type": "double", "comment": "Temperature in degrees Celsius." }, { "name": "color", "type": "int", "comment": "ARGB background color." }] }, { "kind": "class", "name": "peerStories", "type": "PeerStories", "id": 2587224473, "comment": "Stories associated to a peer", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "peer", "type": "Peer", "comment": "The peer" }, { "name": "max_read_id", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, contains the ID of the maximum read story" }, { "name": "stories", "type": "StoryItem", "typeModifiers": { "isVector": true }, "comment": "Stories" }] }, { "kind": "class", "name": "stories.peerStories", "type": "stories.PeerStories", "id": 3404105576, "comment": "Active story list of a specific peer.", "arguments": [{ "name": "stories", "type": "PeerStories", "comment": "Stories" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Mentioned chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Mentioned users" }] }, { "kind": "class", "name": "messages.webPage", "type": "messages.WebPage", "id": 4250800829, "comment": "Represents an Instant View webpage.", "arguments": [{ "name": "webpage", "type": "WebPage", "comment": "The instant view webpage." }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Chats mentioned in the webpage." }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Users mentioned in the webpage." }] }, { "kind": "class", "name": "premiumGiftCodeOption", "type": "PremiumGiftCodeOption", "id": 629052971, "comment": "Contains info about a giveaway/gift option.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "users", "type": "int", "comment": "Number of users which will be able to activate the gift codes." }, { "name": "months", "type": "int", "comment": "Duration in months of each gifted Telegram Premium subscription." }, { "name": "store_product", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Identifier of the store product associated with the option, official apps only." }, { "name": "store_quantity", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Number of times the store product must be paid" }, { "name": "currency", "type": "string", "comment": "Three-letter ISO 4217 currency code" }, { "name": "amount", "type": "long", "comment": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." }] }, { "kind": "class", "name": "payments.checkedGiftCode", "type": "payments.CheckedGiftCode", "id": 675942550, "comment": "Contains info about a Telegram Premium giftcode link.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "via_giveaway", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether this giftcode was created by a giveaway." }, { "name": "from_id", "type": "Peer", "typeModifiers": { "predicate": "flags.4" }, "comment": "The peer that created the gift code." }, { "name": "giveaway_msg_id", "type": "int", "typeModifiers": { "predicate": "flags.3" }, "comment": "Message ID of the giveaway in the channel specified in from_id." }, { "name": "to_id", "type": "long", "typeModifiers": { "predicate": "flags.0" }, "comment": "The destination user of the gift." }, { "name": "date", "type": "int", "comment": "Creation date of the gift code." }, { "name": "months", "type": "int", "comment": "Duration in months of the gifted Telegram Premium subscription." }, { "name": "used_date", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "When was the giftcode imported, if it was imported." }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Mentioned chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Mentioned users" }] }, { "kind": "class", "name": "payments.giveawayInfo", "type": "payments.GiveawayInfo", "id": 1130879648, "comment": "Contains info about an ongoing giveaway.\n\nIf neither the participating, joined_too_early_date, admin_disallowed_chat_id or disallowed_country flags are set, the user is not currently participating in the giveaway but could participate by joining all the channels specified in the {@link RawMessageMediaGiveaway}.channels field.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "participating", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "The current user is participating in the giveaway." }, { "name": "preparing_results", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "If set, the giveaway has ended and the results are being prepared." }, { "name": "start_date", "type": "int", "comment": "When was the giveaway started" }, { "name": "joined_too_early_date", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "The current user can't participate in the giveaway, because they were already a member of the channel when the giveaway started, and the only_new_subscribers was set when starting the giveaway." }, { "name": "admin_disallowed_chat_id", "type": "long", "typeModifiers": { "predicate": "flags.2" }, "comment": "If set, the current user can't participate in the giveaway, because they are an administrator in one of the channels (ID specified in this flag) that created the giveaway." }, { "name": "disallowed_country", "type": "string", "typeModifiers": { "predicate": "flags.4" }, "comment": "If set, the current user can't participate in this giveaway, because their phone number is from the specified disallowed country (specified as a two-letter ISO 3166-1 alpha-2 country code)." }] }, { "kind": "class", "name": "payments.giveawayInfoResults", "type": "payments.GiveawayInfo", "id": 13456752, "comment": "A giveaway has ended.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "winner", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether we're one of the winners of this giveaway." }, { "name": "refunded", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the giveaway was canceled and was fully refunded." }, { "name": "start_date", "type": "int", "comment": "Start date of the giveaway" }, { "name": "gift_code_slug", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "If we're one of the winners of this giveaway, contains the Premium gift code, see here » for more info on the full giveaway flow." }, { "name": "finish_date", "type": "int", "comment": "End date of the giveaway. May be bigger than the end date specified in parameters of the giveaway." }, { "name": "winners_count", "type": "int", "comment": "Number of winners in the giveaway" }, { "name": "activated_count", "type": "int", "comment": "Number of winners, which activated their gift codes." }] }, { "kind": "class", "name": "prepaidGiveaway", "type": "PrepaidGiveaway", "id": 2991824212, "comment": "Contains info about a prepaid giveaway ».", "arguments": [{ "name": "id", "type": "long", "comment": "Prepaid giveaway ID." }, { "name": "months", "type": "int", "comment": "Duration in months of each gifted Telegram Premium subscription." }, { "name": "quantity", "type": "int", "comment": "Number of given away Telegram Premium subscriptions." }, { "name": "date", "type": "int", "comment": "Payment date." }] }, { "kind": "class", "name": "boost", "type": "Boost", "id": 706514033, "comment": "Info about one or more boosts applied by a specific user.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "gift", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether this boost was applied because the channel/supergroup directly gifted a subscription to the user." }, { "name": "giveaway", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether this boost was applied because the user was chosen in a giveaway started by the channel/supergroup." }, { "name": "unclaimed", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "If set, the user hasn't yet invoked {@link payments.RawApplyGiftCodeRequest} to claim a subscription gifted directly or in a giveaway by the channel." }, { "name": "id", "type": "string", "comment": "Unique ID for this set of boosts." }, { "name": "user_id", "type": "int53", "typeModifiers": { "predicate": "flags.0" }, "comment": "ID of the user that applied the boost." }, { "name": "giveaway_msg_id", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "The message ID of the giveaway" }, { "name": "date", "type": "int", "comment": "When was the boost applied" }, { "name": "expires", "type": "int", "comment": "When does the boost expire" }, { "name": "used_gift_slug", "type": "string", "typeModifiers": { "predicate": "flags.4" }, "comment": "The created Telegram Premium gift code, only set if either gift or giveaway are set AND it is either a gift code for the currently logged in user or if it was already claimed." }, { "name": "multiplier", "type": "int", "typeModifiers": { "predicate": "flags.5" }, "comment": "If set, this boost counts as multiplier boosts, otherwise it counts as a single boost." }] }, { "kind": "class", "name": "premium.boostsList", "type": "premium.BoostsList", "id": 2264424764, "comment": "List of boosts that were applied to a peer by multiple users.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "count", "type": "int", "comment": "Total number of results" }, { "name": "boosts", "type": "Boost", "typeModifiers": { "isVector": true }, "comment": "Boosts" }, { "name": "next_offset", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Offset that can be used for pagination." }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Mentioned users" }] }, { "kind": "class", "name": "myBoost", "type": "MyBoost", "id": 3293069660, "comment": "Contains information about a single boost slot ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "slot", "type": "int", "comment": "Boost slot ID »" }, { "name": "peer", "type": "Peer", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, indicates this slot is currently occupied, i.e. we are boosting this peer.
Note that we can assign multiple boost slots to the same peer." }, { "name": "date", "type": "int", "comment": "When (unixtime) we started boosting the peer, 0 otherwise." }, { "name": "expires", "type": "int", "comment": "Indicates the (unixtime) expiration date of the boost in peer (0 if peer is not set)." }, { "name": "cooldown_until_date", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "If peer is set, indicates the (unixtime) date after which this boost can be reassigned to another channel." }] }, { "kind": "class", "name": "premium.myBoosts", "type": "premium.MyBoosts", "id": 2598512866, "comment": "A list of peers we are currently boosting, and how many boost slots we have left.", "arguments": [{ "name": "my_boosts", "type": "MyBoost", "typeModifiers": { "isVector": true }, "comment": "Info about boosted peers and remaining boost slots." }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Referenced chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Referenced users" }] }, { "kind": "class", "name": "premium.boostsStatus", "type": "premium.BoostsStatus", "id": 1230586490, "comment": "Contains info about the current boost status of a peer.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "my_boost", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether we're currently boosting this channel/supergroup, my_boost_slots will also be set." }, { "name": "level", "type": "int", "comment": "The current boost level of the channel/supergroup." }, { "name": "current_level_boosts", "type": "int", "comment": "The number of boosts acquired so far in the current level." }, { "name": "boosts", "type": "int", "comment": "Total number of boosts acquired so far." }, { "name": "gift_boosts", "type": "int", "typeModifiers": { "predicate": "flags.4" }, "comment": "The number of boosts acquired from created Telegram Premium gift codes and giveaways; only returned to channel/supergroup admins." }, { "name": "next_level_boosts", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Total number of boosts needed to reach the next level; if absent, the next level isn't available." }, { "name": "premium_audience", "type": "StatsPercentValue", "typeModifiers": { "predicate": "flags.1" }, "comment": "Only returned to channel/supergroup admins: contains the approximated number of Premium users subscribed to the channel/supergroup, related to the total number of subscribers." }, { "name": "boost_url", "type": "string", "comment": "Boost deep link » that can be used to boost the chat." }, { "name": "prepaid_giveaways", "type": "PrepaidGiveaway", "typeModifiers": { "predicate": "flags.3", "isVector": true }, "comment": "A list of prepaid giveaways available for the chat; only returned to channel/supergroup admins." }, { "name": "my_boost_slots", "type": "int", "typeModifiers": { "predicate": "flags.2", "isVector": true }, "comment": "Indicates which of our boost slots we've assigned to this peer (populated if my_boost is set)." }] }, { "kind": "class", "name": "storyFwdHeader", "type": "StoryFwdHeader", "id": 3089555792, "comment": "Contains info about the original poster of a reposted story.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "modified", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether the story media was modified before reposting it (for example by overlaying a round video with a reaction)." }, { "name": "from", "type": "Peer", "typeModifiers": { "predicate": "flags.0" }, "comment": "Peer that originally posted the story; will be empty for stories forwarded from a user with forwards privacy enabled, in which case from_name will be set, instead." }, { "name": "from_name", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Will be set for stories forwarded from a user with forwards privacy enabled, in which case from will also be empty." }, { "name": "story_id", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": ", contains the story ID" }] }, { "kind": "class", "name": "postInteractionCountersMessage", "type": "PostInteractionCounters", "id": 3875901055, "comment": "Interaction counters for a message.", "arguments": [{ "name": "msg_id", "type": "int", "comment": "Message ID" }, { "name": "views", "type": "int", "comment": "Number of views" }, { "name": "forwards", "type": "int", "comment": "Number of forwards to public channels" }, { "name": "reactions", "type": "int", "comment": "Number of reactions" }] }, { "kind": "class", "name": "postInteractionCountersStory", "type": "PostInteractionCounters", "id": 2319978023, "comment": "Interaction counters for a story.", "arguments": [{ "name": "story_id", "type": "int", "comment": "Story ID" }, { "name": "views", "type": "int", "comment": "Number of views" }, { "name": "forwards", "type": "int", "comment": "Number of forwards and reposts to public chats and channels" }, { "name": "reactions", "type": "int", "comment": "Number of reactions" }] }, { "kind": "class", "name": "stats.storyStats", "type": "stats.StoryStats", "id": 1355613820, "comment": "Contains statistics about a story.", "arguments": [{ "name": "views_graph", "type": "StatsGraph", "comment": "A graph containing the number of story views and shares" }, { "name": "reactions_by_emotion_graph", "type": "StatsGraph", "comment": "A bar graph containing the number of story reactions categorized by \"emotion\" (i.e. Positive, Negative, Other, etc...)" }] }, { "kind": "class", "name": "publicForwardMessage", "type": "PublicForward", "id": 32685898, "comment": "Contains info about a forward of a story as a message.", "arguments": [{ "name": "message", "type": "Message", "comment": "Info about the message with the reposted story." }] }, { "kind": "class", "name": "publicForwardStory", "type": "PublicForward", "id": 3992169936, "comment": "Contains info about a forward of a story as a repost by a public channel.", "arguments": [{ "name": "peer", "type": "Peer", "comment": "The channel that reposted the story." }, { "name": "story", "type": "StoryItem", "comment": "The reposted story (may be different from the original story)." }] }, { "kind": "class", "name": "stats.publicForwards", "type": "stats.PublicForwards", "id": 2466479648, "comment": "Contains info about the forwards of a story as a message to public chats and reposts by public channels.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "count", "type": "int", "comment": "Total number of results" }, { "name": "forwards", "type": "PublicForward", "typeModifiers": { "isVector": true }, "comment": "Info about the forwards of a story." }, { "name": "next_offset", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Offset used for pagination." }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Mentioned chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Mentioned users" }] }, { "kind": "class", "name": "peerColor", "type": "PeerColor", "id": 3041614543, "comment": "Represents a color palette ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "color", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Color palette ID, see here » for more info; if not set, the default palette should be used." }, { "name": "background_emoji_id", "type": "long", "typeModifiers": { "predicate": "flags.1" }, "comment": "Optional custom emoji ID used to generate the pattern." }] }, { "kind": "class", "name": "help.peerColorSet", "type": "help.PeerColorSet", "id": 639736408, "comment": "Represents a color palette that can be used in message accents ».", "arguments": [{ "name": "colors", "type": "int", "typeModifiers": { "isVector": true }, "comment": "A list of 1-3 colors in RGB format, describing the accent color." }] }, { "kind": "class", "name": "help.peerColorProfileSet", "type": "help.PeerColorSet", "id": 1987928555, "comment": "Represents a color palette that can be used in profile pages ».", "arguments": [{ "name": "palette_colors", "type": "int", "typeModifiers": { "isVector": true }, "comment": "A list of 1-2 colors in RGB format, shown in the color palette settings to describe the current palette." }, { "name": "bg_colors", "type": "int", "typeModifiers": { "isVector": true }, "comment": "A list of 1-2 colors in RGB format describing the colors used to generate the actual background used in the profile page." }, { "name": "story_colors", "type": "int", "typeModifiers": { "isVector": true }, "comment": "A list of 2 colors in RGB format describing the colors of the gradient used for the unread active story indicator around the profile photo." }] }, { "kind": "class", "name": "help.peerColorOption", "type": "help.PeerColorOption", "id": 2917953214, "comment": "Contains info about a color palette ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "hidden", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether this palette should not be displayed as an option to the user when choosing a palette to apply to profile pages or message accents." }, { "name": "color_id", "type": "int", "comment": "Palette ID." }, { "name": "colors", "type": "help.PeerColorSet", "typeModifiers": { "predicate": "flags.1" }, "comment": "Light mode palette.
Will be empty for IDs 0 to 6 inclusive, in which case a palette containing a single color from the following colors should be used: red, orange, violet, green, cyan, blue, pink for indexes 0 to 6 (i.e. the same colors used for randomized fallback message accent colors)." }, { "name": "dark_colors", "type": "help.PeerColorSet", "typeModifiers": { "predicate": "flags.2" }, "comment": "Dark mode palette. Optional, defaults to the palette in colors (or the autogenerated palette for IDs 0 to 6) if absent." }, { "name": "channel_min_level", "type": "int", "typeModifiers": { "predicate": "flags.3" }, "comment": "Channels can use this palette only after reaching at least the boost level specified in this field." }, { "name": "group_min_level", "type": "int", "typeModifiers": { "predicate": "flags.4" }, "comment": "Supergroups can use this palette only after reaching at least the boost level specified in this field." }] }, { "kind": "class", "name": "help.peerColorsNotModified", "type": "help.PeerColors", "id": 732034510, "comment": "The list of color palettes has not changed.", "arguments": [] }, { "kind": "class", "name": "help.peerColors", "type": "help.PeerColors", "id": 16313608, "comment": "Contains info about multiple color palettes ».", "arguments": [{ "name": "hash", "type": "int", "comment": "Hash used for caching, for more info click here" }, { "name": "colors", "type": "help.PeerColorOption", "typeModifiers": { "isVector": true }, "comment": "Usable color palettes." }] }, { "kind": "class", "name": "storyReaction", "type": "StoryReaction", "id": 1620104917, "comment": "How a certain peer reacted to a story", "arguments": [{ "name": "peer_id", "type": "Peer", "comment": "The peer" }, { "name": "date", "type": "int", "comment": "Reaction date" }, { "name": "reaction", "type": "Reaction", "comment": "The reaction" }] }, { "kind": "class", "name": "storyReactionPublicForward", "type": "StoryReaction", "id": 3148555843, "comment": "A certain peer has forwarded the story as a message to a public chat or channel.", "arguments": [{ "name": "message", "type": "Message", "comment": "The message with the forwarded story." }] }, { "kind": "class", "name": "storyReactionPublicRepost", "type": "StoryReaction", "id": 3486322451, "comment": "A certain peer has reposted the story.", "arguments": [{ "name": "peer_id", "type": "Peer", "comment": "The peer that reposted the story." }, { "name": "story", "type": "StoryItem", "comment": "The reposted story." }] }, { "kind": "class", "name": "stories.storyReactionsList", "type": "stories.StoryReactionsList", "id": 2858383516, "comment": "List of peers that reacted to or intercated with a specific story", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "count", "type": "int", "comment": "Total number of reactions matching query" }, { "name": "reactions", "type": "StoryReaction", "typeModifiers": { "isVector": true }, "comment": "List of peers that reacted to or interacted with a specific story" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Mentioned chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Mentioned users" }, { "name": "next_offset", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, indicates the next offset to use to load more results by invoking {@link stories.RawGetStoryReactionsListRequest}." }] }, { "kind": "class", "name": "savedDialog", "type": "SavedDialog", "id": 3179793260, "comment": "Represents a saved dialog ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "pinned", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Is the dialog pinned" }, { "name": "peer", "type": "Peer", "comment": "The dialog" }, { "name": "top_message", "type": "int", "comment": "The latest message ID" }] }, { "kind": "class", "name": "messages.savedDialogs", "type": "messages.SavedDialogs", "id": 4164608545, "comment": "Represents some saved message dialogs ».", "arguments": [{ "name": "dialogs", "type": "SavedDialog", "typeModifiers": { "isVector": true }, "comment": "Saved message dialogs »." }, { "name": "messages", "type": "Message", "typeModifiers": { "isVector": true }, "comment": "List of last messages from each saved dialog" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Mentioned chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Mentioned users" }] }, { "kind": "class", "name": "messages.savedDialogsSlice", "type": "messages.SavedDialogs", "id": 1153080793, "comment": "Incomplete list of saved message dialogs » with messages and auxiliary data.", "arguments": [{ "name": "count", "type": "int", "comment": "Total number of saved message dialogs" }, { "name": "dialogs", "type": "SavedDialog", "typeModifiers": { "isVector": true }, "comment": "List of saved message dialogs" }, { "name": "messages", "type": "Message", "typeModifiers": { "isVector": true }, "comment": "List of last messages from dialogs" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Mentioned chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Mentioned users" }] }, { "kind": "class", "name": "messages.savedDialogsNotModified", "type": "messages.SavedDialogs", "id": 3223285736, "comment": "The saved dialogs haven't changed", "arguments": [{ "name": "count", "type": "int", "comment": "Number of saved dialogs found server-side by the query" }] }, { "kind": "class", "name": "savedReactionTag", "type": "SavedReactionTag", "id": 3413112872, "comment": "Info about a saved message reaction tag ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "reaction", "type": "Reaction", "comment": "Reaction associated to the tag." }, { "name": "title", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Custom tag name assigned by the user (max 12 UTF-8 chars)." }, { "name": "count", "type": "int", "comment": "Number of messages tagged with this tag." }] }, { "kind": "class", "name": "messages.savedReactionTagsNotModified", "type": "messages.SavedReactionTags", "id": 2291882479, "comment": "The list of reaction tag » names assigned by the user hasn't changed.", "arguments": [] }, { "kind": "class", "name": "messages.savedReactionTags", "type": "messages.SavedReactionTags", "id": 844731658, "comment": "List of reaction tag » names assigned by the user.", "arguments": [{ "name": "tags", "type": "SavedReactionTag", "typeModifiers": { "isVector": true }, "comment": "Saved reaction tags." }, { "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here" }] }, { "kind": "class", "name": "outboxReadDate", "type": "OutboxReadDate", "id": 1001931436, "comment": "Exact read date of a private message we sent to another user.", "arguments": [{ "name": "date", "type": "int", "comment": "UNIX timestamp with the read date." }] }, { "kind": "class", "name": "smsjobs.eligibleToJoin", "type": "smsjobs.EligibilityToJoin", "id": 3700114639, "comment": "SMS jobs eligibility", "arguments": [{ "name": "terms_url", "type": "string", "comment": "Terms of service URL" }, { "name": "monthly_sent_sms", "type": "int", "comment": "Monthly sent SMSes" }] }, { "kind": "class", "name": "smsjobs.status", "type": "smsjobs.Status", "id": 720277905, "comment": "Status", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "allow_international", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Allow international numbers" }, { "name": "recent_sent", "type": "int", "comment": "Recently sent" }, { "name": "recent_since", "type": "int", "comment": "Since" }, { "name": "recent_remains", "type": "int", "comment": "Remaining" }, { "name": "total_sent", "type": "int", "comment": "Total sent" }, { "name": "total_since", "type": "int", "comment": "Total since" }, { "name": "last_gift_slug", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Last gift deep link" }, { "name": "terms_url", "type": "string", "comment": "Terms of service URL" }] }, { "kind": "class", "name": "smsJob", "type": "SmsJob", "id": 3869372088, "comment": "Info about an SMS job.", "arguments": [{ "name": "job_id", "type": "string", "comment": "Job ID" }, { "name": "phone_number", "type": "string", "comment": "Destination phone number" }, { "name": "text", "type": "string", "comment": "Text" }] }, { "kind": "class", "name": "businessWeeklyOpen", "type": "BusinessWeeklyOpen", "id": 302717625, "comment": "A time interval, indicating the opening hours of a business.\n\nNote that opening hours specified by the user must be appropriately validated and transformed before uploading them to the server, as specified here ».", "arguments": [{ "name": "start_minute", "type": "int", "comment": "Start minute in minutes of the week, 0 to 7*24*60 inclusively." }, { "name": "end_minute", "type": "int", "comment": "End minute in minutes of the week, 1 to 8*24*60 inclusively (8 and not 7 because this allows to specify intervals that, for example, start on Sunday 21:00 and end on Monday 04:00 (6*24*60+21*60 to 7*24*60+4*60) without passing an invalid end_minute < start_minute). See here » for more info." }] }, { "kind": "class", "name": "businessWorkHours", "type": "BusinessWorkHours", "id": 2358423704, "comment": "Specifies a set of Telegram Business opening hours.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "open_now", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Ignored if set while invoking {@link account.RawUpdateBusinessWorkHoursRequest}, only returned by the server in {@link RawUserFull}.business_work_hours, indicating whether the business is currently open according to the current time and the values in weekly_open and timezone." }, { "name": "timezone_id", "type": "string", "comment": "An ID of one of the timezones returned by {@link help.RawGetTimezonesListRequest}.
The timezone ID is contained {@link RawTimezone}.id, a human-readable, localized name of the timezone is available in {@link RawTimezone}.name and the {@link RawTimezone}.utc_offset field contains the UTC offset in seconds, which may be displayed in hh:mm format by the client together with the human-readable name (i.e. $name UTC -01:00)." }, { "name": "weekly_open", "type": "BusinessWeeklyOpen", "typeModifiers": { "isVector": true }, "comment": "A list of time intervals (max 28) represented by {@link RawBusinessWeeklyOpen}, indicating the opening hours of their business." }] }, { "kind": "class", "name": "businessLocation", "type": "BusinessLocation", "id": 2891717367, "comment": "Represents the location of a Telegram Business ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "geo_point", "type": "GeoPoint", "typeModifiers": { "predicate": "flags.0" }, "comment": "Geographical coordinates (optional)." }, { "name": "address", "type": "string", "comment": "Textual description of the address (mandatory)." }] }, { "kind": "class", "name": "inputBusinessRecipients", "type": "InputBusinessRecipients", "id": 1871393450, "comment": "Specifies the chats that can receive Telegram Business away » and greeting » messages.\n\nIf exclude_selected is set, specifies all chats that cannot receive Telegram Business away » and greeting » messages.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "existing_chats", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "All existing private chats." }, { "name": "new_chats", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "All new private chats." }, { "name": "contacts", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "All private chats with contacts." }, { "name": "non_contacts", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "All private chats with non-contacts." }, { "name": "exclude_selected", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "If set, inverts the selection." }, { "name": "users", "type": "InputUser", "typeModifiers": { "predicate": "flags.4", "isVector": true }, "comment": "Only private chats with the specified users." }] }, { "kind": "class", "name": "businessRecipients", "type": "BusinessRecipients", "id": 554733559, "comment": "Specifies the chats that can receive Telegram Business away » and greeting » messages.\n\nIf exclude_selected is set, specifies all chats that cannot receive Telegram Business away » and greeting » messages.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "existing_chats", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "All existing private chats." }, { "name": "new_chats", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "All new private chats." }, { "name": "contacts", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "All private chats with contacts." }, { "name": "non_contacts", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "All private chats with non-contacts." }, { "name": "exclude_selected", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "If set, inverts the selection." }, { "name": "users", "type": "int53", "typeModifiers": { "predicate": "flags.4", "isVector": true }, "comment": "Only private chats with the specified users." }] }, { "kind": "class", "name": "businessAwayMessageScheduleAlways", "type": "BusinessAwayMessageSchedule", "id": 3384402617, "comment": "Always send Telegram Business away messages to users writing to us in private.", "arguments": [] }, { "kind": "class", "name": "businessAwayMessageScheduleOutsideWorkHours", "type": "BusinessAwayMessageSchedule", "id": 3287479553, "comment": "Send Telegram Business away messages to users writing to us in private outside of the configured Telegram Business working hours.", "arguments": [] }, { "kind": "class", "name": "businessAwayMessageScheduleCustom", "type": "BusinessAwayMessageSchedule", "id": 3427638988, "comment": "Send Telegram Business away messages to users writing to us in private in the specified time span.", "arguments": [{ "name": "start_date", "type": "int", "comment": "Start date (UNIX timestamp)." }, { "name": "end_date", "type": "int", "comment": "End date (UNIX timestamp)." }] }, { "kind": "class", "name": "inputBusinessGreetingMessage", "type": "InputBusinessGreetingMessage", "id": 26528571, "comment": "Describes a Telegram Business greeting, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period.", "arguments": [{ "name": "shortcut_id", "type": "int", "comment": "ID of a quick reply shorcut, containing the greeting messages to send, see here » for more info." }, { "name": "recipients", "type": "InputBusinessRecipients", "comment": "Allowed recipients for the greeting messages." }, { "name": "no_activity_days", "type": "int", "comment": "The number of days after which a private chat will be considered as inactive; currently, must be one of 7, 14, 21, or 28." }] }, { "kind": "class", "name": "businessGreetingMessage", "type": "BusinessGreetingMessage", "id": 3843664811, "comment": "Describes a Telegram Business greeting, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period.", "arguments": [{ "name": "shortcut_id", "type": "int", "comment": "ID of a quick reply shorcut, containing the greeting messages to send, see here » for more info." }, { "name": "recipients", "type": "BusinessRecipients", "comment": "Allowed recipients for the greeting messages." }, { "name": "no_activity_days", "type": "int", "comment": "The number of days after which a private chat will be considered as inactive; currently, must be one of 7, 14, 21, or 28." }] }, { "kind": "class", "name": "inputBusinessAwayMessage", "type": "InputBusinessAwayMessage", "id": 2200008160, "comment": "Describes a Telegram Business away message, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "offline_only", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, the messages will not be sent if the account was online in the last 10 minutes." }, { "name": "shortcut_id", "type": "int", "comment": "ID of a quick reply shorcut, containing the away messages to send, see here » for more info." }, { "name": "schedule", "type": "BusinessAwayMessageSchedule", "comment": "Specifies when should the away messages be sent." }, { "name": "recipients", "type": "InputBusinessRecipients", "comment": "Allowed recipients for the away messages." }] }, { "kind": "class", "name": "businessAwayMessage", "type": "BusinessAwayMessage", "id": 4011158108, "comment": "Describes a Telegram Business away message, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "offline_only", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, the messages will not be sent if the account was online in the last 10 minutes." }, { "name": "shortcut_id", "type": "int", "comment": "ID of a quick reply shorcut, containing the away messages to send, see here » for more info." }, { "name": "schedule", "type": "BusinessAwayMessageSchedule", "comment": "Specifies when should the away messages be sent." }, { "name": "recipients", "type": "BusinessRecipients", "comment": "Allowed recipients for the away messages." }] }, { "kind": "class", "name": "timezone", "type": "Timezone", "id": 4287793653, "comment": "Timezone information.", "arguments": [{ "name": "id", "type": "string", "comment": "Unique timezone ID." }, { "name": "name", "type": "string", "comment": "Human-readable and localized timezone name." }, { "name": "utc_offset", "type": "int", "comment": "UTC offset in seconds, which may be displayed in hh:mm format by the client together with the human-readable name (i.e. $name UTC -01:00)." }] }, { "kind": "class", "name": "help.timezonesListNotModified", "type": "help.TimezonesList", "id": 2533820620, "comment": "The timezone list has not changed.", "arguments": [] }, { "kind": "class", "name": "help.timezonesList", "type": "help.TimezonesList", "id": 2071260529, "comment": "Timezone information that may be used elsewhere in the API, such as to set Telegram Business opening hours ».", "arguments": [{ "name": "timezones", "type": "Timezone", "typeModifiers": { "isVector": true }, "comment": "Timezones" }, { "name": "hash", "type": "int", "comment": "Hash used for caching, for more info click here" }] }, { "kind": "class", "name": "quickReply", "type": "QuickReply", "id": 110563371, "comment": "A quick reply shortcut.", "arguments": [{ "name": "shortcut_id", "type": "int", "comment": "Unique shortcut ID." }, { "name": "shortcut", "type": "string", "comment": "Shortcut name." }, { "name": "top_message", "type": "int", "comment": "ID of the last message in the shortcut." }, { "name": "count", "type": "int", "comment": "Total number of messages in the shortcut." }] }, { "kind": "class", "name": "inputQuickReplyShortcut", "type": "InputQuickReplyShortcut", "id": 609840449, "comment": "Selects a quick reply shortcut by name.", "arguments": [{ "name": "shortcut", "type": "string", "comment": "Shortcut name." }] }, { "kind": "class", "name": "inputQuickReplyShortcutId", "type": "InputQuickReplyShortcut", "id": 18418929, "comment": "Selects a quick reply shortcut by its numeric ID.", "arguments": [{ "name": "shortcut_id", "type": "int", "comment": "Shortcut ID." }] }, { "kind": "class", "name": "messages.quickReplies", "type": "messages.QuickReplies", "id": 3331155605, "comment": "Info about quick reply shortcuts ».", "arguments": [{ "name": "quick_replies", "type": "QuickReply", "typeModifiers": { "isVector": true }, "comment": "Quick reply shortcuts." }, { "name": "messages", "type": "Message", "typeModifiers": { "isVector": true }, "comment": "Messages mentioned in quick_replies." }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Mentioned chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Mentioned users" }] }, { "kind": "class", "name": "messages.quickRepliesNotModified", "type": "messages.QuickReplies", "id": 1603398491, "comment": "Info about quick reply shortcuts » hasn't changed.", "arguments": [] }, { "kind": "class", "name": "connectedBot", "type": "ConnectedBot", "id": 3171321345, "comment": "Contains info about a connected business bot ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "can_reply", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the the bot can reply to messages it receives through the connection" }, { "name": "bot_id", "type": "int53", "comment": "ID of the connected bot" }, { "name": "recipients", "type": "BusinessBotRecipients", "comment": "Specifies the private chats that a connected business bot » may receive messages and interact with.
" }] }, { "kind": "class", "name": "account.connectedBots", "type": "account.ConnectedBots", "id": 400029819, "comment": "Info about currently connected business bots.", "arguments": [{ "name": "connected_bots", "type": "ConnectedBot", "typeModifiers": { "isVector": true }, "comment": "Info about the connected bots" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Bot information" }] }, { "kind": "class", "name": "messages.dialogFilters", "type": "messages.DialogFilters", "id": 718878489, "comment": "Folder and folder tags information", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "tags_enabled", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether folder tags are enabled." }, { "name": "filters", "type": "DialogFilter", "typeModifiers": { "isVector": true }, "comment": "Folders." }] }, { "kind": "class", "name": "birthday", "type": "Birthday", "id": 1821253126, "comment": "Birthday information for a user.\n\nAlso used to invite users to gift Telegram Premium subscriptions » to other users with birthdays within a +1/-1 day time range, related to the current day.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "day", "type": "int", "comment": "Birth day" }, { "name": "month", "type": "int", "comment": "Birth month" }, { "name": "year", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "(Optional) birth year." }] }, { "kind": "class", "name": "botBusinessConnection", "type": "BotBusinessConnection", "id": 2305045428, "comment": "Contains info about a bot business connection.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "can_reply", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the bot can reply on behalf of the user to messages it receives through the business connection" }, { "name": "disabled", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether this business connection is currently disabled" }, { "name": "connection_id", "type": "string", "comment": "Business connection ID, used to identify messages coming from the connection and to reply to them as specified here »." }, { "name": "user_id", "type": "int53", "comment": "ID of the user that the bot is connected to via this connection." }, { "name": "dc_id", "type": "int", "comment": "ID of the datacenter where to send queries wrapped in a {@link RawInvokeWithBusinessConnectionRequest} as specified here »." }, { "name": "date", "type": "int", "comment": "When was the connection created." }] }, { "kind": "class", "name": "inputBusinessIntro", "type": "InputBusinessIntro", "id": 163867085, "comment": "Telegram Business introduction ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "title", "type": "string", "comment": "Title of the introduction message" }, { "name": "description", "type": "string", "comment": "Profile introduction" }, { "name": "sticker", "type": "InputDocument", "typeModifiers": { "predicate": "flags.0" }, "comment": "Optional introduction sticker." }] }, { "kind": "class", "name": "businessIntro", "type": "BusinessIntro", "id": 1510606445, "comment": "Telegram Business introduction ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "title", "type": "string", "comment": "Title of the introduction message (max intro_title_length_limit » UTF-8 characters)." }, { "name": "description", "type": "string", "comment": "Profile introduction (max intro_description_length_limit » UTF-8 characters)." }, { "name": "sticker", "type": "Document", "typeModifiers": { "predicate": "flags.0" }, "comment": "Optional introduction sticker." }] }, { "kind": "class", "name": "messages.myStickers", "type": "messages.MyStickers", "id": 4211040925, "comment": "The list of stickersets owned by the current account ».", "arguments": [{ "name": "count", "type": "int", "comment": "Total number of owned stickersets." }, { "name": "sets", "type": "StickerSetCovered", "typeModifiers": { "isVector": true }, "comment": "Stickersets" }] }, { "kind": "class", "name": "inputCollectibleUsername", "type": "InputCollectible", "id": 3818152105, "comment": "Represents a username fragment collectible", "arguments": [{ "name": "username", "type": "string", "comment": "Username" }] }, { "kind": "class", "name": "inputCollectiblePhone", "type": "InputCollectible", "id": 2732725412, "comment": "Represents a phone number fragment collectible", "arguments": [{ "name": "phone", "type": "string", "comment": "Phone number" }] }, { "kind": "class", "name": "fragment.collectibleInfo", "type": "fragment.CollectibleInfo", "id": 1857945489, "comment": "Info about a fragment collectible.", "arguments": [{ "name": "purchase_date", "type": "int", "comment": "Purchase date (unixtime)" }, { "name": "currency", "type": "string", "comment": "Three-letter ISO 4217 currency code for amount" }, { "name": "amount", "type": "long", "comment": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." }, { "name": "crypto_currency", "type": "string", "comment": "Cryptocurrency name." }, { "name": "crypto_amount", "type": "long", "comment": "Price, in the smallest units of the cryptocurrency." }, { "name": "url", "type": "string", "comment": "Fragment URL with more info about the collectible" }] }, { "kind": "class", "name": "inputBusinessBotRecipients", "type": "InputBusinessBotRecipients", "id": 3303379486, "comment": "Specifies the private chats that a connected business bot » may interact with.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "existing_chats", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Selects all existing private chats." }, { "name": "new_chats", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Selects all new private chats." }, { "name": "contacts", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Selects all private chats with contacts." }, { "name": "non_contacts", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Selects all private chats with non-contacts." }, { "name": "exclude_selected", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "If set, then all private chats except the ones selected by existing_chats, new_chats, contacts, non_contacts and users are chosen.
Note that if this flag is set, any values passed in exclude_users will be merged and moved into users by the server." }, { "name": "users", "type": "InputUser", "typeModifiers": { "predicate": "flags.4", "isVector": true }, "comment": "Explicitly selected private chats." }, { "name": "exclude_users", "type": "InputUser", "typeModifiers": { "predicate": "flags.6", "isVector": true }, "comment": "Identifiers of private chats that are always excluded." }] }, { "kind": "class", "name": "businessBotRecipients", "type": "BusinessBotRecipients", "id": 3096245107, "comment": "Specifies the private chats that a connected business bot » may receive messages and interact with.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "existing_chats", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Selects all existing private chats." }, { "name": "new_chats", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Selects all new private chats." }, { "name": "contacts", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Selects all private chats with contacts." }, { "name": "non_contacts", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Selects all private chats with non-contacts." }, { "name": "exclude_selected", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "If set, then all private chats except the ones selected by existing_chats, new_chats, contacts, non_contacts and users are chosen.
Note that if this flag is set, any values passed in exclude_users will be merged and moved into users by the server, thus exclude_users will always be empty." }, { "name": "users", "type": "int53", "typeModifiers": { "predicate": "flags.4", "isVector": true }, "comment": "Explicitly selected private chats." }, { "name": "exclude_users", "type": "int53", "typeModifiers": { "predicate": "flags.6", "isVector": true }, "comment": "Identifiers of private chats that are always excluded." }] }, { "kind": "class", "name": "contactBirthday", "type": "ContactBirthday", "id": 496600883, "comment": "Birthday information of a contact.", "arguments": [{ "name": "contact_id", "type": "int53", "comment": "User ID." }, { "name": "birthday", "type": "Birthday", "comment": "Birthday information." }] }, { "kind": "class", "name": "contacts.contactBirthdays", "type": "contacts.ContactBirthdays", "id": 290452237, "comment": "Birthday information of our contacts.", "arguments": [{ "name": "contacts", "type": "ContactBirthday", "typeModifiers": { "isVector": true }, "comment": "Birthday info" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "User information" }] }, { "kind": "class", "name": "missingInvitee", "type": "MissingInvitee", "id": 1653379620, "comment": "Info about why a specific user could not be invited ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "premium_would_allow_invite", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, we could not add the user only because the current account needs to purchase a Telegram Premium subscription to complete the operation." }, { "name": "premium_required_for_pm", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "If set, we could not add the user because of their privacy settings, and additionally, the current account needs to purchase a Telegram Premium subscription to directly share an invite link with the user via a private message." }, { "name": "user_id", "type": "int53", "comment": "ID of the user. If neither of the flags below are set, we could not add the user because of their privacy settings, and we can create and directly share an invite link with them using a normal message, instead." }] }, { "kind": "class", "name": "messages.invitedUsers", "type": "messages.InvitedUsers", "id": 2136862630, "comment": "Contains info about successfully or unsuccessfully invited » users.", "arguments": [{ "name": "updates", "type": "Updates", "comment": "List of updates about successfully invited users (and eventually info about the created group)" }, { "name": "missing_invitees", "type": "MissingInvitee", "typeModifiers": { "isVector": true }, "comment": "A list of users that could not be invited, along with the reason why they couldn't be invited." }] }, { "kind": "class", "name": "inputBusinessChatLink", "type": "InputBusinessChatLink", "id": 292003751, "comment": "Contains info about a business chat deep link » to be created by the current account.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "message", "type": "string", "comment": "Message to pre-fill in the message input field." }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.0", "isVector": true }, "comment": "Message entities for styled text" }, { "name": "title", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Human-readable name of the link, to simplify management in the UI (only visible to the creator of the link)." }] }, { "kind": "class", "name": "businessChatLink", "type": "BusinessChatLink", "id": 3031328367, "comment": "Contains info about a business chat deep link » created by the current account.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "link", "type": "string", "comment": "Business chat deep link." }, { "name": "message", "type": "string", "comment": "Message to pre-fill in the message input field." }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.0", "isVector": true }, "comment": "Message entities for styled text" }, { "name": "title", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Human-readable name of the link, to simplify management in the UI (only visible to the creator of the link)." }, { "name": "views", "type": "int", "comment": "Number of times the link was resolved (clicked/scanned/etc...)." }] }, { "kind": "class", "name": "account.businessChatLinks", "type": "account.BusinessChatLinks", "id": 3963855569, "comment": "Contains info about business chat deep links » created by the current account.", "arguments": [{ "name": "links", "type": "BusinessChatLink", "typeModifiers": { "isVector": true }, "comment": "Links" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Mentioned chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Mentioned users" }] }, { "kind": "class", "name": "account.resolvedBusinessChatLinks", "type": "account.ResolvedBusinessChatLinks", "id": 2586029857, "comment": "Contains info about a single resolved business chat deep link ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "peer", "type": "Peer", "comment": "Destination peer" }, { "name": "message", "type": "string", "comment": "Message to pre-fill in the message input field." }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.0", "isVector": true }, "comment": "Message entities for styled text" }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Mentioned chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Mentioned users" }] }, { "kind": "class", "name": "requestedPeerUser", "type": "RequestedPeer", "id": 3593466986, "comment": "Info about a user, shared by a user with the currently logged in bot using {@link messages.RawSendBotRequestedPeerRequest}.\n\nAll fields except the ID are optional, and will be populated if present on the chosen user, according to the parameters of the requesting {@link RawInputKeyboardButtonRequestPeer}.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "user_id", "type": "int53", "comment": "User ID." }, { "name": "first_name", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "First name." }, { "name": "last_name", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Last name." }, { "name": "username", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Username." }, { "name": "photo", "type": "Photo", "typeModifiers": { "predicate": "flags.2" }, "comment": "Profile photo." }] }, { "kind": "class", "name": "requestedPeerChat", "type": "RequestedPeer", "id": 1929860175, "comment": "Info about a chat, shared by a user with the currently logged in bot using {@link messages.RawSendBotRequestedPeerRequest}.\n\nAll fields except the ID are optional, and will be populated if present on the chosen chat, according to the parameters of the requesting {@link RawInputKeyboardButtonRequestPeer}.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "chat_id", "type": "int53", "comment": "Chat ID." }, { "name": "title", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Chat title." }, { "name": "photo", "type": "Photo", "typeModifiers": { "predicate": "flags.2" }, "comment": "Chat photo." }] }, { "kind": "class", "name": "requestedPeerChannel", "type": "RequestedPeer", "id": 2342781924, "comment": "Info about a channel/supergroup, shared by a user with the currently logged in bot using {@link messages.RawSendBotRequestedPeerRequest}.\n\nAll fields except the ID are optional, and will be populated if present on the chosen channel/supergroup, according to the parameters of the requesting {@link RawInputKeyboardButtonRequestPeer}.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "channel_id", "type": "int53", "comment": "Channel/supergroup ID." }, { "name": "title", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Channel/supergroup title." }, { "name": "username", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Channel/supergroup username." }, { "name": "photo", "type": "Photo", "typeModifiers": { "predicate": "flags.2" }, "comment": "Channel/supergroup photo." }] }, { "kind": "class", "name": "sponsoredMessageReportOption", "type": "SponsoredMessageReportOption", "id": 1124938064, "comment": "A report option for a sponsored message ».", "arguments": [{ "name": "text", "type": "string", "comment": "Localized description of the option." }, { "name": "option", "type": "bytes", "comment": "Option identifier to pass to {@link channels.RawReportSponsoredMessageRequest}." }] }, { "kind": "class", "name": "channels.sponsoredMessageReportResultChooseOption", "type": "channels.SponsoredMessageReportResult", "id": 2221907522, "comment": "The user must choose a report option from the localized options available in options, and after selection, {@link channels.RawReportSponsoredMessageRequest} must be invoked again, passing the option's option field to the option param of the method.", "arguments": [{ "name": "title", "type": "string", "comment": "Title of the option selection popup." }, { "name": "options", "type": "SponsoredMessageReportOption", "typeModifiers": { "isVector": true }, "comment": "Localized list of options." }] }, { "kind": "class", "name": "channels.sponsoredMessageReportResultAdsHidden", "type": "channels.SponsoredMessageReportResult", "id": 1044107055, "comment": "Sponsored messages were hidden for the user in all chats.", "arguments": [] }, { "kind": "class", "name": "channels.sponsoredMessageReportResultReported", "type": "channels.SponsoredMessageReportResult", "id": 2910423113, "comment": "The sponsored message was reported successfully.", "arguments": [] }, { "kind": "class", "name": "stats.broadcastRevenueStats", "type": "stats.BroadcastRevenueStats", "id": 1409802903, "comment": "Channel revenue ad statistics, see here » for more info.\n\nNote that all balances and currency amounts and graph values are in the smallest unit of the chosen cryptocurrency (currently nanotons for TONs, so to obtain a value in USD divide the chosen amount by 10^9, and then divide by usd_rate).", "arguments": [{ "name": "top_hours_graph", "type": "StatsGraph", "comment": "Ad impressions graph" }, { "name": "revenue_graph", "type": "StatsGraph", "comment": "Ad revenue graph (in the smallest unit of the cryptocurrency in which revenue is calculated)" }, { "name": "balances", "type": "BroadcastRevenueBalances", "comment": "Current balance, current withdrawable balance and overall revenue" }, { "name": "usd_rate", "type": "double", "comment": "Current conversion rate of the cryptocurrency (not in the smallest unit) in which revenue is calculated to USD" }] }, { "kind": "class", "name": "stats.broadcastRevenueWithdrawalUrl", "type": "stats.BroadcastRevenueWithdrawalUrl", "id": 3966080823, "comment": "Contains the URL to use to withdraw channel ad revenue.", "arguments": [{ "name": "url", "type": "string", "comment": "A unique URL to a Fragment page where the user will be able to specify and submit the address of the TON wallet where the funds will be sent." }] }, { "kind": "class", "name": "broadcastRevenueTransactionProceeds", "type": "BroadcastRevenueTransaction", "id": 1434332356, "comment": "Describes earnings from sponsored messages in a channel in some time frame, see here » for more info.", "arguments": [{ "name": "amount", "type": "long", "comment": "Amount in the smallest unit of the cryptocurrency." }, { "name": "from_date", "type": "int", "comment": "Start unixtime for the timeframe." }, { "name": "to_date", "type": "int", "comment": "End unixtime for the timeframe." }] }, { "kind": "class", "name": "broadcastRevenueTransactionWithdrawal", "type": "BroadcastRevenueTransaction", "id": 1515784568, "comment": "Describes a withdrawal of ad earnings »", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "pending", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the withdrawal is currently pending" }, { "name": "failed", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether the withdrawal has failed" }, { "name": "amount", "type": "long", "comment": "Amount withdrawn" }, { "name": "date", "type": "int", "comment": "Withdrawal date" }, { "name": "provider", "type": "string", "comment": "Payment provider name" }, { "name": "transaction_date", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "If neither pending nor failed are set, the transaction was completed successfully, and this field will contain the point in time (UNIX timestamp in seconds) when the withdrawal was completed successfully." }, { "name": "transaction_url", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "If neither pending nor failed are set, the transaction was completed successfully, and this field will contain a URL where the withdrawal transaction can be viewed." }] }, { "kind": "class", "name": "broadcastRevenueTransactionRefund", "type": "BroadcastRevenueTransaction", "id": 1121127726, "comment": "Describes a refund for failed withdrawal of ad earnings »", "arguments": [{ "name": "amount", "type": "long", "comment": "Amount refunded." }, { "name": "date", "type": "int", "comment": "Date of refund." }, { "name": "provider", "type": "string", "comment": "Payment provider name." }] }, { "kind": "class", "name": "stats.broadcastRevenueTransactions", "type": "stats.BroadcastRevenueTransactions", "id": 2266334310, "comment": "Channel ad revenue transactions ».", "arguments": [{ "name": "count", "type": "int", "comment": "Total number of transactions." }, { "name": "transactions", "type": "BroadcastRevenueTransaction", "typeModifiers": { "isVector": true }, "comment": "Transactions" }] }, { "kind": "class", "name": "reactionNotificationsFromContacts", "type": "ReactionNotificationsFrom", "id": 3133384218, "comment": "Receive notifications about reactions made only by our contacts.", "arguments": [] }, { "kind": "class", "name": "reactionNotificationsFromAll", "type": "ReactionNotificationsFrom", "id": 1268654752, "comment": "Receive notifications about reactions made by any user.", "arguments": [] }, { "kind": "class", "name": "reactionsNotifySettings", "type": "ReactionsNotifySettings", "id": 1457736048, "comment": "Reaction notification settings, see here » for more info.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "messages_notify_from", "type": "ReactionNotificationsFrom", "typeModifiers": { "predicate": "flags.0" }, "comment": "Message reaction notification settings, if not set completely disables notifications/updates about message reactions." }, { "name": "stories_notify_from", "type": "ReactionNotificationsFrom", "typeModifiers": { "predicate": "flags.1" }, "comment": "Story reaction notification settings, if not set completely disables notifications/updates about reactions to stories." }, { "name": "sound", "type": "NotificationSound", "comment": "Notification sound for reactions »" }, { "name": "show_previews", "type": "Bool", "comment": "If false, push notifications » about message/story reactions will only be of type REACT_HIDDEN/REACT_STORY_HIDDEN, without any information about the reacted-to story or the reaction itself." }] }, { "kind": "class", "name": "broadcastRevenueBalances", "type": "BroadcastRevenueBalances", "id": 2218324422, "comment": "Describes channel ad revenue balances ».\n\nNote that all balances are in the smallest unit of the chosen cryptocurrency (currently nanotons for TONs, so to obtain a value in USD divide the chosen amount by 10^9, and then divide by usd_rate).", "arguments": [{ "name": "current_balance", "type": "long", "comment": "Amount of not-yet-withdrawn cryptocurrency." }, { "name": "available_balance", "type": "long", "comment": "Amount of withdrawable cryptocurrency, out of the currently available balance (available_balance <= current_balance)." }, { "name": "overall_revenue", "type": "long", "comment": "Total amount of earned cryptocurrency." }] }, { "kind": "class", "name": "availableEffect", "type": "AvailableEffect", "id": 2479088254, "comment": "Represents a message effect ».\n\nAll long IDs except for id are {@link RawDocument}.ids from the containing {@link messages.RawAvailableEffects} constructor.\n\nSee here » for more info on how to use following fields.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "premium_required", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether a Premium subscription is required to use this effect." }, { "name": "id", "type": "long", "comment": "Unique effect ID." }, { "name": "emoticon", "type": "string", "comment": "Emoji corresponding to the effect, to be used as icon for the effect if static_icon_id is not set." }, { "name": "static_icon_id", "type": "long", "typeModifiers": { "predicate": "flags.0" }, "comment": "ID of the document containing the static icon (WEBP) of the effect." }, { "name": "effect_sticker_id", "type": "long", "comment": "Contains the preview animation (TGS format »), used for the effect selection menu." }, { "name": "effect_animation_id", "type": "long", "typeModifiers": { "predicate": "flags.1" }, "comment": "If set, contains the actual animated effect (TGS format »). If not set, the animated effect must be set equal to the premium animated sticker effect associated to the animated sticker specified in effect_sticker_id (always different from the preview animation, fetched thanks to the {@link RawVideoSize} of type f as specified here »)." }] }, { "kind": "class", "name": "messages.availableEffectsNotModified", "type": "messages.AvailableEffects", "id": 3522009691, "comment": "The full list of usable animated message effects » hasn't changed.", "arguments": [] }, { "kind": "class", "name": "messages.availableEffects", "type": "messages.AvailableEffects", "id": 3185271150, "comment": "The full list of usable animated message effects ».", "arguments": [{ "name": "hash", "type": "int", "comment": "Hash used for caching, for more info click here" }, { "name": "effects", "type": "AvailableEffect", "typeModifiers": { "isVector": true }, "comment": "Message effects" }, { "name": "documents", "type": "Document", "typeModifiers": { "isVector": true }, "comment": "Documents specified in the effects constructors." }] }, { "kind": "class", "name": "factCheck", "type": "FactCheck", "id": 3097230543, "comment": "Represents a fact-check » created by an independent fact-checker.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "need_check", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, the country/text fields will not be set, and the fact check must be fetched manually by the client (if it isn't already cached with the key specified in hash) using bundled {@link messages.RawGetFactCheckRequest} requests, when the message with the factcheck scrolls into view." }, { "name": "country", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "A two-letter ISO 3166-1 alpha-2 country code of the country for which the fact-check should be shown." }, { "name": "text", "type": "TextWithEntities", "typeModifiers": { "predicate": "flags.1" }, "comment": "The fact-check." }, { "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here" }] }, { "kind": "class", "name": "starsTransactionPeerUnsupported", "type": "StarsTransactionPeer", "id": 2515714020, "comment": "Describes a Telegram Star transaction that cannot be described using the current layer.", "arguments": [] }, { "kind": "class", "name": "starsTransactionPeerAppStore", "type": "StarsTransactionPeer", "id": 3025646453, "comment": "Describes a Telegram Star transaction with the App Store, used when purchasing Telegram Stars through the App Store.", "arguments": [] }, { "kind": "class", "name": "starsTransactionPeerPlayMarket", "type": "StarsTransactionPeer", "id": 2069236235, "comment": "Describes a Telegram Star transaction with the Play Store, used when purchasing Telegram Stars through the Play Store.", "arguments": [] }, { "kind": "class", "name": "starsTransactionPeerPremiumBot", "type": "StarsTransactionPeer", "id": 621656824, "comment": "Describes a Telegram Star transaction made using @PremiumBot (i.e. using the {@link RawInputInvoiceStars} flow described here »).", "arguments": [] }, { "kind": "class", "name": "starsTransactionPeerFragment", "type": "StarsTransactionPeer", "id": 3912227074, "comment": "Describes a Telegram Star transaction with Fragment, used when purchasing Telegram Stars through Fragment.", "arguments": [] }, { "kind": "class", "name": "starsTransactionPeer", "type": "StarsTransactionPeer", "id": 3624771933, "comment": "Describes a Telegram Star transaction with another peer.", "arguments": [{ "name": "peer", "type": "Peer", "comment": "The peer." }] }, { "kind": "class", "name": "starsTransactionPeerAds", "type": "StarsTransactionPeer", "id": 1617438738, "comment": "Describes a Telegram Star transaction used to pay for Telegram ads as specified here ».", "arguments": [] }, { "kind": "class", "name": "starsTopupOption", "type": "StarsTopupOption", "id": 198776256, "comment": "Telegram Stars topup option.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "extended", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "If set, the option must only be shown in the full list of topup options." }, { "name": "stars", "type": "long", "comment": "Amount of Telegram stars." }, { "name": "store_product", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Identifier of the store product associated with the option, official apps only." }, { "name": "currency", "type": "string", "comment": "Three-letter ISO 4217 currency code" }, { "name": "amount", "type": "long", "comment": "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." }] }, { "kind": "class", "name": "starsTransaction", "type": "StarsTransaction", "id": 766853519, "comment": "Represents a Telegram Stars transaction ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "refund", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether this transaction is a refund." }, { "name": "pending", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "The transaction is currently pending." }, { "name": "failed", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "This transaction has failed." }, { "name": "gift", "type": "true", "typeModifiers": { "predicate": "flags.10" }, "comment": "This transaction was a gift from the user in peer.peer." }, { "name": "id", "type": "string", "comment": "Transaction ID." }, { "name": "stars", "type": "long", "comment": "Amount of Stars (negative for outgoing transactions)." }, { "name": "date", "type": "int", "comment": "Date of the transaction (unixtime)." }, { "name": "peer", "type": "StarsTransactionPeer", "comment": "Source of the incoming transaction, or its recipient for outgoing transactions." }, { "name": "title", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "For transactions with bots, title of the bought product." }, { "name": "description", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "For transactions with bots, description of the bought product." }, { "name": "photo", "type": "WebDocument", "typeModifiers": { "predicate": "flags.2" }, "comment": "For transactions with bots, photo of the bought product." }, { "name": "transaction_date", "type": "int", "typeModifiers": { "predicate": "flags.5" }, "comment": "If neither pending nor failed are set, the transaction was completed successfully, and this field will contain the point in time (UNIX timestamp in seconds) when the withdrawal was completed successfully." }, { "name": "transaction_url", "type": "string", "typeModifiers": { "predicate": "flags.5" }, "comment": "If neither pending nor failed are set, the transaction was completed successfully, and this field will contain a URL where the withdrawal transaction can be viewed." }, { "name": "bot_payload", "type": "bytes", "typeModifiers": { "predicate": "flags.7" }, "comment": "Bot specified invoice payload (i.e. the payload passed to {@link RawInputMediaInvoice} when creating the invoice)." }, { "name": "msg_id", "type": "int", "typeModifiers": { "predicate": "flags.8" }, "comment": "For paid media transactions », message ID of the paid media posted to peer.peer (can point to a deleted message; either way, extended_media will always contain the bought media)." }, { "name": "extended_media", "type": "MessageMedia", "typeModifiers": { "predicate": "flags.9", "isVector": true }, "comment": "The purchased paid media »." }] }, { "kind": "class", "name": "payments.starsStatus", "type": "payments.StarsStatus", "id": 2364862048, "comment": "Info about the current Telegram Star balance and transaction history ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "balance", "type": "long", "comment": "Current Telegram Star balance." }, { "name": "history", "type": "StarsTransaction", "typeModifiers": { "isVector": true }, "comment": "List of Telegram Star transactions (partial if next_offset is set)." }, { "name": "next_offset", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Offset to use to fetch more transactions from the transaction history using {@link payments.RawGetStarsTransactionsRequest}." }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Chats mentioned in history." }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Users mentioned in history." }] }, { "kind": "class", "name": "foundStory", "type": "FoundStory", "id": 3900361664, "comment": "A story found using global story search ».", "arguments": [{ "name": "peer", "type": "Peer", "comment": "The peer that posted the story." }, { "name": "story", "type": "StoryItem", "comment": "The story." }] }, { "kind": "class", "name": "stories.foundStories", "type": "stories.FoundStories", "id": 3806230327, "comment": "Stories found using global story search ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "count", "type": "int", "comment": "Total number of results found for the query." }, { "name": "stories", "type": "FoundStory", "typeModifiers": { "isVector": true }, "comment": "Matching stories." }, { "name": "next_offset", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Offset used to fetch the next page, if not set this is the final page." }, { "name": "chats", "type": "Chat", "typeModifiers": { "isVector": true }, "comment": "Mentioned chats" }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "Mentioned users" }] }, { "kind": "class", "name": "geoPointAddress", "type": "GeoPointAddress", "id": 3729546643, "comment": "Address optionally associated to a {@link RawGeoPoint}.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "country_iso2", "type": "string", "comment": "Two-letter ISO 3166-1 alpha-2 country code" }, { "name": "state", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "State" }, { "name": "city", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "City" }, { "name": "street", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "Street" }] }, { "kind": "class", "name": "starsRevenueStatus", "type": "StarsRevenueStatus", "id": 2033461574, "comment": "Describes Telegram Star revenue balances ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "withdrawal_enabled", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, the user may withdraw up to available_balance stars." }, { "name": "current_balance", "type": "long", "comment": "Amount of not-yet-withdrawn Telegram Stars." }, { "name": "available_balance", "type": "long", "comment": "Amount of withdrawable Telegram Stars." }, { "name": "overall_revenue", "type": "long", "comment": "Total amount of earned Telegram Stars." }, { "name": "next_withdrawal_at", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Unixtime indicating when will withdrawal be available to the user. If not set, withdrawal can be started now." }] }, { "kind": "class", "name": "payments.starsRevenueStats", "type": "payments.StarsRevenueStats", "id": 3375085371, "comment": "Star revenue statistics, see here » for more info.\n\nNote that all balances and currency amounts and graph values are in Stars.", "arguments": [{ "name": "revenue_graph", "type": "StatsGraph", "comment": "Star revenue graph (number of earned stars)" }, { "name": "status", "type": "StarsRevenueStatus", "comment": "Current balance, current withdrawable balance and overall earned Telegram Stars" }, { "name": "usd_rate", "type": "double", "comment": "Current conversion rate of Telegram Stars to USD" }] }, { "kind": "class", "name": "payments.starsRevenueWithdrawalUrl", "type": "payments.StarsRevenueWithdrawalUrl", "id": 497778871, "comment": "Contains the URL to use to withdraw Telegram Star revenue.", "arguments": [{ "name": "url", "type": "string", "comment": "Contains the URL to use to withdraw Telegram Star revenue." }] }, { "kind": "class", "name": "payments.starsRevenueAdsAccountUrl", "type": "payments.StarsRevenueAdsAccountUrl", "id": 961445665, "comment": "Contains a URL leading to a page where the user will be able to place ads for the channel/bot, paying using Telegram Stars.", "arguments": [{ "name": "url", "type": "string", "comment": "URL to open." }] }, { "kind": "class", "name": "inputStarsTransaction", "type": "InputStarsTransaction", "id": 543876817, "comment": "Used to fetch info about a Telegram Star transaction ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "refund", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, fetches info about the refund transaction for this transaction." }, { "name": "id", "type": "string", "comment": "Transaction ID." }] }, { "kind": "class", "name": "starsGiftOption", "type": "StarsGiftOption", "id": 1577421297, "comment": "Telegram Stars gift option.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "extended", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "If set, the option must only be shown in the full list of topup options." }, { "name": "stars", "type": "long", "comment": "Amount of Telegram stars." }, { "name": "store_product", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Identifier of the store product associated with the option, official apps only." }, { "name": "currency", "type": "string", "comment": "Three-letter ISO 4217 currency code" }, { "name": "amount", "type": "long", "comment": "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." }] }, { "kind": "class", "name": "bots.popularAppBots", "type": "bots.PopularAppBots", "id": 428978491, "comment": "Popular Main Mini Apps, to be used in the apps tab of global search ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "next_offset", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Offset for pagination." }, { "name": "users", "type": "User", "typeModifiers": { "isVector": true }, "comment": "The bots associated to each Main Mini App, see here » for more info." }] }, { "kind": "class", "name": "botPreviewMedia", "type": "BotPreviewMedia", "id": 602479523, "comment": "Represents a Main Mini App preview media, see here » for more info.", "arguments": [{ "name": "date", "type": "int", "comment": "When was this media last updated." }, { "name": "media", "type": "MessageMedia", "comment": "The actual photo/video." }] }, { "kind": "class", "name": "bots.previewInfo", "type": "bots.PreviewInfo", "id": 212278628, "comment": "Contains info about Main Mini App previews, see here » for more info.", "arguments": [{ "name": "media", "type": "BotPreviewMedia", "typeModifiers": { "isVector": true }, "comment": "All preview medias for the language code passed to {@link bots.RawGetPreviewInfoRequest}." }, { "name": "lang_codes", "type": "string", "typeModifiers": { "isVector": true }, "comment": "All available language codes for which preview medias were uploaded (regardless of the language code passed to {@link bots.RawGetPreviewInfoRequest})." }] }, { "kind": "class", "name": "updateGroupInvitePrivacyForbidden", "type": "Update", "id": 3438316246, "comment": "0-N updates of this type may be returned only when invoking {@link messages.RawAddChatUserRequest}, {@link channels.RawInviteToChannelRequest} or {@link messages.RawCreateChatRequest}: it indicates we couldn't add a user to a chat because of their privacy settings; if required, an invite link can be shared with the user, instead.", "arguments": [{ "name": "user_id", "type": "int53", "comment": "ID of the user we couldn't add." }] }, { "kind": "class", "name": "simpleWebViewResultUrl", "type": "SimpleWebViewResult", "id": 2284811963, "comment": "Contains the webview URL with appropriate theme parameters added", "arguments": [{ "name": "url", "type": "string", "comment": "URL" }] }, { "kind": "class", "name": "appWebViewResultUrl", "type": "AppWebViewResult", "id": 1008422669, "comment": "Contains the link that must be used to open a direct link Mini App.", "arguments": [{ "name": "url", "type": "string", "comment": "The URL to open" }] }, { "kind": "class", "name": "sponsoredWebPage", "type": "SponsoredWebPage", "id": 1035529315, "comment": "Represents a sponsored website.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "url", "type": "string", "comment": "Web page URL." }, { "name": "site_name", "type": "string", "comment": "Website name." }, { "name": "photo", "type": "Photo", "typeModifiers": { "predicate": "flags.0" }, "comment": "Optional image preview." }] }, { "kind": "class", "name": "inputStorePaymentStars", "type": "InputStorePaymentPurpose", "id": 1326377183, "comment": "Used to top up the Telegram Stars balance using the Play Store/App Store flow (official apps only).", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "stars", "type": "long", "comment": "Amount of stars to topup" }, { "name": "currency", "type": "string", "comment": "Three-letter ISO 4217 currency code" }, { "name": "amount", "type": "long", "comment": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." }] }, { "kind": "class", "name": "mtcute.dummyUpdate", "id": 614906126, "type": "Update", "arguments": [{ "name": "pts", "type": "int" }, { "name": "pts_count", "type": "int" }, { "name": "channel_id", "type": "int53" }] }, { "kind": "class", "name": "mtcute.dummyInputPeerMinUser", "id": 2240546338, "type": "InputPeer", "arguments": [{ "name": "user_id", "type": "int" }] }, { "kind": "class", "name": "mtcute.dummyInputPeerMinChannel", "id": 1796171926, "type": "InputPeer", "arguments": [{ "name": "channel_id", "type": "int" }] }, { "kind": "method", "name": "test.useConfigSimple", "id": 4189565501, "type": "help.ConfigSimple", "arguments": [], "typeModifiers": { "constructorId": 1515793004 } }, { "kind": "method", "name": "test.parseInputAppEvent", "id": 3138226161, "type": "InputAppEvent", "arguments": [], "typeModifiers": { "constructorId": 488313413 } }, { "kind": "method", "name": "invokeWithBusinessConnectionPrefix", "id": 3710427022, "type": "Error", "arguments": [{ "name": "connection_id", "type": "string" }], "typeModifiers": { "constructorId": 3300522427 } }, { "kind": "method", "name": "invokeWithGooglePlayIntegrityPrefix", "id": 502868356, "type": "Error", "arguments": [{ "name": "nonce", "type": "string" }, { "name": "token", "type": "string" }], "typeModifiers": { "constructorId": 3300522427 } }, { "kind": "method", "name": "invokeWithApnsSecretPrefix", "id": 229528824, "type": "Error", "arguments": [{ "name": "nonce", "type": "string" }, { "name": "secret", "type": "string" }], "typeModifiers": { "constructorId": 3300522427 } }, { "kind": "method", "name": "invokeAfterMsg", "type": "X", "id": 3416209197, "comment": "Invokes a query after successful completion of one of the previous queries.", "generics": [{ "name": "X", "type": "Type" }], "arguments": [{ "name": "msg_id", "type": "long", "comment": "Message identifier on which a current query depends" }, { "name": "query", "type": "!X", "comment": "The query itself" }], "available": "both" }, { "kind": "method", "name": "invokeAfterMsgs", "type": "X", "id": 1036301552, "comment": "Invokes a query after a successful completion of previous queries", "generics": [{ "name": "X", "type": "Type" }], "arguments": [{ "name": "msg_ids", "type": "long", "typeModifiers": { "isVector": true }, "comment": "List of messages on which a current query depends" }, { "name": "query", "type": "!X", "comment": "The query itself" }], "available": "both" }, { "kind": "method", "name": "initConnection", "type": "X", "id": 3251461801, "comment": "Initialize connection", "generics": [{ "name": "X", "type": "Type" }], "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "api_id", "type": "int", "comment": "Application identifier (see. App configuration)" }, { "name": "device_model", "type": "string", "comment": "Device model" }, { "name": "system_version", "type": "string", "comment": "Operation system version" }, { "name": "app_version", "type": "string", "comment": "Application version" }, { "name": "system_lang_code", "type": "string", "comment": "Code for the language used on the device's OS, ISO 639-1 standard" }, { "name": "lang_pack", "type": "string", "comment": "Platform identifier (i.e. android, tdesktop, etc)." }, { "name": "lang_code", "type": "string", "comment": "Either an ISO 639-1 language code or a language pack name obtained from a language pack link." }, { "name": "proxy", "type": "InputClientProxy", "typeModifiers": { "predicate": "flags.0" }, "comment": "Info about an MTProto proxy" }, { "name": "params", "type": "JSONValue", "typeModifiers": { "predicate": "flags.1" }, "comment": "Additional initConnection parameters.
For now, only the tz_offset field is supported, for specifying the timezone offset in seconds." }, { "name": "query", "type": "!X", "comment": "The query itself" }], "throws": [{ "code": 400, "name": "CONNECTION_LAYER_INVALID", "comment": "Layer invalid." }], "available": "both" }, { "kind": "method", "name": "invokeWithLayer", "type": "X", "id": 3667594509, "comment": "Invoke the specified query using the specified API layer", "generics": [{ "name": "X", "type": "Type" }], "arguments": [{ "name": "layer", "type": "int", "comment": "The layer to use" }, { "name": "query", "type": "!X", "comment": "The query" }], "throws": [{ "code": 400, "name": "AUTH_BYTES_INVALID", "comment": "The provided authorization is invalid." }, { "code": 400, "name": "CDN_METHOD_INVALID", "comment": "You can't call this method in a CDN DC." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "CONNECTION_API_ID_INVALID", "comment": "The provided API id is invalid." }, { "code": 406, "name": "INVITE_HASH_EXPIRED", "comment": "The invite link has expired." }], "available": "both" }, { "kind": "method", "name": "invokeWithoutUpdates", "type": "X", "id": 3214170551, "comment": "Invoke a request without subscribing the used connection for updates (this is enabled by default for file queries).", "generics": [{ "name": "X", "type": "Type" }], "arguments": [{ "name": "query", "type": "!X", "comment": "The query" }], "available": "both" }, { "kind": "method", "name": "invokeWithMessagesRange", "type": "X", "id": 911373810, "comment": "Invoke with the given message range", "generics": [{ "name": "X", "type": "Type" }], "arguments": [{ "name": "range", "type": "MessageRange", "comment": "Message range" }, { "name": "query", "type": "!X", "comment": "Query" }], "available": "both" }, { "kind": "method", "name": "invokeWithTakeout", "type": "X", "id": 2896821550, "comment": "Invoke a method within a takeout session, see here » for more info.", "generics": [{ "name": "X", "type": "Type" }], "arguments": [{ "name": "takeout_id", "type": "long", "comment": "Takeout session ID »" }, { "name": "query", "type": "!X", "comment": "Query" }], "available": "both" }, { "kind": "method", "name": "invokeWithBusinessConnection", "type": "X", "id": 3710427022, "comment": "Invoke a method using a Telegram Business Bot connection, see here » for more info, including a list of the methods that can be wrapped in this constructor.\n\nMake sure to always send queries wrapped in a invokeWithBusinessConnection to the datacenter ID, specified in the dc_id field of the {@link RawBotBusinessConnection} that is being used.", "generics": [{ "name": "X", "type": "Type" }], "arguments": [{ "name": "connection_id", "type": "string", "comment": "Business connection ID." }, { "name": "query", "type": "!X", "comment": "The actual query." }], "available": "both" }, { "kind": "method", "name": "invokeWithGooglePlayIntegrity", "type": "X", "id": 502868356, "comment": "Official clients only, invoke with Google Play Integrity token.", "generics": [{ "name": "X", "type": "Type" }], "arguments": [{ "name": "nonce", "type": "string", "comment": "Nonce." }, { "name": "token", "type": "string", "comment": "Token." }, { "name": "query", "type": "!X", "comment": "Query." }], "available": "both" }, { "kind": "method", "name": "invokeWithApnsSecret", "type": "X", "id": 229528824, "comment": "Official clients only, invoke with Apple push verification.", "generics": [{ "name": "X", "type": "Type" }], "arguments": [{ "name": "nonce", "type": "string", "comment": "Nonce." }, { "name": "secret", "type": "string", "comment": "Secret." }, { "name": "query", "type": "!X", "comment": "Query." }], "available": "both" }, { "kind": "method", "name": "auth.sendCode", "type": "auth.SentCode", "id": 2792825935, "comment": "Send the verification code for login", "arguments": [{ "name": "phone_number", "type": "string", "comment": "Phone number in international format" }, { "name": "api_id", "type": "int", "comment": "Application identifier (see App configuration)" }, { "name": "api_hash", "type": "string", "comment": "Application secret hash (see App configuration)" }, { "name": "settings", "type": "CodeSettings", "comment": "Settings for the code type to send" }], "throws": [{ "code": 400, "name": "API_ID_INVALID", "comment": "API ID invalid." }, { "code": 400, "name": "API_ID_PUBLISHED_FLOOD", "comment": "This API id was published somewhere, you can't use it now." }, { "code": 500, "name": "AUTH_RESTART", "comment": "Restart the authorization process." }, { "code": 400, "name": "PHONE_NUMBER_APP_SIGNUP_FORBIDDEN", "comment": "You can't sign up using this app." }, { "code": 400, "name": "PHONE_NUMBER_BANNED", "comment": "The provided phone number is banned from telegram." }, { "code": 400, "name": "PHONE_NUMBER_FLOOD", "comment": "You asked for the code too many times." }, { "code": 406, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }, { "code": 406, "name": "PHONE_PASSWORD_FLOOD", "comment": "You have tried logging in too many times." }, { "code": 400, "name": "PHONE_PASSWORD_PROTECTED", "comment": "This phone is password protected." }, { "code": 400, "name": "SMS_CODE_CREATE_FAILED", "comment": "An error occurred while creating the SMS code." }, { "code": 406, "name": "UPDATE_APP_TO_LOGIN", "comment": "Please update to the latest version of MadelineProto to login." }], "available": "user" }, { "kind": "method", "name": "auth.signUp", "type": "auth.Authorization", "id": 2865215255, "comment": "Registers a validated phone number in the system.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "no_joined_notifications", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, users on Telegram that have already added phone_number to their contacts will not receive signup notifications about this user." }, { "name": "phone_number", "type": "string", "comment": "Phone number in the international format" }, { "name": "phone_code_hash", "type": "string", "comment": "SMS-message ID" }, { "name": "first_name", "type": "string", "comment": "New user first name" }, { "name": "last_name", "type": "string", "comment": "New user last name" }], "throws": [{ "code": 400, "name": "FIRSTNAME_INVALID", "comment": "The first name is invalid." }, { "code": 400, "name": "LASTNAME_INVALID", "comment": "The last name is invalid." }, { "code": 400, "name": "PHONE_CODE_EMPTY", "comment": "phone_code is missing." }, { "code": 400, "name": "PHONE_CODE_EXPIRED", "comment": "The phone code you provided has expired." }, { "code": 400, "name": "PHONE_CODE_INVALID", "comment": "The provided phone code is invalid." }, { "code": 400, "name": "PHONE_NUMBER_FLOOD", "comment": "You asked for the code too many times." }, { "code": 406, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }, { "code": 400, "name": "PHONE_NUMBER_OCCUPIED", "comment": "The phone number is already in use." }], "available": "user" }, { "kind": "method", "name": "auth.signIn", "type": "auth.Authorization", "id": 2371004753, "comment": "Signs in a user with a validated phone number.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "phone_number", "type": "string", "comment": "Phone number in the international format" }, { "name": "phone_code_hash", "type": "string", "comment": "SMS-message ID, obtained from {@link auth.RawSendCodeRequest}" }, { "name": "phone_code", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Valid numerical code from the SMS-message" }, { "name": "email_verification", "type": "EmailVerification", "typeModifiers": { "predicate": "flags.1" }, "comment": "Email verification code or token" }], "throws": [{ "code": 500, "name": "AUTH_RESTART", "comment": "Restart the authorization process." }, { "code": 400, "name": "PHONE_CODE_EMPTY", "comment": "phone_code is missing." }, { "code": 400, "name": "PHONE_CODE_EXPIRED", "comment": "The phone code you provided has expired." }, { "code": 400, "name": "PHONE_CODE_INVALID", "comment": "The provided phone code is invalid." }, { "code": 406, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }, { "code": 400, "name": "PHONE_NUMBER_UNOCCUPIED", "comment": "The phone number is not yet being used." }, { "code": 500, "name": "SIGN_IN_FAILED", "comment": "Failure while signing in." }, { "code": 406, "name": "UPDATE_APP_TO_LOGIN", "comment": "Please update to the latest version of MadelineProto to login." }], "available": "user" }, { "kind": "method", "name": "auth.logOut", "type": "auth.LoggedOut", "typeModifiers": { "constructorId": 3282207583 }, "id": 1047706137, "comment": "Logs out the user.", "arguments": [], "available": "both" }, { "kind": "method", "name": "auth.resetAuthorizations", "type": "Bool", "id": 2678787354, "comment": "Terminates all user's authorized sessions except for the current one.\n\nAfter calling this method it is necessary to reregister the current device using the method {@link account.RawRegisterDeviceRequest}", "arguments": [], "throws": [{ "code": 406, "name": "FRESH_RESET_AUTHORISATION_FORBIDDEN", "comment": "You can't logout other sessions if less than 24 hours have passed since you logged on the current session." }], "available": "user" }, { "kind": "method", "name": "auth.exportAuthorization", "type": "auth.ExportedAuthorization", "typeModifiers": { "constructorId": 3023364792 }, "id": 3854565325, "comment": "Returns data for copying authorization to another data-center.", "arguments": [{ "name": "dc_id", "type": "int", "comment": "Number of a target data-center" }], "throws": [{ "code": 400, "name": "DC_ID_INVALID", "comment": "The provided DC ID is invalid." }], "available": "both" }, { "kind": "method", "name": "auth.importAuthorization", "type": "auth.Authorization", "id": 2776268205, "comment": "Logs in a user using a key transmitted from their native data-center.", "arguments": [{ "name": "id", "type": "long", "comment": "User ID" }, { "name": "bytes", "type": "bytes", "comment": "Authorization key" }], "throws": [{ "code": 400, "name": "AUTH_BYTES_INVALID", "comment": "The provided authorization is invalid." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "both" }, { "kind": "method", "name": "auth.bindTempAuthKey", "type": "Bool", "id": 3453233669, "comment": "Binds a temporary authorization key temp_auth_key_id to the permanent authorization key perm_auth_key_id. Each permanent key may only be bound to one temporary key at a time, binding a new temporary key overwrites the previous one.\n\nFor more information, see Perfect Forward Secrecy.", "arguments": [{ "name": "perm_auth_key_id", "type": "long", "comment": "Permanent auth_key_id to bind to" }, { "name": "nonce", "type": "long", "comment": "Random long from Binding message contents" }, { "name": "expires_at", "type": "int", "comment": "UNIX timestamp in seconds to invalidate temporary key, see Binding message contents" }, { "name": "encrypted_message", "type": "bytes", "comment": "See Generating encrypted_message" }], "throws": [{ "code": 400, "name": "ENCRYPTED_MESSAGE_INVALID", "comment": "Encrypted message invalid." }, { "code": 400, "name": "TEMP_AUTH_KEY_ALREADY_BOUND", "comment": "The passed temporary key is already bound to another perm_auth_key_id." }, { "code": 400, "name": "TEMP_AUTH_KEY_EMPTY", "comment": "No temporary auth key provided." }], "available": "both" }, { "kind": "method", "name": "auth.importBotAuthorization", "type": "auth.Authorization", "id": 1738800940, "comment": "Login as a bot", "arguments": [{ "name": "flags", "type": "int", "comment": "Reserved for future use" }, { "name": "api_id", "type": "int", "comment": "Application identifier (see. App configuration)" }, { "name": "api_hash", "type": "string", "comment": "Application identifier hash (see. App configuration)" }, { "name": "bot_auth_token", "type": "string", "comment": "Bot token (see bots)" }], "throws": [{ "code": 400, "name": "ACCESS_TOKEN_EXPIRED", "comment": "Access token expired." }, { "code": 400, "name": "ACCESS_TOKEN_INVALID", "comment": "Access token invalid." }, { "code": 400, "name": "API_ID_INVALID", "comment": "API ID invalid." }, { "code": 400, "name": "API_ID_PUBLISHED_FLOOD", "comment": "This API id was published somewhere, you can't use it now." }], "available": "both" }, { "kind": "method", "name": "auth.checkPassword", "type": "auth.Authorization", "id": 3515567382, "comment": "Try logging to an account protected by a 2FA password.", "arguments": [{ "name": "password", "type": "InputCheckPasswordSRP", "comment": "The account's password (see SRP)" }], "throws": [{ "code": 400, "name": "PASSWORD_HASH_INVALID", "comment": "The provided password hash is invalid." }, { "code": 400, "name": "SRP_ID_INVALID", "comment": "Invalid SRP ID provided." }, { "code": 400, "name": "SRP_PASSWORD_CHANGED", "comment": "Password has changed." }], "available": "user" }, { "kind": "method", "name": "auth.requestPasswordRecovery", "type": "auth.PasswordRecovery", "typeModifiers": { "constructorId": 326715557 }, "id": 3633822822, "comment": "Request recovery code of a 2FA password, only for accounts with a recovery email configured.", "arguments": [], "throws": [{ "code": 400, "name": "PASSWORD_EMPTY", "comment": "The provided password is empty." }, { "code": 400, "name": "PASSWORD_RECOVERY_NA", "comment": "No email was set, can't recover password via email." }], "available": "user" }, { "kind": "method", "name": "auth.recoverPassword", "type": "auth.Authorization", "id": 923364464, "comment": "Reset the 2FA password using the recovery code sent using {@link auth.RawRequestPasswordRecoveryRequest}.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "code", "type": "string", "comment": "Code received via email" }, { "name": "new_settings", "type": "account.PasswordInputSettings", "typeModifiers": { "predicate": "flags.0" }, "comment": "New password" }], "throws": [{ "code": 400, "name": "CODE_EMPTY", "comment": "The provided code is empty." }, { "code": 400, "name": "NEW_SETTINGS_INVALID", "comment": "The new password settings are invalid." }], "available": "user" }, { "kind": "method", "name": "auth.resendCode", "type": "auth.SentCode", "id": 3403969827, "comment": "Resend the login code via another medium, the phone code type is determined by the return value of the previous auth.sendCode/auth.resendCode: see login for more info.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "phone_number", "type": "string", "comment": "The phone number" }, { "name": "phone_code_hash", "type": "string", "comment": "The phone code hash obtained from {@link auth.RawSendCodeRequest}" }, { "name": "reason", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Official clients only, used if the device integrity verification failed, and no secret could be obtained to invoke {@link auth.RawRequestFirebaseSmsRequest}: in this case, the device integrity verification failure reason must be passed here." }], "throws": [{ "code": 400, "name": "PHONE_CODE_EMPTY", "comment": "phone_code is missing." }, { "code": 400, "name": "PHONE_CODE_EXPIRED", "comment": "The phone code you provided has expired." }, { "code": 400, "name": "PHONE_CODE_HASH_EMPTY", "comment": "phone_code_hash is missing." }, { "code": 406, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }, { "code": 406, "name": "SEND_CODE_UNAVAILABLE", "comment": "Returned when all available options for this type of number were already used (e.g. flash-call, then SMS, then this error might be returned to trigger a second resend)." }], "available": "user" }, { "kind": "method", "name": "auth.cancelCode", "type": "Bool", "id": 520357240, "comment": "Cancel the login verification code", "arguments": [{ "name": "phone_number", "type": "string", "comment": "Phone number" }, { "name": "phone_code_hash", "type": "string", "comment": "Phone code hash from {@link auth.RawSendCodeRequest}" }], "throws": [{ "code": 400, "name": "PHONE_CODE_EXPIRED", "comment": "The phone code you provided has expired." }, { "code": 406, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }], "available": "user" }, { "kind": "method", "name": "auth.dropTempAuthKeys", "type": "Bool", "id": 2387124616, "comment": "Delete all temporary authorization keys except for the ones specified", "arguments": [{ "name": "except_auth_keys", "type": "long", "typeModifiers": { "isVector": true }, "comment": "The auth keys that shouldn't be dropped." }], "available": "both" }, { "kind": "method", "name": "auth.exportLoginToken", "type": "auth.LoginToken", "id": 3084944894, "comment": "Generate a login token, for login via QR code.
\nThe generated login token should be encoded using base64url, then shown as a tg://login?token=base64encodedtoken deep link » in the QR code.\n\nFor more info, see login via QR code.", "arguments": [{ "name": "api_id", "type": "int", "comment": "Application identifier (see. App configuration)" }, { "name": "api_hash", "type": "string", "comment": "Application identifier hash (see. App configuration)" }, { "name": "except_ids", "type": "long", "typeModifiers": { "isVector": true }, "comment": "List of already logged-in user IDs, to prevent logging in twice with the same user" }], "throws": [{ "code": 400, "name": "API_ID_INVALID", "comment": "API ID invalid." }, { "code": 400, "name": "API_ID_PUBLISHED_FLOOD", "comment": "This API id was published somewhere, you can't use it now." }], "available": "user" }, { "kind": "method", "name": "auth.importLoginToken", "type": "auth.LoginToken", "id": 2511101156, "comment": "Login using a redirected login token, generated in case of DC mismatch during QR code login.\n\nFor more info, see login via QR code.", "arguments": [{ "name": "token", "type": "bytes", "comment": "Login token" }], "throws": [{ "code": 400, "name": "AUTH_TOKEN_ALREADY_ACCEPTED", "comment": "The specified auth token was already accepted." }, { "code": 400, "name": "AUTH_TOKEN_EXPIRED", "comment": "The authorization token has expired." }, { "code": 400, "name": "AUTH_TOKEN_INVALID", "comment": "The specified auth token is invalid." }, { "code": 400, "name": "AUTH_TOKEN_INVALIDX", "comment": "The specified auth token is invalid." }], "available": "user" }, { "kind": "method", "name": "auth.acceptLoginToken", "type": "Authorization", "typeModifiers": { "constructorId": 2902578717 }, "id": 3902057805, "comment": "Accept QR code login token, logging in the app that generated it.\n\nReturns info about the new session.\n\nFor more info, see login via QR code.", "arguments": [{ "name": "token", "type": "bytes", "comment": "Login token embedded in QR code, for more info, see login via QR code." }], "throws": [{ "code": 400, "name": "AUTH_TOKEN_ALREADY_ACCEPTED", "comment": "The specified auth token was already accepted." }, { "code": 400, "name": "AUTH_TOKEN_EXCEPTION", "comment": "An error occurred while importing the auth token." }, { "code": 400, "name": "AUTH_TOKEN_EXPIRED", "comment": "The authorization token has expired." }, { "code": 400, "name": "AUTH_TOKEN_INVALIDX", "comment": "The specified auth token is invalid." }], "available": "user" }, { "kind": "method", "name": "auth.checkRecoveryPassword", "type": "Bool", "id": 221691769, "comment": "Check if the 2FA recovery code sent using {@link auth.RawRequestPasswordRecoveryRequest} is valid, before passing it to {@link auth.RawRecoverPasswordRequest}.", "arguments": [{ "name": "code", "type": "string", "comment": "Code received via email" }], "throws": [{ "code": 400, "name": "CODE_EMPTY", "comment": "The provided code is empty." }, { "code": 400, "name": "PASSWORD_RECOVERY_EXPIRED", "comment": "The recovery code has expired." }], "available": "user" }, { "kind": "method", "name": "auth.importWebTokenAuthorization", "type": "auth.Authorization", "id": 767062953, "comment": "Login by importing an authorization token", "arguments": [{ "name": "api_id", "type": "int", "comment": "API ID" }, { "name": "api_hash", "type": "string", "comment": "API hash" }, { "name": "web_auth_token", "type": "string", "comment": "The authorization token" }], "throws": [{ "code": 400, "name": "API_ID_INVALID", "comment": "API ID invalid." }], "available": "user" }, { "kind": "method", "name": "auth.requestFirebaseSms", "type": "Bool", "id": 2386109982, "comment": "Request an SMS code via Firebase.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "phone_number", "type": "string", "comment": "Phone number" }, { "name": "phone_code_hash", "type": "string", "comment": "Phone code hash returned by {@link auth.RawSendCodeRequest}" }, { "name": "safety_net_token", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "On Android, a JWS object obtained as described in the auth documentation »" }, { "name": "play_integrity_token", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "On Android, an object obtained as described in the auth documentation »" }, { "name": "ios_push_secret", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Secret token received via an apple push notification" }], "throws": [{ "code": 400, "name": "PHONE_CODE_EMPTY", "comment": "phone_code is missing." }, { "code": 400, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }], "available": "user" }, { "kind": "method", "name": "auth.resetLoginEmail", "type": "auth.SentCode", "id": 2123760019, "comment": "Reset the login email ».", "arguments": [{ "name": "phone_number", "type": "string", "comment": "Phone number of the account" }, { "name": "phone_code_hash", "type": "string", "comment": "Phone code hash, obtained as described in the documentation »" }], "throws": [{ "code": 400, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }, { "code": 400, "name": "TASK_ALREADY_EXISTS", "comment": "An email reset was already requested." }], "available": "user" }, { "kind": "method", "name": "auth.reportMissingCode", "type": "Bool", "id": 3416125430, "comment": "Official apps only, reports that the SMS authentication code wasn't delivered.", "arguments": [{ "name": "phone_number", "type": "string", "comment": "Phone number where we were supposed to receive the code" }, { "name": "phone_code_hash", "type": "string", "comment": "The phone code hash obtained from {@link auth.RawSendCodeRequest}" }, { "name": "mnc", "type": "string", "comment": "MNC of the current network operator." }], "throws": [{ "code": 400, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }], "available": "user" }, { "kind": "method", "name": "account.registerDevice", "type": "Bool", "id": 3968205178, "comment": "Register device to receive PUSH notifications", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "no_muted", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Avoid receiving (silent and invisible background) notifications. Useful to save battery." }, { "name": "token_type", "type": "int", "comment": "Device token type, see PUSH updates for the possible values." }, { "name": "token", "type": "string", "comment": "Device token, see PUSH updates for the possible values." }, { "name": "app_sandbox", "type": "Bool", "comment": "If true is transmitted, a sandbox-certificate will be used during transmission." }, { "name": "secret", "type": "bytes", "comment": "For FCM and APNS VoIP, optional encryption key used to encrypt push notifications" }, { "name": "other_uids", "type": "int53", "typeModifiers": { "isVector": true }, "comment": "List of user identifiers of other users currently using the client" }], "throws": [{ "code": 400, "name": "TOKEN_EMPTY", "comment": "The specified token is empty." }, { "code": 400, "name": "TOKEN_INVALID", "comment": "The provided token is invalid." }, { "code": 400, "name": "TOKEN_TYPE_INVALID", "comment": "The specified token type is invalid." }, { "code": 400, "name": "WEBPUSH_AUTH_INVALID", "comment": "The specified web push authentication secret is invalid." }, { "code": 400, "name": "WEBPUSH_KEY_INVALID", "comment": "The specified web push elliptic curve Diffie-Hellman public key is invalid." }, { "code": 400, "name": "WEBPUSH_TOKEN_INVALID", "comment": "The specified web push token is invalid." }], "available": "user" }, { "kind": "method", "name": "account.unregisterDevice", "type": "Bool", "id": 1779249670, "comment": "Deletes a device by its token, stops sending PUSH-notifications to it.", "arguments": [{ "name": "token_type", "type": "int", "comment": "Device token type, see PUSH updates for the possible values." }, { "name": "token", "type": "string", "comment": "Device token, see PUSH updates for the possible values." }, { "name": "other_uids", "type": "int53", "typeModifiers": { "isVector": true }, "comment": "List of user identifiers of other users currently using the client" }], "throws": [{ "code": 400, "name": "TOKEN_INVALID", "comment": "The provided token is invalid." }], "available": "user" }, { "kind": "method", "name": "account.updateNotifySettings", "type": "Bool", "id": 2227067795, "comment": "Edits notification settings from a given user/group, from all users/all groups.", "arguments": [{ "name": "peer", "type": "InputNotifyPeer", "comment": "Notification source" }, { "name": "settings", "type": "InputPeerNotifySettings", "comment": "Notification settings" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "SETTINGS_INVALID", "comment": "Invalid settings were provided." }], "available": "user" }, { "kind": "method", "name": "account.getNotifySettings", "type": "PeerNotifySettings", "typeModifiers": { "constructorId": 2573347852 }, "id": 313765169, "comment": "Gets current notification settings for a given user/group, from all users/all groups.", "arguments": [{ "name": "peer", "type": "InputNotifyPeer", "comment": "Notification source" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "account.resetNotifySettings", "type": "Bool", "id": 3682473799, "comment": "Resets all notification settings from users and groups.", "arguments": [], "available": "user" }, { "kind": "method", "name": "account.updateProfile", "type": "User", "id": 2018596725, "comment": "Updates user profile.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "first_name", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "New user first name" }, { "name": "last_name", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "New user last name" }, { "name": "about", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "New bio" }], "throws": [{ "code": 400, "name": "ABOUT_TOO_LONG", "comment": "About string too long." }, { "code": 400, "name": "FIRSTNAME_INVALID", "comment": "The first name is invalid." }], "available": "user" }, { "kind": "method", "name": "account.updateStatus", "type": "Bool", "id": 1713919532, "comment": "Updates online user status.", "arguments": [{ "name": "offline", "type": "Bool", "comment": "If true is transmitted, user status will change to {@link RawUserStatusOffline}." }], "available": "user" }, { "kind": "method", "name": "account.getWallPapers", "type": "account.WallPapers", "id": 127302966, "comment": "Returns a list of available wallpapers.", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "account.reportPeer", "type": "Bool", "id": 3317316998, "comment": "Report a peer for violation of telegram's Terms of Service", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The peer to report" }, { "name": "reason", "type": "ReportReason", "comment": "The reason why this peer is being reported" }, { "name": "message", "type": "string", "comment": "Comment for report moderation" }], "throws": [{ "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "account.checkUsername", "type": "Bool", "id": 655677548, "comment": "Validates a username and checks availability.", "arguments": [{ "name": "username", "type": "string", "comment": "username
Accepted characters: A-z (case-insensitive), 0-9 and underscores.
Length: 5-32 characters." }], "throws": [{ "code": 400, "name": "USERNAME_INVALID", "comment": "The provided username is not valid." }, { "code": 400, "name": "USERNAME_OCCUPIED", "comment": "The provided username is already occupied." }, { "code": 400, "name": "USERNAME_PURCHASE_AVAILABLE", "comment": "The specified username can be purchased on https://fragment.com." }], "available": "user" }, { "kind": "method", "name": "account.updateUsername", "type": "User", "id": 1040964988, "comment": "Changes username for the current user.", "arguments": [{ "name": "username", "type": "string", "comment": "username or empty string if username is to be removed
Accepted characters: a-z (case-insensitive), 0-9 and underscores.
Length: 5-32 characters." }], "throws": [{ "code": 400, "name": "USERNAME_INVALID", "comment": "The provided username is not valid." }, { "code": 400, "name": "USERNAME_NOT_MODIFIED", "comment": "The username was not modified." }, { "code": 400, "name": "USERNAME_OCCUPIED", "comment": "The provided username is already occupied." }, { "code": 400, "name": "USERNAME_PURCHASE_AVAILABLE", "comment": "The specified username can be purchased on https://fragment.com." }], "available": "user" }, { "kind": "method", "name": "account.getPrivacy", "type": "account.PrivacyRules", "typeModifiers": { "constructorId": 1352683077 }, "id": 3671837008, "comment": "Get privacy settings of current account", "arguments": [{ "name": "key", "type": "InputPrivacyKey", "comment": "Peer category whose privacy settings should be fetched" }], "throws": [{ "code": 400, "name": "PRIVACY_KEY_INVALID", "comment": "The privacy key is invalid." }], "available": "user" }, { "kind": "method", "name": "account.setPrivacy", "type": "account.PrivacyRules", "typeModifiers": { "constructorId": 1352683077 }, "id": 3388480744, "comment": "Change privacy settings of current account", "arguments": [{ "name": "key", "type": "InputPrivacyKey", "comment": "New privacy rule" }, { "name": "rules", "type": "InputPrivacyRule", "typeModifiers": { "isVector": true }, "comment": "Peers to which the privacy rule will apply." }], "throws": [{ "code": 400, "name": "PRIVACY_KEY_INVALID", "comment": "The privacy key is invalid." }, { "code": 400, "name": "PRIVACY_TOO_LONG", "comment": "Too many privacy rules were specified, the current limit is 1000." }, { "code": 400, "name": "PRIVACY_VALUE_INVALID", "comment": "The specified privacy rule combination is invalid." }], "available": "user" }, { "kind": "method", "name": "account.deleteAccount", "type": "Bool", "id": 2730545012, "comment": "Delete the user's account from the telegram servers.\n\nCan also be used to delete the account of a user that provided the login code, but forgot the 2FA password and no recovery method is configured, see here » for more info on password recovery, and here » for more info on account deletion.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "reason", "type": "string", "comment": "Why is the account being deleted, can be empty" }, { "name": "password", "type": "InputCheckPasswordSRP", "typeModifiers": { "predicate": "flags.0" }, "comment": "2FA password: this field can be omitted even for accounts with 2FA enabled: in this case account account deletion will be delayed by 7 days as specified in the docs »" }], "throws": [{ "code": 420, "name": "2FA_CONFIRM_WAIT_%d", "comment": "Since this account is active and protected by a 2FA password, we will delete it in 1 week for security purposes. You can cancel this process at any time, you'll be able to reset your account in %d seconds." }], "available": "user" }, { "kind": "method", "name": "account.getAccountTTL", "type": "AccountDaysTTL", "typeModifiers": { "constructorId": 3100684255 }, "id": 150761757, "comment": "Get days to live of account", "arguments": [], "available": "user" }, { "kind": "method", "name": "account.setAccountTTL", "type": "Bool", "id": 608323678, "comment": "Set account self-destruction period", "arguments": [{ "name": "ttl", "type": "AccountDaysTTL", "comment": "Time to live in days" }], "throws": [{ "code": 400, "name": "TTL_DAYS_INVALID", "comment": "The provided TTL is invalid." }], "available": "user" }, { "kind": "method", "name": "account.sendChangePhoneCode", "type": "auth.SentCode", "id": 2186758885, "comment": "Verify a new phone number to associate to the current account", "arguments": [{ "name": "phone_number", "type": "string", "comment": "New phone number" }, { "name": "settings", "type": "CodeSettings", "comment": "Phone code settings" }], "throws": [{ "code": 406, "name": "FRESH_CHANGE_PHONE_FORBIDDEN", "comment": "You can't change phone number right after logging in, please wait at least 24 hours." }, { "code": 400, "name": "PHONE_NUMBER_BANNED", "comment": "The provided phone number is banned from telegram." }, { "code": 406, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }, { "code": 400, "name": "PHONE_NUMBER_OCCUPIED", "comment": "The phone number is already in use." }], "available": "user" }, { "kind": "method", "name": "account.changePhone", "type": "User", "id": 1891839707, "comment": "Change the phone number of the current account", "arguments": [{ "name": "phone_number", "type": "string", "comment": "New phone number" }, { "name": "phone_code_hash", "type": "string", "comment": "Phone code hash received when calling {@link account.RawSendChangePhoneCodeRequest}" }, { "name": "phone_code", "type": "string", "comment": "Phone code received when calling {@link account.RawSendChangePhoneCodeRequest}" }], "throws": [{ "code": 400, "name": "PHONE_CODE_EMPTY", "comment": "phone_code is missing." }, { "code": 400, "name": "PHONE_CODE_EXPIRED", "comment": "The phone code you provided has expired." }, { "code": 406, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }, { "code": 400, "name": "PHONE_NUMBER_OCCUPIED", "comment": "The phone number is already in use." }], "available": "user" }, { "kind": "method", "name": "account.updateDeviceLocked", "type": "Bool", "id": 954152242, "comment": "When client-side passcode lock feature is enabled, will not show message texts in incoming PUSH notifications.", "arguments": [{ "name": "period", "type": "int", "comment": "Inactivity period after which to start hiding message texts in PUSH notifications." }], "available": "user" }, { "kind": "method", "name": "account.getAuthorizations", "type": "account.Authorizations", "typeModifiers": { "constructorId": 1275039392 }, "id": 3810574680, "comment": "Get logged-in sessions", "arguments": [], "available": "user" }, { "kind": "method", "name": "account.resetAuthorization", "type": "Bool", "id": 3749180348, "comment": "Log out an active authorized session by its hash", "arguments": [{ "name": "hash", "type": "long", "comment": "Session hash" }], "throws": [{ "code": 406, "name": "FRESH_RESET_AUTHORISATION_FORBIDDEN", "comment": "You can't logout other sessions if less than 24 hours have passed since you logged on the current session." }, { "code": 400, "name": "HASH_INVALID", "comment": "The provided hash is invalid." }], "available": "user" }, { "kind": "method", "name": "account.getPassword", "type": "account.Password", "typeModifiers": { "constructorId": 2507886843 }, "id": 1418342645, "comment": "Obtain configuration for two-factor authorization with password", "arguments": [], "available": "user" }, { "kind": "method", "name": "account.getPasswordSettings", "type": "account.PasswordSettings", "typeModifiers": { "constructorId": 2589733861 }, "id": 2631199481, "comment": "Get private info associated to the password info (recovery email, telegram passport info & so on)", "arguments": [{ "name": "password", "type": "InputCheckPasswordSRP", "comment": "The password (see SRP)" }], "throws": [{ "code": 400, "name": "PASSWORD_HASH_INVALID", "comment": "The provided password hash is invalid." }], "available": "user" }, { "kind": "method", "name": "account.updatePasswordSettings", "type": "Bool", "id": 2778402863, "comment": "Set a new 2FA password", "arguments": [{ "name": "password", "type": "InputCheckPasswordSRP", "comment": "The old password (see SRP)" }, { "name": "new_settings", "type": "account.PasswordInputSettings", "comment": "The new password (see SRP)" }], "throws": [{ "code": 400, "name": "EMAIL_INVALID", "comment": "The specified email is invalid." }, { "code": 400, "name": "EMAIL_UNCONFIRMED", "comment": "Email unconfirmed." }, { "code": 400, "name": "EMAIL_UNCONFIRMED_%d", "comment": "The provided email isn't confirmed, %d is the length of the verification code that was just sent to the email: use {@link account.RawVerifyEmailRequest} to enter the received verification code and enable the recovery email." }, { "code": 400, "name": "NEW_SALT_INVALID", "comment": "The new salt is invalid." }, { "code": 400, "name": "NEW_SETTINGS_EMPTY", "comment": "No password is set on the current account, and no new password was specified in new_settings." }, { "code": 400, "name": "NEW_SETTINGS_INVALID", "comment": "The new password settings are invalid." }, { "code": 400, "name": "PASSWORD_HASH_INVALID", "comment": "The provided password hash is invalid." }, { "code": 400, "name": "SRP_ID_INVALID", "comment": "Invalid SRP ID provided." }, { "code": 400, "name": "SRP_PASSWORD_CHANGED", "comment": "Password has changed." }], "available": "user" }, { "kind": "method", "name": "account.sendConfirmPhoneCode", "type": "auth.SentCode", "id": 457157256, "comment": "Send confirmation code to cancel account deletion, for more info click here »", "arguments": [{ "name": "hash", "type": "string", "comment": "The hash from the service notification, for more info click here »" }, { "name": "settings", "type": "CodeSettings", "comment": "Phone code settings" }], "throws": [{ "code": 400, "name": "HASH_INVALID", "comment": "The provided hash is invalid." }], "available": "user" }, { "kind": "method", "name": "account.confirmPhone", "type": "Bool", "id": 1596029123, "comment": "Confirm a phone number to cancel account deletion, for more info click here »", "arguments": [{ "name": "phone_code_hash", "type": "string", "comment": "Phone code hash, for more info click here »" }, { "name": "phone_code", "type": "string", "comment": "SMS code, for more info click here »" }], "throws": [{ "code": 400, "name": "CODE_HASH_INVALID", "comment": "Code hash invalid." }, { "code": 400, "name": "PHONE_CODE_EMPTY", "comment": "phone_code is missing." }], "available": "user" }, { "kind": "method", "name": "account.getTmpPassword", "type": "account.TmpPassword", "typeModifiers": { "constructorId": 3680828724 }, "id": 1151208273, "comment": "Get temporary payment password", "arguments": [{ "name": "password", "type": "InputCheckPasswordSRP", "comment": "SRP password parameters" }, { "name": "period", "type": "int", "comment": "Time during which the temporary password will be valid, in seconds; should be between 60 and 86400" }], "throws": [{ "code": 400, "name": "PASSWORD_HASH_INVALID", "comment": "The provided password hash is invalid." }, { "code": 400, "name": "TMP_PASSWORD_DISABLED", "comment": "The temporary password is disabled." }], "available": "user" }, { "kind": "method", "name": "account.getWebAuthorizations", "type": "account.WebAuthorizations", "typeModifiers": { "constructorId": 3981887996 }, "id": 405695855, "comment": "Get web login widget authorizations", "arguments": [], "available": "user" }, { "kind": "method", "name": "account.resetWebAuthorization", "type": "Bool", "id": 755087855, "comment": "Log out an active web telegram login session", "arguments": [{ "name": "hash", "type": "long", "comment": "{@link RawWebAuthorization} hash" }], "throws": [{ "code": 400, "name": "HASH_INVALID", "comment": "The provided hash is invalid." }], "available": "user" }, { "kind": "method", "name": "account.resetWebAuthorizations", "type": "Bool", "id": 1747789204, "comment": "Reset all active web telegram login sessions", "arguments": [], "available": "user" }, { "kind": "method", "name": "account.getAllSecureValues", "type": "SecureValue", "typeModifiers": { "isVector": true, "constructorId": 411017418 }, "id": 2995305597, "comment": "Get all saved Telegram Passport documents, for more info see the passport docs »", "arguments": [], "available": "user" }, { "kind": "method", "name": "account.getSecureValue", "type": "SecureValue", "typeModifiers": { "isVector": true, "constructorId": 411017418 }, "id": 1936088002, "comment": "Get saved Telegram Passport document, for more info see the passport docs »", "arguments": [{ "name": "types", "type": "SecureValueType", "typeModifiers": { "isVector": true }, "comment": "Requested value types" }], "available": "user" }, { "kind": "method", "name": "account.saveSecureValue", "type": "SecureValue", "typeModifiers": { "constructorId": 411017418 }, "id": 2308956957, "comment": "Securely save Telegram Passport document, for more info see the passport docs »", "arguments": [{ "name": "value", "type": "InputSecureValue", "comment": "Secure value, for more info see the passport docs »" }, { "name": "secure_secret_id", "type": "long", "comment": "Passport secret hash, for more info see the passport docs »" }], "throws": [{ "code": 400, "name": "PASSWORD_REQUIRED", "comment": "A 2FA password must be configured to use Telegram Passport." }, { "code": 400, "name": "SECURE_SECRET_REQUIRED", "comment": "A secure secret is required." }], "available": "user" }, { "kind": "method", "name": "account.deleteSecureValue", "type": "Bool", "id": 3095444555, "comment": "Delete stored Telegram Passport documents, for more info see the passport docs »", "arguments": [{ "name": "types", "type": "SecureValueType", "typeModifiers": { "isVector": true }, "comment": "Document types to delete" }], "available": "user" }, { "kind": "method", "name": "account.getAuthorizationForm", "type": "account.AuthorizationForm", "typeModifiers": { "constructorId": 2905480408 }, "id": 2838059386, "comment": "Returns a Telegram Passport authorization form for sharing data with a service", "arguments": [{ "name": "bot_id", "type": "int53", "comment": "User identifier of the service's bot" }, { "name": "scope", "type": "string", "comment": "Telegram Passport element types requested by the service" }, { "name": "public_key", "type": "string", "comment": "Service's public key" }], "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }, { "code": 400, "name": "PUBLIC_KEY_REQUIRED", "comment": "A public key is required." }], "available": "user" }, { "kind": "method", "name": "account.acceptAuthorization", "type": "Bool", "id": 4092415091, "comment": "Sends a Telegram Passport authorization form, effectively sharing data with the service", "arguments": [{ "name": "bot_id", "type": "int53", "comment": "Bot ID" }, { "name": "scope", "type": "string", "comment": "Telegram Passport element types requested by the service" }, { "name": "public_key", "type": "string", "comment": "Service's public key" }, { "name": "value_hashes", "type": "SecureValueHash", "typeModifiers": { "isVector": true }, "comment": "Types of values sent and their hashes" }, { "name": "credentials", "type": "SecureCredentialsEncrypted", "comment": "Encrypted values" }], "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }, { "code": 400, "name": "PUBLIC_KEY_REQUIRED", "comment": "A public key is required." }], "available": "user" }, { "kind": "method", "name": "account.sendVerifyPhoneCode", "type": "auth.SentCode", "id": 2778945273, "comment": "Send the verification phone code for telegram passport.", "arguments": [{ "name": "phone_number", "type": "string", "comment": "The phone number to verify" }, { "name": "settings", "type": "CodeSettings", "comment": "Phone code settings" }], "throws": [{ "code": 400, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }], "available": "user" }, { "kind": "method", "name": "account.verifyPhone", "type": "Bool", "id": 1305716726, "comment": "Verify a phone number for telegram passport.", "arguments": [{ "name": "phone_number", "type": "string", "comment": "Phone number" }, { "name": "phone_code_hash", "type": "string", "comment": "Phone code hash received from the call to {@link account.RawSendVerifyPhoneCodeRequest}" }, { "name": "phone_code", "type": "string", "comment": "Code received after the call to {@link account.RawSendVerifyPhoneCodeRequest}" }], "throws": [{ "code": 400, "name": "PHONE_CODE_EMPTY", "comment": "phone_code is missing." }, { "code": 400, "name": "PHONE_CODE_EXPIRED", "comment": "The phone code you provided has expired." }, { "code": 400, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }], "available": "user" }, { "kind": "method", "name": "account.sendVerifyEmailCode", "type": "account.SentEmailCode", "typeModifiers": { "constructorId": 2166326607 }, "id": 2564831163, "comment": "Send an email verification code.", "arguments": [{ "name": "purpose", "type": "EmailVerifyPurpose", "comment": "Verification purpose." }, { "name": "email", "type": "string", "comment": "The email where to send the code." }], "throws": [{ "code": 400, "name": "EMAIL_INVALID", "comment": "The specified email is invalid." }, { "code": 400, "name": "EMAIL_NOT_ALLOWED", "comment": "The specified email cannot be used to complete the operation." }, { "code": 400, "name": "EMAIL_NOT_SETUP", "comment": "In order to change the login email with emailVerifyPurposeLoginChange, an existing login email must already be set using emailVerifyPurposeLoginSetup." }, { "code": 400, "name": "PHONE_HASH_EXPIRED", "comment": "An invalid or expired phone_code_hash was provided." }, { "code": 400, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }], "available": "user" }, { "kind": "method", "name": "account.verifyEmail", "type": "account.EmailVerified", "id": 53322959, "comment": "Verify an email address.", "arguments": [{ "name": "purpose", "type": "EmailVerifyPurpose", "comment": "Verification purpose" }, { "name": "verification", "type": "EmailVerification", "comment": "Email verification code or token" }], "throws": [{ "code": 400, "name": "EMAIL_INVALID", "comment": "The specified email is invalid." }, { "code": 400, "name": "EMAIL_NOT_ALLOWED", "comment": "The specified email cannot be used to complete the operation." }, { "code": 400, "name": "EMAIL_VERIFY_EXPIRED", "comment": "The verification email has expired." }, { "code": 400, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }], "available": "user" }, { "kind": "method", "name": "account.initTakeoutSession", "type": "account.Takeout", "typeModifiers": { "constructorId": 1304052993 }, "id": 2398350000, "comment": "Initialize a takeout session, see here » for more info.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "contacts", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to export contacts" }, { "name": "message_users", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether to export messages in private chats" }, { "name": "message_chats", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether to export messages in basic groups" }, { "name": "message_megagroups", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether to export messages in supergroups" }, { "name": "message_channels", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "Whether to export messages in channels" }, { "name": "files", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Whether to export files" }, { "name": "file_max_size", "type": "int53", "typeModifiers": { "predicate": "flags.5" }, "comment": "Maximum size of files to export" }], "throws": [{ "code": 420, "name": "TAKEOUT_INIT_DELAY_%d", "comment": "Sorry, for security reasons, you will be able to begin downloading your data in %d seconds. We have notified all your devices about the export request to make sure it's authorized and to give you time to react if it's not." }], "available": "user" }, { "kind": "method", "name": "account.finishTakeoutSession", "type": "Bool", "id": 489050862, "comment": "Terminate a takeout session, see here » for more info.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "success", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Data exported successfully" }], "throws": [{ "code": 403, "name": "TAKEOUT_REQUIRED", "comment": "A takeout session needs to be initialized first, see here » for more info." }], "available": "user" }, { "kind": "method", "name": "account.confirmPasswordEmail", "type": "Bool", "id": 2413762848, "comment": "Verify an email to use as 2FA recovery method.", "arguments": [{ "name": "code", "type": "string", "comment": "The phone code that was received after setting a recovery email" }], "throws": [{ "code": 400, "name": "CODE_INVALID", "comment": "Code invalid." }, { "code": 400, "name": "EMAIL_HASH_EXPIRED", "comment": "Email hash expired." }], "available": "user" }, { "kind": "method", "name": "account.resendPasswordEmail", "type": "Bool", "id": 2055154197, "comment": "Resend the code to verify an email to use as 2FA recovery method.", "arguments": [], "throws": [{ "code": 400, "name": "EMAIL_HASH_EXPIRED", "comment": "Email hash expired." }], "available": "user" }, { "kind": "method", "name": "account.cancelPasswordEmail", "type": "Bool", "id": 3251361206, "comment": "Cancel the code that was sent to verify an email to use as 2FA recovery method.", "arguments": [], "throws": [{ "code": 400, "name": "EMAIL_HASH_EXPIRED", "comment": "Email hash expired." }], "available": "user" }, { "kind": "method", "name": "account.getContactSignUpNotification", "type": "Bool", "id": 2668087080, "comment": "Whether the user will receive notifications when contacts sign up", "arguments": [], "available": "user" }, { "kind": "method", "name": "account.setContactSignUpNotification", "type": "Bool", "id": 3488890721, "comment": "Toggle contact sign up notifications", "arguments": [{ "name": "silent", "type": "Bool", "comment": "Whether to disable contact sign up notifications" }], "available": "user" }, { "kind": "method", "name": "account.getNotifyExceptions", "type": "Updates", "id": 1398240377, "comment": "Returns list of chats with non-default notification settings", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "compare_sound", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "If set, chats with non-default sound will be returned" }, { "name": "compare_stories", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "If set, chats with non-default notification settings for stories will be returned" }, { "name": "peer", "type": "InputNotifyPeer", "typeModifiers": { "predicate": "flags.0" }, "comment": "If specified, only chats of the specified category will be returned" }], "available": "user" }, { "kind": "method", "name": "account.getWallPaper", "type": "WallPaper", "id": 4237155306, "comment": "Get info about a certain wallpaper", "arguments": [{ "name": "wallpaper", "type": "InputWallPaper", "comment": "The wallpaper to get info about" }], "throws": [{ "code": 400, "name": "WALLPAPER_INVALID", "comment": "The specified wallpaper is invalid." }], "available": "user" }, { "kind": "method", "name": "account.uploadWallPaper", "type": "WallPaper", "id": 3818557187, "comment": "Create and upload a new wallpaper", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "for_chat", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Set this flag when uploading wallpapers to be passed to {@link messages.RawSetChatWallPaperRequest}." }, { "name": "file", "type": "InputFile", "comment": "The JPG/PNG wallpaper" }, { "name": "mime_type", "type": "string", "comment": "MIME type of uploaded wallpaper" }, { "name": "settings", "type": "WallPaperSettings", "comment": "Wallpaper settings" }], "throws": [{ "code": 400, "name": "WALLPAPER_FILE_INVALID", "comment": "The specified wallpaper file is invalid." }, { "code": 400, "name": "WALLPAPER_MIME_INVALID", "comment": "The specified wallpaper MIME type is invalid." }], "available": "user" }, { "kind": "method", "name": "account.saveWallPaper", "type": "Bool", "id": 1817860919, "comment": "Install/uninstall wallpaper", "arguments": [{ "name": "wallpaper", "type": "InputWallPaper", "comment": "Wallpaper to install or uninstall" }, { "name": "unsave", "type": "Bool", "comment": "Uninstall wallpaper?" }, { "name": "settings", "type": "WallPaperSettings", "comment": "Wallpaper settings" }], "throws": [{ "code": 400, "name": "WALLPAPER_INVALID", "comment": "The specified wallpaper is invalid." }], "available": "user" }, { "kind": "method", "name": "account.installWallPaper", "type": "Bool", "id": 4276967273, "comment": "Install wallpaper", "arguments": [{ "name": "wallpaper", "type": "InputWallPaper", "comment": "Wallpaper to install" }, { "name": "settings", "type": "WallPaperSettings", "comment": "Wallpaper settings" }], "throws": [{ "code": 400, "name": "WALLPAPER_INVALID", "comment": "The specified wallpaper is invalid." }], "available": "user" }, { "kind": "method", "name": "account.resetWallPapers", "type": "Bool", "id": 3141244932, "comment": "Delete all installed wallpapers, reverting to the default wallpaper set.", "arguments": [], "available": "user" }, { "kind": "method", "name": "account.getAutoDownloadSettings", "type": "account.AutoDownloadSettings", "typeModifiers": { "constructorId": 1674235686 }, "id": 1457130303, "comment": "Get media autodownload settings", "arguments": [], "available": "user" }, { "kind": "method", "name": "account.saveAutoDownloadSettings", "type": "Bool", "id": 1995661875, "comment": "Change media autodownload settings", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "low", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to save media in the low data usage preset" }, { "name": "high", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether to save media in the high data usage preset" }, { "name": "settings", "type": "AutoDownloadSettings", "comment": "Media autodownload settings" }], "available": "user" }, { "kind": "method", "name": "account.uploadTheme", "type": "Document", "id": 473805619, "comment": "Upload theme", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "file", "type": "InputFile", "comment": "Previously uploaded theme file with platform-specific colors for UI components, can be left unset when creating themes that only modify the wallpaper or accent colors." }, { "name": "thumb", "type": "InputFile", "typeModifiers": { "predicate": "flags.0" }, "comment": "Thumbnail" }, { "name": "file_name", "type": "string", "comment": "File name" }, { "name": "mime_type", "type": "string", "comment": "MIME type, must be application/x-tgtheme-{format}, where format depends on the client" }], "throws": [{ "code": 400, "name": "THEME_FILE_INVALID", "comment": "Invalid theme file provided." }, { "code": 400, "name": "THEME_MIME_INVALID", "comment": "The theme's MIME type is invalid." }], "available": "user" }, { "kind": "method", "name": "account.createTheme", "type": "Theme", "typeModifiers": { "constructorId": 2685298646 }, "id": 1697530880, "comment": "Create a theme", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "slug", "type": "string", "comment": "Unique theme ID used to generate theme deep links, can be empty to autogenerate a random ID." }, { "name": "title", "type": "string", "comment": "Theme name" }, { "name": "document", "type": "InputDocument", "typeModifiers": { "predicate": "flags.2" }, "comment": "Theme file" }, { "name": "settings", "type": "InputThemeSettings", "typeModifiers": { "predicate": "flags.3", "isVector": true }, "comment": "Theme settings, multiple values can be provided for the different base themes (day/night mode, etc)." }], "throws": [{ "code": 400, "name": "THEME_MIME_INVALID", "comment": "The theme's MIME type is invalid." }, { "code": 400, "name": "THEME_TITLE_INVALID", "comment": "The specified theme title is invalid." }], "available": "user" }, { "kind": "method", "name": "account.updateTheme", "type": "Theme", "typeModifiers": { "constructorId": 2685298646 }, "id": 737414348, "comment": "Update theme", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "format", "type": "string", "comment": "Theme format, a string that identifies the theming engines supported by the client" }, { "name": "theme", "type": "InputTheme", "comment": "Theme to update" }, { "name": "slug", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Unique theme ID" }, { "name": "title", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Theme name" }, { "name": "document", "type": "InputDocument", "typeModifiers": { "predicate": "flags.2" }, "comment": "Theme file" }, { "name": "settings", "type": "InputThemeSettings", "typeModifiers": { "predicate": "flags.3", "isVector": true }, "comment": "Theme settings" }], "throws": [{ "code": 400, "name": "THEME_INVALID", "comment": "Invalid theme provided." }], "available": "user" }, { "kind": "method", "name": "account.saveTheme", "type": "Bool", "id": 4065792108, "comment": "Save a theme", "arguments": [{ "name": "theme", "type": "InputTheme", "comment": "Theme to save" }, { "name": "unsave", "type": "Bool", "comment": "Unsave" }], "throws": [{ "code": 400, "name": "THEME_INVALID", "comment": "Invalid theme provided." }], "available": "user" }, { "kind": "method", "name": "account.installTheme", "type": "Bool", "id": 3341269819, "comment": "Install a theme", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "dark", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to install the dark version" }, { "name": "theme", "type": "InputTheme", "typeModifiers": { "predicate": "flags.1" }, "comment": "Theme to install" }, { "name": "format", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "Theme format, a string that identifies the theming engines supported by the client" }, { "name": "base_theme", "type": "BaseTheme", "typeModifiers": { "predicate": "flags.3" }, "comment": "Indicates a basic theme provided by all clients" }], "available": "user" }, { "kind": "method", "name": "account.getTheme", "type": "Theme", "typeModifiers": { "constructorId": 2685298646 }, "id": 978872812, "comment": "Get theme information", "arguments": [{ "name": "format", "type": "string", "comment": "Theme format, a string that identifies the theming engines supported by the client" }, { "name": "theme", "type": "InputTheme", "comment": "Theme" }], "throws": [{ "code": 400, "name": "THEME_FORMAT_INVALID", "comment": "Invalid theme format provided." }, { "code": 400, "name": "THEME_INVALID", "comment": "Invalid theme provided." }], "available": "user" }, { "kind": "method", "name": "account.getThemes", "type": "account.Themes", "id": 1913054296, "comment": "Get installed themes", "arguments": [{ "name": "format", "type": "string", "comment": "Theme format, a string that identifies the theming engines supported by the client" }, { "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "account.setContentSettings", "type": "Bool", "id": 3044323691, "comment": "Set sensitive content settings (for viewing or hiding NSFW content)", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "sensitive_enabled", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Enable NSFW content" }], "throws": [{ "code": 403, "name": "SENSITIVE_CHANGE_FORBIDDEN", "comment": "You can't change your sensitive content settings." }], "available": "user" }, { "kind": "method", "name": "account.getContentSettings", "type": "account.ContentSettings", "typeModifiers": { "constructorId": 1474462241 }, "id": 2342210990, "comment": "Get sensitive content settings", "arguments": [], "available": "user" }, { "kind": "method", "name": "account.getMultiWallPapers", "type": "WallPaper", "typeModifiers": { "isVector": true }, "id": 1705865692, "comment": "Get info about multiple wallpapers", "arguments": [{ "name": "wallpapers", "type": "InputWallPaper", "typeModifiers": { "isVector": true }, "comment": "Wallpapers to fetch info about" }], "throws": [{ "code": 400, "name": "WALLPAPER_INVALID", "comment": "The specified wallpaper is invalid." }], "available": "user" }, { "kind": "method", "name": "account.getGlobalPrivacySettings", "type": "GlobalPrivacySettings", "typeModifiers": { "constructorId": 1934380235 }, "id": 3945483510, "comment": "Get global privacy settings", "arguments": [], "available": "user" }, { "kind": "method", "name": "account.setGlobalPrivacySettings", "type": "GlobalPrivacySettings", "typeModifiers": { "constructorId": 1934380235 }, "id": 517647042, "comment": "Set global privacy settings", "arguments": [{ "name": "settings", "type": "GlobalPrivacySettings", "comment": "Global privacy settings" }], "throws": [{ "code": 400, "name": "AUTOARCHIVE_NOT_AVAILABLE", "comment": "The autoarchive setting is not available at this time: please check the value of the autoarchive_setting_available field in client config » before calling this method." }, { "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }], "available": "user" }, { "kind": "method", "name": "account.reportProfilePhoto", "type": "Bool", "id": 4203529973, "comment": "Report a profile photo of a dialog", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The dialog" }, { "name": "photo_id", "type": "InputPhoto", "comment": "Dialog photo ID" }, { "name": "reason", "type": "ReportReason", "comment": "Report reason" }, { "name": "message", "type": "string", "comment": "Comment for report moderation" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "account.resetPassword", "type": "account.ResetPasswordResult", "id": 2466827803, "comment": "Initiate a 2FA password reset: can only be used if the user is already logged-in, see here for more info »", "arguments": [], "throws": [{ "code": 400, "name": "PASSWORD_EMPTY", "comment": "The provided password is empty." }], "available": "user" }, { "kind": "method", "name": "account.declinePasswordReset", "type": "Bool", "id": 1284770294, "comment": "Abort a pending 2FA password reset, see here for more info »", "arguments": [], "throws": [{ "code": 400, "name": "RESET_REQUEST_MISSING", "comment": "No password reset is in progress." }], "available": "user" }, { "kind": "method", "name": "account.getChatThemes", "type": "account.Themes", "id": 3594051209, "comment": "Get all available chat themes ».", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "account.setAuthorizationTTL", "type": "Bool", "id": 3213466272, "comment": "Set time-to-live of current session", "arguments": [{ "name": "authorization_ttl_days", "type": "int", "comment": "Time-to-live of current session in days" }], "throws": [{ "code": 406, "name": "FRESH_RESET_AUTHORISATION_FORBIDDEN", "comment": "You can't logout other sessions if less than 24 hours have passed since you logged on the current session." }, { "code": 400, "name": "TTL_DAYS_INVALID", "comment": "The provided TTL is invalid." }], "available": "user" }, { "kind": "method", "name": "account.changeAuthorizationSettings", "type": "Bool", "id": 1089766498, "comment": "Change settings related to a session.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "confirmed", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "If set, confirms a newly logged in session »." }, { "name": "hash", "type": "long", "comment": "Session ID from the {@link RawAuthorization} constructor, fetchable using {@link account.RawGetAuthorizationsRequest}" }, { "name": "encrypted_requests_disabled", "type": "Bool", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to enable or disable receiving encrypted chats: if the flag is not set, the previous setting is not changed" }, { "name": "call_requests_disabled", "type": "Bool", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether to enable or disable receiving calls: if the flag is not set, the previous setting is not changed" }], "throws": [{ "code": 400, "name": "HASH_INVALID", "comment": "The provided hash is invalid." }], "available": "user" }, { "kind": "method", "name": "account.getSavedRingtones", "type": "account.SavedRingtones", "id": 3784319624, "comment": "Fetch saved notification sounds", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "account.saveRingtone", "type": "account.SavedRingtone", "id": 1038768899, "comment": "Save or remove saved notification sound.\n\nIf the notification sound is already in MP3 format, {@link account.RawSavedRingtone} will be returned.
\nOtherwise, it will be automatically converted and a {@link account.RawSavedRingtoneConverted} will be returned, containing a new {@link RawDocument} object that should be used to refer to the ringtone from now on (ie when deleting it using the unsave parameter, or when downloading it).", "arguments": [{ "name": "id", "type": "InputDocument", "comment": "Notification sound uploaded using {@link account.RawUploadRingtoneRequest}" }, { "name": "unsave", "type": "Bool", "comment": "Whether to add or delete the notification sound" }], "throws": [{ "code": 400, "name": "RINGTONE_INVALID", "comment": "The specified ringtone is invalid." }], "available": "user" }, { "kind": "method", "name": "account.uploadRingtone", "type": "Document", "id": 2199552930, "comment": "Upload notification sound, use {@link account.RawSaveRingtoneRequest} to convert it and add it to the list of saved notification sounds.", "arguments": [{ "name": "file", "type": "InputFile", "comment": "Notification sound" }, { "name": "file_name", "type": "string", "comment": "File name" }, { "name": "mime_type", "type": "string", "comment": "MIME type of file" }], "throws": [{ "code": 400, "name": "RINGTONE_MIME_INVALID", "comment": "The MIME type for the ringtone is invalid." }], "available": "user" }, { "kind": "method", "name": "account.updateEmojiStatus", "type": "Bool", "id": 4224966251, "comment": "Set an emoji status", "arguments": [{ "name": "emoji_status", "type": "EmojiStatus", "comment": "Emoji status to set" }], "throws": [{ "code": 400, "name": "DOCUMENT_INVALID", "comment": "The specified document is invalid." }], "available": "user" }, { "kind": "method", "name": "account.getDefaultEmojiStatuses", "type": "account.EmojiStatuses", "id": 3598005126, "comment": "Get a list of default suggested emoji statuses", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "account.getRecentEmojiStatuses", "type": "account.EmojiStatuses", "id": 257392901, "comment": "Get recently used emoji statuses", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "account.clearRecentEmojiStatuses", "type": "Bool", "id": 404757166, "comment": "Clears list of recently used emoji statuses", "arguments": [], "available": "user" }, { "kind": "method", "name": "account.reorderUsernames", "type": "Bool", "id": 4015001259, "comment": "Reorder usernames associated with the currently logged-in user.", "arguments": [{ "name": "order", "type": "string", "typeModifiers": { "isVector": true }, "comment": "The new order for active usernames. All active usernames must be specified." }], "throws": [{ "code": 400, "name": "ORDER_INVALID", "comment": "The specified username order is invalid." }, { "code": 400, "name": "USERNAME_NOT_MODIFIED", "comment": "The username was not modified." }], "available": "user" }, { "kind": "method", "name": "account.toggleUsername", "type": "Bool", "id": 1490465654, "comment": "Activate or deactivate a purchased fragment.com username associated to the currently logged-in user.", "arguments": [{ "name": "username", "type": "string", "comment": "Username" }, { "name": "active", "type": "Bool", "comment": "Whether to activate or deactivate it" }], "throws": [{ "code": 400, "name": "USERNAMES_ACTIVE_TOO_MUCH", "comment": "The maximum number of active usernames was reached." }, { "code": 400, "name": "USERNAME_INVALID", "comment": "The provided username is not valid." }, { "code": 400, "name": "USERNAME_NOT_MODIFIED", "comment": "The username was not modified." }], "available": "user" }, { "kind": "method", "name": "account.getDefaultProfilePhotoEmojis", "type": "EmojiList", "id": 3799319336, "comment": "Get a set of suggested custom emoji stickers that can be used as profile picture", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "account.getDefaultGroupPhotoEmojis", "type": "EmojiList", "id": 2438488238, "comment": "Get a set of suggested custom emoji stickers that can be used as group picture", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "account.getAutoSaveSettings", "type": "account.AutoSaveSettings", "typeModifiers": { "constructorId": 1279133341 }, "id": 2915810522, "comment": "Get autosave settings", "arguments": [], "available": "user" }, { "kind": "method", "name": "account.saveAutoSaveSettings", "type": "Bool", "id": 3600515937, "comment": "Modify autosave settings", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "users", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the new settings should affect all private chats" }, { "name": "chats", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the new settings should affect all groups" }, { "name": "broadcasts", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether the new settings should affect all channels" }, { "name": "peer", "type": "InputPeer", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether the new settings should affect a specific peer" }, { "name": "settings", "type": "AutoSaveSettings", "comment": "The new autosave settings" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "account.deleteAutoSaveExceptions", "type": "Bool", "id": 1404829728, "comment": "Clear all peer-specific autosave settings.", "arguments": [], "available": "user" }, { "kind": "method", "name": "account.invalidateSignInCodes", "type": "Bool", "id": 3398101178, "comment": "Invalidate the specified login codes, see here » for more info.", "arguments": [{ "name": "codes", "type": "string", "typeModifiers": { "isVector": true }, "comment": "The login codes to invalidate." }], "available": "user" }, { "kind": "method", "name": "account.updateColor", "type": "Bool", "id": 2096079197, "comment": "Update the accent color and background custom emoji » of the current account.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "for_profile", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether to change the accent color emoji pattern of the profile page; otherwise, the accent color and emoji pattern of messages will be changed." }, { "name": "color", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "ID of the accent color palette » to use (not RGB24, see here » for more info)." }, { "name": "background_emoji_id", "type": "long", "typeModifiers": { "predicate": "flags.0" }, "comment": "Custom emoji ID used in the accent color pattern." }], "throws": [{ "code": 400, "name": "COLOR_INVALID", "comment": "The specified color palette ID was invalid." }, { "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }], "available": "user" }, { "kind": "method", "name": "account.getDefaultBackgroundEmojis", "type": "EmojiList", "id": 2785720782, "comment": "Get a set of suggested custom emoji stickers that can be used in an accent color pattern.", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "account.getChannelDefaultEmojiStatuses", "type": "account.EmojiStatuses", "id": 1999087573, "comment": "Get a list of default suggested channel emoji statuses.", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "account.getChannelRestrictedStatusEmojis", "type": "EmojiList", "id": 900325589, "comment": "Returns fetch the full list of custom emoji IDs » that cannot be used in channel emoji statuses ».", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "account.updateBusinessWorkHours", "type": "Bool", "id": 1258348646, "comment": "Specify a set of Telegram Business opening hours.
\nThis info will be contained in {@link RawUserFull}.business_work_hours.\n\nTo remove all opening hours, invoke the method without setting the business_work_hours field.\n\nNote that the opening hours specified by the user must be appropriately validated and transformed before invoking the method, as specified here ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "business_work_hours", "type": "BusinessWorkHours", "typeModifiers": { "predicate": "flags.0" }, "comment": "Opening hours (optional, if not set removes all opening hours)." }], "throws": [{ "code": 400, "name": "BUSINESS_WORK_HOURS_EMPTY", "comment": "No work hours were specified." }, { "code": 400, "name": "BUSINESS_WORK_HOURS_PERIOD_INVALID", "comment": "The specified work hours are invalid, see here » for the exact requirements." }, { "code": 400, "name": "TIMEZONE_INVALID", "comment": "The specified timezone does not exist." }], "available": "user" }, { "kind": "method", "name": "account.updateBusinessLocation", "type": "Bool", "id": 2657817370, "comment": "Businesses » may advertise their location using this method, see here » for more info.\n\nTo remove business location information invoke the method without setting any of the parameters.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "geo_point", "type": "InputGeoPoint", "typeModifiers": { "predicate": "flags.1" }, "comment": "Optional, contains a set of geographical coordinates." }, { "name": "address", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Mandatory when setting/updating the location, contains a textual description of the address (max 96 UTF-8 chars)." }], "available": "user" }, { "kind": "method", "name": "account.updateBusinessGreetingMessage", "type": "Bool", "id": 1724755908, "comment": "Set a list of Telegram Business greeting messages.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "message", "type": "InputBusinessGreetingMessage", "typeModifiers": { "predicate": "flags.0" }, "comment": "Greeting message configuration and contents." }], "available": "user" }, { "kind": "method", "name": "account.updateBusinessAwayMessage", "type": "Bool", "id": 2724888485, "comment": "Set a list of Telegram Business away messages.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "message", "type": "InputBusinessAwayMessage", "typeModifiers": { "predicate": "flags.0" }, "comment": "Away message configuration and contents." }], "available": "user" }, { "kind": "method", "name": "account.updateConnectedBot", "type": "Updates", "id": 1138250269, "comment": "Connect a business bot » to the current account, or to change the current connection settings.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "can_reply", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the bot can reply to messages it receives from us, on behalf of us using the business connection." }, { "name": "deleted", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether to fully disconnect the bot from the current account." }, { "name": "bot", "type": "InputUser", "comment": "The bot to connect or disconnect" }, { "name": "recipients", "type": "InputBusinessBotRecipients", "comment": "Configuration for the business connection" }], "throws": [{ "code": 400, "name": "BOT_BUSINESS_MISSING", "comment": "The specified bot is not a business bot (the {@link RawUser}.bot_business flag is not set)." }, { "code": 400, "name": "BUSINESS_RECIPIENTS_EMPTY", "comment": "You didn't set any flag in inputBusinessBotRecipients, thus the bot cannot work with any peer." }, { "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }], "available": "user" }, { "kind": "method", "name": "account.getConnectedBots", "type": "account.ConnectedBots", "typeModifiers": { "constructorId": 400029819 }, "id": 1319421967, "comment": "List all currently connected business bots »", "arguments": [], "available": "user" }, { "kind": "method", "name": "account.getBotBusinessConnection", "type": "Updates", "id": 1990746736, "comment": "Bots may invoke this method to re-fetch the {@link RawUpdateBotBusinessConnect} constructor associated with a specific business connection_id, see here » for more info on connected business bots.
\nThis is needed for example for freshly logged in bots that are receiving some {@link RawUpdateBotNewBusinessMessage}, etc. updates because some users have already connected to the bot before it could login.
\nIn this case, the bot is receiving messages from the business connection, but it hasn't cached the associated {@link RawUpdateBotBusinessConnect} with info about the connection (can it reply to messages? etc.) yet, and cannot receive the old ones because they were sent when the bot wasn't logged into the session yet.
\nThis method can be used to fetch info about a not-yet-cached business connection, and should not be invoked if the info is already cached or to fetch changes, as eventual changes will automatically be sent as new {@link RawUpdateBotBusinessConnect} updates to the bot using the usual update delivery methods ».", "arguments": [{ "name": "connection_id", "type": "string", "comment": "Business connection ID »." }], "throws": [{ "code": 400, "name": "CONNECTION_ID_INVALID", "comment": "The specified connection ID is invalid." }], "available": "both" }, { "kind": "method", "name": "account.updateBusinessIntro", "type": "Bool", "id": 2786381876, "comment": "Set or remove the Telegram Business introduction ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "intro", "type": "InputBusinessIntro", "typeModifiers": { "predicate": "flags.0" }, "comment": "Telegram Business introduction, to remove it call the method without setting this flag." }], "available": "user" }, { "kind": "method", "name": "account.toggleConnectedBotPaused", "type": "Bool", "id": 1684934807, "comment": "Pause or unpause a specific chat, temporarily disconnecting it from all business bots ».", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The chat to pause" }, { "name": "paused", "type": "Bool", "comment": "Whether to pause or unpause the chat" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "account.disablePeerConnectedBot", "type": "Bool", "id": 1581481689, "comment": "Permanently disconnect a specific chat from all business bots » (equivalent to specifying it in recipients.exclude_users during initial configuration with {@link account.RawUpdateConnectedBotRequest}); to reconnect of a chat disconnected using this method the user must reconnect the entire bot by invoking {@link account.RawUpdateConnectedBotRequest}.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The chat to disconnect" }], "throws": [{ "code": 400, "name": "BOT_ALREADY_DISABLED", "comment": "The connected business bot was already disabled for the specified peer." }, { "code": 400, "name": "BOT_NOT_CONNECTED_YET", "comment": "No business bot is connected to the currently logged in user." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "account.updateBirthday", "type": "Bool", "id": 3429764113, "comment": "Update our birthday, see here » for more info.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "birthday", "type": "Birthday", "typeModifiers": { "predicate": "flags.0" }, "comment": "Birthday." }], "throws": [{ "code": 400, "name": "BIRTHDAY_INVALID", "comment": "An invalid age was specified, must be between 0 and 150 years." }], "available": "user" }, { "kind": "method", "name": "account.createBusinessChatLink", "type": "BusinessChatLink", "typeModifiers": { "constructorId": 3031328367 }, "id": 2287068814, "comment": "Create a business chat deep link ».", "arguments": [{ "name": "link", "type": "InputBusinessChatLink", "comment": "Info about the link to create." }], "throws": [{ "code": 400, "name": "CHATLINKS_TOO_MUCH", "comment": "Too many business chat links were created, please delete some older links." }, { "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }], "available": "user" }, { "kind": "method", "name": "account.editBusinessChatLink", "type": "BusinessChatLink", "typeModifiers": { "constructorId": 3031328367 }, "id": 2352222383, "comment": "Edit a created business chat deep link ».", "arguments": [{ "name": "slug", "type": "string", "comment": "Slug of the link, obtained as specified here »." }, { "name": "link", "type": "InputBusinessChatLink", "comment": "New link information." }], "throws": [{ "code": 400, "name": "CHATLINK_SLUG_EMPTY", "comment": "The specified slug is empty." }, { "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }], "available": "user" }, { "kind": "method", "name": "account.deleteBusinessChatLink", "type": "Bool", "id": 1611085428, "comment": "Delete a business chat deep link ».", "arguments": [{ "name": "slug", "type": "string", "comment": "Slug of the link, obtained as specified here »." }], "throws": [{ "code": 400, "name": "CHATLINK_SLUG_EMPTY", "comment": "The specified slug is empty." }, { "code": 400, "name": "CHATLINK_SLUG_EXPIRED", "comment": "The specified business chat link has expired." }], "available": "user" }, { "kind": "method", "name": "account.getBusinessChatLinks", "type": "account.BusinessChatLinks", "typeModifiers": { "constructorId": 3963855569 }, "id": 1869667809, "comment": "List all created business chat deep links ».", "arguments": [], "available": "user" }, { "kind": "method", "name": "account.resolveBusinessChatLink", "type": "account.ResolvedBusinessChatLinks", "typeModifiers": { "constructorId": 2586029857 }, "id": 1418913262, "comment": "Resolve a business chat deep link ».", "arguments": [{ "name": "slug", "type": "string", "comment": "Slug of the link, obtained as specified here »." }], "throws": [{ "code": 400, "name": "CHATLINK_SLUG_EMPTY", "comment": "The specified slug is empty." }, { "code": 400, "name": "CHATLINK_SLUG_EXPIRED", "comment": "The specified business chat link has expired." }], "available": "user" }, { "kind": "method", "name": "account.updatePersonalChannel", "type": "Bool", "id": 3645048288, "comment": "Associate (or remove) a personal channel », that will be listed on our personal profile page ».\n\nChanging it will emit an {@link RawUpdateUser} update.", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "The channel, pass {@link RawInputChannelEmpty} to remove it." }], "available": "user" }, { "kind": "method", "name": "account.toggleSponsoredMessages", "type": "Bool", "id": 3118048141, "comment": "Disable or re-enable Telegram ads for the current Premium account.\n\nUseful for business owners that may want to launch and view their own Telegram ads via the Telegram ad platform ».", "arguments": [{ "name": "enabled", "type": "Bool", "comment": "Enable or disable ads." }], "available": "user" }, { "kind": "method", "name": "account.getReactionsNotifySettings", "type": "ReactionsNotifySettings", "typeModifiers": { "constructorId": 1457736048 }, "id": 115172684, "comment": "Get the current reaction notification settings ».", "arguments": [], "available": "user" }, { "kind": "method", "name": "account.setReactionsNotifySettings", "type": "ReactionsNotifySettings", "typeModifiers": { "constructorId": 1457736048 }, "id": 829220168, "comment": "Change the reaction notification settings ».", "arguments": [{ "name": "settings", "type": "ReactionsNotifySettings", "comment": "New reaction notification settings." }], "available": "user" }, { "kind": "method", "name": "users.getUsers", "type": "User", "typeModifiers": { "isVector": true }, "id": 227648840, "comment": "Returns basic user info according to their identifiers.", "arguments": [{ "name": "id", "type": "InputUser", "typeModifiers": { "isVector": true }, "comment": "List of user identifiers" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "FROM_MESSAGE_BOT_DISABLED", "comment": "Bots can't use fromMessage min constructors." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }], "available": "both" }, { "kind": "method", "name": "users.getFullUser", "type": "users.UserFull", "typeModifiers": { "constructorId": 997004590 }, "id": 3054459160, "comment": "Returns extended user info by ID.", "arguments": [{ "name": "id", "type": "InputUser", "comment": "User ID" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "USERNAME_OCCUPIED", "comment": "The provided username is already occupied." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "both" }, { "kind": "method", "name": "users.setSecureValueErrors", "type": "Bool", "id": 2429064373, "comment": "Notify the user that the sent passport data contains some errors The user will not be able to re-submit their Passport data to you until the errors are fixed (the contents of the field for which you returned the error must change).\n\nUse this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.", "arguments": [{ "name": "id", "type": "InputUser", "comment": "The user" }, { "name": "errors", "type": "SecureValueError", "typeModifiers": { "isVector": true }, "comment": "Errors" }], "throws": [{ "code": 403, "name": "USER_BOT_INVALID", "comment": "User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "bot" }, { "kind": "method", "name": "users.getIsPremiumRequiredToContact", "type": "Bool", "typeModifiers": { "isVector": true }, "id": 2787289616, "comment": "Check whether we can write to the specified user (this method can only be called by non-Premium users), see here » for more info on the full flow.", "arguments": [{ "name": "id", "type": "InputUser", "typeModifiers": { "isVector": true }, "comment": "Users to fetch info about." }], "available": "user" }, { "kind": "method", "name": "contacts.getContactIDs", "type": "int", "typeModifiers": { "isVector": true }, "id": 2061264541, "comment": "Get the telegram IDs of all contacts.
\nReturns an array of Telegram user IDs for all contacts (0 if a contact does not have an associated Telegram account or have hidden their account using privacy settings).", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here" }], "available": "user" }, { "kind": "method", "name": "contacts.getStatuses", "type": "ContactStatus", "typeModifiers": { "isVector": true, "constructorId": 383348795 }, "id": 3299038190, "comment": "Use this method to obtain the online statuses of all contacts with an accessible Telegram account.", "arguments": [], "available": "user" }, { "kind": "method", "name": "contacts.getContacts", "type": "contacts.Contacts", "id": 1574346258, "comment": "Returns the current user's contact list.", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here.
Note that the hash is computed using the usual algorithm, passing to the algorithm first the previously returned {@link contacts.RawContacts}.saved_count field, then max 100000 sorted user IDs from the contact list, including the ID of the currently logged in user if it is saved as a contact.
Example: tdlib implementation." }], "available": "user" }, { "kind": "method", "name": "contacts.importContacts", "type": "contacts.ImportedContacts", "typeModifiers": { "constructorId": 2010127419 }, "id": 746589157, "comment": "Imports contacts: saves a full list on the server, adds already registered contacts to the contact list, returns added contacts and their info.\n\nUse {@link contacts.RawAddContactRequest} to add Telegram contacts without actually using their phone number.", "arguments": [{ "name": "contacts", "type": "InputContact", "typeModifiers": { "isVector": true }, "comment": "List of contacts to import" }], "available": "user" }, { "kind": "method", "name": "contacts.deleteContacts", "type": "Updates", "id": 157945344, "comment": "Deletes several contacts from the list.", "arguments": [{ "name": "id", "type": "InputUser", "typeModifiers": { "isVector": true }, "comment": "User ID list" }], "available": "user" }, { "kind": "method", "name": "contacts.deleteByPhones", "type": "Bool", "id": 269745566, "comment": "Delete contacts by phone number", "arguments": [{ "name": "phones", "type": "string", "typeModifiers": { "isVector": true }, "comment": "Phone numbers" }], "available": "user" }, { "kind": "method", "name": "contacts.block", "type": "Bool", "id": 774801204, "comment": "Adds a peer to a blocklist, see here » for more info.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "my_stories_from", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the peer should be added to the story blocklist; if not set, the peer will be added to the main blocklist, see here » for more info." }, { "name": "id", "type": "InputPeer", "comment": "Peer" }], "throws": [{ "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CONTACT_ID_INVALID", "comment": "The provided contact ID is invalid." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "contacts.unblock", "type": "Bool", "id": 3041973032, "comment": "Deletes a peer from a blocklist, see here » for more info.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "my_stories_from", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the peer should be removed from the story blocklist; if not set, the peer will be removed from the main blocklist, see here » for more info." }, { "name": "id", "type": "InputPeer", "comment": "Peer" }], "throws": [{ "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CONTACT_ID_INVALID", "comment": "The provided contact ID is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "contacts.getBlocked", "type": "contacts.Blocked", "id": 2592509824, "comment": "Returns the list of blocked users.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "my_stories_from", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to fetch the story blocklist; if not set, will fetch the main blocklist. See here » for differences between the two." }, { "name": "offset", "type": "int", "comment": "The number of list elements to be skipped" }, { "name": "limit", "type": "int", "comment": "The number of list elements to be returned" }], "available": "user" }, { "kind": "method", "name": "contacts.search", "type": "contacts.Found", "typeModifiers": { "constructorId": 3004386717 }, "id": 301470424, "comment": "Returns users found by username substring.", "arguments": [{ "name": "q", "type": "string", "comment": "Target substring" }, { "name": "limit", "type": "int", "comment": "Maximum number of users to be returned" }], "throws": [{ "code": 400, "name": "QUERY_TOO_SHORT", "comment": "The query string is too short." }, { "code": 400, "name": "SEARCH_QUERY_EMPTY", "comment": "The search query is empty." }], "available": "user" }, { "kind": "method", "name": "contacts.resolveUsername", "type": "contacts.ResolvedPeer", "typeModifiers": { "constructorId": 2131196633 }, "id": 4181511075, "comment": "Resolve a @username to get peer info", "arguments": [{ "name": "username", "type": "string", "comment": "@username to resolve" }], "throws": [{ "code": 400, "name": "CONNECTION_LAYER_INVALID", "comment": "Layer invalid." }, { "code": 400, "name": "USERNAME_INVALID", "comment": "The provided username is not valid." }, { "code": 400, "name": "USERNAME_NOT_OCCUPIED", "comment": "The provided username is not occupied." }], "available": "both" }, { "kind": "method", "name": "contacts.getTopPeers", "type": "contacts.TopPeers", "id": 2536798390, "comment": "Get most used peers", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "correspondents", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Users we've chatted most frequently with" }, { "name": "bots_pm", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Most used bots" }, { "name": "bots_inline", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Most used inline bots" }, { "name": "phone_calls", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Most frequently called users" }, { "name": "forward_users", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "Users to which the users often forwards messages to" }, { "name": "forward_chats", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Chats to which the users often forwards messages to" }, { "name": "groups", "type": "true", "typeModifiers": { "predicate": "flags.10" }, "comment": "Often-opened groups and supergroups" }, { "name": "channels", "type": "true", "typeModifiers": { "predicate": "flags.15" }, "comment": "Most frequently visited channels" }, { "name": "bots_app", "type": "true", "typeModifiers": { "predicate": "flags.16" }, "comment": "Most frequently used Main Mini Bot Apps." }, { "name": "offset", "type": "int", "comment": "Offset for pagination" }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }, { "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here" }], "throws": [{ "code": 400, "name": "TYPES_EMPTY", "comment": "No top peer type was provided." }], "available": "user" }, { "kind": "method", "name": "contacts.resetTopPeerRating", "type": "Bool", "id": 451113900, "comment": "Reset rating of top peer", "arguments": [{ "name": "category", "type": "TopPeerCategory", "comment": "Top peer category" }, { "name": "peer", "type": "InputPeer", "comment": "Peer whose rating should be reset" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "contacts.resetSaved", "type": "Bool", "id": 2274703345, "comment": "Removes all contacts without an associated Telegram account.", "arguments": [], "available": "user" }, { "kind": "method", "name": "contacts.getSaved", "type": "SavedContact", "typeModifiers": { "isVector": true, "constructorId": 289586518 }, "id": 2196890527, "comment": "Get all contacts, requires a takeout session, see here » for more info.", "arguments": [], "throws": [{ "code": 400, "name": "TAKEOUT_INVALID", "comment": "The specified takeout ID is invalid." }, { "code": 403, "name": "TAKEOUT_REQUIRED", "comment": "A takeout session needs to be initialized first, see here » for more info." }], "available": "user" }, { "kind": "method", "name": "contacts.toggleTopPeers", "type": "Bool", "id": 2232729050, "comment": "Enable/disable top peers", "arguments": [{ "name": "enabled", "type": "Bool", "comment": "Enable/disable" }], "available": "user" }, { "kind": "method", "name": "contacts.addContact", "type": "Updates", "id": 3908330448, "comment": "Add an existing telegram user as contact.\n\nUse {@link contacts.RawImportContactsRequest} to add contacts by phone number, without knowing their Telegram ID.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "add_phone_privacy_exception", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Allow the other user to see our phone number?" }, { "name": "id", "type": "InputUser", "comment": "Telegram ID of the other user" }, { "name": "first_name", "type": "string", "comment": "First name" }, { "name": "last_name", "type": "string", "comment": "Last name" }, { "name": "phone", "type": "string", "comment": "User's phone number, may be omitted to simply add the user to the contact list, without a phone number." }], "throws": [{ "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CONTACT_ID_INVALID", "comment": "The provided contact ID is invalid." }, { "code": 400, "name": "CONTACT_NAME_EMPTY", "comment": "Contact name empty." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }], "available": "user" }, { "kind": "method", "name": "contacts.acceptContact", "type": "Updates", "id": 4164002319, "comment": "If the add contact action bar is active, add that user as contact", "arguments": [{ "name": "id", "type": "InputUser", "comment": "The user to add as contact" }], "throws": [{ "code": 400, "name": "CONTACT_ADD_MISSING", "comment": "Contact to add is missing." }, { "code": 400, "name": "CONTACT_ID_INVALID", "comment": "The provided contact ID is invalid." }, { "code": 400, "name": "CONTACT_REQ_MISSING", "comment": "Missing contact request." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }], "available": "user" }, { "kind": "method", "name": "contacts.getLocated", "type": "Updates", "id": 3544759364, "comment": "Get users and geochats near you, see here » for more info.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "background", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "While the geolocation of the current user is public, clients should update it in the background every half-an-hour or so, while setting this flag.
Do this only if the new location is more than 1 KM away from the previous one, or if the previous location is unknown." }, { "name": "geo_point", "type": "InputGeoPoint", "comment": "Geolocation" }, { "name": "self_expires", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, the geolocation of the current user will be public for the specified number of seconds; pass 0x7fffffff to disable expiry, 0 to make the current geolocation private; if the flag isn't set, no changes will be applied." }], "throws": [{ "code": 406, "name": "BUSINESS_ADDRESS_ACTIVE", "comment": "The user is currently advertising a Business Location, the location may only be changed (or removed) using {@link account.RawUpdateBusinessLocationRequest}. ." }, { "code": 400, "name": "GEO_POINT_INVALID", "comment": "Invalid geoposition provided." }, { "code": 406, "name": "USERPIC_PRIVACY_REQUIRED", "comment": "You need to disable privacy settings for your profile picture in order to make your geolocation public." }, { "code": 406, "name": "USERPIC_UPLOAD_REQUIRED", "comment": "You must have a profile picture to publish your geolocation." }], "available": "user" }, { "kind": "method", "name": "contacts.blockFromReplies", "type": "Updates", "id": 698914348, "comment": "Stop getting notifications about discussion replies of a certain user in @replies", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "delete_message", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to delete the specified message as well" }, { "name": "delete_history", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether to delete all @replies messages from this user as well" }, { "name": "report_spam", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether to also report this user for spam" }, { "name": "msg_id", "type": "int", "comment": "ID of the message in the @replies chat" }], "throws": [{ "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }], "available": "user" }, { "kind": "method", "name": "contacts.resolvePhone", "type": "contacts.ResolvedPeer", "typeModifiers": { "constructorId": 2131196633 }, "id": 2331591492, "comment": "Resolve a phone number to get user info, if their privacy settings allow it.", "arguments": [{ "name": "phone", "type": "string", "comment": "Phone number in international format, possibly obtained from a phone number deep link." }], "throws": [{ "code": 400, "name": "PHONE_NOT_OCCUPIED", "comment": "No user is associated to the specified phone number." }], "available": "user" }, { "kind": "method", "name": "contacts.exportContactToken", "type": "ExportedContactToken", "typeModifiers": { "constructorId": 1103040667 }, "id": 4167385127, "comment": "Generates a temporary profile link for the currently logged-in user.", "arguments": [], "available": "user" }, { "kind": "method", "name": "contacts.importContactToken", "type": "User", "id": 318789512, "comment": "Obtain user info from a temporary profile link.", "arguments": [{ "name": "token", "type": "string", "comment": "The token extracted from the temporary profile link." }], "throws": [{ "code": 400, "name": "IMPORT_TOKEN_INVALID", "comment": "The specified token is invalid." }], "available": "user" }, { "kind": "method", "name": "contacts.editCloseFriends", "type": "Bool", "id": 3127313904, "comment": "Edit the close friends list, see here » for more info.", "arguments": [{ "name": "id", "type": "int53", "typeModifiers": { "isVector": true }, "comment": "Full list of user IDs of close friends, see here for more info." }], "available": "user" }, { "kind": "method", "name": "contacts.setBlocked", "type": "Bool", "id": 2496027766, "comment": "Replace the contents of an entire blocklist, see here for more info ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "my_stories_from", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to edit the story blocklist; if not set, will edit the main blocklist. See here » for differences between the two." }, { "name": "id", "type": "InputPeer", "typeModifiers": { "isVector": true }, "comment": "Full content of the blocklist." }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }], "available": "user" }, { "kind": "method", "name": "contacts.getBirthdays", "type": "contacts.ContactBirthdays", "typeModifiers": { "constructorId": 290452237 }, "id": 3673008228, "comment": "Fetch all users with birthdays that fall within +1/-1 days, relative to the current day: this method should be invoked by clients every 6-8 hours, and if the result is non-empty, it should be used to appropriately update locally cached birthday information in {@link RawUser}.birthday.\n\nSee here » for more info.", "arguments": [], "available": "user" }, { "kind": "method", "name": "messages.getMessages", "type": "messages.Messages", "id": 1673946374, "comment": "Returns the list of messages by their IDs.", "arguments": [{ "name": "id", "type": "InputMessage", "typeModifiers": { "isVector": true }, "comment": "Message ID list" }], "available": "both" }, { "kind": "method", "name": "messages.getDialogs", "type": "messages.Dialogs", "id": 2700397391, "comment": "Returns the current user dialog list.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "exclude_pinned", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Exclude pinned dialogs" }, { "name": "folder_id", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Peer folder ID, for more info click here" }, { "name": "offset_date", "type": "int", "comment": "Offsets for pagination, for more info click here" }, { "name": "offset_id", "type": "int", "comment": "Offsets for pagination, for more info click here (top_message ID used for pagination)" }, { "name": "offset_peer", "type": "InputPeer", "comment": "Offset peer for pagination" }, { "name": "limit", "type": "int", "comment": "Number of list elements to be returned" }, { "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here" }], "throws": [{ "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "FOLDER_ID_INVALID", "comment": "Invalid folder ID." }, { "code": 400, "name": "OFFSET_PEER_ID_INVALID", "comment": "The provided offset peer is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getHistory", "type": "messages.Messages", "id": 1143203525, "comment": "Returns the conversation history with one interlocutor / within a chat", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Target peer" }, { "name": "offset_id", "type": "int", "comment": "Only return messages starting from the specified message ID" }, { "name": "offset_date", "type": "int", "comment": "Only return messages sent before the specified date" }, { "name": "add_offset", "type": "int", "comment": "Number of list elements to be skipped, negative values are also accepted." }, { "name": "limit", "type": "int", "comment": "Number of results to return" }, { "name": "max_id", "type": "int", "comment": "If a positive value was transferred, the method will return only messages with IDs less than max_id" }, { "name": "min_id", "type": "int", "comment": "If a positive value was transferred, the method will return only messages with IDs more than min_id" }, { "name": "hash", "type": "long", "comment": "Result hash" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "TAKEOUT_INVALID", "comment": "The specified takeout ID is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.search", "type": "messages.Messages", "id": 703497338, "comment": "Search for messages.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "peer", "type": "InputPeer", "comment": "User or chat, histories with which are searched, or {@link RawInputPeerEmpty} constructor to search in all private chats and normal groups (not channels) ». Use {@link messages.RawSearchGlobalRequest} to search globally in all chats, groups, supergroups and channels." }, { "name": "q", "type": "string", "comment": "Text search request" }, { "name": "from_id", "type": "InputPeer", "typeModifiers": { "predicate": "flags.0" }, "comment": "Only return messages sent by the specified user ID" }, { "name": "saved_peer_id", "type": "InputPeer", "typeModifiers": { "predicate": "flags.2" }, "comment": "Search within the saved message dialog » with this ID." }, { "name": "saved_reaction", "type": "Reaction", "typeModifiers": { "predicate": "flags.3", "isVector": true }, "comment": "You may search for saved messages tagged » with one or more reactions using this flag." }, { "name": "top_msg_id", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Thread ID" }, { "name": "filter", "type": "MessagesFilter", "comment": "Filter to return only specified message types" }, { "name": "min_date", "type": "int", "comment": "If a positive value was transferred, only messages with a sending date bigger than the transferred one will be returned" }, { "name": "max_date", "type": "int", "comment": "If a positive value was transferred, only messages with a sending date smaller than the transferred one will be returned" }, { "name": "offset_id", "type": "int", "comment": "Only return messages starting from the specified message ID" }, { "name": "add_offset", "type": "int", "comment": "Additional offset" }, { "name": "limit", "type": "int", "comment": "Number of results to return" }, { "name": "max_id", "type": "int", "comment": "Maximum message ID to return" }, { "name": "min_id", "type": "int", "comment": "Minimum message ID to return" }, { "name": "hash", "type": "long", "comment": "Hash" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "FROM_PEER_INVALID", "comment": "The specified from_id is invalid." }, { "code": 400, "name": "INPUT_FILTER_INVALID", "comment": "The specified filter is invalid." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "PEER_ID_NOT_SUPPORTED", "comment": "The provided peer ID is not supported." }, { "code": 400, "name": "SEARCH_QUERY_EMPTY", "comment": "The search query is empty." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.readHistory", "type": "messages.AffectedMessages", "typeModifiers": { "constructorId": 2228326789 }, "id": 238054714, "comment": "Marks message history as read.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Target user or group" }, { "name": "max_id", "type": "int", "comment": "If a positive value is passed, only messages with identifiers less or equal than the given one will be read" }], "throws": [{ "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.deleteHistory", "type": "messages.AffectedHistory", "typeModifiers": { "constructorId": 3025955281 }, "id": 2962199082, "comment": "Deletes communication history.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "just_clear", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Just clear history for the current user, without actually removing messages for every chat user" }, { "name": "revoke", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether to delete the message history for all chat participants" }, { "name": "peer", "type": "InputPeer", "comment": "User or chat, communication history of which will be deleted" }, { "name": "max_id", "type": "int", "comment": "Maximum ID of message to delete" }, { "name": "min_date", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "Delete all messages newer than this UNIX timestamp" }, { "name": "max_date", "type": "int", "typeModifiers": { "predicate": "flags.3" }, "comment": "Delete all messages older than this UNIX timestamp" }], "throws": [{ "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_REVOKE_DATE_UNSUPPORTED", "comment": "min_date and max_date are not available for using with non-user peers." }, { "code": 400, "name": "MAX_DATE_INVALID", "comment": "The specified maximum date is invalid." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "MIN_DATE_INVALID", "comment": "The specified minimum date is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.deleteMessages", "type": "messages.AffectedMessages", "typeModifiers": { "constructorId": 2228326789 }, "id": 3851326930, "comment": "Deletes messages by their identifiers.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "revoke", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to delete messages for all participants of the chat" }, { "name": "id", "type": "int", "typeModifiers": { "isVector": true }, "comment": "Message ID list" }], "throws": [{ "code": 403, "name": "MESSAGE_DELETE_FORBIDDEN", "comment": "You can't delete one of the messages you tried to delete, most likely because it is a service message." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }], "available": "both" }, { "kind": "method", "name": "messages.receivedMessages", "type": "ReceivedNotifyMessage", "typeModifiers": { "isVector": true, "constructorId": 2743383929 }, "id": 94983360, "comment": "Confirms receipt of messages by a client, cancels PUSH-notification sending.", "arguments": [{ "name": "max_id", "type": "int", "comment": "Maximum message ID available in a client." }], "available": "user" }, { "kind": "method", "name": "messages.setTyping", "type": "Bool", "id": 1486110434, "comment": "Sends a current user typing event (see SendMessageAction for all event types) to a conversation partner or group.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "peer", "type": "InputPeer", "comment": "Target user or group" }, { "name": "top_msg_id", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Topic ID" }, { "name": "action", "type": "SendMessageAction", "comment": "Type of action" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 403, "name": "GROUPCALL_FORBIDDEN", "comment": "The group call has already ended." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }, { "code": 403, "name": "USER_IS_BLOCKED", "comment": "You were blocked by this user." }, { "code": 400, "name": "USER_IS_BOT", "comment": "Bots can't send messages to other bots." }], "available": "both" }, { "kind": "method", "name": "messages.sendMessage", "type": "Updates", "id": 2554304325, "comment": "Sends a message to a chat", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "no_webpage", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Set this flag to disable generation of the webpage preview" }, { "name": "silent", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Send this message silently (no notifications for the receivers)" }, { "name": "background", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "Send this message as background message" }, { "name": "clear_draft", "type": "true", "typeModifiers": { "predicate": "flags.7" }, "comment": "Clear the draft field" }, { "name": "noforwards", "type": "true", "typeModifiers": { "predicate": "flags.14" }, "comment": "Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled" }, { "name": "update_stickersets_order", "type": "true", "typeModifiers": { "predicate": "flags.15" }, "comment": "Whether to move used stickersets to top, see here for more info on this flag »" }, { "name": "invert_media", "type": "true", "typeModifiers": { "predicate": "flags.16" }, "comment": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom." }, { "name": "peer", "type": "InputPeer", "comment": "The destination where the message will be sent" }, { "name": "reply_to", "type": "InputReplyTo", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, indicates that the message should be sent in reply to the specified message or story.
Also used to quote other messages." }, { "name": "message", "type": "string", "comment": "The message" }, { "name": "random_id", "type": "long", "comment": "Unique client message ID required to prevent message resending" }, { "name": "reply_markup", "type": "ReplyMarkup", "typeModifiers": { "predicate": "flags.2" }, "comment": "Reply markup for sending bot buttons" }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.3", "isVector": true }, "comment": "Message entities for sending styled text" }, { "name": "schedule_date", "type": "int", "typeModifiers": { "predicate": "flags.10" }, "comment": "Scheduled message date for scheduled messages" }, { "name": "send_as", "type": "InputPeer", "typeModifiers": { "predicate": "flags.13" }, "comment": "Send this message as the specified peer" }, { "name": "quick_reply_shortcut", "type": "InputQuickReplyShortcut", "typeModifiers": { "predicate": "flags.17" }, "comment": "Add the message to the specified quick reply shortcut », instead." }, { "name": "effect", "type": "long", "typeModifiers": { "predicate": "flags.18" }, "comment": "Specifies a message effect » to use for the message." }], "throws": [{ "code": 400, "name": "ADMIN_RIGHTS_EMPTY", "comment": "The chatAdminRights constructor passed in keyboardButtonRequestPeer.peer_type.user_admin_rights has no rights set (i.e. flags is 0)." }, { "code": 400, "name": "BOT_DOMAIN_INVALID", "comment": "Bot domain invalid." }, { "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }, { "code": 400, "name": "BUSINESS_PEER_INVALID", "comment": "Messages can't be set to the specified peer through the current business connection." }, { "code": 400, "name": "BUTTON_DATA_INVALID", "comment": "The data of one or more of the buttons you provided is invalid." }, { "code": 400, "name": "BUTTON_TYPE_INVALID", "comment": "The type of one or more of the buttons you provided is invalid." }, { "code": 400, "name": "BUTTON_URL_INVALID", "comment": "Button URL invalid." }, { "code": 400, "name": "BUTTON_USER_INVALID", "comment": "The user_id passed to inputKeyboardButtonUserProfile is invalid!" }, { "code": 400, "name": "BUTTON_USER_PRIVACY_RESTRICTED", "comment": "The privacy setting of the user specified in a {@link RawInputKeyboardButtonUserProfile} button do not allow creating such a button." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_GUEST_SEND_FORBIDDEN", "comment": "You join the discussion group before commenting, see here » for more info." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_RESTRICTED", "comment": "You can't send messages in this chat, you were restricted." }, { "code": 403, "name": "CHAT_SEND_PLAIN_FORBIDDEN", "comment": "You can't send non-media (text) messages in this chat." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "DOCUMENT_INVALID", "comment": "The specified document is invalid." }, { "code": 400, "name": "ENCRYPTION_DECLINED", "comment": "The secret chat was declined." }, { "code": 400, "name": "ENTITIES_TOO_LONG", "comment": "You provided too many styled message entities." }, { "code": 400, "name": "ENTITY_BOUNDS_INVALID", "comment": "A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length." }, { "code": 400, "name": "ENTITY_MENTION_USER_INVALID", "comment": "You mentioned an invalid user." }, { "code": 400, "name": "FROM_MESSAGE_BOT_DISABLED", "comment": "Bots can't use fromMessage min constructors." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MESSAGE_EMPTY", "comment": "The provided message is empty." }, { "code": 400, "name": "MESSAGE_TOO_LONG", "comment": "The provided message is too long." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 500, "name": "MSG_WAIT_FAILED", "comment": "A waiting call returned an error." }, { "code": 406, "name": "PAYMENT_UNSUPPORTED", "comment": "A detailed description of the error will be received separately as described here »." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "PINNED_DIALOGS_TOO_MUCH", "comment": "Too many pinned dialogs." }, { "code": 400, "name": "POLL_OPTION_INVALID", "comment": "Invalid poll option provided." }, { "code": 406, "name": "PRIVACY_PREMIUM_REQUIRED", "comment": "You need a Telegram Premium subscription to send a message to this user." }, { "code": 400, "name": "QUICK_REPLIES_TOO_MUCH", "comment": "A maximum of appConfig.quick_replies_limit shortcuts may be created, the limit was reached." }, { "code": 400, "name": "QUOTE_TEXT_INVALID", "comment": "The specified reply_to.quote_text field is invalid." }, { "code": 500, "name": "RANDOM_ID_DUPLICATE", "comment": "You provided a random ID that was already used." }, { "code": 400, "name": "REPLY_MARKUP_INVALID", "comment": "The provided reply markup is invalid." }, { "code": 400, "name": "REPLY_MARKUP_TOO_LONG", "comment": "The specified reply_markup is too long." }, { "code": 400, "name": "REPLY_MESSAGES_TOO_MUCH", "comment": "Each shortcut can contain a maximum of appConfig.quick_reply_messages_limit messages, the limit was reached." }, { "code": 400, "name": "REPLY_MESSAGE_ID_INVALID", "comment": "The specified reply-to message ID is invalid." }, { "code": 400, "name": "REPLY_TO_INVALID", "comment": "The specified reply_to field is invalid." }, { "code": 400, "name": "REPLY_TO_USER_INVALID", "comment": "The replied-to user is invalid." }, { "code": 400, "name": "SCHEDULE_BOT_NOT_ALLOWED", "comment": "Bots cannot schedule messages." }, { "code": 400, "name": "SCHEDULE_DATE_TOO_LATE", "comment": "You can't schedule a message this far in the future." }, { "code": 400, "name": "SCHEDULE_STATUS_PRIVATE", "comment": "Can't schedule until user is online, if the user's last seen timestamp is hidden by their privacy settings." }, { "code": 400, "name": "SCHEDULE_TOO_MUCH", "comment": "There are too many scheduled messages." }, { "code": 400, "name": "SEND_AS_PEER_INVALID", "comment": "You can't send messages as the specified peer." }, { "code": 420, "name": "SLOWMODE_WAIT_%d", "comment": "Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat." }, { "code": 400, "name": "STORY_ID_INVALID", "comment": "The specified story ID is invalid." }, { "code": 406, "name": "TOPIC_CLOSED", "comment": "This topic was closed, you can't send messages to it anymore." }, { "code": 406, "name": "TOPIC_DELETED", "comment": "The specified topic was deleted." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }, { "code": 403, "name": "USER_IS_BLOCKED", "comment": "You were blocked by this user." }, { "code": 400, "name": "USER_IS_BOT", "comment": "Bots can't send messages to other bots." }, { "code": 400, "name": "WC_CONVERT_URL_INVALID", "comment": "WC convert URL invalid." }, { "code": 400, "name": "YOU_BLOCKED_USER", "comment": "You blocked this user." }], "available": "both" }, { "kind": "method", "name": "messages.sendMedia", "type": "Updates", "id": 2018673486, "comment": "Send a media", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "silent", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Send message silently (no notification should be triggered)" }, { "name": "background", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "Send message in background" }, { "name": "clear_draft", "type": "true", "typeModifiers": { "predicate": "flags.7" }, "comment": "Clear the draft" }, { "name": "noforwards", "type": "true", "typeModifiers": { "predicate": "flags.14" }, "comment": "Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled" }, { "name": "update_stickersets_order", "type": "true", "typeModifiers": { "predicate": "flags.15" }, "comment": "Whether to move used stickersets to top, see here for more info on this flag »" }, { "name": "invert_media", "type": "true", "typeModifiers": { "predicate": "flags.16" }, "comment": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom." }, { "name": "peer", "type": "InputPeer", "comment": "Destination" }, { "name": "reply_to", "type": "InputReplyTo", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, indicates that the message should be sent in reply to the specified message or story." }, { "name": "media", "type": "InputMedia", "comment": "Attached media" }, { "name": "message", "type": "string", "comment": "Caption" }, { "name": "random_id", "type": "long", "comment": "Random ID to avoid resending the same message" }, { "name": "reply_markup", "type": "ReplyMarkup", "typeModifiers": { "predicate": "flags.2" }, "comment": "Reply markup for bot keyboards" }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.3", "isVector": true }, "comment": "Message entities for styled text" }, { "name": "schedule_date", "type": "int", "typeModifiers": { "predicate": "flags.10" }, "comment": "Scheduled message date for scheduled messages" }, { "name": "send_as", "type": "InputPeer", "typeModifiers": { "predicate": "flags.13" }, "comment": "Send this message as the specified peer" }, { "name": "quick_reply_shortcut", "type": "InputQuickReplyShortcut", "typeModifiers": { "predicate": "flags.17" }, "comment": "Add the message to the specified quick reply shortcut », instead." }, { "name": "effect", "type": "long", "typeModifiers": { "predicate": "flags.18" }, "comment": "Specifies a message effect » to use for the message." }], "throws": [{ "code": 400, "name": "BOT_GAMES_DISABLED", "comment": "Games can't be sent to channels." }, { "code": 400, "name": "BOT_PAYMENTS_DISABLED", "comment": "Please enable bot payments in botfather before calling this method." }, { "code": 400, "name": "BROADCAST_PUBLIC_VOTERS_FORBIDDEN", "comment": "You can't forward polls with public voters." }, { "code": 400, "name": "BUTTON_DATA_INVALID", "comment": "The data of one or more of the buttons you provided is invalid." }, { "code": 400, "name": "BUTTON_POS_INVALID", "comment": "The position of one of the keyboard buttons is invalid (i.e. a Game or Pay button not in the first position, and so on...)." }, { "code": 400, "name": "BUTTON_TYPE_INVALID", "comment": "The type of one or more of the buttons you provided is invalid." }, { "code": 400, "name": "BUTTON_URL_INVALID", "comment": "Button URL invalid." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_FORWARDS_RESTRICTED", "comment": "You can't forward messages from a protected chat." }, { "code": 403, "name": "CHAT_GUEST_SEND_FORBIDDEN", "comment": "You join the discussion group before commenting, see here » for more info." }, { "code": 400, "name": "CHAT_RESTRICTED", "comment": "You can't send messages in this chat, you were restricted." }, { "code": 403, "name": "CHAT_SEND_AUDIOS_FORBIDDEN", "comment": "You can't send audio messages in this chat." }, { "code": 403, "name": "CHAT_SEND_DOCS_FORBIDDEN", "comment": "You can't send documents in this chat." }, { "code": 403, "name": "CHAT_SEND_GIFS_FORBIDDEN", "comment": "You can't send gifs in this chat." }, { "code": 403, "name": "CHAT_SEND_MEDIA_FORBIDDEN", "comment": "You can't send media in this chat." }, { "code": 403, "name": "CHAT_SEND_PHOTOS_FORBIDDEN", "comment": "You can't send photos in this chat." }, { "code": 403, "name": "CHAT_SEND_PLAIN_FORBIDDEN", "comment": "You can't send non-media (text) messages in this chat." }, { "code": 403, "name": "CHAT_SEND_POLL_FORBIDDEN", "comment": "You can't send polls in this chat." }, { "code": 403, "name": "CHAT_SEND_ROUNDVIDEOS_FORBIDDEN", "comment": "You can't send round videos to this chat." }, { "code": 403, "name": "CHAT_SEND_STICKERS_FORBIDDEN", "comment": "You can't send stickers in this chat." }, { "code": 403, "name": "CHAT_SEND_VIDEOS_FORBIDDEN", "comment": "You can't send videos in this chat." }, { "code": 403, "name": "CHAT_SEND_VOICES_FORBIDDEN", "comment": "You can't send voice recordings in this chat." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "CURRENCY_TOTAL_AMOUNT_INVALID", "comment": "The total amount of all prices is invalid." }, { "code": 400, "name": "DOCUMENT_INVALID", "comment": "The specified document is invalid." }, { "code": 400, "name": "EMOTICON_INVALID", "comment": "The specified emoji is invalid." }, { "code": 400, "name": "ENTITY_BOUNDS_INVALID", "comment": "A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length." }, { "code": 400, "name": "EXTERNAL_URL_INVALID", "comment": "External URL invalid." }, { "code": 400, "name": "FILE_PARTS_INVALID", "comment": "The number of file parts is invalid." }, { "code": 400, "name": "FILE_PART_LENGTH_INVALID", "comment": "The length of a file part is invalid." }, { "code": 400, "name": "FILE_REFERENCE_EMPTY", "comment": "An empty file reference was specified." }, { "code": 400, "name": "FILE_REFERENCE_EXPIRED", "comment": "File reference expired, it must be refetched as described in the documentation." }, { "code": 400, "name": "GAME_BOT_INVALID", "comment": "Bots can't send another bot's game." }, { "code": 400, "name": "IMAGE_PROCESS_FAILED", "comment": "Failure while processing image." }, { "code": 400, "name": "INPUT_FILE_INVALID", "comment": "The specified InputFile is invalid." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MD5_CHECKSUM_INVALID", "comment": "The MD5 checksums do not match." }, { "code": 400, "name": "MEDIA_CAPTION_TOO_LONG", "comment": "The caption is too long." }, { "code": 400, "name": "MEDIA_EMPTY", "comment": "The provided media object is invalid." }, { "code": 400, "name": "MEDIA_INVALID", "comment": "Media invalid." }, { "code": 400, "name": "MESSAGE_EMPTY", "comment": "The provided message is empty." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PAYMENT_PROVIDER_INVALID", "comment": "The specified payment provider is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "PHOTO_EXT_INVALID", "comment": "The extension of the photo is invalid." }, { "code": 400, "name": "PHOTO_INVALID_DIMENSIONS", "comment": "The photo dimensions are invalid." }, { "code": 400, "name": "PHOTO_SAVE_FILE_INVALID", "comment": "Internal issues, try again later." }, { "code": 400, "name": "POLL_ANSWERS_INVALID", "comment": "Invalid poll answers were provided." }, { "code": 400, "name": "POLL_ANSWER_INVALID", "comment": "One of the poll answers is not acceptable." }, { "code": 400, "name": "POLL_OPTION_DUPLICATE", "comment": "Duplicate poll options provided." }, { "code": 400, "name": "POLL_OPTION_INVALID", "comment": "Invalid poll option provided." }, { "code": 400, "name": "POLL_QUESTION_INVALID", "comment": "One of the poll questions is not acceptable." }, { "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }, { "code": 403, "name": "PRIVACY_PREMIUM_REQUIRED", "comment": "You need a Telegram Premium subscription to send a message to this user." }, { "code": 400, "name": "QUICK_REPLIES_TOO_MUCH", "comment": "A maximum of appConfig.quick_replies_limit shortcuts may be created, the limit was reached." }, { "code": 400, "name": "QUIZ_CORRECT_ANSWERS_EMPTY", "comment": "No correct quiz answer was specified." }, { "code": 400, "name": "QUIZ_CORRECT_ANSWERS_TOO_MUCH", "comment": "You specified too many correct answers in a quiz, quizzes can only have one right answer!" }, { "code": 400, "name": "QUIZ_CORRECT_ANSWER_INVALID", "comment": "An invalid value was provided to the correct_answers field." }, { "code": 400, "name": "QUIZ_MULTIPLE_INVALID", "comment": "Quizzes can't have the multiple_choice flag set!" }, { "code": 500, "name": "RANDOM_ID_DUPLICATE", "comment": "You provided a random ID that was already used." }, { "code": 400, "name": "REPLY_MARKUP_BUY_EMPTY", "comment": "Reply markup for buy button empty." }, { "code": 400, "name": "REPLY_MARKUP_GAME_EMPTY", "comment": "A game message is being edited, but the newly provided keyboard doesn't have a keyboardButtonGame button." }, { "code": 400, "name": "REPLY_MARKUP_INVALID", "comment": "The provided reply markup is invalid." }, { "code": 400, "name": "REPLY_MARKUP_TOO_LONG", "comment": "The specified reply_markup is too long." }, { "code": 400, "name": "REPLY_MESSAGES_TOO_MUCH", "comment": "Each shortcut can contain a maximum of appConfig.quick_reply_messages_limit messages, the limit was reached." }, { "code": 400, "name": "SCHEDULE_BOT_NOT_ALLOWED", "comment": "Bots cannot schedule messages." }, { "code": 400, "name": "SCHEDULE_DATE_TOO_LATE", "comment": "You can't schedule a message this far in the future." }, { "code": 400, "name": "SCHEDULE_TOO_MUCH", "comment": "There are too many scheduled messages." }, { "code": 400, "name": "SEND_AS_PEER_INVALID", "comment": "You can't send messages as the specified peer." }, { "code": 420, "name": "SLOWMODE_WAIT_%d", "comment": "Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat." }, { "code": 400, "name": "STORY_ID_INVALID", "comment": "The specified story ID is invalid." }, { "code": 406, "name": "TOPIC_CLOSED", "comment": "This topic was closed, you can't send messages to it anymore." }, { "code": 406, "name": "TOPIC_DELETED", "comment": "The specified topic was deleted." }, { "code": 400, "name": "TTL_MEDIA_INVALID", "comment": "Invalid media Time To Live was provided." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }, { "code": 403, "name": "USER_IS_BLOCKED", "comment": "You were blocked by this user." }, { "code": 400, "name": "USER_IS_BOT", "comment": "Bots can't send messages to other bots." }, { "code": 400, "name": "VIDEO_CONTENT_TYPE_INVALID", "comment": "The video's content type is invalid." }, { "code": 400, "name": "VOICE_MESSAGES_FORBIDDEN", "comment": "This user's privacy settings forbid you from sending voice messages." }, { "code": 400, "name": "WEBDOCUMENT_MIME_INVALID", "comment": "Invalid webdocument mime type provided." }, { "code": 400, "name": "WEBPAGE_CURL_FAILED", "comment": "Failure while fetching the webpage with cURL." }, { "code": 400, "name": "WEBPAGE_MEDIA_EMPTY", "comment": "Webpage media empty." }, { "code": 400, "name": "WEBPAGE_NOT_FOUND", "comment": "A preview for the specified webpage url could not be generated." }, { "code": 400, "name": "WEBPAGE_URL_INVALID", "comment": "The specified webpage url is invalid." }, { "code": 400, "name": "YOU_BLOCKED_USER", "comment": "You blocked this user." }], "available": "both" }, { "kind": "method", "name": "messages.forwardMessages", "type": "Updates", "id": 3573781000, "comment": "Forwards messages by their IDs.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "silent", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Whether to send messages silently (no notification will be triggered on the destination clients)" }, { "name": "background", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "Whether to send the message in background" }, { "name": "with_my_score", "type": "true", "typeModifiers": { "predicate": "flags.8" }, "comment": "When forwarding games, whether to include your score in the game" }, { "name": "drop_author", "type": "true", "typeModifiers": { "predicate": "flags.11" }, "comment": "Whether to forward messages without quoting the original author" }, { "name": "drop_media_captions", "type": "true", "typeModifiers": { "predicate": "flags.12" }, "comment": "Whether to strip captions from media" }, { "name": "noforwards", "type": "true", "typeModifiers": { "predicate": "flags.14" }, "comment": "Only for bots, disallows further re-forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled" }, { "name": "from_peer", "type": "InputPeer", "comment": "Source of messages" }, { "name": "id", "type": "int", "typeModifiers": { "isVector": true }, "comment": "IDs of messages" }, { "name": "random_id", "type": "long", "typeModifiers": { "isVector": true }, "comment": "Random ID to prevent resending of messages" }, { "name": "to_peer", "type": "InputPeer", "comment": "Destination peer" }, { "name": "top_msg_id", "type": "int", "typeModifiers": { "predicate": "flags.9" }, "comment": "Destination forum topic" }, { "name": "schedule_date", "type": "int", "typeModifiers": { "predicate": "flags.10" }, "comment": "Scheduled message date for scheduled messages" }, { "name": "send_as", "type": "InputPeer", "typeModifiers": { "predicate": "flags.13" }, "comment": "Forward the messages as the specified peer" }, { "name": "quick_reply_shortcut", "type": "InputQuickReplyShortcut", "typeModifiers": { "predicate": "flags.17" }, "comment": "Add the messages to the specified quick reply shortcut », instead." }], "throws": [{ "code": 400, "name": "BROADCAST_PUBLIC_VOTERS_FORBIDDEN", "comment": "You can't forward polls with public voters." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 406, "name": "CHAT_FORWARDS_RESTRICTED", "comment": "You can't forward messages from a protected chat." }, { "code": 403, "name": "CHAT_GUEST_SEND_FORBIDDEN", "comment": "You join the discussion group before commenting, see here » for more info." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_RESTRICTED", "comment": "You can't send messages in this chat, you were restricted." }, { "code": 403, "name": "CHAT_SEND_AUDIOS_FORBIDDEN", "comment": "You can't send audio messages in this chat." }, { "code": 403, "name": "CHAT_SEND_DOCS_FORBIDDEN", "comment": "You can't send documents in this chat." }, { "code": 403, "name": "CHAT_SEND_GAME_FORBIDDEN", "comment": "You can't send a game to this chat." }, { "code": 403, "name": "CHAT_SEND_GIFS_FORBIDDEN", "comment": "You can't send gifs in this chat." }, { "code": 403, "name": "CHAT_SEND_MEDIA_FORBIDDEN", "comment": "You can't send media in this chat." }, { "code": 403, "name": "CHAT_SEND_PHOTOS_FORBIDDEN", "comment": "You can't send photos in this chat." }, { "code": 403, "name": "CHAT_SEND_PLAIN_FORBIDDEN", "comment": "You can't send non-media (text) messages in this chat." }, { "code": 403, "name": "CHAT_SEND_POLL_FORBIDDEN", "comment": "You can't send polls in this chat." }, { "code": 403, "name": "CHAT_SEND_STICKERS_FORBIDDEN", "comment": "You can't send stickers in this chat." }, { "code": 403, "name": "CHAT_SEND_VIDEOS_FORBIDDEN", "comment": "You can't send videos in this chat." }, { "code": 403, "name": "CHAT_SEND_VOICES_FORBIDDEN", "comment": "You can't send voice recordings in this chat." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "GROUPED_MEDIA_INVALID", "comment": "Invalid grouped media." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MEDIA_EMPTY", "comment": "The provided media object is invalid." }, { "code": 400, "name": "MESSAGE_IDS_EMPTY", "comment": "No message ids were provided." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 406, "name": "PAYMENT_UNSUPPORTED", "comment": "A detailed description of the error will be received separately as described here »." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }, { "code": 406, "name": "PRIVACY_PREMIUM_REQUIRED", "comment": "You need a Telegram Premium subscription to send a message to this user." }, { "code": 400, "name": "QUICK_REPLIES_TOO_MUCH", "comment": "A maximum of appConfig.quick_replies_limit shortcuts may be created, the limit was reached." }, { "code": 400, "name": "QUIZ_ANSWER_MISSING", "comment": "You can forward a quiz while hiding the original author only after choosing an option in the quiz." }, { "code": 500, "name": "RANDOM_ID_DUPLICATE", "comment": "You provided a random ID that was already used." }, { "code": 400, "name": "RANDOM_ID_INVALID", "comment": "A provided random ID is invalid." }, { "code": 400, "name": "REPLY_MESSAGES_TOO_MUCH", "comment": "Each shortcut can contain a maximum of appConfig.quick_reply_messages_limit messages, the limit was reached." }, { "code": 400, "name": "SCHEDULE_BOT_NOT_ALLOWED", "comment": "Bots cannot schedule messages." }, { "code": 400, "name": "SCHEDULE_DATE_TOO_LATE", "comment": "You can't schedule a message this far in the future." }, { "code": 400, "name": "SCHEDULE_TOO_MUCH", "comment": "There are too many scheduled messages." }, { "code": 400, "name": "SEND_AS_PEER_INVALID", "comment": "You can't send messages as the specified peer." }, { "code": 400, "name": "SLOWMODE_MULTI_MSGS_DISABLED", "comment": "Slowmode is enabled, you cannot forward multiple messages to this group." }, { "code": 420, "name": "SLOWMODE_WAIT_%d", "comment": "Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat." }, { "code": 406, "name": "TOPIC_CLOSED", "comment": "This topic was closed, you can't send messages to it anymore." }, { "code": 406, "name": "TOPIC_DELETED", "comment": "The specified topic was deleted." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }, { "code": 403, "name": "USER_IS_BLOCKED", "comment": "You were blocked by this user." }, { "code": 400, "name": "USER_IS_BOT", "comment": "Bots can't send messages to other bots." }, { "code": 403, "name": "VOICE_MESSAGES_FORBIDDEN", "comment": "This user's privacy settings forbid you from sending voice messages." }, { "code": 400, "name": "YOU_BLOCKED_USER", "comment": "You blocked this user." }], "available": "both" }, { "kind": "method", "name": "messages.reportSpam", "type": "Bool", "id": 3474297563, "comment": "Report a new incoming chat for spam, if the {@link RawPeerSettings} of the chat allow us to do that", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer to report" }], "throws": [{ "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getPeerSettings", "type": "messages.PeerSettings", "typeModifiers": { "constructorId": 1753266509 }, "id": 4024018594, "comment": "Get peer settings", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The peer" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.report", "type": "Bool", "id": 2303961934, "comment": "Report a message in a chat for violation of telegram's Terms of Service", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer" }, { "name": "id", "type": "int", "typeModifiers": { "isVector": true }, "comment": "IDs of messages to report" }, { "name": "reason", "type": "ReportReason", "comment": "Why are these messages being reported" }, { "name": "message", "type": "string", "comment": "Comment for report moderation" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getChats", "type": "messages.Chats", "id": 1240027791, "comment": "Returns chat basic info on their IDs.", "arguments": [{ "name": "id", "type": "int53", "typeModifiers": { "isVector": true }, "comment": "List of chat IDs" }], "throws": [{ "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "both" }, { "kind": "method", "name": "messages.getFullChat", "type": "messages.ChatFull", "typeModifiers": { "constructorId": 3856126364 }, "id": 2930772788, "comment": "Get full info about a basic group.", "arguments": [{ "name": "chat_id", "type": "int53", "comment": "Basic group ID." }], "throws": [{ "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "both" }, { "kind": "method", "name": "messages.editChatTitle", "type": "Updates", "id": 1937260541, "comment": "Changes chat name and sends a service message on it.", "arguments": [{ "name": "chat_id", "type": "int53", "comment": "Chat ID" }, { "name": "title", "type": "string", "comment": "New chat name, different from the old one" }], "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "CHAT_TITLE_EMPTY", "comment": "No chat title provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "both" }, { "kind": "method", "name": "messages.editChatPhoto", "type": "Updates", "id": 903730804, "comment": "Changes chat photo and sends a service message on it", "arguments": [{ "name": "chat_id", "type": "int53", "comment": "Chat ID" }, { "name": "photo", "type": "InputChatPhoto", "comment": "Photo to be set" }], "throws": [{ "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "IMAGE_PROCESS_FAILED", "comment": "Failure while processing image." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "PHOTO_CROP_SIZE_SMALL", "comment": "Photo is too small." }, { "code": 400, "name": "PHOTO_EXT_INVALID", "comment": "The extension of the photo is invalid." }, { "code": 400, "name": "PHOTO_INVALID", "comment": "Photo invalid." }], "available": "both" }, { "kind": "method", "name": "messages.addChatUser", "type": "messages.InvitedUsers", "typeModifiers": { "constructorId": 2136862630 }, "id": 3418804487, "comment": "Adds a user to a chat and sends a service message on it.", "arguments": [{ "name": "chat_id", "type": "int53", "comment": "Chat ID" }, { "name": "user_id", "type": "InputUser", "comment": "User ID to be added" }, { "name": "fwd_limit", "type": "int", "comment": "Number of last messages to be forwarded" }], "throws": [{ "code": 400, "name": "BOT_GROUPS_BLOCKED", "comment": "This bot can't be added to groups." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USERS_TOO_MUCH", "comment": "The maximum number of users has been exceeded (to create a chat, for example)." }, { "code": 400, "name": "USER_ALREADY_PARTICIPANT", "comment": "The user is already in the group." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }, { "code": 400, "name": "USER_IS_BLOCKED", "comment": "You were blocked by this user." }, { "code": 403, "name": "USER_NOT_MUTUAL_CONTACT", "comment": "The provided user is not a mutual contact." }, { "code": 403, "name": "USER_PRIVACY_RESTRICTED", "comment": "The user's privacy settings do not allow you to do this." }, { "code": 400, "name": "YOU_BLOCKED_USER", "comment": "You blocked this user." }], "available": "user" }, { "kind": "method", "name": "messages.deleteChatUser", "type": "Updates", "id": 2719505579, "comment": "Deletes a user from a chat and sends a service message on it.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "revoke_history", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Remove the entire chat history of the specified user in this chat." }, { "name": "chat_id", "type": "int53", "comment": "Chat ID" }, { "name": "user_id", "type": "InputUser", "comment": "User ID to be deleted" }], "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }, { "code": 400, "name": "USER_NOT_PARTICIPANT", "comment": "You're not a member of this supergroup/channel." }], "available": "both" }, { "kind": "method", "name": "messages.createChat", "type": "messages.InvitedUsers", "typeModifiers": { "constructorId": 2136862630 }, "id": 2463030740, "comment": "Creates a new chat.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "users", "type": "InputUser", "typeModifiers": { "isVector": true }, "comment": "List of user IDs to be invited" }, { "name": "title", "type": "string", "comment": "Chat name" }, { "name": "ttl_period", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Time-to-live of all messages that will be sent in the chat: once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. You can use {@link messages.RawSetDefaultHistoryTTLRequest} to edit this value later." }], "throws": [{ "code": 500, "name": "CHAT_ID_GENERATE_FAILED", "comment": "Failure while generating the chat ID." }, { "code": 400, "name": "CHAT_INVALID", "comment": "Invalid chat." }, { "code": 400, "name": "CHAT_TITLE_EMPTY", "comment": "No chat title provided." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "TTL_PERIOD_INVALID", "comment": "The specified TTL period is invalid." }, { "code": 400, "name": "USERS_TOO_FEW", "comment": "Not enough users (to create a chat, for example)." }, { "code": 406, "name": "USER_RESTRICTED", "comment": "You're spamreported, you can't create channels or chats." }], "available": "user" }, { "kind": "method", "name": "messages.getDhConfig", "type": "messages.DhConfig", "id": 651135312, "comment": "Returns configuration parameters for Diffie-Hellman key generation. Can also return a random sequence of bytes of required length.", "arguments": [{ "name": "version", "type": "int", "comment": "Value of the version parameter from {@link messages.RawDhConfig}, available at the client" }, { "name": "random_length", "type": "int", "comment": "Length of the required random sequence" }], "throws": [{ "code": 400, "name": "RANDOM_LENGTH_INVALID", "comment": "Random length invalid." }], "available": "user" }, { "kind": "method", "name": "messages.requestEncryption", "type": "EncryptedChat", "id": 4132286275, "comment": "Sends a request to start a secret chat to the user.", "arguments": [{ "name": "user_id", "type": "InputUser", "comment": "User ID" }, { "name": "random_id", "type": "int", "comment": "Unique client request ID required to prevent resending. This also doubles as the chat ID." }, { "name": "g_a", "type": "bytes", "comment": "A = g ^ a mod p, see Wikipedia" }], "throws": [{ "code": 400, "name": "DH_G_A_INVALID", "comment": "g_a invalid." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.acceptEncryption", "type": "EncryptedChat", "id": 1035731989, "comment": "Confirms creation of a secret chat", "arguments": [{ "name": "peer", "type": "InputEncryptedChat", "comment": "Secret chat ID" }, { "name": "g_b", "type": "bytes", "comment": "B = g ^ b mod p, see Wikipedia" }, { "name": "key_fingerprint", "type": "long", "comment": "64-bit fingerprint of the received key" }], "throws": [{ "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "ENCRYPTION_ALREADY_ACCEPTED", "comment": "Secret chat already accepted." }, { "code": 400, "name": "ENCRYPTION_ALREADY_DECLINED", "comment": "The secret chat was already declined." }], "available": "user" }, { "kind": "method", "name": "messages.discardEncryption", "type": "Bool", "id": 4086541984, "comment": "Cancels a request for creation and/or delete info on secret chat.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "delete_history", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to delete the entire chat history for the other user as well" }, { "name": "chat_id", "type": "int", "comment": "Secret chat ID" }], "throws": [{ "code": 400, "name": "CHAT_ID_EMPTY", "comment": "The provided chat ID is empty." }, { "code": 400, "name": "ENCRYPTION_ALREADY_ACCEPTED", "comment": "Secret chat already accepted." }, { "code": 400, "name": "ENCRYPTION_ALREADY_DECLINED", "comment": "The secret chat was already declined." }, { "code": 400, "name": "ENCRYPTION_ID_INVALID", "comment": "The provided secret chat ID is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.setEncryptedTyping", "type": "Bool", "id": 2031374829, "comment": "Send typing event by the current user to a secret chat.", "arguments": [{ "name": "peer", "type": "InputEncryptedChat", "comment": "Secret chat ID" }, { "name": "typing", "type": "Bool", "comment": "Typing.
Possible values:
true, if the user started typing and more than 5 seconds have passed since the last request
false, if the user stopped typing" }], "throws": [{ "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.readEncryptedHistory", "type": "Bool", "id": 2135648522, "comment": "Marks message history within a secret chat as read.", "arguments": [{ "name": "peer", "type": "InputEncryptedChat", "comment": "Secret chat ID" }, { "name": "max_date", "type": "int", "comment": "Maximum date value for received messages in history" }], "throws": [{ "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "MAX_DATE_INVALID", "comment": "The specified maximum date is invalid." }, { "code": 400, "name": "MSG_WAIT_FAILED", "comment": "A waiting call returned an error." }], "available": "user" }, { "kind": "method", "name": "messages.sendEncrypted", "type": "messages.SentEncryptedMessage", "id": 1157265941, "comment": "Sends a text message to a secret chat.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "silent", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Send encrypted message without a notification" }, { "name": "peer", "type": "InputEncryptedChat", "comment": "Secret chat ID" }, { "name": "random_id", "type": "long", "comment": "Unique client message ID, necessary to avoid message resending" }, { "name": "data", "type": "bytes", "comment": "TL-serialization of DecryptedMessage type, encrypted with a key that was created during chat initialization" }], "throws": [{ "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "DATA_INVALID", "comment": "Encrypted data invalid." }, { "code": 400, "name": "DATA_TOO_LONG", "comment": "Data too long." }, { "code": 400, "name": "ENCRYPTION_DECLINED", "comment": "The secret chat was declined." }, { "code": 500, "name": "MSG_WAIT_FAILED", "comment": "A waiting call returned an error." }, { "code": 403, "name": "USER_IS_BLOCKED", "comment": "You were blocked by this user." }], "available": "user" }, { "kind": "method", "name": "messages.sendEncryptedFile", "type": "messages.SentEncryptedMessage", "id": 1431914525, "comment": "Sends a message with a file attachment to a secret chat", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "silent", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to send the file without triggering a notification" }, { "name": "peer", "type": "InputEncryptedChat", "comment": "Secret chat ID" }, { "name": "random_id", "type": "long", "comment": "Unique client message ID necessary to prevent message resending" }, { "name": "data", "type": "bytes", "comment": "TL-serialization of DecryptedMessage type, encrypted with a key generated during chat initialization" }, { "name": "file", "type": "InputEncryptedFile", "comment": "File attachment for the secret chat" }], "throws": [{ "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "DATA_TOO_LONG", "comment": "Data too long." }, { "code": 400, "name": "ENCRYPTION_DECLINED", "comment": "The secret chat was declined." }, { "code": 400, "name": "FILE_EMTPY", "comment": "An empty file was provided." }, { "code": 400, "name": "MD5_CHECKSUM_INVALID", "comment": "The MD5 checksums do not match." }, { "code": 400, "name": "MSG_WAIT_FAILED", "comment": "A waiting call returned an error." }], "available": "user" }, { "kind": "method", "name": "messages.sendEncryptedService", "type": "messages.SentEncryptedMessage", "id": 852769188, "comment": "Sends a service message to a secret chat.", "arguments": [{ "name": "peer", "type": "InputEncryptedChat", "comment": "Secret chat ID" }, { "name": "random_id", "type": "long", "comment": "Unique client message ID required to prevent message resending" }, { "name": "data", "type": "bytes", "comment": "TL-serialization of DecryptedMessage type, encrypted with a key generated during chat initialization" }], "throws": [{ "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "DATA_INVALID", "comment": "Encrypted data invalid." }, { "code": 400, "name": "ENCRYPTION_DECLINED", "comment": "The secret chat was declined." }, { "code": 400, "name": "ENCRYPTION_ID_INVALID", "comment": "The provided secret chat ID is invalid." }, { "code": 500, "name": "MSG_WAIT_FAILED", "comment": "A waiting call returned an error." }, { "code": 403, "name": "USER_DELETED", "comment": "You can't send this secret message because the other participant deleted their account." }, { "code": 403, "name": "USER_IS_BLOCKED", "comment": "You were blocked by this user." }], "available": "user" }, { "kind": "method", "name": "messages.receivedQueue", "type": "long", "typeModifiers": { "isVector": true }, "id": 1436924774, "comment": "Confirms receipt of messages in a secret chat by client, cancels push notifications.
\nThe method returns a list of random_ids of messages for which push notifications were cancelled.", "arguments": [{ "name": "max_qts", "type": "int", "comment": "Maximum qts value available at the client" }], "throws": [{ "code": 400, "name": "MAX_QTS_INVALID", "comment": "The specified max_qts is invalid." }, { "code": 500, "name": "MSG_WAIT_FAILED", "comment": "A waiting call returned an error." }], "available": "user" }, { "kind": "method", "name": "messages.reportEncryptedSpam", "type": "Bool", "id": 1259113487, "comment": "Report a secret chat for spam", "arguments": [{ "name": "peer", "type": "InputEncryptedChat", "comment": "The secret chat to report" }], "throws": [{ "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.readMessageContents", "type": "messages.AffectedMessages", "typeModifiers": { "constructorId": 2228326789 }, "id": 916930423, "comment": "Notifies the sender about the recipient having listened a voice message or watched a video.", "arguments": [{ "name": "id", "type": "int", "typeModifiers": { "isVector": true }, "comment": "Message ID list" }], "available": "user" }, { "kind": "method", "name": "messages.getStickers", "type": "messages.Stickers", "id": 3584414625, "comment": "Get stickers by emoji", "arguments": [{ "name": "emoticon", "type": "string", "comment": "The emoji" }, { "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "throws": [{ "code": 400, "name": "EMOTICON_EMPTY", "comment": "The emoji is empty." }], "available": "user" }, { "kind": "method", "name": "messages.getAllStickers", "type": "messages.AllStickers", "id": 3097534888, "comment": "Get all installed stickers", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "messages.getWebPagePreview", "type": "MessageMedia", "id": 2338894028, "comment": "Get preview of webpage", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "message", "type": "string", "comment": "Message from which to extract the preview" }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.3", "isVector": true }, "comment": "Message entities for styled text" }], "throws": [{ "code": 400, "name": "ENTITY_BOUNDS_INVALID", "comment": "A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length." }, { "code": 400, "name": "MESSAGE_EMPTY", "comment": "The provided message is empty." }], "available": "user" }, { "kind": "method", "name": "messages.exportChatInvite", "type": "ExportedChatInvite", "id": 2687296981, "comment": "Export an invite link for a chat", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "legacy_revoke_permanent", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Legacy flag, reproducing legacy behavior of this method: if set, revokes all previous links before creating a new one. Kept for bot API BC, should not be used by modern clients." }, { "name": "request_needed", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether admin confirmation is required before admitting each separate user into the chat" }, { "name": "peer", "type": "InputPeer", "comment": "Chat" }, { "name": "expire_date", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Expiration date" }, { "name": "usage_limit", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Maximum number of users that can join using this link" }, { "name": "title", "type": "string", "typeModifiers": { "predicate": "flags.4" }, "comment": "Description of the invite link, visible only to administrators" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "EXPIRE_DATE_INVALID", "comment": "The specified expiration date is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USAGE_LIMIT_INVALID", "comment": "The specified usage limit is invalid." }], "available": "both" }, { "kind": "method", "name": "messages.checkChatInvite", "type": "ChatInvite", "id": 1051570619, "comment": "Check the validity of a chat invite link and get basic info about it", "arguments": [{ "name": "hash", "type": "string", "comment": "Invite hash from chat invite deep link »." }], "throws": [{ "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "INVITE_HASH_EMPTY", "comment": "The invite hash is empty." }, { "code": 406, "name": "INVITE_HASH_EXPIRED", "comment": "The invite link has expired." }, { "code": 400, "name": "INVITE_HASH_INVALID", "comment": "The invite hash is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.importChatInvite", "type": "Updates", "id": 1817183516, "comment": "Import a chat invite and join a private chat/supergroup/channel", "arguments": [{ "name": "hash", "type": "string", "comment": "hash from a chat invite deep link" }], "throws": [{ "code": 400, "name": "CHANNELS_TOO_MUCH", "comment": "You have joined too many channels/supergroups." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_INVALID", "comment": "Invalid chat." }, { "code": 400, "name": "INVITE_HASH_EMPTY", "comment": "The invite hash is empty." }, { "code": 406, "name": "INVITE_HASH_EXPIRED", "comment": "The invite link has expired." }, { "code": 400, "name": "INVITE_HASH_INVALID", "comment": "The invite hash is invalid." }, { "code": 400, "name": "INVITE_REQUEST_SENT", "comment": "You have successfully requested to join this chat or channel." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USERS_TOO_MUCH", "comment": "The maximum number of users has been exceeded (to create a chat, for example)." }, { "code": 400, "name": "USER_ALREADY_PARTICIPANT", "comment": "The user is already in the group." }, { "code": 400, "name": "USER_CHANNELS_TOO_MUCH", "comment": "One of the users you tried to add is already in too many channels/supergroups." }], "available": "user" }, { "kind": "method", "name": "messages.getStickerSet", "type": "messages.StickerSet", "id": 3365989492, "comment": "Get info about a stickerset", "arguments": [{ "name": "stickerset", "type": "InputStickerSet", "comment": "Stickerset" }, { "name": "hash", "type": "int", "comment": "Hash used for caching, for more info click here" }], "throws": [{ "code": 400, "name": "EMOTICON_STICKERPACK_MISSING", "comment": "inputStickerSetDice.emoji cannot be empty." }, { "code": 406, "name": "STICKERSET_INVALID", "comment": "The provided sticker set is invalid." }], "available": "both" }, { "kind": "method", "name": "messages.installStickerSet", "type": "messages.StickerSetInstallResult", "id": 3348096096, "comment": "Install a stickerset", "arguments": [{ "name": "stickerset", "type": "InputStickerSet", "comment": "Stickerset to install" }, { "name": "archived", "type": "Bool", "comment": "Whether to archive stickerset" }], "throws": [{ "code": 406, "name": "STICKERSET_INVALID", "comment": "The provided sticker set is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.uninstallStickerSet", "type": "Bool", "id": 4184757726, "comment": "Uninstall a stickerset", "arguments": [{ "name": "stickerset", "type": "InputStickerSet", "comment": "The stickerset to uninstall" }], "throws": [{ "code": 406, "name": "STICKERSET_INVALID", "comment": "The provided sticker set is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.startBot", "type": "Updates", "id": 3873403768, "comment": "Start a conversation with a bot using a deep linking parameter", "arguments": [{ "name": "bot", "type": "InputUser", "comment": "The bot" }, { "name": "peer", "type": "InputPeer", "comment": "The chat where to start the bot, can be the bot's private chat or a group" }, { "name": "random_id", "type": "long", "comment": "Random ID to avoid resending the same message" }, { "name": "start_param", "type": "string", "comment": "Deep linking parameter" }], "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 500, "name": "RANDOM_ID_DUPLICATE", "comment": "You provided a random ID that was already used." }, { "code": 400, "name": "START_PARAM_EMPTY", "comment": "The start parameter is empty." }, { "code": 400, "name": "START_PARAM_INVALID", "comment": "Start parameter invalid." }, { "code": 400, "name": "START_PARAM_TOO_LONG", "comment": "Start parameter is too long." }], "available": "user" }, { "kind": "method", "name": "messages.getMessagesViews", "type": "messages.MessageViews", "typeModifiers": { "constructorId": 3066361155 }, "id": 1468322785, "comment": "Get and increase the view counter of a message sent or forwarded from a channel", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer where the message was found" }, { "name": "id", "type": "int", "typeModifiers": { "isVector": true }, "comment": "ID of message" }, { "name": "increment", "type": "Bool", "comment": "Whether to mark the message as viewed and increment the view counter" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.editChatAdmin", "type": "Bool", "id": 2824589762, "comment": "Make a user admin in a basic group.", "arguments": [{ "name": "chat_id", "type": "int53", "comment": "The ID of the group" }, { "name": "user_id", "type": "InputUser", "comment": "The user to make admin" }, { "name": "is_admin", "type": "Bool", "comment": "Whether to make them admin" }], "throws": [{ "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }, { "code": 400, "name": "USER_NOT_PARTICIPANT", "comment": "You're not a member of this supergroup/channel." }], "available": "user" }, { "kind": "method", "name": "messages.migrateChat", "type": "Updates", "id": 2726777625, "comment": "Turn a basic group into a supergroup", "arguments": [{ "name": "chat_id", "type": "int53", "comment": "Basic group to migrate" }], "throws": [{ "code": 400, "name": "CHANNELS_TOO_MUCH", "comment": "You have joined too many channels/supergroups." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 500, "name": "CHAT_INVALID", "comment": "Invalid chat." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.searchGlobal", "type": "messages.Messages", "id": 1271290010, "comment": "Search for messages and peers globally", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "broadcasts_only", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "If set, only returns results from channels (used in the global channel search tab »)." }, { "name": "folder_id", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Peer folder ID, for more info click here" }, { "name": "q", "type": "string", "comment": "Query" }, { "name": "filter", "type": "MessagesFilter", "comment": "Global search filter" }, { "name": "min_date", "type": "int", "comment": "If a positive value was specified, the method will return only messages with date bigger than min_date" }, { "name": "max_date", "type": "int", "comment": "If a positive value was transferred, the method will return only messages with date smaller than max_date" }, { "name": "offset_rate", "type": "int", "comment": "Initially 0, then set to the {@link messages.RawMessagesSlice}" }, { "name": "offset_peer", "type": "InputPeer", "comment": "Offsets for pagination, for more info click here" }, { "name": "offset_id", "type": "int", "comment": "Offsets for pagination, for more info click here" }, { "name": "limit", "type": "int", "comment": "Offsets for pagination, for more info click here" }], "throws": [{ "code": 400, "name": "FOLDER_ID_INVALID", "comment": "Invalid folder ID." }, { "code": 400, "name": "INPUT_FILTER_INVALID", "comment": "The specified filter is invalid." }, { "code": 400, "name": "SEARCH_QUERY_EMPTY", "comment": "The search query is empty." }], "available": "user" }, { "kind": "method", "name": "messages.reorderStickerSets", "type": "Bool", "id": 2016638777, "comment": "Reorder installed stickersets", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "masks", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Reorder mask stickersets" }, { "name": "emojis", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Reorder custom emoji stickersets" }, { "name": "order", "type": "long", "typeModifiers": { "isVector": true }, "comment": "New stickerset order by stickerset IDs" }], "available": "user" }, { "kind": "method", "name": "messages.getDocumentByHash", "type": "Document", "id": 2985428511, "comment": "Get a document by its SHA256 hash, mainly used for gifs", "arguments": [{ "name": "sha256", "type": "bytes", "comment": "SHA256 of file" }, { "name": "size", "type": "int53", "comment": "Size of the file in bytes" }, { "name": "mime_type", "type": "string", "comment": "Mime type" }], "throws": [{ "code": 400, "name": "SHA256_HASH_INVALID", "comment": "The provided SHA256 hash is invalid." }], "available": "both" }, { "kind": "method", "name": "messages.getSavedGifs", "type": "messages.SavedGifs", "id": 1559270965, "comment": "Get saved GIFs.", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "messages.saveGif", "type": "Bool", "id": 846868683, "comment": "Add GIF to saved gifs list", "arguments": [{ "name": "id", "type": "InputDocument", "comment": "GIF to save" }, { "name": "unsave", "type": "Bool", "comment": "Whether to remove GIF from saved gifs list" }], "throws": [{ "code": 400, "name": "GIF_ID_INVALID", "comment": "The provided GIF ID is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getInlineBotResults", "type": "messages.BotResults", "typeModifiers": { "constructorId": 3760321270 }, "id": 1364105629, "comment": "Query an inline bot", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "bot", "type": "InputUser", "comment": "The bot to query" }, { "name": "peer", "type": "InputPeer", "comment": "The currently opened chat" }, { "name": "geo_point", "type": "InputGeoPoint", "typeModifiers": { "predicate": "flags.0" }, "comment": "The geolocation, if requested" }, { "name": "query", "type": "string", "comment": "The query" }, { "name": "offset", "type": "string", "comment": "The offset within the results, will be passed directly as-is to the bot." }], "throws": [{ "code": 400, "name": "BOT_INLINE_DISABLED", "comment": "This bot can't be used in inline mode." }, { "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }, { "code": 400, "name": "BOT_RESPONSE_TIMEOUT", "comment": "A timeout occurred while fetching data from the bot." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": -503, "name": "Timeout", "comment": "Timeout while fetching data." }], "available": "user" }, { "kind": "method", "name": "messages.setInlineBotResults", "type": "Bool", "id": 3138561049, "comment": "Answer an inline query, for bots only", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "gallery", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Set this flag if the results are composed of media files" }, { "name": "private", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Set this flag if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query" }, { "name": "query_id", "type": "long", "comment": "Unique identifier for the answered query" }, { "name": "results", "type": "InputBotInlineResult", "typeModifiers": { "isVector": true }, "comment": "Vector of results for the inline query" }, { "name": "cache_time", "type": "int", "comment": "The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300." }, { "name": "next_offset", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes." }, { "name": "switch_pm", "type": "InlineBotSwitchPM", "typeModifiers": { "predicate": "flags.3" }, "comment": "If passed, clients will display a button on top of the remaining inline result list with the specified text, that switches the user to a private chat with the bot and sends the bot a start message with a certain parameter." }, { "name": "switch_webview", "type": "InlineBotWebView", "typeModifiers": { "predicate": "flags.4" }, "comment": "If passed, clients will display a button on top of the remaining inline result list with the specified text, that switches the user to the specified inline mode mini app." }], "throws": [{ "code": 400, "name": "ARTICLE_TITLE_EMPTY", "comment": "The title of the article is empty." }, { "code": 400, "name": "AUDIO_CONTENT_URL_EMPTY", "comment": "The remote URL specified in the content field is empty." }, { "code": 400, "name": "AUDIO_TITLE_EMPTY", "comment": "An empty audio title was provided." }, { "code": 400, "name": "BUTTON_DATA_INVALID", "comment": "The data of one or more of the buttons you provided is invalid." }, { "code": 400, "name": "BUTTON_TYPE_INVALID", "comment": "The type of one or more of the buttons you provided is invalid." }, { "code": 400, "name": "BUTTON_URL_INVALID", "comment": "Button URL invalid." }, { "code": 400, "name": "DOCUMENT_INVALID", "comment": "The specified document is invalid." }, { "code": 400, "name": "FILE_CONTENT_TYPE_INVALID", "comment": "File content-type is invalid." }, { "code": 400, "name": "FILE_TITLE_EMPTY", "comment": "An empty file title was specified." }, { "code": 400, "name": "GIF_CONTENT_TYPE_INVALID", "comment": "GIF content-type invalid." }, { "code": 400, "name": "MESSAGE_EMPTY", "comment": "The provided message is empty." }, { "code": 400, "name": "MESSAGE_TOO_LONG", "comment": "The provided message is too long." }, { "code": 400, "name": "NEXT_OFFSET_INVALID", "comment": "The specified offset is longer than 64 bytes." }, { "code": 400, "name": "PHOTO_CONTENT_TYPE_INVALID", "comment": "Photo mime-type invalid." }, { "code": 400, "name": "PHOTO_CONTENT_URL_EMPTY", "comment": "Photo URL invalid." }, { "code": 400, "name": "PHOTO_INVALID", "comment": "Photo invalid." }, { "code": 400, "name": "PHOTO_THUMB_URL_EMPTY", "comment": "Photo thumbnail URL is empty." }, { "code": 400, "name": "QUERY_ID_INVALID", "comment": "The query ID is invalid." }, { "code": 400, "name": "REPLY_MARKUP_INVALID", "comment": "The provided reply markup is invalid." }, { "code": 400, "name": "RESULTS_TOO_MUCH", "comment": "Too many results were provided." }, { "code": 400, "name": "RESULT_ID_DUPLICATE", "comment": "You provided a duplicate result ID." }, { "code": 400, "name": "RESULT_ID_INVALID", "comment": "One of the specified result IDs is invalid." }, { "code": 400, "name": "RESULT_TYPE_INVALID", "comment": "Result type invalid." }, { "code": 400, "name": "SEND_MESSAGE_MEDIA_INVALID", "comment": "Invalid media provided." }, { "code": 400, "name": "SEND_MESSAGE_TYPE_INVALID", "comment": "The message type is invalid." }, { "code": 400, "name": "START_PARAM_EMPTY", "comment": "The start parameter is empty." }, { "code": 400, "name": "START_PARAM_INVALID", "comment": "Start parameter invalid." }, { "code": 400, "name": "STICKER_DOCUMENT_INVALID", "comment": "The specified sticker document is invalid." }, { "code": 400, "name": "SWITCH_PM_TEXT_EMPTY", "comment": "The switch_pm.text field was empty." }, { "code": 400, "name": "SWITCH_WEBVIEW_URL_INVALID", "comment": "The URL specified in switch_webview.url is invalid!" }, { "code": 400, "name": "URL_INVALID", "comment": "Invalid URL provided." }, { "code": 403, "name": "USER_BOT_INVALID", "comment": "User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }, { "code": 400, "name": "VIDEO_TITLE_EMPTY", "comment": "The specified video title is empty." }, { "code": 400, "name": "WEBDOCUMENT_INVALID", "comment": "Invalid webdocument URL provided." }, { "code": 400, "name": "WEBDOCUMENT_MIME_INVALID", "comment": "Invalid webdocument mime type provided." }, { "code": 400, "name": "WEBDOCUMENT_SIZE_TOO_BIG", "comment": "Webdocument is too big!" }, { "code": 400, "name": "WEBDOCUMENT_URL_INVALID", "comment": "The specified webdocument URL is invalid." }], "available": "bot" }, { "kind": "method", "name": "messages.sendInlineBotResult", "type": "Updates", "id": 1052698730, "comment": "Send a result obtained using {@link messages.RawGetInlineBotResultsRequest}.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "silent", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Whether to send the message silently (no notification will be triggered on the other client)" }, { "name": "background", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "Whether to send the message in background" }, { "name": "clear_draft", "type": "true", "typeModifiers": { "predicate": "flags.7" }, "comment": "Whether to clear the draft" }, { "name": "hide_via", "type": "true", "typeModifiers": { "predicate": "flags.11" }, "comment": "Whether to hide the via @botname in the resulting message (only for bot usernames encountered in the {@link RawConfig})" }, { "name": "peer", "type": "InputPeer", "comment": "Destination" }, { "name": "reply_to", "type": "InputReplyTo", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, indicates that the message should be sent in reply to the specified message or story." }, { "name": "random_id", "type": "long", "comment": "Random ID to avoid resending the same query" }, { "name": "query_id", "type": "long", "comment": "Query ID from {@link messages.RawGetInlineBotResultsRequest}" }, { "name": "id", "type": "string", "comment": "Result ID from {@link messages.RawGetInlineBotResultsRequest}" }, { "name": "schedule_date", "type": "int", "typeModifiers": { "predicate": "flags.10" }, "comment": "Scheduled message date for scheduled messages" }, { "name": "send_as", "type": "InputPeer", "typeModifiers": { "predicate": "flags.13" }, "comment": "Send this message as the specified peer" }, { "name": "quick_reply_shortcut", "type": "InputQuickReplyShortcut", "typeModifiers": { "predicate": "flags.17" }, "comment": "Add the message to the specified quick reply shortcut », instead." }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_GUEST_SEND_FORBIDDEN", "comment": "You join the discussion group before commenting, see here » for more info." }, { "code": 400, "name": "CHAT_RESTRICTED", "comment": "You can't send messages in this chat, you were restricted." }, { "code": 403, "name": "CHAT_SEND_AUDIOS_FORBIDDEN", "comment": "You can't send audio messages in this chat." }, { "code": 403, "name": "CHAT_SEND_GAME_FORBIDDEN", "comment": "You can't send a game to this chat." }, { "code": 403, "name": "CHAT_SEND_GIFS_FORBIDDEN", "comment": "You can't send gifs in this chat." }, { "code": 403, "name": "CHAT_SEND_INLINE_FORBIDDEN", "comment": "You can't send inline messages in this group." }, { "code": 403, "name": "CHAT_SEND_MEDIA_FORBIDDEN", "comment": "You can't send media in this chat." }, { "code": 403, "name": "CHAT_SEND_PHOTOS_FORBIDDEN", "comment": "You can't send photos in this chat." }, { "code": 403, "name": "CHAT_SEND_PLAIN_FORBIDDEN", "comment": "You can't send non-media (text) messages in this chat." }, { "code": 403, "name": "CHAT_SEND_STICKERS_FORBIDDEN", "comment": "You can't send stickers in this chat." }, { "code": 403, "name": "CHAT_SEND_VOICES_FORBIDDEN", "comment": "You can't send voice recordings in this chat." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "ENTITY_BOUNDS_INVALID", "comment": "A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length." }, { "code": 400, "name": "INLINE_RESULT_EXPIRED", "comment": "The inline query expired." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MEDIA_EMPTY", "comment": "The provided media object is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "QUERY_ID_EMPTY", "comment": "The query ID is empty." }, { "code": 400, "name": "QUICK_REPLIES_TOO_MUCH", "comment": "A maximum of appConfig.quick_replies_limit shortcuts may be created, the limit was reached." }, { "code": 500, "name": "RANDOM_ID_DUPLICATE", "comment": "You provided a random ID that was already used." }, { "code": 400, "name": "REPLY_MESSAGES_TOO_MUCH", "comment": "Each shortcut can contain a maximum of appConfig.quick_reply_messages_limit messages, the limit was reached." }, { "code": 400, "name": "RESULT_ID_EMPTY", "comment": "Result ID empty." }, { "code": 400, "name": "RESULT_ID_INVALID", "comment": "One of the specified result IDs is invalid." }, { "code": 400, "name": "SCHEDULE_DATE_TOO_LATE", "comment": "You can't schedule a message this far in the future." }, { "code": 400, "name": "SCHEDULE_TOO_MUCH", "comment": "There are too many scheduled messages." }, { "code": 500, "name": "SEND_MEDIA_INVALID", "comment": "The specified media is invalid." }, { "code": 420, "name": "SLOWMODE_WAIT_%d", "comment": "Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat." }, { "code": 400, "name": "TOPIC_DELETED", "comment": "The specified topic was deleted." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }, { "code": 400, "name": "VOICE_MESSAGES_FORBIDDEN", "comment": "This user's privacy settings forbid you from sending voice messages." }, { "code": 400, "name": "WEBPAGE_CURL_FAILED", "comment": "Failure while fetching the webpage with cURL." }, { "code": 400, "name": "WEBPAGE_MEDIA_EMPTY", "comment": "Webpage media empty." }, { "code": 400, "name": "YOU_BLOCKED_USER", "comment": "You blocked this user." }], "available": "user" }, { "kind": "method", "name": "messages.getMessageEditData", "type": "messages.MessageEditData", "typeModifiers": { "constructorId": 649453030 }, "id": 4255550774, "comment": "Find out if a media message's caption can be edited", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer where the media was sent" }, { "name": "id", "type": "int", "comment": "ID of message" }], "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 403, "name": "MESSAGE_AUTHOR_REQUIRED", "comment": "Message author required." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.editMessage", "type": "Updates", "id": 3755032581, "comment": "Edit message", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "no_webpage", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Disable webpage preview" }, { "name": "invert_media", "type": "true", "typeModifiers": { "predicate": "flags.16" }, "comment": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom." }, { "name": "peer", "type": "InputPeer", "comment": "Where was the message sent" }, { "name": "id", "type": "int", "comment": "ID of the message to edit" }, { "name": "message", "type": "string", "typeModifiers": { "predicate": "flags.11" }, "comment": "New message" }, { "name": "media", "type": "InputMedia", "typeModifiers": { "predicate": "flags.14" }, "comment": "New attached media" }, { "name": "reply_markup", "type": "ReplyMarkup", "typeModifiers": { "predicate": "flags.2" }, "comment": "Reply markup for inline keyboards" }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.3", "isVector": true }, "comment": "Message entities for styled text" }, { "name": "schedule_date", "type": "int", "typeModifiers": { "predicate": "flags.15" }, "comment": "Scheduled message date for scheduled messages" }, { "name": "quick_reply_shortcut_id", "type": "int", "typeModifiers": { "predicate": "flags.17" }, "comment": "If specified, edits a quick reply shortcut message, instead »." }], "throws": [{ "code": 400, "name": "BOT_DOMAIN_INVALID", "comment": "Bot domain invalid." }, { "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }, { "code": 400, "name": "BUTTON_DATA_INVALID", "comment": "The data of one or more of the buttons you provided is invalid." }, { "code": 400, "name": "BUTTON_TYPE_INVALID", "comment": "The type of one or more of the buttons you provided is invalid." }, { "code": 400, "name": "BUTTON_URL_INVALID", "comment": "Button URL invalid." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_FORWARDS_RESTRICTED", "comment": "You can't forward messages from a protected chat." }, { "code": 403, "name": "CHAT_SEND_GIFS_FORBIDDEN", "comment": "You can't send gifs in this chat." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "DOCUMENT_INVALID", "comment": "The specified document is invalid." }, { "code": 400, "name": "ENTITIES_TOO_LONG", "comment": "You provided too many styled message entities." }, { "code": 400, "name": "ENTITY_BOUNDS_INVALID", "comment": "A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length." }, { "code": 400, "name": "FILE_PARTS_INVALID", "comment": "The number of file parts is invalid." }, { "code": 400, "name": "IMAGE_PROCESS_FAILED", "comment": "Failure while processing image." }, { "code": 403, "name": "INLINE_BOT_REQUIRED", "comment": "Only the inline bot can edit message." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MEDIA_CAPTION_TOO_LONG", "comment": "The caption is too long." }, { "code": 400, "name": "MEDIA_EMPTY", "comment": "The provided media object is invalid." }, { "code": 400, "name": "MEDIA_GROUPED_INVALID", "comment": "You tried to send media of different types in an album." }, { "code": 400, "name": "MEDIA_INVALID", "comment": "Media invalid." }, { "code": 400, "name": "MEDIA_NEW_INVALID", "comment": "The new media is invalid." }, { "code": 400, "name": "MEDIA_PREV_INVALID", "comment": "Previous media invalid." }, { "code": 400, "name": "MEDIA_TTL_INVALID", "comment": "The specified media TTL is invalid." }, { "code": 403, "name": "MESSAGE_AUTHOR_REQUIRED", "comment": "Message author required." }, { "code": 400, "name": "MESSAGE_EDIT_TIME_EXPIRED", "comment": "You can't edit this message anymore, too much time has passed since its creation." }, { "code": 400, "name": "MESSAGE_EMPTY", "comment": "The provided message is empty." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "MESSAGE_NOT_MODIFIED", "comment": "The provided message data is identical to the previous message data, the message wasn't modified." }, { "code": 400, "name": "MESSAGE_TOO_LONG", "comment": "The provided message is too long." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 500, "name": "MSG_WAIT_FAILED", "comment": "A waiting call returned an error." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "REPLY_MARKUP_INVALID", "comment": "The provided reply markup is invalid." }, { "code": 400, "name": "REPLY_MARKUP_TOO_LONG", "comment": "The specified reply_markup is too long." }, { "code": 400, "name": "SCHEDULE_DATE_INVALID", "comment": "Invalid schedule date provided." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }, { "code": 400, "name": "WEBPAGE_NOT_FOUND", "comment": "A preview for the specified webpage url could not be generated." }], "available": "both" }, { "kind": "method", "name": "messages.editInlineBotMessage", "type": "Bool", "id": 2203418042, "comment": "Edit an inline bot message", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "no_webpage", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Disable webpage preview" }, { "name": "invert_media", "type": "true", "typeModifiers": { "predicate": "flags.16" }, "comment": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom." }, { "name": "id", "type": "InputBotInlineMessageID", "comment": "Sent inline message ID" }, { "name": "message", "type": "string", "typeModifiers": { "predicate": "flags.11" }, "comment": "Message" }, { "name": "media", "type": "InputMedia", "typeModifiers": { "predicate": "flags.14" }, "comment": "Media" }, { "name": "reply_markup", "type": "ReplyMarkup", "typeModifiers": { "predicate": "flags.2" }, "comment": "Reply markup for inline keyboards" }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.3", "isVector": true }, "comment": "Message entities for styled text" }], "throws": [{ "code": 400, "name": "BUTTON_DATA_INVALID", "comment": "The data of one or more of the buttons you provided is invalid." }, { "code": 400, "name": "ENTITY_BOUNDS_INVALID", "comment": "A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "MESSAGE_NOT_MODIFIED", "comment": "The provided message data is identical to the previous message data, the message wasn't modified." }], "available": "both" }, { "kind": "method", "name": "messages.getBotCallbackAnswer", "type": "messages.BotCallbackAnswer", "typeModifiers": { "constructorId": 911761060 }, "id": 2470627847, "comment": "Press an inline callback button and get a callback answer from the bot", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "game", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether this is a \"play game\" button" }, { "name": "peer", "type": "InputPeer", "comment": "Where was the inline keyboard sent" }, { "name": "msg_id", "type": "int", "comment": "ID of the Message with the inline keyboard" }, { "name": "data", "type": "bytes", "typeModifiers": { "predicate": "flags.0" }, "comment": "Callback data" }, { "name": "password", "type": "InputCheckPasswordSRP", "typeModifiers": { "predicate": "flags.2" }, "comment": "For buttons {@link RawKeyboardButtonCallback}, the SRP payload generated using SRP." }], "throws": [{ "code": 400, "name": "BOT_RESPONSE_TIMEOUT", "comment": "A timeout occurred while fetching data from the bot." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "DATA_INVALID", "comment": "Encrypted data invalid." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "PASSWORD_MISSING", "comment": "You must enable 2FA before executing this operation." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": -503, "name": "Timeout", "comment": "Timeout while fetching data." }], "available": "user" }, { "kind": "method", "name": "messages.setBotCallbackAnswer", "type": "Bool", "id": 3582923530, "comment": "Set the callback answer to a user button press (bots only)", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "alert", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether to show the message as a popup instead of a toast notification" }, { "name": "query_id", "type": "long", "comment": "Query ID" }, { "name": "message", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Popup to show" }, { "name": "url", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "URL to open" }, { "name": "cache_time", "type": "int", "comment": "Cache validity" }], "throws": [{ "code": 400, "name": "MESSAGE_TOO_LONG", "comment": "The provided message is too long." }, { "code": 400, "name": "QUERY_ID_INVALID", "comment": "The query ID is invalid." }, { "code": 400, "name": "URL_INVALID", "comment": "Invalid URL provided." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, { "kind": "method", "name": "messages.getPeerDialogs", "type": "messages.PeerDialogs", "typeModifiers": { "constructorId": 863093588 }, "id": 3832593661, "comment": "Get dialog info of specified peers", "arguments": [{ "name": "peers", "type": "InputDialogPeer", "typeModifiers": { "isVector": true }, "comment": "Peers" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.saveDraft", "type": "Bool", "id": 3547514318, "comment": "Save a message draft associated to a chat.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "no_webpage", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Disable generation of the webpage preview" }, { "name": "invert_media", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom." }, { "name": "reply_to", "type": "InputReplyTo", "typeModifiers": { "predicate": "flags.4" }, "comment": "If set, indicates that the message should be sent in reply to the specified message or story." }, { "name": "peer", "type": "InputPeer", "comment": "Destination of the message that should be sent" }, { "name": "message", "type": "string", "comment": "The draft" }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.3", "isVector": true }, "comment": "Message entities for styled text" }, { "name": "media", "type": "InputMedia", "typeModifiers": { "predicate": "flags.5" }, "comment": "Attached media" }, { "name": "effect", "type": "long", "typeModifiers": { "predicate": "flags.7" }, "comment": "Specifies a message effect » to use for the message." }], "throws": [{ "code": 400, "name": "ENTITY_BOUNDS_INVALID", "comment": "A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getAllDrafts", "type": "Updates", "id": 1782549861, "comment": "Return all message drafts.
\nReturns all the latest {@link RawUpdateDraftMessage} updates related to all chats with drafts.", "arguments": [], "available": "user" }, { "kind": "method", "name": "messages.getFeaturedStickers", "type": "messages.FeaturedStickers", "id": 1685588756, "comment": "Get featured stickers", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "messages.readFeaturedStickers", "type": "Bool", "id": 1527873830, "comment": "Mark new featured stickers as read", "arguments": [{ "name": "id", "type": "long", "typeModifiers": { "isVector": true }, "comment": "IDs of stickersets to mark as read" }], "available": "user" }, { "kind": "method", "name": "messages.getRecentStickers", "type": "messages.RecentStickers", "id": 2645114939, "comment": "Get recent stickers", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "attached", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Get stickers recently attached to photo or video files" }, { "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "messages.saveRecentSticker", "type": "Bool", "id": 958863608, "comment": "Add/remove sticker from recent stickers list", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "attached", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to add/remove stickers recently attached to photo or video files" }, { "name": "id", "type": "InputDocument", "comment": "Sticker" }, { "name": "unsave", "type": "Bool", "comment": "Whether to save or unsave the sticker" }], "throws": [{ "code": 400, "name": "STICKER_ID_INVALID", "comment": "The provided sticker ID is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.clearRecentStickers", "type": "Bool", "id": 2308530221, "comment": "Clear recent stickers", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "attached", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Set this flag to clear the list of stickers recently attached to photo or video files" }], "available": "user" }, { "kind": "method", "name": "messages.getArchivedStickers", "type": "messages.ArchivedStickers", "typeModifiers": { "constructorId": 1338747336 }, "id": 1475442322, "comment": "Get all archived stickers", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "masks", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Get mask stickers" }, { "name": "emojis", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Get custom emoji stickers" }, { "name": "offset_id", "type": "long", "comment": "Offsets for pagination, for more info click here" }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }], "available": "user" }, { "kind": "method", "name": "messages.getMaskStickers", "type": "messages.AllStickers", "id": 1678738104, "comment": "Get installed mask stickers", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "messages.getAttachedStickers", "type": "StickerSetCovered", "typeModifiers": { "isVector": true }, "id": 3428542412, "comment": "Get stickers attached to a photo or video", "arguments": [{ "name": "media", "type": "InputStickeredMedia", "comment": "Stickered media" }], "throws": [{ "code": 400, "name": "MEDIA_EMPTY", "comment": "The provided media object is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.setGameScore", "type": "Updates", "id": 2398678208, "comment": "Use this method to set the score of the specified user in a game sent as a normal message (bots only).", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "edit_message", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Set this flag if the game message should be automatically edited to include the current scoreboard" }, { "name": "force", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Set this flag if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters" }, { "name": "peer", "type": "InputPeer", "comment": "Unique identifier of target chat" }, { "name": "id", "type": "int", "comment": "Identifier of the sent message" }, { "name": "user_id", "type": "InputUser", "comment": "User identifier" }, { "name": "score", "type": "int", "comment": "New score" }], "throws": [{ "code": 400, "name": "BOT_SCORE_NOT_MODIFIED", "comment": "The score wasn't modified." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "SCORE_INVALID", "comment": "The specified game score is invalid." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, { "kind": "method", "name": "messages.setInlineGameScore", "type": "Bool", "id": 363700068, "comment": "Use this method to set the score of the specified user in a game sent as an inline message (bots only).", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "edit_message", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Set this flag if the game message should be automatically edited to include the current scoreboard" }, { "name": "force", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Set this flag if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters" }, { "name": "id", "type": "InputBotInlineMessageID", "comment": "ID of the inline message" }, { "name": "user_id", "type": "InputUser", "comment": "User identifier" }, { "name": "score", "type": "int", "comment": "New score" }], "throws": [{ "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, { "kind": "method", "name": "messages.getGameHighScores", "type": "messages.HighScores", "typeModifiers": { "constructorId": 2587622809 }, "id": 3894568093, "comment": "Get highscores of a game", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Where was the game sent" }, { "name": "id", "type": "int", "comment": "ID of message with game media attachment" }, { "name": "user_id", "type": "InputUser", "comment": "Get high scores made by a certain user" }], "throws": [{ "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, { "kind": "method", "name": "messages.getInlineGameHighScores", "type": "messages.HighScores", "typeModifiers": { "constructorId": 2587622809 }, "id": 258170395, "comment": "Get highscores of a game sent using an inline bot", "arguments": [{ "name": "id", "type": "InputBotInlineMessageID", "comment": "ID of inline message" }, { "name": "user_id", "type": "InputUser", "comment": "Get high scores of a certain user" }], "throws": [{ "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, { "kind": "method", "name": "messages.getCommonChats", "type": "messages.Chats", "id": 3826032900, "comment": "Get chats in common with a user", "arguments": [{ "name": "user_id", "type": "InputUser", "comment": "User ID" }, { "name": "max_id", "type": "int53", "comment": "Maximum ID of chat to return (see pagination)" }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }], "throws": [{ "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getWebPage", "type": "messages.WebPage", "typeModifiers": { "constructorId": 4250800829 }, "id": 2375455395, "comment": "Get instant view page", "arguments": [{ "name": "url", "type": "string", "comment": "URL of IV page to fetch" }, { "name": "hash", "type": "int", "comment": "Hash used for caching, for more info click here.
Note: the usual hash generation algorithm cannot be used in this case, please re-use the {@link RawWebPage}.hash field returned by a previous call to the method, or pass 0 if this is the first call or if the previous call did not return a {@link RawWebPage}." }], "throws": [{ "code": 400, "name": "WC_CONVERT_URL_INVALID", "comment": "WC convert URL invalid." }], "available": "user" }, { "kind": "method", "name": "messages.toggleDialogPin", "type": "Bool", "id": 2805064279, "comment": "Pin/unpin a dialog", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "pinned", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to pin or unpin the dialog" }, { "name": "peer", "type": "InputDialogPeer", "comment": "The dialog to pin" }], "throws": [{ "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "PEER_HISTORY_EMPTY", "comment": "You can't pin an empty chat with a user." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "PINNED_DIALOGS_TOO_MUCH", "comment": "Too many pinned dialogs." }], "available": "user" }, { "kind": "method", "name": "messages.reorderPinnedDialogs", "type": "Bool", "id": 991616823, "comment": "Reorder pinned dialogs", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "force", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, dialogs pinned server-side but not present in the order field will be unpinned." }, { "name": "folder_id", "type": "int", "comment": "Peer folder ID, for more info click here" }, { "name": "order", "type": "InputDialogPeer", "typeModifiers": { "isVector": true }, "comment": "New dialog order" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getPinnedDialogs", "type": "messages.PeerDialogs", "typeModifiers": { "constructorId": 863093588 }, "id": 3602468338, "comment": "Get pinned dialogs", "arguments": [{ "name": "folder_id", "type": "int", "comment": "Peer folder ID, for more info click here" }], "throws": [{ "code": 400, "name": "FOLDER_ID_INVALID", "comment": "Invalid folder ID." }], "available": "user" }, { "kind": "method", "name": "messages.setBotShippingResults", "type": "Bool", "id": 3858133754, "comment": "If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the bot will receive an {@link RawUpdateBotShippingQuery} update. Use this method to reply to shipping queries.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "query_id", "type": "long", "comment": "Unique identifier for the query to be answered" }, { "name": "error", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable\"). Telegram will display this message to the user." }, { "name": "shipping_options", "type": "ShippingOption", "typeModifiers": { "predicate": "flags.1", "isVector": true }, "comment": "A vector of available shipping options." }], "throws": [{ "code": 400, "name": "QUERY_ID_INVALID", "comment": "The query ID is invalid." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, { "kind": "method", "name": "messages.setBotPrecheckoutResults", "type": "Bool", "id": 163765653, "comment": "Once the user has confirmed their payment and shipping details, the bot receives an {@link RawUpdateBotPrecheckoutQuery} update.
\nUse this method to respond to such pre-checkout queries.
\nNote: Telegram must receive an answer within 10 seconds after the pre-checkout query was sent.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "success", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Set this flag if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order, otherwise do not set it, and set the error field, instead" }, { "name": "query_id", "type": "long", "comment": "Unique identifier for the query to be answered" }, { "name": "error", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Required if the success isn't set. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. \"Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!\"). Telegram will display this message to the user." }], "throws": [{ "code": 400, "name": "ERROR_TEXT_EMPTY", "comment": "The provided error message is empty." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, { "kind": "method", "name": "messages.uploadMedia", "type": "MessageMedia", "id": 345405816, "comment": "Upload a file and associate it to a chat (without actually sending it to the chat)", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "business_connection_id", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the media will be used only in the specified business connection », and not directly by the bot." }, { "name": "peer", "type": "InputPeer", "comment": "The chat, can be {@link RawInputPeerEmpty} for bots and {@link RawInputPeerSelf} for users." }, { "name": "media", "type": "InputMedia", "comment": "File uploaded in chunks as described in files »" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_RESTRICTED", "comment": "You can't send messages in this chat, you were restricted." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "FILE_PARTS_INVALID", "comment": "The number of file parts is invalid." }, { "code": 400, "name": "FILE_PART_LENGTH_INVALID", "comment": "The length of a file part is invalid." }, { "code": 400, "name": "IMAGE_PROCESS_FAILED", "comment": "Failure while processing image." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MEDIA_INVALID", "comment": "Media invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "PHOTO_EXT_INVALID", "comment": "The extension of the photo is invalid." }, { "code": 400, "name": "PHOTO_INVALID_DIMENSIONS", "comment": "The photo dimensions are invalid." }, { "code": 400, "name": "PHOTO_SAVE_FILE_INVALID", "comment": "Internal issues, try again later." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }, { "code": 400, "name": "WEBPAGE_CURL_FAILED", "comment": "Failure while fetching the webpage with cURL." }], "available": "both" }, { "kind": "method", "name": "messages.sendScreenshotNotification", "type": "Updates", "id": 2705348631, "comment": "Notify the other user in a private chat that a screenshot of the chat was taken", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Other user" }, { "name": "reply_to", "type": "InputReplyTo", "comment": "Indicates the message that was screenshotted (the specified message ID can also be 0 to avoid indicating any specific message)." }, { "name": "random_id", "type": "long", "comment": "Random ID to avoid message resending" }], "throws": [{ "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "REPLY_MESSAGE_ID_INVALID", "comment": "The specified reply-to message ID is invalid." }, { "code": 400, "name": "STORY_ID_INVALID", "comment": "The specified story ID is invalid." }, { "code": 400, "name": "YOU_BLOCKED_USER", "comment": "You blocked this user." }], "available": "user" }, { "kind": "method", "name": "messages.getFavedStickers", "type": "messages.FavedStickers", "id": 82946729, "comment": "Get faved stickers", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "messages.faveSticker", "type": "Bool", "id": 3120547163, "comment": "Mark or unmark a sticker as favorite", "arguments": [{ "name": "id", "type": "InputDocument", "comment": "Sticker in question" }, { "name": "unfave", "type": "Bool", "comment": "Whether to add or remove a sticker from favorites" }], "throws": [{ "code": 400, "name": "STICKER_ID_INVALID", "comment": "The provided sticker ID is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getUnreadMentions", "type": "messages.Messages", "id": 4043827088, "comment": "Get unread messages where we were mentioned", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "peer", "type": "InputPeer", "comment": "Peer where to look for mentions" }, { "name": "top_msg_id", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, considers only messages within the specified forum topic" }, { "name": "offset_id", "type": "int", "comment": "Offsets for pagination, for more info click here" }, { "name": "add_offset", "type": "int", "comment": "Offsets for pagination, for more info click here" }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }, { "name": "max_id", "type": "int", "comment": "Maximum message ID to return, see pagination" }, { "name": "min_id", "type": "int", "comment": "Minimum message ID to return, see pagination" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.readMentions", "type": "messages.AffectedHistory", "typeModifiers": { "constructorId": 3025955281 }, "id": 921026381, "comment": "Mark mentions as read", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "peer", "type": "InputPeer", "comment": "Dialog" }, { "name": "top_msg_id", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Mark as read only mentions within the specified forum topic" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getRecentLocations", "type": "messages.Messages", "id": 1881817312, "comment": "Get live location history of a certain user", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "User" }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }, { "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here" }], "available": "user" }, { "kind": "method", "name": "messages.sendMultiMedia", "type": "Updates", "id": 934757205, "comment": "Send an album or grouped media", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "silent", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Whether to send the album silently (no notification triggered)" }, { "name": "background", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "Send in background?" }, { "name": "clear_draft", "type": "true", "typeModifiers": { "predicate": "flags.7" }, "comment": "Whether to clear drafts" }, { "name": "noforwards", "type": "true", "typeModifiers": { "predicate": "flags.14" }, "comment": "Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled" }, { "name": "update_stickersets_order", "type": "true", "typeModifiers": { "predicate": "flags.15" }, "comment": "Whether to move used stickersets to top, see here for more info on this flag »" }, { "name": "invert_media", "type": "true", "typeModifiers": { "predicate": "flags.16" }, "comment": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom." }, { "name": "peer", "type": "InputPeer", "comment": "The destination chat" }, { "name": "reply_to", "type": "InputReplyTo", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, indicates that the message should be sent in reply to the specified message or story." }, { "name": "multi_media", "type": "InputSingleMedia", "typeModifiers": { "isVector": true }, "comment": "The medias to send: note that they must be separately uploaded using {@link messages.RawUploadMediaRequest} first, using raw inputMediaUploaded* constructors is not supported." }, { "name": "schedule_date", "type": "int", "typeModifiers": { "predicate": "flags.10" }, "comment": "Scheduled message date for scheduled messages" }, { "name": "send_as", "type": "InputPeer", "typeModifiers": { "predicate": "flags.13" }, "comment": "Send this message as the specified peer" }, { "name": "quick_reply_shortcut", "type": "InputQuickReplyShortcut", "typeModifiers": { "predicate": "flags.17" }, "comment": "Add the message to the specified quick reply shortcut », instead." }, { "name": "effect", "type": "long", "typeModifiers": { "predicate": "flags.18" }, "comment": "Specifies a message effect » to use for the message." }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_FORWARDS_RESTRICTED", "comment": "You can't forward messages from a protected chat." }, { "code": 403, "name": "CHAT_SEND_MEDIA_FORBIDDEN", "comment": "You can't send media in this chat." }, { "code": 403, "name": "CHAT_SEND_PHOTOS_FORBIDDEN", "comment": "You can't send photos in this chat." }, { "code": 403, "name": "CHAT_SEND_VIDEOS_FORBIDDEN", "comment": "You can't send videos in this chat." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "ENTITY_BOUNDS_INVALID", "comment": "A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length." }, { "code": 400, "name": "FILE_REFERENCE_%d_EXPIRED", "comment": "The file reference of the media file at index %d in the passed media array expired, it must be refreshed." }, { "code": 400, "name": "FILE_REFERENCE_%d_INVALID", "comment": "The file reference of the media file at index %d in the passed media array is invalid." }, { "code": 400, "name": "MEDIA_CAPTION_TOO_LONG", "comment": "The caption is too long." }, { "code": 400, "name": "MEDIA_EMPTY", "comment": "The provided media object is invalid." }, { "code": 400, "name": "MEDIA_INVALID", "comment": "Media invalid." }, { "code": 400, "name": "MULTI_MEDIA_TOO_LONG", "comment": "Too many media files for album." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "QUICK_REPLIES_TOO_MUCH", "comment": "A maximum of appConfig.quick_replies_limit shortcuts may be created, the limit was reached." }, { "code": 500, "name": "RANDOM_ID_DUPLICATE", "comment": "You provided a random ID that was already used." }, { "code": 400, "name": "RANDOM_ID_EMPTY", "comment": "Random ID empty." }, { "code": 400, "name": "REPLY_MESSAGES_TOO_MUCH", "comment": "Each shortcut can contain a maximum of appConfig.quick_reply_messages_limit messages, the limit was reached." }, { "code": 400, "name": "SCHEDULE_DATE_TOO_LATE", "comment": "You can't schedule a message this far in the future." }, { "code": 400, "name": "SCHEDULE_TOO_MUCH", "comment": "There are too many scheduled messages." }, { "code": 400, "name": "SEND_AS_PEER_INVALID", "comment": "You can't send messages as the specified peer." }, { "code": 420, "name": "SLOWMODE_WAIT_%d", "comment": "Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat." }, { "code": 400, "name": "TOPIC_CLOSED", "comment": "This topic was closed, you can't send messages to it anymore." }, { "code": 400, "name": "TOPIC_DELETED", "comment": "The specified topic was deleted." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }], "available": "both" }, { "kind": "method", "name": "messages.uploadEncryptedFile", "type": "EncryptedFile", "id": 1347929239, "comment": "Upload encrypted file and associate it to a secret chat", "arguments": [{ "name": "peer", "type": "InputEncryptedChat", "comment": "The secret chat to associate the file to" }, { "name": "file", "type": "InputEncryptedFile", "comment": "The file" }], "throws": [{ "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.searchStickerSets", "type": "messages.FoundStickerSets", "id": 896555914, "comment": "Search for stickersets", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "exclude_featured", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Exclude featured stickersets from results" }, { "name": "q", "type": "string", "comment": "Query string" }, { "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "messages.getSplitRanges", "type": "MessageRange", "typeModifiers": { "isVector": true, "constructorId": 182649427 }, "id": 486505992, "comment": "Get message ranges for saving the user's chat history", "arguments": [], "available": "user" }, { "kind": "method", "name": "messages.markDialogUnread", "type": "Bool", "id": 3263617423, "comment": "Manually mark dialog as unread", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "unread", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Mark as unread/read" }, { "name": "peer", "type": "InputDialogPeer", "comment": "Dialog" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getDialogUnreadMarks", "type": "DialogPeer", "typeModifiers": { "isVector": true }, "id": 585256482, "comment": "Get dialogs manually marked as unread", "arguments": [], "available": "user" }, { "kind": "method", "name": "messages.clearAllDrafts", "type": "Bool", "id": 2119757468, "comment": "Clear all drafts.", "arguments": [], "available": "user" }, { "kind": "method", "name": "messages.updatePinnedMessage", "type": "Updates", "id": 3534419948, "comment": "Pin a message", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "silent", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Pin the message silently, without triggering a notification" }, { "name": "unpin", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the message should unpinned or pinned" }, { "name": "pm_oneside", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether the message should only be pinned on the local side of a one-to-one chat" }, { "name": "peer", "type": "InputPeer", "comment": "The peer where to pin the message" }, { "name": "id", "type": "int", "comment": "The message to pin or unpin" }], "throws": [{ "code": 400, "name": "BOT_ONESIDE_NOT_AVAIL", "comment": "Bots can't pin messages in PM just for themselves." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "PIN_RESTRICTED", "comment": "You can't pin messages." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }], "available": "both" }, { "kind": "method", "name": "messages.sendVote", "type": "Updates", "id": 283795844, "comment": "Vote in a {@link RawPoll}\n\nStarting from layer 159, the vote will be sent from the peer specified using {@link messages.RawSaveDefaultSendAsRequest}.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The chat where the poll was sent" }, { "name": "msg_id", "type": "int", "comment": "The message ID of the poll" }, { "name": "options", "type": "bytes", "typeModifiers": { "isVector": true }, "comment": "The options that were chosen" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "MESSAGE_POLL_CLOSED", "comment": "Poll closed." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "OPTIONS_TOO_MUCH", "comment": "Too many options provided." }, { "code": 400, "name": "OPTION_INVALID", "comment": "Invalid option selected." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "REVOTE_NOT_ALLOWED", "comment": "You cannot change your vote." }], "available": "user" }, { "kind": "method", "name": "messages.getPollResults", "type": "Updates", "id": 1941660731, "comment": "Get poll results", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer where the poll was found" }, { "name": "msg_id", "type": "int", "comment": "Message ID of poll message" }], "throws": [{ "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getOnlines", "type": "ChatOnlines", "typeModifiers": { "constructorId": 4030849616 }, "id": 1848369232, "comment": "Get count of online users in a chat", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The chat" }], "throws": [{ "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.editChatAbout", "type": "Bool", "id": 3740665751, "comment": "Edit the description of a group/supergroup/channel.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The group/supergroup/channel." }, { "name": "about", "type": "string", "comment": "The new description" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ABOUT_NOT_MODIFIED", "comment": "About text has not changed." }, { "code": 400, "name": "CHAT_ABOUT_TOO_LONG", "comment": "Chat about too long." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "both" }, { "kind": "method", "name": "messages.editChatDefaultBannedRights", "type": "Updates", "id": 2777049921, "comment": "Edit the default banned rights of a channel/supergroup/group.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The peer" }, { "name": "banned_rights", "type": "ChatBannedRights", "comment": "The new global rights" }], "throws": [{ "code": 400, "name": "BANNED_RIGHTS_INVALID", "comment": "You provided some invalid flags in the banned rights." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "UNTIL_DATE_INVALID", "comment": "Invalid until date provided." }], "available": "both" }, { "kind": "method", "name": "messages.getEmojiKeywords", "type": "EmojiKeywordsDifference", "typeModifiers": { "constructorId": 1556570557 }, "id": 899735650, "comment": "Get localized emoji keywords ».", "arguments": [{ "name": "lang_code", "type": "string", "comment": "Language code" }], "available": "user" }, { "kind": "method", "name": "messages.getEmojiKeywordsDifference", "type": "EmojiKeywordsDifference", "typeModifiers": { "constructorId": 1556570557 }, "id": 352892591, "comment": "Get changed emoji keywords ».", "arguments": [{ "name": "lang_code", "type": "string", "comment": "Language code" }, { "name": "from_version", "type": "int", "comment": "Previous stored emoji keyword list version" }], "available": "user" }, { "kind": "method", "name": "messages.getEmojiKeywordsLanguages", "type": "EmojiLanguage", "typeModifiers": { "isVector": true, "constructorId": 3019592545 }, "id": 1318675378, "comment": "Obtain a list of related languages that must be used when fetching emoji keyword lists ».\n\nUsually the method will return the passed language codes (if localized) + en + some language codes for similar languages (if applicable).", "arguments": [{ "name": "lang_codes", "type": "string", "typeModifiers": { "isVector": true }, "comment": "The user's language codes" }], "available": "user" }, { "kind": "method", "name": "messages.getEmojiURL", "type": "EmojiURL", "typeModifiers": { "constructorId": 2775937949 }, "id": 3585149990, "comment": "Returns an HTTP URL which can be used to automatically log in into translation platform and suggest new emoji keywords ». The URL will be valid for 30 seconds after generation.", "arguments": [{ "name": "lang_code", "type": "string", "comment": "Language code for which the emoji keywords will be suggested" }], "available": "user" }, { "kind": "method", "name": "messages.getSearchCounters", "type": "messages.SearchCounter", "typeModifiers": { "isVector": true, "constructorId": 3896830975 }, "id": 465367808, "comment": "Get the number of results that would be found by a {@link messages.RawSearchRequest} call with the same parameters", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "peer", "type": "InputPeer", "comment": "Peer where to search" }, { "name": "saved_peer_id", "type": "InputPeer", "typeModifiers": { "predicate": "flags.2" }, "comment": "Search within the saved message dialog » with this ID." }, { "name": "top_msg_id", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, consider only messages within the specified forum topic" }, { "name": "filters", "type": "MessagesFilter", "typeModifiers": { "isVector": true }, "comment": "Search filters" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.requestUrlAuth", "type": "UrlAuthResult", "id": 428848198, "comment": "Get more info about a Seamless Telegram Login authorization request, for more info click here »", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "peer", "type": "InputPeer", "typeModifiers": { "predicate": "flags.1" }, "comment": "Peer where the message is located" }, { "name": "msg_id", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "The message" }, { "name": "button_id", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "The ID of the button with the authorization request" }, { "name": "url", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "URL used for link URL authorization, click here for more info »" }], "available": "user" }, { "kind": "method", "name": "messages.acceptUrlAuth", "type": "UrlAuthResult", "id": 2972479781, "comment": "Use this to accept a Seamless Telegram Login authorization request, for more info click here »", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "write_allowed", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Set this flag to allow the bot to send messages to you (if requested)" }, { "name": "peer", "type": "InputPeer", "typeModifiers": { "predicate": "flags.1" }, "comment": "The location of the message" }, { "name": "msg_id", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Message ID of the message with the login button" }, { "name": "button_id", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "ID of the login button" }, { "name": "url", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "URL used for link URL authorization, click here for more info »" }], "available": "user" }, { "kind": "method", "name": "messages.hidePeerSettingsBar", "type": "Bool", "id": 1336717624, "comment": "Should be called after the user hides the report spam/add as contact bar of a new chat, effectively prevents the user from executing the actions specified in the action bar ».", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getScheduledHistory", "type": "messages.Messages", "id": 4111889931, "comment": "Get scheduled messages", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer" }, { "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here.
To generate the hash, populate the ids array with the id, date and edit_date (in this order) of the previously returned messages (in order, i.e. ids = [id1, date1, edit_date1, id2, date2, edit_date2, ...])." }], "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getScheduledMessages", "type": "messages.Messages", "id": 3183150180, "comment": "Get scheduled messages", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer" }, { "name": "id", "type": "int", "typeModifiers": { "isVector": true }, "comment": "IDs of scheduled messages" }], "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.sendScheduledMessages", "type": "Updates", "id": 3174597898, "comment": "Send scheduled messages right away", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer" }, { "name": "id", "type": "int", "typeModifiers": { "isVector": true }, "comment": "Scheduled message IDs" }], "throws": [{ "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 500, "name": "RANDOM_ID_DUPLICATE", "comment": "You provided a random ID that was already used." }], "available": "user" }, { "kind": "method", "name": "messages.deleteScheduledMessages", "type": "Updates", "id": 1504586518, "comment": "Delete scheduled messages", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer" }, { "name": "id", "type": "int", "typeModifiers": { "isVector": true }, "comment": "Scheduled message IDs" }], "throws": [{ "code": 403, "name": "MESSAGE_DELETE_FORBIDDEN", "comment": "You can't delete one of the messages you tried to delete, most likely because it is a service message." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getPollVotes", "type": "messages.VotesList", "typeModifiers": { "constructorId": 1218005070 }, "id": 3094231054, "comment": "Get poll results for non-anonymous polls", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "peer", "type": "InputPeer", "comment": "Chat where the poll was sent" }, { "name": "id", "type": "int", "comment": "Message ID" }, { "name": "option", "type": "bytes", "typeModifiers": { "predicate": "flags.0" }, "comment": "Get only results for the specified poll option" }, { "name": "offset", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Offset for results, taken from the next_offset field of {@link messages.RawVotesList}, initially an empty string.
Note: if no more results are available, the method call will return an empty next_offset; thus, avoid providing the next_offset returned in {@link messages.RawVotesList} if it is empty, to avoid an infinite loop." }, { "name": "limit", "type": "int", "comment": "Number of results to return" }], "throws": [{ "code": 403, "name": "BROADCAST_FORBIDDEN", "comment": "Channel poll voters and reactions cannot be fetched to prevent deanonymization." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 403, "name": "POLL_VOTE_REQUIRED", "comment": "Cast a vote in the poll before calling this method." }], "available": "user" }, { "kind": "method", "name": "messages.toggleStickerSets", "type": "Bool", "id": 3037016042, "comment": "Apply changes to multiple stickersets", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "uninstall", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Uninstall the specified stickersets" }, { "name": "archive", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Archive the specified stickersets" }, { "name": "unarchive", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Unarchive the specified stickersets" }, { "name": "stickersets", "type": "InputStickerSet", "typeModifiers": { "isVector": true }, "comment": "Stickersets to act upon" }], "available": "user" }, { "kind": "method", "name": "messages.getDialogFilters", "type": "messages.DialogFilters", "typeModifiers": { "constructorId": 718878489 }, "id": 4023684233, "comment": "Get folders", "arguments": [], "available": "user" }, { "kind": "method", "name": "messages.getSuggestedDialogFilters", "type": "DialogFilterSuggested", "typeModifiers": { "isVector": true, "constructorId": 2004110666 }, "id": 2728186924, "comment": "Get suggested folders", "arguments": [], "available": "user" }, { "kind": "method", "name": "messages.updateDialogFilter", "type": "Bool", "id": 450142282, "comment": "Update folder", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "id", "type": "int", "comment": "Folder ID" }, { "name": "filter", "type": "DialogFilter", "typeModifiers": { "predicate": "flags.0" }, "comment": "Folder info" }], "throws": [{ "code": 400, "name": "CHATLIST_EXCLUDE_INVALID", "comment": "The specified exclude_peers are invalid." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "FILTER_ID_INVALID", "comment": "The specified filter ID is invalid." }, { "code": 400, "name": "FILTER_INCLUDE_EMPTY", "comment": "The include_peers vector of the filter is empty." }, { "code": 400, "name": "FILTER_TITLE_EMPTY", "comment": "The title field of the filter is empty." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.updateDialogFiltersOrder", "type": "Bool", "id": 3311649252, "comment": "Reorder folders", "arguments": [{ "name": "order", "type": "int", "typeModifiers": { "isVector": true }, "comment": "New folder order" }], "available": "user" }, { "kind": "method", "name": "messages.getOldFeaturedStickers", "type": "messages.FeaturedStickers", "id": 2127598753, "comment": "Method for fetching previously featured stickers", "arguments": [{ "name": "offset", "type": "int", "comment": "Offset" }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }, { "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "messages.getReplies", "type": "messages.Messages", "id": 584962828, "comment": "Get messages in a reply thread", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer" }, { "name": "msg_id", "type": "int", "comment": "Message ID" }, { "name": "offset_id", "type": "int", "comment": "Offsets for pagination, for more info click here" }, { "name": "offset_date", "type": "int", "comment": "Offsets for pagination, for more info click here" }, { "name": "add_offset", "type": "int", "comment": "Offsets for pagination, for more info click here" }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }, { "name": "max_id", "type": "int", "comment": "If a positive value was transferred, the method will return only messages with ID smaller than max_id" }, { "name": "min_id", "type": "int", "comment": "If a positive value was transferred, the method will return only messages with ID bigger than min_id" }, { "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "TOPIC_ID_INVALID", "comment": "The specified topic ID is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getDiscussionMessage", "type": "messages.DiscussionMessage", "typeModifiers": { "constructorId": 2788431746 }, "id": 1147761405, "comment": "Get discussion message from the associated discussion group of a channel to show it on top of the comment section, without actually joining the group", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Channel ID" }, { "name": "msg_id", "type": "int", "comment": "Message ID" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "TOPIC_ID_INVALID", "comment": "The specified topic ID is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.readDiscussion", "type": "Bool", "id": 4147227124, "comment": "Mark a thread as read", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Group ID" }, { "name": "msg_id", "type": "int", "comment": "ID of message that started the thread" }, { "name": "read_max_id", "type": "int", "comment": "ID up to which thread messages were read" }], "throws": [{ "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.unpinAllMessages", "type": "messages.AffectedHistory", "typeModifiers": { "constructorId": 3025955281 }, "id": 3995253160, "comment": "Unpin all pinned messages", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "peer", "type": "InputPeer", "comment": "Chat where to unpin" }, { "name": "top_msg_id", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Forum topic where to unpin" }], "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "both" }, { "kind": "method", "name": "messages.deleteChat", "type": "Bool", "id": 1540419152, "comment": "Delete a chat", "arguments": [{ "name": "chat_id", "type": "int53", "comment": "Chat ID" }], "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.deletePhoneCallHistory", "type": "messages.AffectedFoundMessages", "typeModifiers": { "constructorId": 4019011180 }, "id": 4190888969, "comment": "Delete the entire phone call history.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "revoke", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to remove phone call history for participants as well" }], "available": "user" }, { "kind": "method", "name": "messages.checkHistoryImport", "type": "messages.HistoryImportParsed", "typeModifiers": { "constructorId": 1578088377 }, "id": 1140726259, "comment": "Obtains information about a chat export file, generated by a foreign chat app, click here for more info about imported chats ».", "arguments": [{ "name": "import_head", "type": "string", "comment": "Beginning of the message file; up to 100 lines." }], "throws": [{ "code": 400, "name": "IMPORT_FORMAT_UNRECOGNIZED", "comment": "The specified chat export file was exported from an unsupported chat app." }], "available": "user" }, { "kind": "method", "name": "messages.initHistoryImport", "type": "messages.HistoryImport", "typeModifiers": { "constructorId": 375566091 }, "id": 873008187, "comment": "Import chat history from a foreign chat app into a specific Telegram chat, click here for more info about imported chats ».", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The Telegram chat where the history should be imported." }, { "name": "file", "type": "InputFile", "comment": "File with messages to import." }, { "name": "media_count", "type": "int", "comment": "Number of media files associated with the chat that will be uploaded using {@link messages.RawUploadImportedMediaRequest}." }], "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "IMPORT_FILE_INVALID", "comment": "The specified chat export file is invalid." }, { "code": 400, "name": "IMPORT_FORMAT_DATE_INVALID", "comment": "The date specified in the import file is invalid." }, { "code": 400, "name": "IMPORT_FORMAT_UNRECOGNIZED", "comment": "The specified chat export file was exported from an unsupported chat app." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 406, "name": "PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_%dMIN", "comment": "Import for this chat is already in progress, wait %d minutes before starting a new one." }], "available": "user" }, { "kind": "method", "name": "messages.uploadImportedMedia", "type": "MessageMedia", "id": 713433234, "comment": "Upload a media file associated with an imported chat, click here for more info ».", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The Telegram chat where the media will be imported" }, { "name": "import_id", "type": "long", "comment": "Identifier of a history import session, returned by {@link messages.RawInitHistoryImportRequest}" }, { "name": "file_name", "type": "string", "comment": "File name" }, { "name": "media", "type": "InputMedia", "comment": "Media metadata" }], "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "IMPORT_ID_INVALID", "comment": "The specified import ID is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.startHistoryImport", "type": "Bool", "id": 3023958852, "comment": "Complete the history import process, importing all messages into the chat.
\nTo be called only after initializing the import with {@link messages.RawInitHistoryImportRequest} and uploading all files using {@link messages.RawUploadImportedMediaRequest}.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The Telegram chat where the messages should be imported, click here for more info »" }, { "name": "import_id", "type": "long", "comment": "Identifier of a history import session, returned by {@link messages.RawInitHistoryImportRequest}." }], "throws": [{ "code": 400, "name": "IMPORT_ID_INVALID", "comment": "The specified import ID is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getExportedChatInvites", "type": "messages.ExportedChatInvites", "typeModifiers": { "constructorId": 3183881676 }, "id": 2729812982, "comment": "Get info about the chat invites of a specific chat", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "revoked", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether to fetch revoked chat invites" }, { "name": "peer", "type": "InputPeer", "comment": "Chat" }, { "name": "admin_id", "type": "InputUser", "comment": "Whether to only fetch chat invites from this admin" }, { "name": "offset_date", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "Offsets for pagination, for more info click here" }, { "name": "offset_link", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "Offsets for pagination, for more info click here" }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }], "throws": [{ "code": 400, "name": "ADMIN_ID_INVALID", "comment": "The specified admin ID is invalid." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getExportedChatInvite", "type": "messages.ExportedChatInvite", "id": 1937010524, "comment": "Get info about a chat invite", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Chat" }, { "name": "link", "type": "string", "comment": "Invite link" }], "throws": [{ "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "INVITE_HASH_EXPIRED", "comment": "The invite link has expired." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.editExportedChatInvite", "type": "messages.ExportedChatInvite", "id": 3184144245, "comment": "Edit an exported chat invite", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "revoked", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether to revoke the chat invite" }, { "name": "peer", "type": "InputPeer", "comment": "Chat" }, { "name": "link", "type": "string", "comment": "Invite link" }, { "name": "expire_date", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "New expiration date" }, { "name": "usage_limit", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "Maximum number of users that can join using this link" }, { "name": "request_needed", "type": "Bool", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether admin confirmation is required before admitting each separate user into the chat" }, { "name": "title", "type": "string", "typeModifiers": { "predicate": "flags.4" }, "comment": "Description of the invite link, visible only to administrators" }], "throws": [{ "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_INVITE_PERMANENT", "comment": "You can't set an expiration date on permanent invite links." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 403, "name": "EDIT_BOT_INVITE_FORBIDDEN", "comment": "Normal users can't edit invites that were created by bots." }, { "code": 400, "name": "INVITE_HASH_EXPIRED", "comment": "The invite link has expired." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USAGE_LIMIT_INVALID", "comment": "The specified usage limit is invalid." }], "available": "both" }, { "kind": "method", "name": "messages.deleteRevokedExportedChatInvites", "type": "Bool", "id": 1452833749, "comment": "Delete all revoked chat invites", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Chat" }, { "name": "admin_id", "type": "InputUser", "comment": "ID of the admin that originally generated the revoked chat invites" }], "throws": [{ "code": 400, "name": "ADMIN_ID_INVALID", "comment": "The specified admin ID is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.deleteExportedChatInvite", "type": "Bool", "id": 3563365419, "comment": "Delete a chat invite", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer" }, { "name": "link", "type": "string", "comment": "Invite link" }], "throws": [{ "code": 400, "name": "INVITE_HASH_EXPIRED", "comment": "The invite link has expired." }, { "code": 400, "name": "INVITE_REVOKED_MISSING", "comment": "The specified invite link was already revoked or is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getAdminsWithInvites", "type": "messages.ChatAdminsWithInvites", "typeModifiers": { "constructorId": 3063640791 }, "id": 958457583, "comment": "Get info about chat invites generated by admins.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Chat" }], "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getChatInviteImporters", "type": "messages.ChatInviteImporters", "typeModifiers": { "constructorId": 2176233482 }, "id": 3741637966, "comment": "Get info about the users that joined the chat using a specific chat invite", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "requested", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, only returns info about users with pending join requests »" }, { "name": "peer", "type": "InputPeer", "comment": "Chat" }, { "name": "link", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Invite link" }, { "name": "q", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "Search for a user in the pending join requests » list: only available when the requested flag is set, cannot be used together with a specific link." }, { "name": "offset_date", "type": "int", "comment": "Offsets for pagination, for more info click here" }, { "name": "offset_user", "type": "InputUser", "comment": "User ID for pagination: if set, offset_date must also be set." }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "INVITE_HASH_EXPIRED", "comment": "The invite link has expired." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "SEARCH_WITH_LINK_NOT_SUPPORTED", "comment": "You cannot provide a search query and an invite link at the same time." }], "available": "user" }, { "kind": "method", "name": "messages.setHistoryTTL", "type": "Updates", "id": 3087949796, "comment": "Set maximum Time-To-Live of all messages in the specified chat", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The dialog" }, { "name": "period", "type": "int", "comment": "Automatically delete all messages sent in the chat after this many seconds" }], "throws": [{ "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "TTL_PERIOD_INVALID", "comment": "The specified TTL period is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.checkHistoryImportPeer", "type": "messages.CheckedHistoryImportPeer", "typeModifiers": { "constructorId": 2723014423 }, "id": 1573261059, "comment": "Check whether chat history exported from another chat app can be imported into a specific Telegram chat, click here for more info ».\n\nIf the check succeeds, and no RPC errors are returned, a messages.CheckedHistoryImportPeer constructor will be returned, with a confirmation text to be shown to the user, before actually initializing the import.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The chat where we want to import history »." }], "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USER_NOT_MUTUAL_CONTACT", "comment": "The provided user is not a mutual contact." }], "available": "user" }, { "kind": "method", "name": "messages.setChatTheme", "type": "Updates", "id": 3862683967, "comment": "Change the chat theme of a certain chat", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Private chat where to change theme" }, { "name": "emoticon", "type": "string", "comment": "Emoji, identifying a specific chat theme; a list of chat themes can be fetched using {@link account.RawGetChatThemesRequest}" }], "throws": [{ "code": 400, "name": "EMOJI_INVALID", "comment": "The specified theme emoji is valid." }, { "code": 400, "name": "EMOJI_NOT_MODIFIED", "comment": "The theme wasn't changed." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getMessageReadParticipants", "type": "ReadParticipantDate", "typeModifiers": { "isVector": true, "constructorId": 1246753138 }, "id": 834782287, "comment": "Get which users read a specific message: only available for groups and supergroups with less than chat_read_mark_size_threshold members, read receipts will be stored for chat_read_mark_expire_period seconds after the message was sent, see client configuration for more info ».", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Dialog" }, { "name": "msg_id", "type": "int", "comment": "Message ID" }], "throws": [{ "code": 400, "name": "CHAT_TOO_BIG", "comment": "This method is not available for groups with more than chat_read_mark_size_threshold members, see client configuration »." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "MSG_TOO_OLD", "comment": "chat_read_mark_expire_period seconds have passed since the message was sent, read receipts were deleted." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getSearchResultsCalendar", "type": "messages.SearchResultsCalendar", "typeModifiers": { "constructorId": 343859772 }, "id": 1789130429, "comment": "Returns information about the next messages of the specified type in the chat split by days.\n\nReturns the results in reverse chronological order.
\nCan return partial results for the last returned day.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "peer", "type": "InputPeer", "comment": "Peer where to search" }, { "name": "saved_peer_id", "type": "InputPeer", "typeModifiers": { "predicate": "flags.2" }, "comment": "Search within the saved message dialog » with this ID." }, { "name": "filter", "type": "MessagesFilter", "comment": "Message filter, {@link RawInputMessagesFilterEmpty}, {@link RawInputMessagesFilterMyMentions} filters are not supported by this method." }, { "name": "offset_id", "type": "int", "comment": "Offsets for pagination, for more info click here" }, { "name": "offset_date", "type": "int", "comment": "Offsets for pagination, for more info click here" }], "throws": [{ "code": 400, "name": "FILTER_NOT_SUPPORTED", "comment": "The specified filter cannot be used in this context." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getSearchResultsPositions", "type": "messages.SearchResultsPositions", "typeModifiers": { "constructorId": 1404185519 }, "id": 2625580816, "comment": "Returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation.\n\nReturns the results in reverse chronological order (i.e., in order of decreasing message_id).", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "peer", "type": "InputPeer", "comment": "Peer where to search" }, { "name": "saved_peer_id", "type": "InputPeer", "typeModifiers": { "predicate": "flags.2" }, "comment": "Search within the saved message dialog » with this ID." }, { "name": "filter", "type": "MessagesFilter", "comment": "Message filter, {@link RawInputMessagesFilterEmpty}, {@link RawInputMessagesFilterMyMentions} filters are not supported by this method." }, { "name": "offset_id", "type": "int", "comment": "Offsets for pagination, for more info click here" }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.hideChatJoinRequest", "type": "Updates", "id": 2145904661, "comment": "Dismiss or approve a chat join request related to a specific chat or channel.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "approved", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to dismiss or approve the chat join request »" }, { "name": "peer", "type": "InputPeer", "comment": "The chat or channel" }, { "name": "user_id", "type": "InputUser", "comment": "The user whose join request » should be dismissed or approved" }], "throws": [{ "code": 400, "name": "CHANNELS_TOO_MUCH", "comment": "You have joined too many channels/supergroups." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "HIDE_REQUESTER_MISSING", "comment": "The join request was missing or was already handled." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USER_ALREADY_PARTICIPANT", "comment": "The user is already in the group." }, { "code": 403, "name": "USER_CHANNELS_TOO_MUCH", "comment": "One of the users you tried to add is already in too many channels/supergroups." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "both" }, { "kind": "method", "name": "messages.hideAllChatJoinRequests", "type": "Updates", "id": 3766875370, "comment": "Dismiss or approve all join requests related to a specific chat or channel.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "approved", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to dismiss or approve all chat join requests »" }, { "name": "peer", "type": "InputPeer", "comment": "The chat or channel" }, { "name": "link", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Only dismiss or approve join requests » initiated using this invite link" }], "throws": [{ "code": 400, "name": "CHANNELS_TOO_MUCH", "comment": "You have joined too many channels/supergroups." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "HIDE_REQUESTER_MISSING", "comment": "The join request was missing or was already handled." }, { "code": 400, "name": "INVITE_HASH_EXPIRED", "comment": "The invite link has expired." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USER_CHANNELS_TOO_MUCH", "comment": "One of the users you tried to add is already in too many channels/supergroups." }], "available": "user" }, { "kind": "method", "name": "messages.toggleNoForwards", "type": "Updates", "id": 2971578274, "comment": "Enable or disable content protection on a channel or chat", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The chat or channel" }, { "name": "enabled", "type": "Bool", "comment": "Enable or disable content protection" }], "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.saveDefaultSendAs", "type": "Bool", "id": 3439189910, "comment": "Change the default peer that should be used when sending messages, reactions, poll votes to a specific group", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Group" }, { "name": "send_as", "type": "InputPeer", "comment": "The default peer that should be used when sending messages to the group" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "SEND_AS_PEER_INVALID", "comment": "You can't send messages as the specified peer." }], "available": "user" }, { "kind": "method", "name": "messages.sendReaction", "type": "Updates", "id": 3540875476, "comment": "React to message.\n\nStarting from layer 159, the reaction will be sent from the peer specified using {@link messages.RawSaveDefaultSendAsRequest}.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "big", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether a bigger and longer reaction should be shown" }, { "name": "add_to_recent", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether to add this reaction to the recent reactions list »." }, { "name": "peer", "type": "InputPeer", "comment": "Peer" }, { "name": "msg_id", "type": "int", "comment": "Message ID to react to" }, { "name": "reaction", "type": "Reaction", "typeModifiers": { "predicate": "flags.0", "isVector": true }, "comment": "A list of reactions" }], "throws": [{ "code": 403, "name": "ANONYMOUS_REACTIONS_DISABLED", "comment": "Sorry, anonymous administrators cannot leave reactions or participate in polls." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "CUSTOM_REACTIONS_TOO_MANY", "comment": "Too many custom reactions were specified." }, { "code": 400, "name": "DOCUMENT_INVALID", "comment": "The specified document is invalid." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "MESSAGE_NOT_MODIFIED", "comment": "The provided message data is identical to the previous message data, the message wasn't modified." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }, { "code": 400, "name": "REACTIONS_TOO_MANY", "comment": "The message already has exactly reactions_uniq_max reaction emojis, you can't react with a new emoji, see the docs for more info »." }, { "code": 400, "name": "REACTION_EMPTY", "comment": "Empty reaction provided." }, { "code": 400, "name": "REACTION_INVALID", "comment": "The specified reaction is invalid." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }], "available": "user" }, { "kind": "method", "name": "messages.getMessagesReactions", "type": "Updates", "id": 2344259814, "comment": "Get message reactions »", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer" }, { "name": "id", "type": "int", "typeModifiers": { "isVector": true }, "comment": "Message IDs" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }], "available": "user" }, { "kind": "method", "name": "messages.getMessageReactionsList", "type": "messages.MessageReactionsList", "typeModifiers": { "constructorId": 834488621 }, "id": 1176190792, "comment": "Get message reaction list, along with the sender of each reaction.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "peer", "type": "InputPeer", "comment": "Peer" }, { "name": "id", "type": "int", "comment": "Message ID" }, { "name": "reaction", "type": "Reaction", "typeModifiers": { "predicate": "flags.0" }, "comment": "Get only reactions of this type" }, { "name": "offset", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Offset for pagination (taken from the next_offset field of the returned messages.MessageReactionsList); empty in the first request." }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }], "throws": [{ "code": 403, "name": "BROADCAST_FORBIDDEN", "comment": "Channel poll voters and reactions cannot be fetched to prevent deanonymization." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }], "available": "user" }, { "kind": "method", "name": "messages.setChatAvailableReactions", "type": "Updates", "id": 1511328724, "comment": "Change the set of message reactions » that can be used in a certain group, supergroup or channel", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "peer", "type": "InputPeer", "comment": "Group where to apply changes" }, { "name": "available_reactions", "type": "ChatReactions", "comment": "Allowed reaction emojis" }, { "name": "reactions_limit", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "This flag may be used to impose a custom limit of unique reactions (i.e. a customizable version of appConfig.reactions_uniq_max); this field and the other info set by the method will then be available to users in {@link RawChannelFull} and {@link RawChatFull}." }], "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getAvailableReactions", "type": "messages.AvailableReactions", "id": 417243308, "comment": "Obtain available message reactions »", "arguments": [{ "name": "hash", "type": "int", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "messages.setDefaultReaction", "type": "Bool", "id": 1330094102, "comment": "Change default emoji reaction to use in the quick reaction menu: the value is synced across devices and can be fetched using {@link help.RawGetConfigRequest}.", "arguments": [{ "name": "reaction", "type": "Reaction", "comment": "New emoji reaction" }], "throws": [{ "code": 400, "name": "REACTION_INVALID", "comment": "The specified reaction is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.translateText", "type": "messages.TranslatedText", "typeModifiers": { "constructorId": 870003448 }, "id": 1662529584, "comment": "Translate a given text.\n\nStyled text entities will only be preserved for Telegram Premium users.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "peer", "type": "InputPeer", "typeModifiers": { "predicate": "flags.0" }, "comment": "If the text is a chat message, the peer ID" }, { "name": "id", "type": "int", "typeModifiers": { "predicate": "flags.0", "isVector": true }, "comment": "A list of message IDs to translate" }, { "name": "text", "type": "TextWithEntities", "typeModifiers": { "predicate": "flags.1", "isVector": true }, "comment": "A list of styled messages to translate" }, { "name": "to_lang", "type": "string", "comment": "Two-letter ISO 639-1 language code of the language to which the message is translated" }], "throws": [{ "code": 400, "name": "INPUT_TEXT_EMPTY", "comment": "The specified text is empty." }, { "code": 400, "name": "INPUT_TEXT_TOO_LONG", "comment": "The specified text is too long." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "TO_LANG_INVALID", "comment": "The specified destination language is invalid." }, { "code": 400, "name": "TRANSLATE_REQ_QUOTA_EXCEEDED", "comment": "Translation is currently unavailable due to a temporary server-side lack of resources." }], "available": "user" }, { "kind": "method", "name": "messages.getUnreadReactions", "type": "messages.Messages", "id": 841173339, "comment": "Get unread reactions to messages you sent", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "peer", "type": "InputPeer", "comment": "Peer" }, { "name": "top_msg_id", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, considers only reactions to messages within the specified forum topic" }, { "name": "offset_id", "type": "int", "comment": "Offsets for pagination, for more info click here" }, { "name": "add_offset", "type": "int", "comment": "Offsets for pagination, for more info click here" }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }, { "name": "max_id", "type": "int", "comment": "Only return reactions for messages up until this message ID" }, { "name": "min_id", "type": "int", "comment": "Only return reactions for messages starting from this message ID" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.readReactions", "type": "messages.AffectedHistory", "typeModifiers": { "constructorId": 3025955281 }, "id": 1420459918, "comment": "Mark message reactions » as read", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "peer", "type": "InputPeer", "comment": "Peer" }, { "name": "top_msg_id", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "Mark as read only reactions to messages within the specified forum topic" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.searchSentMedia", "type": "messages.Messages", "id": 276705696, "comment": "View and search recently sent media.
\nThis method does not support pagination.", "arguments": [{ "name": "q", "type": "string", "comment": "Optional search query" }, { "name": "filter", "type": "MessagesFilter", "comment": "Message filter" }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return (max 100)." }], "throws": [{ "code": 400, "name": "FILTER_NOT_SUPPORTED", "comment": "The specified filter cannot be used in this context." }], "available": "user" }, { "kind": "method", "name": "messages.getAttachMenuBots", "type": "AttachMenuBots", "id": 385663691, "comment": "Returns installed attachment menu bot mini apps »", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "messages.getAttachMenuBot", "type": "AttachMenuBotsBot", "typeModifiers": { "constructorId": 2478794367 }, "id": 1998676370, "comment": "Returns attachment menu entry for a bot mini app that can be launched from the attachment menu »", "arguments": [{ "name": "bot", "type": "InputUser", "comment": "Bot ID" }], "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }], "available": "user" }, { "kind": "method", "name": "messages.toggleBotInAttachMenu", "type": "Bool", "id": 1777704297, "comment": "Enable or disable web bot attachment menu »", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "write_allowed", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the user authorizes the bot to write messages to them, if requested by {@link RawAttachMenuBot}.request_write_access" }, { "name": "bot", "type": "InputUser", "comment": "Bot ID" }, { "name": "enabled", "type": "Bool", "comment": "Toggle" }], "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }], "available": "user" }, { "kind": "method", "name": "messages.requestWebView", "type": "WebViewResult", "typeModifiers": { "constructorId": 1294139288 }, "id": 647873217, "comment": "Open a bot mini app, sending over user information after user confirmation.\n\nAfter calling this method, until the user closes the webview, {@link messages.RawProlongWebViewRequest} must be called every 60 seconds.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "from_bot_menu", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "Whether the webview was opened by clicking on the bot's menu button »." }, { "name": "silent", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Whether the inline message that will be sent by the bot on behalf of the user once the web app interaction is {@link messages.RawSendWebViewResultMessageRequest} should be sent silently (no notifications for the receivers)." }, { "name": "compact", "type": "true", "typeModifiers": { "predicate": "flags.7" }, "comment": "If set, requests to open the mini app in compact mode (as opposed to fullview mode). Must be set if the mode parameter of the attachment menu deep link is equal to compact." }, { "name": "peer", "type": "InputPeer", "comment": "Dialog where the web app is being opened, and where the resulting message will be sent (see the docs for more info »)." }, { "name": "bot", "type": "InputUser", "comment": "Bot that owns the web app" }, { "name": "url", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Web app URL" }, { "name": "start_param", "type": "string", "typeModifiers": { "predicate": "flags.3" }, "comment": "If the web app was opened from the attachment menu using a attachment menu deep link, start_param should contain the data from the startattach parameter." }, { "name": "theme_params", "type": "DataJSON", "typeModifiers": { "predicate": "flags.2" }, "comment": "Theme parameters »" }, { "name": "platform", "type": "string", "comment": "Short name of the application; 0-64 English letters, digits, and underscores" }, { "name": "reply_to", "type": "InputReplyTo", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, indicates that the inline message that will be sent by the bot on behalf of the user once the web app interaction is {@link messages.RawSendWebViewResultMessageRequest} should be sent in reply to the specified message or story." }, { "name": "send_as", "type": "InputPeer", "typeModifiers": { "predicate": "flags.13" }, "comment": "Open the web app as the specified peer, sending the resulting the message as the specified peer." }], "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }, { "code": 400, "name": "BOT_WEBVIEW_DISABLED", "comment": "A webview cannot be opened in the specified conditions: emitted for example if from_bot_menu or url are set and peer is not the chat with the bot." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 403, "name": "PRIVACY_PREMIUM_REQUIRED", "comment": "You need a Telegram Premium subscription to send a message to this user." }, { "code": 400, "name": "SEND_AS_PEER_INVALID", "comment": "You can't send messages as the specified peer." }, { "code": 400, "name": "YOU_BLOCKED_USER", "comment": "You blocked this user." }], "available": "user" }, { "kind": "method", "name": "messages.prolongWebView", "type": "Bool", "id": 2966952579, "comment": "Indicate to the server (from the user side) that the user is still using a web app.\n\nIf the method returns a QUERY_ID_INVALID error, the webview must be closed.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "silent", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Whether the inline message that will be sent by the bot on behalf of the user once the web app interaction is {@link messages.RawSendWebViewResultMessageRequest} should be sent silently (no notifications for the receivers)." }, { "name": "peer", "type": "InputPeer", "comment": "Dialog where the web app was opened." }, { "name": "bot", "type": "InputUser", "comment": "Bot that owns the web app" }, { "name": "query_id", "type": "long", "comment": "Web app interaction ID obtained from {@link messages.RawRequestWebViewRequest}" }, { "name": "reply_to", "type": "InputReplyTo", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, indicates that the inline message that will be sent by the bot on behalf of the user once the web app interaction is {@link messages.RawSendWebViewResultMessageRequest} should be sent in reply to the specified message or story." }, { "name": "send_as", "type": "InputPeer", "typeModifiers": { "predicate": "flags.13" }, "comment": "Open the web app as the specified peer" }], "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }], "available": "user" }, { "kind": "method", "name": "messages.requestSimpleWebView", "type": "WebViewResult", "typeModifiers": { "constructorId": 1294139288 }, "id": 1094336115, "comment": "Open a bot mini app.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "from_switch_webview", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the webapp was opened by clicking on the switch_webview button shown on top of the inline results list returned by {@link messages.RawGetInlineBotResultsRequest}." }, { "name": "from_side_menu", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Set this flag if opening the Mini App from the installed side menu entry »." }, { "name": "compact", "type": "true", "typeModifiers": { "predicate": "flags.7" }, "comment": "Deprecated." }, { "name": "bot", "type": "InputUser", "comment": "Bot that owns the mini app" }, { "name": "url", "type": "string", "typeModifiers": { "predicate": "flags.3" }, "comment": "Web app URL, if opening from a keyboard button or inline result" }, { "name": "start_param", "type": "string", "typeModifiers": { "predicate": "flags.4" }, "comment": "Deprecated." }, { "name": "theme_params", "type": "DataJSON", "typeModifiers": { "predicate": "flags.0" }, "comment": "Theme parameters »" }, { "name": "platform", "type": "string", "comment": "Short name of the application; 0-64 English letters, digits, and underscores" }], "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }, { "code": 400, "name": "URL_INVALID", "comment": "Invalid URL provided." }], "available": "user" }, { "kind": "method", "name": "messages.sendWebViewResultMessage", "type": "WebViewMessageSent", "typeModifiers": { "constructorId": 211046684 }, "id": 172168437, "comment": "Terminate webview interaction started with {@link messages.RawRequestWebViewRequest}, sending the specified message to the chat on behalf of the user.", "arguments": [{ "name": "bot_query_id", "type": "string", "comment": "Webview interaction ID obtained from {@link messages.RawRequestWebViewRequest}" }, { "name": "result", "type": "InputBotInlineResult", "comment": "Message to send" }], "throws": [{ "code": 400, "name": "QUERY_ID_INVALID", "comment": "The query ID is invalid." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, { "kind": "method", "name": "messages.sendWebViewData", "type": "Updates", "id": 3691135688, "comment": "Used by the user to relay data from an opened reply keyboard bot mini app to the bot that owns it.", "arguments": [{ "name": "bot", "type": "InputUser", "comment": "Bot that owns the web app" }, { "name": "random_id", "type": "long", "comment": "Unique client message ID to prevent duplicate sending of the same event" }, { "name": "button_text", "type": "string", "comment": "Text of the {@link RawKeyboardButtonSimpleWebView} that was pressed to open the web app." }, { "name": "data", "type": "string", "comment": "Data to relay to the bot, obtained from a web_app_data_send JS event." }], "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }], "available": "user" }, { "kind": "method", "name": "messages.transcribeAudio", "type": "messages.TranscribedAudio", "typeModifiers": { "constructorId": 3485063511 }, "id": 647928393, "comment": "Transcribe voice message", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer ID where the voice message was sent" }, { "name": "msg_id", "type": "int", "comment": "Voice message ID" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }, { "code": 400, "name": "TRANSCRIPTION_FAILED", "comment": "Audio transcription failed." }], "available": "user" }, { "kind": "method", "name": "messages.rateTranscribedAudio", "type": "Bool", "id": 2132608815, "comment": "Rate transcribed voice message", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer where the voice message was sent" }, { "name": "msg_id", "type": "int", "comment": "Message ID" }, { "name": "transcription_id", "type": "long", "comment": "Transcription ID" }, { "name": "good", "type": "Bool", "comment": "Whether the transcription was correct" }], "available": "user" }, { "kind": "method", "name": "messages.getCustomEmojiDocuments", "type": "Document", "typeModifiers": { "isVector": true }, "id": 3651866452, "comment": "Fetch custom emoji stickers ».\n\nReturns a list of {@link RawDocument} with the animated custom emoji in TGS format, and a {@link RawDocumentAttributeCustomEmoji} attribute with the original emoji and info about the emoji stickerset this custom emoji belongs to.", "arguments": [{ "name": "document_id", "type": "long", "typeModifiers": { "isVector": true }, "comment": "Custom emoji IDs from a {@link RawMessageEntityCustomEmoji}." }], "available": "both" }, { "kind": "method", "name": "messages.getEmojiStickers", "type": "messages.AllStickers", "id": 4227637647, "comment": "Gets the list of currently installed custom emoji stickersets.", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "messages.getFeaturedEmojiStickers", "type": "messages.FeaturedStickers", "id": 248473398, "comment": "Gets featured custom emoji stickersets.", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "messages.reportReaction", "type": "Bool", "id": 1063567478, "comment": "Report a message reaction", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer where the message was sent" }, { "name": "id", "type": "int", "comment": "Message ID" }, { "name": "reaction_peer", "type": "InputPeer", "comment": "Peer that sent the reaction" }], "throws": [{ "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getTopReactions", "type": "messages.Reactions", "id": 3145803194, "comment": "Got popular message reactions", "arguments": [{ "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }, { "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "messages.getRecentReactions", "type": "messages.Reactions", "id": 960896434, "comment": "Get recently used message reactions", "arguments": [{ "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }, { "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "messages.clearRecentReactions", "type": "Bool", "id": 2650730420, "comment": "Clear recently used message reactions", "arguments": [], "available": "user" }, { "kind": "method", "name": "messages.getExtendedMedia", "type": "Updates", "id": 2230847508, "comment": "Fetch updated information about paid media, see here » for the full flow.\n\nThis method will return an array of {@link RawUpdateMessageExtendedMedia} updates, only for messages containing already bought paid media.
\nNo information will be returned for messages containing not yet bought paid media.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer with visible paid media messages." }, { "name": "id", "type": "int", "typeModifiers": { "isVector": true }, "comment": "IDs of currently visible messages containing paid media." }], "available": "user" }, { "kind": "method", "name": "messages.setDefaultHistoryTTL", "type": "Bool", "id": 2662667333, "comment": "Changes the default value of the Time-To-Live setting, applied to all new chats.", "arguments": [{ "name": "period", "type": "int", "comment": "The new default Time-To-Live of all messages sent in new chats." }], "throws": [{ "code": 400, "name": "TTL_PERIOD_INVALID", "comment": "The specified TTL period is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getDefaultHistoryTTL", "type": "DefaultHistoryTTL", "typeModifiers": { "constructorId": 1135897376 }, "id": 1703637384, "comment": "Gets the default value of the Time-To-Live setting, applied to all new chats.", "arguments": [], "available": "user" }, { "kind": "method", "name": "messages.sendBotRequestedPeer", "type": "Updates", "id": 2444415072, "comment": "Send one or more chosen peers, as requested by a {@link RawKeyboardButtonRequestPeer} button.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The bot that sent the {@link RawKeyboardButtonRequestPeer} button." }, { "name": "msg_id", "type": "int", "comment": "ID of the message that contained the reply keyboard with the {@link RawKeyboardButtonRequestPeer} button." }, { "name": "button_id", "type": "int", "comment": "The button_id field from the {@link RawKeyboardButtonRequestPeer} constructor." }, { "name": "requested_peers", "type": "InputPeer", "typeModifiers": { "isVector": true }, "comment": "The chosen peers." }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getEmojiGroups", "type": "messages.EmojiGroups", "id": 1955122779, "comment": "Represents a list of emoji categories.", "arguments": [{ "name": "hash", "type": "int", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "messages.getEmojiStatusGroups", "type": "messages.EmojiGroups", "id": 785209037, "comment": "Represents a list of emoji categories, to be used when selecting custom emojis to set as custom emoji status.", "arguments": [{ "name": "hash", "type": "int", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "messages.getEmojiProfilePhotoGroups", "type": "messages.EmojiGroups", "id": 564480243, "comment": "Represents a list of emoji categories, to be used when selecting custom emojis to set as profile picture.", "arguments": [{ "name": "hash", "type": "int", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "messages.searchCustomEmoji", "type": "EmojiList", "id": 739360983, "comment": "Look for custom emojis associated to a UTF8 emoji", "arguments": [{ "name": "emoticon", "type": "string", "comment": "The emoji" }, { "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "throws": [{ "code": 400, "name": "EMOTICON_EMPTY", "comment": "The emoji is empty." }], "available": "user" }, { "kind": "method", "name": "messages.togglePeerTranslations", "type": "Bool", "id": 3833378169, "comment": "Show or hide the real-time chat translation popup for a certain chat", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "disabled", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to disable or enable the real-time chat translation popup" }, { "name": "peer", "type": "InputPeer", "comment": "The peer" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getBotApp", "type": "messages.BotApp", "typeModifiers": { "constructorId": 3947933173 }, "id": 889046467, "comment": "Obtain information about a direct link Mini App", "arguments": [{ "name": "app", "type": "InputBotApp", "comment": "Bot app information obtained from a Direct Mini App deep link »." }, { "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here" }], "throws": [{ "code": 400, "name": "BOT_APP_BOT_INVALID", "comment": "The bot_id passed in the inputBotAppShortName constructor is invalid." }, { "code": 400, "name": "BOT_APP_INVALID", "comment": "The specified bot app is invalid." }, { "code": 400, "name": "BOT_APP_SHORTNAME_INVALID", "comment": "The specified bot app short name is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.requestAppWebView", "type": "WebViewResult", "typeModifiers": { "constructorId": 1294139288 }, "id": 1398901710, "comment": "Open a bot mini app from a direct Mini App deep link, sending over user information after user confirmation.\n\nAfter calling this method, until the user closes the webview, {@link messages.RawProlongWebViewRequest} must be called every 60 seconds.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "write_allowed", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Set this flag if the bot is asking permission to send messages to the user as specified in the direct Mini App deep link docs, and the user agreed." }, { "name": "compact", "type": "true", "typeModifiers": { "predicate": "flags.7" }, "comment": "If set, requests to open the mini app in compact mode (as opposed to fullview mode). Must be set if the mode parameter of the direct Mini App deep link is equal to compact." }, { "name": "peer", "type": "InputPeer", "comment": "If the client has clicked on the link in a Telegram chat, pass the chat's peer information; otherwise pass the bot's peer information, instead." }, { "name": "app", "type": "InputBotApp", "comment": "The app obtained by invoking {@link messages.RawGetBotAppRequest} as specified in the direct Mini App deep link docs." }, { "name": "start_param", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "If the startapp query string parameter is present in the direct Mini App deep link, pass it to start_param." }, { "name": "theme_params", "type": "DataJSON", "typeModifiers": { "predicate": "flags.2" }, "comment": "Theme parameters »" }, { "name": "platform", "type": "string", "comment": "Short name of the application; 0-64 English letters, digits, and underscores" }], "throws": [{ "code": 400, "name": "BOT_APP_INVALID", "comment": "The specified bot app is invalid." }, { "code": 400, "name": "BOT_APP_SHORTNAME_INVALID", "comment": "The specified bot app short name is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.setChatWallPaper", "type": "Updates", "id": 2415577825, "comment": "Set a custom wallpaper » in a specific private chat with another user.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "for_both", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Only for Premium users, sets the specified wallpaper for both users of the chat, without requiring confirmation from the other user." }, { "name": "revert", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "If we don't like the new wallpaper the other user of the chat has chosen for us using the for_both flag, we can re-set our previous wallpaper just on our side using this flag." }, { "name": "peer", "type": "InputPeer", "comment": "The private chat where the wallpaper will be set" }, { "name": "wallpaper", "type": "InputWallPaper", "typeModifiers": { "predicate": "flags.0" }, "comment": "The wallpaper », obtained as described in the wallpaper documentation »; must not be provided when installing a wallpaper obtained from a {@link RawMessageActionSetChatWallPaper} service message (id must be provided, instead)." }, { "name": "settings", "type": "WallPaperSettings", "typeModifiers": { "predicate": "flags.2" }, "comment": "Wallpaper settings, obtained as described in the wallpaper documentation » or from {@link RawMessageActionSetChatWallPaper}.wallpaper.settings." }, { "name": "id", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "If the wallpaper was obtained from a {@link RawMessageActionSetChatWallPaper} service message, must contain the ID of that message." }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "WALLPAPER_INVALID", "comment": "The specified wallpaper is invalid." }, { "code": 400, "name": "WALLPAPER_NOT_FOUND", "comment": "The specified wallpaper could not be found." }], "available": "user" }, { "kind": "method", "name": "messages.searchEmojiStickerSets", "type": "messages.FoundStickerSets", "id": 2461288780, "comment": "Search for custom emoji stickersets »", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "exclude_featured", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Exclude featured stickersets from results" }, { "name": "q", "type": "string", "comment": "Query string" }, { "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "messages.getSavedDialogs", "type": "messages.SavedDialogs", "id": 1401016858, "comment": "Returns the current saved dialog list, see here » for more info.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "exclude_pinned", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Exclude pinned dialogs" }, { "name": "offset_date", "type": "int", "comment": "Offsets for pagination, for more info click here" }, { "name": "offset_id", "type": "int", "comment": "Offsets for pagination, for more info click here (top_message ID used for pagination)" }, { "name": "offset_peer", "type": "InputPeer", "comment": "Offset peer for pagination" }, { "name": "limit", "type": "int", "comment": "Number of list elements to be returned" }, { "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here" }], "available": "user" }, { "kind": "method", "name": "messages.getSavedHistory", "type": "messages.Messages", "id": 1033519437, "comment": "Returns saved messages » forwarded from a specific peer", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Target peer" }, { "name": "offset_id", "type": "int", "comment": "Only return messages starting from the specified message ID" }, { "name": "offset_date", "type": "int", "comment": "Only return messages sent before the specified date" }, { "name": "add_offset", "type": "int", "comment": "Number of list elements to be skipped, negative values are also accepted." }, { "name": "limit", "type": "int", "comment": "Number of results to return" }, { "name": "max_id", "type": "int", "comment": "If a positive value was transferred, the method will return only messages with IDs less than max_id" }, { "name": "min_id", "type": "int", "comment": "If a positive value was transferred, the method will return only messages with IDs more than min_id" }, { "name": "hash", "type": "long", "comment": "Result hash" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.deleteSavedHistory", "type": "messages.AffectedHistory", "typeModifiers": { "constructorId": 3025955281 }, "id": 1855459371, "comment": "Deletes messages forwarded from a specific peer to saved messages ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "peer", "type": "InputPeer", "comment": "Peer, whose messages will be deleted from saved messages »" }, { "name": "max_id", "type": "int", "comment": "Maximum ID of message to delete" }, { "name": "min_date", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "Delete all messages newer than this UNIX timestamp" }, { "name": "max_date", "type": "int", "typeModifiers": { "predicate": "flags.3" }, "comment": "Delete all messages older than this UNIX timestamp" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getPinnedSavedDialogs", "type": "messages.SavedDialogs", "id": 3594360032, "comment": "Get pinned saved dialogs, see here » for more info.", "arguments": [], "available": "user" }, { "kind": "method", "name": "messages.toggleSavedDialogPin", "type": "Bool", "id": 2894183390, "comment": "Pin or unpin a saved message dialog ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "pinned", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to pin or unpin the dialog" }, { "name": "peer", "type": "InputDialogPeer", "comment": "The dialog to pin" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.reorderPinnedSavedDialogs", "type": "Bool", "id": 2339464583, "comment": "Reorder pinned saved message dialogs ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "force", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, dialogs pinned server-side but not present in the order field will be unpinned." }, { "name": "order", "type": "InputDialogPeer", "typeModifiers": { "isVector": true }, "comment": "New dialog order" }], "available": "user" }, { "kind": "method", "name": "messages.getSavedReactionTags", "type": "messages.SavedReactionTags", "id": 909631579, "comment": "Fetch the full list of saved message tags created by the user.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "peer", "type": "InputPeer", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, returns tags only used in the specified saved message dialog." }, { "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "messages.updateSavedReactionTag", "type": "Bool", "id": 1613331948, "comment": "Update the description of a saved message tag ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "reaction", "type": "Reaction", "comment": "Reaction associated to the tag" }, { "name": "title", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Tag description, max 12 UTF-8 characters; to remove the description call the method without setting this flag." }], "throws": [{ "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }, { "code": 400, "name": "REACTION_INVALID", "comment": "The specified reaction is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getDefaultTagReactions", "type": "messages.Reactions", "id": 3187225640, "comment": "Fetch a default recommended list of saved message tag reactions.", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "messages.getOutboxReadDate", "type": "OutboxReadDate", "typeModifiers": { "constructorId": 1001931436 }, "id": 2353790557, "comment": "Get the exact read date of one of our messages, sent to a private chat with another user.\n\nCan be only done for private outgoing messages not older than appConfig.pm_read_date_expire_period ».\n\nIf the peer's {@link RawUserFull}.read_dates_private flag is set, we will not be able to fetch the exact read date of messages we send to them, and a USER_PRIVACY_RESTRICTED RPC error will be emitted.
\nThe exact read date of messages might still be unavailable for other reasons, see {@link RawGlobalPrivacySettings} for more info.
\nTo set {@link RawUserFull}.read_dates_private for ourselves invoke {@link account.RawSetGlobalPrivacySettingsRequest}, setting the settings.hide_read_marks flag.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The user to whom we sent the message." }, { "name": "msg_id", "type": "int", "comment": "The message ID." }], "throws": [{ "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "MESSAGE_NOT_READ_YET", "comment": "The specified message wasn't read yet." }, { "code": 400, "name": "MESSAGE_TOO_OLD", "comment": "The message is too old, the requested information is not available." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 403, "name": "USER_PRIVACY_RESTRICTED", "comment": "The user's privacy settings do not allow you to do this." }, { "code": 403, "name": "YOUR_PRIVACY_RESTRICTED", "comment": "You cannot fetch the read date of this message because you have disallowed other users to do so for your messages; to fix, allow other users to see your exact last online date OR purchase a Telegram Premium subscription." }], "available": "user" }, { "kind": "method", "name": "messages.getQuickReplies", "type": "messages.QuickReplies", "id": 3565417128, "comment": "Fetch basic info about all existing quick reply shortcuts.", "arguments": [{ "name": "hash", "type": "long", "comment": "Hash for pagination, generated as specified here » (not the usual algorithm used for hash generation.)" }], "available": "user" }, { "kind": "method", "name": "messages.reorderQuickReplies", "type": "Bool", "id": 1613961479, "comment": "Reorder quick reply shortcuts.\n\nThis will emit an {@link RawUpdateQuickReplies} update to other logged-in sessions.", "arguments": [{ "name": "order", "type": "int", "typeModifiers": { "isVector": true }, "comment": "IDs of all created quick reply shortcuts, in the desired order." }], "throws": [{ "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }], "available": "user" }, { "kind": "method", "name": "messages.checkQuickReplyShortcut", "type": "Bool", "id": 4057005011, "comment": "Before offering the user the choice to add a message to a quick reply shortcut, to make sure that none of the limits specified here » were reached.", "arguments": [{ "name": "shortcut", "type": "string", "comment": "Shorcut name (not ID!)." }], "throws": [{ "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }], "available": "user" }, { "kind": "method", "name": "messages.editQuickReplyShortcut", "type": "Bool", "id": 1543519471, "comment": "Rename a quick reply shortcut.
\nThis will emit an {@link RawUpdateQuickReplies} update to other logged-in sessions.", "arguments": [{ "name": "shortcut_id", "type": "int", "comment": "Shortcut ID." }, { "name": "shortcut", "type": "string", "comment": "New shortcut name." }], "throws": [{ "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }, { "code": 400, "name": "SHORTCUT_INVALID", "comment": "The specified shortcut is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.deleteQuickReplyShortcut", "type": "Bool", "id": 1019234112, "comment": "Completely delete a quick reply shortcut.
\nThis will also emit an {@link RawUpdateDeleteQuickReply} update to other logged-in sessions (and no {@link RawUpdateDeleteQuickReplyMessages} updates, even if all the messages in the shortcuts are also deleted by this method).", "arguments": [{ "name": "shortcut_id", "type": "int", "comment": "Shortcut ID" }], "throws": [{ "code": 400, "name": "SHORTCUT_INVALID", "comment": "The specified shortcut is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getQuickReplyMessages", "type": "messages.Messages", "id": 2493814211, "comment": "Fetch (a subset or all) messages in a quick reply shortcut ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "shortcut_id", "type": "int", "comment": "Quick reply shortcut ID." }, { "name": "id", "type": "int", "typeModifiers": { "predicate": "flags.0", "isVector": true }, "comment": "IDs of the messages to fetch, if empty fetches all of them." }, { "name": "hash", "type": "long", "comment": "Hash used for caching, for more info click here" }], "throws": [{ "code": 400, "name": "SHORTCUT_INVALID", "comment": "The specified shortcut is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.sendQuickReplyMessages", "type": "Updates", "id": 1819610593, "comment": "Send a quick reply shortcut ».", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The peer where to send the shortcut (users only, for now)." }, { "name": "shortcut_id", "type": "int", "comment": "The ID of the quick reply shortcut to send." }, { "name": "id", "type": "int", "typeModifiers": { "isVector": true }, "comment": "Specify a subset of messages from the shortcut to send; if empty, defaults to all of them." }, { "name": "random_id", "type": "long", "typeModifiers": { "isVector": true }, "comment": "Unique client IDs required to prevent message resending, one for each message we're sending, may be empty (but not recommended)." }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }], "available": "user" }, { "kind": "method", "name": "messages.deleteQuickReplyMessages", "type": "Updates", "id": 3775260944, "comment": "Delete one or more messages from a quick reply shortcut. This will also emit an {@link RawUpdateDeleteQuickReplyMessages} update.", "arguments": [{ "name": "shortcut_id", "type": "int", "comment": "Shortcut ID." }, { "name": "id", "type": "int", "typeModifiers": { "isVector": true }, "comment": "IDs of shortcut messages to delete." }], "throws": [{ "code": 400, "name": "SHORTCUT_INVALID", "comment": "The specified shortcut is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.toggleDialogFilterTags", "type": "Bool", "id": 4247640649, "comment": "Enable or disable folder tags ».", "arguments": [{ "name": "enabled", "type": "Bool", "comment": "Enable or disable folder tags." }], "throws": [{ "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }], "available": "user" }, { "kind": "method", "name": "messages.getMyStickers", "type": "messages.MyStickers", "typeModifiers": { "constructorId": 4211040925 }, "id": 3501580796, "comment": "Fetch all stickersets » owned by the current user.", "arguments": [{ "name": "offset_id", "type": "long", "comment": "Offsets for pagination, for more info click here" }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }], "available": "user" }, { "kind": "method", "name": "messages.getEmojiStickerGroups", "type": "messages.EmojiGroups", "id": 500711669, "comment": "Represents a list of emoji categories, to be used when choosing a sticker.", "arguments": [{ "name": "hash", "type": "int", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "messages.getAvailableEffects", "type": "messages.AvailableEffects", "id": 3735161401, "comment": "Fetch the full list of usable animated message effects ».", "arguments": [{ "name": "hash", "type": "int", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "messages.editFactCheck", "type": "Updates", "id": 92925557, "comment": "Edit/create a fact-check on a message.\n\nCan only be used by independent fact-checkers as specified by the appConfig.can_edit_factcheck configuration flag.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer where the message was sent" }, { "name": "msg_id", "type": "int", "comment": "Message ID" }, { "name": "text", "type": "TextWithEntities", "comment": "Fact-check (maximum UTF-8 length specified in appConfig.factcheck_length_limit)." }], "throws": [{ "code": 403, "name": "CHAT_ACTION_FORBIDDEN", "comment": "You cannot execute this action." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.deleteFactCheck", "type": "Updates", "id": 3520762892, "comment": "Delete a fact-check from a message.\n\nCan only be used by independent fact-checkers as specified by the appConfig.can_edit_factcheck configuration flag.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer where the message was sent." }, { "name": "msg_id", "type": "int", "comment": "Message ID" }], "throws": [{ "code": 403, "name": "CHAT_ACTION_FORBIDDEN", "comment": "You cannot execute this action." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.getFactCheck", "type": "FactCheck", "typeModifiers": { "isVector": true, "constructorId": 3097230543 }, "id": 3117270510, "comment": "Fetch one or more factchecks, see here » for the full flow.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer where the messages were sent." }, { "name": "msg_id", "type": "int", "typeModifiers": { "isVector": true }, "comment": "Messages that have associated {@link RawFactCheck} constructors with the need_check flag set." }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "messages.requestMainWebView", "type": "WebViewResult", "typeModifiers": { "constructorId": 1294139288 }, "id": 3386908283, "comment": "Open a Main Mini App.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "compact", "type": "true", "typeModifiers": { "predicate": "flags.7" }, "comment": "If set, requests to open the mini app in compact mode (as opposed to fullview mode). Must be set if the mode parameter of the Main Mini App link is equal to compact." }, { "name": "peer", "type": "InputPeer", "comment": "Currently open chat, may be {@link RawInputPeerEmpty} if no chat is currently open." }, { "name": "bot", "type": "InputUser", "comment": "Bot that owns the main mini app." }, { "name": "start_param", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Start parameter, if opening from a Main Mini App link »." }, { "name": "theme_params", "type": "DataJSON", "typeModifiers": { "predicate": "flags.0" }, "comment": "Theme parameters »" }, { "name": "platform", "type": "string", "comment": "Short name of the application; 0-64 English letters, digits, and underscores" }], "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }], "available": "user" }, { "kind": "method", "name": "updates.getState", "type": "updates.State", "typeModifiers": { "constructorId": 2775329342 }, "id": 3990128682, "comment": "Returns a current state of updates.", "arguments": [], "available": "both" }, { "kind": "method", "name": "updates.getDifference", "type": "updates.Difference", "id": 432207715, "comment": "Get new updates.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "pts", "type": "int", "comment": "PTS, see updates." }, { "name": "pts_limit", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "PTS limit" }, { "name": "pts_total_limit", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "For fast updating: if provided and pts + pts_total_limit < remote pts, {@link updates.RawDifferenceTooLong} will be returned.
Simply tells the server to not return the difference if it is bigger than pts_total_limit
If the remote pts is too big (> ~4000000), this field will default to 1000000" }, { "name": "date", "type": "int", "comment": "date, see updates." }, { "name": "qts", "type": "int", "comment": "QTS, see updates." }, { "name": "qts_limit", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "QTS limit" }], "throws": [{ "code": 400, "name": "CDN_METHOD_INVALID", "comment": "You can't call this method in a CDN DC." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "DATE_EMPTY", "comment": "Date empty." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PERSISTENT_TIMESTAMP_EMPTY", "comment": "Persistent timestamp empty." }, { "code": 400, "name": "PERSISTENT_TIMESTAMP_INVALID", "comment": "Persistent timestamp invalid." }, { "code": 500, "name": "RANDOM_ID_DUPLICATE", "comment": "You provided a random ID that was already used." }, { "code": 400, "name": "USERNAME_INVALID", "comment": "The provided username is not valid." }, { "code": 400, "name": "USER_NOT_PARTICIPANT", "comment": "You're not a member of this supergroup/channel." }], "available": "both" }, { "kind": "method", "name": "updates.getChannelDifference", "type": "updates.ChannelDifference", "id": 51854712, "comment": "Returns the difference between the current state of updates of a certain channel and transmitted.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "force", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Set to true to skip some possibly unneeded updates and reduce server-side load" }, { "name": "channel", "type": "InputChannel", "comment": "The channel" }, { "name": "filter", "type": "ChannelMessagesFilter", "comment": "Messsage filter" }, { "name": "pts", "type": "int", "comment": "Persistent timestamp (see updates)" }, { "name": "limit", "type": "int", "comment": "How many updates to fetch, max 100000
Ordinary (non-bot) users are supposed to pass 10-100" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHANNEL_PUBLIC_GROUP_NA", "comment": "channel/supergroup not available." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "FROM_MESSAGE_BOT_DISABLED", "comment": "Bots can't use fromMessage min constructors." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PERSISTENT_TIMESTAMP_EMPTY", "comment": "Persistent timestamp empty." }, { "code": 400, "name": "PERSISTENT_TIMESTAMP_INVALID", "comment": "Persistent timestamp invalid." }, { "code": 500, "name": "PERSISTENT_TIMESTAMP_OUTDATED", "comment": "Channel internal replication issues, try again later (treat this like an RPC_CALL_FAIL)." }, { "code": 400, "name": "PINNED_DIALOGS_TOO_MUCH", "comment": "Too many pinned dialogs." }, { "code": 400, "name": "RANGES_INVALID", "comment": "Invalid range provided." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }], "available": "both" }, { "kind": "method", "name": "photos.updateProfilePhoto", "type": "photos.Photo", "typeModifiers": { "constructorId": 539045032 }, "id": 166207545, "comment": "Installs a previously uploaded photo as a profile photo.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "fallback", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, the chosen profile photo will be shown to users that can't display your main profile photo due to your privacy settings." }, { "name": "bot", "type": "InputUser", "typeModifiers": { "predicate": "flags.1" }, "comment": "Can contain info of a bot we own, to change the profile photo of that bot, instead of the current user." }, { "name": "id", "type": "InputPhoto", "comment": "Input photo" }], "throws": [{ "code": 400, "name": "ALBUM_PHOTOS_TOO_MANY", "comment": "You have uploaded too many profile photos, delete some before retrying." }, { "code": 400, "name": "FILE_PARTS_INVALID", "comment": "The number of file parts is invalid." }, { "code": 400, "name": "IMAGE_PROCESS_FAILED", "comment": "Failure while processing image." }, { "code": 400, "name": "LOCATION_INVALID", "comment": "The provided location is invalid." }, { "code": 400, "name": "PHOTO_CROP_SIZE_SMALL", "comment": "Photo is too small." }, { "code": 400, "name": "PHOTO_EXT_INVALID", "comment": "The extension of the photo is invalid." }, { "code": 400, "name": "PHOTO_ID_INVALID", "comment": "Photo ID invalid." }], "available": "both" }, { "kind": "method", "name": "photos.uploadProfilePhoto", "type": "photos.Photo", "typeModifiers": { "constructorId": 539045032 }, "id": 59286453, "comment": "Updates current user profile photo.\n\nThe file, video and video_emoji_markup flags are mutually exclusive.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "fallback", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "If set, the chosen profile photo will be shown to users that can't display your main profile photo due to your privacy settings." }, { "name": "bot", "type": "InputUser", "typeModifiers": { "predicate": "flags.5" }, "comment": "Can contain info of a bot we own, to change the profile photo of that bot, instead of the current user." }, { "name": "file", "type": "InputFile", "typeModifiers": { "predicate": "flags.0" }, "comment": "Profile photo" }, { "name": "video", "type": "InputFile", "typeModifiers": { "predicate": "flags.1" }, "comment": "Animated profile picture video" }, { "name": "video_start_ts", "type": "double", "typeModifiers": { "predicate": "flags.2" }, "comment": "Floating point UNIX timestamp in seconds, indicating the frame of the video/sticker that should be used as static preview; can only be used if video or video_emoji_markup is set." }, { "name": "video_emoji_markup", "type": "VideoSize", "typeModifiers": { "predicate": "flags.4" }, "comment": "Animated sticker profile picture, must contain either a {@link RawVideoSizeEmojiMarkup} or a {@link RawVideoSizeStickerMarkup} constructor." }], "throws": [{ "code": 400, "name": "ALBUM_PHOTOS_TOO_MANY", "comment": "You have uploaded too many profile photos, delete some before retrying." }, { "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }, { "code": 400, "name": "EMOJI_MARKUP_INVALID", "comment": "The specified video_emoji_markup was invalid." }, { "code": 400, "name": "FILE_PARTS_INVALID", "comment": "The number of file parts is invalid." }, { "code": 400, "name": "IMAGE_PROCESS_FAILED", "comment": "Failure while processing image." }, { "code": 400, "name": "PHOTO_CROP_FILE_MISSING", "comment": "Photo crop file missing." }, { "code": 400, "name": "PHOTO_CROP_SIZE_SMALL", "comment": "Photo is too small." }, { "code": 400, "name": "PHOTO_EXT_INVALID", "comment": "The extension of the photo is invalid." }, { "code": 400, "name": "PHOTO_FILE_MISSING", "comment": "Profile photo file missing." }, { "code": 400, "name": "PHOTO_INVALID", "comment": "Photo invalid." }, { "code": 400, "name": "STICKER_MIME_INVALID", "comment": "The specified sticker MIME type is invalid." }, { "code": 400, "name": "VIDEO_FILE_INVALID", "comment": "The specified video file is invalid." }], "available": "both" }, { "kind": "method", "name": "photos.deletePhotos", "type": "long", "typeModifiers": { "isVector": true }, "id": 2278522671, "comment": "Deletes profile photos. The method returns a list of successfully deleted photo IDs.", "arguments": [{ "name": "id", "type": "InputPhoto", "typeModifiers": { "isVector": true }, "comment": "Input photos to delete" }], "available": "user" }, { "kind": "method", "name": "photos.getUserPhotos", "type": "photos.Photos", "id": 2446144168, "comment": "Returns the list of user photos.", "arguments": [{ "name": "user_id", "type": "InputUser", "comment": "User ID" }, { "name": "offset", "type": "int", "comment": "Number of list elements to be skipped" }, { "name": "max_id", "type": "long", "comment": "If a positive value was transferred, the method will return only photos with IDs less than the set one. This parameter is often useful when refetching file references », as in conjuction with limit=1 and offset=-1 the {@link RawPhoto} object with the id specified in max_id can be fetched." }, { "name": "limit", "type": "int", "comment": "Number of list elements to be returned" }], "throws": [{ "code": 400, "name": "MAX_ID_INVALID", "comment": "The provided max ID is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "both" }, { "kind": "method", "name": "photos.uploadContactProfilePhoto", "type": "photos.Photo", "typeModifiers": { "constructorId": 539045032 }, "id": 3779873393, "comment": "Upload a custom profile picture for a contact, or suggest a new profile picture to a contact.\n\nThe file, video and video_emoji_markup flags are mutually exclusive.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "suggest", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "If set, will send a {@link RawMessageActionSuggestProfilePhoto} service message to user_id, suggesting them to use the specified profile picture; otherwise, will set a personal profile picture for the user (only visible to the current user)." }, { "name": "save", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "If set, removes a previously set personal profile picture (does not affect suggested profile pictures, to remove them simply deleted the {@link RawMessageActionSuggestProfilePhoto} service message with {@link messages.RawDeleteMessagesRequest})." }, { "name": "user_id", "type": "InputUser", "comment": "The contact" }, { "name": "file", "type": "InputFile", "typeModifiers": { "predicate": "flags.0" }, "comment": "Profile photo" }, { "name": "video", "type": "InputFile", "typeModifiers": { "predicate": "flags.1" }, "comment": "Animated profile picture video" }, { "name": "video_start_ts", "type": "double", "typeModifiers": { "predicate": "flags.2" }, "comment": "Floating point UNIX timestamp in seconds, indicating the frame of the video/sticker that should be used as static preview; can only be used if video or video_emoji_markup is set." }, { "name": "video_emoji_markup", "type": "VideoSize", "typeModifiers": { "predicate": "flags.5" }, "comment": "Animated sticker profile picture, must contain either a {@link RawVideoSizeEmojiMarkup} or a {@link RawVideoSizeStickerMarkup} constructor." }], "throws": [{ "code": 400, "name": "CONTACT_MISSING", "comment": "The specified user is not a contact." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "user" }, { "kind": "method", "name": "upload.saveFilePart", "type": "Bool", "id": 3003426337, "comment": "Saves a part of file for further sending to one of the methods.", "arguments": [{ "name": "file_id", "type": "long", "comment": "Random file identifier created by the client" }, { "name": "file_part", "type": "int", "comment": "Numerical order of a part" }, { "name": "bytes", "type": "bytes", "comment": "Binary data, content of a part" }], "throws": [{ "code": 400, "name": "FILE_PART_EMPTY", "comment": "The provided file part is empty." }, { "code": 400, "name": "FILE_PART_INVALID", "comment": "The file part number is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }], "available": "both" }, { "kind": "method", "name": "upload.getFile", "type": "upload.File", "id": 3193124286, "comment": "Returns content of a whole file or its part.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "precise", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Disable some checks on limit and offset values, useful for example to stream videos by keyframes" }, { "name": "cdn_supported", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether the current client supports CDN downloads" }, { "name": "location", "type": "InputFileLocation", "comment": "File location" }, { "name": "offset", "type": "int53", "comment": "Number of bytes to be skipped" }, { "name": "limit", "type": "int", "comment": "Number of bytes to be returned" }], "throws": [{ "code": 400, "name": "CDN_METHOD_INVALID", "comment": "You can't call this method in a CDN DC." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 406, "name": "FILEREF_UPGRADE_NEEDED", "comment": "The client has to be updated in order to support file references." }, { "code": 400, "name": "FILE_ID_INVALID", "comment": "The provided file id is invalid." }, { "code": 400, "name": "FILE_REFERENCE_EXPIRED", "comment": "File reference expired, it must be refetched as described in the documentation." }, { "code": 420, "name": "FLOOD_PREMIUM_WAIT_%d", "comment": "Please wait %d seconds before repeating the action, or purchase a Telegram Premium subscription to remove this rate limit." }, { "code": 400, "name": "LIMIT_INVALID", "comment": "The provided limit is invalid." }, { "code": 400, "name": "LOCATION_INVALID", "comment": "The provided location is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "OFFSET_INVALID", "comment": "The provided offset is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "both" }, { "kind": "method", "name": "upload.saveBigFilePart", "type": "Bool", "id": 3732629309, "comment": "Saves a part of a large file (over 10 MB in size) to be later passed to one of the methods.", "arguments": [{ "name": "file_id", "type": "long", "comment": "Random file id, created by the client" }, { "name": "file_part", "type": "int", "comment": "Part sequence number" }, { "name": "file_total_parts", "type": "int", "comment": "Total number of parts" }, { "name": "bytes", "type": "bytes", "comment": "Binary data, part contents" }], "throws": [{ "code": 400, "name": "FILE_PARTS_INVALID", "comment": "The number of file parts is invalid." }, { "code": 400, "name": "FILE_PART_EMPTY", "comment": "The provided file part is empty." }, { "code": 400, "name": "FILE_PART_INVALID", "comment": "The file part number is invalid." }, { "code": 400, "name": "FILE_PART_SIZE_CHANGED", "comment": "Provided file part size has changed." }, { "code": 400, "name": "FILE_PART_SIZE_INVALID", "comment": "The provided file part size is invalid." }, { "code": 400, "name": "FILE_PART_TOO_BIG", "comment": "The uploaded file part is too big." }], "available": "both" }, { "kind": "method", "name": "upload.getWebFile", "type": "upload.WebFile", "typeModifiers": { "constructorId": 568808380 }, "id": 619086221, "comment": "Returns content of a web file, by proxying the request through telegram, see the webfile docs for more info.\n\nNote: the query must be sent to the DC specified in the webfile_dc_id MTProto configuration field.", "arguments": [{ "name": "location", "type": "InputWebFileLocation", "comment": "The file to download" }, { "name": "offset", "type": "int", "comment": "Number of bytes to be skipped" }, { "name": "limit", "type": "int", "comment": "Number of bytes to be returned" }], "throws": [{ "code": 400, "name": "DOCUMENT_INVALID", "comment": "The specified document is invalid." }, { "code": 400, "name": "LOCATION_INVALID", "comment": "The provided location is invalid." }], "available": "user" }, { "kind": "method", "name": "upload.getCdnFile", "type": "upload.CdnFile", "id": 962554330, "comment": "Download a CDN file.", "arguments": [{ "name": "file_token", "type": "bytes", "comment": "File token" }, { "name": "offset", "type": "int53", "comment": "Offset of chunk to download" }, { "name": "limit", "type": "int", "comment": "Length of chunk to download" }], "throws": [{ "code": 400, "name": "FILE_TOKEN_INVALID", "comment": "The master DC did not accept the file_token (e.g., the token has expired). Continue downloading the file from the master DC using upload.getFile." }], "available": "user" }, { "kind": "method", "name": "upload.reuploadCdnFile", "type": "FileHash", "typeModifiers": { "isVector": true, "constructorId": 4087022428 }, "id": 2603046056, "comment": "Request a reupload of a certain file to a CDN DC.", "arguments": [{ "name": "file_token", "type": "bytes", "comment": "File token" }, { "name": "request_token", "type": "bytes", "comment": "Request token" }], "throws": [{ "code": 400, "name": "CDN_METHOD_INVALID", "comment": "You can't call this method in a CDN DC." }, { "code": 500, "name": "CDN_UPLOAD_TIMEOUT", "comment": "A server-side timeout occurred while reuploading the file to the CDN DC." }, { "code": 400, "name": "FILE_TOKEN_INVALID", "comment": "The master DC did not accept the file_token (e.g., the token has expired). Continue downloading the file from the master DC using upload.getFile." }, { "code": 400, "name": "LOCATION_INVALID", "comment": "The provided location is invalid." }, { "code": 400, "name": "REQUEST_TOKEN_INVALID", "comment": "The master DC did not accept the request_token from the CDN DC. Continue downloading the file from the master DC using upload.getFile." }, { "code": 400, "name": "RSA_DECRYPT_FAILED", "comment": "Internal RSA decryption failed." }], "available": "both" }, { "kind": "method", "name": "upload.getCdnFileHashes", "type": "FileHash", "typeModifiers": { "isVector": true, "constructorId": 4087022428 }, "id": 2447130417, "comment": "Get SHA256 hashes for verifying downloaded CDN files", "arguments": [{ "name": "file_token", "type": "bytes", "comment": "File" }, { "name": "offset", "type": "int53", "comment": "Offset from which to start getting hashes" }], "throws": [{ "code": 400, "name": "CDN_METHOD_INVALID", "comment": "You can't call this method in a CDN DC." }, { "code": 400, "name": "FILE_TOKEN_INVALID", "comment": "The master DC did not accept the file_token (e.g., the token has expired). Continue downloading the file from the master DC using upload.getFile." }, { "code": 400, "name": "RSA_DECRYPT_FAILED", "comment": "Internal RSA decryption failed." }], "available": "both" }, { "kind": "method", "name": "upload.getFileHashes", "type": "FileHash", "typeModifiers": { "isVector": true, "constructorId": 4087022428 }, "id": 2438371370, "comment": "Get SHA256 hashes for verifying downloaded files", "arguments": [{ "name": "location", "type": "InputFileLocation", "comment": "File" }, { "name": "offset", "type": "int53", "comment": "Offset from which to get file hashes" }], "throws": [{ "code": 400, "name": "LOCATION_INVALID", "comment": "The provided location is invalid." }], "available": "both" }, { "kind": "method", "name": "help.getConfig", "type": "Config", "typeModifiers": { "constructorId": 3424265246 }, "id": 3304659051, "comment": "Returns current configuration, including data center configuration.", "arguments": [], "throws": [{ "code": 400, "name": "CONNECTION_API_ID_INVALID", "comment": "The provided API id is invalid." }, { "code": 400, "name": "CONNECTION_APP_VERSION_EMPTY", "comment": "App version is empty." }, { "code": 400, "name": "CONNECTION_LAYER_INVALID", "comment": "Layer invalid." }, { "code": 400, "name": "DATA_INVALID", "comment": "Encrypted data invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "USERNAME_INVALID", "comment": "The provided username is not valid." }, { "code": 403, "name": "USER_PRIVACY_RESTRICTED", "comment": "The user's privacy settings do not allow you to do this." }], "available": "both" }, { "kind": "method", "name": "help.getNearestDc", "type": "NearestDc", "typeModifiers": { "constructorId": 2384074613 }, "id": 531836966, "comment": "Returns info on data center nearest to the user.", "arguments": [], "available": "user" }, { "kind": "method", "name": "help.getAppUpdate", "type": "help.AppUpdate", "id": 1378703997, "comment": "Returns information on update availability for the current application.", "arguments": [{ "name": "source", "type": "string", "comment": "Source" }], "available": "user" }, { "kind": "method", "name": "help.getInviteText", "type": "help.InviteText", "typeModifiers": { "constructorId": 415997816 }, "id": 1295590211, "comment": "Returns localized text of a text message with an invitation.", "arguments": [], "available": "user" }, { "kind": "method", "name": "help.getSupport", "type": "help.Support", "typeModifiers": { "constructorId": 398898678 }, "id": 2631862477, "comment": "Returns the support user for the \"ask a question\" feature.", "arguments": [], "available": "user" }, { "kind": "method", "name": "help.setBotUpdatesStatus", "type": "Bool", "id": 3961704397, "comment": "Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only", "arguments": [{ "name": "pending_updates_count", "type": "int", "comment": "Number of pending updates" }, { "name": "message", "type": "string", "comment": "Error message, if present" }], "throws": [{ "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, { "kind": "method", "name": "help.getCdnConfig", "type": "CdnConfig", "typeModifiers": { "constructorId": 1462101002 }, "id": 1375900482, "comment": "Get configuration for CDN file downloads.", "arguments": [], "available": "both" }, { "kind": "method", "name": "help.getRecentMeUrls", "type": "help.RecentMeUrls", "typeModifiers": { "constructorId": 235081943 }, "id": 1036054804, "comment": "Get recently used t.me links.\n\nWhen installing official applications from \"Download Telegram\" buttons present in t.me pages, a referral parameter is passed to applications after installation.
\nIf, after downloading the application, the user creates a new account (instead of logging into an existing one), the referral parameter should be imported using this method, which returns the t.me pages the user recently opened, before installing Telegram.", "arguments": [{ "name": "referer", "type": "string", "comment": "Referrer" }], "available": "user" }, { "kind": "method", "name": "help.getTermsOfServiceUpdate", "type": "help.TermsOfServiceUpdate", "id": 749019089, "comment": "Look for updates of telegram's terms of service", "arguments": [], "available": "user" }, { "kind": "method", "name": "help.acceptTermsOfService", "type": "Bool", "id": 4000511898, "comment": "Accept the new terms of service", "arguments": [{ "name": "id", "type": "DataJSON", "comment": "ID of terms of service" }], "throws": [{ "code": 400, "name": "DATA_JSON_INVALID", "comment": "The provided JSON data is invalid." }], "available": "user" }, { "kind": "method", "name": "help.getDeepLinkInfo", "type": "help.DeepLinkInfo", "id": 1072547679, "comment": "Get info about an unsupported deep link, see here for more info ».", "arguments": [{ "name": "path", "type": "string", "comment": "Path component of a tg: link" }], "available": "user" }, { "kind": "method", "name": "help.getAppConfig", "type": "help.AppConfig", "id": 1642330196, "comment": "Get app-specific configuration, see client configuration for more info on the result.", "arguments": [{ "name": "hash", "type": "int", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "help.saveAppLog", "type": "Bool", "id": 1862465352, "comment": "Saves logs of application on the server.", "arguments": [{ "name": "events", "type": "InputAppEvent", "typeModifiers": { "isVector": true }, "comment": "List of input events" }], "available": "user" }, { "kind": "method", "name": "help.getPassportConfig", "type": "help.PassportConfig", "id": 3328290056, "comment": "Get passport configuration", "arguments": [{ "name": "hash", "type": "int", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "help.getSupportName", "type": "help.SupportName", "typeModifiers": { "constructorId": 2349199817 }, "id": 3546343212, "comment": "Get localized name of the telegram support user", "arguments": [], "throws": [{ "code": 403, "name": "USER_INVALID", "comment": "Invalid user provided." }], "available": "user" }, { "kind": "method", "name": "help.getUserInfo", "type": "help.UserInfo", "id": 59377875, "comment": "Can only be used by TSF members to obtain internal information.", "arguments": [{ "name": "user_id", "type": "InputUser", "comment": "User ID" }], "throws": [{ "code": 403, "name": "USER_INVALID", "comment": "Invalid user provided." }], "available": "user" }, { "kind": "method", "name": "help.editUserInfo", "type": "help.UserInfo", "id": 1723407216, "comment": "Internal use", "arguments": [{ "name": "user_id", "type": "InputUser", "comment": "User" }, { "name": "message", "type": "string", "comment": "Message" }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "isVector": true }, "comment": "Message entities for styled text" }], "throws": [{ "code": 400, "name": "ENTITY_BOUNDS_INVALID", "comment": "A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length." }, { "code": 403, "name": "USER_INVALID", "comment": "Invalid user provided." }], "available": "user" }, { "kind": "method", "name": "help.getPromoData", "type": "help.PromoData", "id": 3231151137, "comment": "Get MTProxy/Public Service Announcement information", "arguments": [], "available": "user" }, { "kind": "method", "name": "help.hidePromoData", "type": "Bool", "id": 505748629, "comment": "Hide MTProxy/Public Service Announcement information", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer to hide" }], "available": "user" }, { "kind": "method", "name": "help.dismissSuggestion", "type": "Bool", "id": 4111317665, "comment": "Dismiss a suggestion, see here for more info ».", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "In the case of pending suggestions in {@link RawChannelFull}, the channel ID." }, { "name": "suggestion", "type": "string", "comment": "Suggestion, see here for more info »." }], "available": "user" }, { "kind": "method", "name": "help.getCountriesList", "type": "help.CountriesList", "id": 1935116200, "comment": "Get name, ISO code, localized name and phone codes/patterns of all available countries", "arguments": [{ "name": "lang_code", "type": "string", "comment": "Language code of the current user" }, { "name": "hash", "type": "int", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "help.getPremiumPromo", "type": "help.PremiumPromo", "typeModifiers": { "constructorId": 1395946908 }, "id": 3088815060, "comment": "Get Telegram Premium promotion information", "arguments": [], "available": "user" }, { "kind": "method", "name": "help.getPeerColors", "type": "help.PeerColors", "id": 3665884207, "comment": "Get the set of accent color palettes » that can be used for message accents.", "arguments": [{ "name": "hash", "type": "int", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "help.getPeerProfileColors", "type": "help.PeerColors", "id": 2882513405, "comment": "Get the set of accent color palettes » that can be used in profile page backgrounds.", "arguments": [{ "name": "hash", "type": "int", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "help.getTimezonesList", "type": "help.TimezonesList", "id": 1236468288, "comment": "Returns timezone information that may be used elsewhere in the API, such as to set Telegram Business opening hours ».", "arguments": [{ "name": "hash", "type": "int", "comment": "Hash used for caching, for more info click here." }], "available": "user" }, { "kind": "method", "name": "channels.readHistory", "type": "Bool", "id": 3423619383, "comment": "Mark channel/supergroup history as read", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Channel/supergroup" }, { "name": "max_id", "type": "int", "comment": "ID of message up to which messages should be marked as read" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }], "available": "user" }, { "kind": "method", "name": "channels.deleteMessages", "type": "messages.AffectedMessages", "typeModifiers": { "constructorId": 2228326789 }, "id": 2227305806, "comment": "Delete messages in a channel/supergroup", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Channel/supergroup" }, { "name": "id", "type": "int", "typeModifiers": { "isVector": true }, "comment": "IDs of messages to delete" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "MESSAGE_DELETE_FORBIDDEN", "comment": "You can't delete one of the messages you tried to delete, most likely because it is a service message." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }], "available": "both" }, { "kind": "method", "name": "channels.reportSpam", "type": "Bool", "id": 4098523925, "comment": "Reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Supergroup" }, { "name": "participant", "type": "InputPeer", "comment": "Participant whose messages should be reported" }, { "name": "id", "type": "int", "typeModifiers": { "isVector": true }, "comment": "IDs of spam messages" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "user" }, { "kind": "method", "name": "channels.getMessages", "type": "messages.Messages", "id": 2911672867, "comment": "Get channel/supergroup messages", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Channel/supergroup" }, { "name": "id", "type": "InputMessage", "typeModifiers": { "isVector": true }, "comment": "IDs of messages to get" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MESSAGE_IDS_EMPTY", "comment": "No message ids were provided." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }], "available": "both" }, { "kind": "method", "name": "channels.getParticipants", "type": "channels.ChannelParticipants", "id": 2010044880, "comment": "Get the participants of a supergroup/channel", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Channel" }, { "name": "filter", "type": "ChannelParticipantsFilter", "comment": "Which participant types to fetch" }, { "name": "offset", "type": "int", "comment": "Offset" }, { "name": "limit", "type": "int", "comment": "Limit" }, { "name": "hash", "type": "long", "comment": "Hash" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }], "available": "both" }, { "kind": "method", "name": "channels.getParticipant", "type": "channels.ChannelParticipant", "typeModifiers": { "constructorId": 3753378583 }, "id": 2695589062, "comment": "Get info about a channel/supergroup participant", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Channel/supergroup" }, { "name": "participant", "type": "InputPeer", "comment": "Participant to get info about" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PARTICIPANT_ID_INVALID", "comment": "The specified participant ID is invalid." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }, { "code": 400, "name": "USER_NOT_PARTICIPANT", "comment": "You're not a member of this supergroup/channel." }], "available": "both" }, { "kind": "method", "name": "channels.getChannels", "type": "messages.Chats", "id": 176122811, "comment": "Get info about channels/supergroups", "arguments": [{ "name": "id", "type": "InputChannel", "typeModifiers": { "isVector": true }, "comment": "IDs of channels/supergroups to get info about" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }], "available": "both" }, { "kind": "method", "name": "channels.getFullChannel", "type": "messages.ChatFull", "typeModifiers": { "constructorId": 3856126364 }, "id": 141781513, "comment": "Get full info about a supergroup, gigagroup or channel", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "The channel, supergroup or gigagroup to get info about" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHANNEL_PUBLIC_GROUP_NA", "comment": "channel/supergroup not available." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }], "available": "both" }, { "kind": "method", "name": "channels.createChannel", "type": "Updates", "id": 2432722695, "comment": "Create a supergroup/channel.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "broadcast", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to create a channel" }, { "name": "megagroup", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether to create a supergroup" }, { "name": "for_import", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "Whether the supergroup is being created to import messages from a foreign chat service using {@link messages.RawInitHistoryImportRequest}" }, { "name": "forum", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Whether to create a forum" }, { "name": "title", "type": "string", "comment": "Channel title" }, { "name": "about", "type": "string", "comment": "Channel description" }, { "name": "geo_point", "type": "InputGeoPoint", "typeModifiers": { "predicate": "flags.2" }, "comment": "Geogroup location, see here » for more info on geogroups." }, { "name": "address", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "Geogroup address, see here » for more info on geogroups." }, { "name": "ttl_period", "type": "int", "typeModifiers": { "predicate": "flags.4" }, "comment": "Time-to-live of all messages that will be sent in the supergroup: once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. You can use {@link messages.RawSetDefaultHistoryTTLRequest} to edit this value later." }], "throws": [{ "code": 400, "name": "ADDRESS_INVALID", "comment": "The specified geopoint address is invalid." }, { "code": 400, "name": "CHANNELS_ADMIN_LOCATED_TOO_MUCH", "comment": "The user has reached the limit of public geogroups." }, { "code": 400, "name": "CHANNELS_TOO_MUCH", "comment": "You have joined too many channels/supergroups." }, { "code": 400, "name": "CHAT_ABOUT_TOO_LONG", "comment": "Chat about too long." }, { "code": 500, "name": "CHAT_INVALID", "comment": "Invalid chat." }, { "code": 400, "name": "CHAT_TITLE_EMPTY", "comment": "No chat title provided." }, { "code": 400, "name": "TTL_PERIOD_INVALID", "comment": "The specified TTL period is invalid." }, { "code": 406, "name": "USER_RESTRICTED", "comment": "You're spamreported, you can't create channels or chats." }], "available": "user" }, { "kind": "method", "name": "channels.editAdmin", "type": "Updates", "id": 3543959810, "comment": "Modify the admin rights of a user in a supergroup/channel.", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "The supergroup/channel." }, { "name": "user_id", "type": "InputUser", "comment": "The ID of the user whose admin rights should be modified" }, { "name": "admin_rights", "type": "ChatAdminRights", "comment": "The admin rights" }, { "name": "rank", "type": "string", "comment": "Indicates the role (rank) of the admin in the group: just an arbitrary string" }], "throws": [{ "code": 400, "name": "ADMINS_TOO_MUCH", "comment": "There are too many admins." }, { "code": 400, "name": "ADMIN_RANK_EMOJI_NOT_ALLOWED", "comment": "An admin rank cannot contain emojis." }, { "code": 400, "name": "ADMIN_RANK_INVALID", "comment": "The specified admin rank is invalid." }, { "code": 400, "name": "BOTS_TOO_MUCH", "comment": "There are too many bots in this chat/channel." }, { "code": 400, "name": "BOT_CHANNELS_NA", "comment": "Bots can't edit admin privileges." }, { "code": 400, "name": "BOT_GROUPS_BLOCKED", "comment": "This bot can't be added to groups." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_INVITE_REQUIRED", "comment": "You do not have the rights to do this." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 406, "name": "FRESH_CHANGE_ADMINS_FORBIDDEN", "comment": "You were just elected admin, you can't add or modify other admins yet." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 403, "name": "RIGHT_FORBIDDEN", "comment": "Your admin rights do not allow you to do this." }, { "code": 400, "name": "USERS_TOO_MUCH", "comment": "The maximum number of users has been exceeded (to create a chat, for example)." }, { "code": 400, "name": "USER_BLOCKED", "comment": "User blocked." }, { "code": 403, "name": "USER_CHANNELS_TOO_MUCH", "comment": "One of the users you tried to add is already in too many channels/supergroups." }, { "code": 400, "name": "USER_CREATOR", "comment": "For channels.editAdmin: you've tried to edit the admin rights of the owner, but you're not the owner; for channels.leaveChannel: you can't leave this channel, because you're its creator." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }, { "code": 403, "name": "USER_NOT_MUTUAL_CONTACT", "comment": "The provided user is not a mutual contact." }, { "code": 403, "name": "USER_PRIVACY_RESTRICTED", "comment": "The user's privacy settings do not allow you to do this." }, { "code": 403, "name": "USER_RESTRICTED", "comment": "You're spamreported, you can't create channels or chats." }], "available": "both" }, { "kind": "method", "name": "channels.editTitle", "type": "Updates", "id": 1450044624, "comment": "Edit the name of a channel/supergroup", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Channel/supergroup" }, { "name": "title", "type": "string", "comment": "New name" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "CHAT_TITLE_EMPTY", "comment": "No chat title provided." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }], "available": "both" }, { "kind": "method", "name": "channels.editPhoto", "type": "Updates", "id": 4046346185, "comment": "Change the photo of a channel/supergroup", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Channel/supergroup whose photo should be edited" }, { "name": "photo", "type": "InputChatPhoto", "comment": "New photo" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "FILE_PARTS_INVALID", "comment": "The number of file parts is invalid." }, { "code": 400, "name": "FILE_REFERENCE_INVALID", "comment": "The specified file reference is invalid." }, { "code": 400, "name": "IMAGE_PROCESS_FAILED", "comment": "Failure while processing image." }, { "code": 400, "name": "PHOTO_CROP_SIZE_SMALL", "comment": "Photo is too small." }, { "code": 400, "name": "PHOTO_EXT_INVALID", "comment": "The extension of the photo is invalid." }, { "code": 400, "name": "PHOTO_INVALID", "comment": "Photo invalid." }, { "code": 400, "name": "STICKER_MIME_INVALID", "comment": "The specified sticker MIME type is invalid." }], "available": "both" }, { "kind": "method", "name": "channels.checkUsername", "type": "Bool", "id": 283557164, "comment": "Check if a username is free and can be assigned to a channel/supergroup", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "The channel/supergroup that will assigned the specified username" }, { "name": "username", "type": "string", "comment": "The username to check" }], "throws": [{ "code": 400, "name": "CHANNELS_ADMIN_PUBLIC_TOO_MUCH", "comment": "You're admin of too many public channels, make some channels private to change the username of this channel." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USERNAME_INVALID", "comment": "The provided username is not valid." }, { "code": 400, "name": "USERNAME_OCCUPIED", "comment": "The provided username is already occupied." }, { "code": 400, "name": "USERNAME_PURCHASE_AVAILABLE", "comment": "The specified username can be purchased on https://fragment.com." }], "available": "user" }, { "kind": "method", "name": "channels.updateUsername", "type": "Bool", "id": 890549214, "comment": "Change or remove the username of a supergroup/channel", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Channel" }, { "name": "username", "type": "string", "comment": "New username, pass an empty string to remove the username" }], "throws": [{ "code": 400, "name": "CHANNELS_ADMIN_PUBLIC_TOO_MUCH", "comment": "You're admin of too many public channels, make some channels private to change the username of this channel." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "USERNAME_INVALID", "comment": "The provided username is not valid." }, { "code": 400, "name": "USERNAME_NOT_MODIFIED", "comment": "The username was not modified." }, { "code": 400, "name": "USERNAME_OCCUPIED", "comment": "The provided username is already occupied." }, { "code": 400, "name": "USERNAME_PURCHASE_AVAILABLE", "comment": "The specified username can be purchased on https://fragment.com." }], "available": "user" }, { "kind": "method", "name": "channels.joinChannel", "type": "Updates", "id": 615851205, "comment": "Join a channel/supergroup", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Channel/supergroup to join" }], "throws": [{ "code": 400, "name": "CHANNELS_TOO_MUCH", "comment": "You have joined too many channels/supergroups." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_INVALID", "comment": "Invalid chat." }, { "code": 400, "name": "INVITE_HASH_EMPTY", "comment": "The invite hash is empty." }, { "code": 406, "name": "INVITE_HASH_EXPIRED", "comment": "The invite link has expired." }, { "code": 400, "name": "INVITE_HASH_INVALID", "comment": "The invite hash is invalid." }, { "code": 400, "name": "INVITE_REQUEST_SENT", "comment": "You have successfully requested to join this chat or channel." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USERS_TOO_MUCH", "comment": "The maximum number of users has been exceeded (to create a chat, for example)." }, { "code": 400, "name": "USER_ALREADY_PARTICIPANT", "comment": "The user is already in the group." }, { "code": 400, "name": "USER_CHANNELS_TOO_MUCH", "comment": "One of the users you tried to add is already in too many channels/supergroups." }], "available": "user" }, { "kind": "method", "name": "channels.leaveChannel", "type": "Updates", "id": 4164332181, "comment": "Leave a channel/supergroup", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Channel/supergroup to leave" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHANNEL_PUBLIC_GROUP_NA", "comment": "channel/supergroup not available." }, { "code": 400, "name": "CHAT_INVALID", "comment": "Invalid chat." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }, { "code": 400, "name": "USER_CREATOR", "comment": "For channels.editAdmin: you've tried to edit the admin rights of the owner, but you're not the owner; for channels.leaveChannel: you can't leave this channel, because you're its creator." }, { "code": 400, "name": "USER_NOT_PARTICIPANT", "comment": "You're not a member of this supergroup/channel." }], "available": "both" }, { "kind": "method", "name": "channels.inviteToChannel", "type": "messages.InvitedUsers", "typeModifiers": { "constructorId": 2136862630 }, "id": 3387112788, "comment": "Invite users to a channel/supergroup", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Channel/supergroup" }, { "name": "users", "type": "InputUser", "typeModifiers": { "isVector": true }, "comment": "Users to invite" }], "throws": [{ "code": 400, "name": "BOTS_TOO_MUCH", "comment": "There are too many bots in this chat/channel." }, { "code": 400, "name": "BOT_GROUPS_BLOCKED", "comment": "This bot can't be added to groups." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_INVALID", "comment": "Invalid chat." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "USERS_TOO_MUCH", "comment": "The maximum number of users has been exceeded (to create a chat, for example)." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }, { "code": 400, "name": "USER_BLOCKED", "comment": "User blocked." }, { "code": 400, "name": "USER_BOT", "comment": "Bots can only be admins in channels." }, { "code": 403, "name": "USER_CHANNELS_TOO_MUCH", "comment": "One of the users you tried to add is already in too many channels/supergroups." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }, { "code": 400, "name": "USER_KICKED", "comment": "This user was kicked from this supergroup/channel." }, { "code": 403, "name": "USER_NOT_MUTUAL_CONTACT", "comment": "The provided user is not a mutual contact." }, { "code": 403, "name": "USER_PRIVACY_RESTRICTED", "comment": "The user's privacy settings do not allow you to do this." }], "available": "user" }, { "kind": "method", "name": "channels.deleteChannel", "type": "Updates", "id": 3222347747, "comment": "Delete a channel/supergroup", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Channel/supergroup to delete" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 406, "name": "CHANNEL_TOO_LARGE", "comment": "Channel is too large to be deleted; this error is issued when trying to delete channels with more than 1000 members (subject to change)." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }], "available": "user" }, { "kind": "method", "name": "channels.exportMessageLink", "type": "ExportedMessageLink", "typeModifiers": { "constructorId": 1571494644 }, "id": 3862932971, "comment": "Get link and embed info of a message in a channel/supergroup", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "grouped", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to include other grouped media (for albums)" }, { "name": "thread", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether to also include a thread ID, if available, inside of the link" }, { "name": "channel", "type": "InputChannel", "comment": "Channel" }, { "name": "id", "type": "int", "comment": "Message ID" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }], "available": "user" }, { "kind": "method", "name": "channels.toggleSignatures", "type": "Updates", "id": 527021574, "comment": "Enable/disable message signatures in channels", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Channel" }, { "name": "enabled", "type": "Bool", "comment": "Value" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }], "available": "user" }, { "kind": "method", "name": "channels.getAdminedPublicChannels", "type": "messages.Chats", "id": 4172297903, "comment": "Get channels/supergroups/geogroups we're admin in. Usually called when the user exceeds the {@link RawConfig} for owned public channels/supergroups/geogroups, and the user is given the choice to remove one of their channels/supergroups/geogroups.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "by_location", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Get geogroups" }, { "name": "check_limit", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "If set and the user has reached the limit of owned public channels/supergroups/geogroups, instead of returning the channel list one of the specified errors will be returned.
Useful to check if a new public channel can indeed be created, even before asking the user to enter a channel username to use in {@link channels.RawCheckUsernameRequest}/{@link channels.RawUpdateUsernameRequest}." }, { "name": "for_personal", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Set this flag to only fetch the full list of channels that may be passed to {@link account.RawUpdatePersonalChannelRequest} to display them on our profile page." }], "throws": [{ "code": 400, "name": "CHANNELS_ADMIN_LOCATED_TOO_MUCH", "comment": "The user has reached the limit of public geogroups." }, { "code": 400, "name": "CHANNELS_ADMIN_PUBLIC_TOO_MUCH", "comment": "You're admin of too many public channels, make some channels private to change the username of this channel." }], "available": "user" }, { "kind": "method", "name": "channels.editBanned", "type": "Updates", "id": 2531708289, "comment": "Ban/unban/kick a user in a supergroup/channel.", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "The supergroup/channel." }, { "name": "participant", "type": "InputPeer", "comment": "Participant to ban" }, { "name": "banned_rights", "type": "ChatBannedRights", "comment": "The banned rights" }], "throws": [{ "code": 406, "name": "BANNED_RIGHTS_INVALID", "comment": "You provided some invalid flags in the banned rights." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PARTICIPANT_ID_INVALID", "comment": "The specified participant ID is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USER_ADMIN_INVALID", "comment": "You're not an admin." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "both" }, { "kind": "method", "name": "channels.getAdminLog", "type": "channels.AdminLogResults", "typeModifiers": { "constructorId": 3985307469 }, "id": 870184064, "comment": "Get the admin log of a channel/supergroup", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "channel", "type": "InputChannel", "comment": "Channel" }, { "name": "q", "type": "string", "comment": "Search query, can be empty" }, { "name": "events_filter", "type": "ChannelAdminLogEventsFilter", "typeModifiers": { "predicate": "flags.0" }, "comment": "Event filter" }, { "name": "admins", "type": "InputUser", "typeModifiers": { "predicate": "flags.1", "isVector": true }, "comment": "Only show events from these admins" }, { "name": "max_id", "type": "long", "comment": "Maximum ID of message to return (see pagination)" }, { "name": "min_id", "type": "long", "comment": "Minimum ID of message to return (see pagination)" }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }], "available": "user" }, { "kind": "method", "name": "channels.setStickers", "type": "Bool", "id": 3935085817, "comment": "Associate a stickerset to the supergroup", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Supergroup" }, { "name": "stickerset", "type": "InputStickerSet", "comment": "The stickerset to associate" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "PARTICIPANTS_TOO_FEW", "comment": "Not enough participants." }, { "code": 406, "name": "STICKERSET_OWNER_ANONYMOUS", "comment": "Provided stickerset can't be installed as group stickerset to prevent admin deanonymization." }], "available": "both" }, { "kind": "method", "name": "channels.readMessageContents", "type": "Bool", "id": 3937786936, "comment": "Mark channel/supergroup message contents as read", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Channel/supergroup" }, { "name": "id", "type": "int", "typeModifiers": { "isVector": true }, "comment": "IDs of messages whose contents should be marked as read" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }], "available": "user" }, { "kind": "method", "name": "channels.deleteHistory", "type": "Updates", "id": 2611648071, "comment": "Delete the history of a supergroup", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "for_everyone", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the history should be deleted for everyone" }, { "name": "channel", "type": "InputChannel", "comment": "Supergroup whose history must be deleted" }, { "name": "max_id", "type": "int", "comment": "ID of message up to which the history must be deleted" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PARICIPANT_MISSING", "comment": "The current user is not in the channel." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHANNEL_TOO_BIG", "comment": "This channel has too many participants (>1000) to be deleted." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }], "available": "user" }, { "kind": "method", "name": "channels.togglePreHistoryHidden", "type": "Updates", "id": 3938171212, "comment": "Hide/unhide message history for new channel/supergroup users", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Channel/supergroup" }, { "name": "enabled", "type": "Bool", "comment": "Hide/unhide" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_LINK_EXISTS", "comment": "The chat is public, you can't hide the history to new users." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "FORUM_ENABLED", "comment": "You can't execute the specified action because the group is a forum, disable forum functionality to continue." }], "available": "user" }, { "kind": "method", "name": "channels.getLeftChannels", "type": "messages.Chats", "id": 2202135744, "comment": "Get a list of channels/supergroups we left, requires a takeout session, see here » for more info.", "arguments": [{ "name": "offset", "type": "int", "comment": "Offset for pagination" }], "throws": [{ "code": 403, "name": "TAKEOUT_REQUIRED", "comment": "A takeout session needs to be initialized first, see here » for more info." }], "available": "user" }, { "kind": "method", "name": "channels.getGroupsForDiscussion", "type": "messages.Chats", "id": 4124758904, "comment": "Get all groups that can be used as discussion groups.\n\nReturned basic group chats must be first upgraded to supergroups before they can be set as a discussion group.
\nTo set a returned supergroup as a discussion group, access to its old messages must be enabled using {@link channels.RawTogglePreHistoryHiddenRequest}, first.", "arguments": [], "available": "user" }, { "kind": "method", "name": "channels.setDiscussionGroup", "type": "Bool", "id": 1079520178, "comment": "Associate a group to a channel as discussion group for that channel", "arguments": [{ "name": "broadcast", "type": "InputChannel", "comment": "Channel" }, { "name": "group", "type": "InputChannel", "comment": "Discussion group to associate to the channel" }], "throws": [{ "code": 400, "name": "BROADCAST_ID_INVALID", "comment": "Broadcast ID invalid." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "LINK_NOT_MODIFIED", "comment": "Discussion link not modified." }, { "code": 400, "name": "MEGAGROUP_ID_INVALID", "comment": "Invalid supergroup ID." }, { "code": 400, "name": "MEGAGROUP_PREHISTORY_HIDDEN", "comment": "Group with hidden history for new members can't be set as discussion groups." }], "available": "user" }, { "kind": "method", "name": "channels.editCreator", "type": "Updates", "id": 2402864415, "comment": "Transfer channel ownership", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Channel" }, { "name": "user_id", "type": "InputUser", "comment": "New channel owner" }, { "name": "password", "type": "InputCheckPasswordSRP", "comment": "2FA password of account" }], "throws": [{ "code": 400, "name": "CHANNELS_ADMIN_PUBLIC_TOO_MUCH", "comment": "You're admin of too many public channels, make some channels private to change the username of this channel." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "PASSWORD_HASH_INVALID", "comment": "The provided password hash is invalid." }, { "code": 400, "name": "PASSWORD_MISSING", "comment": "You must enable 2FA before executing this operation." }, { "code": 400, "name": "PASSWORD_TOO_FRESH_%d", "comment": "The password was modified less than 24 hours ago, try again in %d seconds." }, { "code": 400, "name": "SESSION_TOO_FRESH_%d", "comment": "This session was created less than 24 hours ago, try again in %d seconds." }, { "code": 400, "name": "SRP_ID_INVALID", "comment": "Invalid SRP ID provided." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "user" }, { "kind": "method", "name": "channels.editLocation", "type": "Bool", "id": 1491484525, "comment": "Edit location of geo group, see here » for more info on geogroups.", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Geogroup" }, { "name": "geo_point", "type": "InputGeoPoint", "comment": "New geolocation" }, { "name": "address", "type": "string", "comment": "Address string" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "MEGAGROUP_GEO_REQUIRED", "comment": "This method can only be invoked on a geogroup." }, { "code": 400, "name": "MEGAGROUP_REQUIRED", "comment": "You can only use this method on a supergroup." }], "available": "user" }, { "kind": "method", "name": "channels.toggleSlowMode", "type": "Updates", "id": 3990134512, "comment": "Toggle supergroup slow mode: if enabled, users will only be able to send one message every seconds seconds", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "The supergroup" }, { "name": "seconds", "type": "int", "comment": "Users will only be able to send one message every seconds seconds, 0 to disable the limitation" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "SECONDS_INVALID", "comment": "Invalid duration provided." }], "available": "user" }, { "kind": "method", "name": "channels.getInactiveChannels", "type": "messages.InactiveChats", "typeModifiers": { "constructorId": 2837970629 }, "id": 300429806, "comment": "Get inactive channels and supergroups", "arguments": [], "available": "user" }, { "kind": "method", "name": "channels.convertToGigagroup", "type": "Updates", "id": 187239529, "comment": "Convert a supergroup to a gigagroup, when requested by channel suggestions.", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "The supergroup to convert" }], "throws": [{ "code": 400, "name": "CHANNEL_ID_INVALID", "comment": "The specified supergroup ID is invalid." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "FORUM_ENABLED", "comment": "You can't execute the specified action because the group is a forum, disable forum functionality to continue." }, { "code": 400, "name": "PARTICIPANTS_TOO_FEW", "comment": "Not enough participants." }], "available": "user" }, { "kind": "method", "name": "channels.viewSponsoredMessage", "type": "Bool", "id": 3199130516, "comment": "Mark a specific sponsored message as read", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Peer" }, { "name": "random_id", "type": "bytes", "comment": "Message ID" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }], "available": "user" }, { "kind": "method", "name": "channels.getSponsoredMessages", "type": "messages.SponsoredMessages", "id": 3961589695, "comment": "Get a list of sponsored messages", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Peer" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }], "available": "user" }, { "kind": "method", "name": "channels.getSendAs", "type": "channels.SendAsPeers", "typeModifiers": { "constructorId": 4103516358 }, "id": 231174382, "comment": "Obtains a list of peers that can be used to send messages in a specific group", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The group where we intend to send messages" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "channels.deleteParticipantHistory", "type": "messages.AffectedHistory", "typeModifiers": { "constructorId": 3025955281 }, "id": 913655003, "comment": "Delete all messages sent by a specific participant of a given supergroup", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Supergroup" }, { "name": "participant", "type": "InputPeer", "comment": "The participant whose messages should be deleted" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PARTICIPANT_ID_INVALID", "comment": "The specified participant ID is invalid." }], "available": "user" }, { "kind": "method", "name": "channels.toggleJoinToSend", "type": "Updates", "id": 3838547328, "comment": "Set whether all users should join a discussion group in order to comment on a post »", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Discussion group" }, { "name": "enabled", "type": "Bool", "comment": "Toggle" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }], "available": "user" }, { "kind": "method", "name": "channels.toggleJoinRequest", "type": "Updates", "id": 1277789622, "comment": "Set whether all users should request admin approval to join the group ».", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Group" }, { "name": "enabled", "type": "Bool", "comment": "Toggle" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "CHAT_PUBLIC_REQUIRED", "comment": "You can only enable join requests in public groups." }], "available": "user" }, { "kind": "method", "name": "channels.reorderUsernames", "type": "Bool", "id": 3025988893, "comment": "Reorder active usernames", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "The supergroup or channel" }, { "name": "order", "type": "string", "typeModifiers": { "isVector": true }, "comment": "The new order for active usernames. All active usernames must be specified." }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }], "available": "user" }, { "kind": "method", "name": "channels.toggleUsername", "type": "Bool", "id": 1358053637, "comment": "Activate or deactivate a purchased fragment.com username associated to a supergroup or channel we own.", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Supergroup or channel" }, { "name": "username", "type": "string", "comment": "Username" }, { "name": "active", "type": "Bool", "comment": "Whether to activate or deactivate the username" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "USERNAMES_ACTIVE_TOO_MUCH", "comment": "The maximum number of active usernames was reached." }, { "code": 400, "name": "USERNAME_INVALID", "comment": "The provided username is not valid." }, { "code": 400, "name": "USERNAME_NOT_MODIFIED", "comment": "The username was not modified." }], "available": "user" }, { "kind": "method", "name": "channels.deactivateAllUsernames", "type": "Bool", "id": 170155475, "comment": "Disable all purchased usernames of a supergroup or channel", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Supergroup or channel" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }], "available": "user" }, { "kind": "method", "name": "channels.toggleForum", "type": "Updates", "id": 2754186025, "comment": "Enable or disable forum functionality in a supergroup.", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Supergroup ID" }, { "name": "enabled", "type": "Bool", "comment": "Enable or disable forum functionality" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_DISCUSSION_UNALLOWED", "comment": "You can't enable forum topics in a discussion group linked to a channel." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }], "available": "user" }, { "kind": "method", "name": "channels.createForumTopic", "type": "Updates", "id": 4094427684, "comment": "Create a forum topic; requires manage_topics rights.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "channel", "type": "InputChannel", "comment": "The forum" }, { "name": "title", "type": "string", "comment": "Topic title (maximum UTF-8 length: 128)" }, { "name": "icon_color", "type": "int", "typeModifiers": { "predicate": "flags.0" }, "comment": "If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F." }, { "name": "icon_emoji_id", "type": "long", "typeModifiers": { "predicate": "flags.3" }, "comment": "ID of the custom emoji used as topic icon. Telegram Premium users can use any custom emoji, other users can only use the custom emojis contained in the {@link RawInputStickerSetEmojiDefaultTopicIcons} emoji pack." }, { "name": "random_id", "type": "long", "comment": "Unique client message ID to prevent duplicate sending of the same event" }, { "name": "send_as", "type": "InputPeer", "typeModifiers": { "predicate": "flags.2" }, "comment": "Create the topic as the specified peer" }], "throws": [{ "code": 400, "name": "CHANNEL_FORUM_MISSING", "comment": "This supergroup is not a forum." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }, { "code": 400, "name": "TOPIC_TITLE_EMPTY", "comment": "The specified topic title is empty." }], "available": "both" }, { "kind": "method", "name": "channels.getForumTopics", "type": "messages.ForumTopics", "typeModifiers": { "constructorId": 913709011 }, "id": 233136337, "comment": "Get topics of a forum", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "channel", "type": "InputChannel", "comment": "Supergroup" }, { "name": "q", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Search query" }, { "name": "offset_date", "type": "int", "comment": "Offsets for pagination, for more info click here, date of the last message of the last found topic. Use 0 or any date in the future to get results from the last topic." }, { "name": "offset_id", "type": "int", "comment": "Offsets for pagination, for more info click here, ID of the last message of the last found topic (or initially 0)." }, { "name": "offset_topic", "type": "int", "comment": "Offsets for pagination, for more info click here, ID of the last found topic (or initially 0)." }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination. For optimal performance, the number of returned topics is chosen by the server and can be smaller than the specified limit." }], "throws": [{ "code": 400, "name": "CHANNEL_FORUM_MISSING", "comment": "This supergroup is not a forum." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }], "available": "user" }, { "kind": "method", "name": "channels.getForumTopicsByID", "type": "messages.ForumTopics", "typeModifiers": { "constructorId": 913709011 }, "id": 2961383097, "comment": "Get forum topics by their ID", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Forum" }, { "name": "topics", "type": "int", "typeModifiers": { "isVector": true }, "comment": "Topic IDs" }], "throws": [{ "code": 400, "name": "CHANNEL_FORUM_MISSING", "comment": "This supergroup is not a forum." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "TOPICS_EMPTY", "comment": "You specified no topic IDs." }], "available": "user" }, { "kind": "method", "name": "channels.editForumTopic", "type": "Updates", "id": 4108296581, "comment": "Edit forum topic; requires manage_topics rights.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "channel", "type": "InputChannel", "comment": "Supergroup" }, { "name": "topic_id", "type": "int", "comment": "Topic ID" }, { "name": "title", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "If present, will update the topic title (maximum UTF-8 length: 128)." }, { "name": "icon_emoji_id", "type": "long", "typeModifiers": { "predicate": "flags.1" }, "comment": "If present, updates the custom emoji used as topic icon. Telegram Premium users can use any custom emoji, other users can only use the custom emojis contained in the {@link RawInputStickerSetEmojiDefaultTopicIcons} emoji pack. Pass 0 to switch to the fallback topic icon." }, { "name": "closed", "type": "Bool", "typeModifiers": { "predicate": "flags.2" }, "comment": "If present, will update the open/closed status of the topic." }, { "name": "hidden", "type": "Bool", "typeModifiers": { "predicate": "flags.3" }, "comment": "If present, will hide/unhide the topic (only valid for the \"General\" topic, id=1)." }], "throws": [{ "code": 400, "name": "CHANNEL_FORUM_MISSING", "comment": "This supergroup is not a forum." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "DOCUMENT_INVALID", "comment": "The specified document is invalid." }, { "code": 400, "name": "GENERAL_MODIFY_ICON_FORBIDDEN", "comment": "You can't modify the icon of the \"General\" topic." }, { "code": 400, "name": "TOPIC_CLOSE_SEPARATELY", "comment": "The close flag cannot be provided together with any of the other flags." }, { "code": 400, "name": "TOPIC_HIDE_SEPARATELY", "comment": "The hide flag cannot be provided together with any of the other flags." }, { "code": 400, "name": "TOPIC_ID_INVALID", "comment": "The specified topic ID is invalid." }, { "code": 400, "name": "TOPIC_NOT_MODIFIED", "comment": "The updated topic info is equal to the current topic info, nothing was changed." }], "available": "both" }, { "kind": "method", "name": "channels.updatePinnedForumTopic", "type": "Updates", "id": 1814925350, "comment": "Pin or unpin forum topics", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Supergroup ID" }, { "name": "topic_id", "type": "int", "comment": "Forum topic ID" }, { "name": "pinned", "type": "Bool", "comment": "Whether to pin or unpin the topic" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "TOPIC_ID_INVALID", "comment": "The specified topic ID is invalid." }], "available": "user" }, { "kind": "method", "name": "channels.deleteTopicHistory", "type": "messages.AffectedHistory", "typeModifiers": { "constructorId": 3025955281 }, "id": 876830509, "comment": "Delete message history of a forum topic", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Forum" }, { "name": "top_msg_id", "type": "int", "comment": "Topic ID" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "TOPIC_ID_INVALID", "comment": "The specified topic ID is invalid." }], "available": "both" }, { "kind": "method", "name": "channels.reorderPinnedForumTopics", "type": "Updates", "id": 693150095, "comment": "Reorder pinned forum topics", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "force", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If not set, the order of only the topics present both server-side and in order will be changed (i.e. mentioning topics not pinned server-side in order will not pin them, and not mentioning topics pinned server-side will not unpin them).
If set, the entire server-side pinned topic list will be replaced with order (i.e. mentioning topics not pinned server-side in order will pin them, and not mentioning topics pinned server-side will unpin them)" }, { "name": "channel", "type": "InputChannel", "comment": "Supergroup ID" }, { "name": "order", "type": "int", "typeModifiers": { "isVector": true }, "comment": "Topic IDs »" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }], "available": "user" }, { "kind": "method", "name": "channels.toggleAntiSpam", "type": "Updates", "id": 1760814315, "comment": "Enable or disable the native antispam system.", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Supergroup ID. The specified supergroup must have at least telegram_antispam_group_size_min members to enable antispam functionality, as specified by the client configuration parameters." }, { "name": "enabled", "type": "Bool", "comment": "Enable or disable the native antispam system." }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }], "available": "user" }, { "kind": "method", "name": "channels.reportAntiSpamFalsePositive", "type": "Bool", "id": 2823857811, "comment": "Report a native antispam false positive", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Supergroup ID" }, { "name": "msg_id", "type": "int", "comment": "Message ID that was mistakenly deleted by the native antispam system, taken from the admin log" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }], "available": "user" }, { "kind": "method", "name": "channels.toggleParticipantsHidden", "type": "Updates", "id": 1785624660, "comment": "Hide or display the participants list in a supergroup.\n\nThe supergroup must have at least hidden_members_group_size_min participants in order to use this method, as specified by the client configuration parameters ».", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Supergroup ID" }, { "name": "enabled", "type": "Bool", "comment": "If true, will hide the participants list; otherwise will unhide it." }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "PARTICIPANTS_TOO_FEW", "comment": "Not enough participants." }], "available": "user" }, { "kind": "method", "name": "channels.clickSponsoredMessage", "type": "Bool", "id": 414170259, "comment": "Informs the server that the user has either:", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Channel where the sponsored message was posted" }, { "name": "random_id", "type": "bytes", "comment": "Message ID" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }], "available": "user" }, { "kind": "method", "name": "channels.updateColor", "type": "Updates", "id": 3635033713, "comment": "Update the accent color and background custom emoji » of a channel.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "for_profile", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether to change the accent color emoji pattern of the profile page; otherwise, the accent color and emoji pattern of messages will be changed.
Channels can change both message and profile palettes; supergroups can only change the profile palette, of course after reaching the appropriate boost level." }, { "name": "channel", "type": "InputChannel", "comment": "Channel whose accent color should be changed." }, { "name": "color", "type": "int", "typeModifiers": { "predicate": "flags.2" }, "comment": "ID of the accent color palette » to use (not RGB24, see here » for more info); if not set, the default palette is used." }, { "name": "background_emoji_id", "type": "long", "typeModifiers": { "predicate": "flags.0" }, "comment": "Custom emoji ID used in the accent color pattern." }], "throws": [{ "code": 400, "name": "BOOSTS_REQUIRED", "comment": "The specified channel must first be boosted by its users in order to perform this action." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }], "available": "user" }, { "kind": "method", "name": "channels.toggleViewForumAsMessages", "type": "Updates", "id": 2537077525, "comment": "Users may also choose to display messages from all topics of a forum as if they were sent to a normal group, using a \"View as messages\" setting in the local client: this setting only affects the current account, and is synced to other logged in sessions using this method.\n\nInvoking this method will update the value of the view_forum_as_messages flag of {@link RawChannelFull} or {@link RawDialog} and emit an {@link RawUpdateChannelViewForumAsMessages}.", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "The forum" }, { "name": "enabled", "type": "Bool", "comment": "The new value of the view_forum_as_messages flag." }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }], "available": "user" }, { "kind": "method", "name": "channels.getChannelRecommendations", "type": "messages.Chats", "id": 631707458, "comment": "Obtain a list of similarly themed public channels, selected based on similarities in their subscriber bases.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "channel", "type": "InputChannel", "typeModifiers": { "predicate": "flags.0" }, "comment": "The method will return channels related to the passed channel. If not set, the method will returns channels related to channels the user has joined." }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }], "available": "user" }, { "kind": "method", "name": "channels.updateEmojiStatus", "type": "Updates", "id": 4040418984, "comment": "Set an emoji status for a channel or supergroup.", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "The channel/supergroup, must have at least channel_emoji_status_level_min/group_emoji_status_level_min boosts." }, { "name": "emoji_status", "type": "EmojiStatus", "comment": "Emoji status to set" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }], "available": "user" }, { "kind": "method", "name": "channels.setBoostsToUnblockRestrictions", "type": "Updates", "id": 2906234094, "comment": "Admins with {@link RawChatAdminRights} may allow users that apply a certain number of booosts » to the group to bypass {@link channels.RawToggleSlowModeRequest} and other » supergroup restrictions, see here » for more info.", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "The supergroup." }, { "name": "boosts", "type": "int", "comment": "The number of required boosts (1-8, 0 to disable)." }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }], "available": "user" }, { "kind": "method", "name": "channels.setEmojiStickers", "type": "Bool", "id": 1020866743, "comment": "Set a custom emoji stickerset for supergroups. Only usable after reaching at least the boost level » specified in the group_emoji_stickers_level_min » config parameter.", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "The supergroup" }, { "name": "stickerset", "type": "InputStickerSet", "comment": "The custom emoji stickerset to associate to the supergroup" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }], "available": "user" }, { "kind": "method", "name": "channels.reportSponsoredMessage", "type": "channels.SponsoredMessageReportResult", "id": 2945447609, "comment": "Report a sponsored message », see here » for more info on the full flow.", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "The channel where the sponsored message can be seen." }, { "name": "random_id", "type": "bytes", "comment": "ID of the sponsored message." }, { "name": "option", "type": "bytes", "comment": "Chosen report option, initially an empty string, see here » for more info on the full flow." }], "throws": [{ "code": 400, "name": "AD_EXPIRED", "comment": "The ad has expired (too old or not found)." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }], "available": "user" }, { "kind": "method", "name": "channels.restrictSponsoredMessages", "type": "Updates", "id": 2598966553, "comment": "Disable ads on the specified channel, for all users.\n\nAvailable only after reaching at least the boost level » specified in the channel_restrict_sponsored_level_min » config parameter.", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "The channel." }, { "name": "restricted", "type": "Bool", "comment": "Whether to disable or re-enable ads." }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }], "available": "user" }, { "kind": "method", "name": "channels.searchPosts", "type": "messages.Messages", "id": 3516897403, "comment": "Globally search for posts from public channels » (including those we aren't a member of) containing a specific hashtag.", "arguments": [{ "name": "hashtag", "type": "string", "comment": "The hashtag to search, without the # character." }, { "name": "offset_rate", "type": "int", "comment": "Initially 0, then set to the {@link messages.RawMessagesSlice}" }, { "name": "offset_peer", "type": "InputPeer", "comment": "Offsets for pagination, for more info click here" }, { "name": "offset_id", "type": "int", "comment": "Offsets for pagination, for more info click here" }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }], "available": "user" }, { "kind": "method", "name": "bots.sendCustomRequest", "type": "DataJSON", "typeModifiers": { "constructorId": 2104790276 }, "id": 2854709741, "comment": "Sends a custom request; for bots only", "arguments": [{ "name": "custom_method", "type": "string", "comment": "The method name" }, { "name": "params", "type": "DataJSON", "comment": "JSON-serialized method parameters" }], "throws": [{ "code": 400, "name": "DATA_JSON_INVALID", "comment": "The provided JSON data is invalid." }, { "code": 400, "name": "METHOD_INVALID", "comment": "The specified method is invalid." }, { "code": 403, "name": "USER_BOT_INVALID", "comment": "User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, { "kind": "method", "name": "bots.answerWebhookJSONQuery", "type": "Bool", "id": 3860938573, "comment": "Answers a custom query; for bots only", "arguments": [{ "name": "query_id", "type": "long", "comment": "Identifier of a custom query" }, { "name": "data", "type": "DataJSON", "comment": "JSON-serialized answer to the query" }], "throws": [{ "code": 400, "name": "DATA_JSON_INVALID", "comment": "The provided JSON data is invalid." }, { "code": 400, "name": "QUERY_ID_INVALID", "comment": "The query ID is invalid." }, { "code": 403, "name": "USER_BOT_INVALID", "comment": "User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, { "kind": "method", "name": "bots.setBotCommands", "type": "Bool", "id": 85399130, "comment": "Set bot command list", "arguments": [{ "name": "scope", "type": "BotCommandScope", "comment": "Command scope" }, { "name": "lang_code", "type": "string", "comment": "Language code" }, { "name": "commands", "type": "BotCommand", "typeModifiers": { "isVector": true }, "comment": "Bot commands" }], "throws": [{ "code": 400, "name": "BOT_COMMAND_DESCRIPTION_INVALID", "comment": "The specified command description is invalid." }, { "code": 400, "name": "BOT_COMMAND_INVALID", "comment": "The specified command is invalid." }, { "code": 400, "name": "LANG_CODE_INVALID", "comment": "The specified language code is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "bot" }, { "kind": "method", "name": "bots.resetBotCommands", "type": "Bool", "id": 1032708345, "comment": "Clear bot commands for the specified bot scope and language code", "arguments": [{ "name": "scope", "type": "BotCommandScope", "comment": "Command scope" }, { "name": "lang_code", "type": "string", "comment": "Language code" }], "throws": [{ "code": 400, "name": "LANG_CODE_INVALID", "comment": "The specified language code is invalid." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, { "kind": "method", "name": "bots.getBotCommands", "type": "BotCommand", "typeModifiers": { "isVector": true, "constructorId": 3262826695 }, "id": 3813412310, "comment": "Obtain a list of bot commands for the specified bot scope and language code", "arguments": [{ "name": "scope", "type": "BotCommandScope", "comment": "Command scope" }, { "name": "lang_code", "type": "string", "comment": "Language code" }], "throws": [{ "code": 400, "name": "USER_BOT_INVALID", "comment": "User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, { "kind": "method", "name": "bots.setBotMenuButton", "type": "Bool", "id": 1157944655, "comment": "Sets the menu button action » for a given user or for all users", "arguments": [{ "name": "user_id", "type": "InputUser", "comment": "User ID" }, { "name": "button", "type": "BotMenuButton", "comment": "Bot menu button action" }], "throws": [{ "code": 400, "name": "BUTTON_TEXT_INVALID", "comment": "The specified button text is invalid." }, { "code": 400, "name": "BUTTON_URL_INVALID", "comment": "Button URL invalid." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, { "kind": "method", "name": "bots.getBotMenuButton", "type": "BotMenuButton", "id": 2623597352, "comment": "Gets the menu button action for a given user or for all users, previously set using {@link bots.RawSetBotMenuButtonRequest}; users can see this information in the {@link RawBotInfo} constructor.", "arguments": [{ "name": "user_id", "type": "InputUser", "comment": "User ID or empty for the default menu button." }], "throws": [{ "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, { "kind": "method", "name": "bots.setBotBroadcastDefaultAdminRights", "type": "Bool", "id": 2021942497, "comment": "Set the default suggested admin rights for bots being added as admins to channels, see here for more info on how to handle them ».", "arguments": [{ "name": "admin_rights", "type": "ChatAdminRights", "comment": "Admin rights" }], "throws": [{ "code": 400, "name": "RIGHTS_NOT_MODIFIED", "comment": "The new admin rights are equal to the old rights, no change was made." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, { "kind": "method", "name": "bots.setBotGroupDefaultAdminRights", "type": "Bool", "id": 2455685610, "comment": "Set the default suggested admin rights for bots being added as admins to groups, see here for more info on how to handle them ».", "arguments": [{ "name": "admin_rights", "type": "ChatAdminRights", "comment": "Admin rights" }], "throws": [{ "code": 400, "name": "RIGHTS_NOT_MODIFIED", "comment": "The new admin rights are equal to the old rights, no change was made." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, { "kind": "method", "name": "bots.setBotInfo", "type": "Bool", "id": 282013987, "comment": "Set localized name, about text and description of a bot (or of the current account, if called by a bot).", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "bot", "type": "InputUser", "typeModifiers": { "predicate": "flags.2" }, "comment": "If called by a user, must contain the peer of a bot we own." }, { "name": "lang_code", "type": "string", "comment": "Language code, if left empty update the fallback about text and description" }, { "name": "name", "type": "string", "typeModifiers": { "predicate": "flags.3" }, "comment": "New bot name" }, { "name": "about", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "New about text" }, { "name": "description", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "New description" }], "throws": [{ "code": 400, "name": "USER_BOT_INVALID", "comment": "User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts." }], "available": "both" }, { "kind": "method", "name": "bots.getBotInfo", "type": "bots.BotInfo", "typeModifiers": { "constructorId": 3903288752 }, "id": 3705214205, "comment": "Get localized name, about text and description of a bot (or of the current account, if called by a bot).", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "bot", "type": "InputUser", "typeModifiers": { "predicate": "flags.0" }, "comment": "If called by a user, must contain the peer of a bot we own." }, { "name": "lang_code", "type": "string", "comment": "Language code, if left empty this method will return the fallback about text and description." }], "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }, { "code": 400, "name": "LANG_CODE_INVALID", "comment": "The specified language code is invalid." }, { "code": 400, "name": "USER_BOT_INVALID", "comment": "User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts." }], "available": "both" }, { "kind": "method", "name": "bots.reorderUsernames", "type": "Bool", "id": 2533994946, "comment": "Reorder usernames associated to a bot we own.", "arguments": [{ "name": "bot", "type": "InputUser", "comment": "The bot" }, { "name": "order", "type": "string", "typeModifiers": { "isVector": true }, "comment": "The new order for active usernames. All active usernames must be specified." }], "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }, { "code": 400, "name": "USERNAME_NOT_MODIFIED", "comment": "The username was not modified." }], "available": "user" }, { "kind": "method", "name": "bots.toggleUsername", "type": "Bool", "id": 87861619, "comment": "Activate or deactivate a purchased fragment.com username associated to a bot we own.", "arguments": [{ "name": "bot", "type": "InputUser", "comment": "The bot" }, { "name": "username", "type": "string", "comment": "Username" }, { "name": "active", "type": "Bool", "comment": "Whether to activate or deactivate it" }], "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }, { "code": 400, "name": "USERNAME_NOT_MODIFIED", "comment": "The username was not modified." }], "available": "user" }, { "kind": "method", "name": "bots.canSendMessage", "type": "Bool", "id": 324662502, "comment": "Check whether the specified bot can send us messages", "arguments": [{ "name": "bot", "type": "InputUser", "comment": "The bot" }], "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }], "available": "user" }, { "kind": "method", "name": "bots.allowSendMessage", "type": "Updates", "id": 4046644207, "comment": "Allow the specified bot to send us messages", "arguments": [{ "name": "bot", "type": "InputUser", "comment": "The bot" }], "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }], "available": "user" }, { "kind": "method", "name": "bots.invokeWebViewCustomMethod", "type": "DataJSON", "typeModifiers": { "constructorId": 2104790276 }, "id": 142591463, "comment": "Send a custom request from a mini bot app, triggered by a web_app_invoke_custom_method event ».\n\nThe response should be sent using a custom_method_invoked event, see here » for more info on the flow.", "arguments": [{ "name": "bot", "type": "InputUser", "comment": "Identifier of the bot associated to the mini bot app" }, { "name": "custom_method", "type": "string", "comment": "Identifier of the custom method to invoke" }, { "name": "params", "type": "DataJSON", "comment": "Method parameters" }], "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }, { "code": 400, "name": "DATA_JSON_INVALID", "comment": "The provided JSON data is invalid." }], "available": "user" }, { "kind": "method", "name": "bots.getPopularAppBots", "type": "bots.PopularAppBots", "typeModifiers": { "constructorId": 428978491 }, "id": 3260088722, "comment": "Fetch popular Main Mini Apps, to be used in the apps tab of global search ».", "arguments": [{ "name": "offset", "type": "string", "comment": "Offset for pagination, initially an empty string, then re-use the next_offset returned by the previous query." }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }], "available": "user" }, { "kind": "method", "name": "bots.addPreviewMedia", "type": "BotPreviewMedia", "typeModifiers": { "constructorId": 602479523 }, "id": 397326170, "comment": "Add a main mini app preview, see here » for more info.\n\nOnly owners of bots with a configured Main Mini App can use this method, see see here » for more info on how to check if you can invoke this method.", "arguments": [{ "name": "bot", "type": "InputUser", "comment": "The bot that owns the Main Mini App." }, { "name": "lang_code", "type": "string", "comment": "ISO 639-1 language code, indicating the localization of the preview to add." }, { "name": "media", "type": "InputMedia", "comment": "The photo/video preview, uploaded using {@link messages.RawUploadMediaRequest}." }], "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }], "available": "user" }, { "kind": "method", "name": "bots.editPreviewMedia", "type": "BotPreviewMedia", "typeModifiers": { "constructorId": 602479523 }, "id": 2233819247, "comment": "Edit a main mini app preview, see here » for more info.\n\nOnly owners of bots with a configured Main Mini App can use this method, see see here » for more info on how to check if you can invoke this method.", "arguments": [{ "name": "bot", "type": "InputUser", "comment": "The bot that owns the Main Mini App." }, { "name": "lang_code", "type": "string", "comment": "ISO 639-1 language code, indicating the localization of the preview to edit." }, { "name": "media", "type": "InputMedia", "comment": "The photo/video preview to replace, previously fetched as specified here »." }, { "name": "new_media", "type": "InputMedia", "comment": "The new photo/video preview, uploaded using {@link messages.RawUploadMediaRequest}." }], "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }], "available": "user" }, { "kind": "method", "name": "bots.deletePreviewMedia", "type": "Bool", "id": 755054003, "comment": "Delete a main mini app preview, see here » for more info.\n\nOnly owners of bots with a configured Main Mini App can use this method, see see here » for more info on how to check if you can invoke this method.", "arguments": [{ "name": "bot", "type": "InputUser", "comment": "The bot that owns the Main Mini App." }, { "name": "lang_code", "type": "string", "comment": "ISO 639-1 language code, indicating the localization of the preview to delete." }, { "name": "media", "type": "InputMedia", "typeModifiers": { "isVector": true }, "comment": "The photo/video preview to delete, previously fetched as specified here »." }], "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }], "available": "user" }, { "kind": "method", "name": "bots.reorderPreviewMedias", "type": "Bool", "id": 3056071594, "comment": "Reorder a main mini app previews, see here » for more info.\n\nOnly owners of bots with a configured Main Mini App can use this method, see see here » for more info on how to check if you can invoke this method.", "arguments": [{ "name": "bot", "type": "InputUser", "comment": "The bot that owns the Main Mini App." }, { "name": "lang_code", "type": "string", "comment": "ISO 639-1 language code, indicating the localization of the previews to reorder." }, { "name": "order", "type": "InputMedia", "typeModifiers": { "isVector": true }, "comment": "New order of the previews." }], "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }], "available": "user" }, { "kind": "method", "name": "bots.getPreviewInfo", "type": "bots.PreviewInfo", "typeModifiers": { "constructorId": 212278628 }, "id": 1111143341, "comment": "Bot owners only, fetch main mini app preview information, see here » for more info.\n\nNote: technically non-owners may also invoke this method, but it will always behave exactly as {@link bots.RawGetPreviewMediasRequest}, returning only previews for the current language and an empty lang_codes array, regardless of the passed lang_code, so please only use {@link bots.RawGetPreviewMediasRequest} if you're not the owner of the bot.", "arguments": [{ "name": "bot", "type": "InputUser", "comment": "The bot that owns the Main Mini App." }, { "name": "lang_code", "type": "string", "comment": "Fetch previews for the specified ISO 639-1 language code." }], "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }], "available": "user" }, { "kind": "method", "name": "bots.getPreviewMedias", "type": "BotPreviewMedia", "typeModifiers": { "isVector": true, "constructorId": 602479523 }, "id": 2728745293, "comment": "Fetch main mini app previews, see here » for more info.", "arguments": [{ "name": "bot", "type": "InputUser", "comment": "The bot that owns the Main Mini App." }], "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }], "available": "user" }, { "kind": "method", "name": "payments.getPaymentForm", "type": "payments.PaymentForm", "id": 924093883, "comment": "Get a payment form", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "invoice", "type": "InputInvoice", "comment": "Invoice" }, { "name": "theme_params", "type": "DataJSON", "typeModifiers": { "predicate": "flags.0" }, "comment": "A JSON object with the following keys, containing color theme information (integers, RGB24) to pass to the payment provider, to apply in eventual verification pages:
bg_color - Background color
text_color - Text color
hint_color - Hint text color
link_color - Link color
button_color - Button color
button_text_color - Button text color" }], "throws": [{ "code": 400, "name": "BOOST_PEER_INVALID", "comment": "The specified boost_peer is invalid." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "SLUG_INVALID", "comment": "The specified invoice slug is invalid." }, { "code": 400, "name": "UNTIL_DATE_INVALID", "comment": "Invalid until date provided." }], "available": "user" }, { "kind": "method", "name": "payments.getPaymentReceipt", "type": "payments.PaymentReceipt", "id": 611897804, "comment": "Get payment receipt", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The peer where the payment receipt was sent" }, { "name": "msg_id", "type": "int", "comment": "Message ID of receipt" }], "throws": [{ "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }], "available": "user" }, { "kind": "method", "name": "payments.validateRequestedInfo", "type": "payments.ValidatedRequestedInfo", "typeModifiers": { "constructorId": 3510966403 }, "id": 3066622251, "comment": "Submit requested order information for validation", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "save", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Save order information to re-use it for future orders" }, { "name": "invoice", "type": "InputInvoice", "comment": "Invoice" }, { "name": "info", "type": "PaymentRequestedInfo", "comment": "Requested order information" }], "throws": [{ "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "payments.sendPaymentForm", "type": "payments.PaymentResult", "id": 755192367, "comment": "Send compiled payment form", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "form_id", "type": "long", "comment": "Form ID" }, { "name": "invoice", "type": "InputInvoice", "comment": "Invoice" }, { "name": "requested_info_id", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "ID of saved and validated {@link payments.RawValidatedRequestedInfo}" }, { "name": "shipping_option_id", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Chosen shipping option ID" }, { "name": "credentials", "type": "InputPaymentCredentials", "comment": "Payment credentials" }, { "name": "tip_amount", "type": "long", "typeModifiers": { "predicate": "flags.2" }, "comment": "Tip, in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." }], "throws": [{ "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "payments.getSavedInfo", "type": "payments.SavedInfo", "typeModifiers": { "constructorId": 4220511292 }, "id": 578650699, "comment": "Get saved payment information", "arguments": [], "available": "user" }, { "kind": "method", "name": "payments.clearSavedInfo", "type": "Bool", "id": 3627905217, "comment": "Clear saved payment information", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "credentials", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Remove saved payment credentials" }, { "name": "info", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Clear the last order settings saved by the user" }], "available": "user" }, { "kind": "method", "name": "payments.getBankCardData", "type": "payments.BankCardData", "typeModifiers": { "constructorId": 1042605427 }, "id": 779736953, "comment": "Get info about a credit card", "arguments": [{ "name": "number", "type": "string", "comment": "Credit card number" }], "throws": [{ "code": 400, "name": "BANK_CARD_NUMBER_INVALID", "comment": "The specified card number is invalid." }], "available": "user" }, { "kind": "method", "name": "payments.exportInvoice", "type": "payments.ExportedInvoice", "typeModifiers": { "constructorId": 2932919257 }, "id": 261206117, "comment": "Generate an invoice deep link", "arguments": [{ "name": "invoice_media", "type": "InputMedia", "comment": "Invoice" }], "throws": [{ "code": 400, "name": "CURRENCY_TOTAL_AMOUNT_INVALID", "comment": "The total amount of all prices is invalid." }, { "code": 400, "name": "INVOICE_PAYLOAD_INVALID", "comment": "The specified invoice payload is invalid." }, { "code": 400, "name": "MEDIA_INVALID", "comment": "Media invalid." }, { "code": 400, "name": "PAYMENT_PROVIDER_INVALID", "comment": "The specified payment provider is invalid." }], "available": "both" }, { "kind": "method", "name": "payments.assignAppStoreTransaction", "type": "Updates", "id": 2163045501, "comment": "Informs server about a purchase made through the App Store: for official applications only.", "arguments": [{ "name": "receipt", "type": "bytes", "comment": "Receipt" }, { "name": "purpose", "type": "InputStorePaymentPurpose", "comment": "Payment purpose" }], "throws": [{ "code": 400, "name": "RECEIPT_EMPTY", "comment": "The specified receipt is empty." }], "available": "user" }, { "kind": "method", "name": "payments.assignPlayMarketTransaction", "type": "Updates", "id": 3757920467, "comment": "Informs server about a purchase made through the Play Store: for official applications only.", "arguments": [{ "name": "receipt", "type": "DataJSON", "comment": "Receipt" }, { "name": "purpose", "type": "InputStorePaymentPurpose", "comment": "Payment purpose" }], "throws": [{ "code": 400, "name": "DATA_JSON_INVALID", "comment": "The provided JSON data is invalid." }], "available": "user" }, { "kind": "method", "name": "payments.canPurchasePremium", "type": "Bool", "id": 2680266422, "comment": "Checks whether Telegram Premium purchase is possible. Must be called before in-store Premium purchase, official apps only.", "arguments": [{ "name": "purpose", "type": "InputStorePaymentPurpose", "comment": "Payment purpose" }], "throws": [{ "code": 406, "name": "PREMIUM_CURRENTLY_UNAVAILABLE", "comment": "You cannot currently purchase a Premium subscription." }], "available": "user" }, { "kind": "method", "name": "payments.getPremiumGiftCodeOptions", "type": "PremiumGiftCodeOption", "typeModifiers": { "isVector": true, "constructorId": 629052971 }, "id": 660060756, "comment": "Obtain a list of Telegram Premium giveaway/gift code » options.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "boost_peer", "type": "InputPeer", "typeModifiers": { "predicate": "flags.0" }, "comment": "The channel that will start the giveaway" }], "available": "user" }, { "kind": "method", "name": "payments.checkGiftCode", "type": "payments.CheckedGiftCode", "typeModifiers": { "constructorId": 675942550 }, "id": 2387719361, "comment": "Obtain information about a Telegram Premium giftcode »", "arguments": [{ "name": "slug", "type": "string", "comment": "The giftcode to check" }], "throws": [{ "code": 400, "name": "GIFT_SLUG_EXPIRED", "comment": "The specified gift slug has expired." }, { "code": 400, "name": "GIFT_SLUG_INVALID", "comment": "The specified slug is invalid." }], "available": "user" }, { "kind": "method", "name": "payments.applyGiftCode", "type": "Updates", "id": 4142032980, "comment": "Apply a Telegram Premium giftcode »", "arguments": [{ "name": "slug", "type": "string", "comment": "The code to apply" }], "throws": [{ "code": 400, "name": "GIFT_SLUG_EXPIRED", "comment": "The specified gift slug has expired." }, { "code": 400, "name": "GIFT_SLUG_INVALID", "comment": "The specified slug is invalid." }, { "code": 420, "name": "PREMIUM_SUB_ACTIVE_UNTIL_%d", "comment": "You already have a premium subscription active until unixtime %d ." }], "available": "user" }, { "kind": "method", "name": "payments.getGiveawayInfo", "type": "payments.GiveawayInfo", "id": 4095972389, "comment": "Obtain information about a Telegram Premium giveaway ».", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The peer where the giveaway was posted." }, { "name": "msg_id", "type": "int", "comment": "Message ID of the {@link RawMessageActionGiveawayLaunch} service message" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "payments.launchPrepaidGiveaway", "type": "Updates", "id": 1609928480, "comment": "Launch a prepaid giveaway ».", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The peer where to launch the giveaway." }, { "name": "giveaway_id", "type": "long", "comment": "The prepaid giveaway ID." }, { "name": "purpose", "type": "InputStorePaymentPurpose", "comment": "Giveway parameters" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "payments.getStarsTopupOptions", "type": "StarsTopupOption", "typeModifiers": { "isVector": true, "constructorId": 198776256 }, "id": 3222194131, "comment": "Obtain a list of Telegram Stars topup options » as {@link RawStarsTopupOption} constructors.", "arguments": [], "available": "user" }, { "kind": "method", "name": "payments.getStarsStatus", "type": "payments.StarsStatus", "typeModifiers": { "constructorId": 2364862048 }, "id": 273665959, "comment": "Get the current Telegram Stars balance of the current account (with peer={@link RawInputPeerSelf}), or the stars balance of the bot specified in peer.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer of which to get the balance." }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "payments.getStarsTransactions", "type": "payments.StarsStatus", "typeModifiers": { "constructorId": 2364862048 }, "id": 2543029594, "comment": "Fetch Telegram Stars transactions.\n\nThe inbound and outbound flags are mutually exclusive: if none of the two are set, both incoming and outgoing transactions are fetched.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "inbound", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, fetches only incoming transactions." }, { "name": "outbound", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "If set, fetches only outgoing transactions." }, { "name": "ascending", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Return transactions in ascending order by date (instead of descending order by date)." }, { "name": "peer", "type": "InputPeer", "comment": "Fetch the transaction history of the peer ({@link RawInputPeerSelf} or a bot we own)." }, { "name": "offset", "type": "string", "comment": "Offset for pagination, obtained from the returned next_offset, initially an empty string »." }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }], "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "both" }, { "kind": "method", "name": "payments.sendStarsForm", "type": "payments.PaymentResult", "id": 45839133, "comment": "Make a payment using Telegram Stars, see here » for more info.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "form_id", "type": "long", "comment": "Payment form ID" }, { "name": "invoice", "type": "InputInvoice", "comment": "Invoice" }], "throws": [{ "code": 400, "name": "BALANCE_TOO_LOW", "comment": "The transaction cannot be completed because the current Telegram Stars balance is too low." }, { "code": 400, "name": "FORM_EXPIRED", "comment": "The form was generated more than 10 minutes ago and has expired, please re-generate it using {@link payments.RawGetPaymentFormRequest} and pass the new form_id." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "payments.refundStarsCharge", "type": "Updates", "id": 632196938, "comment": "Refund a Telegram Stars transaction, see here » for more info.", "arguments": [{ "name": "user_id", "type": "InputUser", "comment": "User to refund." }, { "name": "charge_id", "type": "string", "comment": "Transaction ID." }], "throws": [{ "code": 400, "name": "CHARGE_ALREADY_REFUNDED", "comment": "The transaction was already refunded." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "bot" }, { "kind": "method", "name": "payments.getStarsRevenueStats", "type": "payments.StarsRevenueStats", "typeModifiers": { "constructorId": 3375085371 }, "id": 3642751702, "comment": "Get Telegram Star revenue statistics ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "dark", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to enable dark theme for graph colors" }, { "name": "peer", "type": "InputPeer", "comment": "Get statistics for the specified bot, channel or ourselves ({@link RawInputPeerSelf})." }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "payments.getStarsRevenueWithdrawalUrl", "type": "payments.StarsRevenueWithdrawalUrl", "typeModifiers": { "constructorId": 497778871 }, "id": 331081907, "comment": "Withdraw funds from a channel or bot's star balance ».", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Channel or bot from which to withdraw funds." }, { "name": "stars", "type": "long", "comment": "Amount of stars to withdraw." }, { "name": "password", "type": "InputCheckPasswordSRP", "comment": "2FA password, see here » for more info." }], "throws": [{ "code": 400, "name": "PASSWORD_HASH_INVALID", "comment": "The provided password hash is invalid." }, { "code": 400, "name": "PASSWORD_MISSING", "comment": "You must enable 2FA before executing this operation." }, { "code": 400, "name": "PASSWORD_TOO_FRESH_%d", "comment": "The password was modified less than 24 hours ago, try again in %d seconds." }], "available": "user" }, { "kind": "method", "name": "payments.getStarsRevenueAdsAccountUrl", "type": "payments.StarsRevenueAdsAccountUrl", "typeModifiers": { "constructorId": 961445665 }, "id": 3520589765, "comment": "Returns a URL for a Telegram Ad platform account that can be used to set up advertisements for channel/bot in peer, paid using the Telegram Stars owned by the specified peer, see here » for more info.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Channel or bot that owns the stars." }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "payments.getStarsTransactionsByID", "type": "payments.StarsStatus", "typeModifiers": { "constructorId": 2364862048 }, "id": 662973742, "comment": "Obtain info about Telegram Star transactions » using specific transaction IDs.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Channel or bot." }, { "name": "id", "type": "InputStarsTransaction", "typeModifiers": { "isVector": true }, "comment": "Transaction IDs." }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "payments.getStarsGiftOptions", "type": "StarsGiftOption", "typeModifiers": { "isVector": true, "constructorId": 1577421297 }, "id": 3553192904, "comment": "Obtain a list of Telegram Stars gift options » as {@link RawStarsGiftOption} constructors.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "user_id", "type": "InputUser", "typeModifiers": { "predicate": "flags.0" }, "comment": "Receiver of the gift (optional)." }], "available": "user" }, { "kind": "method", "name": "stickers.createStickerSet", "type": "messages.StickerSet", "id": 2418125671, "comment": "Create a stickerset.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "masks", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether this is a mask stickerset" }, { "name": "emojis", "type": "true", "typeModifiers": { "predicate": "flags.5" }, "comment": "Whether this is a custom emoji stickerset." }, { "name": "text_color", "type": "true", "typeModifiers": { "predicate": "flags.6" }, "comment": "Whether the color of TGS custom emojis contained in this set should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context. For custom emoji stickersets only." }, { "name": "user_id", "type": "InputUser", "comment": "Stickerset owner" }, { "name": "title", "type": "string", "comment": "Stickerset name, 1-64 chars" }, { "name": "short_name", "type": "string", "comment": "Short name of sticker set, to be used in sticker deep links ». Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and, if called by a bot, must end in \"_by_\". is case insensitive. 1-64 characters." }, { "name": "thumb", "type": "InputDocument", "typeModifiers": { "predicate": "flags.2" }, "comment": "Thumbnail" }, { "name": "stickers", "type": "InputStickerSetItem", "typeModifiers": { "isVector": true }, "comment": "Stickers" }, { "name": "software", "type": "string", "typeModifiers": { "predicate": "flags.3" }, "comment": "Used when importing stickers using the sticker import SDKs, specifies the name of the software that created the stickers" }, { "name": "animated", "type": "true", "typeModifiers": { "predicate": "flags.1" } }, { "name": "videos", "type": "true", "typeModifiers": { "predicate": "flags.4" } }], "throws": [{ "code": 400, "name": "PACK_SHORT_NAME_INVALID", "comment": "Short pack name invalid." }, { "code": 400, "name": "PACK_SHORT_NAME_OCCUPIED", "comment": "A stickerpack with this name already exists." }, { "code": 400, "name": "PACK_TITLE_INVALID", "comment": "The stickerpack title is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "STICKERS_EMPTY", "comment": "No sticker provided." }, { "code": 400, "name": "STICKER_EMOJI_INVALID", "comment": "Sticker emoji invalid." }, { "code": 400, "name": "STICKER_FILE_INVALID", "comment": "Sticker file invalid." }, { "code": 400, "name": "STICKER_GIF_DIMENSIONS", "comment": "The specified video sticker has invalid dimensions." }, { "code": 400, "name": "STICKER_PNG_DIMENSIONS", "comment": "Sticker png dimensions invalid." }, { "code": 400, "name": "STICKER_PNG_NOPNG", "comment": "One of the specified stickers is not a valid PNG file." }, { "code": 400, "name": "STICKER_TGS_NODOC", "comment": "You must send the animated sticker as a document." }, { "code": 400, "name": "STICKER_TGS_NOTGS", "comment": "Invalid TGS sticker provided." }, { "code": 400, "name": "STICKER_THUMB_PNG_NOPNG", "comment": "Incorrect stickerset thumb file provided, PNG / WEBP expected." }, { "code": 400, "name": "STICKER_THUMB_TGS_NOTGS", "comment": "Incorrect stickerset TGS thumb file provided." }, { "code": 400, "name": "STICKER_VIDEO_BIG", "comment": "The specified video sticker is too big." }, { "code": 400, "name": "STICKER_VIDEO_NODOC", "comment": "You must send the video sticker as a document." }, { "code": 400, "name": "STICKER_VIDEO_NOWEBM", "comment": "The specified video sticker is not in webm format." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "both" }, { "kind": "method", "name": "stickers.removeStickerFromSet", "type": "messages.StickerSet", "id": 4151709521, "comment": "Remove a sticker from the set where it belongs. The sticker set must have been created by the current user/bot.", "arguments": [{ "name": "sticker", "type": "InputDocument", "comment": "The sticker to remove" }], "throws": [{ "code": 400, "name": "STICKER_INVALID", "comment": "The provided sticker is invalid." }], "available": "both" }, { "kind": "method", "name": "stickers.changeStickerPosition", "type": "messages.StickerSet", "id": 4290172106, "comment": "Changes the absolute position of a sticker in the set to which it belongs. The sticker set must have been created by the current user/bot.", "arguments": [{ "name": "sticker", "type": "InputDocument", "comment": "The sticker" }, { "name": "position", "type": "int", "comment": "The new position of the sticker, zero-based" }], "throws": [{ "code": 400, "name": "STICKER_INVALID", "comment": "The provided sticker is invalid." }], "available": "both" }, { "kind": "method", "name": "stickers.addStickerToSet", "type": "messages.StickerSet", "id": 2253651646, "comment": "Add a sticker to a stickerset. The sticker set must have been created by the current user/bot.", "arguments": [{ "name": "stickerset", "type": "InputStickerSet", "comment": "The stickerset" }, { "name": "sticker", "type": "InputStickerSetItem", "comment": "The sticker" }], "throws": [{ "code": 400, "name": "STICKERPACK_STICKERS_TOO_MUCH", "comment": "There are too many stickers in this stickerpack, you can't add any more." }, { "code": 406, "name": "STICKERSET_INVALID", "comment": "The provided sticker set is invalid." }, { "code": 400, "name": "STICKERS_TOO_MUCH", "comment": "There are too many stickers in this stickerpack, you can't add any more." }, { "code": 400, "name": "STICKER_PNG_NOPNG", "comment": "One of the specified stickers is not a valid PNG file." }, { "code": 400, "name": "STICKER_TGS_NOTGS", "comment": "Invalid TGS sticker provided." }], "available": "both" }, { "kind": "method", "name": "stickers.setStickerSetThumb", "type": "messages.StickerSet", "id": 2808763282, "comment": "Set stickerset thumbnail", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "stickerset", "type": "InputStickerSet", "comment": "Stickerset" }, { "name": "thumb", "type": "InputDocument", "typeModifiers": { "predicate": "flags.0" }, "comment": "Thumbnail (only for normal stickersets, not custom emoji stickersets)." }, { "name": "thumb_document_id", "type": "long", "typeModifiers": { "predicate": "flags.1" }, "comment": "Only for custom emoji stickersets, ID of a custom emoji present in the set to use as thumbnail; pass 0 to fallback to the first custom emoji of the set." }], "throws": [{ "code": 400, "name": "STICKERSET_INVALID", "comment": "The provided sticker set is invalid." }, { "code": 400, "name": "STICKER_THUMB_PNG_NOPNG", "comment": "Incorrect stickerset thumb file provided, PNG / WEBP expected." }, { "code": 400, "name": "STICKER_THUMB_TGS_NOTGS", "comment": "Incorrect stickerset TGS thumb file provided." }], "available": "both" }, { "kind": "method", "name": "stickers.checkShortName", "type": "Bool", "id": 676017721, "comment": "Check whether the given short name is available", "arguments": [{ "name": "short_name", "type": "string", "comment": "Short name" }], "throws": [{ "code": 400, "name": "SHORT_NAME_INVALID", "comment": "The specified short name is invalid." }, { "code": 400, "name": "SHORT_NAME_OCCUPIED", "comment": "The specified short name is already in use." }], "available": "user" }, { "kind": "method", "name": "stickers.suggestShortName", "type": "stickers.SuggestedShortName", "typeModifiers": { "constructorId": 2248056895 }, "id": 1303364867, "comment": "Suggests a short name for a given stickerpack name", "arguments": [{ "name": "title", "type": "string", "comment": "Sticker pack name" }], "throws": [{ "code": 400, "name": "TITLE_INVALID", "comment": "The specified stickerpack title is invalid." }], "available": "user" }, { "kind": "method", "name": "stickers.changeSticker", "type": "messages.StickerSet", "id": 4115889852, "comment": "Update the keywords, emojis or mask coordinates of a sticker.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "sticker", "type": "InputDocument", "comment": "The sticker" }, { "name": "emoji", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, updates the emoji list associated to the sticker" }, { "name": "mask_coords", "type": "MaskCoords", "typeModifiers": { "predicate": "flags.1" }, "comment": "If set, updates the mask coordinates" }, { "name": "keywords", "type": "string", "typeModifiers": { "predicate": "flags.2" }, "comment": "If set, updates the sticker keywords (separated by commas). Can't be provided for mask stickers." }], "throws": [{ "code": 400, "name": "STICKER_INVALID", "comment": "The provided sticker is invalid." }], "available": "both" }, { "kind": "method", "name": "stickers.renameStickerSet", "type": "messages.StickerSet", "id": 306912256, "comment": "Renames a stickerset.", "arguments": [{ "name": "stickerset", "type": "InputStickerSet", "comment": "Stickerset to rename" }, { "name": "title", "type": "string", "comment": "New stickerset title" }], "throws": [{ "code": 400, "name": "STICKERSET_INVALID", "comment": "The provided sticker set is invalid." }], "available": "both" }, { "kind": "method", "name": "stickers.deleteStickerSet", "type": "Bool", "id": 2272281492, "comment": "Deletes a stickerset we created.", "arguments": [{ "name": "stickerset", "type": "InputStickerSet", "comment": "Stickerset to delete" }], "throws": [{ "code": 400, "name": "STICKERSET_INVALID", "comment": "The provided sticker set is invalid." }], "available": "both" }, { "kind": "method", "name": "stickers.replaceSticker", "type": "messages.StickerSet", "id": 1184253338, "comment": "Replace a sticker in a stickerset ».", "arguments": [{ "name": "sticker", "type": "InputDocument", "comment": "Old sticker document." }, { "name": "new_sticker", "type": "InputStickerSetItem", "comment": "New sticker." }], "throws": [{ "code": 400, "name": "STICKER_INVALID", "comment": "The provided sticker is invalid." }], "available": "both" }, { "kind": "method", "name": "phone.getCallConfig", "type": "DataJSON", "typeModifiers": { "constructorId": 2104790276 }, "id": 1430593449, "comment": "Get phone call configuration to be passed to libtgvoip's shared config", "arguments": [], "available": "user" }, { "kind": "method", "name": "phone.requestCall", "type": "phone.PhoneCall", "typeModifiers": { "constructorId": 3968000320 }, "id": 1124046573, "comment": "Start a telegram phone call", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "video", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to start a video call" }, { "name": "user_id", "type": "InputUser", "comment": "Destination of the phone call" }, { "name": "random_id", "type": "int", "comment": "Random ID to avoid resending the same object" }, { "name": "g_a_hash", "type": "bytes", "comment": "Parameter for E2E encryption key exchange »" }, { "name": "protocol", "type": "PhoneCallProtocol", "comment": "Phone call settings" }], "throws": [{ "code": 400, "name": "CALL_PROTOCOL_FLAGS_INVALID", "comment": "Call protocol flags invalid." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "PARTICIPANT_VERSION_OUTDATED", "comment": "The other participant does not use an up to date telegram client with support for calls." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }, { "code": 403, "name": "USER_IS_BLOCKED", "comment": "You were blocked by this user." }, { "code": 403, "name": "USER_PRIVACY_RESTRICTED", "comment": "The user's privacy settings do not allow you to do this." }], "available": "user" }, { "kind": "method", "name": "phone.acceptCall", "type": "phone.PhoneCall", "typeModifiers": { "constructorId": 3968000320 }, "id": 1003664544, "comment": "Accept incoming call", "arguments": [{ "name": "peer", "type": "InputPhoneCall", "comment": "The call to accept" }, { "name": "g_b", "type": "bytes", "comment": "Parameter for E2E encryption key exchange »" }, { "name": "protocol", "type": "PhoneCallProtocol", "comment": "Phone call settings" }], "throws": [{ "code": 400, "name": "CALL_ALREADY_ACCEPTED", "comment": "The call was already accepted." }, { "code": 400, "name": "CALL_ALREADY_DECLINED", "comment": "The call was already declined." }, { "code": 500, "name": "CALL_OCCUPY_FAILED", "comment": "The call failed because the user is already making another call." }, { "code": 400, "name": "CALL_PEER_INVALID", "comment": "The provided call peer object is invalid." }, { "code": 406, "name": "CALL_PROTOCOL_COMPAT_LAYER_INVALID", "comment": "The other side of the call does not support any of the VoIP protocols supported by the local client, as specified by the protocol.layer and protocol.library_versions fields." }, { "code": 400, "name": "CALL_PROTOCOL_FLAGS_INVALID", "comment": "Call protocol flags invalid." }], "available": "user" }, { "kind": "method", "name": "phone.confirmCall", "type": "phone.PhoneCall", "typeModifiers": { "constructorId": 3968000320 }, "id": 788404002, "comment": "Complete phone call E2E encryption key exchange »", "arguments": [{ "name": "peer", "type": "InputPhoneCall", "comment": "The phone call" }, { "name": "g_a", "type": "bytes", "comment": "Parameter for E2E encryption key exchange »" }, { "name": "key_fingerprint", "type": "long", "comment": "Key fingerprint" }, { "name": "protocol", "type": "PhoneCallProtocol", "comment": "Phone call settings" }], "throws": [{ "code": 400, "name": "CALL_ALREADY_DECLINED", "comment": "The call was already declined." }, { "code": 400, "name": "CALL_PEER_INVALID", "comment": "The provided call peer object is invalid." }], "available": "user" }, { "kind": "method", "name": "phone.receivedCall", "type": "Bool", "id": 399855457, "comment": "Optional: notify the server that the user is currently busy in a call: this will automatically refuse all incoming phone calls until the current phone call is ended.", "arguments": [{ "name": "peer", "type": "InputPhoneCall", "comment": "The phone call we're currently in" }], "throws": [{ "code": 400, "name": "CALL_ALREADY_DECLINED", "comment": "The call was already declined." }, { "code": 400, "name": "CALL_PEER_INVALID", "comment": "The provided call peer object is invalid." }], "available": "user" }, { "kind": "method", "name": "phone.discardCall", "type": "Updates", "id": 2999697856, "comment": "Refuse or end running call", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "video", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether this is a video call" }, { "name": "peer", "type": "InputPhoneCall", "comment": "The phone call" }, { "name": "duration", "type": "int", "comment": "Call duration" }, { "name": "reason", "type": "PhoneCallDiscardReason", "comment": "Why was the call discarded" }, { "name": "connection_id", "type": "long", "comment": "Preferred libtgvoip relay ID" }], "throws": [{ "code": 400, "name": "CALL_ALREADY_ACCEPTED", "comment": "The call was already accepted." }, { "code": 500, "name": "CALL_OCCUPY_FAILED", "comment": "The call failed because the user is already making another call." }, { "code": 400, "name": "CALL_PEER_INVALID", "comment": "The provided call peer object is invalid." }], "available": "user" }, { "kind": "method", "name": "phone.setCallRating", "type": "Updates", "id": 1508562471, "comment": "Rate a call, returns info about the rating message sent to the official VoIP bot.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "user_initiative", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether the user decided on their own initiative to rate the call" }, { "name": "peer", "type": "InputPhoneCall", "comment": "The call to rate" }, { "name": "rating", "type": "int", "comment": "Rating in 1-5 stars" }, { "name": "comment", "type": "string", "comment": "An additional comment" }], "throws": [{ "code": 400, "name": "CALL_PEER_INVALID", "comment": "The provided call peer object is invalid." }], "available": "user" }, { "kind": "method", "name": "phone.saveCallDebug", "type": "Bool", "id": 662363518, "comment": "Send phone call debug data to server", "arguments": [{ "name": "peer", "type": "InputPhoneCall", "comment": "Phone call" }, { "name": "debug", "type": "DataJSON", "comment": "Debug statistics obtained from libtgvoip" }], "throws": [{ "code": 400, "name": "CALL_PEER_INVALID", "comment": "The provided call peer object is invalid." }, { "code": 400, "name": "DATA_JSON_INVALID", "comment": "The provided JSON data is invalid." }], "available": "user" }, { "kind": "method", "name": "phone.sendSignalingData", "type": "Bool", "id": 4286223235, "comment": "Send VoIP signaling data", "arguments": [{ "name": "peer", "type": "InputPhoneCall", "comment": "Phone call" }, { "name": "data", "type": "bytes", "comment": "Signaling payload" }], "throws": [{ "code": 400, "name": "CALL_PEER_INVALID", "comment": "The provided call peer object is invalid." }], "available": "user" }, { "kind": "method", "name": "phone.createGroupCall", "type": "Updates", "id": 1221445336, "comment": "Create a group call or livestream", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "rtmp_stream", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether RTMP stream support should be enabled: only the group/supergroup/channel owner can use this flag." }, { "name": "peer", "type": "InputPeer", "comment": "Associate the group call or livestream to the provided group/supergroup/channel" }, { "name": "random_id", "type": "int", "comment": "Unique client message ID required to prevent creation of duplicate group calls" }, { "name": "title", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Call title" }, { "name": "schedule_date", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "For scheduled group call or livestreams, the absolute date when the group call will start" }], "throws": [{ "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CREATE_CALL_FAILED", "comment": "An error occurred while creating the call." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "SCHEDULE_DATE_INVALID", "comment": "Invalid schedule date provided." }], "available": "user" }, { "kind": "method", "name": "phone.joinGroupCall", "type": "Updates", "id": 2972909435, "comment": "Join a group call", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "muted", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "If set, the user will be muted by default upon joining." }, { "name": "video_stopped", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "If set, the user's video will be disabled by default upon joining." }, { "name": "call", "type": "InputGroupCall", "comment": "The group call" }, { "name": "join_as", "type": "InputPeer", "comment": "Join the group call, presenting yourself as the specified user/channel" }, { "name": "invite_hash", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "The invitation hash from the invite link », if provided allows speaking in a livestream or muted group chat." }, { "name": "params", "type": "DataJSON", "comment": "WebRTC parameters" }], "throws": [{ "code": 400, "name": "DATA_JSON_INVALID", "comment": "The provided JSON data is invalid." }, { "code": 403, "name": "GROUPCALL_FORBIDDEN", "comment": "The group call has already ended." }, { "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }, { "code": 400, "name": "GROUPCALL_SSRC_DUPLICATE_MUCH", "comment": "The app needs to retry joining the group call with a new SSRC value." }, { "code": 400, "name": "JOIN_AS_PEER_INVALID", "comment": "The specified peer cannot be used to join a group call." }], "available": "user" }, { "kind": "method", "name": "phone.leaveGroupCall", "type": "Updates", "id": 1342404601, "comment": "Leave a group call", "arguments": [{ "name": "call", "type": "InputGroupCall", "comment": "The group call" }, { "name": "source", "type": "int", "comment": "Your source ID" }], "throws": [{ "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }], "available": "user" }, { "kind": "method", "name": "phone.inviteToGroupCall", "type": "Updates", "id": 2067345760, "comment": "Invite a set of users to a group call.", "arguments": [{ "name": "call", "type": "InputGroupCall", "comment": "The group call" }, { "name": "users", "type": "InputUser", "typeModifiers": { "isVector": true }, "comment": "The users to invite." }], "throws": [{ "code": 403, "name": "GROUPCALL_FORBIDDEN", "comment": "The group call has already ended." }, { "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }, { "code": 400, "name": "INVITE_FORBIDDEN_WITH_JOINAS", "comment": "If the user has anonymously joined a group call as a channel, they can't invite other users to the group call because that would cause deanonymization, because the invite would be sent using the original user ID, not the anonymized channel ID." }, { "code": 400, "name": "USER_ALREADY_INVITED", "comment": "You have already invited this user." }, { "code": 403, "name": "USER_NOT_PARTICIPANT", "comment": "You're not a member of this supergroup/channel." }], "available": "user" }, { "kind": "method", "name": "phone.discardGroupCall", "type": "Updates", "id": 2054648117, "comment": "Terminate a group call", "arguments": [{ "name": "call", "type": "InputGroupCall", "comment": "The group call to terminate" }], "throws": [{ "code": 400, "name": "GROUPCALL_ALREADY_DISCARDED", "comment": "The group call was already discarded." }, { "code": 403, "name": "GROUPCALL_FORBIDDEN", "comment": "The group call has already ended." }, { "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }], "available": "user" }, { "kind": "method", "name": "phone.toggleGroupCallSettings", "type": "Updates", "id": 1958458429, "comment": "Change group call settings", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "reset_invite_hash", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Invalidate existing invite links" }, { "name": "call", "type": "InputGroupCall", "comment": "Group call" }, { "name": "join_muted", "type": "Bool", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether all users will that join this group call are muted by default upon joining the group call" }], "throws": [{ "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }, { "code": 400, "name": "GROUPCALL_NOT_MODIFIED", "comment": "Group call settings weren't modified." }], "available": "user" }, { "kind": "method", "name": "phone.getGroupCall", "type": "phone.GroupCall", "typeModifiers": { "constructorId": 2658302637 }, "id": 68699611, "comment": "Get info about a group call", "arguments": [{ "name": "call", "type": "InputGroupCall", "comment": "The group call" }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }], "throws": [{ "code": 403, "name": "GROUPCALL_FORBIDDEN", "comment": "The group call has already ended." }, { "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }], "available": "user" }, { "kind": "method", "name": "phone.getGroupParticipants", "type": "phone.GroupParticipants", "typeModifiers": { "constructorId": 4101460406 }, "id": 3310934187, "comment": "Get group call participants", "arguments": [{ "name": "call", "type": "InputGroupCall", "comment": "Group call" }, { "name": "ids", "type": "InputPeer", "typeModifiers": { "isVector": true }, "comment": "If specified, will fetch group participant info about the specified peers" }, { "name": "sources", "type": "int", "typeModifiers": { "isVector": true }, "comment": "If specified, will fetch group participant info about the specified WebRTC source IDs" }, { "name": "offset", "type": "string", "comment": "Offset for results, taken from the next_offset field of {@link phone.RawGroupParticipants}, initially an empty string.
Note: if no more results are available, the method call will return an empty next_offset; thus, avoid providing the next_offset returned in {@link phone.RawGroupParticipants} if it is empty, to avoid an infinite loop." }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }], "throws": [{ "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }], "available": "user" }, { "kind": "method", "name": "phone.checkGroupCall", "type": "int", "typeModifiers": { "isVector": true }, "id": 3046963575, "comment": "Check whether the group call Server Forwarding Unit is currently receiving the streams with the specified WebRTC source IDs.
\nReturns an intersection of the source IDs specified in sources, and the source IDs currently being forwarded by the SFU.", "arguments": [{ "name": "call", "type": "InputGroupCall", "comment": "Group call" }, { "name": "sources", "type": "int", "typeModifiers": { "isVector": true }, "comment": "Source IDs" }], "throws": [{ "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }, { "code": 400, "name": "GROUPCALL_JOIN_MISSING", "comment": "You haven't joined this group call." }], "available": "user" }, { "kind": "method", "name": "phone.toggleGroupCallRecord", "type": "Updates", "id": 4045981448, "comment": "Start or stop recording a group call: the recorded audio and video streams will be automatically sent to Saved messages (the chat with ourselves).", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "start", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to start or stop recording" }, { "name": "video", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether to also record video streams" }, { "name": "call", "type": "InputGroupCall", "comment": "The group call or livestream" }, { "name": "title", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Recording title" }, { "name": "video_portrait", "type": "Bool", "typeModifiers": { "predicate": "flags.2" }, "comment": "If video stream recording is enabled, whether to record in portrait or landscape mode" }], "throws": [{ "code": 403, "name": "GROUPCALL_FORBIDDEN", "comment": "The group call has already ended." }, { "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }, { "code": 400, "name": "GROUPCALL_NOT_MODIFIED", "comment": "Group call settings weren't modified." }], "available": "user" }, { "kind": "method", "name": "phone.editGroupCallParticipant", "type": "Updates", "id": 2770811583, "comment": "Edit information about a given group call participant\n\nNote: flags.N?Bool parameters can have three possible values:", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "call", "type": "InputGroupCall", "comment": "The group call" }, { "name": "participant", "type": "InputPeer", "comment": "The group call participant (can also be the user itself)" }, { "name": "muted", "type": "Bool", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to mute or unmute the specified participant" }, { "name": "volume", "type": "int", "typeModifiers": { "predicate": "flags.1" }, "comment": "New volume" }, { "name": "raise_hand", "type": "Bool", "typeModifiers": { "predicate": "flags.2" }, "comment": "Raise or lower hand" }, { "name": "video_stopped", "type": "Bool", "typeModifiers": { "predicate": "flags.3" }, "comment": "Start or stop the video stream" }, { "name": "video_paused", "type": "Bool", "typeModifiers": { "predicate": "flags.4" }, "comment": "Pause or resume the video stream" }, { "name": "presentation_paused", "type": "Bool", "typeModifiers": { "predicate": "flags.5" }, "comment": "Pause or resume the screen sharing stream" }], "throws": [{ "code": 403, "name": "GROUPCALL_FORBIDDEN", "comment": "The group call has already ended." }, { "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }, { "code": 400, "name": "PARTICIPANT_JOIN_MISSING", "comment": "Trying to enable a presentation, when the user hasn't joined the Video Chat with {@link phone.RawJoinGroupCallRequest}." }, { "code": 400, "name": "RAISE_HAND_FORBIDDEN", "comment": "You cannot raise your hand." }, { "code": 400, "name": "USER_VOLUME_INVALID", "comment": "The specified user volume is invalid." }, { "code": 400, "name": "VIDEO_PAUSE_FORBIDDEN", "comment": "You cannot pause the video stream." }, { "code": 400, "name": "VIDEO_STOP_FORBIDDEN", "comment": "You cannot stop the video stream." }], "available": "user" }, { "kind": "method", "name": "phone.editGroupCallTitle", "type": "Updates", "id": 480685066, "comment": "Edit the title of a group call or livestream", "arguments": [{ "name": "call", "type": "InputGroupCall", "comment": "Group call" }, { "name": "title", "type": "string", "comment": "New title" }], "throws": [{ "code": 403, "name": "GROUPCALL_FORBIDDEN", "comment": "The group call has already ended." }, { "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }], "available": "user" }, { "kind": "method", "name": "phone.getGroupCallJoinAs", "type": "phone.JoinAsPeers", "typeModifiers": { "constructorId": 2951045695 }, "id": 4017889594, "comment": "Get a list of peers that can be used to join a group call, presenting yourself as a specific user/channel.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The dialog whose group call or livestream we're trying to join" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "phone.exportGroupCallInvite", "type": "phone.ExportedGroupCallInvite", "typeModifiers": { "constructorId": 541839704 }, "id": 3869926527, "comment": "Get an invite link for a group call or livestream", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "can_self_unmute", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "For livestreams or muted group chats, if set, users that join using this link will be able to speak without explicitly requesting permission by (for example by raising their hand)." }, { "name": "call", "type": "InputGroupCall", "comment": "The group call" }], "throws": [{ "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }, { "code": 403, "name": "PUBLIC_CHANNEL_MISSING", "comment": "You can only export group call invite links for public chats or channels." }], "available": "user" }, { "kind": "method", "name": "phone.toggleGroupCallStartSubscription", "type": "Updates", "id": 563885286, "comment": "Subscribe or unsubscribe to a scheduled group call", "arguments": [{ "name": "call", "type": "InputGroupCall", "comment": "Scheduled group call" }, { "name": "subscribed", "type": "Bool", "comment": "Enable or disable subscription" }], "throws": [{ "code": 403, "name": "GROUPCALL_ALREADY_STARTED", "comment": "The groupcall has already started, you can join directly using {@link phone.RawJoinGroupCallRequest}." }, { "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }], "available": "user" }, { "kind": "method", "name": "phone.startScheduledGroupCall", "type": "Updates", "id": 1451287362, "comment": "Start a scheduled group call.", "arguments": [{ "name": "call", "type": "InputGroupCall", "comment": "The scheduled group call" }], "throws": [{ "code": 403, "name": "GROUPCALL_ALREADY_STARTED", "comment": "The groupcall has already started, you can join directly using {@link phone.RawJoinGroupCallRequest}." }, { "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }], "available": "user" }, { "kind": "method", "name": "phone.saveDefaultGroupCallJoinAs", "type": "Bool", "id": 1465786252, "comment": "Set the default peer that will be used to join a group call in a specific dialog.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The dialog" }, { "name": "join_as", "type": "InputPeer", "comment": "The default peer that will be used to join group calls in this dialog, presenting yourself as a specific user/channel." }], "throws": [{ "code": 400, "name": "JOIN_AS_PEER_INVALID", "comment": "The specified peer cannot be used to join a group call." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "phone.joinGroupCallPresentation", "type": "Updates", "id": 3421137860, "comment": "Start screen sharing in a call", "arguments": [{ "name": "call", "type": "InputGroupCall", "comment": "The group call" }, { "name": "params", "type": "DataJSON", "comment": "WebRTC parameters" }], "throws": [{ "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }, { "code": 403, "name": "PARTICIPANT_JOIN_MISSING", "comment": "Trying to enable a presentation, when the user hasn't joined the Video Chat with {@link phone.RawJoinGroupCallRequest}." }], "available": "user" }, { "kind": "method", "name": "phone.leaveGroupCallPresentation", "type": "Updates", "id": 475058500, "comment": "Stop screen sharing in a group call", "arguments": [{ "name": "call", "type": "InputGroupCall", "comment": "The group call" }], "throws": [{ "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }], "available": "user" }, { "kind": "method", "name": "phone.getGroupCallStreamChannels", "type": "phone.GroupCallStreamChannels", "typeModifiers": { "constructorId": 3504636594 }, "id": 447879488, "comment": "Get info about RTMP streams in a group call or livestream.
\nThis method should be invoked to the same group/channel-related DC used for downloading livestream chunks.
\nAs usual, the media DC is preferred, if available.", "arguments": [{ "name": "call", "type": "InputGroupCall", "comment": "Group call or livestream" }], "throws": [{ "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }, { "code": 400, "name": "GROUPCALL_JOIN_MISSING", "comment": "You haven't joined this group call." }], "available": "user" }, { "kind": "method", "name": "phone.getGroupCallStreamRtmpUrl", "type": "phone.GroupCallStreamRtmpUrl", "typeModifiers": { "constructorId": 767505458 }, "id": 3736316863, "comment": "Get RTMP URL and stream key for RTMP livestreams. Can be used even before creating the actual RTMP livestream with {@link phone.RawCreateGroupCallRequest} (the rtmp_stream flag must be set).", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer to livestream into" }, { "name": "revoke", "type": "Bool", "comment": "Whether to revoke the previous stream key or simply return the existing one" }], "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "phone.saveCallLog", "type": "Bool", "id": 1092913030, "comment": "Save phone call debug information", "arguments": [{ "name": "peer", "type": "InputPhoneCall", "comment": "Phone call" }, { "name": "file", "type": "InputFile", "comment": "Logs" }], "throws": [{ "code": 400, "name": "CALL_PEER_INVALID", "comment": "The provided call peer object is invalid." }], "available": "user" }, { "kind": "method", "name": "langpack.getLangPack", "type": "LangPackDifference", "typeModifiers": { "constructorId": 4085629430 }, "id": 4075959050, "comment": "Get localization pack strings", "arguments": [{ "name": "lang_pack", "type": "string", "comment": "Platform identifier (i.e. android, tdesktop, etc)." }, { "name": "lang_code", "type": "string", "comment": "Either an ISO 639-1 language code or a language pack name obtained from a language pack link." }], "throws": [{ "code": 400, "name": "LANGUAGE_INVALID", "comment": "The specified lang_code is invalid." }, { "code": 400, "name": "LANG_CODE_NOT_SUPPORTED", "comment": "The specified language code is not supported." }, { "code": 400, "name": "LANG_PACK_INVALID", "comment": "The provided language pack is invalid." }], "available": "user" }, { "kind": "method", "name": "langpack.getStrings", "type": "LangPackString", "typeModifiers": { "isVector": true }, "id": 4025104387, "comment": "Get strings from a language pack", "arguments": [{ "name": "lang_pack", "type": "string", "comment": "Platform identifier (i.e. android, tdesktop, etc)." }, { "name": "lang_code", "type": "string", "comment": "Either an ISO 639-1 language code or a language pack name obtained from a language pack link." }, { "name": "keys", "type": "string", "typeModifiers": { "isVector": true }, "comment": "Strings to get" }], "throws": [{ "code": 400, "name": "LANG_CODE_NOT_SUPPORTED", "comment": "The specified language code is not supported." }, { "code": 400, "name": "LANG_PACK_INVALID", "comment": "The provided language pack is invalid." }], "available": "user" }, { "kind": "method", "name": "langpack.getDifference", "type": "LangPackDifference", "typeModifiers": { "constructorId": 4085629430 }, "id": 3449309861, "comment": "Get new strings in language pack", "arguments": [{ "name": "lang_pack", "type": "string", "comment": "Platform identifier (i.e. android, tdesktop, etc)." }, { "name": "lang_code", "type": "string", "comment": "Either an ISO 639-1 language code or a language pack name obtained from a language pack link." }, { "name": "from_version", "type": "int", "comment": "Previous localization pack version" }], "throws": [{ "code": 400, "name": "LANG_PACK_INVALID", "comment": "The provided language pack is invalid." }], "available": "user" }, { "kind": "method", "name": "langpack.getLanguages", "type": "LangPackLanguage", "typeModifiers": { "isVector": true, "constructorId": 4006239459 }, "id": 1120311183, "comment": "Get information about all languages in a localization pack", "arguments": [{ "name": "lang_pack", "type": "string", "comment": "Platform identifier (i.e. android, tdesktop, etc)." }], "throws": [{ "code": 400, "name": "LANG_PACK_INVALID", "comment": "The provided language pack is invalid." }], "available": "user" }, { "kind": "method", "name": "langpack.getLanguage", "type": "LangPackLanguage", "typeModifiers": { "constructorId": 4006239459 }, "id": 1784243458, "comment": "Get information about a language in a localization pack", "arguments": [{ "name": "lang_pack", "type": "string", "comment": "Platform identifier (i.e. android, tdesktop, etc)." }, { "name": "lang_code", "type": "string", "comment": "Either an ISO 639-1 language code or a language pack name obtained from a language pack link." }], "throws": [{ "code": 400, "name": "LANG_CODE_NOT_SUPPORTED", "comment": "The specified language code is not supported." }, { "code": 400, "name": "LANG_PACK_INVALID", "comment": "The provided language pack is invalid." }], "available": "user" }, { "kind": "method", "name": "folders.editPeerFolders", "type": "Updates", "id": 1749536939, "comment": "Edit peers in peer folder", "arguments": [{ "name": "folder_peers", "type": "InputFolderPeer", "typeModifiers": { "isVector": true }, "comment": "New peer list" }], "throws": [{ "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "FOLDER_ID_INVALID", "comment": "Invalid folder ID." }], "available": "user" }, { "kind": "method", "name": "stats.getBroadcastStats", "type": "stats.BroadcastStats", "typeModifiers": { "constructorId": 963421692 }, "id": 2873246746, "comment": "Get channel statistics", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "dark", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to enable dark theme for graph colors" }, { "name": "channel", "type": "InputChannel", "comment": "The channel" }], "throws": [{ "code": 400, "name": "BROADCAST_REQUIRED", "comment": "This method can only be called on a channel, please use stats.getMegagroupStats for supergroups." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }], "available": "user" }, { "kind": "method", "name": "stats.loadAsyncGraph", "type": "StatsGraph", "id": 1646092192, "comment": "Load channel statistics graph asynchronously", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "token", "type": "string", "comment": "Graph token from {@link RawStatsGraphAsync} constructor" }, { "name": "x", "type": "long", "typeModifiers": { "predicate": "flags.0" }, "comment": "Zoom value, if required" }], "throws": [{ "code": 400, "name": "GRAPH_EXPIRED_RELOAD", "comment": "This graph has expired, please obtain a new graph token." }, { "code": 400, "name": "GRAPH_INVALID_RELOAD", "comment": "Invalid graph token provided, please reload the stats and provide the updated token." }, { "code": 400, "name": "GRAPH_OUTDATED_RELOAD", "comment": "The graph is outdated, please get a new async token using stats.getBroadcastStats." }], "available": "user" }, { "kind": "method", "name": "stats.getMegagroupStats", "type": "stats.MegagroupStats", "typeModifiers": { "constructorId": 4018141462 }, "id": 3705636359, "comment": "Get supergroup statistics", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "dark", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to enable dark theme for graph colors" }, { "name": "channel", "type": "InputChannel", "comment": "Supergroup ID" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "MEGAGROUP_REQUIRED", "comment": "You can only use this method on a supergroup." }], "available": "user" }, { "kind": "method", "name": "stats.getMessagePublicForwards", "type": "stats.PublicForwards", "typeModifiers": { "constructorId": 2466479648 }, "id": 1595212100, "comment": "Obtains a list of messages, indicating to which other public channels was a channel message forwarded.
\nWill return a list of {@link RawMessage} with peer_id equal to the public channel to which this message was forwarded.", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "Source channel" }, { "name": "msg_id", "type": "int", "comment": "Source message ID" }, { "name": "offset", "type": "string", "comment": "Offset for pagination, empty string on first call, then use the next_offset field of the returned constructor (if present, otherwise no more results are available)." }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "stats.getMessageStats", "type": "stats.MessageStats", "typeModifiers": { "constructorId": 2145983508 }, "id": 3068175349, "comment": "Get message statistics", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "dark", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to enable dark theme for graph colors" }, { "name": "channel", "type": "InputChannel", "comment": "Channel ID" }, { "name": "msg_id", "type": "int", "comment": "Message ID" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "stats.getStoryStats", "type": "stats.StoryStats", "typeModifiers": { "constructorId": 1355613820 }, "id": 927985472, "comment": "Get statistics for a certain story.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "dark", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to enable the dark theme for graph colors" }, { "name": "peer", "type": "InputPeer", "comment": "The peer that posted the story" }, { "name": "id", "type": "int", "comment": "Story ID" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "stats.getStoryPublicForwards", "type": "stats.PublicForwards", "typeModifiers": { "constructorId": 2466479648 }, "id": 2789441270, "comment": "Obtain forwards of a story as a message to public chats and reposts by public channels.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer where the story was originally posted" }, { "name": "id", "type": "int", "comment": "Story ID" }, { "name": "offset", "type": "string", "comment": "Offset for pagination, from {@link stats.RawPublicForwards}.next_offset." }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "stats.getBroadcastRevenueStats", "type": "stats.BroadcastRevenueStats", "typeModifiers": { "constructorId": 1409802903 }, "id": 1977595505, "comment": "Get channel ad revenue statistics ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "dark", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to enable dark theme for graph colors" }, { "name": "channel", "type": "InputChannel", "comment": "The channel" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }], "available": "user" }, { "kind": "method", "name": "stats.getBroadcastRevenueWithdrawalUrl", "type": "stats.BroadcastRevenueWithdrawalUrl", "typeModifiers": { "constructorId": 3966080823 }, "id": 711323507, "comment": "Withdraw funds from a channel's ad revenue balance ».", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "The channel" }, { "name": "password", "type": "InputCheckPasswordSRP", "comment": "2FA password, see here » for more info." }], "throws": [{ "code": 400, "name": "PASSWORD_HASH_INVALID", "comment": "The provided password hash is invalid." }, { "code": 400, "name": "PASSWORD_MISSING", "comment": "You must enable 2FA before executing this operation." }, { "code": 400, "name": "PASSWORD_TOO_FRESH_%d", "comment": "The password was modified less than 24 hours ago, try again in %d seconds." }], "available": "user" }, { "kind": "method", "name": "stats.getBroadcastRevenueTransactions", "type": "stats.BroadcastRevenueTransactions", "typeModifiers": { "constructorId": 2266334310 }, "id": 6891535, "comment": "Fetch channel ad revenue transaction history ».", "arguments": [{ "name": "channel", "type": "InputChannel", "comment": "The channel" }, { "name": "offset", "type": "int", "comment": "Offset for pagination" }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }], "available": "user" }, { "kind": "method", "name": "chatlists.exportChatlistInvite", "type": "chatlists.ExportedChatlistInvite", "typeModifiers": { "constructorId": 283567014 }, "id": 2222081934, "comment": "Export a folder », creating a chat folder deep link ».", "arguments": [{ "name": "chatlist", "type": "InputChatlist", "comment": "The folder to export" }, { "name": "title", "type": "string", "comment": "An optional name for the link" }, { "name": "peers", "type": "InputPeer", "typeModifiers": { "isVector": true }, "comment": "The list of channels, group and supergroups to share with the link. Basic groups will automatically be converted to supergroups when invoking the method." }], "throws": [{ "code": 400, "name": "FILTER_ID_INVALID", "comment": "The specified filter ID is invalid." }, { "code": 400, "name": "FILTER_NOT_SUPPORTED", "comment": "The specified filter cannot be used in this context." }, { "code": 400, "name": "INVITES_TOO_MUCH", "comment": "The maximum number of per-folder invites specified by the chatlist_invites_limit_default/chatlist_invites_limit_premium client configuration parameters » was reached." }, { "code": 400, "name": "PEERS_LIST_EMPTY", "comment": "The specified list of peers is empty." }], "available": "user" }, { "kind": "method", "name": "chatlists.deleteExportedInvite", "type": "Bool", "id": 1906072670, "comment": "Delete a previously created chat folder deep link ».", "arguments": [{ "name": "chatlist", "type": "InputChatlist", "comment": "The related folder" }, { "name": "slug", "type": "string", "comment": "slug obtained from the chat folder deep link »." }], "throws": [{ "code": 400, "name": "FILTER_ID_INVALID", "comment": "The specified filter ID is invalid." }, { "code": 400, "name": "FILTER_NOT_SUPPORTED", "comment": "The specified filter cannot be used in this context." }], "available": "user" }, { "kind": "method", "name": "chatlists.editExportedInvite", "type": "ExportedChatlistInvite", "typeModifiers": { "constructorId": 206668204 }, "id": 1698543165, "comment": "Edit a chat folder deep link ».", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "chatlist", "type": "InputChatlist", "comment": "Folder ID" }, { "name": "slug", "type": "string", "comment": "slug obtained from the chat folder deep link »." }, { "name": "title", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "If set, sets a new name for the link" }, { "name": "peers", "type": "InputPeer", "typeModifiers": { "predicate": "flags.2", "isVector": true }, "comment": "If set, changes the list of peers shared with the link" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "FILTER_ID_INVALID", "comment": "The specified filter ID is invalid." }, { "code": 400, "name": "FILTER_NOT_SUPPORTED", "comment": "The specified filter cannot be used in this context." }, { "code": 400, "name": "INVITE_SLUG_EMPTY", "comment": "The specified invite slug is empty." }, { "code": 400, "name": "INVITE_SLUG_EXPIRED", "comment": "The specified chat folder link has expired." }, { "code": 400, "name": "PEERS_LIST_EMPTY", "comment": "The specified list of peers is empty." }], "available": "user" }, { "kind": "method", "name": "chatlists.getExportedInvites", "type": "chatlists.ExportedInvites", "typeModifiers": { "constructorId": 279670215 }, "id": 3456359043, "comment": "List all chat folder deep links » associated to a folder", "arguments": [{ "name": "chatlist", "type": "InputChatlist", "comment": "The folder" }], "throws": [{ "code": 400, "name": "FILTER_ID_INVALID", "comment": "The specified filter ID is invalid." }], "available": "user" }, { "kind": "method", "name": "chatlists.checkChatlistInvite", "type": "chatlists.ChatlistInvite", "id": 1103171583, "comment": "Obtain information about a chat folder deep link ».", "arguments": [{ "name": "slug", "type": "string", "comment": "slug obtained from the chat folder deep link »" }], "throws": [{ "code": 400, "name": "INVITE_SLUG_EMPTY", "comment": "The specified invite slug is empty." }, { "code": 400, "name": "INVITE_SLUG_EXPIRED", "comment": "The specified chat folder link has expired." }], "available": "user" }, { "kind": "method", "name": "chatlists.joinChatlistInvite", "type": "Updates", "id": 2796675994, "comment": "Import a chat folder deep link », joining some or all the chats in the folder.", "arguments": [{ "name": "slug", "type": "string", "comment": "slug obtained from a chat folder deep link »." }, { "name": "peers", "type": "InputPeer", "typeModifiers": { "isVector": true }, "comment": "List of new chats to join, fetched using {@link chatlists.RawCheckChatlistInviteRequest} and filtered as specified in the documentation »." }], "throws": [{ "code": 400, "name": "FILTER_INCLUDE_EMPTY", "comment": "The include_peers vector of the filter is empty." }, { "code": 400, "name": "INVITE_SLUG_EMPTY", "comment": "The specified invite slug is empty." }, { "code": 400, "name": "INVITE_SLUG_EXPIRED", "comment": "The specified chat folder link has expired." }], "available": "user" }, { "kind": "method", "name": "chatlists.getChatlistUpdates", "type": "chatlists.ChatlistUpdates", "typeModifiers": { "constructorId": 2478671757 }, "id": 2302776609, "comment": "Fetch new chats associated with an imported chat folder deep link ». Must be invoked at most every chatlist_update_period seconds (as per the related client configuration parameter »).", "arguments": [{ "name": "chatlist", "type": "InputChatlist", "comment": "The folder" }], "throws": [{ "code": 400, "name": "FILTER_ID_INVALID", "comment": "The specified filter ID is invalid." }, { "code": 400, "name": "FILTER_NOT_SUPPORTED", "comment": "The specified filter cannot be used in this context." }, { "code": 400, "name": "INPUT_CHATLIST_INVALID", "comment": "The specified folder is invalid." }], "available": "user" }, { "kind": "method", "name": "chatlists.joinChatlistUpdates", "type": "Updates", "id": 3767138549, "comment": "Join channels and supergroups recently added to a chat folder deep link ».", "arguments": [{ "name": "chatlist", "type": "InputChatlist", "comment": "The folder" }, { "name": "peers", "type": "InputPeer", "typeModifiers": { "isVector": true }, "comment": "List of new chats to join, fetched using {@link chatlists.RawGetChatlistUpdatesRequest} and filtered as specified in the documentation »." }], "throws": [{ "code": 400, "name": "FILTER_ID_INVALID", "comment": "The specified filter ID is invalid." }, { "code": 400, "name": "FILTER_INCLUDE_EMPTY", "comment": "The include_peers vector of the filter is empty." }], "available": "user" }, { "kind": "method", "name": "chatlists.hideChatlistUpdates", "type": "Bool", "id": 1726252795, "comment": "Dismiss new pending peers recently added to a chat folder deep link ».", "arguments": [{ "name": "chatlist", "type": "InputChatlist", "comment": "The folder" }], "throws": [{ "code": 400, "name": "FILTER_ID_INVALID", "comment": "The specified filter ID is invalid." }, { "code": 400, "name": "FILTER_NOT_SUPPORTED", "comment": "The specified filter cannot be used in this context." }], "available": "user" }, { "kind": "method", "name": "chatlists.getLeaveChatlistSuggestions", "type": "Peer", "typeModifiers": { "isVector": true }, "id": 4257011476, "comment": "Returns identifiers of pinned or always included chats from a chat folder imported using a chat folder deep link », which are suggested to be left when the chat folder is deleted.", "arguments": [{ "name": "chatlist", "type": "InputChatlist", "comment": "Folder ID" }], "throws": [{ "code": 400, "name": "FILTER_ID_INVALID", "comment": "The specified filter ID is invalid." }, { "code": 400, "name": "FILTER_NOT_SUPPORTED", "comment": "The specified filter cannot be used in this context." }], "available": "user" }, { "kind": "method", "name": "chatlists.leaveChatlist", "type": "Updates", "id": 1962598714, "comment": "Delete a folder imported using a chat folder deep link »", "arguments": [{ "name": "chatlist", "type": "InputChatlist", "comment": "Folder ID" }, { "name": "peers", "type": "InputPeer", "typeModifiers": { "isVector": true }, "comment": "Also leave the specified channels and groups" }], "throws": [{ "code": 400, "name": "FILTER_ID_INVALID", "comment": "The specified filter ID is invalid." }], "available": "user" }, { "kind": "method", "name": "stories.canSendStory", "type": "Bool", "id": 3353337821, "comment": "Check whether we can post stories as the specified peer.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The peer from which we wish to post stories." }], "throws": [{ "code": 400, "name": "BOOSTS_REQUIRED", "comment": "The specified channel must first be boosted by its users in order to perform this action." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }, { "code": 400, "name": "STORIES_TOO_MUCH", "comment": "You have hit the maximum active stories limit as specified by the story_expiring_limit_* client configuration parameters: you should buy a Premium subscription, delete an active story, or wait for the oldest story to expire." }, { "code": 400, "name": "STORY_SEND_FLOOD_MONTHLY_%d", "comment": "You've hit the monthly story limit as specified by the stories_sent_monthly_limit_* client configuration parameters: wait for the specified number of seconds before posting a new story." }, { "code": 400, "name": "STORY_SEND_FLOOD_WEEKLY_%d", "comment": "You've hit the weekly story limit as specified by the stories_sent_weekly_limit_* client configuration parameters: wait for the specified number of seconds before posting a new story." }], "available": "user" }, { "kind": "method", "name": "stories.sendStory", "type": "Updates", "id": 3840305483, "comment": "Uploads a Telegram Story.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "pinned", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether to add the story to the profile automatically upon expiration. If not set, the story will only be added to the archive, see here » for more info." }, { "name": "noforwards", "type": "true", "typeModifiers": { "predicate": "flags.4" }, "comment": "If set, disables forwards, screenshots, and downloads." }, { "name": "fwd_modified", "type": "true", "typeModifiers": { "predicate": "flags.7" }, "comment": "Set this flag when reposting stories with fwd_from_id+fwd_from_id, if the media was modified before reposting." }, { "name": "peer", "type": "InputPeer", "comment": "The peer to send the story as." }, { "name": "media", "type": "InputMedia", "comment": "The story media." }, { "name": "media_areas", "type": "MediaArea", "typeModifiers": { "predicate": "flags.5", "isVector": true }, "comment": "Media areas associated to the story, see here » for more info." }, { "name": "caption", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Story caption." }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.1", "isVector": true }, "comment": "Message entities for styled text, if allowed by the stories_entities client configuration parameter »." }, { "name": "privacy_rules", "type": "InputPrivacyRule", "typeModifiers": { "isVector": true }, "comment": "Privacy rules for the story, indicating who can or can't view the story." }, { "name": "random_id", "type": "long", "comment": "Unique client message ID required to prevent message resending." }, { "name": "period", "type": "int", "typeModifiers": { "predicate": "flags.3" }, "comment": "Period after which the story is moved to archive (and to the profile if pinned is set), in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 for Telegram Premium users, and 86400 otherwise." }, { "name": "fwd_from_id", "type": "InputPeer", "typeModifiers": { "predicate": "flags.6" }, "comment": "If set, indicates that this story is a repost of story with ID fwd_from_story posted by the peer in fwd_from_id." }, { "name": "fwd_from_story", "type": "int", "typeModifiers": { "predicate": "flags.6" }, "comment": "If set, indicates that this story is a repost of story with ID fwd_from_story posted by the peer in fwd_from_id." }], "throws": [{ "code": 400, "name": "BOOSTS_REQUIRED", "comment": "The specified channel must first be boosted by its users in order to perform this action." }, { "code": 400, "name": "IMAGE_PROCESS_FAILED", "comment": "Failure while processing image." }, { "code": 400, "name": "MEDIA_EMPTY", "comment": "The provided media object is invalid." }, { "code": 400, "name": "MEDIA_FILE_INVALID", "comment": "The specified media file is invalid." }, { "code": 400, "name": "MEDIA_TYPE_INVALID", "comment": "The specified media type cannot be used in stories." }, { "code": 400, "name": "MEDIA_VIDEO_STORY_MISSING", "comment": "A non-story video cannot be repubblished as a story (emitted when trying to resend a non-story video as a story using inputDocument)." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }, { "code": 400, "name": "STORIES_TOO_MUCH", "comment": "You have hit the maximum active stories limit as specified by the story_expiring_limit_* client configuration parameters: you should buy a Premium subscription, delete an active story, or wait for the oldest story to expire." }, { "code": 400, "name": "STORY_PERIOD_INVALID", "comment": "The specified story period is invalid for this account." }, { "code": 400, "name": "VENUE_ID_INVALID", "comment": "The specified venue ID is invalid." }], "available": "user" }, { "kind": "method", "name": "stories.editStory", "type": "Updates", "id": 3045308998, "comment": "Edit an uploaded story", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "peer", "type": "InputPeer", "comment": "Peer where the story was posted." }, { "name": "id", "type": "int", "comment": "ID of story to edit." }, { "name": "media", "type": "InputMedia", "typeModifiers": { "predicate": "flags.0" }, "comment": "If specified, replaces the story media." }, { "name": "media_areas", "type": "MediaArea", "typeModifiers": { "predicate": "flags.3", "isVector": true }, "comment": "Media areas associated to the story, see here » for more info." }, { "name": "caption", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "If specified, replaces the story caption." }, { "name": "entities", "type": "MessageEntity", "typeModifiers": { "predicate": "flags.1", "isVector": true }, "comment": "Message entities for styled text in the caption, if allowed by the stories_entities client configuration parameter »." }, { "name": "privacy_rules", "type": "InputPrivacyRule", "typeModifiers": { "predicate": "flags.2", "isVector": true }, "comment": "If specified, alters the privacy settings » of the story, changing who can or can't view the story." }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "STORY_NOT_MODIFIED", "comment": "The new story information you passed is equal to the previous story information, thus it wasn't modified." }], "available": "user" }, { "kind": "method", "name": "stories.deleteStories", "type": "int", "typeModifiers": { "isVector": true }, "id": 2925124447, "comment": "Deletes some posted stories.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Channel/user from where to delete stories." }, { "name": "id", "type": "int", "typeModifiers": { "isVector": true }, "comment": "IDs of stories to delete." }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "STORY_ID_EMPTY", "comment": "You specified no story IDs." }], "available": "user" }, { "kind": "method", "name": "stories.togglePinned", "type": "int", "typeModifiers": { "isVector": true }, "id": 2591400431, "comment": "Pin or unpin one or more stories", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer where to pin or unpin stories" }, { "name": "id", "type": "int", "typeModifiers": { "isVector": true }, "comment": "IDs of stories to pin or unpin" }, { "name": "pinned", "type": "Bool", "comment": "Whether to pin or unpin the stories" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "stories.getAllStories", "type": "stories.AllStories", "id": 4004566565, "comment": "Fetch the List of active (or active and hidden) stories, see here » for more info on watching stories.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "next", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "If next and state are both set, uses the passed state to paginate to the next results; if neither state nor next are set, fetches the initial page; if state is set and next is not set, check for changes in the active/hidden peerset, see here » for more info on the full flow." }, { "name": "hidden", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "If set, fetches the hidden active story list, otherwise fetches the active story list, see here » for more info on the full flow." }, { "name": "state", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "If next and state are both set, uses the passed state to paginate to the next results; if neither state nor next are set, fetches the initial page; if state is set and next is not set, check for changes in the active/hidden peerset, see here » for more info on the full flow." }], "available": "user" }, { "kind": "method", "name": "stories.getPinnedStories", "type": "stories.Stories", "typeModifiers": { "constructorId": 1673780490 }, "id": 1478600156, "comment": "Fetch the stories pinned on a peer's profile.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer whose pinned stories should be fetched" }, { "name": "offset_id", "type": "int", "comment": "Offsets for pagination, for more info click here" }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "user" }, { "kind": "method", "name": "stories.getStoriesArchive", "type": "stories.Stories", "typeModifiers": { "constructorId": 1673780490 }, "id": 3023380502, "comment": "Fetch the story archive » of a peer we control.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer whose archived stories should be fetched" }, { "name": "offset_id", "type": "int", "comment": "Offsets for pagination, for more info click here" }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }], "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "stories.getStoriesByID", "type": "stories.Stories", "typeModifiers": { "constructorId": 1673780490 }, "id": 1467271796, "comment": "Obtain full info about a set of stories by their IDs.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer where the stories were posted" }, { "name": "id", "type": "int", "typeModifiers": { "isVector": true }, "comment": "Story IDs" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "STORIES_NEVER_CREATED", "comment": "This peer hasn't ever posted any stories." }, { "code": 400, "name": "STORY_ID_EMPTY", "comment": "You specified no story IDs." }], "available": "user" }, { "kind": "method", "name": "stories.toggleAllStoriesHidden", "type": "Bool", "id": 2082822084, "comment": "Hide the active stories of a specific peer, preventing them from being displayed on the action bar on the homescreen.", "arguments": [{ "name": "hidden", "type": "Bool", "comment": "Whether to hide or unhide all active stories of the peer" }], "available": "user" }, { "kind": "method", "name": "stories.readStories", "type": "int", "typeModifiers": { "isVector": true }, "id": 2773932744, "comment": "Mark all stories up to a certain ID as read, for a given peer; will emit an {@link RawUpdateReadStories} update to all logged-in sessions.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The peer whose stories should be marked as read." }, { "name": "max_id", "type": "int", "comment": "Mark all stories up to and including this ID as read" }], "throws": [{ "code": 400, "name": "MAX_ID_INVALID", "comment": "The provided max ID is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "STORIES_NEVER_CREATED", "comment": "This peer hasn't ever posted any stories." }], "available": "user" }, { "kind": "method", "name": "stories.incrementStoryViews", "type": "Bool", "id": 2986511099, "comment": "Increment the view counter of one or more stories.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer where the stories were posted." }, { "name": "id", "type": "int", "typeModifiers": { "isVector": true }, "comment": "IDs of the stories (maximum 200 at a time)." }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "STORY_ID_EMPTY", "comment": "You specified no story IDs." }], "available": "user" }, { "kind": "method", "name": "stories.getStoryViewsList", "type": "stories.StoryViewsList", "typeModifiers": { "constructorId": 1507299269 }, "id": 2127707223, "comment": "Obtain the list of users that have viewed a specific story we posted", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "just_contacts", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to only fetch view reaction/views made by our contacts" }, { "name": "reactions_first", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "Whether to return {@link RawStoryView} info about users that reacted to the story (i.e. if set, the server will first sort results by view date as usual, and then also additionally sort the list by putting {@link RawStoryView}s with an associated reaction first in the list). Ignored if forwards_first is set." }, { "name": "forwards_first", "type": "true", "typeModifiers": { "predicate": "flags.3" }, "comment": "If set, returns forwards and reposts first, then reactions, then other views; otherwise returns interactions sorted just by interaction date." }, { "name": "peer", "type": "InputPeer", "comment": "Peer where the story was posted" }, { "name": "q", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Search for specific peers" }, { "name": "id", "type": "int", "comment": "Story ID" }, { "name": "offset", "type": "string", "comment": "Offset for pagination, obtained from {@link stories.RawStoryViewsList}.next_offset" }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "STORY_ID_INVALID", "comment": "The specified story ID is invalid." }], "available": "user" }, { "kind": "method", "name": "stories.getStoriesViews", "type": "stories.StoryViews", "typeModifiers": { "constructorId": 3734957341 }, "id": 685862088, "comment": "Obtain info about the view count, forward count, reactions and recent viewers of one or more stories.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer whose stories should be fetched" }, { "name": "id", "type": "int", "typeModifiers": { "isVector": true }, "comment": "Story IDs" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "STORY_ID_EMPTY", "comment": "You specified no story IDs." }], "available": "user" }, { "kind": "method", "name": "stories.exportStoryLink", "type": "ExportedStoryLink", "typeModifiers": { "constructorId": 1070138683 }, "id": 2072899360, "comment": "Generate a story deep link for a specific story", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer where the story was posted" }, { "name": "id", "type": "int", "comment": "Story ID" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "STORY_ID_EMPTY", "comment": "You specified no story IDs." }, { "code": 400, "name": "USER_PUBLIC_MISSING", "comment": "Cannot generate a link to stories posted by a peer without a username." }], "available": "user" }, { "kind": "method", "name": "stories.report", "type": "Bool", "id": 421788300, "comment": "Report a story.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The peer that uploaded the story." }, { "name": "id", "type": "int", "typeModifiers": { "isVector": true }, "comment": "IDs of the stories to report." }, { "name": "reason", "type": "ReportReason", "comment": "Why are these storeis being reported." }, { "name": "message", "type": "string", "comment": "Comment for report moderation" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "stories.activateStealthMode", "type": "Updates", "id": 1471926630, "comment": "Activates stories stealth mode, see here » for more info.\n\nWill return an {@link RawUpdateStoriesStealthMode}.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "past", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to erase views from any stories opened in the past stories_stealth_past_period seconds », as specified by the client configuration." }, { "name": "future", "type": "true", "typeModifiers": { "predicate": "flags.1" }, "comment": "Whether to hide future story views for the next stories_stealth_future_period seconds », as specified by the client configuration." }], "throws": [{ "code": 400, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }], "available": "user" }, { "kind": "method", "name": "stories.sendReaction", "type": "Updates", "id": 2144810674, "comment": "React to a story.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "add_to_recent", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to add this reaction to the recent reactions list »." }, { "name": "peer", "type": "InputPeer", "comment": "The peer that sent the story" }, { "name": "story_id", "type": "int", "comment": "ID of the story to react to" }, { "name": "reaction", "type": "Reaction", "comment": "Reaction" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "REACTION_INVALID", "comment": "The specified reaction is invalid." }, { "code": 400, "name": "STORY_ID_EMPTY", "comment": "You specified no story IDs." }, { "code": 400, "name": "STORY_ID_INVALID", "comment": "The specified story ID is invalid." }], "available": "user" }, { "kind": "method", "name": "stories.getPeerStories", "type": "stories.PeerStories", "typeModifiers": { "constructorId": 3404105576 }, "id": 743103056, "comment": "Fetch the full active story list of a specific peer.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer whose stories should be fetched" }], "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "stories.getAllReadPeerStories", "type": "Updates", "id": 2606426105, "comment": "Obtain the latest read story ID for all peers when first logging in, returned as a list of {@link RawUpdateReadStories} updates, see here » for more info.", "arguments": [], "available": "user" }, { "kind": "method", "name": "stories.getPeerMaxIDs", "type": "int", "typeModifiers": { "isVector": true }, "id": 1398375363, "comment": "Get the IDs of the maximum read stories for a set of peers.", "arguments": [{ "name": "id", "type": "InputPeer", "typeModifiers": { "isVector": true }, "comment": "Peers" }], "available": "user" }, { "kind": "method", "name": "stories.getChatsToSend", "type": "messages.Chats", "id": 2775223136, "comment": "Obtain a list of channels where the user can post stories", "arguments": [], "available": "user" }, { "kind": "method", "name": "stories.togglePeerStoriesHidden", "type": "Bool", "id": 3171161540, "comment": "Hide the active stories of a user, preventing them from being displayed on the action bar on the homescreen, see here » for more info.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer whose stories should be (un)hidden." }, { "name": "hidden", "type": "Bool", "comment": "Whether to hide or unhide stories." }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "stories.getStoryReactionsList", "type": "stories.StoryReactionsList", "typeModifiers": { "constructorId": 2858383516 }, "id": 3115485215, "comment": "Get the reaction and interaction list of a story posted to a channel, along with the sender of each reaction.\n\nCan only be used by channel admins.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "forwards_first", "type": "true", "typeModifiers": { "predicate": "flags.2" }, "comment": "If set, returns forwards and reposts first, then reactions, then other views; otherwise returns interactions sorted just by interaction date." }, { "name": "peer", "type": "InputPeer", "comment": "Channel" }, { "name": "id", "type": "int", "comment": "Story ID" }, { "name": "reaction", "type": "Reaction", "typeModifiers": { "predicate": "flags.0" }, "comment": "Get only reactions of this type" }, { "name": "offset", "type": "string", "typeModifiers": { "predicate": "flags.1" }, "comment": "Offset for pagination (taken from the next_offset field of the returned stories.StoryReactionsList); empty in the first request." }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "stories.togglePinnedToTop", "type": "Bool", "id": 187268763, "comment": "Pin some stories to the top of the profile, see here » for more info.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "Peer where to pin stories." }, { "name": "id", "type": "int", "typeModifiers": { "isVector": true }, "comment": "IDs of the stories to pin (max stories_pinned_to_top_count_max)." }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "STORY_ID_INVALID", "comment": "The specified story ID is invalid." }], "available": "user" }, { "kind": "method", "name": "stories.searchPosts", "type": "stories.FoundStories", "typeModifiers": { "constructorId": 3806230327 }, "id": 1827279210, "comment": "Globally search for stories using a hashtag or a location media area, see here » for more info on the full flow.\n\nEither hashtag or area must be set when invoking the method.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "hashtag", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "Hashtag (without the #)" }, { "name": "area", "type": "MediaArea", "typeModifiers": { "predicate": "flags.1" }, "comment": "A {@link RawMediaAreaGeoPoint} or a {@link RawMediaAreaVenue}.
Note {@link RawMediaAreaGeoPoint} areas may be searched only if they have an associated address." }, { "name": "offset", "type": "string", "comment": "Offset for pagination: initially an empty string, then the next_offset from the previously returned {@link stories.RawFoundStories}." }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }], "throws": [{ "code": 400, "name": "HASHTAG_INVALID", "comment": "The specified hashtag is invalid." }], "available": "user" }, { "kind": "method", "name": "premium.getBoostsList", "type": "premium.BoostsList", "typeModifiers": { "constructorId": 2264424764 }, "id": 1626764896, "comment": "Obtains info about the boosts that were applied to a certain channel or supergroup (admins only)", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "gifts", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Whether to return only info about boosts received from gift codes and giveaways created by the channel/supergroup »" }, { "name": "peer", "type": "InputPeer", "comment": "The channel/supergroup" }, { "name": "offset", "type": "string", "comment": "Offset for pagination, obtained from {@link premium.RawBoostsList}.next_offset" }, { "name": "limit", "type": "int", "comment": "Maximum number of results to return, see pagination" }], "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "premium.getMyBoosts", "type": "premium.MyBoosts", "typeModifiers": { "constructorId": 2598512866 }, "id": 199719754, "comment": "Obtain which peers are we currently boosting, and how many boost slots we have left.", "arguments": [], "available": "user" }, { "kind": "method", "name": "premium.applyBoost", "type": "premium.MyBoosts", "typeModifiers": { "constructorId": 2598512866 }, "id": 1803396934, "comment": "Apply one or more boosts » to a peer.", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "slots", "type": "int", "typeModifiers": { "predicate": "flags.0", "isVector": true }, "comment": "Which boost slots to assign to this peer." }, { "name": "peer", "type": "InputPeer", "comment": "The peer to boost." }], "throws": [{ "code": 400, "name": "BOOSTS_EMPTY", "comment": "No boost slots were specified." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "SLOTS_EMPTY", "comment": "The specified slot list is empty." }], "available": "user" }, { "kind": "method", "name": "premium.getBoostsStatus", "type": "premium.BoostsStatus", "typeModifiers": { "constructorId": 1230586490 }, "id": 70197089, "comment": "Gets the current number of boosts of a channel/supergroup.", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The peer." }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, { "kind": "method", "name": "premium.getUserBoosts", "type": "premium.BoostsList", "typeModifiers": { "constructorId": 2264424764 }, "id": 965037343, "comment": "Returns the lists of boost that were applied to a channel/supergroup by a specific user (admins only)", "arguments": [{ "name": "peer", "type": "InputPeer", "comment": "The channel/supergroup" }, { "name": "user_id", "type": "InputUser", "comment": "The user" }], "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "both" }, { "kind": "method", "name": "smsjobs.isEligibleToJoin", "type": "smsjobs.EligibilityToJoin", "typeModifiers": { "constructorId": 3700114639 }, "id": 249313744, "comment": "Check if we can process SMS jobs (official clients only).", "arguments": [], "throws": [{ "code": 403, "name": "NOT_ELIGIBLE", "comment": "The current user is not eligible to join the Peer-to-Peer Login Program." }], "available": "user" }, { "kind": "method", "name": "smsjobs.join", "type": "Bool", "id": 2806959661, "comment": "Enable SMS jobs (official clients only).", "arguments": [], "throws": [{ "code": 400, "name": "NOT_ELIGIBLE", "comment": "The current user is not eligible to join the Peer-to-Peer Login Program." }], "available": "user" }, { "kind": "method", "name": "smsjobs.leave", "type": "Bool", "id": 2560142707, "comment": "Disable SMS jobs (official clients only).", "arguments": [], "throws": [{ "code": 400, "name": "NOT_JOINED", "comment": "The current user hasn't joined the Peer-to-Peer Login Program." }], "available": "user" }, { "kind": "method", "name": "smsjobs.updateSettings", "type": "Bool", "id": 155164863, "comment": "Update SMS job settings (official clients only).", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "allow_international", "type": "true", "typeModifiers": { "predicate": "flags.0" }, "comment": "Allow international numbers?" }], "throws": [{ "code": 400, "name": "NOT_JOINED", "comment": "The current user hasn't joined the Peer-to-Peer Login Program." }], "available": "user" }, { "kind": "method", "name": "smsjobs.getStatus", "type": "smsjobs.Status", "typeModifiers": { "constructorId": 720277905 }, "id": 279353576, "comment": "Get SMS jobs status (official clients only).", "arguments": [], "throws": [{ "code": 400, "name": "NOT_JOINED", "comment": "The current user hasn't joined the Peer-to-Peer Login Program." }], "available": "user" }, { "kind": "method", "name": "smsjobs.getSmsJob", "type": "SmsJob", "typeModifiers": { "constructorId": 3869372088 }, "id": 2005766191, "comment": "Get info about an SMS job (official clients only).", "arguments": [{ "name": "job_id", "type": "string", "comment": "Job ID" }], "throws": [{ "code": 400, "name": "SMSJOB_ID_INVALID", "comment": "The specified job ID is invalid." }], "available": "user" }, { "kind": "method", "name": "smsjobs.finishJob", "type": "Bool", "id": 1327415076, "comment": "Finish an SMS job (official clients only).", "arguments": [{ "name": "flags", "type": "#", "comment": "Flags, see TL conditional fields" }, { "name": "job_id", "type": "string", "comment": "Job ID." }, { "name": "error", "type": "string", "typeModifiers": { "predicate": "flags.0" }, "comment": "If failed, the error." }], "throws": [{ "code": 400, "name": "SMSJOB_ID_INVALID", "comment": "The specified job ID is invalid." }], "available": "user" }, { "kind": "method", "name": "fragment.getCollectibleInfo", "type": "fragment.CollectibleInfo", "typeModifiers": { "constructorId": 1857945489 }, "id": 3189671354, "comment": "Fetch information about a fragment collectible, see here » for more info on the full flow.", "arguments": [{ "name": "collectible", "type": "InputCollectible", "comment": "Collectible to fetch info about." }], "throws": [{ "code": 400, "name": "COLLECTIBLE_INVALID", "comment": "The specified collectible is invalid." }, { "code": 400, "name": "COLLECTIBLE_NOT_FOUND", "comment": "The specified collectible could not be found." }], "available": "user" }, { "kind": "method", "name": "mtcute.customMethod", "id": 2440218877, "type": "bytes", "arguments": [{ "name": "bytes", "type": "bytes" }], "comment": "temporary solution to allow users to call arbitrary methods not present in the schema, without having to override client's schema readers/writers map. will become redundant after esm tl rewrite" }], "u": { "Error": "An object containing a query error.", "InputFileLocation": "Defines the location of a file for download.", "InputPeer": "Peer", "InputUser": "Defines a user for subsequent interaction.", "InputContact": "Object defines a contact from the user's phone book.", "InputFile": "Defines a file uploaded by the client.", "InputMedia": "Defines media content of a message.", "InputChatPhoto": "Defines a new group profile photo.", "InputGeoPoint": "Defines a GeoPoint.", "InputPhoto": "Defines a photo for further interaction.", "Peer": "Identifier of a private chat, basic group, group or channel (see here » for more info).", "storage.FileType": "Object describes the file type.", "User": "Object defines a user.", "UserProfilePhoto": "Object contains info on the user's profile photo.", "UserStatus": "User online status", "Chat": "Object defines a group.", "ChatFull": "Full info about a channel, supergroup, gigagroup or basic group.", "ChatParticipant": "Details of a group member.", "ChatParticipants": "Object contains info on group members.", "ChatPhoto": "Object defines a group profile photo.", "Message": "Object describing a message.", "MessageMedia": "Media", "MessageAction": "Object describing actions connected to a service message.", "Dialog": "Chat info.", "Photo": "Object describes a photo.", "PhotoSize": "Location of a certain size of a picture", "GeoPoint": "Object defines a GeoPoint.", "auth.SentCode": "Contains info on a confirmation code message sent via SMS, phone call or Telegram.", "auth.Authorization": "Object contains info on user authorization.", "auth.ExportedAuthorization": "Exported authorization", "InputNotifyPeer": "Object defines the set of users and/or groups that generate notifications.", "InputPeerNotifySettings": "Notifications settings.", "PeerNotifySettings": "Notification settings.", "PeerSettings": "List of actions that are possible when interacting with this user, to be shown as suggested actions in the chat bar", "WallPaper": "Object contains info on a wallpaper.", "ReportReason": "Report reason", "UserFull": "Object contains extended user info.", "Contact": "A contact of the current user.", "ImportedContact": "Object contains info on a successfully imported contact.", "ContactStatus": "Contact status: online / offline.", "contacts.Contacts": "Info on the current user's contact list.", "contacts.ImportedContacts": "Object contains info on successfully imported contacts.", "contacts.Blocked": "Info on users from the current user's black list.", "messages.Dialogs": "Object contains a list of chats with messages and auxiliary data.", "messages.Messages": "Object contains information on list of messages with auxiliary data.", "messages.Chats": "Object contains list of chats with auxiliary data.", "messages.ChatFull": "Full info about a channel, supergroup, gigagroup or basic group.", "messages.AffectedHistory": "Object contains info on affected part of communication history with the user or in a chat.", "MessagesFilter": "Object describes message filter.", "Update": "Object contains info on events occurred.", "updates.State": "Object contains info on state for further updates.", "updates.Difference": "Occurred changes.", "Updates": "Object which is perceived by the client without a call on its part when an event occurs.", "photos.Photos": "Object contains list of photos with auxiliary data.", "photos.Photo": "Photo with auxiliary data.", "upload.File": "Contains info on file.", "DcOption": "Information for connection to data center.", "Config": "Object contains info on API configuring parameters.", "NearestDc": "Object contains info on nearest data center.", "help.AppUpdate": "Contains info on app update availability.", "help.InviteText": "Object contains info on the text of a message with an invitation.", "EncryptedChat": "Object contains info on an encrypted chat.", "InputEncryptedChat": "Object sets an encrypted chat ID.", "EncryptedFile": "Seta an encrypted file.", "InputEncryptedFile": "Object sets encrypted file for attachment", "EncryptedMessage": "Object contains encrypted message.", "messages.DhConfig": "Contains Diffie-Hellman key generation protocol parameters.", "messages.SentEncryptedMessage": "Contains info on message sent to an encrypted chat.", "InputDocument": "Defines a document for subsequent interaction.", "Document": "A document.", "help.Support": "Info about the support user, relevant to the current user.", "NotifyPeer": "Object defines the set of users and/or groups that generate notifications.", "SendMessageAction": "User actions. Use this to provide users with detailed info about their chat partner's actions: typing or sending attachments of all kinds.", "contacts.Found": "Object contains info on users found by name substring and auxiliary data.", "InputPrivacyKey": "Privacy keys together with privacy rules » indicate what can or can't someone do and are specified by a PrivacyKey constructor, and its input counterpart InputPrivacyKey.\n\nSee the privacy documentation » for more info.", "PrivacyKey": "Privacy keys together with privacy rules » indicate what can or can't someone do and are specified by a PrivacyKey constructor, and its input counterpart InputPrivacyKey.\n\nSee the privacy documentation » for more info.", "InputPrivacyRule": "Privacy rules indicate who can or can't do something and are specified by a PrivacyRule, and its input counterpart InputPrivacyRule.\n\nSee the privacy documentation » for more info.", "PrivacyRule": "Privacy rules together with privacy keys indicate what can or can't someone do and are specified by a PrivacyRule constructor, and its input counterpart InputPrivacyRule.\n\nSee the privacy documentation » for more info.", "account.PrivacyRules": "Privacy rules", "AccountDaysTTL": "Time-to-live of current account", "DocumentAttribute": "Various possible attributes of a document (used to define if it's a sticker, a GIF, a video, a mask sticker, an image, an audio, and so on)", "messages.Stickers": "Stickers", "StickerPack": "Stickerpack", "messages.AllStickers": "All stickers", "messages.AffectedMessages": "Messages affected by changes", "WebPage": "Instant View webpage preview", "Authorization": "Represents a logged-in session", "account.Authorizations": "Logged-in sessions", "account.Password": "Configuration for two-factor authorization", "account.PasswordSettings": "Private info associated to the password info (recovery email, telegram passport info & so on)", "account.PasswordInputSettings": "Constructor for setting up a new 2FA SRP password", "auth.PasswordRecovery": "Recovery info of a 2FA password, only for accounts with a recovery email configured.", "ReceivedNotifyMessage": "Confirmation of message receipt", "ExportedChatInvite": "Exported chat invite", "ChatInvite": "Chat invite", "InputStickerSet": "Represents a stickerset", "StickerSet": "Represents a stickerset (stickerpack)", "messages.StickerSet": "Stickerset", "BotCommand": "Describes a bot command that can be used in a chat", "BotInfo": "Info about bots (available bot commands, etc)", "KeyboardButton": "Bot or inline keyboard buttons", "KeyboardButtonRow": "Bot or inline keyboard rows", "ReplyMarkup": "Reply markup for bot and inline keyboards", "MessageEntity": "Message entities, representing styled text in a message", "InputChannel": "Represents a channel", "contacts.ResolvedPeer": "Peer returned after resolving a @username", "MessageRange": "Indicates a range of chat messages", "updates.ChannelDifference": "Contains the difference (new messages) between our local channel state and the remote state", "ChannelMessagesFilter": "Filter for fetching only certain types of channel messages", "ChannelParticipant": "Channel participant", "ChannelParticipantsFilter": "Filter for fetching channel participants", "channels.ChannelParticipants": "Channel/supergroup participants", "channels.ChannelParticipant": "Channel participant", "help.TermsOfService": "Contains info about the latest telegram Terms Of Service.", "messages.SavedGifs": "Saved GIFs", "InputBotInlineMessage": "Represents a sent inline message from the perspective of a bot", "InputBotInlineResult": "Inline bot result", "BotInlineMessage": "Inline message", "BotInlineResult": "Results of an inline query", "messages.BotResults": "Result of a query to an inline bot", "ExportedMessageLink": "HTTP link and embed info of channel message", "MessageFwdHeader": "Info about a forwarded message", "auth.CodeType": "Type of verification code that will be sent next if you call the resendCode method", "auth.SentCodeType": "Type of the verification code that was sent", "messages.BotCallbackAnswer": "Callback answer of bot", "messages.MessageEditData": "Message edit data for media", "InputBotInlineMessageID": "Represents a sent inline message from the perspective of a bot", "InlineBotSwitchPM": "The bot requested the user to message them in private", "messages.PeerDialogs": "List of dialogs", "TopPeer": "Top peer", "TopPeerCategory": "Top peer category", "TopPeerCategoryPeers": "Top peers by top peer category", "contacts.TopPeers": "Top peers", "DraftMessage": "Represents a message draft.", "messages.FeaturedStickers": "Featured stickers", "messages.RecentStickers": "Recent stickers", "messages.ArchivedStickers": "Archived stickers", "messages.StickerSetInstallResult": "Result of stickerset installation process", "StickerSetCovered": "Stickerset preview", "MaskCoords": "Mask coordinates (if this is a mask sticker, attached to a photo)", "InputStickeredMedia": "Represents a media with attached stickers", "Game": "Indicates an already sent game", "InputGame": "A game to send", "HighScore": "Game high score", "messages.HighScores": "High scores (in games)", "RichText": "Rich text", "PageBlock": "Represents an instant view page element", "PhoneCallDiscardReason": "Why was the phone call discarded?", "DataJSON": "Represent a JSON-encoded object", "LabeledPrice": "Labeled pricetag", "Invoice": "Invoice", "PaymentCharge": "Charged payment", "PostAddress": "Shipping address", "PaymentRequestedInfo": "Requested payment info", "PaymentSavedCredentials": "Saved payment credentials", "WebDocument": "Remote document", "InputWebDocument": "Specifies a document that will have to be downloaded from the URL by the telegram servers", "InputWebFileLocation": "Location of remote file", "upload.WebFile": "Remote file", "payments.PaymentForm": "Payment form", "payments.ValidatedRequestedInfo": "Validated requested info", "payments.PaymentResult": "Payment result", "payments.PaymentReceipt": "Payment receipt", "payments.SavedInfo": "Saved payment info", "InputPaymentCredentials": "Payment credentials", "account.TmpPassword": "Temporary password", "ShippingOption": "Shipping options", "InputStickerSetItem": "Sticker", "InputPhoneCall": "Phone call", "PhoneCall": "Phone call", "PhoneConnection": "Phone call connection", "PhoneCallProtocol": "Phone call protocol", "phone.PhoneCall": "Phone call", "upload.CdnFile": "Represents the download status of a CDN file", "CdnPublicKey": "Public key to use only during handshakes to CDN DCs.", "CdnConfig": "Configuration for CDN file downloads.", "LangPackString": "Language pack string", "LangPackDifference": "Language pack changes", "LangPackLanguage": "Language pack language", "ChannelAdminLogEventAction": "Channel admin log event", "ChannelAdminLogEvent": "An event in a channel admin log", "channels.AdminLogResults": "Admin log events", "ChannelAdminLogEventsFilter": "Filter for fetching events in the channel admin log", "PopularContact": "Popular contact", "messages.FavedStickers": "Favorited stickers", "RecentMeUrl": "Recent t.me urls", "help.RecentMeUrls": "Recent t.me URLs", "InputSingleMedia": "A single media in an album or grouped media sent with {@link messages.RawSendMultiMediaRequest}.", "WebAuthorization": "Web authorization", "account.WebAuthorizations": "Web authorizations", "InputMessage": "A message", "InputDialogPeer": "Peer, or all peers in a certain folder", "DialogPeer": "Peer, or all peers in a folder", "messages.FoundStickerSets": "Found stickersets", "FileHash": "Hash of an uploaded file, to be checked for validity after download", "InputClientProxy": "Info about an MTProxy used to connect.", "help.TermsOfServiceUpdate": "Update of Telegram's terms of service", "InputSecureFile": "Secure passport file, for more info see the passport docs »", "SecureFile": "Secure passport file, for more info see the passport docs »", "SecureData": "Secure passport data, for more info see the passport docs »", "SecurePlainData": "Plaintext verified passport data.", "SecureValueType": "Secure value type", "SecureValue": "Secure Telegram Passport value", "InputSecureValue": "Secure value, for more info see the passport docs »", "SecureValueHash": "Secure value hash", "SecureValueError": "Secure value error", "SecureCredentialsEncrypted": "Encrypted secure credentials", "account.AuthorizationForm": "Authorization form", "account.SentEmailCode": "The email code that was sent", "help.DeepLinkInfo": "Contains information about an unsupported deep link »", "SavedContact": "Saved contact", "account.Takeout": "Takeout info", "PasswordKdfAlgo": "Key derivation function to use when generating the password hash for SRP two-factor authorization", "SecurePasswordKdfAlgo": "KDF algorithm to use for computing telegram passport hash", "SecureSecretSettings": "Telegram passport settings", "InputCheckPasswordSRP": "Constructors for checking the validity of a 2FA SRP password.\n\nSee here » for more info on the 2FA authentication flow for methods that require it, before and after login.", "SecureRequiredType": "Required secure file type", "help.PassportConfig": "Telegram passport configuration", "InputAppEvent": "Object contains info about an event that occurred in the application.", "JSONObjectValue": "JSON key: value pair", "JSONValue": "JSON value", "PageTableCell": "Represents a table in an instant view table", "PageTableRow": "Table row", "PageCaption": "Page caption", "PageListItem": "Item in block list", "PageListOrderedItem": "Represents an instant view ordered list", "PageRelatedArticle": "Related articles", "Page": "Instant view page", "help.SupportName": "Get localized name for support user", "help.UserInfo": "User info", "PollAnswer": "Indicates a possible answer to a poll.", "Poll": "Indicates a poll message", "PollAnswerVoters": "How users voted on a certain poll answer", "PollResults": "Results of poll", "ChatOnlines": "Number of online users in a chat", "StatsURL": "URL with chat statistics", "ChatAdminRights": "Represents the rights of an admin in a channel/supergroup.", "ChatBannedRights": "Represents the rights of a normal user in a supergroup/channel/chat.", "InputWallPaper": "Wallpaper", "account.WallPapers": "Wallpapers", "CodeSettings": "Settings for the code type to send", "WallPaperSettings": "Wallpaper rendering information.", "AutoDownloadSettings": "Media autodownload settings", "account.AutoDownloadSettings": "Media autodownload settings", "EmojiKeyword": "Emoji keyword", "EmojiKeywordsDifference": "New emoji keywords", "EmojiURL": "Emoji URL", "EmojiLanguage": "Emoji language", "Folder": "A folder", "InputFolderPeer": "Peer in a folder", "FolderPeer": "Peer associated to folder", "messages.SearchCounter": "Number of results that would be returned by a search", "UrlAuthResult": "URL authorization result", "ChannelLocation": "Geographical location of supergroup (geogroups)", "PeerLocated": "Geolocated peer", "RestrictionReason": "Restriction reason", "InputTheme": "Cloud theme", "Theme": "Cloud theme", "account.Themes": "Installed themes", "auth.LoginToken": "Login token (for QR code login)", "account.ContentSettings": "Sensitive content settings", "messages.InactiveChats": "Inactive chat list", "BaseTheme": "Basic theme settings", "InputThemeSettings": "Theme settings", "ThemeSettings": "Theme settings", "WebPageAttribute": "Webpage attributes", "messages.VotesList": "How users voted in a poll", "BankCardOpenUrl": "Credit card info URL provided by the bank", "payments.BankCardData": "Credit card info, provided by the card's bank(s)", "DialogFilter": "Dialog filter (folder »)", "DialogFilterSuggested": "Suggested dialog filters (folder »)", "StatsDateRangeDays": "Channel statistics date range", "StatsAbsValueAndPrev": "Channel statistics value pair", "StatsPercentValue": "Channel statistics percentage", "StatsGraph": "Channel statistics graph", "stats.BroadcastStats": "Channel statistics", "help.PromoData": "Info about pinned MTProxy or Public Service Announcement peers.", "VideoSize": "Represents an animated video thumbnail", "StatsGroupTopPoster": "Most active user in a supergroup", "StatsGroupTopAdmin": "Most active admin in a supergroup", "StatsGroupTopInviter": "Most active inviter in a supergroup", "stats.MegagroupStats": "Supergroup statistics", "GlobalPrivacySettings": "Global privacy settings", "help.CountryCode": "Country code and phone number pattern of a specific country", "help.Country": "Name, ISO code, localized name and phone codes/patterns of a specific country", "help.CountriesList": "Name, ISO code, localized name and phone codes/patterns of all available countries", "MessageViews": "View, forward counter + info about replies of a specific message", "messages.MessageViews": "View, forward counter + info about replies", "messages.DiscussionMessage": "Info about a message thread", "MessageReplyHeader": "Reply information", "MessageReplies": "Info about post comments (for channels) or message replies (for groups)", "PeerBlocked": "Info about a blocked user", "stats.MessageStats": "Message statistics", "GroupCall": "A group call", "InputGroupCall": "Indicates a group call", "GroupCallParticipant": "Info about a group call participant", "phone.GroupCall": "Contains info about a group call, and partial info about its participants.", "phone.GroupParticipants": "Info about the participants of a group call or livestream", "InlineQueryPeerType": "Inline query peer type.", "messages.HistoryImport": "Identifier of a history import session, click here for more info ».", "messages.HistoryImportParsed": "Contains information about a chat export file, generated by a foreign chat app.", "messages.AffectedFoundMessages": "Messages found and affected by changes", "ChatInviteImporter": "When and which user joined the chat using a chat invite", "messages.ExportedChatInvites": "Info about chat invites exported by a certain admin.", "messages.ExportedChatInvite": "Contains info about a chat invite, and eventually a pointer to the newest chat invite.", "messages.ChatInviteImporters": "List of users that imported a chat invitation link.", "ChatAdminWithInvites": "Info about chat invites generated by admins.", "messages.ChatAdminsWithInvites": "Info about chat invites generated by admins.", "messages.CheckedHistoryImportPeer": "Contains a confirmation text to be shown to the user, upon importing chat history, click here for more info ».", "phone.JoinAsPeers": "A list of peers that can be used to join a group call, presenting yourself as a specific user/channel.", "phone.ExportedGroupCallInvite": "An exported group call invitation.", "GroupCallParticipantVideoSourceGroup": "Describes a group of video synchronization source identifiers", "GroupCallParticipantVideo": "Info about a video stream", "stickers.SuggestedShortName": "A suggested short name for the specified stickerpack", "BotCommandScope": "Represents a scope where the bot commands, specified using {@link bots.RawSetBotCommandsRequest} will be valid.", "account.ResetPasswordResult": "Result of an {@link account.RawResetPasswordRequest} request.", "SponsoredMessage": "A sponsored message", "messages.SponsoredMessages": "A set of sponsored messages associated with a channel", "SearchResultsCalendarPeriod": "Information about found messages sent on a specific day, used to split the messages in {@link messages.RawSearchResultsCalendar} constructors by days.", "messages.SearchResultsCalendar": "Information about found messages sent on a specific day", "SearchResultsPosition": "Information about a message in a specific position", "messages.SearchResultsPositions": "Information about sparse positions of messages", "channels.SendAsPeers": "A list of peers that can be used to send messages in a specific group", "users.UserFull": "Full user information, with attached context peers for reactions", "messages.PeerSettings": "Peer settings", "auth.LoggedOut": "Future auth token » to be used on subsequent authorizations", "ReactionCount": "Number of users that reacted with a certain emoji", "MessageReactions": "Message reactions »", "messages.MessageReactionsList": "List of peers that reacted to a specific message", "AvailableReaction": "Animations associated with a message reaction", "messages.AvailableReactions": "Animations and metadata associated with message reactions »", "MessagePeerReaction": "How a certain peer reacted to the message", "GroupCallStreamChannel": "Info about an RTMP stream in a group call or livestream", "phone.GroupCallStreamChannels": "Info about RTMP streams in a group call or livestream", "phone.GroupCallStreamRtmpUrl": "RTMP URL and stream key to be used in streaming software", "AttachMenuBotIconColor": "Represents an attachment menu icon color for bot mini apps »", "AttachMenuBotIcon": "Represents an attachment menu icon for bot mini apps »", "AttachMenuBot": "Represents a bot mini app that can be launched from the attachment menu »", "AttachMenuBots": "Represents a list of bot mini apps that can be launched from the attachment menu »", "AttachMenuBotsBot": "Represents a bot mini app that can be launched from the attachment menu »", "WebViewResult": "Contains the webview URL with appropriate theme and user info parameters added", "WebViewMessageSent": "Contains information about an inline message sent by a Web App on behalf of a user.", "BotMenuButton": "Indicates the action to execute when pressing the in-UI menu button for bots", "account.SavedRingtones": "Contains a list of saved notification sounds", "NotificationSound": "Represents a notification sound", "account.SavedRingtone": "Contains information about a saved notification sound", "AttachMenuPeerType": "Indicates a supported peer type for a bot mini app attachment menu", "InputInvoice": "An invoice", "payments.ExportedInvoice": "Exported invoice", "messages.TranscribedAudio": "Transcribed text from a voice message", "help.PremiumPromo": "Telegram Premium promotion information", "InputStorePaymentPurpose": "Info about a Telegram Premium purchase", "PremiumGiftOption": "Telegram Premium gift option", "PaymentFormMethod": "Represents a payment method", "EmojiStatus": "Emoji status", "account.EmojiStatuses": "A list of emoji statuses", "Reaction": "Message reaction", "ChatReactions": "Available chat reactions", "messages.Reactions": "A set of message reactions", "EmailVerifyPurpose": "Email verification purpose", "EmailVerification": "Email verification code or token", "account.EmailVerified": "Email verification status", "PremiumSubscriptionOption": "Telegram Premium subscription option", "SendAsPeer": "Indicates a peer that can be used to send messages", "MessageExtendedMedia": "Paid media, see here » for more info.", "StickerKeyword": "Keywords for a certain sticker", "Username": "Contains information about a username", "ForumTopic": "Contains information about a forum topic", "messages.ForumTopics": "Contains information about multiple forum topics", "DefaultHistoryTTL": "Contains info about the default value of the Time-To-Live setting, applied to all new chats.", "ExportedContactToken": "Describes a temporary profile link.", "RequestPeerType": "Filtering criteria to use for the peer selection list shown to the user.", "EmojiList": "Represents a list of custom emojis.", "EmojiGroup": "Represents an emoji category.", "messages.EmojiGroups": "Represents a list of emoji categories.", "TextWithEntities": "Styled text with message entities", "messages.TranslatedText": "Translated text with entities.", "AutoSaveSettings": "Media autosave settings", "AutoSaveException": "Peer-specific autosave settings", "account.AutoSaveSettings": "Contains media autosave settings", "help.AppConfig": "Contains various client configuration parameters", "InputBotApp": "Used to fetch information about a direct link Mini App", "BotApp": "Contains information about a direct link Mini App.", "messages.BotApp": "Contains information about a direct link Mini App", "InlineBotWebView": "Specifies an inline mode mini app button, shown on top of the inline query results list.", "ReadParticipantDate": "Contains info about when a certain participant has read a message", "InputChatlist": "Represents a folder", "ExportedChatlistInvite": "An exported chat folder deep link ».", "chatlists.ExportedChatlistInvite": "Exported chat folder deep link ».", "chatlists.ExportedInvites": "A list of exported chat folder deep links ».", "chatlists.ChatlistInvite": "Info about a chat folder deep link ».", "chatlists.ChatlistUpdates": "Updated info about a chat folder deep link ».", "bots.BotInfo": "Localized name, about text and description of a bot.", "MessagePeerVote": "How a user voted in a poll", "StoryViews": "Aggregated view and reaction information of a story", "StoryItem": "Represents a Telegram Story", "stories.AllStories": "Full list of active (or active and hidden) stories.", "stories.Stories": "List of stories", "StoryView": "Story view date and reaction information", "stories.StoryViewsList": "Reaction and view counters for a story", "stories.StoryViews": "Reaction and view counters for a list of stories", "InputReplyTo": "Contains info about a message or story to reply to.", "ExportedStoryLink": "Represents a story deep link", "StoriesStealthMode": "Story stealth mode status", "MediaAreaCoordinates": "Coordinates and size of a clicable rectangular area on top of a story.", "MediaArea": "Represents a story media area »", "PeerStories": "Stories associated to a peer", "stories.PeerStories": "Active story list of a specific peer.", "messages.WebPage": "Contains an instant view webpage.", "PremiumGiftCodeOption": "Giveaway option.", "payments.CheckedGiftCode": "Info about a Telegram Premium Giftcode.", "payments.GiveawayInfo": "Info about a Telegram Premium Giveaway.", "PrepaidGiveaway": "Contains info about a prepaid giveaway ».", "Boost": "Info about one or more boosts applied by a specific user.", "premium.BoostsList": "List of boosts that were applied to a peer by multiple users.", "MyBoost": "Contains information about a single boost slot ».", "premium.MyBoosts": "A list of peers we are currently boosting, and how many boost slots we have left.", "premium.BoostsStatus": "Contains info about the current boost status of a peer.", "StoryFwdHeader": "Contains info about the original poster of a reposted story.", "PostInteractionCounters": "Interaction counters", "stats.StoryStats": "Contains statistics about a story.", "PublicForward": "Contains info about the forwards of a story as a message to public chats and reposts by public channels.", "stats.PublicForwards": "Contains info about the forwards of a story as a message to public chats and reposts by public channels.", "PeerColor": "Represents a color palette ».", "help.PeerColorSet": "Contains info about a color palette ».", "help.PeerColorOption": "Contains info about a color palette ».", "help.PeerColors": "Contains info about multiple color palettes ».", "StoryReaction": "How a certain peer reacted to or interacted with a story", "stories.StoryReactionsList": "List of peers that reacted to a specific story", "SavedDialog": "Represents a saved message dialog ».", "messages.SavedDialogs": "Represents some saved message dialogs ».", "SavedReactionTag": "Info about a saved message reaction tag ».", "messages.SavedReactionTags": "List of reaction tag » names assigned by the user.", "OutboxReadDate": "Exact read date of a private message we sent to another user.", "smsjobs.EligibilityToJoin": "SMS jobs eligibility", "smsjobs.Status": "Status", "SmsJob": "Info about an SMS job.", "BusinessWeeklyOpen": "A time interval, indicating the opening hours of a Telegram Business.", "BusinessWorkHours": "Specifies a set of Telegram Business opening hours.", "BusinessLocation": "Represents the location of a Telegram Business ».", "InputBusinessRecipients": "Specifies the chats that can receive Telegram Business away » and greeting » messages.\n\nIf exclude_selected is set, specifies all chats that cannot receive Telegram Business away » and greeting » messages.", "BusinessRecipients": "Specifies the chats that can receive Telegram Business away » and greeting » messages.", "BusinessAwayMessageSchedule": "Specifies when should the Telegram Business away messages be sent.", "InputBusinessGreetingMessage": "Describes a Telegram Business greeting, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period.", "BusinessGreetingMessage": "Describes a Telegram Business greeting, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period.", "InputBusinessAwayMessage": "Describes a Telegram Business away message, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user.", "BusinessAwayMessage": "Describes a Telegram Business away message, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user.", "Timezone": "Timezone information.", "help.TimezonesList": "Timezone information that may be used elsewhere in the API, such as to set Telegram Business opening hours ».", "QuickReply": "A quick reply shortcut.", "InputQuickReplyShortcut": "Represents a quick reply shortcut ».", "messages.QuickReplies": "Info about quick reply shortcuts ».", "ConnectedBot": "Contains info about a connected business bot ».", "account.ConnectedBots": "Info about currently connected business bots.", "messages.DialogFilters": "Folder information", "Birthday": "Birthday information for a user.", "BotBusinessConnection": "Contains info about a bot business connection.", "InputBusinessIntro": "Telegram Business introduction ».", "BusinessIntro": "Telegram Business introduction ».", "messages.MyStickers": "The list of stickersets owned by the current account ».", "InputCollectible": "Represents a Fragment collectible ».", "fragment.CollectibleInfo": "Info about a fragment collectible.", "InputBusinessBotRecipients": "Specifies the private chats that a connected business bot » may interact with.", "BusinessBotRecipients": "Specifies the private chats that a connected business bot » may receive messages and interact with.", "ContactBirthday": "Birthday information of a contact.", "contacts.ContactBirthdays": "Birthday information of our contacts.", "MissingInvitee": "Info about why a specific user could not be invited ».", "messages.InvitedUsers": "Contains info about successfully or unsuccessfully invited » users.", "InputBusinessChatLink": "Contains info about a business chat deep link » to be created by the current account.", "BusinessChatLink": "Contains info about a business chat deep link » created by the current account.", "account.BusinessChatLinks": "Contains info about business chat deep links » created by the current account.", "account.ResolvedBusinessChatLinks": "Contains info about a single resolved business chat deep link ».", "RequestedPeer": "Info about a peer, shared by a user with the currently logged in bot using {@link messages.RawSendBotRequestedPeerRequest}.", "SponsoredMessageReportOption": "A report option for a sponsored message ».", "channels.SponsoredMessageReportResult": "Status of the method call used to report a sponsored message ».", "stats.BroadcastRevenueStats": "Channel revenue ad statistics, see here » for more info.", "stats.BroadcastRevenueWithdrawalUrl": "Contains the URL to use to withdraw channel ad revenue.", "BroadcastRevenueTransaction": "A channel ad revenue » transaction.", "stats.BroadcastRevenueTransactions": "Channel ad revenue transactions ».", "ReactionNotificationsFrom": "Reaction notification settings", "ReactionsNotifySettings": "Reaction notification settings, see here » for more info.", "BroadcastRevenueBalances": "Channel ad revenue balance » information.", "AvailableEffect": "Describes a message effect ».", "messages.AvailableEffects": "Full list of usable animated message effects ».", "FactCheck": "Represents a fact-check » created by an independent fact-checker.", "StarsTransactionPeer": "Source of an incoming Telegram Star transaction, or its recipient for outgoing Telegram Star transactions.", "StarsTopupOption": "Telegram Stars topup option.", "StarsTransaction": "Represents a Telegram Stars transaction ».", "payments.StarsStatus": "Info about the current Telegram Star balance and transaction history ».", "FoundStory": "A story found using global story search ».", "stories.FoundStories": "Stories found using global story search ».", "GeoPointAddress": "Address optionally associated to a {@link RawGeoPoint}.", "StarsRevenueStatus": "Describes Telegram Star revenue balances ».", "payments.StarsRevenueStats": "Star revenue statistics, see here » for more info.\n\nNote that all balances and currency amounts and graph values are in Stars.", "payments.StarsRevenueWithdrawalUrl": "Contains the URL to use to withdraw Telegram Star revenue.", "payments.StarsRevenueAdsAccountUrl": "Contains a URL leading to a page where the user will be able to place ads for the channel/bot, paying using Telegram Stars.", "InputStarsTransaction": "Used to fetch info about a Telegram Star transaction ».", "StarsGiftOption": "Telegram Stars gift option.", "bots.PopularAppBots": "Popular Main Mini Apps, to be used in the apps tab of global search ».", "BotPreviewMedia": "Represents a Main Mini App preview media, see here » for more info.", "bots.PreviewInfo": "Contains info about Main Mini App previews, see here » for more info.", "SimpleWebViewResult": "Contains the webview URL with appropriate theme parameters added", "AppWebViewResult": "Contains the link that must be used to open a direct link Mini App.", "SponsoredWebPage": "Represents a sponsored website." } } diff --git a/packages/tl/app-config.json b/packages/tl/app-config.json index 2a408625..3860ee5c 100644 --- a/packages/tl/app-config.json +++ b/packages/tl/app-config.json @@ -1 +1 @@ -{"emojies_animated_zoom":{"type":"number","description":"/**\n * Animated\n * emojis and\n * animated\n * dice should be scaled by this factor before being shown\n * to the user (float)\n */"},"keep_alive_service":{"type":"boolean","description":"/**\n * Whether app clients should start a keepalive service to keep\n * the app running and fetch updates even when the app is\n * closed (boolean)\n */"},"background_connection":{"type":"boolean","description":"/**\n * Whether app clients should start a background TCP connection\n * for MTProto update fetching (boolean)\n */"},"emojies_send_dice":{"type":"string[]","description":"/**\n * A list of supported\n * animated\n * dice stickers (array of strings).\n */"},"emojies_send_dice_success":{"type":"Record","description":"/**\n * For\n * animated\n * dice emojis other than the basic \"🎲\", indicates the winning dice value and\n * the final frame of the animated sticker, at which to show\n * the fireworks \"🎆\" (object with emoji keys and object\n * values, containing value and\n * frame_start float values)\n */"},"emojies_sounds":{"type":"Record","description":"/**\n * A map of soundbites to be played when the user clicks on the\n * specified\n * animated\n * emoji; the\n * file\n * reference field should be base64-decoded before\n * downloading\n * the file (map of\n * file\n * IDs ({@link RawInputDocument}.id), with emoji string\n * keys)\n */"},"gif_search_branding":{"type":"string","description":"/**\n * Specifies the name of the service providing GIF search\n * through\n * gif_search_username\n * (string)\n */"},"gif_search_emojies":{"type":"string[]","description":"/**\n * Specifies a list of emojis that should be suggested as\n * search term in a bar above the GIF search box (array of\n * string emojis)\n */"},"stickers_emoji_suggest_only_api":{"type":"boolean","description":"/**\n * Specifies that the app should not display\n * local\n * sticker suggestions » for emojis at all and just use the\n * result of {@link messages.RawGetStickersRequest} (bool)\n */"},"stickers_emoji_cache_time":{"type":"number","description":"/**\n * Specifies the validity period of the local cache of\n * {@link messages.RawGetStickersRequest}, also relevant when\n * generating the\n * pagination\n * hash when invoking the method. (integer)\n */"},"qr_login_camera":{"type":"boolean","description":"/**\n * Whether the Settings->Devices menu should show an option\n * to scan a\n * QR\n * login code (boolean)\n */"},"qr_login_code":{"type":"\"disabled\" | \"primary\" | \"secondary\"","description":"/**\n * Whether the login screen should show a\n * QR code\n * login option, possibly as default login method (string,\n * \"disabled\", \"primary\" or \"secondary\")\n */"},"dialog_filters_enabled":{"type":"boolean","description":"/**\n * Whether clients should show an option for managing\n * dialog\n * filters AKA folders (boolean)\n */"},"dialog_filters_tooltip":{"type":"boolean","description":"/**\n * Whether clients should actively show a tooltip, inviting the\n * user to configure\n * dialog\n * filters AKA folders; typically this happens when the\n * chat list is long enough to start getting cluttered.\n * (boolean)\n */"},"autoarchive_setting_available":{"type":"boolean","description":"/**\n * Whether clients can invoke\n * {@link account.RawSetGlobalPrivacySettingsRequest} with\n * {@link RawGlobalPrivacySettings}, to automatically archive\n * and mute new incoming chats from non-contacts. (boolean)\n */"},"pending_suggestions":{"type":"string[]","description":"/**\n * Contains a list of suggestions that should be actively shown\n * as a tooltip to the user. (Array of strings, possible values\n * shown in the suggestions section\n * ». \n */"},"topics_pinned_limit":{"type":"number","description":"/**\n * Maximum number of\n * topics\n * that can be pinned in a single\n * forum.\n * (integer)\n */"},"telegram_antispam_user_id":{"type":"string","description":"/**\n * The ID of the official\n * native\n * antispam bot, that will automatically delete spam\n * messages if enabled as specified in the\n * native\n * antispam documentation ».\n * \n * \n * When fetching the admin list of a supergroup using\n * {@link channels.RawGetParticipantsRequest}, if native\n * antispam functionality in the specified supergroup, the bot\n * should be manually added to the admin list displayed to the\n * user. (numeric string that represents a Telegram user/bot\n * ID, should be casted to an int64)\n */"},"telegram_antispam_group_size_min":{"type":"number","description":"/**\n * Minimum number of group members required to enable\n * native\n * antispam functionality. (integer)\n */"},"fragment_prefixes":{"type":"string[]","description":"/**\n * List of phone number prefixes for anonymous\n * Fragment phone numbers.\n * (array of strings).\n */"},"hidden_members_group_size_min":{"type":"number","description":"/**\n * Minimum number of participants required to hide the\n * participants list of a supergroup using\n * {@link channels.RawToggleParticipantsHiddenRequest}.\n * (integer)\n */"},"url_auth_domains":{"type":"string[]","description":"/**\n * A list of domains that support automatic login with manual\n * user confirmation,\n * click\n * here for more info on URL authorization ». (array of\n * strings)\n */"},"autologin_domains":{"type":"string[]","description":"/**\n * A list of Telegram domains that support automatic login with\n * no user confirmation,\n * click\n * here for more info on URL authorization ». (array of\n * strings)\n */"},"whitelisted_domains":{"type":"string[]","description":"/**\n * A list of Telegram domains that can always be opened without\n * additional user confirmation, when clicking on in-app links\n * where the URL is not fully displayed (i.e.\n * {@link RawMessageEntityTextUrl} entities). (array of\n * strings)Note that when opening\n * named\n * Mini App links for the first time, confirmation should\n * still be requested from the user, even if the domain of the\n * containing deep link is whitelisted (i.e.\n * t.me/<bot_username>/<short_name>?startapp=<start_parameter>,\n * where t.me is whitelisted). Confirmation\n * should always be asked, even if we already\n * opened the\n * named\n * Mini App before, if the link is not visible (i.e.\n * {@link RawMessageEntityTextUrl} text links, inline buttons\n * etc.). \n */"},"round_video_encoding":{"type":"{\n diameter: number\n video_bitrate: number\n audio_bitrate: number\n max_size: number\n}","description":"/**\n * Contains a set of recommended codec parameters for round\n * videos. (object, as described in the example)\n */"},"chat_read_mark_size_threshold":{"type":"number","description":"/**\n * Per-user read receipts, fetchable using\n * {@link messages.RawGetMessageReadParticipantsRequest}, will\n * be available in groups with an amount of participants less\n * or equal to chat_read_mark_size_threshold.\n * (integer)\n */"},"chat_read_mark_expire_period":{"type":"number","description":"/**\n * To protect user privacy, read receipts for chats are only\n * stored for chat_read_mark_expire_period seconds\n * after the message was sent. (integer)\n */"},"pm_read_date_expire_period":{"type":"number","description":"/**\n * To protect user privacy, read receipts for private chats are\n * only stored for pm_read_date_expire_period\n * seconds after the message was sent. (integer)\n */"},"groupcall_video_participants_max":{"type":"number","description":"/**\n * Maximum number of participants in a group call (livestreams\n * allow ∞ participants) (integer)\n */"},"reactions_uniq_max":{"type":"number","description":"/**\n * Maximum number of unique reactions for any given message:\n * for example, if there are 2000 \"👍\" and 1000 custom emoji reactions and\n * reactions_uniq_max = 2, you can't add a \"👎\" reaction, because that would raise the\n * number of unique reactions to 3 > 2. (integer)\n */"},"reactions_in_chat_max":{"type":"number","description":"/**\n * Maximum number of reactions that can be marked as allowed in\n * a chat using {@link RawChatReactionsSome}. (integer)\n */"},"reactions_user_max_default":{"type":"number","description":"/**\n * Maximum number of reactions that can be added to a single\n * message by a non-Premium user. (integer)\n */"},"reactions_user_max_premium":{"type":"number","description":"/**\n * Maximum number of reactions that can be added to a single\n * message by a Premium user. (integer)\n */"},"default_emoji_statuses_stickerset_id":{"type":"number","description":"/**\n * Default emoji status stickerset ID. (integer)\n * \n * \n * Note that the stickerset can be fetched using\n * {@link RawInputStickerSetEmojiDefaultStatuses}. \n */"},"ringtone_duration_max":{"type":"number","description":"/**\n * The maximum duration in seconds of\n * uploadable\n * notification sounds » (integer)\n */"},"ringtone_size_max":{"type":"number","description":"/**\n * The maximum post-conversion size in bytes of\n * uploadable\n * notification sounds »\n */"},"ringtone_saved_count_max":{"type":"number","description":"/**\n * The maximum number of\n * saveable\n * notification sounds »\n */"},"message_animated_emoji_max":{"type":"number","description":"/**\n * The maximum number of\n * custom\n * emojis that may be present in a message. (integer)\n */"},"stickers_premium_by_emoji_num":{"type":"number","description":"/**\n * Defines how many\n * Premium\n * stickers to show in the sticker suggestion popup when\n * entering an emoji into the text field, see the\n * sticker\n * docs for more info (integer, defaults to 0)\n */"},"stickers_normal_by_emoji_per_premium_num":{"type":"number","description":"/**\n * For\n * Premium\n * users, used to define the suggested sticker list, see\n * the\n * sticker\n * docs for more info (integer, defaults to 2)\n */"},"premium_purchase_blocked":{"type":"boolean","description":"/**\n * The user can't purchase\n * Telegram\n * Premium. The app must also hide all Premium features,\n * including stars for other users, et cetera. (boolean)\n */"},"channels_limit_default":{"type":"number","description":"/**\n * The maximum number of\n * channels\n * and supergroups a\n * non-Premium\n * user may join (integer)\n */"},"channels_limit_premium":{"type":"number","description":"/**\n * The maximum number of\n * channels\n * and supergroups a\n * Premium\n * user may join (integer)\n */"},"saved_gifs_limit_default":{"type":"number","description":"/**\n * The maximum number of GIFs a\n * non-Premium\n * user may save (integer)\n */"},"saved_gifs_limit_premium":{"type":"number","description":"/**\n * The maximum number of GIFs a\n * Premium\n * user may save (integer)\n */"},"stickers_faved_limit_default":{"type":"number","description":"/**\n * The maximum number of stickers a\n * non-Premium\n * user may\n * add\n * to Favorites » (integer)\n */"},"stickers_faved_limit_premium":{"type":"number","description":"/**\n * The maximum number of stickers a\n * Premium\n * user may\n * add\n * to Favorites » (integer)\n */"},"dialog_filters_limit_default":{"type":"number","description":"/**\n * The maximum number of\n * folders\n * a\n * non-Premium\n * user may create (integer)\n */"},"dialog_filters_limit_premium":{"type":"number","description":"/**\n * The maximum number of\n * folders\n * a\n * Premium\n * user may create (integer)\n */"},"dialog_filters_chats_limit_default":{"type":"number","description":"/**\n * The maximum number of chats a\n * non-Premium\n * user may add to a\n * folder\n * (integer)\n */"},"dialog_filters_chats_limit_premium":{"type":"number","description":"/**\n * The maximum number of chats a\n * Premium\n * user may add to a\n * folder\n * (integer)\n */"},"dialogs_pinned_limit_default":{"type":"number","description":"/**\n * The maximum number of chats a\n * non-Premium\n * user may pin (integer)\n */"},"dialogs_pinned_limit_premium":{"type":"number","description":"/**\n * The maximum number of chats a\n * Premium\n * user may pin (integer)\n */"},"dialogs_folder_pinned_limit_default":{"type":"number","description":"/**\n * The maximum number of chats a\n * non-Premium\n * user may pin in a folder (integer)\n */"},"dialogs_folder_pinned_limit_premium":{"type":"number","description":"/**\n * The maximum number of chats a\n * Premium\n * user may pin in a folder (integer)\n */"},"channels_public_limit_default":{"type":"number","description":"/**\n * The maximum number of public\n * channels\n * or supergroups a\n * non-Premium\n * user may create (integer)\n */"},"channels_public_limit_premium":{"type":"number","description":"/**\n * The maximum number of public\n * channels\n * or supergroups a\n * Premium\n * user may create (integer)\n */"},"caption_length_limit_default":{"type":"number","description":"/**\n * The maximum UTF-8 length of media captions sendable by\n * non-Premium\n * users (integer)\n */"},"caption_length_limit_premium":{"type":"number","description":"/**\n * The maximum UTF-8 length of media captions sendable by\n * Premium\n * users (integer)\n */"},"upload_max_fileparts_default":{"type":"number","description":"/**\n * The maximum number of file parts uploadable by\n * non-Premium\n * users (integer, the maximum file size can be extrapolated by\n * multiplying this value by 524288, the biggest\n * possible chunk size)\n */"},"upload_max_fileparts_premium":{"type":"number","description":"/**\n * The maximum number of file parts uploadable by\n * Premium\n * users (integer, the maximum file size can be extrapolated by\n * multiplying this value by 524288, the biggest\n * possible chunk size)\n */"},"about_length_limit_default":{"type":"number","description":"/**\n * The maximum UTF-8 length of bios of\n * non-Premium\n * users (integer)\n */"},"about_length_limit_premium":{"type":"number","description":"/**\n * The maximum UTF-8 length of bios of\n * Premium\n * users (integer)\n */"},"premium_promo_order":{"type":"string[]","description":"/**\n * Array of string identifiers, indicating the order of\n * Telegram\n * Premium features in the Telegram Premium promotion\n * popup,\n * see\n * here for the possible values »\n */"},"premium_bot_username":{"type":"string","description":"/**\n * Contains the username of the official\n * Telegram\n * Premium bot that may be used to buy a\n * Telegram\n * Premium subscription, see\n * here for\n * detailed instructions » (string)\n */"},"premium_invoice_slug":{"type":"string","description":"/**\n * Contains an\n * invoice\n * slug that may be used to buy a\n * Telegram\n * Premium subscription, see\n * here for\n * detailed instructions » (string)\n */"},"premium_gift_attach_menu_icon":{"type":"boolean","description":"/**\n * Whether a gift icon should be shown in the attachment menu\n * in private chats with users, offering the current user to\n * gift a\n * Telegram\n * Premium subscription to the other user in the chat.\n * (boolean)\n */"},"premium_gift_text_field_icon":{"type":"boolean","description":"/**\n * Whether a gift icon should be shown in the text bar in\n * private chats with users (ie like the / icon in\n * chats with bots), offering the current user to gift a\n * Telegram\n * Premium subscription to the other user in the chat. Can\n * only be true if premium_gift_attach_menu_icon\n * is also true. (boolean)\n */"},"chatlist_update_period":{"type":"number","description":"/**\n * Users that import a folder using a\n * chat\n * folder deep link » should retrieve additions made to the\n * folder by invoking\n * {@link chatlists.RawGetChatlistUpdatesRequest} at most every\n * chatlist_update_period seconds. (integer)\n */"},"chatlist_invites_limit_default":{"type":"number","description":"/**\n * Maximum number of per-folder\n * chat\n * folder deep links » that can be created by\n * non-Premium\n * users. (integer)\n */"},"chatlist_invites_limit_premium":{"type":"number","description":"/**\n * Maximum number of per-folder\n * chat\n * folder deep links » that can be created by\n * Premium\n * users. (integer)\n */"},"chatlists_joined_limit_default":{"type":"number","description":"/**\n * Maximum number of\n * shareable\n * folders\n * non-Premium\n * users may have. (integer)\n */"},"chatlists_joined_limit_premium":{"type":"number","description":"/**\n * Maximum number of\n * shareable\n * folders\n * Premium\n * users may have. (integer)\n */"},"small_queue_max_active_operations_count":{"type":"number","description":"/**\n * A soft limit, specifying the maximum number of files that\n * should be downloaded in parallel from the same DC, for files\n * smaller than 20MB. (integer)\n */"},"large_queue_max_active_operations_count":{"type":"number","description":"/**\n * A soft limit, specifying the maximum number of files that\n * should be downloaded in parallel from the same DC, for files\n * bigger than 20MB. (integer)\n */"},"authorization_autoconfirm_period":{"type":"number","description":"/**\n * An\n * unconfirmed\n * session » will be autoconfirmed this many seconds after\n * login. (integer)\n */"},"story_viewers_expire_period":{"type":"number","description":"/**\n * The exact list of users that viewed the story will be hidden\n * from the poster this many seconds after the story expires.\n * (integer)This limit applies only to\n * non-Premium\n * users,\n * Premium\n * users can always access the viewer list.\n */"},"story_expiring_limit_default":{"type":"number","description":"/**\n * The maximum number of active\n * stories\n * for\n * non-Premium\n * users (integer).\n */"},"story_expiring_limit_premium":{"type":"number","description":"/**\n * The maximum number of active\n * stories\n * for\n * Premium\n * users (integer).\n */"},"story_caption_length_limit_premium":{"type":"number","description":"/**\n * The maximum UTF-8 length of story captions for\n * Premium\n * users. (integer)\n */"},"story_caption_length_limit_default":{"type":"number","description":"/**\n * The maximum UTF-8 length of story captions for\n * non-Premium\n * users. (integer)\n */"},"stories_posting":{"type":"string","description":"/**\n * Indicates whether users can post stories. (string)One of:\n *
  • enabled - Any user can post stories.
  • \n *
  • premium - Only users with a\n * Premium\n * subscription can post stories.
  • \n *
  • disabled - Users can't post stories.
  • \n * \n */"},"stories_stealth_past_period":{"type":"number","description":"/**\n * Enabling\n * stories\n * stealth mode with the past flag will erase\n * views of any story opened in the past\n * stories_stealth_past_period seconds. (integer)\n */"},"stories_stealth_future_period":{"type":"number","description":"/**\n * Enabling\n * stories\n * stealth mode with the future flag will hide\n * views of any story opened in the next\n * stories_stealth_future_period seconds.\n * (integer)\n */"},"stories_stealth_cooldown_period":{"type":"number","description":"/**\n * After enabling\n * stories\n * stealth mode, this many seconds must elapse before the\n * user is allowed to enable it again. (integer)\n */"},"stories_sent_weekly_limit_default":{"type":"number","description":"/**\n * Maximum number of stories that can be sent in a week by\n * non-Premium\n * users. (integer)\n */"},"stories_sent_weekly_limit_premium":{"type":"number","description":"/**\n * Maximum number of stories that can be sent in a week by\n * Premium\n * users. (integer)\n */"},"stories_sent_monthly_limit_default":{"type":"number","description":"/**\n * Maximum number of stories that can be sent in a month by\n * non-Premium\n * users. (integer)\n */"},"stories_sent_monthly_limit_premium":{"type":"number","description":"/**\n * Maximum number of stories that can be sent in a month by\n * Premium\n * users. (integer)\n */"},"stories_suggested_reactions_limit_default":{"type":"number","description":"/**\n * Maximum number of\n * story\n * reaction media areas » that can be added to a story by\n * non-Premium\n * users. (integer)\n */"},"stories_suggested_reactions_limit_premium":{"type":"number","description":"/**\n * Maximum number of\n * story\n * reaction media areas » that can be added to a story by\n * Premium\n * users. (integer)\n */"},"stories_venue_search_username":{"type":"string","description":"/**\n * Username of the inline bot to use to generate venue location\n * tags for stories, see\n * here\n * » for more info. (string)\n */"},"stories_changelog_user_id":{"type":"number","description":"/**\n * ID of the official Telegram user that will post stories\n * about new Telegram features: stories posted by this user\n * should be shown on the\n * active\n * or active and hidden stories bar just like for contacts,\n * even if the user was removed from the contact list.\n * (integer, defaults to 777000)\n */"},"stories_entities":{"type":"string","description":"/**\n * Whether\n * styled\n * text entities and links in story text captions can be\n * used by all users (enabled), only\n * [Premium](/api/premium users) (premium), or no\n * one (disabled). (string)This field is used both\n * when posting stories, to indicate to the user whether they\n * can use entities, and when viewing stories, to hide entities\n * (client-side) on stories posted by users whose\n * Premium\n * subscription has expired (if stories_entities ==\n * \"premium\" and {@link RawUser}.premium is\n * not set, or if stories_entities == \"disabled\").\n * \n */"},"giveaway_gifts_purchase_available":{"type":"boolean","description":"/**\n * Whether\n * giveaways\n * can be started by the current user. (boolean)\n */"},"giveaway_add_peers_max":{"type":"number","description":"/**\n * The maximum number of users that can be specified when\n * making a\n * direct\n * giveaway. (integer)\n */"},"giveaway_countries_max":{"type":"number","description":"/**\n * The maximum number of countries that can be specified when\n * restricting the set of participating countries in a\n * giveaway.\n * (itneger)\n */"},"giveaway_boosts_per_premium":{"type":"number","description":"/**\n * The number of\n * boosts\n * that will be gained by a channel for each winner of a\n * giveaway.\n * (integer)\n */"},"giveaway_period_max":{"type":"number","description":"/**\n * The maximum duration in seconds of a\n * giveaway.\n * (integer)\n */"},"boosts_channel_level_max":{"type":"number","description":"/**\n * Maximum\n * boost\n * level for channels. (integer)\n */"},"boosts_per_sent_gift":{"type":"number","description":"/**\n * The number of additional\n * boost\n * slots that the current user will receive when\n * gifting\n * a Telegram Premium subscription. \n */"},"transcribe_audio_trial_weekly_number":{"type":"number","description":"/**\n * The maximum number of\n * speech\n * recognition » calls per week for\n * non-Premium\n * users. (integer)\n */"},"transcribe_audio_trial_duration_max":{"type":"number","description":"/**\n * The maximum allowed duration of media in seconds for\n * speech\n * recognition » for\n * non-Premium\n * users. (integer)\n */"},"recommended_channels_limit_default":{"type":"number","description":"/**\n * The maximum number of similar channels that can be\n * recommended by\n * {@link channels.RawGetChannelRecommendationsRequest} to\n * non-Premium\n * users. (integer)\n */"},"recommended_channels_limit_premium":{"type":"number","description":"/**\n * The maximum number of similar channels that can be\n * recommended by\n * {@link channels.RawGetChannelRecommendationsRequest} to\n * Premium\n * users. (integer)\n */"},"quote_length_max":{"type":"number","description":"/**\n * Maximum UTF-8 length of {@link RawInputReplyToMessage}.\n * (integer)\n */"},"channel_bg_icon_level_min":{"type":"number","description":"/**\n * After reaching at least this\n * boost\n * level », channels gain the ability to change their\n * message\n * accent palette emoji ». (integer)\n */"},"channel_profile_bg_icon_level_min":{"type":"number","description":"/**\n * After reaching at least this\n * boost\n * level », channels gain the ability to change their\n * profile\n * accent palette emoji ». (integer)\n */"},"channel_emoji_status_level_min":{"type":"number","description":"/**\n * After reaching at least this\n * boost\n * level », channels gain the ability to change their\n * status\n * emoji ». (integer)\n */"},"channel_wallpaper_level_min":{"type":"number","description":"/**\n * After reaching at least this\n * boost\n * level », channels gain the ability to set a\n * fill\n * channel wallpaper, see here » for more info. (integer)\n */"},"channel_custom_wallpaper_level_min":{"type":"number","description":"/**\n * After reaching at least this\n * boost\n * level », channels gain the ability to set any custom\n * wallpaper,\n * not just\n * fill\n * channel wallpapers, see here » for more info. (integer)\n */"},"saved_dialogs_pinned_limit_default":{"type":"number","description":"/**\n * Maximum number of pinned dialogs in\n * saved\n * messages for\n * non-Premium\n * users. (integer)\n */"},"saved_dialogs_pinned_limit_premium":{"type":"number","description":"/**\n * Maximum number of pinned dialogs in\n * saved\n * messages for\n * Premium\n * users. (integer)\n */"}} \ No newline at end of file +{ "emojies_animated_zoom": { "type": "number", "description": "/**\n * Animated\n * emojis and\n * animated\n * dice should be scaled by this factor before being shown\n * to the user (float)\n */" }, "keep_alive_service": { "type": "boolean", "description": "/**\n * Whether app clients should start a keepalive service to keep\n * the app running and fetch updates even when the app is\n * closed (boolean)\n */" }, "background_connection": { "type": "boolean", "description": "/**\n * Whether app clients should start a background TCP connection\n * for MTProto update fetching (boolean)\n */" }, "emojies_send_dice": { "type": "string[]", "description": "/**\n * A list of supported\n * animated\n * dice stickers (array of strings).\n */" }, "emojies_send_dice_success": { "type": "Record", "description": "/**\n * For\n * animated\n * dice emojis other than the basic \"🎲\", indicates the winning dice value and\n * the final frame of the animated sticker, at which to show\n * the fireworks \"🎆\" (object with emoji keys and object\n * values, containing value and\n * frame_start float values)\n */" }, "emojies_sounds": { "type": "Record", "description": "/**\n * A map of soundbites to be played when the user clicks on the\n * specified\n * animated\n * emoji; the\n * file\n * reference field should be base64-decoded before\n * downloading\n * the file (map of\n * file\n * IDs ({@link RawInputDocument}.id), with emoji string\n * keys)\n */" }, "gif_search_branding": { "type": "string", "description": "/**\n * Specifies the name of the service providing GIF search\n * through\n * gif_search_username\n * (string)\n */" }, "gif_search_emojies": { "type": "string[]", "description": "/**\n * Specifies a list of emojis that should be suggested as\n * search term in a bar above the GIF search box (array of\n * string emojis)\n */" }, "stickers_emoji_suggest_only_api": { "type": "boolean", "description": "/**\n * Specifies that the app should not display\n * local\n * sticker suggestions » for emojis at all and just use the\n * result of {@link messages.RawGetStickersRequest} (bool)\n */" }, "stickers_emoji_cache_time": { "type": "number", "description": "/**\n * Specifies the validity period of the local cache of\n * {@link messages.RawGetStickersRequest}, also relevant when\n * generating the\n * pagination\n * hash when invoking the method. (integer)\n */" }, "qr_login_camera": { "type": "boolean", "description": "/**\n * Whether the Settings->Devices menu should show an option\n * to scan a\n * QR\n * login code (boolean)\n */" }, "qr_login_code": { "type": "\"disabled\" | \"primary\" | \"secondary\"", "description": "/**\n * Whether the login screen should show a\n * QR code\n * login option, possibly as default login method (string,\n * \"disabled\", \"primary\" or \"secondary\")\n */" }, "dialog_filters_enabled": { "type": "boolean", "description": "/**\n * Whether clients should show an option for managing\n * dialog\n * filters AKA folders (boolean)\n */" }, "dialog_filters_tooltip": { "type": "boolean", "description": "/**\n * Whether clients should actively show a tooltip, inviting the\n * user to configure\n * dialog\n * filters AKA folders; typically this happens when the\n * chat list is long enough to start getting cluttered.\n * (boolean)\n */" }, "autoarchive_setting_available": { "type": "boolean", "description": "/**\n * Whether clients can invoke\n * {@link account.RawSetGlobalPrivacySettingsRequest} with\n * {@link RawGlobalPrivacySettings}, to automatically archive\n * and mute new incoming chats from non-contacts. (boolean)\n */" }, "pending_suggestions": { "type": "string[]", "description": "/**\n * Contains a list of suggestions that should be actively shown\n * as a tooltip to the user. (Array of strings, possible values\n * shown in the suggestions section\n * ». \n */" }, "topics_pinned_limit": { "type": "number", "description": "/**\n * Maximum number of\n * topics\n * that can be pinned in a single\n * forum.\n * (integer)\n */" }, "telegram_antispam_user_id": { "type": "string", "description": "/**\n * The ID of the official\n * native\n * antispam bot, that will automatically delete spam\n * messages if enabled as specified in the\n * native\n * antispam documentation ».\n * \n * \n * When fetching the admin list of a supergroup using\n * {@link channels.RawGetParticipantsRequest}, if native\n * antispam functionality in the specified supergroup, the bot\n * should be manually added to the admin list displayed to the\n * user. (numeric string that represents a Telegram user/bot\n * ID, should be casted to an int64)\n */" }, "telegram_antispam_group_size_min": { "type": "number", "description": "/**\n * Minimum number of group members required to enable\n * native\n * antispam functionality. (integer)\n */" }, "fragment_prefixes": { "type": "string[]", "description": "/**\n * List of phone number prefixes for anonymous\n * Fragment phone numbers.\n * (array of strings).\n */" }, "hidden_members_group_size_min": { "type": "number", "description": "/**\n * Minimum number of participants required to hide the\n * participants list of a supergroup using\n * {@link channels.RawToggleParticipantsHiddenRequest}.\n * (integer)\n */" }, "url_auth_domains": { "type": "string[]", "description": "/**\n * A list of domains that support automatic login with manual\n * user confirmation,\n * click\n * here for more info on URL authorization ». (array of\n * strings)\n */" }, "autologin_domains": { "type": "string[]", "description": "/**\n * A list of Telegram domains that support automatic login with\n * no user confirmation,\n * click\n * here for more info on URL authorization ». (array of\n * strings)\n */" }, "whitelisted_domains": { "type": "string[]", "description": "/**\n * A list of Telegram domains that can always be opened without\n * additional user confirmation, when clicking on in-app links\n * where the URL is not fully displayed (i.e.\n * {@link RawMessageEntityTextUrl} entities). (array of\n * strings)Note that when opening\n * named\n * Mini App links for the first time, confirmation should\n * still be requested from the user, even if the domain of the\n * containing deep link is whitelisted (i.e.\n * t.me/<bot_username>/<short_name>?startapp=<start_parameter>,\n * where t.me is whitelisted). Confirmation\n * should always be asked, even if we already\n * opened the\n * named\n * Mini App before, if the link is not visible (i.e.\n * {@link RawMessageEntityTextUrl} text links, inline buttons\n * etc.). \n */" }, "round_video_encoding": { "type": "{\n diameter: number\n video_bitrate: number\n audio_bitrate: number\n max_size: number\n}", "description": "/**\n * Contains a set of recommended codec parameters for round\n * videos. (object, as described in the example)\n */" }, "chat_read_mark_size_threshold": { "type": "number", "description": "/**\n * Per-user read receipts, fetchable using\n * {@link messages.RawGetMessageReadParticipantsRequest}, will\n * be available in groups with an amount of participants less\n * or equal to chat_read_mark_size_threshold.\n * (integer)\n */" }, "chat_read_mark_expire_period": { "type": "number", "description": "/**\n * To protect user privacy, read receipts for chats are only\n * stored for chat_read_mark_expire_period seconds\n * after the message was sent. (integer)\n */" }, "pm_read_date_expire_period": { "type": "number", "description": "/**\n * To protect user privacy, read receipts for private chats are\n * only stored for pm_read_date_expire_period\n * seconds after the message was sent. (integer)\n */" }, "groupcall_video_participants_max": { "type": "number", "description": "/**\n * Maximum number of participants in a group call (livestreams\n * allow ∞ participants) (integer)\n */" }, "reactions_uniq_max": { "type": "number", "description": "/**\n * Maximum number of unique reactions for any given message:\n * for example, if there are 2000 \"👍\" and 1000 custom emoji reactions and\n * reactions_uniq_max = 2, you can't add a \"👎\" reaction, because that would raise the\n * number of unique reactions to 3 > 2. (integer)\n */" }, "reactions_in_chat_max": { "type": "number", "description": "/**\n * Maximum number of reactions that can be marked as allowed in\n * a chat using {@link RawChatReactionsSome}. (integer)\n */" }, "reactions_user_max_default": { "type": "number", "description": "/**\n * Maximum number of reactions that can be added to a single\n * message by a non-Premium user. (integer)\n */" }, "reactions_user_max_premium": { "type": "number", "description": "/**\n * Maximum number of reactions that can be added to a single\n * message by a Premium user. (integer)\n */" }, "default_emoji_statuses_stickerset_id": { "type": "number", "description": "/**\n * Default emoji status stickerset ID. (integer)\n * \n * \n * Note that the stickerset can be fetched using\n * {@link RawInputStickerSetEmojiDefaultStatuses}. \n */" }, "ringtone_duration_max": { "type": "number", "description": "/**\n * The maximum duration in seconds of\n * uploadable\n * notification sounds » (integer)\n */" }, "ringtone_size_max": { "type": "number", "description": "/**\n * The maximum post-conversion size in bytes of\n * uploadable\n * notification sounds »\n */" }, "ringtone_saved_count_max": { "type": "number", "description": "/**\n * The maximum number of\n * saveable\n * notification sounds »\n */" }, "message_animated_emoji_max": { "type": "number", "description": "/**\n * The maximum number of\n * custom\n * emojis that may be present in a message. (integer)\n */" }, "stickers_premium_by_emoji_num": { "type": "number", "description": "/**\n * Defines how many\n * Premium\n * stickers to show in the sticker suggestion popup when\n * entering an emoji into the text field, see the\n * sticker\n * docs for more info (integer, defaults to 0)\n */" }, "stickers_normal_by_emoji_per_premium_num": { "type": "number", "description": "/**\n * For\n * Premium\n * users, used to define the suggested sticker list, see\n * the\n * sticker\n * docs for more info (integer, defaults to 2)\n */" }, "premium_purchase_blocked": { "type": "boolean", "description": "/**\n * The user can't purchase\n * Telegram\n * Premium. The app must also hide all Premium features,\n * including stars for other users, et cetera. (boolean)\n */" }, "channels_limit_default": { "type": "number", "description": "/**\n * The maximum number of\n * channels\n * and supergroups a\n * non-Premium\n * user may join (integer)\n */" }, "channels_limit_premium": { "type": "number", "description": "/**\n * The maximum number of\n * channels\n * and supergroups a\n * Premium\n * user may join (integer)\n */" }, "saved_gifs_limit_default": { "type": "number", "description": "/**\n * The maximum number of GIFs a\n * non-Premium\n * user may save (integer)\n */" }, "saved_gifs_limit_premium": { "type": "number", "description": "/**\n * The maximum number of GIFs a\n * Premium\n * user may save (integer)\n */" }, "stickers_faved_limit_default": { "type": "number", "description": "/**\n * The maximum number of stickers a\n * non-Premium\n * user may\n * add\n * to Favorites » (integer)\n */" }, "stickers_faved_limit_premium": { "type": "number", "description": "/**\n * The maximum number of stickers a\n * Premium\n * user may\n * add\n * to Favorites » (integer)\n */" }, "dialog_filters_limit_default": { "type": "number", "description": "/**\n * The maximum number of\n * folders\n * a\n * non-Premium\n * user may create (integer)\n */" }, "dialog_filters_limit_premium": { "type": "number", "description": "/**\n * The maximum number of\n * folders\n * a\n * Premium\n * user may create (integer)\n */" }, "dialog_filters_chats_limit_default": { "type": "number", "description": "/**\n * The maximum number of chats a\n * non-Premium\n * user may add to a\n * folder\n * (integer)\n */" }, "dialog_filters_chats_limit_premium": { "type": "number", "description": "/**\n * The maximum number of chats a\n * Premium\n * user may add to a\n * folder\n * (integer)\n */" }, "dialogs_pinned_limit_default": { "type": "number", "description": "/**\n * The maximum number of chats a\n * non-Premium\n * user may pin (integer)\n */" }, "dialogs_pinned_limit_premium": { "type": "number", "description": "/**\n * The maximum number of chats a\n * Premium\n * user may pin (integer)\n */" }, "dialogs_folder_pinned_limit_default": { "type": "number", "description": "/**\n * The maximum number of chats a\n * non-Premium\n * user may pin in a folder (integer)\n */" }, "dialogs_folder_pinned_limit_premium": { "type": "number", "description": "/**\n * The maximum number of chats a\n * Premium\n * user may pin in a folder (integer)\n */" }, "channels_public_limit_default": { "type": "number", "description": "/**\n * The maximum number of public\n * channels\n * or supergroups a\n * non-Premium\n * user may create (integer)\n */" }, "channels_public_limit_premium": { "type": "number", "description": "/**\n * The maximum number of public\n * channels\n * or supergroups a\n * Premium\n * user may create (integer)\n */" }, "caption_length_limit_default": { "type": "number", "description": "/**\n * The maximum UTF-8 length of media captions sendable by\n * non-Premium\n * users (integer)\n */" }, "caption_length_limit_premium": { "type": "number", "description": "/**\n * The maximum UTF-8 length of media captions sendable by\n * Premium\n * users (integer)\n */" }, "upload_max_fileparts_default": { "type": "number", "description": "/**\n * The maximum number of file parts uploadable by\n * non-Premium\n * users (integer, the maximum file size can be extrapolated by\n * multiplying this value by 524288, the biggest\n * possible chunk size)\n */" }, "upload_max_fileparts_premium": { "type": "number", "description": "/**\n * The maximum number of file parts uploadable by\n * Premium\n * users (integer, the maximum file size can be extrapolated by\n * multiplying this value by 524288, the biggest\n * possible chunk size)\n */" }, "about_length_limit_default": { "type": "number", "description": "/**\n * The maximum UTF-8 length of bios of\n * non-Premium\n * users (integer)\n */" }, "about_length_limit_premium": { "type": "number", "description": "/**\n * The maximum UTF-8 length of bios of\n * Premium\n * users (integer)\n */" }, "premium_promo_order": { "type": "string[]", "description": "/**\n * Array of string identifiers, indicating the order of\n * Telegram\n * Premium features in the Telegram Premium promotion\n * popup,\n * see\n * here for the possible values »\n */" }, "premium_bot_username": { "type": "string", "description": "/**\n * Contains the username of the official\n * Telegram\n * Premium bot that may be used to buy a\n * Telegram\n * Premium subscription, see\n * here for\n * detailed instructions » (string)\n */" }, "premium_invoice_slug": { "type": "string", "description": "/**\n * Contains an\n * invoice\n * slug that may be used to buy a\n * Telegram\n * Premium subscription, see\n * here for\n * detailed instructions » (string)\n */" }, "premium_gift_attach_menu_icon": { "type": "boolean", "description": "/**\n * Whether a gift icon should be shown in the attachment menu\n * in private chats with users, offering the current user to\n * gift a\n * Telegram\n * Premium subscription to the other user in the chat.\n * (boolean)\n */" }, "premium_gift_text_field_icon": { "type": "boolean", "description": "/**\n * Whether a gift icon should be shown in the text bar in\n * private chats with users (ie like the / icon in\n * chats with bots), offering the current user to gift a\n * Telegram\n * Premium subscription to the other user in the chat. Can\n * only be true if premium_gift_attach_menu_icon\n * is also true. (boolean)\n */" }, "chatlist_update_period": { "type": "number", "description": "/**\n * Users that import a folder using a\n * chat\n * folder deep link » should retrieve additions made to the\n * folder by invoking\n * {@link chatlists.RawGetChatlistUpdatesRequest} at most every\n * chatlist_update_period seconds. (integer)\n */" }, "chatlist_invites_limit_default": { "type": "number", "description": "/**\n * Maximum number of per-folder\n * chat\n * folder deep links » that can be created by\n * non-Premium\n * users. (integer)\n */" }, "chatlist_invites_limit_premium": { "type": "number", "description": "/**\n * Maximum number of per-folder\n * chat\n * folder deep links » that can be created by\n * Premium\n * users. (integer)\n */" }, "chatlists_joined_limit_default": { "type": "number", "description": "/**\n * Maximum number of\n * shareable\n * folders\n * non-Premium\n * users may have. (integer)\n */" }, "chatlists_joined_limit_premium": { "type": "number", "description": "/**\n * Maximum number of\n * shareable\n * folders\n * Premium\n * users may have. (integer)\n */" }, "small_queue_max_active_operations_count": { "type": "number", "description": "/**\n * A soft limit, specifying the maximum number of files that\n * should be downloaded in parallel from the same DC, for files\n * smaller than 20MB. (integer)\n */" }, "large_queue_max_active_operations_count": { "type": "number", "description": "/**\n * A soft limit, specifying the maximum number of files that\n * should be downloaded in parallel from the same DC, for files\n * bigger than 20MB. (integer)\n */" }, "authorization_autoconfirm_period": { "type": "number", "description": "/**\n * An\n * unconfirmed\n * session » will be autoconfirmed this many seconds after\n * login. (integer)\n */" }, "story_viewers_expire_period": { "type": "number", "description": "/**\n * The exact list of users that viewed the story will be hidden\n * from the poster this many seconds after the story expires.\n * (integer)This limit applies only to\n * non-Premium\n * users,\n * Premium\n * users can always access the viewer list.\n */" }, "story_expiring_limit_default": { "type": "number", "description": "/**\n * The maximum number of active\n * stories\n * for\n * non-Premium\n * users (integer).\n */" }, "story_expiring_limit_premium": { "type": "number", "description": "/**\n * The maximum number of active\n * stories\n * for\n * Premium\n * users (integer).\n */" }, "story_caption_length_limit_premium": { "type": "number", "description": "/**\n * The maximum UTF-8 length of story captions for\n * Premium\n * users. (integer)\n */" }, "story_caption_length_limit_default": { "type": "number", "description": "/**\n * The maximum UTF-8 length of story captions for\n * non-Premium\n * users. (integer)\n */" }, "stories_posting": { "type": "string", "description": "/**\n * Indicates whether users can post stories. (string)One of:\n *
  • enabled - Any user can post stories.
  • \n *
  • premium - Only users with a\n * Premium\n * subscription can post stories.
  • \n *
  • disabled - Users can't post stories.
  • \n * \n */" }, "stories_stealth_past_period": { "type": "number", "description": "/**\n * Enabling\n * stories\n * stealth mode with the past flag will erase\n * views of any story opened in the past\n * stories_stealth_past_period seconds. (integer)\n */" }, "stories_stealth_future_period": { "type": "number", "description": "/**\n * Enabling\n * stories\n * stealth mode with the future flag will hide\n * views of any story opened in the next\n * stories_stealth_future_period seconds.\n * (integer)\n */" }, "stories_stealth_cooldown_period": { "type": "number", "description": "/**\n * After enabling\n * stories\n * stealth mode, this many seconds must elapse before the\n * user is allowed to enable it again. (integer)\n */" }, "stories_sent_weekly_limit_default": { "type": "number", "description": "/**\n * Maximum number of stories that can be sent in a week by\n * non-Premium\n * users. (integer)\n */" }, "stories_sent_weekly_limit_premium": { "type": "number", "description": "/**\n * Maximum number of stories that can be sent in a week by\n * Premium\n * users. (integer)\n */" }, "stories_sent_monthly_limit_default": { "type": "number", "description": "/**\n * Maximum number of stories that can be sent in a month by\n * non-Premium\n * users. (integer)\n */" }, "stories_sent_monthly_limit_premium": { "type": "number", "description": "/**\n * Maximum number of stories that can be sent in a month by\n * Premium\n * users. (integer)\n */" }, "stories_suggested_reactions_limit_default": { "type": "number", "description": "/**\n * Maximum number of\n * story\n * reaction media areas » that can be added to a story by\n * non-Premium\n * users. (integer)\n */" }, "stories_suggested_reactions_limit_premium": { "type": "number", "description": "/**\n * Maximum number of\n * story\n * reaction media areas » that can be added to a story by\n * Premium\n * users. (integer)\n */" }, "stories_venue_search_username": { "type": "string", "description": "/**\n * Username of the inline bot to use to generate venue location\n * tags for stories, see\n * here\n * » for more info. (string)\n */" }, "stories_changelog_user_id": { "type": "number", "description": "/**\n * ID of the official Telegram user that will post stories\n * about new Telegram features: stories posted by this user\n * should be shown on the\n * active\n * or active and hidden stories bar just like for contacts,\n * even if the user was removed from the contact list.\n * (integer, defaults to 777000)\n */" }, "stories_entities": { "type": "string", "description": "/**\n * Whether\n * styled\n * text entities and links in story text captions can be\n * used by all users (enabled), only\n * [Premium](/api/premium users) (premium), or no\n * one (disabled). (string)This field is used both\n * when posting stories, to indicate to the user whether they\n * can use entities, and when viewing stories, to hide entities\n * (client-side) on stories posted by users whose\n * Premium\n * subscription has expired (if stories_entities ==\n * \"premium\" and {@link RawUser}.premium is\n * not set, or if stories_entities == \"disabled\").\n * \n */" }, "giveaway_gifts_purchase_available": { "type": "boolean", "description": "/**\n * Whether\n * giveaways\n * can be started by the current user. (boolean)\n */" }, "giveaway_add_peers_max": { "type": "number", "description": "/**\n * The maximum number of users that can be specified when\n * making a\n * direct\n * giveaway. (integer)\n */" }, "giveaway_countries_max": { "type": "number", "description": "/**\n * The maximum number of countries that can be specified when\n * restricting the set of participating countries in a\n * giveaway.\n * (itneger)\n */" }, "giveaway_boosts_per_premium": { "type": "number", "description": "/**\n * The number of\n * boosts\n * that will be gained by a channel for each winner of a\n * giveaway.\n * (integer)\n */" }, "giveaway_period_max": { "type": "number", "description": "/**\n * The maximum duration in seconds of a\n * giveaway.\n * (integer)\n */" }, "boosts_channel_level_max": { "type": "number", "description": "/**\n * Maximum\n * boost\n * level for channels. (integer)\n */" }, "boosts_per_sent_gift": { "type": "number", "description": "/**\n * The number of additional\n * boost\n * slots that the current user will receive when\n * gifting\n * a Telegram Premium subscription. \n */" }, "transcribe_audio_trial_weekly_number": { "type": "number", "description": "/**\n * The maximum number of\n * speech\n * recognition » calls per week for\n * non-Premium\n * users. (integer)\n */" }, "transcribe_audio_trial_duration_max": { "type": "number", "description": "/**\n * The maximum allowed duration of media in seconds for\n * speech\n * recognition » for\n * non-Premium\n * users. (integer)\n */" }, "recommended_channels_limit_default": { "type": "number", "description": "/**\n * The maximum number of similar channels that can be\n * recommended by\n * {@link channels.RawGetChannelRecommendationsRequest} to\n * non-Premium\n * users. (integer)\n */" }, "recommended_channels_limit_premium": { "type": "number", "description": "/**\n * The maximum number of similar channels that can be\n * recommended by\n * {@link channels.RawGetChannelRecommendationsRequest} to\n * Premium\n * users. (integer)\n */" }, "quote_length_max": { "type": "number", "description": "/**\n * Maximum UTF-8 length of {@link RawInputReplyToMessage}.\n * (integer)\n */" }, "channel_bg_icon_level_min": { "type": "number", "description": "/**\n * After reaching at least this\n * boost\n * level », channels gain the ability to change their\n * message\n * accent palette emoji ». (integer)\n */" }, "channel_profile_bg_icon_level_min": { "type": "number", "description": "/**\n * After reaching at least this\n * boost\n * level », channels gain the ability to change their\n * profile\n * accent palette emoji ». (integer)\n */" }, "channel_emoji_status_level_min": { "type": "number", "description": "/**\n * After reaching at least this\n * boost\n * level », channels gain the ability to change their\n * status\n * emoji ». (integer)\n */" }, "channel_wallpaper_level_min": { "type": "number", "description": "/**\n * After reaching at least this\n * boost\n * level », channels gain the ability to set a\n * fill\n * channel wallpaper, see here » for more info. (integer)\n */" }, "channel_custom_wallpaper_level_min": { "type": "number", "description": "/**\n * After reaching at least this\n * boost\n * level », channels gain the ability to set any custom\n * wallpaper,\n * not just\n * fill\n * channel wallpapers, see here » for more info. (integer)\n */" }, "saved_dialogs_pinned_limit_default": { "type": "number", "description": "/**\n * Maximum number of pinned dialogs in\n * saved\n * messages for\n * non-Premium\n * users. (integer)\n */" }, "saved_dialogs_pinned_limit_premium": { "type": "number", "description": "/**\n * Maximum number of pinned dialogs in\n * saved\n * messages for\n * Premium\n * users. (integer)\n */" } } diff --git a/packages/tl/build.config.cjs b/packages/tl/build.config.cjs index c8b1c6d5..92980680 100644 --- a/packages/tl/build.config.cjs +++ b/packages/tl/build.config.cjs @@ -66,7 +66,7 @@ module.exports = ({ fs, path, outDir, packageDir, jsr, transformFile }) => ({ json.exports = {} for (const f of files) { - if (!f.match(/\.js(on)?$/)) continue + if (!f.match(/\.js(?:on)?$/)) continue if (f === 'index.js') { json.exports['.'] = './index.js' diff --git a/packages/tl/data/documentation.cache.json b/packages/tl/data/documentation.cache.json index 47461747..56362d19 100644 --- a/packages/tl/data/documentation.cache.json +++ b/packages/tl/data/documentation.cache.json @@ -1 +1 @@ -{"updated":"07.08.2024, 17:19:59 (layer 185) - from https://corefork.telegram.org","classes":{"error":{"comment":"Error.","arguments":{"code":"Error code","text":"Message"}},"inputUser":{"comment":"Defines a user for further interaction.","arguments":{"user_id":"User identifier","access_hash":"access_hash value from the {@link RawUser} constructor"}},"inputPeerUserFromMessage":{"comment":"Defines a min user that was seen in a certain message of a certain chat.","arguments":{"peer":"The chat where the user was seen","msg_id":"The message ID","user_id":"The identifier of the user that was seen"}},"inputPeerChat":{"comment":"Defines a chat for further interaction.","arguments":{"chat_id":"Chat identifier"}},"inputPeerUser":{"comment":"Defines a user for further interaction.","arguments":{"user_id":"User identifier","access_hash":"access_hash value from the {@link RawUser} constructor"}},"inputUserSelf":{"comment":"Defines the current user.","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputPeerChannel":{"comment":"Defines a channel for further interaction.","arguments":{"channel_id":"Channel identifier","access_hash":"access_hash value from the {@link RawChannel} constructor"}},"inputPeerEmpty":{"comment":"An empty constructor, no user or chat is defined.","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputUserEmpty":{"comment":"Empty constructor, does not define a user.","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputPeerChannelFromMessage":{"comment":"Defines a min channel that was seen in a certain message of a certain chat.","arguments":{"peer":"The chat where the channel's message was seen","msg_id":"The message ID","channel_id":"The identifier of the channel that was seen"}},"inputUserFromMessage":{"comment":"Defines a min user that was seen in a certain message of a certain chat.","arguments":{"peer":"The chat where the user was seen","msg_id":"The message ID","user_id":"The identifier of the user that was seen"}},"inputPeerSelf":{"comment":"Defines the current user.","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputPhoneContact":{"comment":"Phone contact.","arguments":{"client_id":"An arbitrary 64-bit integer: it should be set, for example, to an incremental number when using {@link contacts.RawImportContactsRequest}, in order to retry importing only the contacts that weren't imported successfully, according to the client_ids returned in {@link contacts.RawImportedContacts}.retry_contacts.","phone":"Phone number","first_name":"Contact's first name","last_name":"Contact's last name"}},"inputMediaEmpty":{"comment":"Empty media content of a message.","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputFile":{"comment":"Defines a file saved in parts using the method {@link upload.RawSaveFilePartRequest}.","arguments":{"id":"Random file identifier created by the client","parts":"Number of parts saved","name":"Full name of the file","md5_checksum":"In case the file's md5-hash was passed, contents of the file will be checked prior to use"}},"inputFileBig":{"comment":"Assigns a big file (over 10 MB in size), saved in part using the method {@link upload.RawSaveBigFilePartRequest}.","arguments":{"id":"Random file id, created by the client","parts":"Number of parts saved","name":"Full file name"}},"inputFileStoryDocument":{"comment":"Used to edit the thumbnail/static preview of a story, see here » for more info on the full flow.","arguments":{"id":"The old story video."}},"inputMediaUploadedPhoto":{"comment":"Photo","arguments":{"flags":"Flags, see TL conditional fields","spoiler":"Whether this media should be hidden behind a spoiler warning","file":"The uploaded file","stickers":"Attached mask stickers","ttl_seconds":"Time to live in seconds of self-destructing photo"}},"inputMediaPhoto":{"comment":"Forwarded photo","arguments":{"flags":"Flags, see TL conditional fields","spoiler":"Whether this media should be hidden behind a spoiler warning","id":"Photo to be forwarded","ttl_seconds":"Time to live in seconds of self-destructing photo"}},"inputMediaGeoPoint":{"comment":"Map.","arguments":{"geo_point":"GeoPoint"}},"inputMediaContact":{"comment":"Phone book contact","arguments":{"phone_number":"Phone number","first_name":"Contact's first name","last_name":"Contact's last name","vcard":"Contact vcard"}},"inputMediaDocument":{"comment":"Forwarded document","arguments":{"flags":"Flags, see TL conditional fields","spoiler":"Whether this media should be hidden behind a spoiler warning","id":"The document to be forwarded.","ttl_seconds":"Time to live of self-destructing document","query":"Text query or emoji that was used by the user to find this sticker or GIF: used to improve search result relevance."}},"inputMediaVenue":{"comment":"Can be used to send a venue geolocation.","arguments":{"geo_point":"Geolocation","title":"Venue name","address":"Physical address of the venue","provider":"Venue provider: currently only \"foursquare\" and \"gplaces\" (Google Places) need to be supported","venue_id":"Venue ID in the provider's database","venue_type":"Venue type in the provider's database"}},"inputMediaGame":{"comment":"A game","arguments":{"id":"The game to forward"}},"inputMediaInvoice":{"comment":"Generated invoice of a bot payment","arguments":{"flags":"Flags, see TL conditional fields","title":"Product name, 1-32 characters","description":"Product description, 1-255 characters","photo":"URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.","invoice":"The actual invoice","payload":"Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.","provider":"Payments provider token, obtained via Botfather","provider_data":"JSON-encoded data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.","start_param":"Unique bot deep links start parameter. If present, forwarded copies of the sent message will have a URL button with a deep link to the bot (instead of a Pay button), with the value used as the start parameter. If absent, forwarded copies of the sent message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using the same invoice.","extended_media":"Deprecated"}},"inputMediaDocumentExternal":{"comment":"Document that will be downloaded by the telegram servers","arguments":{"flags":"Flags, see TL conditional fields","spoiler":"Whether this media should be hidden behind a spoiler warning","url":"URL of the document","ttl_seconds":"Self-destruct time to live of document"}},"inputMediaPhotoExternal":{"comment":"New photo that will be uploaded by the server using the specified URL","arguments":{"flags":"Flags, see TL conditional fields","spoiler":"Whether this media should be hidden behind a spoiler warning","url":"URL of the photo","ttl_seconds":"Self-destruct time to live of photo"}},"inputMediaGeoLive":{"comment":"Live geolocation","arguments":{"flags":"Flags, see TL conditional fields","stopped":"Whether sending of the geolocation was stopped","geo_point":"Current geolocation","heading":"For live locations, a direction in which the location moves, in degrees; 1-360.","period":"Validity period of the current location","proximity_notification_radius":"For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000)"}},"inputMediaUploadedDocument":{"comment":"New document","arguments":{"flags":"Flags, see TL conditional fields","nosound_video":"Whether the specified document is a video file with no audio tracks (a GIF animation (even as MPEG4), for example)","force_file":"Force the media file to be uploaded as document","spoiler":"Whether this media should be hidden behind a spoiler warning","file":"The uploaded file","thumb":"Thumbnail of the document, uploaded as for the file","mime_type":"MIME type of document","attributes":"Attributes that specify the type of the document (video, audio, voice, sticker, etc.)","stickers":"Attached stickers","ttl_seconds":"Time to live in seconds of self-destructing document"}},"inputMediaPoll":{"comment":"A poll","arguments":{"flags":"Flags, see TL conditional fields","poll":"The poll to send","correct_answers":"Correct answer IDs (for quiz polls)","solution":"Explanation of quiz solution","solution_entities":"Message entities for styled text"}},"inputMediaDice":{"comment":"Send a dice-based animated sticker","arguments":{"emoticon":"The emoji, for now \"🏀\", \"🎲\" and \"🎯\" are supported"}},"inputMediaStory":{"comment":"Forwarded story","arguments":{"peer":"Peer where the story was posted","id":"Story ID"}},"inputMediaWebPage":{"comment":"Specifies options that will be used to generate the link preview for the caption, or even a standalone link preview without an attached message.","arguments":{"flags":"Flags, see TL conditional fields","force_large_media":"If set, specifies that a large media preview should be used.","force_small_media":"If set, specifies that a small media preview should be used.","optional":"If not set, a WEBPAGE_NOT_FOUND RPC error will be emitted if a webpage preview cannot be generated for the specified url; otherwise, no error will be emitted (unless the provided message is also empty, in which case a MESSAGE_EMPTY will be emitted, instead).","url":"The URL to use for the link preview."}},"inputChatPhotoEmpty":{"comment":"Empty constructor, remove group photo.","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputChatUploadedPhoto":{"comment":"New photo to be set as group profile photo.\n\nThe file, video and video_emoji_markup flags are mutually exclusive.","arguments":{"flags":"Flags, see TL conditional fields","file":"File saved in parts using the method {@link upload.RawSaveFilePartRequest}","video":"Square video for animated profile picture","video_start_ts":"Floating point UNIX timestamp in seconds, indicating the frame of the video/sticker that should be used as static preview; can only be used if video or video_emoji_markup is set.","video_emoji_markup":"Animated sticker profile picture, must contain either a {@link RawVideoSizeEmojiMarkup} or a {@link RawVideoSizeStickerMarkup} constructor."}},"inputChatPhoto":{"comment":"Existing photo to be set as a chat profile photo.","arguments":{"id":"Existing photo"}},"inputMediaPaidMedia":{"comment":"Paid media, see here » for more info.","arguments":{"stars_amount":"The price of the media in Telegram Stars.","extended_media":"Photos or videos."}},"inputGeoPointEmpty":{"comment":"Empty GeoPoint constructor.","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputPhotoEmpty":{"comment":"Empty constructor.","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputEncryptedFileLocation":{"comment":"Location of encrypted secret chat file.","arguments":{"id":"File ID, id parameter value from {@link RawEncryptedFile}","access_hash":"Checksum, access_hash parameter value from {@link RawEncryptedFile}"}},"inputGeoPoint":{"comment":"Defines a GeoPoint by its coordinates.","arguments":{"flags":"Flags, see TL conditional fields","lat":"Latitude","long":"Longitude","accuracy_radius":"The estimated horizontal accuracy of the location, in meters; as defined by the sender."}},"inputPhoto":{"comment":"Defines a photo for further interaction.","arguments":{"id":"Photo identifier","access_hash":"access_hash value from the {@link RawPhoto} constructor","file_reference":"File reference"}},"inputDocumentFileLocation":{"comment":"Document location (video, voice, audio, basically every type except photo)","arguments":{"id":"Document ID","access_hash":"access_hash parameter from the {@link RawDocument} constructor","file_reference":"File reference","thumb_size":"Thumbnail size to download the thumbnail"}},"inputSecureFileLocation":{"comment":"Location of encrypted telegram passport file.","arguments":{"id":"File ID, id parameter value from {@link RawSecureFile}","access_hash":"Checksum, access_hash parameter value from {@link RawSecureFile}"}},"inputPhotoLegacyFileLocation":{"comment":"DEPRECATED legacy photo file location","arguments":{"id":"Photo ID","access_hash":"Access hash","file_reference":"File reference","volume_id":"Volume ID","local_id":"Local ID","secret":"Secret"}},"inputPhotoFileLocation":{"comment":"Use this object to download a photo with {@link upload.RawGetFileRequest} method","arguments":{"id":"Photo ID, obtained from the {@link RawPhoto} object","access_hash":"Photo's access hash, obtained from the {@link RawPhoto} object","file_reference":"File reference","thumb_size":"The PhotoSize to download: must be set to the type field of the desired PhotoSize object of the {@link RawPhoto}"}},"peerUser":{"comment":"Chat partner","arguments":{"user_id":"User identifier"}},"peerChat":{"comment":"Group.","arguments":{"chat_id":"Group identifier"}},"inputStickerSetThumb":{"comment":"Location of stickerset thumbnail (see files)","arguments":{"stickerset":"Sticker set","thumb_version":"Thumbnail version"}},"storage.filePartial":{"comment":"Part of a bigger file.","arguments":{"gigagroup":"Is this a broadcast group?"}},"storage.fileUnknown":{"comment":"Unknown type.","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputTakeoutFileLocation":{"comment":"Used to download a JSON file that will contain all personal data related to features that do not have a specialized takeout method yet, see here » for more info on the takeout API.","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputGroupCallStream":{"comment":"Chunk of a livestream","arguments":{"flags":"Flags, see TL conditional fields","call":"Livestream info","time_ms":"Timestamp in milliseconds","scale":"Specifies the duration of the video segment to fetch in milliseconds, by bitshifting 1000 to the right scale times: duration_ms := 1000 >> scale","video_channel":"Selected video channel","video_quality":"Selected video quality (0 = lowest, 1 = medium, 2 = best)"}},"peerChannel":{"comment":"Channel/supergroup","arguments":{"channel_id":"Channel ID"}},"storage.fileGif":{"comment":"GIF image. MIME type: image/gif.","arguments":{"gigagroup":"Is this a broadcast group?"}},"storage.fileJpeg":{"comment":"JPEG image. MIME type: image/jpeg.","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputFileLocation":{"comment":"DEPRECATED location of a photo","arguments":{"volume_id":"Server volume","local_id":"File identifier","secret":"Check sum to access the file","file_reference":"File reference"}},"inputPeerPhotoFileLocation":{"comment":"Location of profile photo of channel/group/supergroup/user","arguments":{"flags":"Flags, see TL conditional fields","big":"Whether to download the high-quality version of the picture","peer":"The peer whose profile picture should be downloaded","photo_id":"Photo ID"}},"storage.filePng":{"comment":"PNG image. MIME type: image/png.","arguments":{"gigagroup":"Is this a broadcast group?"}},"storage.filePdf":{"comment":"PDF document image. MIME type: application/pdf.","arguments":{"gigagroup":"Is this a broadcast group?"}},"storage.fileMp3":{"comment":"Mp3 audio. MIME type: audio/mpeg.","arguments":{"gigagroup":"Is this a broadcast group?"}},"storage.fileMov":{"comment":"Quicktime video. MIME type: video/quicktime.","arguments":{"gigagroup":"Is this a broadcast group?"}},"storage.fileMp4":{"comment":"MPEG-4 video. MIME type: video/mp4.","arguments":{"gigagroup":"Is this a broadcast group?"}},"userEmpty":{"comment":"Empty constructor, non-existent user.","arguments":{"id":"User identifier or 0"}},"userProfilePhotoEmpty":{"comment":"Profile photo has not been set, or was hidden.","arguments":{"gigagroup":"Is this a broadcast group?"}},"storage.fileWebp":{"comment":"WEBP image. MIME type: image/webp.","arguments":{"gigagroup":"Is this a broadcast group?"}},"userStatusEmpty":{"comment":"User status has not been set yet.","arguments":{"gigagroup":"Is this a broadcast group?"}},"user":{"comment":"Indicates info about a certain user.\n\nUnless specified otherwise, when updating the local peer database, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).\n\nSee here » for an implementation of the logic to use when updating the local user peer database.","arguments":{"flags":"Flags, see TL conditional fields","self":"Whether this user indicates the currently logged in user","contact":"Whether this user is a contact
    When updating the local peer database, do not apply changes to this field if the min flag is set.","mutual_contact":"Whether this user is a mutual contact.
    When updating the local peer database, do not apply changes to this field if the min flag is set.","deleted":"Whether the account of this user was deleted.
    Changes to this flag should invalidate the local {@link RawUserFull} cache for this user ID, see here » for more info.","bot":"Is this user a bot?
    Changes to this flag should invalidate the local {@link RawUserFull} cache for this user ID, see here » for more info.","bot_chat_history":"Can the bot see all messages in groups?","bot_nochats":"Can the bot be added to groups?","verified":"Whether this user is verified","restricted":"Access to this user must be restricted for the reason specified in restriction_reason","min":"See min","bot_inline_geo":"Whether the bot can request our geolocation in inline mode","support":"Whether this is an official support user","scam":"This may be a scam user","apply_min_photo":"If set and min is set, the value of photo can be used to update the local database, see the documentation of that flag for more info.","fake":"If set, this user was reported by many users as a fake or scam user: be careful when interacting with them.","bot_attach_menu":"Whether this bot offers an attachment menu web app","premium":"Whether this user is a Telegram Premium user
    Changes to this flag should invalidate the local {@link RawUserFull} cache for this user ID, see here » for more info.
    Changes to this flag if the self flag is set should also trigger the following calls, to refresh the respective caches:
    - The {@link help.RawGetConfigRequest} cache
    - The {@link messages.RawGetTopReactionsRequest} cache if the bot flag is not set","attach_menu_enabled":"Whether we installed the attachment menu web app offered by this bot.
    When updating the local peer database, do not apply changes to this field if the min flag is set.","flags2":"Flags, see TL conditional fields","bot_can_edit":"Whether we can edit the profile picture, name, about text and description of this bot because we own it.
    When updating the local peer database, do not apply changes to this field if the min flag is set.
    Changes to this flag (if min is not set) should invalidate the local {@link RawUserFull} cache for this user ID.","close_friend":"Whether we marked this user as a close friend, see here » for more info.
    When updating the local peer database, do not apply changes to this field if the min flag is set.","stories_hidden":"Whether we have hidden » all active stories of this user.
    When updating the local peer database, do not apply changes to this field if the min flag is set.","stories_unavailable":"No stories from this user are visible.","contact_require_premium":"If set, we can only write to this user if they have already sent some messages to us, if we are subscribed to Telegram Premium, or if they're a mutual contact ({@link RawUser}.mutual_contact).
    All the secondary conditions listed above must be checked separately to verify whether we can still write to the user, even if this flag is set (i.e. a mutual contact will have this flag set even if we can still write to them, and so on...); to avoid doing these extra checks if we haven't yet cached all the required information (for example while displaying the chat list in the sharing UI) the {@link users.RawGetIsPremiumRequiredToContactRequest} method may be invoked instead, passing the list of users currently visible in the UI, returning a list of booleans that directly specify whether we can or cannot write to each user; alternatively, the {@link RawUserFull}.contact_require_premium flag contains the same (fully checked, i.e. it's not just a copy of this flag) info returned by {@link users.RawGetIsPremiumRequiredToContactRequest}.
    To set this flag for ourselves invoke {@link account.RawSetGlobalPrivacySettingsRequest}, setting the settings.new_noncontact_peers_require_premium flag.","bot_business":"Whether this bot can be connected to a user as specified here ».","bot_has_main_app":"If set, this bot has configured a Main Mini App ».","id":"ID of the user, see here » for more info.","access_hash":"Access hash of the user, see here » for more info.
    If this flag is set, when updating the local peer database, generate a virtual flag called min_access_hash, which is:
    - Set to true if min is set AND
    - The phone flag is not set OR
    - The phone flag is set and the associated phone number string is non-empty
    - Set to false otherwise.

    Then, apply both access_hash and min_access_hash to the local database if:
    - min_access_hash is false OR
    - min_access_hash is true AND
    - There is no locally cached object for this user OR
    - There is no access_hash in the local cache OR
    - The cached object's min_access_hash is also true
    If the final merged object stored to the database has the min_access_hash field set to true, the related access_hash is only suitable to use in {@link RawInputPeerPhotoFileLocation}, to directly download the profile pictures of users, everywhere else a inputPeer*FromMessage constructor will have to be generated as specified here ».
    Bots can also use min access hashes in some conditions, by passing 0 instead of the min access hash.","first_name":"First name.
    When updating the local peer database, apply changes to this field only if:
    - The min flag is not set OR
    - The min flag is set AND
    - The min flag of the locally cached user entry is set.","last_name":"Last name.
    When updating the local peer database, apply changes to this field only if:
    - The min flag is not set OR
    - The min flag is set AND
    - The min flag of the locally cached user entry is set.","username":"Main active username.
    When updating the local peer database, apply changes to this field only if:
    - The min flag is not set OR
    - The min flag is set AND
    - The min flag of the locally cached user entry is set.
    Changes to this flag should invalidate the local {@link RawUserFull} cache for this user ID if the above conditions are respected and the bot_can_edit flag is also set.","phone":"Phone number.
    When updating the local peer database, apply changes to this field only if:
    - The min flag is not set OR
    - The min flag is set AND
    - The min flag of the locally cached user entry is set.","photo":"Profile picture of user.
    When updating the local peer database, apply changes to this field only if:
    - The min flag is not set OR
    - The min flag is set AND
    - The apply_min_photo flag is set OR
    - The min flag of the locally cached user entry is set.","status":"Online status of user.
    When updating the local peer database, apply changes to this field only if:
    - The min flag is not set OR
    - The min flag is set AND
    - The min flag of the locally cached user entry is set OR
    - The locally cached user entry is equal to {@link RawUserStatusEmpty}.","bot_info_version":"Version of the {@link RawUserFull}, incremented every time it changes.
    Changes to this flag should invalidate the local {@link RawUserFull} cache for this user ID, see here » for more info.","restriction_reason":"Contains the reason why access to this user must be restricted.","bot_inline_placeholder":"Inline placeholder for this inline bot","lang_code":"Language code of the user","emoji_status":"Emoji status","usernames":"Additional usernames.
    When updating the local peer database, apply changes to this field only if:
    - The min flag is not set OR
    - The min flag is set AND
    - The min flag of the locally cached user entry is set.
    Changes to this flag (if the above conditions are respected) should invalidate the local {@link RawUserFull} cache for this user ID.","stories_max_id":"ID of the maximum read story.
    When updating the local peer database, do not apply changes to this field if the min flag of the incoming constructor is set.","color":"The user's accent color.","profile_color":"The user's profile color.","bot_active_users":"Monthly Active Users (MAU) of this bot (may be absent for small bots)."}},"userStatusRecently":{"comment":"Online status: last seen recently","arguments":{"flags":"Flags, see TL conditional fields","by_me":"If set, the exact user status of this user is actually available to us, but to view it we must first purchase a Premium subscription, or allow this user to see our exact last online status. See {@link RawPrivacyKeyStatusTimestamp} for more info."}},"userStatusLastWeek":{"comment":"Online status: last seen last week","arguments":{"flags":"Flags, see TL conditional fields","by_me":"If set, the exact user status of this user is actually available to us, but to view it we must first purchase a Premium subscription, or allow this user to see our exact last online status. See {@link RawPrivacyKeyStatusTimestamp} for more info."}},"userStatusOffline":{"comment":"The user's offline status.","arguments":{"was_online":"Time the user was last seen online"}},"userStatusLastMonth":{"comment":"Online status: last seen last month","arguments":{"flags":"Flags, see TL conditional fields","by_me":"If set, the exact user status of this user is actually available to us, but to view it we must first purchase a Premium subscription, or allow this user to see our exact last online status. See {@link RawPrivacyKeyStatusTimestamp} for more info."}},"userStatusOnline":{"comment":"Online status of the user.","arguments":{"expires":"Time to expiration of the current online status"}},"userProfilePhoto":{"comment":"User profile photo.","arguments":{"flags":"Flags, see TL conditional fields","has_video":"Whether an animated profile picture is available for this user","personal":"Whether this profile photo is only visible to us (i.e. it was set using {@link photos.RawUploadContactProfilePhotoRequest}).","photo_id":"Identifier of the respective photo","stripped_thumb":"Stripped thumbnail","dc_id":"DC ID where the photo is stored"}},"chatEmpty":{"comment":"Empty constructor, group doesn't exist","arguments":{"id":"Group identifier"}},"chat":{"comment":"Info about a group.\n\nWhen updating the local peer database, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).\n\nSee here » for an implementation of the logic to use when updating the local user peer database.","arguments":{"flags":"Flags, see TL conditional fields","creator":"Whether the current user is the creator of the group","left":"Whether the current user has left the group","deactivated":"Whether the group was migrated","call_active":"Whether a group call is currently active","call_not_empty":"Whether there's anyone in the group call","noforwards":"Whether this group is protected, thus does not allow forwarding messages from it","id":"ID of the group, see here » for more info","title":"Title","photo":"Chat photo","participants_count":"Participant count","date":"Date of creation of the group","version":"Used in basic groups to reorder updates and make sure that all of them were received.","migrated_to":"Means this chat was upgraded to a supergroup","admin_rights":"Admin rights of the user in the group","default_banned_rights":"Default banned rights of all users in the group"}},"chatForbidden":{"comment":"A group to which the user has no access. E.g., because the user was kicked from the group.","arguments":{"id":"User identifier","title":"Group name"}},"channel":{"comment":"Channel/supergroup info\n\nWhen updating the local peer database, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).\n\nThe only exception to the above rule is when the min flag is set, in which case only the following fields must be applied over any locally stored version:\n\nSee here » for an implementation of the logic to use when updating the local user peer database.","arguments":{"flags":"Flags, see TL conditional fields","creator":"Whether the current user is the creator of this channel","left":"Whether the current user has left or is not a member of this channel","broadcast":"Is this a channel?","verified":"Is this channel verified by telegram?","megagroup":"Is this a supergroup?
    Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info.","restricted":"Whether viewing/writing in this channel for a reason (see restriction_reason)","signatures":"Whether signatures are enabled (channels)","min":"See min","scam":"This channel/supergroup is probably a scam
    Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info.","has_link":"Whether this channel has a linked discussion group » (or this supergroup is a channel's discussion group). The actual ID of the linked channel/supergroup is contained in {@link RawChannelFull}.linked_chat_id.
    Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info.","has_geo":"Whether this channel has a geo position","slowmode_enabled":"Whether slow mode is enabled for groups to prevent flood in chat.
    Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info.","call_active":"Whether a group call or livestream is currently active","call_not_empty":"Whether there's anyone in the group call or livestream","fake":"If set, this supergroup/channel was reported by many users as a fake or scam: be careful when interacting with it.
    Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info.","gigagroup":"Whether this supergroup is a gigagroup
    Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info.","noforwards":"Whether this channel or group is protected, thus does not allow forwarding messages from it","join_to_send":"Whether a user needs to join the supergroup before they can send messages: can be false only for discussion groups », toggle using {@link channels.RawToggleJoinToSendRequest}
    Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info.","join_request":"Whether a user's join request will have to be approved by administrators, toggle using {@link channels.RawToggleJoinRequestRequest}
    Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info.","forum":"Whether this supergroup is a forum.
    Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info.","flags2":"Flags, see TL conditional fields","stories_hidden":"Whether we have hidden all stories posted by this channel ».","stories_hidden_min":"If set, indicates that the stories_hidden flag was not populated, and its value must cannot be relied on; use the previously cached value, or re-fetch the constructor using {@link channels.RawGetChannelsRequest} to obtain the latest value of the stories_hidden flag.","stories_unavailable":"No stories from the channel are visible.","id":"ID of the channel, see here » for more info","access_hash":"Access hash, see here » for more info","title":"Title","username":"Main active username.","photo":"Profile photo","date":"Date when the user joined the supergroup/channel, or if the user isn't a member, its creation date","restriction_reason":"Contains the reason why access to this channel must be restricted.
    Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info.","admin_rights":"Admin rights of the user in this channel (see rights)","banned_rights":"Banned rights of the user in this channel (see rights)","default_banned_rights":"Default chat rights (see rights)","participants_count":"Participant count","usernames":"Additional usernames","stories_max_id":"ID of the maximum read story.","color":"The channel's accent color.","profile_color":"The channel's profile color.","emoji_status":"Emoji status","level":"Boost level.
    Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info."}},"chatFull":{"comment":"Full info about a basic group.\n\nWhen updating the local peer database », all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).","arguments":{"flags":"Flags, see TL conditional fields","can_set_username":"Can we change the username of this chat","has_scheduled":"Whether scheduled messages are available","translations_disabled":"Whether the real-time chat translation popup should be hidden.","id":"ID of the chat","about":"About string for this chat","participants":"Participant list","chat_photo":"Chat photo","notify_settings":"Notification settings","exported_invite":"Chat invite","bot_info":"Info about bots that are in this chat","pinned_msg_id":"Message ID of the last pinned message","folder_id":"Peer folder ID, for more info click here","call":"Group call information","ttl_period":"Time-To-Live of messages sent by the current user to this chat","groupcall_default_join_as":"When using {@link phone.RawGetGroupCallJoinAsRequest} to get a list of peers that can be used to join a group call, this field indicates the peer that should be selected by default.","theme_emoticon":"Emoji representing a specific chat theme","requests_pending":"Pending join requests »","recent_requesters":"IDs of users who requested to join recently","available_reactions":"Allowed message reactions »","reactions_limit":"This flag may be used to impose a custom limit of unique reactions (i.e. a customizable version of appConfig.reactions_uniq_max)."}},"channelFull":{"comment":"Full info about a channel, supergroup or gigagroup.\n\nWhen updating the local peer database », all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).","arguments":{"flags":"Flags, see TL conditional fields","can_view_participants":"Can we view the participant list?","can_set_username":"Can we set the channel's username?","can_set_stickers":"Can we {@link channels.RawSetStickersRequest} a stickerpack to the supergroup?","hidden_prehistory":"Is the history before we joined hidden to us?","can_set_location":"Can we set the geolocation of this group (for geogroups)","has_scheduled":"Whether scheduled messages are available","can_view_stats":"Can the user view channel/supergroup statistics","blocked":"Whether any anonymous admin of this supergroup was blocked: if set, you won't receive messages from anonymous group admins in discussion replies via @replies","flags2":"Flags, see TL conditional fields","can_delete_channel":"Can we delete this channel?","antispam":"Whether native antispam functionality is enabled in this supergroup.","participants_hidden":"Whether the participant list is hidden.","translations_disabled":"Whether the real-time chat translation popup should be hidden.","stories_pinned_available":"Whether this user has some pinned stories.","view_forum_as_messages":"Users may also choose to display messages from all topics of a forum as if they were sent to a normal group, using a \"View as messages\" setting in the local client.
    This setting only affects the current account, and is synced to other logged in sessions using the {@link channels.RawToggleViewForumAsMessagesRequest} method; invoking this method will update the value of this flag.","restricted_sponsored":"Whether ads on this channel were disabled as specified here » (this flag is only visible to the owner of the channel).","can_view_revenue":"If set, this user can view ad revenue statistics » for this channel.","paid_media_allowed":"Whether the current user can send or forward paid media » to this channel.","can_view_stars_revenue":"If set, this user can view Telegram Star revenue statistics » for this channel.","id":"ID of the channel","about":"Info about the channel","participants_count":"Number of participants of the channel","admins_count":"Number of channel admins","kicked_count":"Number of users kicked from the channel","banned_count":"Number of users banned from the channel","online_count":"Number of users currently online","read_inbox_max_id":"Position up to which all incoming messages are read.","read_outbox_max_id":"Position up to which all outgoing messages are read.","unread_count":"Count of unread messages","chat_photo":"Channel picture","notify_settings":"Notification settings","exported_invite":"Invite link","bot_info":"Info about bots in the channel/supergroup","migrated_from_chat_id":"The chat ID from which this group was migrated","migrated_from_max_id":"The message ID in the original chat at which this group was migrated","pinned_msg_id":"Message ID of the last pinned message","stickerset":"Associated stickerset","available_min_id":"Identifier of a maximum unavailable message in a channel due to hidden history.","folder_id":"Peer folder ID, for more info click here","linked_chat_id":"ID of the linked discussion chat for channels (and vice versa, the ID of the linked channel for discussion chats).","location":"Location of the geo group","slowmode_seconds":"If specified, users in supergroups will only be able to send one message every slowmode_seconds seconds","slowmode_next_send_date":"Indicates when the user will be allowed to send another message in the supergroup (unixtime)","stats_dc":"If set, specifies the DC to use for fetching channel statistics","pts":"Latest PTS for this channel","call":"Livestream or group call information","ttl_period":"Time-To-Live of messages in this channel or supergroup","pending_suggestions":"A list of suggested actions for the supergroup admin, see here for more info ».","groupcall_default_join_as":"When using {@link phone.RawGetGroupCallJoinAsRequest} to get a list of peers that can be used to join a group call, this field indicates the peer that should be selected by default.","theme_emoticon":"Emoji representing a specific chat theme","requests_pending":"Pending join requests »","recent_requesters":"IDs of users who requested to join recently","default_send_as":"Default peer used for sending messages to this channel","available_reactions":"Allowed message reactions »","reactions_limit":"This flag may be used to impose a custom limit of unique reactions (i.e. a customizable version of appConfig.reactions_uniq_max).","stories":"Channel stories","wallpaper":"Wallpaper","boosts_applied":"The number of boosts the current user has applied to the current supergroup.","boosts_unrestrict":"The number of boosts this supergroup requires to bypass slowmode and other restrictions, see here » for more info.","emojiset":"Custom emoji stickerset associated to the current supergroup, set using {@link channels.RawSetEmojiStickersRequest} after reaching the appropriate boost level, see here » for more info."}},"chatParticipant":{"comment":"Group member.","arguments":{"user_id":"Member user ID","inviter_id":"ID of the user that added the member to the group","date":"Date added to the group"}},"channelForbidden":{"comment":"Indicates a channel/supergroup we can't access because we were banned, or for some other reason.","arguments":{"flags":"Flags, see TL conditional fields","broadcast":"Is this a channel","megagroup":"Is this a supergroup","id":"Channel ID","access_hash":"Access hash","title":"Title","until_date":"The ban is valid until the specified date"}},"chatParticipantCreator":{"comment":"Represents the creator of the group","arguments":{"user_id":"ID of the user that created the group"}},"chatParticipantAdmin":{"comment":"Chat admin","arguments":{"user_id":"ID of a group member that is admin","inviter_id":"ID of the user that added the member to the group","date":"Date when the user was added"}},"chatPhoto":{"comment":"Group profile photo.","arguments":{"flags":"Flags, see TL conditional fields","has_video":"Whether the user has an animated profile picture","photo_id":"Photo ID","stripped_thumb":"Stripped thumbnail","dc_id":"DC where this photo is stored"}},"chatParticipants":{"comment":"Group members.","arguments":{"chat_id":"Group identifier","participants":"List of group members","version":"Group version number"}},"messageEmpty":{"comment":"Empty constructor, non-existent message.","arguments":{"flags":"Flags, see TL conditional fields","id":"Message identifier","peer_id":"Peer ID, the chat where this message was sent"}},"chatPhotoEmpty":{"comment":"Group photo is not set.","arguments":{"gigagroup":"Is this a broadcast group?"}},"chatParticipantsForbidden":{"comment":"Info on members is unavailable","arguments":{"flags":"Flags, see TL conditional fields","chat_id":"Group ID","self_participant":"Info about the group membership of the current user"}},"messageService":{"comment":"Indicates a service message","arguments":{"flags":"Flags, see TL conditional fields","out":"Whether the message is outgoing","mentioned":"Whether we were mentioned in the message","media_unread":"Whether the message contains unread media","silent":"Whether the message is silent","post":"Whether it's a channel post","legacy":"This is a legacy message: it has to be refetched with the new layer","id":"Message ID","from_id":"ID of the sender of this message","peer_id":"Sender of service message","reply_to":"Reply (thread) information","date":"Message date","action":"Event connected with the service message","ttl_period":"Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well."}},"message":{"comment":"A message","arguments":{"flags":"Flags, see TL conditional fields","out":"Is this an outgoing message","mentioned":"Whether we were mentioned in this message","media_unread":"Whether there are unread media attachments in this message","silent":"Whether this is a silent message (no notification triggered)","post":"Whether this is a channel post","from_scheduled":"Whether this is a scheduled message","legacy":"This is a legacy message: it has to be refetched with the new layer","edit_hide":"Whether the message should be shown as not modified to the user, even if an edit date is present","pinned":"Whether this message is pinned","noforwards":"Whether this message is protected and thus cannot be forwarded; clients should also prevent users from saving attached media (i.e. videos should only be streamed, photos should be kept in RAM, et cetera).","invert_media":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.","flags2":"Flags, see TL conditional fields","offline":"If set, the message was sent because of a scheduled action by the message sender, for example, as away, or a greeting service message.","id":"ID of the message","from_id":"ID of the sender of the message","from_boosts_applied":"Supergroups only, contains the number of boosts this user has given the current supergroup, and should be shown in the UI in the header of the message.
    Only present for incoming messages from non-anonymous supergroup members that have boosted the supergroup.
    Note that this counter should be locally overridden for non-anonymous outgoing messages, according to the current value of {@link RawChannelFull}.boosts_applied, to ensure the value is correct even for messages sent by the current user before a supergroup was boosted (or after a boost has expired or the number of boosts has changed); do not update this value for incoming messages from other users, even if their boosts have changed.","peer_id":"Peer ID, the chat where this message was sent","saved_peer_id":"Messages fetched from a saved messages dialog » will have peer={@link RawInputPeerSelf} and the saved_peer_id flag set to the ID of the saved dialog.
    ","fwd_from":"Info about forwarded messages","via_bot_id":"ID of the inline bot that generated the message","via_business_bot_id":"Whether the message was sent by the business bot specified in via_bot_id on behalf of the user.","reply_to":"Reply information","date":"Date of the message","message":"The message","media":"Media attachment","reply_markup":"Reply markup (bot/inline keyboards)","entities":"Message entities for styled text","views":"View count for channel posts","forwards":"Forward counter","replies":"Info about post comments (for channels) or message replies (for groups)","edit_date":"Last edit date of this message","post_author":"Name of the author of this message for channel posts (with signatures enabled)","grouped_id":"Multiple media messages sent using {@link messages.RawSendMultiMediaRequest} with the same grouped ID indicate an album or media group","reactions":"Reactions to this message","restriction_reason":"Contains the reason why access to this message must be restricted.","ttl_period":"Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well.","quick_reply_shortcut_id":"If set, this message is a quick reply shortcut message » (note that quick reply shortcut messages sent to a private chat will not have this field set).","effect":"A message effect that should be played as specified here ».","factcheck":"Represents a fact-check »."}},"messageMediaPhoto":{"comment":"Attached photo.","arguments":{"flags":"Flags, see TL conditional fields","spoiler":"Whether this media should be hidden behind a spoiler warning","photo":"Photo","ttl_seconds":"Time to live in seconds of self-destructing photo"}},"messageMediaEmpty":{"comment":"Empty constructor.","arguments":{"gigagroup":"Is this a broadcast group?"}},"messageMediaGeo":{"comment":"Attached map.","arguments":{"geo":"GeoPoint"}},"messageMediaUnsupported":{"comment":"Current version of the client does not support this media type.","arguments":{"gigagroup":"Is this a broadcast group?"}},"messageMediaWebPage":{"comment":"Preview of webpage","arguments":{"flags":"Flags, see TL conditional fields","force_large_media":"If set, specifies that a large media preview should be used.","force_small_media":"If set, specifies that a small media preview should be used.","manual":"If set, indicates that the URL used for the webpage preview was specified manually using {@link RawInputMediaWebPage}, and may not be related to any of the URLs specified in the message.","safe":"If set, the webpage can be opened directly without user confirmation; otherwise, user confirmation is required, showing the exact URL that will be opened.","webpage":"Webpage preview"}},"messageMediaContact":{"comment":"Attached contact.","arguments":{"phone_number":"Phone number","first_name":"Contact's first name","last_name":"Contact's last name","vcard":"VCARD of contact","user_id":"User identifier or 0, if the user with the given phone number is not registered"}},"messageMediaDocument":{"comment":"Document (video, audio, voice, sticker, any media type except photo)","arguments":{"flags":"Flags, see TL conditional fields","nopremium":"Whether this is a normal sticker, if not set this is a premium sticker and a premium sticker animation must be played.","spoiler":"Whether this media should be hidden behind a spoiler warning","video":"Whether this is a video.","round":"Whether this is a round video.","voice":"Whether this is a voice message.","document":"Attached document","alt_document":"Currently only used for story videos, may contain an alternative version of the story video, explicitly encoded using H.264 (in MPEG4 transport) at a lower resolution than document.","ttl_seconds":"Time to live of self-destructing document"}},"messageMediaVenue":{"comment":"Venue","arguments":{"geo":"Geolocation of venue","title":"Venue name","address":"Address","provider":"Venue provider: currently only \"foursquare\" and \"gplaces\" (Google Places) need to be supported","venue_id":"Venue ID in the provider's database","venue_type":"Venue type in the provider's database"}},"messageMediaGame":{"comment":"Telegram game","arguments":{"game":"Game"}},"messageMediaInvoice":{"comment":"Invoice","arguments":{"flags":"Flags, see TL conditional fields","shipping_address_requested":"Whether the shipping address was requested","test":"Whether this is an example invoice","title":"Product name, 1-32 characters","description":"Product description, 1-255 characters","photo":"URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.","receipt_msg_id":"Message ID of receipt: if set, clients should change the text of the first {@link RawKeyboardButtonBuy} button always attached to the {@link RawMessage} to a localized version of the word Receipt","currency":"Three-letter ISO 4217 currency code, or XTR for Telegram Stars.","total_amount":"Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).","start_param":"Unique bot deep-linking parameter that can be used to generate this invoice","extended_media":"Deprecated"}},"messageMediaGeoLive":{"comment":"Indicates a live geolocation","arguments":{"flags":"Flags, see TL conditional fields","geo":"Geolocation","heading":"For live locations, a direction in which the location moves, in degrees; 1-360","period":"Validity period of provided geolocation","proximity_notification_radius":"For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000)."}},"messageMediaDice":{"comment":"Dice-based animated sticker","arguments":{"value":"Dice value","emoticon":"The emoji, for now \"🏀\", \"🎲\" and \"🎯\" are supported"}},"messageMediaStory":{"comment":"Represents a forwarded story or a story mention.","arguments":{"flags":"Flags, see TL conditional fields","via_mention":"If set, indicates that this someone has mentioned us in this story (i.e. by tagging us in the description) or vice versa, we have mentioned the other peer (if the message is outgoing).","peer":"Peer that posted the story.","id":"Story ID","story":"The story itself, if absent fetch it using {@link stories.RawGetStoriesByIDRequest} and the peer/id parameters specified above."}},"messageMediaGiveaway":{"comment":"Contains info about a giveaway, see here » for more info.","arguments":{"flags":"Flags, see TL conditional fields","only_new_subscribers":"If set, only new subscribers starting from the giveaway creation date will be able to participate to the giveaway.","winners_are_visible":"If set, giveaway winners are public and will be listed in a {@link RawMessageMediaGiveawayResults} message that will be automatically sent to the channel once the giveaway ends.","channels":"The channels that the user must join to participate in the giveaway.","countries_iso2":"If set, only users residing in these countries can participate in the giveaway, (specified as a list of two-letter ISO 3166-1 alpha-2 country codes); otherwise there are no country-based limitations.","prize_description":"Can contain a textual description of additional giveaway prizes.","quantity":"Number of Telegram Premium subscriptions given away.","months":"Duration in months of each Telegram Premium subscription in the giveaway.","until_date":"The end date of the giveaway."}},"messageMediaPoll":{"comment":"Poll","arguments":{"poll":"The poll","results":"The results of the poll"}},"messageMediaGiveawayResults":{"comment":"A giveaway with public winners has finished, this constructor contains info about the winners.","arguments":{"flags":"Flags, see TL conditional fields","only_new_subscribers":"If set, only new subscribers starting from the giveaway creation date participated in the giveaway.","refunded":"If set, the giveaway was canceled and was fully refunded.","channel_id":"ID of the channel/supergroup that was automatically boosted by the winners of the giveaway for duration of the Premium subscription.","additional_peers_count":"Number of other channels that participated in the giveaway.","launch_msg_id":"Identifier of the message with the giveaway in channel_id.","winners_count":"Total number of winners in the giveaway.","unclaimed_count":"Number of not-yet-claimed prizes.","winners":"Up to 100 user identifiers of the winners of the giveaway.","months":"Duration in months of each Telegram Premium subscription in the giveaway.","prize_description":"Can contain a textual description of additional giveaway prizes.","until_date":"Point in time (UNIX timestamp in seconds) when the winners were selected. May be bigger than winners selection date specified in initial parameters of the giveaway."}},"messageMediaPaidMedia":{"comment":"Paid media, see here » for more info.","arguments":{"stars_amount":"The price of the media in Telegram Stars.","extended_media":"Either the paid-for media, or super low resolution media previews if the media wasn't purchased yet, see here » for more info."}},"messageActionEmpty":{"comment":"Empty constructor.","arguments":{"gigagroup":"Is this a broadcast group?"}},"messageActionChatCreate":{"comment":"Group created","arguments":{"title":"Group name","users":"List of group members"}},"messageActionChatEditTitle":{"comment":"Group name changed.","arguments":{"title":"New group name"}},"messageActionChatEditPhoto":{"comment":"Group profile changed","arguments":{"photo":"New group profile photo"}},"messageActionChatDeletePhoto":{"comment":"Group profile photo removed.","arguments":{"gigagroup":"Is this a broadcast group?"}},"messageActionChatAddUser":{"comment":"New member in the group","arguments":{"users":"Users that were invited to the chat"}},"messageActionChatDeleteUser":{"comment":"User left the group.","arguments":{"user_id":"Leaving user ID"}},"messageActionChatMigrateTo":{"comment":"Indicates the chat was migrated to the specified supergroup","arguments":{"channel_id":"The supergroup it was migrated to"}},"messageActionChannelCreate":{"comment":"The channel was created","arguments":{"title":"Original channel/supergroup title"}},"messageActionPinMessage":{"comment":"A message was pinned","arguments":{"gigagroup":"Is this a broadcast group?"}},"messageActionChatJoinedByLink":{"comment":"A user joined the chat via an invite link","arguments":{"inviter_id":"ID of the user that created the invite link"}},"messageActionChannelMigrateFrom":{"comment":"Indicates the channel was migrated from the specified chat","arguments":{"title":"The old chat title","chat_id":"The old chat ID"}},"messageActionHistoryClear":{"comment":"Chat history was cleared","arguments":{"gigagroup":"Is this a broadcast group?"}},"messageActionGameScore":{"comment":"Someone scored in a game","arguments":{"game_id":"Game ID","score":"Score"}},"messageActionPaymentSent":{"comment":"A payment was sent","arguments":{"flags":"Flags, see TL conditional fields","recurring_init":"Whether this is the first payment of a recurring payment we just subscribed to","recurring_used":"Whether this payment is part of a recurring payment","currency":"Three-letter ISO 4217 currency code, or XTR for Telegram Stars.","total_amount":"Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).","invoice_slug":"An invoice slug taken from an invoice deep link or from the premium_invoice_slug app config parameter »"}},"messageActionPhoneCall":{"comment":"A phone call","arguments":{"flags":"Flags, see TL conditional fields","video":"Is this a video call?","call_id":"Call ID","reason":"If the call has ended, the reason why it ended","duration":"Duration of the call in seconds"}},"messageActionScreenshotTaken":{"comment":"A screenshot of the chat was taken","arguments":{"gigagroup":"Is this a broadcast group?"}},"messageActionCustomAction":{"comment":"Custom action (most likely not supported by the current layer, an upgrade might be needed)","arguments":{"message":"Action message"}},"messageActionBotAllowed":{"comment":"We have given the bot permission to send us direct messages.\n\nThe optional fields specify how did we authorize the bot to send us messages.","arguments":{"flags":"Flags, see TL conditional fields","attach_menu":"We have authorized the bot to send us messages by installing the bot's attachment menu.","from_request":"We have allowed the bot to send us messages using {@link bots.RawAllowSendMessageRequest}.","domain":"We have authorized the bot to send us messages by logging into a website via Telegram Login »; this field contains the domain name of the website on which the user has logged in.","app":"We have authorized the bot to send us messages by opening the specified bot mini app."}},"messageActionSecureValuesSentMe":{"comment":"Secure telegram passport values were received","arguments":{"values":"Vector with information about documents and other Telegram Passport elements that were shared with the bot","credentials":"Encrypted credentials required to decrypt the data"}},"messageActionPaymentSentMe":{"comment":"A user just sent a payment to me (a bot)","arguments":{"flags":"Flags, see TL conditional fields","recurring_init":"Whether this is the first payment of a recurring payment we just subscribed to","recurring_used":"Whether this payment is part of a recurring payment","currency":"Three-letter ISO 4217 currency code, or XTR for Telegram Stars.","total_amount":"Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).","payload":"Bot specified invoice payload","info":"Order info provided by the user","shipping_option_id":"Identifier of the shipping option chosen by the user","charge":"Provider payment identifier"}},"messageActionSecureValuesSent":{"comment":"Request for secure telegram passport values was sent","arguments":{"types":"Secure value types"}},"messageActionContactSignUp":{"comment":"A contact just signed up to telegram","arguments":{"gigagroup":"Is this a broadcast group?"}},"messageActionGroupCall":{"comment":"The group call has ended","arguments":{"flags":"Flags, see TL conditional fields","call":"Group call","duration":"Group call duration"}},"messageActionInviteToGroupCall":{"comment":"A set of users was invited to the group call","arguments":{"call":"The group call","users":"The invited users"}},"messageActionSetChatTheme":{"comment":"The chat theme was changed","arguments":{"emoticon":"The emoji that identifies a chat theme"}},"messageActionSetMessagesTTL":{"comment":"The Time-To-Live of messages in this chat was changed.","arguments":{"flags":"Flags, see TL conditional fields","period":"New Time-To-Live of all messages sent in this chat; if 0, autodeletion was disabled.","auto_setting_from":"If set, the chat TTL setting was set not due to a manual change by one of participants, but automatically because one of the participants has the {@link messages.RawSetDefaultHistoryTTLRequest}. For example, when a user writes to us for the first time and we have set a default messages TTL of 1 week, this service message (with auto_setting_from=our_userid) will be emitted before our first message."}},"messageActionGeoProximityReached":{"comment":"A user of the chat is now in proximity of another user","arguments":{"from_id":"The user or chat that is now in proximity of to_id","to_id":"The user or chat that subscribed to live geolocation proximity alerts","distance":"Distance, in meters (0-100000)"}},"messageActionWebViewDataSentMe":{"comment":"Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (bot side service message).","arguments":{"text":"Text of the {@link RawKeyboardButtonSimpleWebView} that was pressed to open the web app.","data":"Relayed data."}},"messageActionGroupCallScheduled":{"comment":"A group call was scheduled","arguments":{"call":"The group call","schedule_date":"When is this group call scheduled to start"}},"messageActionChatJoinedByRequest":{"comment":"A user was accepted into the group by an admin","arguments":{"gigagroup":"Is this a broadcast group?"}},"messageActionWebViewDataSent":{"comment":"Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (user side service message).\n\nClients should display a service message with the text Data from the «$text» button was transferred to the bot.","arguments":{"text":"Text of the {@link RawKeyboardButtonSimpleWebView} that was pressed to open the web app."}},"messageActionTopicCreate":{"comment":"A forum topic was created.","arguments":{"flags":"Flags, see TL conditional fields","title":"Topic name.","icon_color":"If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F.","icon_emoji_id":"ID of the custom emoji used as topic icon."}},"messageActionGiftPremium":{"comment":"Info about a gifted Telegram Premium subscription","arguments":{"flags":"Flags, see TL conditional fields","currency":"Three-letter ISO 4217 currency code","amount":"Price of the gift in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).","months":"Duration of the gifted Telegram Premium subscription","crypto_currency":"If the gift was bought using a cryptocurrency, the cryptocurrency name.","crypto_amount":"If the gift was bought using a cryptocurrency, price of the gift in the smallest units of a cryptocurrency."}},"messageActionRequestedPeer":{"comment":"Contains info about one or more peers that the we (the user) shared with the bot after clicking on a {@link RawKeyboardButtonRequestPeer} button (service message sent by the user).","arguments":{"button_id":"button_id contained in the {@link RawKeyboardButtonRequestPeer}","peers":"The shared peers"}},"messageActionSuggestProfilePhoto":{"comment":"A new profile picture was suggested using {@link photos.RawUploadContactProfilePhotoRequest}.","arguments":{"photo":"The photo that the user suggested we set as profile picture."}},"messageActionTopicEdit":{"comment":"Forum topic information was edited.","arguments":{"flags":"Flags, see TL conditional fields","title":"New topic title.","icon_emoji_id":"ID of the new custom emoji used as topic icon, or if it was removed.","closed":"Whether the topic was opened or closed.","hidden":"Whether the topic was hidden or unhidden (only valid for the \"General\" topic, id=1)."}},"messageActionSetChatWallPaper":{"comment":"The wallpaper » of the current chat was changed.","arguments":{"flags":"Flags, see TL conditional fields","same":"If set, indicates the user applied a wallpaper » previously sent by the other user in a {@link RawMessageActionSetChatWallPaper} message.","for_both":"If set, indicates the wallpaper was forcefully applied for both sides, without explicit confirmation from the other side.
    If the message is incoming, and we did not like the new wallpaper the other user has chosen for us, we can re-set our previous wallpaper just on our side, by invoking {@link messages.RawSetChatWallPaperRequest}, providing only the revert flag (and obviously the peer parameter).","wallpaper":"New wallpaper"}},"messageActionGiftCode":{"comment":"Contains a Telegram Premium giftcode link.","arguments":{"flags":"Flags, see TL conditional fields","via_giveaway":"If set, this gift code was received from a giveaway » started by a channel/supergroup we're subscribed to.","unclaimed":"If set, the link was not redeemed yet.","boost_peer":"Identifier of the channel/supergroup that created the gift code either directly or through a giveaway: if we import this giftcode link, we will also automatically boost this channel/supergroup.","months":"Duration in months of the gifted Telegram Premium subscription.","slug":"Slug of the Telegram Premium giftcode link","currency":"Three-letter ISO 4217 currency code","amount":"Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).","crypto_currency":"If set, the gift was made using the specified cryptocurrency.","crypto_amount":"If crypto_currency is set, contains the paid amount, in the smallest units of the cryptocurrency."}},"messageActionBoostApply":{"comment":"Some boosts » were applied to the channel or supergroup.","arguments":{"boosts":"Number of applied boosts."}},"messageActionGiveawayLaunch":{"comment":"A giveaway was started.","arguments":{"gigagroup":"Is this a broadcast group?"}},"messageActionRequestedPeerSentMe":{"comment":"Contains info about one or more peers that the a user shared with the me (the bot) after clicking on a {@link RawKeyboardButtonRequestPeer} button (service message received by the bot).","arguments":{"button_id":"button_id contained in the {@link RawKeyboardButtonRequestPeer}","peers":"Info about the shared peers."}},"messageActionGiveawayResults":{"comment":"A giveaway has ended.","arguments":{"winners_count":"Number of winners in the giveaway","unclaimed_count":"Number of undistributed prizes"}},"messageActionGiftStars":{"comment":"You gifted or were gifted some Telegram Stars.","arguments":{"flags":"Flags, see TL conditional fields","currency":"Three-letter ISO 4217 currency code","amount":"Price of the gift in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).","stars":"Amount of gifted stars","crypto_currency":"If the gift was bought using a cryptocurrency, the cryptocurrency name.","crypto_amount":"If the gift was bought using a cryptocurrency, price of the gift in the smallest units of a cryptocurrency.","transaction_id":"Identifier of the transaction, only visible to the receiver of the gift."}},"messageActionPaymentRefunded":{"comment":"Describes a payment refund (service message received by both users and bots).","arguments":{"flags":"Flags, see TL conditional fields","peer":"Identifier of the peer that returned the funds.","currency":"Currency, XTR for Telegram Stars.","total_amount":"Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).","payload":"Bot specified invoice payload (only received by bots).","charge":"Provider payment identifier"}},"dialog":{"comment":"Chat","arguments":{"flags":"Flags, see TL conditional fields","pinned":"Is the dialog pinned","unread_mark":"Whether the chat was manually marked as unread","view_forum_as_messages":"Users may also choose to display messages from all topics of a forum as if they were sent to a normal group, using a \"View as messages\" setting in the local client.
    This setting only affects the current account, and is synced to other logged in sessions using the {@link channels.RawToggleViewForumAsMessagesRequest} method; invoking this method will update the value of this flag.","peer":"The chat","top_message":"The latest message ID","read_inbox_max_id":"Position up to which all incoming messages are read.","read_outbox_max_id":"Position up to which all outgoing messages are read.","unread_count":"Number of unread messages","unread_mentions_count":"Number of unread mentions","unread_reactions_count":"Number of unread reactions to messages you sent","notify_settings":"Notification settings","pts":"PTS","draft":"Message draft","folder_id":"Peer folder ID, for more info click here","ttl_period":"Time-to-live of all messages sent in this dialog"}},"dialogFolder":{"comment":"Dialog in folder","arguments":{"flags":"Flags, see TL conditional fields","pinned":"Is this folder pinned","folder":"The folder","peer":"Peer in folder","top_message":"Latest message ID of dialog","unread_muted_peers_count":"Number of unread muted peers in folder","unread_unmuted_peers_count":"Number of unread unmuted peers in folder","unread_muted_messages_count":"Number of unread messages from muted peers in folder","unread_unmuted_messages_count":"Number of unread messages from unmuted peers in folder"}},"photoEmpty":{"comment":"Empty constructor, non-existent photo","arguments":{"id":"Photo identifier"}},"photo":{"comment":"Photo","arguments":{"flags":"Flags, see TL conditional fields","has_stickers":"Whether the photo has mask stickers attached to it","id":"ID","access_hash":"Access hash","file_reference":"file reference","date":"Date of upload","sizes":"Available sizes for download","video_sizes":"For animated profiles, the MPEG4 videos","dc_id":"DC ID to use for download"}},"photoSizeEmpty":{"comment":"Empty constructor. Image with this thumbnail is unavailable.","arguments":{"type":"Thumbnail type »"}},"photoStrippedSize":{"comment":"A low-resolution compressed JPG payload","arguments":{"type":"Thumbnail type","bytes":"Thumbnail data, see here for more info on decompression »"}},"photoCachedSize":{"comment":"Description of an image and its content.","arguments":{"type":"Thumbnail type","w":"Image width","h":"Image height","bytes":"Binary data, file content"}},"photoPathSize":{"comment":"Messages with animated stickers can have a compressed svg (< 300 bytes) to show the outline of the sticker before fetching the actual lottie animation.","arguments":{"type":"Always j","bytes":"Compressed SVG path payload, see here for decompression instructions"}},"photoSizeProgressive":{"comment":"Progressively encoded photosize","arguments":{"type":"Photosize type »","w":"Photo width","h":"Photo height","sizes":"Sizes of progressive JPEG file prefixes, which can be used to preliminarily show the image."}},"photoSize":{"comment":"Image description.","arguments":{"type":"Thumbnail type »","w":"Image width","h":"Image height","size":"File size"}},"geoPointEmpty":{"comment":"Empty constructor.","arguments":{"gigagroup":"Is this a broadcast group?"}},"geoPoint":{"comment":"GeoPoint.","arguments":{"flags":"Flags, see TL conditional fields","long":"Longitude","lat":"Latitude","access_hash":"Access hash","accuracy_radius":"The estimated horizontal accuracy of the location, in meters; as defined by the sender."}},"auth.sentCode":{"comment":"Contains info about a sent verification code.","arguments":{"flags":"Flags, see TL conditional fields","type":"Phone code type","phone_code_hash":"Phone code hash, to be stored and later re-used with {@link auth.RawSignInRequest}","next_type":"Phone code type that will be sent next, if the phone code is not received within timeout seconds: to send it use {@link auth.RawResendCodeRequest}","timeout":"Timeout for reception of the phone code"}},"auth.sentCodeSuccess":{"comment":"The user successfully authorized using future auth tokens","arguments":{"authorization":"Authorization info"}},"inputNotifyPeer":{"comment":"Notifications generated by a certain user or group.","arguments":{"peer":"User or group"}},"auth.authorization":{"comment":"Contains user authorization info.","arguments":{"flags":"Flags, see TL conditional fields","setup_password_required":"Suggests the user to set up a 2-step verification password to be able to log in again","otherwise_relogin_days":"Iff setup_password_required is set and the user declines to set a 2-step verification password, they will be able to log into their account via SMS again only after this many days pass.","tmp_sessions":"Temporary passport sessions","future_auth_token":"A future auth token","user":"Info on authorized user"}},"inputNotifyUsers":{"comment":"Notifications generated by all users.","arguments":{"gigagroup":"Is this a broadcast group?"}},"auth.exportedAuthorization":{"comment":"Data for copying of authorization between data centers.","arguments":{"id":"current user identifier","bytes":"authorizes key"}},"auth.authorizationSignUpRequired":{"comment":"An account with this phone number doesn't exist on telegram: the user has to enter basic information and sign up","arguments":{"flags":"Flags, see TL conditional fields","terms_of_service":"Telegram's terms of service: the user must read and accept the terms of service before signing up to telegram"}},"inputNotifyChats":{"comment":"Notifications generated by all groups.","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputNotifyBroadcasts":{"comment":"All channels","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputNotifyForumTopic":{"comment":"Notifications generated by a topic in a forum.","arguments":{"peer":"Forum ID","top_msg_id":"Topic ID"}},"inputPeerNotifySettings":{"comment":"Notification settings.","arguments":{"flags":"Flags, see TL conditional fields","show_previews":"If the text of the message shall be displayed in notification","silent":"Peer was muted?","mute_until":"Date until which all notifications shall be switched off","sound":"Identifier of an audio file to play for notifications.","stories_muted":"Whether story notifications should be disabled.","stories_hide_sender":"Whether the sender name should be displayed in story notifications.","stories_sound":"Identifier of an audio file to play for story notifications."}},"peerSettings":{"comment":"List of actions that are possible when interacting with this user, to be shown as suggested actions in the chat action bar », see here » for more info.","arguments":{"flags":"Flags, see TL conditional fields","report_spam":"Whether we can still report the user for spam","add_contact":"Whether we can add the user as contact","block_contact":"Whether we can block the user","share_contact":"Whether we can share the user's contact","need_contacts_exception":"Whether a special exception for contacts is needed","report_geo":"Whether we can report a geo group as irrelevant for this location","autoarchived":"Whether this peer was automatically archived according to {@link RawGlobalPrivacySettings} and can be unarchived","invite_members":"If set, this is a recently created group chat to which new members can be invited","request_chat_broadcast":"This flag is set if request_chat_title and request_chat_date fields are set and the join request » is related to a channel (otherwise if only the request fields are set, the join request » is related to a chat).","business_bot_paused":"This flag is set if both business_bot_id and business_bot_manage_url are set and all connected business bots » were paused in this chat using {@link account.RawToggleConnectedBotPausedRequest}.","business_bot_can_reply":"This flag is set if both business_bot_id and business_bot_manage_url are set and connected business bots » can reply to messages in this chat, as specified by the settings during initial configuration.","geo_distance":"Distance in meters between us and this peer","request_chat_title":"If set, this is a private chat with an administrator of a chat or channel to which the user sent a join request, and this field contains the chat/channel's title.","request_chat_date":"If set, this is a private chat with an administrator of a chat or channel to which the user sent a join request, and this field contains the timestamp when the join request » was sent.","business_bot_id":"Contains the ID of the business bot » managing this chat, used to display info about the bot in the action bar.","business_bot_manage_url":"Contains a deep link », used to open a management menu in the business bot. This flag is set if and only if business_bot_id is set."}},"wallPaper":{"comment":"Represents a wallpaper based on an image.","arguments":{"id":"Identifier","flags":"Flags, see TL conditional fields","creator":"Whether we created this wallpaper","default":"Whether this is the default wallpaper","pattern":"Whether this is a pattern wallpaper »","dark":"Whether this wallpaper should be used in dark mode.","access_hash":"Access hash","slug":"Unique wallpaper ID, used when generating wallpaper links or importing wallpaper links.","document":"The actual wallpaper","settings":"Info on how to generate the wallpaper, according to these instructions »."}},"peerNotifySettings":{"comment":"Notification settings.","arguments":{"flags":"Flags, see TL conditional fields","show_previews":"(Ternary value) If set, indicates whether or not to display previews of messages in notifications; otherwise the default behavior should be used.","silent":"(Ternary value) If set, indicates whether to mute or unmute the peer; otherwise the default behavior should be used.","mute_until":"Mute all notifications until this date","ios_sound":"Notification sound for the official iOS application","android_sound":"Notification sound for the official android application","other_sound":"Notification sound for other applications","stories_muted":"Whether story notifications should be disabled.","stories_hide_sender":"Whether the sender name should be displayed in story notifications.","stories_ios_sound":"Sound for story notifications on the official iOS application","stories_android_sound":"Sound for story notifications on the official Android application","stories_other_sound":"Sound for story notifications on other applications"}},"wallPaperNoFile":{"comment":"Represents a wallpaper only based on colors/gradients.","arguments":{"id":"Wallpaper ID","flags":"Flags, see TL conditional fields","default":"Whether this is the default wallpaper","dark":"Whether this wallpaper should be used in dark mode.","settings":"Info on how to generate the wallpaper."}},"inputReportReasonSpam":{"comment":"Report for spam","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputReportReasonPornography":{"comment":"Report for pornography","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputReportReasonOther":{"comment":"Other","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputReportReasonViolence":{"comment":"Report for violence","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputReportReasonGeoIrrelevant":{"comment":"Report an irrelevant geo group","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputReportReasonIllegalDrugs":{"comment":"Report for illegal drugs","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputReportReasonFake":{"comment":"Report for impersonation","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputReportReasonCopyright":{"comment":"Report for copyrighted content","arguments":{"gigagroup":"Is this a broadcast group?"}},"userFull":{"comment":"Extended user info\n\nWhen updating the local peer database », all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).","arguments":{"flags":"Flags, see TL conditional fields","blocked":"Whether you have blocked this user","phone_calls_available":"Whether this user can make VoIP calls","phone_calls_private":"Whether this user's privacy settings allow you to call them","can_pin_message":"Whether you can pin messages in the chat with this user, you can do this only for a chat with yourself","has_scheduled":"Whether scheduled messages are available","video_calls_available":"Whether the user can receive video calls","voice_messages_forbidden":"Whether this user doesn't allow sending voice messages in a private chat with them","translations_disabled":"Whether the real-time chat translation popup should be hidden.","stories_pinned_available":"Whether this user has some pinned stories.","blocked_my_stories_from":"Whether we've blocked this user, preventing them from seeing our stories ».","wallpaper_overridden":"Whether the other user has chosen a custom wallpaper for us using {@link messages.RawSetChatWallPaperRequest} and the for_both flag, see here » for more info.","contact_require_premium":"If set, we cannot write to this user: subscribe to Telegram Premium to get permission to write to this user.
    To set this flag for ourselves invoke {@link account.RawSetGlobalPrivacySettingsRequest}, setting the settings.new_noncontact_peers_require_premium flag, see here » for more info.","read_dates_private":"If set, we cannot fetch the exact read date of messages we send to this user using {@link messages.RawGetOutboxReadDateRequest}.
    The exact read date of messages might still be unavailable for other reasons, see {@link messages.RawGetOutboxReadDateRequest} for more info.
    To set this flag for ourselves invoke {@link account.RawSetGlobalPrivacySettingsRequest}, setting the settings.hide_read_marks flag.","flags2":"Flags, see TL conditional fields","sponsored_enabled":"Whether ads were re-enabled for the current account (only accessible to the currently logged-in user), see here » for more info.","id":"User ID","about":"Bio of the user","settings":"Peer settings","personal_photo":"Personal profile photo, to be shown instead of profile_photo.","profile_photo":"Profile photo","fallback_photo":"Fallback profile photo, displayed if no photo is present in profile_photo or personal_photo, due to privacy settings.","notify_settings":"Notification settings","bot_info":"For bots, info about the bot (bot commands, etc)","pinned_msg_id":"Message ID of the last pinned message","common_chats_count":"Chats in common with this user","folder_id":"Peer folder ID, for more info click here","ttl_period":"Time To Live of all messages in this chat; once a message is this many seconds old, it must be deleted.","theme_emoticon":"Emoji associated with chat theme","private_forward_name":"Anonymized text to be shown instead of the user's name on forwarded messages","bot_group_admin_rights":"A suggested set of administrator rights for the bot, to be shown when adding the bot as admin to a group, see here for more info on how to handle them ».","bot_broadcast_admin_rights":"A suggested set of administrator rights for the bot, to be shown when adding the bot as admin to a channel, see here for more info on how to handle them ».","premium_gifts":"Telegram Premium subscriptions gift options","wallpaper":"Wallpaper to use in the private chat with the user.","stories":"Active stories »","business_work_hours":"Telegram Business working hours ».","business_location":"Telegram Business location ».","business_greeting_message":"Telegram Business greeting message ».","business_away_message":"Telegram Business away message ».","business_intro":"Specifies a custom Telegram Business profile introduction ».","birthday":"Contains info about the user's birthday ».","personal_channel_id":"ID of the associated personal channel », that should be shown in the profile page.","personal_channel_message":"ID of the latest message of the associated personal channel », that should be previewed in the profile page."}},"contact":{"comment":"A contact of the current user that is registered in the system.","arguments":{"user_id":"User identifier","mutual":"Current user is in the user's contact list"}},"inputReportReasonPersonalDetails":{"comment":"Report for divulgation of personal details","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputReportReasonChildAbuse":{"comment":"Report for child abuse","arguments":{"gigagroup":"Is this a broadcast group?"}},"importedContact":{"comment":"Successfully imported contact.","arguments":{"user_id":"User identifier","client_id":"The contact's client identifier (passed to one of the InputContact constructors)"}},"contacts.contactsNotModified":{"comment":"Contact list on the server is the same as the list on the client.","arguments":{"gigagroup":"Is this a broadcast group?"}},"contactStatus":{"comment":"Contact status: online / offline.","arguments":{"user_id":"User identifier","status":"Online status"}},"contacts.contacts":{"comment":"The current user's contact list and info on users.","arguments":{"contacts":"Contact list","saved_count":"Number of contacts that were saved successfully","users":"User list"}},"contacts.importedContacts":{"comment":"Info on successfully imported contacts.","arguments":{"imported":"List of successfully imported contacts","popular_invites":"Popular contacts","retry_contacts":"List of contact ids that could not be imported due to system limitation and will need to be imported at a later date.","users":"List of users"}},"contacts.blocked":{"comment":"Full list of blocked users.","arguments":{"blocked":"List of blocked users","chats":"Blocked chats","users":"List of users"}},"messages.dialogs":{"comment":"Full list of chats with messages and auxiliary data.","arguments":{"dialogs":"List of chats","messages":"List of last messages from each chat","chats":"List of groups mentioned in the chats","users":"List of users mentioned in messages and groups"}},"contacts.blockedSlice":{"comment":"Incomplete list of blocked users.","arguments":{"count":"Total number of elements in the list","blocked":"List of blocked users","chats":"Blocked chats","users":"List of users"}},"messages.dialogsSlice":{"comment":"Incomplete list of dialogs with messages and auxiliary data.","arguments":{"count":"Total number of dialogs","dialogs":"List of dialogs","messages":"List of last messages from dialogs","chats":"List of chats mentioned in dialogs","users":"List of users mentioned in messages and chats"}},"messages.dialogsNotModified":{"comment":"Dialogs haven't changed","arguments":{"count":"Number of dialogs found server-side by the query"}},"messages.messages":{"comment":"Full list of messages with auxiliary data.","arguments":{"messages":"List of messages","chats":"List of chats mentioned in dialogs","users":"List of users mentioned in messages and chats"}},"messages.messagesSlice":{"comment":"Incomplete list of messages and auxiliary data.","arguments":{"flags":"Flags, see TL conditional fields","inexact":"If set, indicates that the results may be inexact","count":"Total number of messages in the list","next_rate":"Rate to use in the offset_rate parameter in the next call to {@link messages.RawSearchGlobalRequest}","offset_id_offset":"Indicates the absolute position of messages[0] within the total result set with count count.
    This is useful, for example, if the result was fetched using offset_id, and we need to display a progress/total counter (like photo 134 of 200, for all media in a chat, we could simply use photo ${offset_id_offset} of ${count}.","messages":"List of messages","chats":"List of chats mentioned in messages","users":"List of users mentioned in messages and chats"}},"messages.channelMessages":{"comment":"Channel messages","arguments":{"flags":"Flags, see TL conditional fields","inexact":"If set, returned results may be inexact","pts":"Event count after generation","count":"Total number of results were found server-side (may not be all included here)","offset_id_offset":"Indicates the absolute position of messages[0] within the total result set with count count.
    This is useful, for example, if the result was fetched using offset_id, and we need to display a progress/total counter (like photo 134 of 200, for all media in a chat, we could simply use photo ${offset_id_offset} of ${count}.","messages":"Found messages","topics":"Forum topic information","chats":"Chats","users":"Users"}},"messages.chats":{"comment":"List of chats with auxiliary data.","arguments":{"chats":"List of chats"}},"messages.messagesNotModified":{"comment":"No new messages matching the query were found","arguments":{"count":"Number of results found server-side by the given query"}},"messages.affectedHistory":{"comment":"Affected part of communication history with the user or in a chat.","arguments":{"pts":"Number of events occurred in a text box","pts_count":"Number of affected events","offset":"If a parameter contains positive value, it is necessary to repeat the method call using the given value; during the proceeding of all the history the value itself shall gradually decrease"}},"inputMessagesFilterPhotos":{"comment":"Filter for messages containing photos.","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputMessagesFilterEmpty":{"comment":"Filter is absent.","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputMessagesFilterDocument":{"comment":"Filter for messages containing documents.","arguments":{"gigagroup":"Is this a broadcast group?"}},"messages.chatFull":{"comment":"Full info about a channel, supergroup, gigagroup or basic group.","arguments":{"full_chat":"Full info","chats":"Mentioned chats","users":"Mentioned users"}},"inputMessagesFilterPhotoVideo":{"comment":"Filter for messages containing photos or videos.","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputMessagesFilterVideo":{"comment":"Filter for messages containing videos.","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputMessagesFilterMusic":{"comment":"Return only messages containing audio files","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputMessagesFilterVoice":{"comment":"Return only messages containing voice notes","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputMessagesFilterPhoneCalls":{"comment":"Return only phone calls","arguments":{"flags":"Flags, see TL conditional fields","missed":"Return only missed phone calls"}},"inputMessagesFilterUrl":{"comment":"Return only messages containing URLs","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputMessagesFilterGif":{"comment":"Return only messages containing gifs","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputMessagesFilterChatPhotos":{"comment":"Return only chat photo changes","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputMessagesFilterRoundVideo":{"comment":"Return only round videos","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputMessagesFilterRoundVoice":{"comment":"Return only round videos and voice notes","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputMessagesFilterMyMentions":{"comment":"Return only messages where the current user was mentioned.","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputMessagesFilterContacts":{"comment":"Return only messages containing contacts","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputMessagesFilterGeo":{"comment":"Return only messages containing geolocations","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputMessagesFilterPinned":{"comment":"Fetch only pinned messages","arguments":{"gigagroup":"Is this a broadcast group?"}},"updateNewMessage":{"comment":"New message in a private chat or in a basic group.","arguments":{"message":"Message","pts":"New quantity of actions in a message box","pts_count":"Number of generated events"}},"updateMessageID":{"comment":"Sent message with random_id client identifier was assigned an identifier.","arguments":{"id":"id identifier of a respective Message","random_id":"Previously transferred client random_id identifier"}},"updateDeleteMessages":{"comment":"Messages were deleted.","arguments":{"messages":"List of identifiers of deleted messages","pts":"New quality of actions in a message box","pts_count":"Number of generated events"}},"updateChatUserTyping":{"comment":"The user is preparing a message in a group; typing, recording, uploading, etc. This update is valid for 6 seconds. If no further updates of this kind are received after 6 seconds, it should be considered that the user stopped doing whatever they were doing","arguments":{"chat_id":"Group id","from_id":"Peer that started typing (can be the chat itself, in case of anonymous admins).","action":"Type of action"}},"updateUserStatus":{"comment":"Contact status update.","arguments":{"user_id":"User identifier","status":"New status"}},"updateUserTyping":{"comment":"The user is preparing a message; typing, recording, uploading, etc. This update is valid for 6 seconds. If no further updates of this kind are received after 6 seconds, it should be considered that the user stopped doing whatever they were doing","arguments":{"user_id":"User id","action":"Action type"}},"updateChatParticipants":{"comment":"Composition of chat participants changed.","arguments":{"participants":"Updated chat participants"}},"updateNewAuthorization":{"comment":"A new session logged into the current user's account through an unknown device.","arguments":{"flags":"Flags, see TL conditional fields","unconfirmed":"Whether the session is unconfirmed, see here » for more info.","hash":"Hash used for caching, for more info click here","date":"Authorization date","device":"Name of device, for example Android","location":"Location, for example USA, NY (IP=1.2.3.4)"}},"messages.chatsSlice":{"comment":"Partial list of chats, more would have to be fetched with pagination","arguments":{"count":"Total number of results that were found server-side (not all are included in chats)","chats":"Chats"}},"updateUserName":{"comment":"Changes the user's first name, last name and username.","arguments":{"user_id":"User identifier","first_name":"New first name. Corresponds to the new value of real_first_name field of the {@link RawUserFull} constructor.","last_name":"New last name. Corresponds to the new value of real_last_name field of the {@link RawUserFull} constructor.","usernames":"Usernames."}},"updateNewEncryptedMessage":{"comment":"New encrypted message.","arguments":{"message":"Message","qts":"New qts value, see updates » for more info."}},"updateEncryptedChatTyping":{"comment":"Interlocutor is typing a message in an encrypted chat. Update period is 6 second. If upon this time there is no repeated update, it shall be considered that the interlocutor stopped typing.","arguments":{"chat_id":"Chat ID"}},"updateEncryptedMessagesRead":{"comment":"Communication history in an encrypted chat was marked as read.","arguments":{"chat_id":"Chat ID","max_date":"Maximum value of data for read messages","date":"Time when messages were read"}},"updateChatParticipantAdd":{"comment":"New group member.","arguments":{"chat_id":"Group ID","user_id":"ID of the new member","inviter_id":"ID of the user, who added member to the group","date":"When was the participant added","version":"Chat version number"}},"updateEncryption":{"comment":"Change of state in an encrypted chat.","arguments":{"chat":"Encrypted chat","date":"Date of change"}},"updateChatParticipantDelete":{"comment":"A member has left the group.","arguments":{"chat_id":"Group ID","user_id":"ID of the user","version":"Used in basic groups to reorder updates and make sure that all of them was received."}},"updateDcOptions":{"comment":"Changes in the data center configuration options.","arguments":{"dc_options":"New connection options"}},"updateNotifySettings":{"comment":"Changes in notification settings.","arguments":{"peer":"Notification source","notify_settings":"New notification settings"}},"updateServiceNotification":{"comment":"A service message for the user.\n\nThe app must show the message to the user upon receiving this update. In case the popup parameter was passed, the text message must be displayed in a popup alert immediately upon receipt. It is recommended to handle the text as you would an ordinary message in terms of highlighting links, etc. The message must also be stored locally as part of the message history with the user id 777000 (Telegram Notifications).","arguments":{"flags":"Flags, see TL conditional fields","popup":"If set, the message must be displayed in a popup.","invert_media":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.","inbox_date":"When was the notification received
    The message must also be stored locally as part of the message history with the user id 777000 (Telegram Notifications).","type":"String, identical in format and contents to the type field in API errors. Describes type of service message. It is acceptable to ignore repeated messages of the same type within a short period of time (15 minutes).","message":"Message text","media":"Media content (optional)","entities":"Message entities for styled text"}},"updateReadHistoryInbox":{"comment":"Incoming messages were read","arguments":{"flags":"Flags, see TL conditional fields","folder_id":"Peer folder ID, for more info click here","peer":"Peer","max_id":"Maximum ID of messages read","still_unread_count":"Number of messages that are still unread","pts":"Event count after generation","pts_count":"Number of events that were generated"}},"updateUserPhone":{"comment":"A user's phone number was changed","arguments":{"user_id":"User ID","phone":"New phone number"}},"updateReadHistoryOutbox":{"comment":"Outgoing messages were read","arguments":{"peer":"Peer","max_id":"Maximum ID of read outgoing messages","pts":"Event count after generation","pts_count":"Number of events that were generated"}},"updateChannelTooLong":{"comment":"There are new updates in the specified channel, the client must fetch them.
    \nIf the difference is too long or if the channel isn't currently in the states, start fetching from the specified pts.","arguments":{"flags":"Flags, see TL conditional fields","channel_id":"The channel","pts":"The PTS."}},"updateWebPage":{"comment":"An instant view webpage preview was generated","arguments":{"webpage":"Webpage preview","pts":"Event count after generation","pts_count":"Number of events that were generated"}},"updateChannel":{"comment":"Channel/supergroup ({@link RawChannel} and/or {@link RawChannelFull}) information was updated.\n\nThis update can only be received through getDifference or in {@link RawUpdates}/{@link RawUpdatesCombined} constructors, so it will always come bundled with the updated {@link RawChannel}, that should be applied as usual », without re-fetching the info manually.\n\nHowever, full peer information will not come bundled in updates, so the full peer cache ({@link RawChannelFull}) must be invalidated for channel_id when receiving this update.","arguments":{"channel_id":"Channel ID"}},"updateReadChannelInbox":{"comment":"Incoming messages in a channel/supergroup were read","arguments":{"flags":"Flags, see TL conditional fields","folder_id":"Peer folder ID, for more info click here","channel_id":"Channel/supergroup ID","max_id":"Position up to which all incoming messages are read.","still_unread_count":"Count of messages weren't read yet","pts":"Event count after generation"}},"updateNewChannelMessage":{"comment":"A new message was sent in a channel/supergroup","arguments":{"message":"New message","pts":"Event count after generation","pts_count":"Number of events that were generated"}},"updateDeleteChannelMessages":{"comment":"Some messages in a supergroup/channel were deleted","arguments":{"channel_id":"Channel ID","messages":"IDs of messages that were deleted","pts":"Event count after generation","pts_count":"Number of events that were generated"}},"updateChatParticipantAdmin":{"comment":"Admin permissions of a user in a basic group were changed","arguments":{"chat_id":"Chat ID","user_id":"ID of the (de)admined user","is_admin":"Whether the user was rendered admin","version":"Used in basic groups to reorder updates and make sure that all of them was received."}},"updateReadMessagesContents":{"comment":"Contents of messages in the common message box were read","arguments":{"flags":"Flags, see TL conditional fields","messages":"IDs of read messages","pts":"Event count after generation","pts_count":"Number of events that were generated","date":"When was the last message in messages marked as read."}},"updateSavedGifs":{"comment":"The saved gif list has changed, the client should refetch it using {@link messages.RawGetSavedGifsRequest}","arguments":{"gigagroup":"Is this a broadcast group?"}},"updateStickerSets":{"comment":"Installed stickersets have changed, the client should refetch them as described in the docs.","arguments":{"flags":"Flags, see TL conditional fields","masks":"Whether mask stickersets have changed","emojis":"Whether the list of installed custom emoji stickersets has changed"}},"updateBotInlineSend":{"comment":"The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot.","arguments":{"flags":"Flags, see TL conditional fields","user_id":"The user that chose the result","query":"The query that was used to obtain the result","geo":"Optional. Sender location, only for bots that require user location","id":"The unique identifier for the result that was chosen","msg_id":"Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message."}},"updateNewStickerSet":{"comment":"A new stickerset was installed","arguments":{"stickerset":"The installed stickerset"}},"updateChannelMessageViews":{"comment":"The view counter of a message in a channel has changed","arguments":{"channel_id":"Channel ID","id":"ID of the message","views":"New view counter"}},"updateStickerSetsOrder":{"comment":"The order of stickersets was changed","arguments":{"flags":"Flags, see TL conditional fields","masks":"Whether the updated stickers are mask stickers","emojis":"Whether the updated stickers are custom emoji stickers","order":"New sticker order by sticker ID"}},"updateBotInlineQuery":{"comment":"An incoming inline query","arguments":{"flags":"Flags, see TL conditional fields","query_id":"Query ID","user_id":"User that sent the query","query":"Text of query","geo":"Attached geolocation","peer_type":"Type of the chat from which the inline query was sent.","offset":"Offset to navigate through results"}},"updateEditChannelMessage":{"comment":"A message was edited in a channel/supergroup","arguments":{"message":"The new message","pts":"Event count after generation","pts_count":"Number of events that were generated"}},"updateBotCallbackQuery":{"comment":"A callback button was pressed, and the button data was sent to the bot that created the button","arguments":{"flags":"Flags, see TL conditional fields","query_id":"Query ID","user_id":"ID of the user that pressed the button","peer":"Chat where the inline keyboard was sent","msg_id":"Message ID","chat_instance":"Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.","data":"Callback data","game_short_name":"Short name of a Game to be returned, serves as the unique identifier for the game"}},"updateInlineBotCallbackQuery":{"comment":"This notification is received by bots when a button is pressed","arguments":{"flags":"Flags, see TL conditional fields","query_id":"Query ID","user_id":"ID of the user that pressed the button","msg_id":"ID of the inline message with the button","chat_instance":"Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.","data":"Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field.","game_short_name":"Short name of a Game to be returned, serves as the unique identifier for the game"}},"updateReadChannelOutbox":{"comment":"Outgoing messages in a channel/supergroup were read","arguments":{"channel_id":"Channel/supergroup ID","max_id":"Position up to which all outgoing messages are read."}},"updateDraftMessage":{"comment":"Notifies a change of a message draft.","arguments":{"flags":"Flags, see TL conditional fields","peer":"The peer to which the draft is associated","top_msg_id":"ID of the forum topic to which the draft is associated","draft":"The draft"}},"updateEditMessage":{"comment":"A message was edited","arguments":{"message":"The new edited message","pts":"PTS","pts_count":"PTS count"}},"updateReadFeaturedStickers":{"comment":"Some featured stickers were marked as read","arguments":{"gigagroup":"Is this a broadcast group?"}},"updatePtsChanged":{"comment":"Common message box sequence PTS has changed, state has to be refetched using updates.getState","arguments":{"gigagroup":"Is this a broadcast group?"}},"updateConfig":{"comment":"The server-side configuration has changed; the client should re-fetch the config using {@link help.RawGetConfigRequest} and {@link help.RawGetAppConfigRequest}.","arguments":{"gigagroup":"Is this a broadcast group?"}},"updateChannelWebPage":{"comment":"A webpage preview of a link in a channel/supergroup message was generated","arguments":{"channel_id":"Channel/supergroup ID","webpage":"Generated webpage preview","pts":"Event count after generation","pts_count":"Number of events that were generated"}},"updateBotWebhookJSON":{"comment":"A new incoming event; for bots only","arguments":{"data":"The event"}},"updatePrivacy":{"comment":"Privacy rules were changed","arguments":{"key":"Peers to which the privacy rules apply","rules":"New privacy rules"}},"updatePinnedDialogs":{"comment":"Pinned dialogs were updated","arguments":{"flags":"Flags, see TL conditional fields","folder_id":"Peer folder ID, for more info click here","order":"New order of pinned dialogs"}},"updateRecentStickers":{"comment":"The recent sticker list was updated","arguments":{"gigagroup":"Is this a broadcast group?"}},"updateBotWebhookJSONQuery":{"comment":"A new incoming query; for bots only","arguments":{"query_id":"Query identifier","data":"Query data","timeout":"Query timeout"}},"updateDialogPinned":{"comment":"A dialog was pinned/unpinned","arguments":{"flags":"Flags, see TL conditional fields","pinned":"Whether the dialog was pinned","folder_id":"Peer folder ID, for more info click here","peer":"The dialog"}},"updateBotPrecheckoutQuery":{"comment":"This object contains information about an incoming pre-checkout query.","arguments":{"flags":"Flags, see TL conditional fields","query_id":"Unique query identifier","user_id":"User who sent the query","payload":"Bot specified invoice payload","info":"Order info provided by the user","shipping_option_id":"Identifier of the shipping option chosen by the user","currency":"Three-letter ISO 4217 currency code, or XTR for Telegram Stars.","total_amount":"Total amount in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."}},"updateBotShippingQuery":{"comment":"This object contains information about an incoming shipping query.","arguments":{"query_id":"Unique query identifier","user_id":"User who sent the query","payload":"Bot specified invoice payload","shipping_address":"User specified shipping address"}},"updateLangPackTooLong":{"comment":"A language pack has changed, the client should manually fetch the changed strings using {@link langpack.RawGetDifferenceRequest}","arguments":{"lang_code":"Language code"}},"updatePhoneCall":{"comment":"An incoming phone call","arguments":{"phone_call":"Phone call"}},"updateLangPack":{"comment":"Language pack updated","arguments":{"difference":"Changed strings"}},"updateChannelReadMessagesContents":{"comment":"The specified channel/supergroup messages were read","arguments":{"flags":"Flags, see TL conditional fields","channel_id":"Channel/supergroup ID","top_msg_id":"Forum topic ID.","messages":"IDs of messages that were read"}},"updateFavedStickers":{"comment":"The list of favorited stickers was changed, the client should call {@link messages.RawGetFavedStickersRequest} to refetch the new list","arguments":{"gigagroup":"Is this a broadcast group?"}},"updateChannelAvailableMessages":{"comment":"The history of a channel/supergroup was hidden.","arguments":{"channel_id":"Channel/supergroup ID","available_min_id":"Identifier of a maximum unavailable message in a channel due to hidden history."}},"updateContactsReset":{"comment":"All contacts were deleted","arguments":{"gigagroup":"Is this a broadcast group?"}},"updateMessagePoll":{"comment":"The results of a poll have changed","arguments":{"flags":"Flags, see TL conditional fields","poll_id":"Poll ID","poll":"If the server knows the client hasn't cached this poll yet, the poll itself","results":"New poll results"}},"updateChatDefaultBannedRights":{"comment":"Default banned rights in a normal chat were updated","arguments":{"peer":"The chat","default_banned_rights":"New default banned rights","version":"Version"}},"updateDialogUnreadMark":{"comment":"The manual unread mark of a chat was changed","arguments":{"flags":"Flags, see TL conditional fields","unread":"Was the chat marked or unmarked as read","peer":"The dialog"}},"updatePeerSettings":{"comment":"Settings of a certain peer have changed","arguments":{"peer":"The peer","settings":"Associated peer settings"}},"updatePeerLocated":{"comment":"List of peers near you was updated","arguments":{"peers":"Geolocated peer list update"}},"updateNewScheduledMessage":{"comment":"A message was added to the schedule queue of a chat","arguments":{"message":"Message"}},"updateFolderPeers":{"comment":"The peer list of a peer folder was updated","arguments":{"folder_peers":"New peer list","pts":"Event count after generation","pts_count":"Number of events that were generated"}},"updateDeleteScheduledMessages":{"comment":"Some scheduled messages were deleted from the schedule queue of a chat","arguments":{"peer":"Peer","messages":"Deleted scheduled messages"}},"updateTheme":{"comment":"A cloud theme was updated","arguments":{"theme":"Theme"}},"updateDialogFilter":{"comment":"A new folder was added","arguments":{"flags":"Flags, see TL conditional fields","id":"Folder ID","filter":"Folder info"}},"updateGeoLiveViewed":{"comment":"Live geo position message was viewed","arguments":{"peer":"The user that viewed the live geo position","msg_id":"Message ID of geo position message"}},"updateLoginToken":{"comment":"A login token (for login via QR code) was accepted.","arguments":{"gigagroup":"Is this a broadcast group?"}},"updateMessagePollVote":{"comment":"A specific peer has voted in a poll","arguments":{"poll_id":"Poll ID","peer":"The peer that voted in the poll","options":"Chosen option(s)","qts":"New qts value, see updates » for more info."}},"updateDialogFilterOrder":{"comment":"New folder order","arguments":{"order":"Ordered folder IDs"}},"updateDialogFilters":{"comment":"Clients should update folder info","arguments":{"gigagroup":"Is this a broadcast group?"}},"updateChannelMessageForwards":{"comment":"The forward counter of a message in a channel has changed","arguments":{"channel_id":"Channel ID","id":"ID of the message","forwards":"New forward counter"}},"updateReadChannelDiscussionInbox":{"comment":"Incoming comments in a discussion thread were marked as read","arguments":{"flags":"Flags, see TL conditional fields","channel_id":"Discussion group ID","top_msg_id":"ID of the group message that started the thread (message in linked discussion group)","read_max_id":"Message ID of latest read incoming message for this thread","broadcast_id":"If set, contains the ID of the channel that contains the post that started the comment thread in the discussion group (channel_id)","broadcast_post":"If set, contains the ID of the channel post that started the comment thread"}},"updatePeerBlocked":{"comment":"We blocked a peer, see here » for more info on blocklists.","arguments":{"flags":"Flags, see TL conditional fields","blocked":"Whether the peer was blocked or unblocked","blocked_my_stories_from":"Whether the peer was added/removed to/from the story blocklist; if not set, this update affects the main blocklist, see here » for more info.","peer_id":"The (un)blocked peer"}},"updatePhoneCallSignalingData":{"comment":"Incoming phone call signaling payload","arguments":{"phone_call_id":"Phone call ID","data":"Signaling payload"}},"updateReadChannelDiscussionOutbox":{"comment":"Outgoing comments in a discussion thread were marked as read","arguments":{"channel_id":"Supergroup ID","top_msg_id":"ID of the group message that started the thread","read_max_id":"Message ID of latest read outgoing message for this thread"}},"updatePinnedChannelMessages":{"comment":"Messages were pinned/unpinned in a channel/supergroup","arguments":{"flags":"Flags, see TL conditional fields","pinned":"Whether the messages were pinned or unpinned","channel_id":"Channel ID","messages":"Messages","pts":"Event count after generation","pts_count":"Number of events that were generated"}},"updateChannelUserTyping":{"comment":"A user is typing in a supergroup, channel or message thread","arguments":{"flags":"Flags, see TL conditional fields","channel_id":"Channel ID","top_msg_id":"Thread ID","from_id":"The peer that is typing","action":"Whether the user is typing, sending a media or doing something else"}},"updatePinnedMessages":{"comment":"Some messages were pinned in a chat","arguments":{"flags":"Flags, see TL conditional fields","pinned":"Whether the messages were pinned or unpinned","peer":"Peer","messages":"Message IDs","pts":"Event count after generation","pts_count":"Number of events that were generated"}},"updateChat":{"comment":"Chat ({@link RawChat} and/or {@link RawChatFull}) information was updated.\n\nThis update can only be received through getDifference or in {@link RawUpdates}/{@link RawUpdatesCombined} constructors, so it will always come bundled with the updated {@link RawChat}, that should be applied as usual », without re-fetching the info manually.\n\nHowever, full peer information will not come bundled in updates, so the full peer cache ({@link RawChatFull}) must be invalidated for chat_id when receiving this update.","arguments":{"chat_id":"Chat ID"}},"updateGroupCallParticipants":{"comment":"The participant list of a certain group call has changed","arguments":{"call":"Group call","participants":"New participant list","version":"Version"}},"updateChannelParticipant":{"comment":"A participant has left, joined, was banned or admined in a channel or supergroup.","arguments":{"flags":"Flags, see TL conditional fields","via_chatlist":"Whether the participant joined using a chat folder deep link ».","channel_id":"Channel ID","date":"Date of the event","actor_id":"User that triggered the change (inviter, admin that kicked the user, or the even the user_id itself)","user_id":"User that was affected by the change","prev_participant":"Previous participant status","new_participant":"New participant status","invite":"Chat invite used to join the channel/supergroup","qts":"New qts value, see updates » for more info."}},"updateGroupCall":{"comment":"A new groupcall was started","arguments":{"chat_id":"The channel/supergroup where this group call or livestream takes place","call":"Info about the group call or livestream"}},"updateBotStopped":{"comment":"A bot was stopped or re-started.","arguments":{"user_id":"The user ID","date":"When did this action occur","stopped":"Whether the bot was stopped or started","qts":"New qts value, see updates » for more info."}},"updatePeerHistoryTTL":{"comment":"The Time-To-Live for messages sent by the current user in a specific chat has changed","arguments":{"flags":"Flags, see TL conditional fields","peer":"The chat","ttl_period":"The new Time-To-Live"}},"updateChatParticipant":{"comment":"A user has joined or left a specific chat","arguments":{"flags":"Flags, see TL conditional fields","chat_id":"Chat ID","date":"When did this event occur","actor_id":"User that triggered the change (inviter, admin that kicked the user, or the even the user_id itself)","user_id":"User that was affected by the change","prev_participant":"Previous participant info (empty if this participant just joined)","new_participant":"New participant info (empty if this participant just left)","invite":"The invite that was used to join the group","qts":"New qts value, see updates » for more info."}},"updateGroupCallConnection":{"comment":"New WebRTC parameters","arguments":{"flags":"Flags, see TL conditional fields","presentation":"Are these parameters related to the screen capture session currently in progress?","params":"WebRTC parameters"}},"updateBotCommands":{"comment":"The command set of a certain bot in a certain chat has changed.","arguments":{"peer":"The affected chat","bot_id":"ID of the bot that changed its command set","commands":"New bot commands"}},"updateMessageReactions":{"comment":"New message reactions » are available","arguments":{"flags":"Flags, see TL conditional fields","peer":"Peer","msg_id":"Message ID","top_msg_id":"Forum topic ID","reactions":"Reactions"}},"updateBotChatInviteRequester":{"comment":"Someone has requested to join a chat or channel (bots only, users will receive an {@link RawUpdatePendingJoinRequests}, instead)","arguments":{"peer":"The chat or channel in question","date":"When was the join request » made","user_id":"The user ID that is asking to join the chat or channel","about":"Bio of the user","invite":"Chat invite link that was used by the user to send the join request »","qts":"QTS event sequence identifier"}},"updatePendingJoinRequests":{"comment":"Someone has requested to join a chat or channel","arguments":{"peer":"Chat or channel","requests_pending":"Number of pending join requests » for the chat or channel","recent_requesters":"IDs of users that have recently requested to join"}},"updateAttachMenuBots":{"comment":"The list of installed attachment menu entries » has changed, use {@link messages.RawGetAttachMenuBotsRequest} to fetch the updated list.","arguments":{"gigagroup":"Is this a broadcast group?"}},"updateBotMenuButton":{"comment":"The menu button behavior for the specified bot has changed","arguments":{"bot_id":"Bot ID","button":"New menu button"}},"updateWebViewResultSent":{"comment":"Indicates to a bot that a webview was closed and an inline message was sent on behalf of the user using {@link messages.RawSendWebViewResultMessageRequest}","arguments":{"query_id":"Web app interaction ID"}},"updateSavedRingtones":{"comment":"The list of saved notification sounds has changed, use {@link account.RawGetSavedRingtonesRequest} to fetch the new list.","arguments":{"gigagroup":"Is this a broadcast group?"}},"updateRecentEmojiStatuses":{"comment":"The list of recent emoji statuses has changed","arguments":{"gigagroup":"Is this a broadcast group?"}},"updateTranscribedAudio":{"comment":"A pending voice message transcription » initiated with {@link messages.RawTranscribeAudioRequest} was updated.","arguments":{"flags":"Flags, see TL conditional fields","pending":"Whether this transcription is still pending and further {@link RawUpdateTranscribedAudio} about it will be sent in the future.","peer":"Peer of the transcribed message","msg_id":"Transcribed message ID","transcription_id":"Transcription ID","text":"Transcribed text"}},"updateUserEmojiStatus":{"comment":"The emoji status of a certain user has changed","arguments":{"user_id":"User ID","emoji_status":"New emoji status"}},"updateReadFeaturedEmojiStickers":{"comment":"Some featured custom emoji stickers were marked as read","arguments":{"gigagroup":"Is this a broadcast group?"}},"updateRecentReactions":{"comment":"The list of recent message reactions has changed","arguments":{"gigagroup":"Is this a broadcast group?"}},"updateMoveStickerSetToTop":{"comment":"A stickerset was just moved to top, see here for more info »","arguments":{"flags":"Flags, see TL conditional fields","masks":"This update is referring to a mask stickerset","emojis":"This update is referring to a custom emoji stickerset","stickerset":"Stickerset ID"}},"updateChannelPinnedTopics":{"comment":"The pinned topics of a forum have changed.","arguments":{"flags":"Flags, see TL conditional fields","channel_id":"Forum ID.","order":"Ordered list containing the IDs of all pinned topics."}},"updateUser":{"comment":"User ({@link RawUser} and/or {@link RawUserFull}) information was updated.\n\nThis update can only be received through getDifference or in {@link RawUpdates}/{@link RawUpdatesCombined} constructors, so it will always come bundled with the updated {@link RawUser}, that should be applied as usual », without re-fetching the info manually.\n\nHowever, full peer information will not come bundled in updates, so the full peer cache ({@link RawUserFull}) must be invalidated for user_id when receiving this update.","arguments":{"user_id":"User ID"}},"updateChannelPinnedTopic":{"comment":"A forum topic » was pinned or unpinned.","arguments":{"flags":"Flags, see TL conditional fields","pinned":"Whether the topic was pinned or unpinned","channel_id":"The forum ID","topic_id":"The topic ID"}},"updateStory":{"comment":"A new story was posted.","arguments":{"peer":"ID of the poster.","story":"The story that was posted."}},"updateAutoSaveSettings":{"comment":"Media autosave settings have changed and must be refetched using {@link account.RawGetAutoSaveSettingsRequest}.","arguments":{"gigagroup":"Is this a broadcast group?"}},"updateReadStories":{"comment":"Stories of a specific peer were marked as read.","arguments":{"peer":"The peer","max_id":"ID of the last story that was marked as read"}},"updateStoryID":{"comment":"A story was successfully uploaded.\n\nOnce a story is successfully uploaded, an {@link RawUpdateStoryID} will be returned, indicating the story ID (id) that was attributed to the story (like for messages, random_id indicates the random_id that was passed to {@link stories.RawSendStoryRequest}: this way, you can tell which story was assigned a specific id by checking which {@link stories.RawSendStoryRequest} call has the returned random_id).","arguments":{"id":"The id that was attributed to the story.","random_id":"The random_id that was passed to {@link stories.RawSendStoryRequest}."}},"updateStoriesStealthMode":{"comment":"Indicates that stories stealth mode was activated.","arguments":{"stealth_mode":"Information about the current stealth mode session."}},"updateSentStoryReaction":{"comment":"Indicates we reacted to a story ».","arguments":{"peer":"The peer that sent the story","story_id":"ID of the story we reacted to","reaction":"The reaction that was sent"}},"updateBotChatBoost":{"comment":"A channel/supergroup boost has changed (bots only)","arguments":{"peer":"Channel","boost":"New boost information","qts":"QTS event sequence identifier"}},"updateMessageExtendedMedia":{"comment":"You bought a paid media »: this update contains the revealed media.","arguments":{"peer":"Peer where the paid media was posted","msg_id":"ID of the message containing the paid media","extended_media":"Revealed media, contains only {@link RawMessageExtendedMedia} constructors."}},"updateChannelViewForumAsMessages":{"comment":"Users may also choose to display messages from all topics as if they were sent to a normal group, using a \"View as messages\" setting in the local client.
    \nThis setting only affects the current account, and is synced to other logged in sessions using the {@link channels.RawToggleViewForumAsMessagesRequest} method; invoking this method will update the value of the view_forum_as_messages flag of {@link RawChannelFull} or {@link RawDialog} and emit an {@link RawUpdateChannelViewForumAsMessages}.","arguments":{"channel_id":"The forum ID","enabled":"The new value of the toggle."}},"updateSavedDialogPinned":{"comment":"A saved message dialog was pinned/unpinned","arguments":{"flags":"Flags, see TL conditional fields","pinned":"Whether the dialog was pinned","peer":"The dialog"}},"updatePinnedSavedDialogs":{"comment":"Pinned saved dialogs » were updated","arguments":{"flags":"Flags, see TL conditional fields","order":"New order of pinned saved dialogs"}},"updateBotMessageReactions":{"comment":"Bots only: the number of reactions on a message with anonymous reactions has changed.","arguments":{"peer":"Peer of the reacted-to message.","msg_id":"ID of the reacted-to message.","date":"Date of the change.","reactions":"New reaction counters.","qts":"QTS event sequence identifier"}},"updateSavedReactionTags":{"comment":"The list of reaction tag » names assigned by the user has changed and should be refetched using {@link messages.RawGetSavedReactionTagsRequest}.","arguments":{"gigagroup":"Is this a broadcast group?"}},"updateBotMessageReaction":{"comment":"Bots only: a user has changed their reactions on a message with public reactions.","arguments":{"peer":"Peer of the reacted-to message.","msg_id":"ID of the reacted-to message.","date":"Date of the change.","actor":"The user that (un)reacted to the message.","old_reactions":"Old reactions","new_reactions":"New reactions","qts":"QTS event sequence identifier"}},"updatePeerWallpaper":{"comment":"The wallpaper » of a given peer has changed.","arguments":{"flags":"Flags, see TL conditional fields","wallpaper_overridden":"Whether the other user has chosen a custom wallpaper for us using {@link messages.RawSetChatWallPaperRequest} and the for_both flag, see here » for more info.","peer":"The peer where the wallpaper has changed.","wallpaper":"The new wallpaper, if none the wallpaper was removed and the default wallpaper should be used."}},"updateSmsJob":{"comment":"A new SMS job was received","arguments":{"job_id":"SMS job ID"}},"updateQuickReplies":{"comment":"Info about or the order of quick reply shortcuts » was changed.","arguments":{"quick_replies":"New quick reply shortcut order and information."}},"updateNewQuickReply":{"comment":"A new quick reply shortcut » was created.","arguments":{"quick_reply":"Quick reply shortcut."}},"updateQuickReplyMessage":{"comment":"A new message was added to a quick reply shortcut ».","arguments":{"message":"The message that was added (the {@link RawMessage}.quick_reply_shortcut_id field will contain the shortcut ID)."}},"updateDeleteQuickReply":{"comment":"A quick reply shortcut » was deleted. This will not emit {@link RawUpdateDeleteQuickReplyMessages} updates, even if all the messages in the shortcut are also deleted by this update.","arguments":{"shortcut_id":"ID of the quick reply shortcut that was deleted."}},"updateDeleteQuickReplyMessages":{"comment":"One or more messages in a quick reply shortcut » were deleted.","arguments":{"shortcut_id":"Quick reply shortcut ID.","messages":"IDs of the deleted messages."}},"updateBotNewBusinessMessage":{"comment":"A message was received via a connected business chat ».","arguments":{"flags":"Flags, see TL conditional fields","connection_id":"Connection ID.","message":"New message.","reply_to_message":"The message that message is replying to.","qts":"New qts value, see updates » for more info."}},"updateBotEditBusinessMessage":{"comment":"A message was edited in a connected business chat ».","arguments":{"flags":"Flags, see TL conditional fields","connection_id":"Business connection ID","message":"New message.","reply_to_message":"The message that message is replying to.","qts":"New qts value, see updates » for more info."}},"updateBotDeleteBusinessMessage":{"comment":"A message was deleted in a connected business chat ».","arguments":{"connection_id":"Business connection ID.","peer":"Peer where the messages were deleted.","messages":"IDs of the messages that were deleted.","qts":"New qts value, see updates » for more info."}},"updateBotBusinessConnect":{"comment":"Connecting or disconnecting a business bot or changing the connection settings will emit an {@link RawUpdateBotBusinessConnect} update to the bot, with the new settings and a connection_id that will be used by the bot to handle updates from and send messages as the user.","arguments":{"connection":"Business connection settings","qts":"New qts value, see updates » for more info."}},"updateNewStoryReaction":{"comment":"Represents a new reaction to a story.","arguments":{"story_id":"Story ID.","peer":"The peer where the story was posted.","reaction":"The reaction."}},"updateBroadcastRevenueTransactions":{"comment":"A new channel ad revenue transaction was made, see here » for more info.","arguments":{"peer":"Channel","balances":"New ad revenue balance."}},"updateStarsBalance":{"comment":"The current account's Telegram Stars balance » has changed.","arguments":{"balance":"New balance."}},"updateBusinessBotCallbackQuery":{"comment":"A callback button sent via a business connection was pressed, and the button data was sent to the bot that created the button.","arguments":{"flags":"Flags, see TL conditional fields","query_id":"Query ID","user_id":"ID of the user that pressed the button","connection_id":"Business connection ID","message":"Message that contains the keyboard (also contains info about the chat where the message was sent).","reply_to_message":"The message that message is replying to.","chat_instance":"Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.","data":"Callback data"}},"updates.difference":{"comment":"Full list of occurred events.","arguments":{"new_messages":"List of new messages","new_encrypted_messages":"List of new encrypted secret chat messages","other_updates":"List of updates","chats":"List of chats mentioned in events","users":"List of users mentioned in events","state":"Current state"}},"updates.state":{"comment":"Updates state.","arguments":{"pts":"Number of events occurred in a text box","qts":"Position in a sequence of updates in secret chats. For further details refer to article secret chats","date":"Date of condition","seq":"Number of sent updates","unread_count":"Number of unread messages"}},"updates.differenceEmpty":{"comment":"No events.","arguments":{"date":"Current date","seq":"Number of sent updates"}},"updateStarsRevenueStatus":{"comment":"The Telegram Star balance of a channel/bot we own has changed ».","arguments":{"peer":"Channel/bot","status":"New Telegram Star balance."}},"updates.differenceSlice":{"comment":"Incomplete list of occurred events.","arguments":{"new_messages":"List of new messages","new_encrypted_messages":"New messages from the encrypted event sequence","other_updates":"List of updates","chats":"List of chats mentioned in events","users":"List of users mentioned in events","intermediate_state":"Intermediary state"}},"updatesTooLong":{"comment":"Too many updates, it is necessary to execute {@link updates.RawGetDifferenceRequest}.","arguments":{"gigagroup":"Is this a broadcast group?"}},"updateShort":{"comment":"Shortened constructor containing info on one update not requiring auxiliary data","arguments":{"update":"Update","date":"Date of event"}},"updates.differenceTooLong":{"comment":"The difference is too long, and the specified state must be used to refetch updates.","arguments":{"pts":"The new state to use."}},"updatesCombined":{"comment":"Constructor for a group of updates.","arguments":{"updates":"List of updates","users":"List of users mentioned in updates","chats":"List of chats mentioned in updates","date":"Current date","seq_start":"Value seq for the earliest update in a group","seq":"Value seq for the latest update in a group"}},"updates":{"comment":"Full constructor of updates","arguments":{"updates":"List of updates","users":"List of users mentioned in updates","chats":"List of chats mentioned in updates","date":"Current date","seq":"Total number of sent updates"}},"updateShortSentMessage":{"comment":"Shortened constructor containing info on one outgoing message to a contact (the destination chat has to be extracted from the method call that returned this object).","arguments":{"flags":"Flags, see TL conditional fields","out":"Whether the message is outgoing","id":"ID of the sent message","pts":"PTS","pts_count":"PTS count","date":"date","media":"Attached media","entities":"Entities for styled text","ttl_period":"Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well."}},"updateShortChatMessage":{"comment":"Shortened constructor containing info on one new incoming text message from a chat","arguments":{"flags":"Flags, see TL conditional fields","out":"Whether the message is outgoing","mentioned":"Whether we were mentioned in this message","media_unread":"Whether the message contains some unread mentions","silent":"If true, the message is a silent message, no notifications should be triggered","id":"ID of the message","from_id":"ID of the sender of the message","chat_id":"ID of the chat where the message was sent","message":"Message","pts":"PTS","pts_count":"PTS count","date":"date","fwd_from":"Info about a forwarded message","via_bot_id":"Info about the inline bot used to generate this message","reply_to":"Reply (thread) information","entities":"Entities for styled text","ttl_period":"Time To Live of the message, once updateShortChatMessage.date+updateShortChatMessage.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well."}},"photos.photos":{"comment":"Full list of photos with auxiliary data.","arguments":{"photos":"List of photos","users":"List of mentioned users"}},"photos.photosSlice":{"comment":"Incomplete list of photos with auxiliary data.","arguments":{"count":"Total number of photos","photos":"List of photos","users":"List of mentioned users"}},"photos.photo":{"comment":"Photo with auxiliary data.","arguments":{"photo":"Photo","users":"Users"}},"upload.file":{"comment":"File content.","arguments":{"type":"File type","mtime":"Modification time","bytes":"Binary data, file content"}},"updateShortMessage":{"comment":"Info about a message sent to (received from) another user","arguments":{"flags":"Flags, see TL conditional fields","out":"Whether the message is outgoing","mentioned":"Whether we were mentioned in the message","media_unread":"Whether there are some unread mentions in this message","silent":"If true, the message is a silent message, no notifications should be triggered","id":"The message ID","user_id":"The ID of the sender (if outgoing will be the ID of the destination) of the message","message":"The message","pts":"PTS","pts_count":"PTS count","date":"date","fwd_from":"Info about a forwarded message","via_bot_id":"Info about the inline bot used to generate this message","reply_to":"Reply and thread information","entities":"Entities for styled text","ttl_period":"Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well."}},"dcOption":{"comment":"Data center","arguments":{"flags":"Flags, see TL conditional fields","ipv6":"Whether the specified IP is an IPv6 address","media_only":"Whether this DC should only be used to download or upload files","tcpo_only":"Whether this DC only supports connection with transport obfuscation","cdn":"Whether this is a CDN DC.","static":"If set, this IP should be used when connecting through a proxy","this_port_only":"If set, clients must connect using only the specified port, without trying any other port.","id":"DC ID","ip_address":"IP address of DC","port":"Port","secret":"If the tcpo_only flag is set, specifies the secret to use when connecting using transport obfuscation"}},"nearestDc":{"comment":"Nearest data center, according to geo-ip.","arguments":{"country":"Country code determined by geo-ip","this_dc":"Number of current data center","nearest_dc":"Number of nearest data center"}},"upload.fileCdnRedirect":{"comment":"The file must be downloaded from a CDN DC.","arguments":{"dc_id":"CDN DC ID","file_token":"File token (see CDN files)","encryption_key":"Encryption key (see CDN files)","encryption_iv":"Encryption IV (see CDN files)","file_hashes":"File hashes (see CDN files)"}},"config":{"comment":"Current configuration","arguments":{"flags":"Flags, see TL conditional fields","default_p2p_contacts":"Whether the client should use P2P by default for phone calls with contacts","preload_featured_stickers":"Whether the client should preload featured stickers","revoke_pm_inbox":"Whether incoming private messages can be deleted for both participants","blocked_mode":"Indicates that telegram is probably censored by governments/ISPs in the current region","force_try_ipv6":"Whether to forcefully connect using IPv6 dcOptions, even if the client knows that IPv4 is available.","date":"Current date at the server","expires":"Expiration date of this config: when it expires it'll have to be refetched using {@link help.RawGetConfigRequest}","test_mode":"Whether we're connected to the test DCs","this_dc":"ID of the DC that returned the reply","dc_options":"DC IP list","dc_txt_domain_name":"Domain name for fetching encrypted DC list from DNS TXT record","chat_size_max":"Maximum member count for normal groups","megagroup_size_max":"Maximum member count for supergroups","forwarded_count_max":"Maximum number of messages that can be forwarded at once using {@link messages.RawForwardMessagesRequest}.","online_update_period_ms":"The client should {@link account.RawUpdateStatusRequest} every N milliseconds","offline_blur_timeout_ms":"Delay before offline status needs to be sent to the server","offline_idle_timeout_ms":"Time without any user activity after which it should be treated offline","online_cloud_timeout_ms":"If we are offline, but were online from some other client in last online_cloud_timeout_ms milliseconds after we had gone offline, then delay offline notification for notify_cloud_delay_ms milliseconds.","notify_cloud_delay_ms":"If we are offline, but online from some other client then delay sending the offline notification for notify_cloud_delay_ms milliseconds.","notify_default_delay_ms":"If some other client is online, then delay notification for notification_default_delay_ms milliseconds","push_chat_period_ms":"Not for client use","push_chat_limit":"Not for client use","edit_time_limit":"Only messages with age smaller than the one specified can be edited","revoke_time_limit":"Only channel/supergroup messages with age smaller than the specified can be deleted","revoke_pm_time_limit":"Only private messages with age smaller than the specified can be deleted","rating_e_decay":"Exponential decay rate for computing top peer rating","stickers_recent_limit":"Maximum number of recent stickers","channels_read_media_period":"Indicates that round videos (video notes) and voice messages sent in channels and older than the specified period must be marked as read","tmp_sessions":"Temporary passport sessions","call_receive_timeout_ms":"Maximum allowed outgoing ring time in VoIP calls: if the user we're calling doesn't reply within the specified time (in milliseconds), we should hang up the call","call_ring_timeout_ms":"Maximum allowed incoming ring time in VoIP calls: if the current user doesn't reply within the specified time (in milliseconds), the call will be automatically refused","call_connect_timeout_ms":"VoIP connection timeout: if the instance of libtgvoip on the other side of the call doesn't connect to our instance of libtgvoip within the specified time (in milliseconds), the call must be aborted","call_packet_timeout_ms":"If during a VoIP call a packet isn't received for the specified period of time, the call must be aborted","me_url_prefix":"The domain to use to parse deep links ».","autoupdate_url_prefix":"URL to use to auto-update the current app","gif_search_username":"Username of the bot to use to search for GIFs","venue_search_username":"Username of the bot to use to search for venues","img_search_username":"Username of the bot to use for image search","static_maps_provider":"ID of the map provider to use for venues","caption_length_max":"Maximum length of caption (length in utf8 codepoints)","message_length_max":"Maximum length of messages (length in utf8 codepoints)","webfile_dc_id":"DC ID to use to download webfiles","suggested_lang_code":"Suggested language code","lang_pack_version":"Language pack version","base_lang_pack_version":"Basic language pack version","reactions_default":"Default message reaction","autologin_token":"Autologin token, click here for more info on URL authorization »."}},"help.noAppUpdate":{"comment":"No updates are available for the application.","arguments":{"gigagroup":"Is this a broadcast group?"}},"help.inviteText":{"comment":"Text of a text message with an invitation to install Telegram.","arguments":{"message":"Text of the message"}},"help.appUpdate":{"comment":"An update is available for the application.","arguments":{"flags":"Flags, see TL conditional fields","can_not_skip":"Unskippable, the new info must be shown to the user (with a popup or something else)","id":"Update ID","version":"New version name","text":"Text description of the update","entities":"Message entities for styled text","document":"Application binary","url":"Application download URL","sticker":"Associated sticker"}},"inputEncryptedFile":{"comment":"Sets forwarded encrypted file for attachment.","arguments":{"id":"File ID, value of id parameter from {@link RawEncryptedFile}","access_hash":"Checking sum, value of access_hash parameter from {@link RawEncryptedFile}"}},"inputEncryptedFileUploaded":{"comment":"Sets new encrypted file saved by parts using upload.saveFilePart method.","arguments":{"id":"Random file ID created by client","parts":"Number of saved parts","md5_checksum":"In case md5-HASH of the (already encrypted) file was transmitted, file content will be checked prior to use","key_fingerprint":"32-bit fingerprint of the key used to encrypt a file"}},"inputEncryptedFileEmpty":{"comment":"Empty constructor.","arguments":{"gigagroup":"Is this a broadcast group?"}},"encryptedChatRequested":{"comment":"Request to create an encrypted chat.","arguments":{"flags":"Flags, see TL conditional fields","folder_id":"Peer folder ID, for more info click here","id":"Chat ID","access_hash":"Check sum depending on user ID","date":"Chat creation date","admin_id":"Chat creator ID","participant_id":"ID of second chat participant","g_a":"A = g ^ a mod p, see Wikipedia"}},"encryptedChatDiscarded":{"comment":"Discarded or deleted chat.","arguments":{"flags":"Flags, see TL conditional fields","history_deleted":"Whether both users of this secret chat should also remove all of its messages","id":"Chat ID"}},"messages.dhConfigNotModified":{"comment":"Configuring parameters did not change.","arguments":{"random":"Random sequence of bytes of assigned length"}},"encryptedChatEmpty":{"comment":"Empty constructor.","arguments":{"id":"Chat ID"}},"inputEncryptedFileBigUploaded":{"comment":"Assigns a new big encrypted file (over 10 MB in size), saved in parts using the method {@link upload.RawSaveBigFilePartRequest}.","arguments":{"id":"Random file id, created by the client","parts":"Number of saved parts","key_fingerprint":"32-bit imprint of the key used to encrypt the file"}},"encryptedMessage":{"comment":"Encrypted message.","arguments":{"random_id":"Random message ID, assigned by the author of message","chat_id":"ID of encrypted chat","date":"Date of sending","bytes":"TL-serialization of DecryptedMessage type, encrypted with the key created at chat initialization","file":"Attached encrypted file"}},"encryptedFileEmpty":{"comment":"Empty constructor, non-existing file.","arguments":{"gigagroup":"Is this a broadcast group?"}},"encryptedMessageService":{"comment":"Encrypted service message","arguments":{"random_id":"Random message ID, assigned by the author of message","chat_id":"ID of encrypted chat","date":"Date of sending","bytes":"TL-serialization of the DecryptedMessage type, encrypted with the key created at chat initialization"}},"encryptedChat":{"comment":"Encrypted chat","arguments":{"id":"Chat ID","access_hash":"Check sum dependent on the user ID","date":"Date chat was created","admin_id":"Chat creator ID","participant_id":"ID of the second chat participant","g_a_or_b":"B = g ^ b mod p, if the currently authorized user is the chat's creator,
    or A = g ^ a mod p otherwise
    See Wikipedia for more info","key_fingerprint":"64-bit fingerprint of received key"}},"encryptedFile":{"comment":"Encrypted file.","arguments":{"id":"File ID","access_hash":"Checking sum depending on user ID","size":"File size in bytes","dc_id":"Number of data center","key_fingerprint":"32-bit fingerprint of key used for file encryption"}},"messages.dhConfig":{"comment":"New set of configuring parameters.","arguments":{"g":"New value prime, see Wikipedia","p":"New value primitive root, see Wikipedia","version":"Version of set of parameters","random":"Random sequence of bytes of assigned length"}},"inputEncryptedChat":{"comment":"Creates an encrypted chat.","arguments":{"chat_id":"Chat ID","access_hash":"Checking sum from constructor {@link RawEncryptedChat}, {@link RawEncryptedChatWaiting} or {@link RawEncryptedChatRequested}"}},"encryptedChatWaiting":{"comment":"Chat waiting for approval of second participant.","arguments":{"id":"Chat ID","access_hash":"Checking sum depending on user ID","date":"Date of chat creation","admin_id":"Chat creator ID","participant_id":"ID of second chat participant"}},"messages.sentEncryptedMessage":{"comment":"Message without file attachments sent to an encrypted file.","arguments":{"date":"Date of sending"}},"messages.sentEncryptedFile":{"comment":"Message with a file enclosure sent to a protected chat","arguments":{"date":"Sending date","file":"Attached file"}},"document":{"comment":"Document","arguments":{"flags":"Flags, see TL conditional fields","id":"Document ID","access_hash":"Check sum, dependent on document ID","file_reference":"File reference","date":"Creation date","mime_type":"MIME type","size":"Size","thumbs":"Thumbnails","video_thumbs":"Video thumbnails","dc_id":"DC ID","attributes":"Attributes"}},"documentEmpty":{"comment":"Empty constructor, document doesn't exist.","arguments":{"id":"Document ID or 0"}},"inputDocument":{"comment":"Defines a document for subsequent interaction.","arguments":{"id":"Document ID","access_hash":"access_hash parameter from the {@link RawDocument} constructor","file_reference":"File reference"}},"notifyPeer":{"comment":"Notifications generated by a certain user or group.","arguments":{"peer":"user or group"}},"notifyChats":{"comment":"Notifications generated by all groups.","arguments":{"gigagroup":"Is this a broadcast group?"}},"notifyForumTopic":{"comment":"Notifications generated by a topic in a forum.","arguments":{"peer":"Forum ID","top_msg_id":"Topic ID"}},"notifyBroadcasts":{"comment":"Channel notification settings","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputDocumentEmpty":{"comment":"Empty constructor.","arguments":{"gigagroup":"Is this a broadcast group?"}},"notifyUsers":{"comment":"Notifications generated by all users.","arguments":{"gigagroup":"Is this a broadcast group?"}},"sendMessageCancelAction":{"comment":"Invalidate all previous action updates. E.g. when user deletes entered text or aborts a video upload.","arguments":{"gigagroup":"Is this a broadcast group?"}},"sendMessageRecordVideoAction":{"comment":"User is recording a video.","arguments":{"gigagroup":"Is this a broadcast group?"}},"sendMessageTypingAction":{"comment":"User is typing.","arguments":{"gigagroup":"Is this a broadcast group?"}},"help.support":{"comment":"Info on support user.","arguments":{"phone_number":"Phone number","user":"User"}},"sendMessageUploadVideoAction":{"comment":"User is uploading a video.","arguments":{"progress":"Progress percentage"}},"sendMessageRecordAudioAction":{"comment":"User is recording a voice message.","arguments":{"gigagroup":"Is this a broadcast group?"}},"sendMessageUploadDocumentAction":{"comment":"User is uploading a file.","arguments":{"progress":"Progress percentage"}},"sendMessageUploadAudioAction":{"comment":"User is uploading a voice message.","arguments":{"progress":"Progress percentage"}},"sendMessageUploadPhotoAction":{"comment":"User is uploading a photo.","arguments":{"progress":"Progress percentage"}},"sendMessageGeoLocationAction":{"comment":"User is selecting a location to share.","arguments":{"gigagroup":"Is this a broadcast group?"}},"sendMessageChooseContactAction":{"comment":"User is selecting a contact to share.","arguments":{"gigagroup":"Is this a broadcast group?"}},"speakingInGroupCallAction":{"comment":"User is currently speaking in the group call","arguments":{"gigagroup":"Is this a broadcast group?"}},"sendMessageGamePlayAction":{"comment":"User is playing a game","arguments":{"gigagroup":"Is this a broadcast group?"}},"sendMessageUploadRoundAction":{"comment":"User is uploading a round video","arguments":{"progress":"Progress percentage"}},"sendMessageEmojiInteractionSeen":{"comment":"User is watching an animated emoji reaction triggered by another user, click here for more info ».","arguments":{"emoticon":"Emoji"}},"sendMessageHistoryImportAction":{"comment":"Chat history is being imported","arguments":{"progress":"Progress percentage"}},"sendMessageChooseStickerAction":{"comment":"User is choosing a sticker","arguments":{"gigagroup":"Is this a broadcast group?"}},"sendMessageEmojiInteraction":{"comment":"User has clicked on an animated emoji triggering a reaction, click here for more info ».","arguments":{"emoticon":"Emoji","msg_id":"Message ID of the animated emoji that was clicked","interaction":"A JSON object with interaction info, click here for more info »"}},"contacts.found":{"comment":"Users found by name substring and auxiliary data.","arguments":{"my_results":"Personalized results","results":"List of found user identifiers","chats":"Found chats","users":"List of users"}},"inputPrivacyKeyStatusTimestamp":{"comment":"Whether people will be able to see our exact last online timestamp.\n\nNote that if we decide to hide our exact last online timestamp to someone (i.e., users A, B, C, or all users) and we do not have a Premium subscription, we won't be able to see the exact last online timestamp of those users (A, B, C, or all users), even if those users do share it with us.\n\nIf those users do share their exact online status with us, but we can't see it due to the reason mentioned above, the by_me flag of {@link RawUserStatusRecently}, {@link RawUserStatusLastWeek}, {@link RawUserStatusLastMonth} will be set.","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputPrivacyKeyPhoneCall":{"comment":"Whether you will accept phone calls","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputPrivacyKeyChatInvite":{"comment":"Whether people will be able to invite you to chats","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputPrivacyKeyProfilePhoto":{"comment":"Whether people will be able to see your profile picture","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputPrivacyKeyPhoneNumber":{"comment":"Whether people will be able to see your phone number","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputPrivacyKeyPhoneP2P":{"comment":"Whether to allow P2P communication during VoIP calls","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputPrivacyKeyAddedByPhone":{"comment":"Whether people can add you to their contact list by your phone number","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputPrivacyKeyForwards":{"comment":"Whether messages forwarded from you will be anonymous","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputPrivacyKeyVoiceMessages":{"comment":"Whether people can send you voice messages or round videos (Premium users only).","arguments":{"gigagroup":"Is this a broadcast group?"}},"privacyKeyStatusTimestamp":{"comment":"Whether we can see the last online timestamp of this user.\n\nNote that if we decide to hide our exact last online timestamp to someone (i.e., users A, B, C, or all users) and we do not have a Premium subscription, we won't be able to see the exact last online timestamp of those users (A, B, C, or all users), even if those users do share it with us.\n\nIf those users do share their exact online status with us, but we can't see it due to the reason mentioned above, the by_me flag of {@link RawUserStatusRecently}, {@link RawUserStatusLastWeek}, {@link RawUserStatusLastMonth} will be set.","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputPrivacyKeyAbout":{"comment":"Whether people can see your bio","arguments":{"gigagroup":"Is this a broadcast group?"}},"sendMessageRecordRoundAction":{"comment":"User is recording a round video to share","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputPrivacyKeyBirthday":{"comment":"Whether the user can see our birthday.","arguments":{"gigagroup":"Is this a broadcast group?"}},"privacyKeyChatInvite":{"comment":"Whether the user can be invited to chats","arguments":{"gigagroup":"Is this a broadcast group?"}},"privacyKeyForwards":{"comment":"Whether messages forwarded from the user will be anonymously forwarded","arguments":{"gigagroup":"Is this a broadcast group?"}},"privacyKeyPhoneP2P":{"comment":"Whether P2P connections in phone calls with this user are allowed","arguments":{"gigagroup":"Is this a broadcast group?"}},"privacyKeyProfilePhoto":{"comment":"Whether the profile picture of the user is visible","arguments":{"gigagroup":"Is this a broadcast group?"}},"privacyKeyPhoneCall":{"comment":"Whether the user accepts phone calls","arguments":{"gigagroup":"Is this a broadcast group?"}},"privacyKeyAddedByPhone":{"comment":"Whether this user can be added to our contact list by their phone number","arguments":{"gigagroup":"Is this a broadcast group?"}},"privacyKeyBirthday":{"comment":"Whether the user can see our birthday.","arguments":{"gigagroup":"Is this a broadcast group?"}},"privacyKeyVoiceMessages":{"comment":"Whether the user accepts voice messages","arguments":{"gigagroup":"Is this a broadcast group?"}},"privacyKeyPhoneNumber":{"comment":"Whether the user allows us to see their phone number","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputPrivacyValueAllowContacts":{"comment":"Allow only contacts","arguments":{"gigagroup":"Is this a broadcast group?"}},"privacyKeyAbout":{"comment":"Whether people can see your bio","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputPrivacyValueDisallowUsers":{"comment":"Disallow only certain users","arguments":{"users":"Users to disallow"}},"inputPrivacyValueDisallowContacts":{"comment":"Disallow only contacts","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputPrivacyValueAllowCloseFriends":{"comment":"Allow only close friends »","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputPrivacyValueAllowChatParticipants":{"comment":"Allow only participants of certain chats","arguments":{"chats":"Allowed chat IDs"}},"inputPrivacyValueDisallowChatParticipants":{"comment":"Disallow only participants of certain chats","arguments":{"chats":"Disallowed chat IDs"}},"inputPrivacyValueAllowPremium":{"comment":"Allow only users with a Premium subscription », currently only usable for {@link RawInputPrivacyKeyChatInvite}.","arguments":{"gigagroup":"Is this a broadcast group?"}},"privacyValueAllowAll":{"comment":"Allow all users","arguments":{"gigagroup":"Is this a broadcast group?"}},"privacyValueAllowContacts":{"comment":"Allow all contacts","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputPrivacyValueAllowUsers":{"comment":"Allow only certain users","arguments":{"users":"Allowed users"}},"inputPrivacyValueAllowAll":{"comment":"Allow all users","arguments":{"gigagroup":"Is this a broadcast group?"}},"privacyValueDisallowContacts":{"comment":"Disallow only contacts","arguments":{"gigagroup":"Is this a broadcast group?"}},"privacyValueAllowUsers":{"comment":"Allow only certain users","arguments":{"users":"Allowed users"}},"privacyValueDisallowAll":{"comment":"Disallow all users","arguments":{"gigagroup":"Is this a broadcast group?"}},"privacyValueAllowChatParticipants":{"comment":"Allow all participants of certain chats","arguments":{"chats":"Allowed chats"}},"privacyValueDisallowUsers":{"comment":"Disallow only certain users","arguments":{"users":"Disallowed users"}},"privacyValueDisallowChatParticipants":{"comment":"Disallow only participants of certain chats","arguments":{"chats":"Disallowed chats"}},"inputPrivacyValueDisallowAll":{"comment":"Disallow all","arguments":{"gigagroup":"Is this a broadcast group?"}},"accountDaysTTL":{"comment":"Time to live in days of the current account","arguments":{"days":"This account will self-destruct in the specified number of days"}},"privacyValueAllowPremium":{"comment":"Allow only users with a Premium subscription », currently only usable for {@link RawInputPrivacyKeyChatInvite}.","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.privacyRules":{"comment":"Privacy rules","arguments":{"rules":"Privacy rules","chats":"Chats to which the rules apply","users":"Users to which the rules apply"}},"documentAttributeImageSize":{"comment":"Defines the width and height of an image uploaded as document","arguments":{"w":"Width of image","h":"Height of image"}},"documentAttributeAnimated":{"comment":"Defines an animated GIF","arguments":{"gigagroup":"Is this a broadcast group?"}},"privacyValueAllowCloseFriends":{"comment":"Allow only close friends »","arguments":{"gigagroup":"Is this a broadcast group?"}},"documentAttributeSticker":{"comment":"Defines a sticker","arguments":{"flags":"Flags, see TL conditional fields","mask":"Whether this is a mask sticker","alt":"Alternative emoji representation of sticker","stickerset":"Associated stickerset","mask_coords":"Mask coordinates (if this is a mask sticker, attached to a photo)"}},"documentAttributeVideo":{"comment":"Defines a video","arguments":{"flags":"Flags, see TL conditional fields","round_message":"Whether this is a round video","supports_streaming":"Whether the video supports streaming","nosound":"Whether the specified document is a video file with no audio tracks (a GIF animation (even as MPEG4), for example)","duration":"Duration in seconds","w":"Video width","h":"Video height","preload_prefix_size":"Number of bytes to preload when preloading videos (particularly video stories).","video_start_ts":"Floating point UNIX timestamp in seconds, indicating the frame of the video that should be used as static preview and thumbnail."}},"documentAttributeFilename":{"comment":"A simple document with a file name","arguments":{"file_name":"The file name"}},"documentAttributeAudio":{"comment":"Represents an audio file","arguments":{"flags":"Flags, see TL conditional fields","voice":"Whether this is a voice message","duration":"Duration in seconds","title":"Name of song","performer":"Performer","waveform":"Waveform: consists in a series of bitpacked 5-bit values.
    Example implementation: android."}},"documentAttributeHasStickers":{"comment":"Whether the current document has stickers attached","arguments":{"gigagroup":"Is this a broadcast group?"}},"documentAttributeCustomEmoji":{"comment":"Info about a custom emoji","arguments":{"flags":"Flags, see TL conditional fields","free":"Whether this custom emoji can be sent by non-Premium users","text_color":"Whether the color of this TGS custom emoji should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context.","alt":"The actual emoji","stickerset":"The emoji stickerset to which this emoji belongs."}},"messages.stickersNotModified":{"comment":"No new stickers were found for the given query","arguments":{"gigagroup":"Is this a broadcast group?"}},"messages.stickers":{"comment":"Found stickers","arguments":{"hash":"Hash used for caching, for more info click here","stickers":"Stickers"}},"stickerPack":{"comment":"A stickerpack is a group of stickers associated to the same emoji.
    \nIt is not a sticker pack the way it is usually intended, you may be looking for a StickerSet.","arguments":{"emoticon":"Emoji","documents":"Stickers"}},"messages.allStickersNotModified":{"comment":"Info about all installed stickers hasn't changed","arguments":{"gigagroup":"Is this a broadcast group?"}},"messages.allStickers":{"comment":"Info about all installed stickers","arguments":{"hash":"Hash used for caching, for more info click here","sets":"All stickersets"}},"webPageEmpty":{"comment":"No preview is available for the webpage","arguments":{"flags":"Flags, see TL conditional fields","id":"Preview ID","url":"URL of the webpage."}},"webPagePending":{"comment":"A preview of the webpage is currently being generated","arguments":{"flags":"Flags, see TL conditional fields","id":"ID of preview","url":"URL of the webpage","date":"When was the processing started"}},"messages.affectedMessages":{"comment":"Events affected by operation","arguments":{"pts":"Event count after generation","pts_count":"Number of events that were generated"}},"webPageNotModified":{"comment":"The preview of the webpage hasn't changed","arguments":{"flags":"Flags, see TL conditional fields","cached_page_views":"Page view count"}},"webPage":{"comment":"Webpage preview","arguments":{"flags":"Flags, see TL conditional fields","has_large_media":"Whether the size of the media in the preview can be changed.","id":"Preview ID","url":"URL of previewed webpage","display_url":"Webpage URL to be displayed to the user","hash":"Hash used for caching, for more info click here","type":"Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else, see here » for a full list.","site_name":"Short name of the site (e.g., Google Docs, App Store)","title":"Title of the content","description":"Content description","photo":"Image representing the content","embed_url":"URL to show in the embedded preview","embed_type":"MIME type of the embedded preview, (e.g., text/html or video/mp4)","embed_width":"Width of the embedded preview","embed_height":"Height of the embedded preview","duration":"Duration of the content, in seconds","author":"Author of the content","document":"Preview of the content as a media file","cached_page":"Page contents in instant view format","attributes":"Webpage attributes"}},"account.authorizations":{"comment":"Logged-in sessions","arguments":{"authorization_ttl_days":"Time-to-live of session","authorizations":"Logged-in sessions"}},"authorization":{"comment":"Logged-in session","arguments":{"flags":"Flags, see TL conditional fields","current":"Whether this is the current session","official_app":"Whether the session is from an official app","password_pending":"Whether the session is still waiting for a 2FA password","encrypted_requests_disabled":"Whether this session will accept encrypted chats","call_requests_disabled":"Whether this session will accept phone calls","unconfirmed":"Whether the session is unconfirmed, see here » for more info.","hash":"Identifier","device_model":"Device model","platform":"Platform","system_version":"System version","api_id":"API ID","app_name":"App name","app_version":"App version","date_created":"When was the session created","date_active":"When was the session last active","ip":"Last known IP","country":"Country determined from IP","region":"Region determined from IP"}},"account.password":{"comment":"Configuration for two-factor authorization","arguments":{"flags":"Flags, see TL conditional fields","has_recovery":"Whether the user has a recovery method configured","has_secure_values":"Whether telegram passport is enabled","has_password":"Whether the user has a password","current_algo":"The KDF algorithm for SRP two-factor authentication of the current password","srp_B":"Srp B param for SRP authorization","srp_id":"Srp ID param for SRP authorization","hint":"Text hint for the password","email_unconfirmed_pattern":"A password recovery email with the specified pattern is still awaiting verification","new_algo":"The KDF algorithm for SRP two-factor authentication to use when creating new passwords","new_secure_algo":"The KDF algorithm for telegram passport","secure_random":"Secure random string","pending_reset_date":"The 2FA password will be automatically removed at this date, unless the user cancels the operation","login_email_pattern":"A verified login email with the specified pattern is configured"}},"account.passwordSettings":{"comment":"Private info associated to the password info (recovery email, telegram passport info & so on)","arguments":{"flags":"Flags, see TL conditional fields","email":"2FA Recovery email","secure_settings":"Telegram passport settings"}},"account.passwordInputSettings":{"comment":"Settings for setting up a new password","arguments":{"flags":"Flags, see TL conditional fields","new_algo":"The SRP algorithm to use","new_password_hash":"The computed password hash","hint":"Text hint for the password","email":"Password recovery email","new_secure_settings":"Telegram passport settings"}},"auth.passwordRecovery":{"comment":"Recovery info of a 2FA password, only for accounts with a recovery email configured.","arguments":{"email_pattern":"The email to which the recovery code was sent must match this pattern."}},"chatInviteExported":{"comment":"Exported chat invite","arguments":{"flags":"Flags, see TL conditional fields","revoked":"Whether this chat invite was revoked","permanent":"Whether this chat invite has no expiration","request_needed":"Whether users importing this invite link will have to be approved to join the channel or group","link":"Chat invitation link","admin_id":"ID of the admin that created this chat invite","date":"When was this chat invite created","start_date":"When was this chat invite last modified","expire_date":"When does this chat invite expire","usage_limit":"Maximum number of users that can join using this link","usage":"How many users joined using this link","requested":"Number of users that have already used this link to join","title":"Custom description for the invite link, visible only to admins"}},"receivedNotifyMessage":{"comment":"Message ID, for which PUSH-notifications were cancelled.","arguments":{"id":"Message ID, for which PUSH-notifications were canceled","flags":"Reserved for future use"}},"chatInviteAlready":{"comment":"The user has already joined this chat","arguments":{"chat":"The chat connected to the invite"}},"chatInvite":{"comment":"Chat invite info","arguments":{"flags":"Flags, see TL conditional fields","channel":"Whether this is a channel/supergroup or a normal group","broadcast":"Whether this is a channel","public":"Whether this is a public channel/supergroup","megagroup":"Whether this is a supergroup","request_needed":"Whether the join request » must be first approved by an administrator","verified":"Is this chat or channel verified by Telegram?","scam":"This chat is probably a scam","fake":"If set, this chat was reported by many users as a fake or scam: be careful when interacting with it.","title":"Chat/supergroup/channel title","about":"Description of the group of channel","photo":"Chat/supergroup/channel photo","participants_count":"Participant count","participants":"A few of the participants that are in the group","color":"Profile color palette ID"}},"chatInvitePublicJoinRequests":{"comment":"Used in updates and in the channel log to indicate when a user is requesting to join or has joined a discussion group","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputStickerSetEmpty":{"comment":"Empty constructor","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputStickerSetID":{"comment":"Stickerset by ID","arguments":{"id":"ID","access_hash":"Access hash"}},"inputStickerSetShortName":{"comment":"Stickerset by short name, from a stickerset deep link »","arguments":{"short_name":"Short name from a stickerset deep link »"}},"inputStickerSetAnimatedEmoji":{"comment":"Animated emojis stickerset","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputStickerSetPremiumGifts":{"comment":"Stickers to show when receiving a gifted Telegram Premium subscription","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputStickerSetAnimatedEmojiAnimations":{"comment":"Animated emoji reaction stickerset (contains animations to play when a user clicks on a given animated emoji)","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputStickerSetEmojiGenericAnimations":{"comment":"Generic animation stickerset containing animations to play when reacting to messages using a normal emoji without a custom animation","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputStickerSetEmojiChannelDefaultStatuses":{"comment":"Default custom emoji status stickerset for channel statuses","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputStickerSetDice":{"comment":"Used for fetching animated dice stickers","arguments":{"emoticon":"The emoji, for now \"🏀\", \"🎲\" and \"🎯\" are supported"}},"inputStickerSetEmojiDefaultTopicIcons":{"comment":"Default custom emoji stickerset for forum topic icons","arguments":{"gigagroup":"Is this a broadcast group?"}},"messages.stickerSet":{"comment":"Stickerset and stickers inside it","arguments":{"set":"The stickerset","packs":"Emoji info for stickers","keywords":"Keywords for some or every sticker in the stickerset.","documents":"Stickers in stickerset"}},"chatInvitePeek":{"comment":"A chat invitation that also allows peeking into the group to read messages without joining it.","arguments":{"chat":"Chat information","expires":"Read-only anonymous access to this group will be revoked at this date"}},"messages.stickerSetNotModified":{"comment":"The stickerset hasn't changed","arguments":{"gigagroup":"Is this a broadcast group?"}},"botInfo":{"comment":"Info about bots (available bot commands, etc)","arguments":{"flags":"Flags, see TL conditional fields","has_preview_medias":"If set, the bot has some preview medias for the configured Main Mini App, see here » for more info on Main Mini App preview medias.","user_id":"ID of the bot","description":"Description of the bot","description_photo":"Description photo","description_document":"Description animation in MPEG4 format","commands":"Bot commands that can be used in the chat","menu_button":"Indicates the action to execute when pressing the in-UI menu button for bots"}},"keyboardButton":{"comment":"Bot keyboard button","arguments":{"text":"Button text"}},"inputStickerSetEmojiDefaultStatuses":{"comment":"Default custom emoji status stickerset","arguments":{"gigagroup":"Is this a broadcast group?"}},"botCommand":{"comment":"Describes a bot command that can be used in a chat","arguments":{"command":"/command name","description":"Description of the command"}},"stickerSet":{"comment":"Represents a stickerset (stickerpack)","arguments":{"flags":"Flags, see TL conditional fields","archived":"Whether this stickerset was archived (due to too many saved stickers in the current account)","official":"Is this stickerset official","masks":"Is this a mask stickerset","emojis":"This is a custom emoji stickerset","text_color":"Whether the color of this TGS custom emoji stickerset should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context.","channel_emoji_status":"If set, this custom emoji stickerset can be used in channel/supergroup emoji statuses.","creator":"Whether we created this stickerset","installed_date":"When was this stickerset installed","id":"ID of the stickerset","access_hash":"Access hash of stickerset","title":"Title of stickerset","short_name":"Short name of stickerset, used when sharing stickerset using stickerset deep links.","thumbs":"Stickerset thumbnail","thumb_dc_id":"DC ID of thumbnail","thumb_version":"Thumbnail version","thumb_document_id":"Document ID of custom emoji thumbnail, fetch the document using {@link messages.RawGetCustomEmojiDocumentsRequest}","count":"Number of stickers in pack","hash":"Hash"}},"keyboardButtonCallback":{"comment":"Callback button","arguments":{"flags":"Flags, see TL conditional fields","requires_password":"Whether the user should verify their identity by entering their 2FA SRP parameters to the {@link messages.RawGetBotCallbackAnswerRequest} method. NOTE: telegram and the bot WILL NOT have access to the plaintext password, thanks to SRP. This button is mainly used by the official @botfather bot, for verifying the user's identity before transferring ownership of a bot to another user.","text":"Button text","data":"Callback data"}},"keyboardButtonUrl":{"comment":"URL button","arguments":{"text":"Button label","url":"URL"}},"keyboardButtonRequestPhone":{"comment":"Button to request a user's phone number","arguments":{"text":"Button text"}},"keyboardButtonGame":{"comment":"Button to start a game","arguments":{"text":"Button text"}},"keyboardButtonSwitchInline":{"comment":"Button to force a user to switch to inline mode: pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field.","arguments":{"flags":"Flags, see TL conditional fields","same_peer":"If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field.","text":"Button label","query":"The inline query to use","peer_types":"Filter to use when selecting chats."}},"inputKeyboardButtonUrlAuth":{"comment":"Button to request a user to {@link messages.RawAcceptUrlAuthRequest} via URL using Seamless Telegram Login.","arguments":{"flags":"Flags, see TL conditional fields","request_write_access":"Set this flag to request the permission for your bot to send messages to the user.","text":"Button text","fwd_text":"New text of the button in forwarded messages.","url":"An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.
    NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization.","bot":"Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details."}},"keyboardButtonBuy":{"comment":"Button to buy a product","arguments":{"text":"Button text"}},"keyboardButtonUrlAuth":{"comment":"Button to request a user to authorize via URL using Seamless Telegram Login. When the user clicks on such a button, {@link messages.RawRequestUrlAuthRequest} should be called, providing the button_id and the ID of the container message. The returned {@link RawUrlAuthResultRequest} object will contain more details about the authorization request (request_write_access if the bot would like to send messages to the user along with the username of the bot which will be used for user authorization). Finally, the user can choose to call {@link messages.RawAcceptUrlAuthRequest} to get a {@link RawUrlAuthResultAccepted} with the URL to open instead of the url of this constructor, or a {@link RawUrlAuthResultDefault}, in which case the url of this constructor must be opened, instead. If the user refuses the authorization request but still wants to open the link, the url of this constructor must be used.","arguments":{"flags":"Flags, see TL conditional fields","text":"Button label","fwd_text":"New text of the button in forwarded messages.","url":"An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.

    NOTE: Services must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization.","button_id":"ID of the button to pass to {@link messages.RawRequestUrlAuthRequest}"}},"keyboardButtonRequestPoll":{"comment":"A button that allows the user to create and send a poll when pressed; available only in private","arguments":{"flags":"Flags, see TL conditional fields","quiz":"If set, only quiz polls can be sent","text":"Button text"}},"keyboardButtonUserProfile":{"comment":"Button that links directly to a user profile","arguments":{"text":"Button text","user_id":"User ID"}},"inputKeyboardButtonUserProfile":{"comment":"Button that links directly to a user profile","arguments":{"text":"Button text","user_id":"User ID"}},"keyboardButtonRequestGeoLocation":{"comment":"Button to request a user's geolocation","arguments":{"text":"Button text"}},"keyboardButtonWebView":{"comment":"Button to open a bot mini app using {@link messages.RawRequestWebViewRequest}, sending over user information after user confirmation.\n\nCan only be sent or received as part of an inline keyboard, use {@link RawKeyboardButtonSimpleWebView} for reply keyboards.","arguments":{"text":"Button text","url":"Web app url"}},"keyboardButtonSimpleWebView":{"comment":"Button to open a bot mini app using {@link messages.RawRequestSimpleWebViewRequest}, without sending user information to the web app.\n\nCan only be sent or received as part of a reply keyboard, use {@link RawKeyboardButtonWebView} for inline keyboards.","arguments":{"text":"Button text","url":"Web app URL"}},"keyboardButtonRow":{"comment":"Inline keyboard row","arguments":{"buttons":"Bot or inline keyboard buttons"}},"replyKeyboardHide":{"comment":"Hide sent bot keyboard","arguments":{"flags":"Flags, see TL conditional fields","selective":"Use this flag if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.

    Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet"}},"inputKeyboardButtonRequestPeer":{"comment":"Prompts the user to select and share one or more peers with the bot using {@link messages.RawSendBotRequestedPeerRequest}.","arguments":{"flags":"Flags, see TL conditional fields","name_requested":"Set this flag to request the peer's name.","username_requested":"Set this flag to request the peer's @username (if any).","photo_requested":"Set this flag to request the peer's photo (if any).","text":"Button text","button_id":"Button ID, to be passed to {@link messages.RawSendBotRequestedPeerRequest}.","peer_type":"Filtering criteria to use for the peer selection list shown to the user.
    The list should display all existing peers of the specified type, and should also offer an option for the user to create and immediately use one or more (up to max_quantity) peers of the specified type, if needed.","max_quantity":"Maximum number of peers that can be chosen."}},"replyKeyboardForceReply":{"comment":"Force the user to send a reply","arguments":{"flags":"Flags, see TL conditional fields","single_use":"Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again.","selective":"Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.
    Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard.","placeholder":"The placeholder to be shown in the input field when the keyboard is active; 1-64 characters."}},"replyKeyboardMarkup":{"comment":"Bot keyboard","arguments":{"flags":"Flags, see TL conditional fields","resize":"Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). If not set, the custom keyboard is always of the same height as the app's standard keyboard.","single_use":"Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again.","selective":"Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.

    Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard.","persistent":"Requests clients to always show the keyboard when the regular keyboard is hidden.","rows":"Button row","placeholder":"The placeholder to be shown in the input field when the keyboard is active; 1-64 characters."}},"keyboardButtonRequestPeer":{"comment":"Prompts the user to select and share one or more peers with the bot using {@link messages.RawSendBotRequestedPeerRequest}","arguments":{"text":"Button text","button_id":"Button ID, to be passed to {@link messages.RawSendBotRequestedPeerRequest}.","peer_type":"Filtering criteria to use for the peer selection list shown to the user.
    The list should display all existing peers of the specified type, and should also offer an option for the user to create and immediately use one or more (up to max_quantity) peers of the specified type, if needed.","max_quantity":"Maximum number of peers that can be chosen."}},"messageEntityHashtag":{"comment":"#hashtag message entity","arguments":{"offset":"Offset of message entity within message (in UTF-16 code units)","length":"Length of message entity within message (in UTF-16 code units)"}},"replyInlineMarkup":{"comment":"Bot or inline keyboard","arguments":{"rows":"Bot or inline keyboard rows"}},"messageEntityUnknown":{"comment":"Unknown message entity","arguments":{"offset":"Offset of message entity within message (in UTF-16 code units)","length":"Length of message entity within message (in UTF-16 code units)"}},"messageEntityMention":{"comment":"Message entity mentioning a user by @username; {@link RawMessageEntityMentionName} can also be used to mention users by their ID.","arguments":{"offset":"Offset of message entity within message (in UTF-16 code units)","length":"Length of message entity within message (in UTF-16 code units)"}},"messageEntityBotCommand":{"comment":"Message entity representing a bot /command","arguments":{"offset":"Offset of message entity within message (in UTF-16 code units)","length":"Length of message entity within message (in UTF-16 code units)"}},"messageEntityUrl":{"comment":"Message entity representing an in-text url: https://google.com; for text urls, use {@link RawMessageEntityTextUrl}.","arguments":{"offset":"Offset of message entity within message (in UTF-16 code units)","length":"Length of message entity within message (in UTF-16 code units)"}},"messageEntityEmail":{"comment":"Message entity representing an email@example.com.","arguments":{"offset":"Offset of message entity within message (in UTF-16 code units)","length":"Length of message entity within message (in UTF-16 code units)"}},"messageEntityBold":{"comment":"Message entity representing bold text.","arguments":{"offset":"Offset of message entity within message (in UTF-16 code units)","length":"Length of message entity within message (in UTF-16 code units)"}},"messageEntityCode":{"comment":"Message entity representing a codeblock.","arguments":{"offset":"Offset of message entity within message (in UTF-16 code units)","length":"Length of message entity within message (in UTF-16 code units)"}},"messageEntityItalic":{"comment":"Message entity representing italic text.","arguments":{"offset":"Offset of message entity within message (in UTF-16 code units)","length":"Length of message entity within message (in UTF-16 code units)"}},"messageEntityPre":{"comment":"Message entity representing a preformatted codeblock, allowing the user to specify a programming language for the codeblock.","arguments":{"offset":"Offset of message entity within message (in UTF-16 code units)","length":"Length of message entity within message (in UTF-16 code units)","language":"Programming language of the code"}},"messageEntityMentionName":{"comment":"Message entity representing a user mention: for creating a mention use {@link RawInputMessageEntityMentionName}.","arguments":{"offset":"Offset of message entity within message (in UTF-16 code units)","length":"Length of message entity within message (in UTF-16 code units)","user_id":"Identifier of the user that was mentioned"}},"messageEntityTextUrl":{"comment":"Message entity representing a text url: for in-text urls like https://google.com use {@link RawMessageEntityUrl}.\n\nNote that an additional confirmation popup with the full URL must be displayed to the user before opening this link, unless the domain satisfies the conditions specified in the domain whitelist documentation ».","arguments":{"offset":"Offset of message entity within message (in UTF-16 code units)","length":"Length of message entity within message (in UTF-16 code units)","url":"The actual URL"}},"inputMessageEntityMentionName":{"comment":"Message entity that can be used to create a user user mention: received mentions use the {@link RawMessageEntityMentionName} constructor, instead.","arguments":{"offset":"Offset of message entity within message (in UTF-16 code units)","length":"Length of message entity within message (in UTF-16 code units)","user_id":"Identifier of the user that was mentioned"}},"messageEntityPhone":{"comment":"Message entity representing a phone number.","arguments":{"offset":"Offset of message entity within message (in UTF-16 code units)","length":"Length of message entity within message (in UTF-16 code units)"}},"messageEntityUnderline":{"comment":"Message entity representing underlined text.","arguments":{"offset":"Offset of message entity within message (in UTF-16 code units)","length":"Length of message entity within message (in UTF-16 code units)"}},"messageEntityStrike":{"comment":"Message entity representing strikethrough text.","arguments":{"offset":"Offset of message entity within message (in UTF-16 code units)","length":"Length of message entity within message (in UTF-16 code units)"}},"messageEntitySpoiler":{"comment":"Message entity representing a spoiler","arguments":{"offset":"Offset of message entity within message (in UTF-16 code units)","length":"Length of message entity within message (in UTF-16 code units)"}},"messageEntityBankCard":{"comment":"Indicates a credit card number","arguments":{"offset":"Offset of message entity within message (in UTF-16 code units)","length":"Length of message entity within message (in UTF-16 code units)"}},"messageEntityBlockquote":{"comment":"Message entity representing a block quote.","arguments":{"flags":"Flags, see TL conditional fields","collapsed":"Whether the quote is collapsed by default.","offset":"Offset of message entity within message (in UTF-16 code units)","length":"Length of message entity within message (in UTF-16 code units)"}},"messageEntityCashtag":{"comment":"Message entity representing a $cashtag.","arguments":{"offset":"Offset of message entity within message (in UTF-16 code units)","length":"Length of message entity within message (in UTF-16 code units)"}},"inputChannel":{"comment":"Represents a channel","arguments":{"channel_id":"Channel ID","access_hash":"Access hash taken from the {@link RawChannel} constructor"}},"inputChannelFromMessage":{"comment":"Defines a min channel that was seen in a certain message of a certain chat.","arguments":{"peer":"The chat where the channel was seen","msg_id":"The message ID in the chat where the channel was seen","channel_id":"The channel ID"}},"messageRange":{"comment":"Indicates a range of chat messages","arguments":{"min_id":"Start of range (message ID)","max_id":"End of range (message ID)"}},"inputChannelEmpty":{"comment":"Represents the absence of a channel","arguments":{"gigagroup":"Is this a broadcast group?"}},"contacts.resolvedPeer":{"comment":"Resolved peer","arguments":{"peer":"The peer","chats":"Chats","users":"Users"}},"messageEntityCustomEmoji":{"comment":"Represents a custom emoji.
    \nNote that this entity must wrap exactly one regular emoji (the one contained in {@link RawDocumentAttributeCustomEmoji}.alt) in the related text, otherwise the server will ignore it.","arguments":{"offset":"Offset of message entity within message (in UTF-16 code units)","length":"Length of message entity within message (in UTF-16 code units)","document_id":"Document ID of the custom emoji, use {@link messages.RawGetCustomEmojiDocumentsRequest} to fetch the emoji animation and the actual emoji it represents."}},"updates.channelDifferenceEmpty":{"comment":"There are no new updates","arguments":{"flags":"Flags, see TL conditional fields","final":"Whether there are more updates that must be fetched (always false)","pts":"The latest PTS","timeout":"Clients are supposed to refetch the channel difference after timeout seconds have elapsed, if the user is currently viewing the chat, see here » for more info."}},"channelMessagesFilterEmpty":{"comment":"No filter","arguments":{"gigagroup":"Is this a broadcast group?"}},"updates.channelDifference":{"comment":"The new updates","arguments":{"flags":"Flags, see TL conditional fields","final":"Whether there are more updates to be fetched using getDifference, starting from the provided pts","pts":"The PTS from which to start getting updates the next time","timeout":"Clients are supposed to refetch the channel difference after timeout seconds have elapsed, if the user is currently viewing the chat, see here » for more info.","new_messages":"New messages","other_updates":"Other updates","chats":"Chats","users":"Users"}},"channelMessagesFilter":{"comment":"Filter for getting only certain types of channel messages","arguments":{"flags":"Flags, see TL conditional fields","exclude_new_messages":"Whether to exclude new messages from the search","ranges":"A range of messages to fetch"}},"updates.channelDifferenceTooLong":{"comment":"The provided pts + limit < remote pts. Simply, there are too many updates to be fetched (more than limit), the client has to resolve the update gap in one of the following ways (assuming the existence of a persistent database to locally store messages):\n\nIt should be also noted that some messages like live location messages shouldn't be deleted.","arguments":{"flags":"Flags, see TL conditional fields","final":"Whether there are more updates that must be fetched (always false)","timeout":"Clients are supposed to refetch the channel difference after timeout seconds have elapsed","dialog":"Dialog containing the latest PTS that can be used to reset the channel state","messages":"The latest messages","chats":"Chats from messages","users":"Users from messages"}},"channelParticipantSelf":{"comment":"Myself","arguments":{"flags":"Flags, see TL conditional fields","via_request":"Whether I joined upon specific approval of an admin","user_id":"User ID","inviter_id":"User that invited me to the channel/supergroup","date":"When did I join the channel/supergroup"}},"channelParticipant":{"comment":"Channel/supergroup participant","arguments":{"user_id":"Participant user ID","date":"Date joined"}},"channelParticipantAdmin":{"comment":"Admin","arguments":{"flags":"Flags, see TL conditional fields","can_edit":"Can this admin promote other admins with the same permissions?","self":"Is this the current user","user_id":"Admin user ID","inviter_id":"User that invited the admin to the channel/group","promoted_by":"User that promoted the user to admin","date":"When did the user join","admin_rights":"Admin rights","rank":"The role (rank) of the admin in the group: just an arbitrary string, admin by default"}},"channelParticipantBanned":{"comment":"Banned/kicked user","arguments":{"flags":"Flags, see TL conditional fields","left":"Whether the user has left the group","peer":"The banned peer","kicked_by":"User was kicked by the specified admin","date":"When did the user join the group","banned_rights":"Banned rights"}},"channelParticipantsBots":{"comment":"Fetch only bot participants","arguments":{"gigagroup":"Is this a broadcast group?"}},"channelParticipantsRecent":{"comment":"Fetch only recent participants","arguments":{"gigagroup":"Is this a broadcast group?"}},"channelParticipantLeft":{"comment":"A participant that left the channel/supergroup","arguments":{"peer":"The peer that left"}},"channelParticipantsBanned":{"comment":"Fetch only banned participants","arguments":{"q":"Optional filter for searching banned participants by name (otherwise empty)"}},"channelParticipantsContacts":{"comment":"Fetch only participants that are also contacts","arguments":{"q":"Optional search query for searching contact participants by name"}},"channelParticipantsAdmins":{"comment":"Fetch only admin participants","arguments":{"gigagroup":"Is this a broadcast group?"}},"channelParticipantsKicked":{"comment":"Fetch only kicked participants","arguments":{"q":"Optional filter for searching kicked participants by name (otherwise empty)"}},"channelParticipantsSearch":{"comment":"Query participants by name","arguments":{"q":"Search query"}},"channelParticipantsMentions":{"comment":"This filter is used when looking for supergroup members to mention.
    \nThis filter will automatically remove anonymous admins, and return even non-participant users that replied to a specific thread through the comment section of a channel.","arguments":{"flags":"Flags, see TL conditional fields","q":"Filter by user name or username","top_msg_id":"Look only for users that posted in this thread"}},"channelParticipantCreator":{"comment":"Channel/supergroup creator","arguments":{"flags":"Flags, see TL conditional fields","user_id":"User ID","admin_rights":"Creator admin rights","rank":"The role (rank) of the group creator in the group: just an arbitrary string, admin by default"}},"channels.channelParticipants":{"comment":"Represents multiple channel participants","arguments":{"count":"Total number of participants that correspond to the given query","participants":"Participants","chats":"Mentioned chats","users":"Users mentioned in participant info"}},"messages.savedGifsNotModified":{"comment":"No new saved gifs were found","arguments":{"gigagroup":"Is this a broadcast group?"}},"channels.channelParticipant":{"comment":"Represents a channel participant","arguments":{"participant":"The channel participant","chats":"Mentioned chats","users":"Users"}},"help.termsOfService":{"comment":"Info about the latest telegram Terms Of Service","arguments":{"flags":"Flags, see TL conditional fields","popup":"Whether a prompt must be showed to the user, in order to accept the new terms.","id":"ID of the new terms","text":"Text of the new terms","entities":"Message entities for styled text","min_age_confirm":"Minimum age required to sign up to telegram, the user must confirm that they is older than the minimum age."}},"inputBotInlineMessageText":{"comment":"Simple text message","arguments":{"flags":"Flags, see TL conditional fields","no_webpage":"Disable webpage preview","invert_media":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.","message":"Message","entities":"Message entities for styled text","reply_markup":"Inline keyboard"}},"inputBotInlineMessageMediaAuto":{"comment":"A media","arguments":{"flags":"Flags, see TL conditional fields","invert_media":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.","message":"Caption","entities":"Message entities for styled text","reply_markup":"Inline keyboard"}},"inputBotInlineMessageMediaVenue":{"comment":"Venue","arguments":{"flags":"Flags, see TL conditional fields","geo_point":"Geolocation","title":"Venue name","address":"Address","provider":"Venue provider: currently only \"foursquare\" and \"gplaces\" (Google Places) need to be supported","venue_id":"Venue ID in the provider's database","venue_type":"Venue type in the provider's database","reply_markup":"Inline keyboard"}},"channels.channelParticipantsNotModified":{"comment":"No new participant info could be found","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputBotInlineMessageMediaContact":{"comment":"A contact","arguments":{"flags":"Flags, see TL conditional fields","phone_number":"Phone number","first_name":"First name","last_name":"Last name","vcard":"VCard info","reply_markup":"Inline keyboard"}},"inputBotInlineMessageMediaInvoice":{"comment":"An invoice","arguments":{"flags":"Flags, see TL conditional fields","title":"Product name, 1-32 characters","description":"Product description, 1-255 characters","photo":"Invoice photo","invoice":"The invoice","payload":"Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.","provider":"Payments provider token, obtained via Botfather","provider_data":"A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider.","reply_markup":"Inline keyboard"}},"inputBotInlineMessageGame":{"comment":"A game","arguments":{"flags":"Flags, see TL conditional fields","reply_markup":"Inline keyboard"}},"inputBotInlineResult":{"comment":"An inline bot result","arguments":{"flags":"Flags, see TL conditional fields","id":"ID of result","type":"Result type (see bot API docs)","title":"Result title","description":"Result description","url":"URL of result","thumb":"Thumbnail for result","content":"Result contents","send_message":"Message to send when the result is selected"}},"inputBotInlineMessageMediaGeo":{"comment":"Geolocation","arguments":{"flags":"Flags, see TL conditional fields","geo_point":"Geolocation","heading":"For live locations, a direction in which the location moves, in degrees; 1-360","period":"Validity period","proximity_notification_radius":"For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000)","reply_markup":"Reply markup for bot/inline keyboards"}},"inputBotInlineMessageMediaWebPage":{"comment":"Specifies options that will be used to generate the link preview for the message, or even a standalone link preview without an attached message.","arguments":{"flags":"Flags, see TL conditional fields","invert_media":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.","force_large_media":"If set, specifies that a large media preview should be used.","force_small_media":"If set, specifies that a small media preview should be used.","optional":"If not set, a WEBPAGE_NOT_FOUND RPC error will be emitted if a webpage preview cannot be generated for the specified url; otherwise, no error will be emitted (unless the provided message is also empty, in which case a MESSAGE_EMPTY will be emitted, instead).","message":"The message, can be empty.","entities":"Message entities for styled text","url":"The URL to use for the link preview.","reply_markup":"Inline keyboard"}},"messages.savedGifs":{"comment":"Saved gifs","arguments":{"hash":"Hash used for caching, for more info click here","gifs":"List of saved gifs"}},"inputBotInlineResultDocument":{"comment":"Document (media of any type except for photos)","arguments":{"flags":"Flags, see TL conditional fields","id":"Result ID","type":"Result type (see bot API docs)","title":"Result title","description":"Result description","document":"Document to send","send_message":"Message to send when the result is selected"}},"inputBotInlineResultGame":{"comment":"Game","arguments":{"id":"Result ID","short_name":"Game short name","send_message":"Message to send when the result is selected"}},"inputBotInlineResultPhoto":{"comment":"Photo","arguments":{"id":"Result ID","type":"Result type (see bot API docs)","photo":"Photo to send","send_message":"Message to send when the result is selected"}},"botInlineMessageText":{"comment":"Send a simple text message","arguments":{"flags":"Flags, see TL conditional fields","no_webpage":"Disable webpage preview","invert_media":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.","message":"The message","entities":"Message entities for styled text","reply_markup":"Inline keyboard"}},"botInlineMessageMediaAuto":{"comment":"Send whatever media is attached to the {@link RawBotInlineMediaResult}","arguments":{"flags":"Flags, see TL conditional fields","invert_media":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.","message":"Caption","entities":"Message entities for styled text","reply_markup":"Inline keyboard"}},"botInlineMessageMediaGeo":{"comment":"Send a geolocation","arguments":{"flags":"Flags, see TL conditional fields","geo":"Geolocation","heading":"For live locations, a direction in which the location moves, in degrees; 1-360.","period":"Validity period","proximity_notification_radius":"For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000).","reply_markup":"Inline keyboard"}},"botInlineMessageMediaVenue":{"comment":"Send a venue","arguments":{"flags":"Flags, see TL conditional fields","geo":"Geolocation of venue","title":"Venue name","address":"Address","provider":"Venue provider: currently only \"foursquare\" and \"gplaces\" (Google Places) need to be supported","venue_id":"Venue ID in the provider's database","venue_type":"Venue type in the provider's database","reply_markup":"Inline keyboard"}},"botInlineMessageMediaWebPage":{"comment":"Specifies options that must be used to generate the link preview for the message, or even a standalone link preview without an attached message.","arguments":{"flags":"Flags, see TL conditional fields","invert_media":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.","force_large_media":"If set, specifies that a large media preview should be used.","force_small_media":"If set, specifies that a small media preview should be used.","manual":"If set, indicates that the URL used for the webpage preview was specified manually using {@link RawInputMediaWebPage}, and may not be related to any of the URLs specified in the message.","safe":"If set, the link can be opened directly without user confirmation.","message":"The message, can be empty.","entities":"Message entities for styled text","url":"The URL to use for the link preview.","reply_markup":"Reply markup for sending bot buttons"}},"botInlineMessageMediaInvoice":{"comment":"Send an invoice","arguments":{"flags":"Flags, see TL conditional fields","shipping_address_requested":"Set this flag if you require the user's shipping address to complete the order","test":"Test invoice","title":"Product name, 1-32 characters","description":"Product description, 1-255 characters","photo":"Product photo","currency":"Three-letter ISO 4217 currency code, or XTR for Telegram Stars.","total_amount":"Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).","reply_markup":"Inline keyboard"}},"botInlineResult":{"comment":"Generic result","arguments":{"flags":"Flags, see TL conditional fields","id":"Result ID","type":"Result type (see bot API docs)","title":"Result title","description":"Result description","url":"URL of article or webpage","thumb":"Thumbnail for the result","content":"Content of the result","send_message":"Message to send"}},"botInlineMediaResult":{"comment":"Media result","arguments":{"flags":"Flags, see TL conditional fields","id":"Result ID","type":"Result type (see bot API docs)","photo":"If type is photo, the photo to send","document":"If type is document, the document to send","title":"Result title","description":"Description","send_message":"Depending on the type and on the constructor, contains the caption of the media or the content of the message to be sent instead of the media"}},"messages.botResults":{"comment":"Result of a query to an inline bot","arguments":{"flags":"Flags, see TL conditional fields","gallery":"Whether the result is a picture gallery","query_id":"Query ID","next_offset":"The next offset to use when navigating through results","switch_pm":"Shown as a button on top of the remaining inline result list; if clicked, redirects the user to a private chat with the bot with the specified start parameter.","switch_webview":"Shown as a button on top of the remaining inline result list; if clicked, opens the specified inline mode mini app.","results":"The results","cache_time":"Caching validity of the results","users":"Users mentioned in the results"}},"auth.codeTypeSms":{"comment":"The next time, the authentication code will be delivered via an immediately canceled incoming call.","arguments":{"gigagroup":"Is this a broadcast group?"}},"auth.codeTypeCall":{"comment":"The next time, the authentication code is to be delivered via an outgoing phone call.","arguments":{"gigagroup":"Is this a broadcast group?"}},"botInlineMessageMediaContact":{"comment":"Send a contact","arguments":{"flags":"Flags, see TL conditional fields","phone_number":"Phone number","first_name":"First name","last_name":"Last name","vcard":"VCard info","reply_markup":"Inline keyboard"}},"auth.codeTypeFlashCall":{"comment":"The next time, the authentication code will be delivered via an immediately canceled incoming call.","arguments":{"gigagroup":"Is this a broadcast group?"}},"messageFwdHeader":{"comment":"Info about a forwarded message","arguments":{"flags":"Flags, see TL conditional fields","imported":"Whether this message was imported from a foreign chat service, click here for more info »","saved_out":"Only for messages forwarded to saved messages », set if the original message was outgoing (though the message may have been originally outgoing even if this flag is not set, if from_id points to the current user).","from_id":"The ID of the user that originally sent the message","from_name":"The name of the user that originally sent the message","date":"When was the message originally sent","channel_post":"ID of the channel message that was forwarded","post_author":"For channels and if signatures are enabled, author of the channel message","saved_from_peer":"Only for messages forwarded to saved messages », contains the dialog where the message was originally sent.","saved_from_msg_id":"Only for messages forwarded to saved messages », contains the original ID of the message in saved_from_peer.","saved_from_id":"Only for forwarded messages reforwarded to saved messages », contains the sender of the original message (i.e. if user A sends a message, then user B forwards it somewhere, then user C saves it to saved messages, this field will contain the ID of user B and from_id will contain the ID of user A).","saved_from_name":"Only for forwarded messages from users with forward privacy enabled, sent by users with forward privacy enabled, reforwarded to saved messages », contains the sender of the original message (i.e. if user A (fwd privacy enabled) sends a message, then user B (fwd privacy enabled) forwards it somewhere, then user C saves it to saved messages, this field will contain the name of user B and from_name will contain the name of user A).","saved_date":"Only for forwarded messages reforwarded to saved messages », indicates when was the original message sent (i.e. if user A sends a message @ unixtime 1, then user B forwards it somewhere @ unixtime 2, then user C saves it to saved messages @ unixtime 3, this field will contain 2, date will contain 1 and the date of the containing {@link RawMessage} will contain 3).","psa_type":"PSA type"}},"exportedMessageLink":{"comment":"Link to a message in a supergroup/channel","arguments":{"link":"URL","html":"Embed code"}},"auth.codeTypeMissedCall":{"comment":"The next time, the authentication code will be delivered via an immediately canceled incoming call, handled manually by the user.","arguments":{"gigagroup":"Is this a broadcast group?"}},"auth.codeTypeFragmentSms":{"comment":"The next time, the authentication code will be delivered via fragment.com","arguments":{"gigagroup":"Is this a broadcast group?"}},"auth.sentCodeTypeApp":{"comment":"The code was sent through the telegram app","arguments":{"length":"Length of the code in bytes"}},"auth.sentCodeTypeSms":{"comment":"The code was sent via SMS","arguments":{"length":"Length of the code in bytes"}},"auth.sentCodeTypeFlashCall":{"comment":"The code will be sent via a flash phone call, that will be closed immediately. The phone code will then be the phone number itself, just make sure that the phone number matches the specified pattern.","arguments":{"pattern":"pattern to match"}},"auth.sentCodeTypeCall":{"comment":"The code will be sent via a phone call: a synthesized voice will tell the user which verification code to input.","arguments":{"length":"Length of the verification code"}},"auth.sentCodeTypeMissedCall":{"comment":"The code will be sent via a flash phone call, that will be closed immediately. The last digits of the phone number that calls are the code that must be entered manually by the user.","arguments":{"prefix":"Prefix of the phone number from which the call will be made","length":"Length of the verification code"}},"auth.sentCodeTypeSetUpEmailRequired":{"comment":"The user should add and verify an email address in order to login as described here ».","arguments":{"flags":"Flags, see TL conditional fields","apple_signin_allowed":"Whether authorization through Apple ID is allowed","google_signin_allowed":"Whether authorization through Google ID is allowed"}},"auth.sentCodeTypeEmailCode":{"comment":"The code was sent via the previously configured login email »","arguments":{"flags":"Flags, see TL conditional fields","apple_signin_allowed":"Whether authorization through Apple ID is allowed","google_signin_allowed":"Whether authorization through Google ID is allowed","email_pattern":"Pattern of the email","length":"Length of the sent verification code","reset_available_period":"Clients should wait for the specified amount of seconds before allowing the user to invoke {@link auth.RawResetLoginEmailRequest} (will be 0 for Premium users).","reset_pending_date":"An email reset was already requested, and will occur at the specified date."}},"auth.sentCodeTypeFirebaseSms":{"comment":"An authentication code should be delivered via SMS after Firebase attestation, as described in the auth documentation ».","arguments":{"flags":"Flags, see TL conditional fields","nonce":"On Android, the nonce to be used as described in the auth documentation »","play_integrity_project_id":"Google Play Integrity project ID","play_integrity_nonce":"Play Integrity API nonce","receipt":"On iOS, must be compared with the receipt extracted from the received push notification.","push_timeout":"On iOS: if a push notification with the ios_push_secret isn't received within push_timeout seconds, the next_type authentication method must be used, with {@link auth.RawResendCodeRequest}.","length":"Length of the code that will be delivered."}},"auth.sentCodeTypeFragmentSms":{"comment":"The code was delivered via fragment.com.","arguments":{"url":"Open the specified URL to log into fragment.com with the wallet that owns the specified phone number and view the code.","length":"Length of the delivered code."}},"auth.sentCodeTypeSmsPhrase":{"comment":"The code was sent via SMS as a secret phrase starting with the word specified in beginning","arguments":{"flags":"Flags, see TL conditional fields","beginning":"If set, the secret phrase (and the SMS) starts with this word."}},"auth.sentCodeTypeSmsWord":{"comment":"The code was sent via SMS as a secret word, starting with the letter specified in beginning","arguments":{"flags":"Flags, see TL conditional fields","beginning":"If set, the secret word in the sent SMS (which may contain multiple words) starts with this letter."}},"messages.botCallbackAnswer":{"comment":"Callback answer sent by the bot in response to a button press","arguments":{"flags":"Flags, see TL conditional fields","alert":"Whether an alert should be shown to the user instead of a toast notification","has_url":"Whether an URL is present","native_ui":"Whether to show games in WebView or in native UI.","message":"Alert to show","url":"URL to open","cache_time":"For how long should this answer be cached"}},"inputBotInlineMessageID":{"comment":"Represents a sent inline message from the perspective of a bot (legacy constructor)","arguments":{"dc_id":"DC ID to use when working with this inline message","id":"ID of message, contains both the (32-bit, legacy) owner ID and the message ID, used only for Bot API backwards compatibility with 32-bit user ID.","access_hash":"Access hash of message"}},"inputBotInlineMessageID64":{"comment":"Represents a sent inline message from the perspective of a bot","arguments":{"dc_id":"DC ID to use when working with this inline message","owner_id":"ID of the owner of this message","id":"ID of message","access_hash":"Access hash of message"}},"inlineBotSwitchPM":{"comment":"The bot requested the user to message them in private","arguments":{"text":"Text for the button that switches the user to a private chat with the bot and sends the bot a start message with the parameter start_parameter (can be empty)","start_param":"The parameter for the /start parameter"}},"messages.peerDialogs":{"comment":"Dialog info of multiple peers","arguments":{"dialogs":"Dialog info","messages":"Messages mentioned in dialog info","chats":"Chats","users":"Users","state":"Current update state of dialog"}},"messages.messageEditData":{"comment":"Message edit data for media","arguments":{"flags":"Flags, see TL conditional fields","caption":"Media caption, if the specified media's caption can be edited"}},"topPeer":{"comment":"Top peer","arguments":{"peer":"Peer","rating":"Rating as computed in top peer rating »"}},"topPeerCategoryBotsPM":{"comment":"Most used bots","arguments":{"gigagroup":"Is this a broadcast group?"}},"topPeerCategoryBotsInline":{"comment":"Most used inline bots","arguments":{"gigagroup":"Is this a broadcast group?"}},"topPeerCategoryGroups":{"comment":"Often-opened groups and supergroups","arguments":{"gigagroup":"Is this a broadcast group?"}},"topPeerCategoryChannels":{"comment":"Most frequently visited channels","arguments":{"gigagroup":"Is this a broadcast group?"}},"topPeerCategoryPhoneCalls":{"comment":"Most frequently called users","arguments":{"gigagroup":"Is this a broadcast group?"}},"topPeerCategoryForwardUsers":{"comment":"Users to which the users often forwards messages to","arguments":{"gigagroup":"Is this a broadcast group?"}},"topPeerCategoryCorrespondents":{"comment":"Users we've chatted most frequently with","arguments":{"gigagroup":"Is this a broadcast group?"}},"topPeerCategoryBotsApp":{"comment":"Most frequently used Main Mini Bot Apps.","arguments":{"gigagroup":"Is this a broadcast group?"}},"topPeerCategoryPeers":{"comment":"Top peer category","arguments":{"category":"Top peer category of peers","count":"Count of peers","peers":"Peers"}},"topPeerCategoryForwardChats":{"comment":"Chats to which the users often forwards messages to","arguments":{"gigagroup":"Is this a broadcast group?"}},"contacts.topPeersDisabled":{"comment":"Top peers disabled","arguments":{"gigagroup":"Is this a broadcast group?"}},"contacts.topPeers":{"comment":"Top peers","arguments":{"categories":"Top peers by top peer category","chats":"Chats","users":"Users"}},"contacts.topPeersNotModified":{"comment":"Top peer info hasn't changed","arguments":{"gigagroup":"Is this a broadcast group?"}},"draftMessageEmpty":{"comment":"Empty draft","arguments":{"flags":"Flags, see TL conditional fields","date":"When was the draft last updated"}},"messages.featuredStickers":{"comment":"Featured stickersets","arguments":{"flags":"Flags, see TL conditional fields","premium":"Whether this is a premium stickerset","hash":"Hash used for caching, for more info click here","count":"Total number of featured stickers","sets":"Featured stickersets","unread":"IDs of new featured stickersets"}},"messages.featuredStickersNotModified":{"comment":"Featured stickers haven't changed","arguments":{"count":"Total number of featured stickers"}},"messages.recentStickersNotModified":{"comment":"No new recent sticker was found","arguments":{"gigagroup":"Is this a broadcast group?"}},"draftMessage":{"comment":"Represents a message draft.","arguments":{"flags":"Flags, see TL conditional fields","no_webpage":"Whether no webpage preview will be generated","invert_media":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.","reply_to":"If set, indicates that the message should be sent in reply to the specified message or story.","message":"The draft","entities":"Message entities for styled text.","media":"Media.","date":"Date of last update of the draft.","effect":"A message effect that should be played as specified here »."}},"messages.recentStickers":{"comment":"Recently used stickers","arguments":{"hash":"Hash used for caching, for more info click here","packs":"Emojis associated to stickers","stickers":"Recent stickers","dates":"When was each sticker last used"}},"messages.archivedStickers":{"comment":"Archived stickersets","arguments":{"count":"Number of archived stickers","sets":"Archived stickersets"}},"messages.stickerSetInstallResultArchive":{"comment":"The stickerset was installed, but since there are too many stickersets some were archived","arguments":{"sets":"Archived stickersets"}},"messages.stickerSetInstallResultSuccess":{"comment":"The stickerset was installed successfully","arguments":{"gigagroup":"Is this a broadcast group?"}},"stickerSetFullCovered":{"comment":"Stickerset preview with all stickers of the stickerset included.
    \nCurrently used only for custom emoji stickersets, to avoid a further call to {@link messages.RawGetStickerSetRequest}.","arguments":{"set":"Stickerset","packs":"Emoji information about every sticker in the stickerset","keywords":"Keywords for some or every sticker in the stickerset.","documents":"Stickers"}},"stickerSetMultiCovered":{"comment":"Stickerset, with multiple stickers as preview","arguments":{"set":"Stickerset","covers":"Preview stickers"}},"stickerSetNoCovered":{"comment":"Just the stickerset information, with no previews.","arguments":{"set":"Stickerset information."}},"inputStickeredMediaPhoto":{"comment":"A photo with stickers attached","arguments":{"id":"The photo"}},"maskCoords":{"comment":"Position on a photo where a mask should be placed when attaching stickers to media »\n\nThe n position indicates where the mask should be placed:","arguments":{"n":"Part of the face, relative to which the mask should be placed","x":"Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position)","y":"Shift by Y-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just below the default mask position)","zoom":"Mask scaling coefficient. (For example, 2.0 means a doubled size)"}},"stickerSetCovered":{"comment":"Stickerset with a single sticker as preview","arguments":{"set":"Stickerset","cover":"Preview"}},"inputStickeredMediaDocument":{"comment":"A document with stickers attached","arguments":{"id":"The document"}},"game":{"comment":"Indicates an already sent game","arguments":{"flags":"Flags, see TL conditional fields","id":"ID of the game","access_hash":"Access hash of the game","short_name":"Short name for the game","title":"Title of the game","description":"Game description","photo":"Game preview","document":"Optional attached document"}},"inputGameID":{"comment":"Indicates an already sent game","arguments":{"id":"game ID from Game constructor","access_hash":"access hash from Game constructor"}},"inputGameShortName":{"comment":"Game by short name","arguments":{"bot_id":"The bot that provides the game","short_name":"The game's short name, usually obtained from a game link »"}},"textPlain":{"comment":"Plain text","arguments":{"text":"Text"}},"highScore":{"comment":"Game highscore","arguments":{"pos":"Position in highscore list","user_id":"User ID","score":"Score"}},"textItalic":{"comment":"Italic text","arguments":{"text":"Text"}},"textUnderline":{"comment":"Underlined text","arguments":{"text":"Text"}},"textEmpty":{"comment":"Empty rich text element","arguments":{"gigagroup":"Is this a broadcast group?"}},"messages.highScores":{"comment":"Highscores in a game","arguments":{"scores":"Highscores","users":"Users, associated to the highscores"}},"textUrl":{"comment":"Link","arguments":{"text":"Text of link","url":"Webpage HTTP URL","webpage_id":"If a preview was already generated for the page, the page ID"}},"textBold":{"comment":"Bold text","arguments":{"text":"Text"}},"textFixed":{"comment":"fixed-width rich text","arguments":{"text":"Text"}},"textConcat":{"comment":"Concatenation of rich texts","arguments":{"texts":"Concatenated rich texts"}},"textSubscript":{"comment":"Subscript text","arguments":{"text":"Text"}},"textStrike":{"comment":"Strikethrough text","arguments":{"text":"Text"}},"textEmail":{"comment":"Rich text email link","arguments":{"text":"Link text","email":"Email address"}},"textSuperscript":{"comment":"Superscript text","arguments":{"text":"Text"}},"textMarked":{"comment":"Highlighted text","arguments":{"text":"Text"}},"textAnchor":{"comment":"Text linking to another section of the page","arguments":{"text":"Text","name":"Section name"}},"textImage":{"comment":"Inline image","arguments":{"document_id":"Document ID","w":"Width","h":"Height"}},"textPhone":{"comment":"Rich text linked to a phone number","arguments":{"text":"Text","phone":"Phone number"}},"pageBlockTitle":{"comment":"Title","arguments":{"text":"Title"}},"pageBlockSubtitle":{"comment":"Subtitle","arguments":{"text":"Text"}},"pageBlockAuthorDate":{"comment":"Author and date of creation of article","arguments":{"author":"Author name","published_date":"Date of publication"}},"pageBlockSubheader":{"comment":"Subheader","arguments":{"text":"Subheader"}},"pageBlockHeader":{"comment":"Page header","arguments":{"text":"Contents"}},"pageBlockParagraph":{"comment":"A paragraph","arguments":{"text":"Text"}},"pageBlockDivider":{"comment":"An empty block separating a page","arguments":{"gigagroup":"Is this a broadcast group?"}},"pageBlockPreformatted":{"comment":"Preformatted (
     text)","arguments":{"text":"Text","language":"Programming language of preformatted text"}},"pageBlockFooter":{"comment":"Page footer","arguments":{"text":"Contents"}},"pageBlockList":{"comment":"Unordered list of IV blocks","arguments":{"items":"List of blocks in an IV page"}},"pageBlockBlockquote":{"comment":"Quote (equivalent to the HTML 
    )","arguments":{"text":"Quote contents","caption":"Caption"}},"pageBlockAnchor":{"comment":"Link to section within the page itself (like anchor)","arguments":{"name":"Name of target section"}},"pageBlockPullquote":{"comment":"Pullquote","arguments":{"text":"Text","caption":"Caption"}},"pageBlockCover":{"comment":"A page cover","arguments":{"cover":"Cover"}},"pageBlockUnsupported":{"comment":"Unsupported IV element","arguments":{"gigagroup":"Is this a broadcast group?"}},"pageBlockPhoto":{"comment":"A photo","arguments":{"flags":"Flags, see TL conditional fields","photo_id":"Photo ID","caption":"Caption","url":"HTTP URL of page the photo leads to when clicked","webpage_id":"ID of preview of the page the photo leads to when clicked"}},"pageBlockEmbed":{"comment":"An embedded webpage","arguments":{"flags":"Flags, see TL conditional fields","full_width":"Whether the block should be full width","allow_scrolling":"Whether scrolling should be allowed","url":"Web page URL, if available","html":"HTML-markup of the embedded page","poster_photo_id":"Poster photo, if available","w":"Block width, if known","h":"Block height, if known","caption":"Caption"}},"pageBlockVideo":{"comment":"Video","arguments":{"flags":"Flags, see TL conditional fields","autoplay":"Whether the video is set to autoplay","loop":"Whether the video is set to loop","video_id":"Video ID","caption":"Caption"}},"pageBlockSlideshow":{"comment":"Slideshow","arguments":{"items":"Slideshow items","caption":"Caption"}},"pageBlockCollage":{"comment":"Collage of media","arguments":{"items":"Media elements","caption":"Caption"}},"pageBlockChannel":{"comment":"Reference to a telegram channel","arguments":{"channel":"The channel/supergroup/chat"}},"pageBlockKicker":{"comment":"Kicker","arguments":{"text":"Contents"}},"pageBlockTable":{"comment":"Table","arguments":{"flags":"Flags, see TL conditional fields","bordered":"Does the table have a visible border?","striped":"Is the table striped?","title":"Title","rows":"Table rows"}},"pageBlockEmbedPost":{"comment":"An embedded post","arguments":{"url":"Web page URL","webpage_id":"ID of generated webpage preview","author_photo_id":"ID of the author's photo","author":"Author name","date":"Creation date","blocks":"Post contents","caption":"Caption"}},"pageBlockOrderedList":{"comment":"Ordered list of IV blocks","arguments":{"items":"List items"}},"pageBlockMap":{"comment":"A map","arguments":{"geo":"Location of the map center","zoom":"Map zoom level; 13-20","w":"Map width in pixels before applying scale; 16-102","h":"Map height in pixels before applying scale; 16-1024","caption":"Caption"}},"phoneCallDiscardReasonMissed":{"comment":"The phone call was missed","arguments":{"gigagroup":"Is this a broadcast group?"}},"phoneCallDiscardReasonDisconnect":{"comment":"The phone call was disconnected","arguments":{"gigagroup":"Is this a broadcast group?"}},"pageBlockDetails":{"comment":"A collapsible details block","arguments":{"flags":"Flags, see TL conditional fields","open":"Whether the block is open by default","blocks":"Block contents","title":"Always visible heading for the block"}},"pageBlockRelatedArticles":{"comment":"Related articles","arguments":{"title":"Title","articles":"Related articles"}},"phoneCallDiscardReasonHangup":{"comment":"The phone call was ended normally","arguments":{"gigagroup":"Is this a broadcast group?"}},"pageBlockAudio":{"comment":"Audio","arguments":{"audio_id":"Audio ID (to be fetched from the container {@link RawPage} constructor","caption":"Audio caption"}},"dataJSON":{"comment":"Represents a json-encoded object","arguments":{"data":"JSON-encoded object"}},"labeledPrice":{"comment":"This object represents a portion of the price for goods or services.","arguments":{"label":"Portion label","amount":"Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."}},"phoneCallDiscardReasonBusy":{"comment":"The phone call was discarded because the user is busy in another call","arguments":{"gigagroup":"Is this a broadcast group?"}},"invoice":{"comment":"Invoice","arguments":{"flags":"Flags, see TL conditional fields","test":"Test invoice","name_requested":"Set this flag if you require the user's full name to complete the order","phone_requested":"Set this flag if you require the user's phone number to complete the order","email_requested":"Set this flag if you require the user's email address to complete the order","shipping_address_requested":"Set this flag if you require the user's shipping address to complete the order","flexible":"Set this flag if the final price depends on the shipping method","phone_to_provider":"Set this flag if user's phone number should be sent to provider","email_to_provider":"Set this flag if user's email address should be sent to provider","recurring":"Whether this is a recurring payment","currency":"Three-letter ISO 4217 currency code, or XTR for Telegram Stars.","prices":"Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)","max_tip_amount":"The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).","suggested_tip_amounts":"A vector of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.","terms_url":"Terms of service URL"}},"paymentCharge":{"comment":"Payment identifier","arguments":{"id":"Telegram payment identifier","provider_charge_id":"Provider payment identifier"}},"postAddress":{"comment":"Shipping address","arguments":{"street_line1":"First line for the address","street_line2":"Second line for the address","city":"City","state":"State, if applicable (empty otherwise)","country_iso2":"ISO 3166-1 alpha-2 country code","post_code":"Address post code"}},"webDocument":{"comment":"Remote document","arguments":{"url":"Document URL","access_hash":"Access hash","size":"File size","mime_type":"MIME type","attributes":"Attributes for media types"}},"paymentRequestedInfo":{"comment":"Order info provided by the user","arguments":{"flags":"Flags, see TL conditional fields","name":"User's full name","phone":"User's phone number","email":"User's email address","shipping_address":"User's shipping address"}},"webDocumentNoProxy":{"comment":"Remote document that can be downloaded without proxying through telegram","arguments":{"url":"Document URL","size":"File size","mime_type":"MIME type","attributes":"Attributes for media types"}},"paymentSavedCredentialsCard":{"comment":"Saved credit card","arguments":{"id":"Card ID","title":"Title"}},"inputWebFileLocation":{"comment":"Location of a remote HTTP(s) file","arguments":{"url":"HTTP URL of file","access_hash":"Access hash"}},"inputWebFileGeoPointLocation":{"comment":"Used to download a server-generated image with the map preview from a {@link RawGeoPoint}, see the webfile docs for more info ».","arguments":{"geo_point":"Generated from the lat, long and accuracy_radius parameters of the {@link RawGeoPoint}","access_hash":"Access hash of the {@link RawGeoPoint}","w":"Map width in pixels before applying scale; 16-1024","h":"Map height in pixels before applying scale; 16-1024","zoom":"Map zoom level; 13-20","scale":"Map scale; 1-3"}},"inputWebDocument":{"comment":"The document","arguments":{"url":"Remote document URL to be downloaded using the appropriate method","size":"Remote file size","mime_type":"Mime type","attributes":"Attributes for media types"}},"upload.webFile":{"comment":"Represents a chunk of an HTTP webfile downloaded through telegram's secure MTProto servers","arguments":{"size":"File size","mime_type":"Mime type","file_type":"File type","mtime":"Modified time","bytes":"Data"}},"payments.paymentForm":{"comment":"Payment form","arguments":{"flags":"Flags, see TL conditional fields","can_save_credentials":"Whether the user can choose to save credentials.","password_missing":"Indicates that the user can save payment credentials, but only after setting up a 2FA password (currently the account doesn't have a 2FA password)","form_id":"Form ID","bot_id":"Bot ID","title":"Form title","description":"Description","photo":"Product photo","invoice":"Invoice","provider_id":"Payment provider ID.","url":"Payment form URL","native_provider":"Payment provider name.
    One of the following:
    - stripe","native_params":"Contains information about the payment provider, if available, to support it natively without the need for opening the URL.
    A JSON object that can contain the following fields:

    - apple_pay_merchant_id: Apple Pay merchant ID
    - google_pay_public_key: Google Pay public key
    - need_country: True, if the user country must be provided,
    - need_zip: True, if the user ZIP/postal code must be provided,
    - need_cardholder_name: True, if the cardholder name must be provided
    ","additional_methods":"Additional payment methods","saved_info":"Saved server-side order information","saved_credentials":"Contains information about saved card credentials","users":"Users"}},"inputWebFileAudioAlbumThumbLocation":{"comment":"Used to download an album cover for any music file using {@link upload.RawGetWebFileRequest}, see the webfile docs for more info ».","arguments":{"flags":"Flags, see TL conditional fields","small":"Used to return a thumbnail with 100x100 resolution (instead of the default 600x600)","document":"The audio file in question: must NOT be provided in secret chats, provide the title and performer fields instead.","title":"Song title: should only be used in secret chats, in normal chats provide document instead, as it has more lax rate limits.","performer":"Song performer: should only be used in secret chats, in normal chats provide document instead, as it has more lax rate limits."}},"payments.paymentResult":{"comment":"Payment result","arguments":{"updates":"Info about the payment"}},"payments.paymentFormStars":{"comment":"Represents a payment form, for payments to be using Telegram Stars, see here » for more info.","arguments":{"flags":"Flags, see TL conditional fields","form_id":"Form ID.","bot_id":"Bot ID.","title":"Form title","description":"Description","photo":"Product photo","invoice":"Invoice","users":"Info about users mentioned in the other fields."}},"payments.paymentVerificationNeeded":{"comment":"Payment was not successful, additional verification is needed","arguments":{"url":"URL for additional payment credentials verification"}},"payments.paymentReceiptStars":{"comment":"Receipt for payment made using Telegram Stars.","arguments":{"flags":"Flags, see TL conditional fields","date":"Date of generation","bot_id":"Bot ID","title":"Title","description":"Description","photo":"Product photo","invoice":"Invoice","currency":"Currency, always XTR.","total_amount":"Amount of Telegram Stars.","transaction_id":"Transaction ID","users":"Info about users mentioned in the other fields."}},"payments.savedInfo":{"comment":"Saved server-side order information","arguments":{"flags":"Flags, see TL conditional fields","has_saved_credentials":"Whether the user has some saved payment credentials","saved_info":"Saved server-side order information"}},"payments.validatedRequestedInfo":{"comment":"Validated user-provided info","arguments":{"flags":"Flags, see TL conditional fields","id":"ID","shipping_options":"Shipping options"}},"inputPaymentCredentialsSaved":{"comment":"Saved payment credentials","arguments":{"id":"Credential ID","tmp_password":"Temporary password"}},"inputPaymentCredentials":{"comment":"Payment credentials","arguments":{"flags":"Flags, see TL conditional fields","save":"Save payment credential for future use","data":"Payment credentials"}},"inputPaymentCredentialsApplePay":{"comment":"Apple pay payment credentials","arguments":{"payment_data":"Payment data"}},"inputStickerSetItem":{"comment":"Sticker in a stickerset","arguments":{"flags":"Flags, see TL conditional fields","document":"The sticker","emoji":"Associated emoji","mask_coords":"Coordinates for mask sticker","keywords":"Set of keywords, separated by commas (can't be provided for mask stickers)"}},"inputPhoneCall":{"comment":"Phone call","arguments":{"id":"Call ID","access_hash":"Access hash"}},"shippingOption":{"comment":"Shipping option","arguments":{"id":"Option ID","title":"Title","prices":"List of price portions"}},"inputPaymentCredentialsGooglePay":{"comment":"Google Pay payment credentials","arguments":{"payment_token":"Payment token"}},"account.tmpPassword":{"comment":"Temporary payment password","arguments":{"tmp_password":"Temporary password","valid_until":"Validity period"}},"phoneCallEmpty":{"comment":"Empty constructor","arguments":{"id":"Call ID"}},"phoneCallRequested":{"comment":"Requested phone call","arguments":{"flags":"Flags, see TL conditional fields","video":"Whether this is a video call","id":"Phone call ID","access_hash":"Access hash","date":"When was the phone call created","admin_id":"ID of the creator of the phone call","participant_id":"ID of the other participant of the phone call","g_a_hash":"Parameter for key exchange","protocol":"Call protocol info to be passed to libtgvoip"}},"phoneCallWaiting":{"comment":"Incoming phone call","arguments":{"flags":"Flags, see TL conditional fields","video":"Is this a video call","id":"Call ID","access_hash":"Access hash","date":"Date","admin_id":"Admin ID","participant_id":"Participant ID","protocol":"Phone call protocol info","receive_date":"When was the phone call received"}},"phoneCall":{"comment":"Phone call","arguments":{"flags":"Flags, see TL conditional fields","p2p_allowed":"Whether P2P connection to the other peer is allowed","video":"Whether this is a video call","id":"Call ID","access_hash":"Access hash","date":"Date of creation of the call","admin_id":"User ID of the creator of the call","participant_id":"User ID of the other participant in the call","g_a_or_b":"Parameter for key exchange","key_fingerprint":"Key fingerprint","protocol":"Call protocol info to be passed to libtgvoip","connections":"List of endpoints the user can connect to exchange call data","start_date":"When was the call actually started","custom_parameters":"Custom JSON-encoded call parameters to be passed to tgcalls."}},"phoneCallAccepted":{"comment":"An accepted phone call","arguments":{"flags":"Flags, see TL conditional fields","video":"Whether this is a video call","id":"ID of accepted phone call","access_hash":"Access hash of phone call","date":"When was the call accepted","admin_id":"ID of the call creator","participant_id":"ID of the other user in the call","g_b":"B parameter for secure E2E phone call key exchange","protocol":"Protocol to use for phone call"}},"phoneCallDiscarded":{"comment":"Indicates a discarded phone call","arguments":{"flags":"Flags, see TL conditional fields","need_rating":"Whether the server required the user to {@link phone.RawSetCallRatingRequest} the call","need_debug":"Whether the server required the client to {@link phone.RawSaveCallDebugRequest} the libtgvoip call debug data","video":"Whether the call was a video call","id":"Call ID","reason":"Why was the phone call discarded","duration":"Duration of the phone call in seconds"}},"phoneConnectionWebrtc":{"comment":"WebRTC connection parameters","arguments":{"flags":"Flags, see TL conditional fields","turn":"Whether this is a TURN endpoint","stun":"Whether this is a STUN endpoint","id":"Endpoint ID","ip":"IP address","ipv6":"IPv6 address","port":"Port","username":"Username","password":"Password"}},"phoneCallProtocol":{"comment":"Protocol info for libtgvoip","arguments":{"flags":"Flags, see TL conditional fields","udp_p2p":"Whether to allow P2P connection to the other participant","udp_reflector":"Whether to allow connection to the other participants through the reflector servers","min_layer":"Minimum layer for remote libtgvoip","max_layer":"Maximum layer for remote libtgvoip","library_versions":"When using {@link phone.RawRequestCallRequest} and {@link phone.RawAcceptCallRequest}, specify all library versions supported by the client.
    The server will merge and choose the best library version supported by both peers, returning only the best value in the result of the callee's {@link phone.RawAcceptCallRequest} and in the {@link RawPhoneCallAccepted} update received by the caller."}},"payments.paymentReceipt":{"comment":"Receipt","arguments":{"flags":"Flags, see TL conditional fields","date":"Date of generation","bot_id":"Bot ID","provider_id":"Provider ID","title":"Title","description":"Description","photo":"Photo","invoice":"Invoice","info":"Info","shipping":"Selected shipping option","tip_amount":"Tipped amount","currency":"Three-letter ISO 4217 currency code","total_amount":"Total amount in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).","credentials_title":"Payment credential name","users":"Users"}},"phoneConnection":{"comment":"Identifies an endpoint that can be used to connect to the other user in a phone call","arguments":{"flags":"Flags, see TL conditional fields","tcp":"Whether TCP should be used","id":"Endpoint ID","ip":"IP address of endpoint","ipv6":"IPv6 address of endpoint","port":"Port ID","peer_tag":"Our peer tag"}},"phone.phoneCall":{"comment":"A VoIP phone call","arguments":{"phone_call":"The VoIP phone call","users":"VoIP phone call participants"}},"upload.cdnFileReuploadNeeded":{"comment":"The file was cleared from the temporary RAM cache of the CDN and has to be re-uploaded.","arguments":{"request_token":"Request token (see CDN)"}},"upload.cdnFile":{"comment":"Represent a chunk of a CDN file.","arguments":{"bytes":"The data"}},"cdnPublicKey":{"comment":"Public key to use only during handshakes to CDN DCs.","arguments":{"dc_id":"CDN DC ID","public_key":"RSA public key"}},"cdnConfig":{"comment":"Configuration for CDN file downloads.","arguments":{"public_keys":"Vector of public keys to use only during handshakes to CDN DCs."}},"langPackString":{"comment":"Translated localization string","arguments":{"key":"Language key","value":"Value"}},"langPackLanguage":{"comment":"Identifies a localization pack","arguments":{"flags":"Flags, see TL conditional fields","official":"Whether the language pack is official","rtl":"Is this a localization pack for an RTL language","beta":"Is this a beta localization pack?","name":"Language name","native_name":"Language name in the language itself","lang_code":"Language code (pack identifier)","base_lang_code":"Identifier of a base language pack; may be empty. If a string is missed in the language pack, then it should be fetched from base language pack. Unsupported in custom language packs","plural_code":"A language code to be used to apply plural forms. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info","strings_count":"Total number of non-deleted strings from the language pack","translated_count":"Total number of translated strings from the language pack","translations_url":"Link to language translation interface; empty for custom local language packs"}},"langPackStringPluralized":{"comment":"A language pack string which has different forms based on the number of some object it mentions. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info","arguments":{"flags":"Flags, see TL conditional fields","key":"Localization key","zero_value":"Value for zero objects","one_value":"Value for one object","two_value":"Value for two objects","few_value":"Value for a few objects","many_value":"Value for many objects","other_value":"Default value"}},"channelAdminLogEventActionChangeAbout":{"comment":"The description was changed","arguments":{"prev_value":"Previous description","new_value":"New description"}},"langPackDifference":{"comment":"Changes to the app's localization pack","arguments":{"lang_code":"Language code","from_version":"Previous version number","version":"New version number","strings":"Localized strings"}},"channelAdminLogEventActionChangeTitle":{"comment":"Channel/supergroup title was changed","arguments":{"prev_value":"Previous title","new_value":"New title"}},"langPackStringDeleted":{"comment":"Deleted localization string","arguments":{"key":"Localization key"}},"channelAdminLogEventActionToggleInvites":{"comment":"Invites were enabled/disabled","arguments":{"new_value":"New value"}},"channelAdminLogEventActionChangeUsername":{"comment":"Channel/supergroup username was changed","arguments":{"prev_value":"Old username","new_value":"New username"}},"channelAdminLogEventActionUpdatePinned":{"comment":"A message was pinned","arguments":{"message":"The message that was pinned"}},"channelAdminLogEventActionEditMessage":{"comment":"A message was edited","arguments":{"prev_message":"Old message","new_message":"New message"}},"channelAdminLogEventActionDeleteMessage":{"comment":"A message was deleted","arguments":{"message":"The message that was deleted"}},"channelAdminLogEventActionToggleSignatures":{"comment":"Channel signatures were enabled/disabled","arguments":{"new_value":"New value"}},"channelAdminLogEventActionParticipantLeave":{"comment":"A user left the channel/supergroup (in the case of big groups, info of the user that has joined isn't shown)","arguments":{"gigagroup":"Is this a broadcast group?"}},"channelAdminLogEventActionParticipantJoin":{"comment":"A user has joined the group (in the case of big groups, info of the user that has joined isn't shown)","arguments":{"gigagroup":"Is this a broadcast group?"}},"channelAdminLogEventActionChangePhoto":{"comment":"The channel/supergroup's picture was changed","arguments":{"prev_photo":"Previous picture","new_photo":"New picture"}},"channelAdminLogEventActionParticipantInvite":{"comment":"A user was invited to the group","arguments":{"participant":"The user that was invited"}},"channelAdminLogEventActionParticipantToggleAdmin":{"comment":"The admin rights of a user were changed","arguments":{"prev_participant":"Previous admin rights","new_participant":"New admin rights"}},"channelAdminLogEventActionParticipantToggleBan":{"comment":"The banned rights of a user were changed","arguments":{"prev_participant":"Old banned rights of user","new_participant":"New banned rights of user"}},"channelAdminLogEventActionChangeStickerSet":{"comment":"The supergroup's stickerset was changed","arguments":{"prev_stickerset":"Previous stickerset","new_stickerset":"New stickerset"}},"channelAdminLogEventActionDefaultBannedRights":{"comment":"The default banned rights were modified","arguments":{"prev_banned_rights":"Previous global banned rights","new_banned_rights":"New global banned rights."}},"channelAdminLogEventActionTogglePreHistoryHidden":{"comment":"The hidden prehistory setting was {@link channels.RawTogglePreHistoryHiddenRequest}","arguments":{"new_value":"New value"}},"channelAdminLogEventActionChangeLinkedChat":{"comment":"The linked chat was changed","arguments":{"prev_value":"Previous linked chat","new_value":"New linked chat"}},"channelAdminLogEventActionStopPoll":{"comment":"A poll was stopped","arguments":{"message":"The poll that was stopped"}},"channelAdminLogEventActionChangeLocation":{"comment":"The geo group location was changed","arguments":{"prev_value":"Previous location","new_value":"New location"}},"channelAdminLogEventActionToggleSlowMode":{"comment":"{@link channels.RawToggleSlowModeRequest}","arguments":{"prev_value":"Previous slow mode value","new_value":"New slow mode value"}},"channelAdminLogEventActionDiscardGroupCall":{"comment":"A group call was terminated","arguments":{"call":"The group call that was terminated"}},"channelAdminLogEventActionParticipantMute":{"comment":"A group call participant was muted","arguments":{"participant":"The participant that was muted"}},"channelAdminLogEventActionParticipantUnmute":{"comment":"A group call participant was unmuted","arguments":{"participant":"The participant that was unmuted"}},"channelAdminLogEventActionToggleGroupCallSetting":{"comment":"Group call settings were changed","arguments":{"join_muted":"Whether all users are muted by default upon joining"}},"channelAdminLogEventActionParticipantJoinByInvite":{"comment":"A user joined the supergroup/channel using a specific invite link","arguments":{"flags":"Flags, see TL conditional fields","via_chatlist":"The participant joined by importing a chat folder deep link ».","invite":"The invite link used to join the supergroup/channel"}},"channelAdminLogEventActionExportedInviteDelete":{"comment":"A chat invite was deleted","arguments":{"invite":"The deleted chat invite"}},"channelAdminLogEventActionStartGroupCall":{"comment":"A group call was started","arguments":{"call":"Group call"}},"channelAdminLogEventActionExportedInviteRevoke":{"comment":"A specific invite link was revoked","arguments":{"invite":"The invite link that was revoked"}},"channelAdminLogEventActionExportedInviteEdit":{"comment":"A chat invite was edited","arguments":{"prev_invite":"Previous chat invite information","new_invite":"New chat invite information"}},"channelAdminLogEventActionChangeHistoryTTL":{"comment":"The Time-To-Live of messages in this chat was changed","arguments":{"prev_value":"Previous value","new_value":"New value"}},"channelAdminLogEventActionParticipantJoinByRequest":{"comment":"A new member was accepted to the chat by an admin","arguments":{"invite":"The invite link that was used to join the chat","approved_by":"ID of the admin that approved the invite"}},"channelAdminLogEventActionChangeAvailableReactions":{"comment":"The set of allowed message reactions » for this channel has changed","arguments":{"prev_value":"Previously allowed reaction emojis","new_value":"New allowed reaction emojis"}},"channelAdminLogEventActionToggleForum":{"comment":"Forum functionality was enabled or disabled.","arguments":{"new_value":"Whether forum functionality was enabled or disabled."}},"channelAdminLogEventActionParticipantVolume":{"comment":"channelAdminLogEvent.user_id has set the volume of participant.peer to participant.volume","arguments":{"participant":"The participant whose volume was changed"}},"channelAdminLogEventActionSendMessage":{"comment":"A message was posted in a channel","arguments":{"message":"The message that was sent"}},"channelAdminLogEventActionChangeUsernames":{"comment":"The list of usernames associated with the channel was changed","arguments":{"prev_value":"Previous set of usernames","new_value":"New set of usernames"}},"channelAdminLogEventActionCreateTopic":{"comment":"A forum topic was created","arguments":{"topic":"The forum topic that was created"}},"channelAdminLogEventActionToggleNoForwards":{"comment":"Forwards were enabled or disabled","arguments":{"new_value":"Old value"}},"channelAdminLogEventActionEditTopic":{"comment":"A forum topic was edited","arguments":{"prev_topic":"Previous topic information","new_topic":"New topic information"}},"channelAdminLogEventActionChangePeerColor":{"comment":"The message accent color was changed","arguments":{"prev_value":"Previous accent palette","new_value":"New accent palette"}},"channelAdminLogEventActionChangeWallpaper":{"comment":"The wallpaper was changed","arguments":{"prev_value":"Previous wallpaper","new_value":"New wallpaper"}},"channelAdminLogEventActionChangeProfilePeerColor":{"comment":"The profile accent color was changed","arguments":{"prev_value":"Previous accent palette","new_value":"New accent palette"}},"channelAdminLogEventActionToggleAntiSpam":{"comment":"Native antispam functionality was enabled or disabled.","arguments":{"new_value":"Whether antispam functionality was enabled or disabled."}},"channelAdminLogEventActionChangeEmojiStatus":{"comment":"The emoji status was changed","arguments":{"prev_value":"Previous emoji status","new_value":"New emoji status"}},"channelAdminLogEventActionPinTopic":{"comment":"A forum topic was pinned or unpinned","arguments":{"flags":"Flags, see TL conditional fields","prev_topic":"Previous topic information","new_topic":"New topic information"}},"channelAdminLogEventActionChangeEmojiStickerSet":{"comment":"The supergroup's custom emoji stickerset was changed.","arguments":{"prev_stickerset":"Old value","new_stickerset":"New value"}},"channels.adminLogResults":{"comment":"Admin log events","arguments":{"events":"Admin log events","chats":"Chats mentioned in events","users":"Users mentioned in events"}},"channelAdminLogEvent":{"comment":"Admin log event","arguments":{"id":"Event ID","date":"Date","user_id":"User ID","action":"Action"}},"messages.favedStickersNotModified":{"comment":"No new favorited stickers were found","arguments":{"gigagroup":"Is this a broadcast group?"}},"popularContact":{"comment":"Popular contact","arguments":{"client_id":"Contact identifier","importers":"How many people imported this contact"}},"recentMeUrlUnknown":{"comment":"Unknown t.me url","arguments":{"url":"URL"}},"channelAdminLogEventsFilter":{"comment":"Filter only certain admin log events","arguments":{"flags":"Flags, see TL conditional fields","join":"{@link RawChannelAdminLogEventActionParticipantJoin}, including {@link RawChannelAdminLogEventActionParticipantJoinByInvite} and {@link RawChannelAdminLogEventActionParticipantJoinByRequest}.","leave":"{@link RawChannelAdminLogEventActionParticipantLeave}","invite":"{@link RawChannelAdminLogEventActionParticipantInvite}","ban":"{@link RawChannelAdminLogEventActionParticipantToggleBan}","unban":"{@link RawChannelAdminLogEventActionParticipantToggleBan}","kick":"{@link RawChannelAdminLogEventActionParticipantToggleBan}","unkick":"{@link RawChannelAdminLogEventActionParticipantToggleBan}","promote":"{@link RawChannelAdminLogEventActionParticipantToggleAdmin}","demote":"{@link RawChannelAdminLogEventActionParticipantToggleAdmin}","info":"Info change events (when {@link RawChannelAdminLogEventActionChangeAbout}, {@link RawChannelAdminLogEventActionChangeLinkedChat}, {@link RawChannelAdminLogEventActionChangeLocation}, {@link RawChannelAdminLogEventActionChangePhoto}, {@link RawChannelAdminLogEventActionChangeStickerSet}, {@link RawChannelAdminLogEventActionChangeTitle} or {@link RawChannelAdminLogEventActionChangeUsername}, {@link RawChannelAdminLogEventActionToggleSlowMode}, {@link RawChannelAdminLogEventActionChangeHistoryTTL} settings of a channel gets modified)","settings":"Settings change events ({@link RawChannelAdminLogEventActionToggleInvites}, {@link RawChannelAdminLogEventActionTogglePreHistoryHidden}, {@link RawChannelAdminLogEventActionToggleSignatures}, {@link RawChannelAdminLogEventActionDefaultBannedRights}, {@link RawChannelAdminLogEventActionToggleForum})","pinned":"{@link RawChannelAdminLogEventActionUpdatePinned}","edit":"{@link RawChannelAdminLogEventActionEditMessage}","delete":"{@link RawChannelAdminLogEventActionDeleteMessage}","group_call":"Group call events","invites":"Invite events","send":"A message was posted in a channel","forums":"Forum-related events"}},"messages.favedStickers":{"comment":"Favorited stickers","arguments":{"hash":"Hash used for caching, for more info click here","packs":"Emojis associated to stickers","stickers":"Favorited stickers"}},"channelAdminLogEventActionDeleteTopic":{"comment":"A forum topic was deleted","arguments":{"topic":"The forum topic that was deleted"}},"recentMeUrlChat":{"comment":"Recent t.me link to a chat","arguments":{"url":"t.me URL","chat_id":"Chat ID"}},"recentMeUrlStickerSet":{"comment":"Recent t.me stickerset installation URL","arguments":{"url":"t.me URL","set":"Stickerset"}},"recentMeUrlChatInvite":{"comment":"Recent t.me invite link to a chat","arguments":{"url":"t.me URL","chat_invite":"Chat invitation"}},"help.recentMeUrls":{"comment":"Recent t.me URLs","arguments":{"urls":"URLs","chats":"Chats","users":"Users"}},"recentMeUrlUser":{"comment":"Recent t.me link to a user","arguments":{"url":"URL","user_id":"User ID"}},"webAuthorization":{"comment":"Represents a bot logged in using the Telegram login widget","arguments":{"hash":"Authorization hash","bot_id":"Bot ID","domain":"The domain name of the website on which the user has logged in.","browser":"Browser user-agent","platform":"Platform","date_created":"When was the web session created","date_active":"When was the web session last active","ip":"IP address","region":"Region, determined from IP address"}},"account.webAuthorizations":{"comment":"Web authorizations","arguments":{"authorizations":"Web authorization list","users":"Users"}},"inputMessageID":{"comment":"Message by ID","arguments":{"id":"Message ID"}},"inputMessageReplyTo":{"comment":"Message to which the specified message replies to","arguments":{"id":"ID of the message that replies to the message we need"}},"inputSingleMedia":{"comment":"A single media in an album or grouped media sent with {@link messages.RawSendMultiMediaRequest}.","arguments":{"flags":"Flags, see TL conditional fields","media":"The media","random_id":"Unique client media ID required to prevent message resending","message":"A caption for the media","entities":"Message entities for styled text"}},"inputDialogPeerFolder":{"comment":"All peers in a peer folder","arguments":{"folder_id":"Peer folder ID, for more info click here"}},"inputDialogPeer":{"comment":"A peer","arguments":{"peer":"Peer"}},"inputMessageCallbackQuery":{"comment":"Used by bots for fetching information about the message that originated a callback query","arguments":{"id":"Message ID","query_id":"Callback query ID"}},"inputMessagePinned":{"comment":"Pinned message","arguments":{"gigagroup":"Is this a broadcast group?"}},"dialogPeer":{"comment":"Peer","arguments":{"peer":"Peer"}},"dialogPeerFolder":{"comment":"Peer folder","arguments":{"folder_id":"Peer folder ID, for more info click here"}},"messages.foundStickerSetsNotModified":{"comment":"No further results were found","arguments":{"gigagroup":"Is this a broadcast group?"}},"messages.foundStickerSets":{"comment":"Found stickersets","arguments":{"hash":"Hash used for caching, for more info click here","sets":"Found stickersets"}},"fileHash":{"comment":"SHA256 Hash of an uploaded file, to be checked for validity after download","arguments":{"offset":"Offset from where to start computing SHA-256 hash","limit":"Length","hash":"SHA-256 Hash of file chunk, to be checked for validity after download"}},"help.termsOfServiceUpdateEmpty":{"comment":"No changes were made to telegram's terms of service","arguments":{"expires":"New TOS updates will have to be queried using {@link help.RawGetTermsOfServiceUpdateRequest} in expires seconds"}},"inputSecureFileUploaded":{"comment":"Uploaded secure file, for more info see the passport docs »","arguments":{"id":"Secure file ID","parts":"Secure file part count","md5_checksum":"MD5 hash of encrypted uploaded file, to be checked server-side","file_hash":"File hash","secret":"Secret"}},"inputSecureFile":{"comment":"Pre-uploaded passport file, for more info see the passport docs »","arguments":{"id":"Secure file ID","access_hash":"Secure file access hash"}},"help.termsOfServiceUpdate":{"comment":"Info about an update of telegram's terms of service. If the terms of service are declined, then the {@link account.RawDeleteAccountRequest} method should be called with the reason \"Decline ToS update\"","arguments":{"expires":"New TOS updates will have to be queried using {@link help.RawGetTermsOfServiceUpdateRequest} in expires seconds","terms_of_service":"New terms of service"}},"secureFile":{"comment":"Secure passport file, for more info see the passport docs »","arguments":{"id":"ID","access_hash":"Access hash","size":"File size","dc_id":"DC ID","date":"Date of upload","file_hash":"File hash","secret":"Secret"}},"secureFileEmpty":{"comment":"Empty constructor","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputClientProxy":{"comment":"Info about an MTProxy used to connect.","arguments":{"address":"Proxy address","port":"Proxy port"}},"secureData":{"comment":"Secure passport data, for more info see the passport docs »","arguments":{"data":"Data","data_hash":"Data hash","secret":"Secret"}},"secureValueTypeDriverLicense":{"comment":"Driver's license","arguments":{"gigagroup":"Is this a broadcast group?"}},"securePlainEmail":{"comment":"Email address to use in telegram passport: it must be verified, first ».","arguments":{"email":"Email address"}},"secureValueTypePassport":{"comment":"Passport","arguments":{"gigagroup":"Is this a broadcast group?"}},"securePlainPhone":{"comment":"Phone number to use in telegram passport: it must be verified, first ».","arguments":{"phone":"Phone number"}},"secureValueTypePersonalDetails":{"comment":"Personal details","arguments":{"gigagroup":"Is this a broadcast group?"}},"secureValueTypeIdentityCard":{"comment":"Identity card","arguments":{"gigagroup":"Is this a broadcast group?"}},"secureValueTypeAddress":{"comment":"Address","arguments":{"gigagroup":"Is this a broadcast group?"}},"secureValueTypeBankStatement":{"comment":"Bank statement","arguments":{"gigagroup":"Is this a broadcast group?"}},"secureValueTypeInternalPassport":{"comment":"Internal passport","arguments":{"gigagroup":"Is this a broadcast group?"}},"secureValueTypePassportRegistration":{"comment":"Internal registration passport","arguments":{"gigagroup":"Is this a broadcast group?"}},"secureValueTypeTemporaryRegistration":{"comment":"Temporary registration","arguments":{"gigagroup":"Is this a broadcast group?"}},"secureValueTypeUtilityBill":{"comment":"Utility bill","arguments":{"gigagroup":"Is this a broadcast group?"}},"secureValueTypePhone":{"comment":"Phone","arguments":{"gigagroup":"Is this a broadcast group?"}},"secureValueTypeEmail":{"comment":"Email","arguments":{"gigagroup":"Is this a broadcast group?"}},"secureValueTypeRentalAgreement":{"comment":"Rental agreement","arguments":{"gigagroup":"Is this a broadcast group?"}},"secureValue":{"comment":"Secure value","arguments":{"flags":"Flags, see TL conditional fields","type":"Secure passport value type","data":"Encrypted Telegram Passport element data","front_side":"Encrypted passport file with the front side of the document","reverse_side":"Encrypted passport file with the reverse side of the document","selfie":"Encrypted passport file with a selfie of the user holding the document","translation":"Array of encrypted passport files with translated versions of the provided documents","files":"Array of encrypted passport files with photos the of the documents","plain_data":"Plaintext verified passport data","hash":"Data hash"}},"secureValueHash":{"comment":"Secure value hash","arguments":{"type":"Secure value type","hash":"Hash"}},"secureValueErrorFrontSide":{"comment":"Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.","arguments":{"type":"One of {@link RawSecureValueTypePassport}, {@link RawSecureValueTypeDriverLicense}, {@link RawSecureValueTypeIdentityCard}, {@link RawSecureValueTypeInternalPassport}","file_hash":"File hash","text":"Error message"}},"inputSecureValue":{"comment":"Secure value, for more info see the passport docs »","arguments":{"flags":"Flags, see TL conditional fields","type":"Secure passport value type","data":"Encrypted Telegram Passport element data","front_side":"Encrypted passport file with the front side of the document","reverse_side":"Encrypted passport file with the reverse side of the document","selfie":"Encrypted passport file with a selfie of the user holding the document","translation":"Array of encrypted passport files with translated versions of the provided documents","files":"Array of encrypted passport files with photos the of the documents","plain_data":"Plaintext verified passport data"}},"secureValueErrorData":{"comment":"Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.","arguments":{"type":"The section of the user's Telegram Passport which has the error, one of {@link RawSecureValueTypePersonalDetails}, {@link RawSecureValueTypePassport}, {@link RawSecureValueTypeDriverLicense}, {@link RawSecureValueTypeIdentityCard}, {@link RawSecureValueTypeInternalPassport}, {@link RawSecureValueTypeAddress}","data_hash":"Data hash","field":"Name of the data field which has the error","text":"Error message"}},"secureValueErrorReverseSide":{"comment":"Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.","arguments":{"type":"One of {@link RawSecureValueTypeDriverLicense}, {@link RawSecureValueTypeIdentityCard}","file_hash":"File hash","text":"Error message"}},"secureValueErrorFile":{"comment":"Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.","arguments":{"type":"One of {@link RawSecureValueTypeUtilityBill}, {@link RawSecureValueTypeBankStatement}, {@link RawSecureValueTypeRentalAgreement}, {@link RawSecureValueTypePassportRegistration}, {@link RawSecureValueTypeTemporaryRegistration}","file_hash":"File hash","text":"Error message"}},"secureValueErrorSelfie":{"comment":"Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.","arguments":{"type":"One of {@link RawSecureValueTypePassport}, {@link RawSecureValueTypeDriverLicense}, {@link RawSecureValueTypeIdentityCard}, {@link RawSecureValueTypeInternalPassport}","file_hash":"File hash","text":"Error message"}},"secureValueErrorFiles":{"comment":"Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.","arguments":{"type":"One of {@link RawSecureValueTypeUtilityBill}, {@link RawSecureValueTypeBankStatement}, {@link RawSecureValueTypeRentalAgreement}, {@link RawSecureValueTypePassportRegistration}, {@link RawSecureValueTypeTemporaryRegistration}","file_hash":"File hash","text":"Error message"}},"secureValueError":{"comment":"Secure value error","arguments":{"type":"Type of element which has the issue","hash":"Hash","text":"Error message"}},"account.authorizationForm":{"comment":"Telegram Passport authorization form","arguments":{"flags":"Flags, see TL conditional fields","required_types":"Required Telegram Passport documents","values":"Already submitted Telegram Passport documents","errors":"Telegram Passport errors","users":"Info about the bot to which the form will be submitted","privacy_policy_url":"URL of the service's privacy policy"}},"secureCredentialsEncrypted":{"comment":"Encrypted credentials required to decrypt telegram passport data.","arguments":{"data":"Encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication, as described in decrypting data »","hash":"Data hash for data authentication as described in decrypting data »","secret":"Secret, encrypted with the bot's public RSA key, required for data decryption as described in decrypting data »"}},"help.deepLinkInfoEmpty":{"comment":"Deep link info empty","arguments":{"gigagroup":"Is this a broadcast group?"}},"secureValueErrorTranslationFiles":{"comment":"Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation changes.","arguments":{"type":"One of {@link RawSecureValueTypePersonalDetails}, {@link RawSecureValueTypePassport}, {@link RawSecureValueTypeDriverLicense}, {@link RawSecureValueTypeIdentityCard}, {@link RawSecureValueTypeInternalPassport}, {@link RawSecureValueTypeUtilityBill}, {@link RawSecureValueTypeBankStatement}, {@link RawSecureValueTypeRentalAgreement}, {@link RawSecureValueTypePassportRegistration}, {@link RawSecureValueTypeTemporaryRegistration}","file_hash":"Hash","text":"Error message"}},"secureValueErrorTranslationFile":{"comment":"Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.","arguments":{"type":"One of {@link RawSecureValueTypePersonalDetails}, {@link RawSecureValueTypePassport}, {@link RawSecureValueTypeDriverLicense}, {@link RawSecureValueTypeIdentityCard}, {@link RawSecureValueTypeInternalPassport}, {@link RawSecureValueTypeUtilityBill}, {@link RawSecureValueTypeBankStatement}, {@link RawSecureValueTypeRentalAgreement}, {@link RawSecureValueTypePassportRegistration}, {@link RawSecureValueTypeTemporaryRegistration}","file_hash":"File hash","text":"Error message"}},"passwordKdfAlgoUnknown":{"comment":"Unknown KDF (most likely, the client is outdated and does not support the specified KDF algorithm)","arguments":{"gigagroup":"Is this a broadcast group?"}},"help.deepLinkInfo":{"comment":"Deep link info, see the here for more details","arguments":{"flags":"Flags, see TL conditional fields","update_app":"An update of the app is required to parse this link","message":"Message to show to the user","entities":"Message entities for styled text"}},"passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow":{"comment":"This key derivation algorithm defines that SRP 2FA login must be used","arguments":{"salt1":"One of two salts used by the derivation function (see SRP 2FA login)","salt2":"One of two salts used by the derivation function (see SRP 2FA login)","g":"Base (see SRP 2FA login)","p":"2048-bit modulus (see SRP 2FA login)"}},"account.sentEmailCode":{"comment":"The sent email code","arguments":{"email_pattern":"The email (to which the code was sent) must match this pattern","length":"The length of the verification code"}},"securePasswordKdfAlgoSHA512":{"comment":"SHA512 KDF algo","arguments":{"salt":"Salt"}},"securePasswordKdfAlgoPBKDF2HMACSHA512iter100000":{"comment":"PBKDF2 with SHA512 and 100000 iterations KDF algo","arguments":{"salt":"Salt"}},"savedPhoneContact":{"comment":"Saved contact","arguments":{"phone":"Phone number","first_name":"First name","last_name":"Last name","date":"Date added"}},"account.takeout":{"comment":"Takeout info","arguments":{"id":"Takeout ID"}},"inputCheckPasswordEmpty":{"comment":"There is no password","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputCheckPasswordSRP":{"comment":"Constructor for checking the validity of a 2FA SRP password (see SRP)","arguments":{"srp_id":"SRP ID","A":"A parameter (see SRP)","M1":"M1 parameter (see SRP)"}},"secureRequiredTypeOneOf":{"comment":"One of","arguments":{"types":"Secure required value types"}},"secureSecretSettings":{"comment":"Secure settings","arguments":{"secure_algo":"Secure KDF algo","secure_secret":"Secure secret","secure_secret_id":"Secret ID"}},"help.passportConfigNotModified":{"comment":"Password configuration not modified","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputAppEvent":{"comment":"Event that occurred in the application.","arguments":{"time":"Client's exact timestamp for the event","type":"Type of event","peer":"Arbitrary numeric value for more convenient selection of certain event types, or events referring to a certain object","data":"Details of the event"}},"help.passportConfig":{"comment":"Telegram passport configuration","arguments":{"hash":"Hash used for caching, for more info click here","countries_langs":"Localization"}},"securePasswordKdfAlgoUnknown":{"comment":"Unknown KDF algo (most likely the client has to be updated)","arguments":{"gigagroup":"Is this a broadcast group?"}},"secureRequiredType":{"comment":"Required type","arguments":{"flags":"Flags, see TL conditional fields","native_names":"Native names","selfie_required":"Is a selfie required","translation_required":"Is a translation required","type":"Secure value type"}},"jsonObjectValue":{"comment":"JSON key: value pair","arguments":{"key":"Key","value":"Value"}},"jsonBool":{"comment":"JSON boolean value","arguments":{"value":"Value"}},"jsonNumber":{"comment":"JSON numeric value","arguments":{"value":"Value"}},"jsonString":{"comment":"JSON string","arguments":{"value":"Value"}},"jsonNull":{"comment":"null JSON value","arguments":{"gigagroup":"Is this a broadcast group?"}},"jsonArray":{"comment":"JSON array","arguments":{"value":"JSON values"}},"jsonObject":{"comment":"JSON object value","arguments":{"value":"Values"}},"pageTableCell":{"comment":"Table cell","arguments":{"flags":"Flags, see TL conditional fields","header":"Is this element part of the column header","align_center":"Horizontally centered block","align_right":"Right-aligned block","valign_middle":"Vertically centered block","valign_bottom":"Block vertically-aligned to the bottom","text":"Content","colspan":"For how many columns should this cell extend","rowspan":"For how many rows should this cell extend"}},"pageCaption":{"comment":"Page caption","arguments":{"text":"Caption","credit":"Credits"}},"pageListItemText":{"comment":"List item","arguments":{"text":"Text"}},"pageTableRow":{"comment":"Table row","arguments":{"cells":"Table cells"}},"pageListOrderedItemText":{"comment":"Ordered list of text items","arguments":{"num":"Number of element within ordered list","text":"Text"}},"pageListItemBlocks":{"comment":"List item","arguments":{"blocks":"Blocks"}},"pageRelatedArticle":{"comment":"Related article","arguments":{"flags":"Flags, see TL conditional fields","url":"URL of article","webpage_id":"Webpage ID of generated IV preview","title":"Title","description":"Description","photo_id":"ID of preview photo","author":"Author name","published_date":"Date of publication"}},"pageListOrderedItemBlocks":{"comment":"Ordered list of IV blocks","arguments":{"num":"Number of element within ordered list","blocks":"Item contents"}},"page":{"comment":"Instant view page","arguments":{"flags":"Flags, see TL conditional fields","part":"Indicates that not full page preview is available to the client and it will need to fetch full Instant View from the server using {@link messages.RawGetWebPagePreviewRequest}.","rtl":"Whether the page contains RTL text","v2":"Whether this is an IV v2 page","url":"Original page HTTP URL","blocks":"Page elements (like with HTML elements, only as TL constructors)","photos":"Photos in page","documents":"Media in page","views":"View count"}},"help.userInfo":{"comment":"Internal use","arguments":{"message":"Info","entities":"Message entities for styled text","author":"Author","date":"Date"}},"pollAnswer":{"comment":"A possible answer of a poll","arguments":{"text":"Textual representation of the answer (only Premium users can use custom emoji entities here).","option":"The param that has to be passed to {@link messages.RawSendVoteRequest}."}},"help.supportName":{"comment":"Localized name for telegram support","arguments":{"name":"Localized name"}},"poll":{"comment":"Poll","arguments":{"id":"ID of the poll","flags":"Flags, see TL conditional fields","closed":"Whether the poll is closed and doesn't accept any more answers","public_voters":"Whether cast votes are publicly visible to all users (non-anonymous poll)","multiple_choice":"Whether multiple options can be chosen as answer","quiz":"Whether this is a quiz (with wrong and correct answers, results shown in the return type)","question":"The question of the poll (only Premium users can use custom emoji entities here).","answers":"The possible answers, vote using {@link messages.RawSendVoteRequest}.","close_period":"Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date.","close_date":"Point in time (UNIX timestamp in seconds) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future; can't be used together with close_period."}},"statsURL":{"comment":"URL with chat statistics","arguments":{"url":"Chat statistics"}},"chatOnlines":{"comment":"Number of online users in a chat","arguments":{"onlines":"Number of online users"}},"chatAdminRights":{"comment":"Represents the rights of an admin in a channel/supergroup.","arguments":{"flags":"Flags, see TL conditional fields","change_info":"If set, allows the admin to modify the description of the channel/supergroup","post_messages":"If set, allows the admin to post messages in the channel","edit_messages":"If set, allows the admin to also edit messages from other admins in the channel","delete_messages":"If set, allows the admin to also delete messages from other admins in the channel","ban_users":"If set, allows the admin to ban users from the channel/supergroup","invite_users":"If set, allows the admin to invite users in the channel/supergroup","pin_messages":"If set, allows the admin to pin messages in the channel/supergroup","add_admins":"If set, allows the admin to add other admins with the same (or more limited) permissions in the channel/supergroup","anonymous":"Whether this admin is anonymous","manage_call":"If set, allows the admin to change group call/livestream settings","other":"Set this flag if none of the other flags are set, but you still want the user to be an admin: if this or any of the other flags are set, the admin can get the chat admin log, get chat statistics, get message statistics in channels, get channel members, see anonymous administrators in supergroups and ignore slow mode.","manage_topics":"If set, allows the admin to create, delete or modify forum topics ».","post_stories":"If set, allows the admin to post stories as the channel.","edit_stories":"If set, allows the admin to edit stories posted by the other admins of the channel.","delete_stories":"If set, allows the admin to delete stories posted by the other admins of the channel."}},"pollAnswerVoters":{"comment":"A poll answer, and how users voted on it","arguments":{"flags":"Flags, see TL conditional fields","chosen":"Whether we have chosen this answer","correct":"For quizzes, whether the option we have chosen is correct","option":"The param that has to be passed to {@link messages.RawSendVoteRequest}.","voters":"How many users voted for this option"}},"help.userInfoEmpty":{"comment":"Internal use","arguments":{"gigagroup":"Is this a broadcast group?"}},"pollResults":{"comment":"Results of poll","arguments":{"flags":"Flags, see TL conditional fields","min":"Similar to min objects, used for poll constructors that are the same for all users so they don't have the option chosen by the current user (you can use {@link messages.RawGetPollResultsRequest} to get the full poll results).","results":"Poll results","total_voters":"Total number of people that voted in the poll","recent_voters":"IDs of the last users that recently voted in the poll","solution":"Explanation of quiz solution","solution_entities":"Message entities for styled text in quiz solution"}},"inputWallPaper":{"comment":"Wallpaper","arguments":{"id":"Wallpaper ID","access_hash":"Access hash"}},"inputWallPaperSlug":{"comment":"Wallpaper by slug (a unique ID, obtained from a wallpaper link »)","arguments":{"slug":"Unique wallpaper ID"}},"account.wallPapers":{"comment":"Installed wallpapers","arguments":{"hash":"Hash used for caching, for more info click here","wallpapers":"Wallpapers"}},"wallPaperSettings":{"comment":"Wallpaper rendering information.","arguments":{"flags":"Flags, see TL conditional fields","blur":"For image wallpapers »: if set, the JPEG must be downscaled to fit in 450x450 square and then box-blurred with radius 12.","motion":"If set, the background needs to be slightly moved when the device is rotated.","background_color":"Used for solid », gradient » and freeform gradient » fills.","second_background_color":"Used for gradient » and freeform gradient » fills.","third_background_color":"Used for freeform gradient » fills.","fourth_background_color":"Used for freeform gradient » fills.","intensity":"Used for pattern wallpapers ».","rotation":"Clockwise rotation angle of the gradient, in degrees; 0-359. Should be always divisible by 45.","emoticon":"If set, this wallpaper can be used as a channel wallpaper and is represented by the specified UTF-8 emoji."}},"account.wallPapersNotModified":{"comment":"No new wallpapers were found","arguments":{"gigagroup":"Is this a broadcast group?"}},"autoDownloadSettings":{"comment":"Autodownload settings","arguments":{"flags":"Flags, see TL conditional fields","disabled":"Disable automatic media downloads?","video_preload_large":"Whether to preload the first seconds of videos larger than the specified limit","audio_preload_next":"Whether to preload the next audio track when you're listening to music","phonecalls_less_data":"Whether to enable data saving mode in phone calls","stories_preload":"Whether to preload stories; in particular, the first {@link RawDocumentAttributeVideo}.preload_prefix_size bytes of story videos should be preloaded.","photo_size_max":"Maximum size of photos to preload","video_size_max":"Maximum size of videos to preload","file_size_max":"Maximum size of other files to preload","video_upload_maxbitrate":"Maximum suggested bitrate for uploading videos","small_queue_active_operations_max":"A limit, specifying the maximum number of files that should be downloaded in parallel from the same DC, for files smaller than 20MB.","large_queue_active_operations_max":"A limit, specifying the maximum number of files that should be downloaded in parallel from the same DC, for files bigger than 20MB."}},"inputWallPaperNoFile":{"comment":"Wallpaper with no file access hash, used for example when deleting (unsave=true) wallpapers using {@link account.RawSaveWallPaperRequest}, specifying just the wallpaper ID.","arguments":{"id":"Wallpaper ID"}},"codeSettings":{"comment":"Settings used by telegram servers for sending the confirm code.\n\nExample implementations: telegram for android, tdlib.","arguments":{"flags":"Flags, see TL conditional fields","allow_flashcall":"Whether to allow phone verification via phone calls.","current_number":"Pass true if the phone number is used on the current device. Ignored if allow_flashcall is not set.","allow_app_hash":"If a token that will be included in eventually sent SMSs is required: required in newer versions of android, to use the android SMS receiver APIs","allow_missed_call":"Whether this device supports receiving the code using the {@link auth.RawCodeTypeMissedCall} method","allow_firebase":"Whether Firebase auth is supported","unknown_number":"Set this flag if there is a SIM card in the current device, but it is not possible to check whether the specified phone number matches the SIM's phone number.","logout_tokens":"Previously stored future auth tokens, see the documentation for more info »","token":"Used only by official iOS apps for Firebase auth: device token for apple push.","app_sandbox":"Used only by official iOS apps for firebase auth: whether a sandbox-certificate will be used during transmission of the push notification."}},"chatBannedRights":{"comment":"Represents the rights of a normal user in a supergroup/channel/chat. In this case, the flags are inverted: if set, a flag does not allow a user to do X.","arguments":{"flags":"Flags, see TL conditional fields","view_messages":"If set, does not allow a user to view messages in a supergroup/channel/chat","send_messages":"If set, does not allow a user to send messages in a supergroup/chat","send_media":"If set, does not allow a user to send any media in a supergroup/chat","send_stickers":"If set, does not allow a user to send stickers in a supergroup/chat","send_gifs":"If set, does not allow a user to send gifs in a supergroup/chat","send_games":"If set, does not allow a user to send games in a supergroup/chat","send_inline":"If set, does not allow a user to use inline bots in a supergroup/chat.","embed_links":"If set, does not allow a user to embed links in the messages of a supergroup/chat","send_polls":"If set, does not allow a user to send polls in a supergroup/chat","change_info":"If set, does not allow any user to change the description of a supergroup/chat","invite_users":"If set, does not allow any user to invite users in a supergroup/chat","pin_messages":"If set, does not allow any user to pin messages in a supergroup/chat","manage_topics":"If set, does not allow any user to create, delete or modify forum topics ».","send_photos":"If set, does not allow a user to send photos in a supergroup/chat.","send_videos":"If set, does not allow a user to send videos in a supergroup/chat.","send_roundvideos":"If set, does not allow a user to send round videos in a supergroup/chat.","send_audios":"If set, does not allow a user to send audio files in a supergroup/chat.","send_voices":"If set, does not allow a user to send voice messages in a supergroup/chat.","send_docs":"If set, does not allow a user to send documents in a supergroup/chat.","send_plain":"If set, does not allow a user to send text messages in a supergroup/chat.","until_date":"Validity of said permissions (it is considered forever any value less then 30 seconds or more then 366 days)."}},"account.autoDownloadSettings":{"comment":"Media autodownload settings","arguments":{"low":"Low data usage preset","medium":"Medium data usage preset","high":"High data usage preset"}},"emojiKeyword":{"comment":"Emoji keyword","arguments":{"keyword":"Keyword","emoticons":"Emojis associated to keyword"}},"emojiKeywordDeleted":{"comment":"Deleted emoji keyword","arguments":{"keyword":"Keyword","emoticons":"Emojis that were associated to keyword"}},"emojiKeywordsDifference":{"comment":"Changes to emoji keywords","arguments":{"lang_code":"Language code for keywords","from_version":"Previous emoji keyword list version","version":"Current version of emoji keyword list","keywords":"Emojis associated to keywords"}},"emojiURL":{"comment":"An HTTP URL which can be used to automatically log in into translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation","arguments":{"url":"An HTTP URL which can be used to automatically log in into translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation"}},"emojiLanguage":{"comment":"Emoji language","arguments":{"lang_code":"Language code"}},"folderPeer":{"comment":"Peer in a folder","arguments":{"peer":"Folder peer info","folder_id":"Peer folder ID, for more info click here"}},"folder":{"comment":"Folder","arguments":{"flags":"Flags, see TL conditional fields","autofill_new_broadcasts":"Automatically add new channels to this folder","autofill_public_groups":"Automatically add joined new public supergroups to this folder","autofill_new_correspondents":"Automatically add new private chats to this folder","id":"Folder ID","title":"Folder title","photo":"Folder picture"}},"inputFolderPeer":{"comment":"Peer in a folder","arguments":{"peer":"Peer","folder_id":"Peer folder ID, for more info click here"}},"messages.searchCounter":{"comment":"Indicates how many results would be found by a {@link messages.RawSearchRequest} call with the same parameters","arguments":{"flags":"Flags, see TL conditional fields","inexact":"If set, the results may be inexact","filter":"Provided message filter","count":"Number of results that were found server-side"}},"urlAuthResultRequest":{"comment":"Details about the authorization request, for more info click here »","arguments":{"flags":"Flags, see TL conditional fields","request_write_access":"Whether the bot would like to send messages to the user","bot":"Username of a bot, which will be used for user authorization. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details.","domain":"The domain name of the website on which the user will log in."}},"urlAuthResultAccepted":{"comment":"Details about an accepted authorization request, for more info click here »","arguments":{"url":"The URL name of the website on which the user has logged in."}},"peerLocated":{"comment":"Peer geolocated nearby","arguments":{"peer":"Peer","expires":"Validity period of current data","distance":"Distance from the peer in meters"}},"channelLocationEmpty":{"comment":"No location (normal supergroup)","arguments":{"gigagroup":"Is this a broadcast group?"}},"channelLocation":{"comment":"Geographical location of supergroup (geogroups)","arguments":{"geo_point":"Geographical location of supergroup","address":"Textual description of the address"}},"urlAuthResultDefault":{"comment":"Details about an accepted authorization request, for more info click here »","arguments":{"gigagroup":"Is this a broadcast group?"}},"peerSelfLocated":{"comment":"Current peer","arguments":{"expires":"Expiry of geolocation info for current peer"}},"theme":{"comment":"Theme","arguments":{"flags":"Flags, see TL conditional fields","creator":"Whether the current user is the creator of this theme","default":"Whether this is the default theme","for_chat":"Whether this theme is meant to be used as a chat theme","id":"Theme ID","access_hash":"Theme access hash","slug":"Unique theme ID","title":"Theme name","document":"Theme","settings":"Theme settings","emoticon":"Theme emoji","installs_count":"Installation count"}},"restrictionReason":{"comment":"Restriction reason.\n\nContains the reason why access to a certain object must be restricted. Clients are supposed to deny access to the channel if the platform field is equal to all or to the current platform (ios, android, wp, etc.). Platforms can be concatenated (ios-android, ios-wp), unknown platforms are to be ignored. The text is the error message that should be shown to the user.","arguments":{"platform":"Platform identifier (ios, android, wp, all, etc.), can be concatenated with a dash as separator (android-ios, ios-wp, etc)","reason":"Restriction reason (porno, terms, etc.)","text":"Error message to be shown to the user"}},"account.themesNotModified":{"comment":"No new themes were installed","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputTheme":{"comment":"Theme","arguments":{"id":"ID","access_hash":"Access hash"}},"inputThemeSlug":{"comment":"Theme by theme ID","arguments":{"slug":"Unique theme ID obtained from a theme deep link »"}},"auth.loginTokenSuccess":{"comment":"Login via token (QR code) succeeded!","arguments":{"authorization":"Authorization info"}},"auth.loginToken":{"comment":"Login token (for QR code login)","arguments":{"expires":"Expiration date of QR code","token":"Token to render in QR code"}},"account.themes":{"comment":"Installed themes","arguments":{"hash":"Hash used for caching, for more info click here","themes":"Themes"}},"auth.loginTokenMigrateTo":{"comment":"Repeat the query to the specified DC","arguments":{"dc_id":"DC ID","token":"Token to use for login"}},"baseThemeDay":{"comment":"Day theme","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.contentSettings":{"comment":"Sensitive content settings","arguments":{"flags":"Flags, see TL conditional fields","sensitive_enabled":"Whether viewing of sensitive (NSFW) content is enabled","sensitive_can_change":"Whether the current client can change the sensitive content settings to view NSFW content"}},"baseThemeNight":{"comment":"Night theme","arguments":{"gigagroup":"Is this a broadcast group?"}},"baseThemeTinted":{"comment":"Tinted theme","arguments":{"gigagroup":"Is this a broadcast group?"}},"baseThemeClassic":{"comment":"Classic theme","arguments":{"gigagroup":"Is this a broadcast group?"}},"messages.inactiveChats":{"comment":"Inactive chat list","arguments":{"dates":"When was the chat last active","chats":"Chat list","users":"Users mentioned in the chat list"}},"baseThemeArctic":{"comment":"Arctic theme","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputThemeSettings":{"comment":"Theme settings","arguments":{"flags":"Flags, see TL conditional fields","message_colors_animated":"If set, the freeform gradient fill needs to be animated on every sent message","base_theme":"Default theme on which this theme is based","accent_color":"Accent color, ARGB format","outbox_accent_color":"Accent color of outgoing messages in ARGB format","message_colors":"The fill to be used as a background for outgoing messages, in RGB24 format.
    If just one or two equal colors are provided, describes a solid fill of a background.
    If two different colors are provided, describes the top and bottom colors of a 0-degree gradient.
    If three or four colors are provided, describes a freeform gradient fill of a background.","wallpaper":"{@link RawInputWallPaper} or {@link RawInputWallPaper} when passing wallpaper files for image or pattern wallpapers, {@link RawInputWallPaperNoFile} with id=0 otherwise.","wallpaper_settings":"Wallpaper settings."}},"webPageAttributeTheme":{"comment":"Page theme","arguments":{"flags":"Flags, see TL conditional fields","documents":"Theme files","settings":"Theme settings"}},"webPageAttributeStickerSet":{"comment":"Contains info about a stickerset », for a {@link RawWebPage} preview of a stickerset deep link » (the {@link RawWebPage} will have a type of telegram_stickerset).","arguments":{"flags":"Flags, see TL conditional fields","emojis":"Whether this i s a custom emoji stickerset.","text_color":"Whether the color of this TGS custom emoji stickerset should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context.","stickers":"A subset of the stickerset in the stickerset."}},"themeSettings":{"comment":"Theme settings","arguments":{"flags":"Flags, see TL conditional fields","message_colors_animated":"If set, the freeform gradient fill needs to be animated on every sent message.","base_theme":"Base theme","accent_color":"Accent color, ARGB format","outbox_accent_color":"Accent color of outgoing messages in ARGB format","message_colors":"The fill to be used as a background for outgoing messages, in RGB24 format.
    If just one or two equal colors are provided, describes a solid fill of a background.
    If two different colors are provided, describes the top and bottom colors of a 0-degree gradient.
    If three or four colors are provided, describes a freeform gradient fill of a background.","wallpaper":"Wallpaper"}},"bankCardOpenUrl":{"comment":"Credit card info URL provided by the bank","arguments":{"url":"Info URL","name":"Bank name"}},"messages.votesList":{"comment":"How users voted in a poll","arguments":{"flags":"Flags, see TL conditional fields","count":"Total number of votes for all options (or only for the chosen option, if provided to {@link messages.RawGetPollVotesRequest})","votes":"Vote info for each user","chats":"Mentioned chats","users":"Info about users that voted in the poll","next_offset":"Offset to use with the next {@link messages.RawGetPollVotesRequest} request, empty string if no more results are available."}},"webPageAttributeStory":{"comment":"Webpage preview of a Telegram story","arguments":{"flags":"Flags, see TL conditional fields","peer":"Peer that posted the story","id":"Story ID","story":"May contain the story, if not the story should be fetched when and if needed using {@link stories.RawGetStoriesByIDRequest} with the above id and peer."}},"dialogFilterDefault":{"comment":"Used only when reordering folders to indicate the default (all chats) folder.","arguments":{"gigagroup":"Is this a broadcast group?"}},"payments.bankCardData":{"comment":"Credit card info, provided by the card's bank(s)","arguments":{"title":"Credit card title","open_urls":"Info URL(s) provided by the card's bank(s)"}},"dialogFilterChatlist":{"comment":"A folder imported using a chat folder deep link ».","arguments":{"flags":"Flags, see TL conditional fields","has_my_invites":"Whether the current user has created some chat folder deep links » to share the folder as well.","id":"ID of the folder","title":"Name of the folder (max 12 UTF-8 chars)","emoticon":"Emoji to use as icon for the folder.","color":"A color ID for the folder tag associated to this folder, see here » for more info.","pinned_peers":"Pinned chats, folders can have unlimited pinned chats","include_peers":"Chats to include in the folder"}},"dialogFilter":{"comment":"Dialog filter AKA folder","arguments":{"flags":"Flags, see TL conditional fields","contacts":"Whether to include all contacts in this folder","non_contacts":"Whether to include all non-contacts in this folder","groups":"Whether to include all groups in this folder","broadcasts":"Whether to include all channels in this folder","bots":"Whether to include all bots in this folder","exclude_muted":"Whether to exclude muted chats from this folder","exclude_read":"Whether to exclude read chats from this folder","exclude_archived":"Whether to exclude archived chats from this folder","id":"Folder ID","title":"Folder name (max 12 UTF-8 chars)","emoticon":"Emoji to use as icon for the folder.","color":"A color ID for the folder tag associated to this folder, see here » for more info.","pinned_peers":"Pinned chats, folders can have unlimited pinned chats","include_peers":"Include the following chats in this folder","exclude_peers":"Exclude the following chats from this folder"}},"dialogFilterSuggested":{"comment":"Suggested folders","arguments":{"filter":"Folder info","description":"Folder description"}},"statsAbsValueAndPrev":{"comment":"Statistics value couple; initial and final value for period of time currently in consideration","arguments":{"current":"Current value","previous":"Previous value"}},"statsPercentValue":{"comment":"Channel statistics percentage.
    \nCompute the percentage simply by doing part * total / 100","arguments":{"part":"Partial value","total":"Total value"}},"statsDateRangeDays":{"comment":"Channel statistics date range","arguments":{"min_date":"Initial date","max_date":"Final date"}},"statsGraphError":{"comment":"An error occurred while generating the statistics graph","arguments":{"error":"The error"}},"statsGraph":{"comment":"Channel statistics graph","arguments":{"flags":"Flags, see TL conditional fields","json":"Statistics data","zoom_token":"Zoom token"}},"help.promoDataEmpty":{"comment":"No PSA/MTProxy info is available","arguments":{"expires":"Re-fetch PSA/MTProxy info after the specified number of seconds"}},"stats.broadcastStats":{"comment":"Channel statistics.","arguments":{"period":"Period in consideration","followers":"Follower count change for period in consideration","views_per_post":"total_viewcount/postcount, for posts posted during the period in consideration.
    Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date).","shares_per_post":"total_sharecount/postcount, for posts posted during the period in consideration.
    Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)","reactions_per_post":"total_reactions/postcount, for posts posted during the period in consideration.
    Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)","views_per_story":"total_views/storycount, for posts posted during the period in consideration.
    Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)","shares_per_story":"total_shares/storycount, for posts posted during the period in consideration.
    Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)","reactions_per_story":"total_reactions/storycount, for posts posted during the period in consideration.
    Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)","enabled_notifications":"Percentage of subscribers with enabled notifications","growth_graph":"Channel growth graph (absolute subscriber count)","followers_graph":"Followers growth graph (relative subscriber count)","mute_graph":"Muted users graph (relative)","top_hours_graph":"Views per hour graph (absolute)","interactions_graph":"Interactions graph (absolute)","iv_interactions_graph":"IV interactions graph (absolute)","views_by_source_graph":"Views by source graph (absolute)","new_followers_by_source_graph":"New followers by source graph (absolute)","languages_graph":"Subscriber language graph (pie chart)","reactions_by_emotion_graph":"A graph containing the number of reactions on posts categorized by emotion","story_interactions_graph":"A graph containing the number of story views and shares","story_reactions_by_emotion_graph":"A graph containing the number of reactions on stories categorized by emotion","recent_posts_interactions":"Detailed statistics about number of views and shares of recently sent messages and stories"}},"videoSizeEmojiMarkup":{"comment":"An animated profile picture based on a custom emoji sticker.","arguments":{"emoji_id":"Custom emoji ID: the custom emoji sticker is shown at the center of the profile picture and occupies at most 67% of it.","background_colors":"1, 2, 3 or 4 RBG-24 colors used to generate a solid (1), gradient (2) or freeform gradient (3, 4) background, similar to how fill wallpapers are generated. The rotation angle for gradient backgrounds is 0."}},"help.promoData":{"comment":"MTProxy/Public Service Announcement information","arguments":{"flags":"Flags, see TL conditional fields","proxy":"MTProxy-related channel","expires":"Expiry of PSA/MTProxy info","peer":"MTProxy/PSA peer","chats":"Chat info","users":"User info","psa_type":"PSA type","psa_message":"PSA message"}},"videoSizeStickerMarkup":{"comment":"An animated profile picture based on a sticker.","arguments":{"stickerset":"Stickerset","sticker_id":"Sticker ID","background_colors":"1, 2, 3 or 4 RBG-24 colors used to generate a solid (1), gradient (2) or freeform gradient (3, 4) background, similar to how fill wallpapers are generated. The rotation angle for gradient backgrounds is 0."}},"statsGroupTopPoster":{"comment":"Information about an active user in a supergroup","arguments":{"user_id":"User ID","messages":"Number of messages for statistics period in consideration","avg_chars":"Average number of characters per message"}},"statsGroupTopAdmin":{"comment":"Information about an active admin in a supergroup","arguments":{"user_id":"User ID","deleted":"Number of deleted messages for statistics period in consideration","kicked":"Number of kicked users for statistics period in consideration","banned":"Number of banned users for statistics period in consideration"}},"stats.megagroupStats":{"comment":"Supergroup statistics","arguments":{"period":"Period in consideration","members":"Member count change for period in consideration","messages":"Message number change for period in consideration","viewers":"Number of users that viewed messages, for range in consideration","posters":"Number of users that posted messages, for range in consideration","growth_graph":"Supergroup growth graph (absolute subscriber count)","members_graph":"Members growth (relative subscriber count)","new_members_by_source_graph":"New members by source graph","languages_graph":"Subscriber language graph (pie chart)","messages_graph":"Message activity graph (stacked bar graph, message type)","actions_graph":"Group activity graph (deleted, modified messages, blocked users)","top_hours_graph":"Activity per hour graph (absolute)","weekdays_graph":"Activity per day of week graph (absolute)","top_posters":"Info about most active group members","top_admins":"Info about most active group admins","top_inviters":"Info about most active group inviters","users":"Info about users mentioned in statistics"}},"statsGroupTopInviter":{"comment":"Information about an active supergroup inviter","arguments":{"user_id":"User ID","invitations":"Number of invitations for statistics period in consideration"}},"globalPrivacySettings":{"comment":"Global privacy settings","arguments":{"flags":"Flags, see TL conditional fields","archive_and_mute_new_noncontact_peers":"Whether to archive and mute new chats from non-contacts","keep_archived_unmuted":"Whether unmuted chats will be kept in the Archive chat list when they get a new message.","keep_archived_folders":"Whether unmuted chats that are always included or pinned in a folder, will be kept in the Archive chat list when they get a new message. Ignored if keep_archived_unmuted is set.","hide_read_marks":"If this flag is set, the {@link RawInputPrivacyKeyStatusTimestamp} key will also apply to the ability to use {@link messages.RawGetOutboxReadDateRequest} on messages sent to us.
    Meaning, users that cannot see our exact last online date due to the current value of the {@link RawInputPrivacyKeyStatusTimestamp} key will receive a 403 USER_PRIVACY_RESTRICTED error when invoking {@link messages.RawGetOutboxReadDateRequest} to fetch the exact read date of a message they sent to us.
    The {@link RawUserFull}.read_dates_private flag will be set for users that have this flag enabled.","new_noncontact_peers_require_premium":"If set, only users that have a premium account, are in our contact list, or already have a private chat with us can write to us; a 403 PRIVACY_PREMIUM_REQUIRED error will be emitted otherwise.
    The {@link RawUserFull}.contact_require_premium flag will be set for users that have this flag enabled.
    To check whether we can write to a user with this flag enabled, if we haven't yet cached all the required information (for example we don't have the {@link RawUserFull} or history of all users while displaying the chat list in the sharing UI) the {@link users.RawGetIsPremiumRequiredToContactRequest} method may be invoked, passing the list of users currently visible in the UI, returning a list of booleans that directly specify whether we can or cannot write to each user.
    Premium users only, non-Premium users will receive a PREMIUM_ACCOUNT_REQUIRED error when trying to enable this flag."}},"help.countryCode":{"comment":"Country code and phone number pattern of a specific country","arguments":{"flags":"Flags, see TL conditional fields","country_code":"ISO country code","prefixes":"Possible phone prefixes","patterns":"Phone patterns: for example, XXX XXX XXX"}},"statsGraphAsync":{"comment":"This channel statistics graph must be generated asynchronously using {@link stats.RawLoadAsyncGraphRequest} to reduce server load","arguments":{"token":"Token to use for fetching the async graph"}},"help.countriesListNotModified":{"comment":"The country list has not changed","arguments":{"gigagroup":"Is this a broadcast group?"}},"videoSize":{"comment":"An animated profile picture in MPEG4 format","arguments":{"flags":"Flags, see TL conditional fields","type":"u for animated profile pictures, and v for trimmed and downscaled video previews","w":"Video width","h":"Video height","size":"File size","video_start_ts":"Timestamp that should be shown as static preview to the user (seconds)"}},"help.country":{"comment":"Name, ISO code, localized name and phone codes/patterns of a specific country","arguments":{"flags":"Flags, see TL conditional fields","hidden":"Whether this country should not be shown in the list","iso2":"ISO code of country","default_name":"Name of the country in the country's language","name":"Name of the country in the user's language, if different from the original name","country_codes":"Phone codes/patterns"}},"messageViews":{"comment":"View, forward counter + info about replies of a specific message","arguments":{"flags":"Flags, see TL conditional fields","views":"View count of message","forwards":"Forward count of message","replies":"Reply and thread information of message"}},"help.countriesList":{"comment":"Name, ISO code, localized name and phone codes/patterns of all available countries","arguments":{"countries":"Name, ISO code, localized name and phone codes/patterns of all available countries","hash":"Hash used for caching, for more info click here"}},"messages.messageViews":{"comment":"View, forward counter + info about replies","arguments":{"views":"View, forward counter + info about replies","chats":"Chats mentioned in constructor","users":"Users mentioned in constructor"}},"messageReplyHeader":{"comment":"Message replies and thread information","arguments":{"flags":"Flags, see TL conditional fields","reply_to_scheduled":"This is a reply to a scheduled message.","forum_topic":"Whether this message was sent in a forum topic (except for the General topic).","quote":"Whether this message is quoting a part of another message.","reply_to_msg_id":"ID of message to which this message is replying","reply_to_peer_id":"For replies sent in channel discussion threads of which the current user is not a member, the discussion group ID","reply_from":"When replying to a message sent by a certain peer to another chat, contains info about the peer that originally sent the message to that other chat.","reply_media":"When replying to a media sent by a certain peer to another chat, contains the media of the replied-to message.","reply_to_top_id":"ID of the message that started this message thread","quote_text":"Used to quote-reply to only a certain section (specified here) of the original message.","quote_entities":"Message entities for styled text from the quote_text field.","quote_offset":"Offset of the message quote_text within the original message (in UTF-16 code units)."}},"messages.discussionMessage":{"comment":"Information about a message thread","arguments":{"flags":"Flags, see TL conditional fields","messages":"The messages from which the thread starts. The messages are returned in reverse chronological order (i.e., in order of decreasing message ID).","max_id":"Message ID of latest reply in this thread","read_inbox_max_id":"Message ID of latest read incoming message in this thread","read_outbox_max_id":"Message ID of latest read outgoing message in this thread","unread_count":"Number of unread messages","chats":"Chats mentioned in constructor","users":"Users mentioned in constructor"}},"messageReplyStoryHeader":{"comment":"Represents a reply to a story","arguments":{"peer":"Sender of the story.","story_id":"Story ID"}},"messageReplies":{"comment":"Info about the comment section of a channel post, or a simple message thread","arguments":{"flags":"Flags, see TL conditional fields","comments":"Whether this constructor contains information about the comment section of a channel post, or a simple message thread","replies":"Contains the total number of replies in this thread or comment section.","replies_pts":"PTS of the message that started this thread.","recent_repliers":"For channel post comments, contains information about the last few comment posters for a specific thread, to show a small list of commenter profile pictures in client previews.","channel_id":"For channel post comments, contains the ID of the associated discussion supergroup","max_id":"ID of the latest message in this thread or comment section.","read_max_id":"Contains the ID of the latest read message in this thread or comment section."}},"stats.messageStats":{"comment":"Message statistics","arguments":{"views_graph":"Message view graph","reactions_by_emotion_graph":"A graph containing the number of reactions on stories categorized by emotion"}},"groupCall":{"comment":"Info about a group call or livestream","arguments":{"flags":"Flags, see TL conditional fields","join_muted":"Whether the user should be muted upon joining the call","can_change_join_muted":"Whether the current user can change the value of the join_muted flag using {@link phone.RawToggleGroupCallSettingsRequest}","join_date_asc":"Specifies the ordering to use when locally sorting by date and displaying in the UI group call participants.","schedule_start_subscribed":"Whether we subscribed to the scheduled call","can_start_video":"Whether you can start streaming video into the call","record_video_active":"Whether the group call is currently being recorded","rtmp_stream":"Whether RTMP streams are allowed","listeners_hidden":"Whether the listeners list is hidden and cannot be fetched using {@link phone.RawGetGroupParticipantsRequest}. The phone.groupParticipants.count and groupCall.participants_count counters will still include listeners.","id":"Group call ID","access_hash":"Group call access hash","participants_count":"Participant count","title":"Group call title","stream_dc_id":"DC ID to be used for livestream chunks","record_start_date":"When was the recording started","schedule_date":"When is the call scheduled to start","unmuted_video_count":"Number of people currently streaming video into the call","unmuted_video_limit":"Maximum number of people allowed to stream video into the call","version":"Version"}},"groupCallDiscarded":{"comment":"An ended group call","arguments":{"id":"Group call ID","access_hash":"Group call access hash","duration":"Group call duration"}},"peerBlocked":{"comment":"Information about a blocked peer","arguments":{"peer_id":"Peer ID","date":"When was the peer blocked"}},"groupCallParticipant":{"comment":"Info about a group call participant","arguments":{"flags":"Flags, see TL conditional fields","muted":"Whether the participant is muted","left":"Whether the participant has left","can_self_unmute":"Whether the participant can unmute themselves","just_joined":"Whether the participant has just joined","versioned":"If set, and {@link RawUpdateGroupCallParticipants}.version < locally stored call.version, info about this participant should be ignored. If (...), and {@link RawUpdateGroupCallParticipants}.version > call.version+1, the participant list should be refetched using {@link phone.RawGetGroupParticipantsRequest}.","min":"If not set, the volume and muted_by_you fields can be safely used to overwrite locally cached information; otherwise, volume will contain valid information only if volume_by_admin is set both in the cache and in the received constructor.","muted_by_you":"Whether this participant was muted by the current user","volume_by_admin":"Whether our volume can only changed by an admin","self":"Whether this participant is the current user","video_joined":"Whether this participant is currently broadcasting video","peer":"Peer information","date":"When did this participant join the group call","active_date":"When was this participant last active in the group call","source":"Source ID","volume":"Volume, if not set the volume is set to 100%.","about":"Info about this participant","raise_hand_rating":"Specifies the UI visualization order of peers with raised hands: peers with a higher rating should be showed first in the list.","video":"Info about the video stream the participant is currently broadcasting","presentation":"Info about the screen sharing stream the participant is currently broadcasting"}},"phone.groupCall":{"comment":"Contains info about a group call, and partial info about its participants.","arguments":{"call":"Info about the group call","participants":"A partial list of participants.","participants_next_offset":"Next offset to use when fetching the remaining participants using {@link phone.RawGetGroupParticipantsRequest}","chats":"Chats mentioned in the participants vector","users":"Users mentioned in the participants vector"}},"inputGroupCall":{"comment":"Points to a specific group call","arguments":{"id":"Group call ID","access_hash":"Group call access hash"}},"phone.groupParticipants":{"comment":"Info about the participants of a group call or livestream","arguments":{"count":"Number of participants","participants":"List of participants","next_offset":"If not empty, the specified list of participants is partial, and more participants can be fetched specifying this parameter as offset in {@link phone.RawGetGroupParticipantsRequest}.","chats":"Mentioned chats","users":"Mentioned users","version":"Version info"}},"inlineQueryPeerTypeSameBotPM":{"comment":"Peer type: private chat with the bot itself","arguments":{"gigagroup":"Is this a broadcast group?"}},"inlineQueryPeerTypeChat":{"comment":"Peer type: chat","arguments":{"gigagroup":"Is this a broadcast group?"}},"inlineQueryPeerTypeBotPM":{"comment":"Peer type: private chat with a bot.","arguments":{"gigagroup":"Is this a broadcast group?"}},"inlineQueryPeerTypeBroadcast":{"comment":"Peer type: channel","arguments":{"gigagroup":"Is this a broadcast group?"}},"inlineQueryPeerTypeMegagroup":{"comment":"Peer type: supergroup","arguments":{"gigagroup":"Is this a broadcast group?"}},"messages.historyImport":{"comment":"ID of a specific chat import session, click here for more info ».","arguments":{"id":"History import ID"}},"messages.historyImportParsed":{"comment":"Contains information about a chat export file generated by a foreign chat app, click here for more info.
    \nIf neither the pm or group flags are set, the specified chat export was generated from a chat of unknown type.","arguments":{"flags":"Flags, see TL conditional fields","pm":"The chat export file was generated from a private chat.","group":"The chat export file was generated from a group chat.","title":"Title of the chat."}},"inlineQueryPeerTypePM":{"comment":"Peer type: private chat","arguments":{"gigagroup":"Is this a broadcast group?"}},"messages.affectedFoundMessages":{"comment":"Messages found and affected by changes","arguments":{"pts":"Event count after generation","pts_count":"Number of events that were generated","offset":"If bigger than zero, the request must be repeated to remove more messages","messages":"Affected message IDs"}},"messages.exportedChatInvites":{"comment":"Info about chat invites exported by a certain admin.","arguments":{"count":"Number of invites exported by the admin","invites":"Exported invites","users":"Info about the admin"}},"chatInviteImporter":{"comment":"When and which user joined the chat using a chat invite","arguments":{"flags":"Flags, see TL conditional fields","requested":"Whether this user currently has a pending join request »","via_chatlist":"The participant joined by importing a chat folder deep link ».","user_id":"The user","date":"When did the user join","about":"For users with pending requests, contains bio of the user that requested to join","approved_by":"The administrator that approved the join request » of the user"}},"messages.chatInviteImporters":{"comment":"Info about the users that joined the chat using a specific chat invite","arguments":{"count":"Number of users that joined","importers":"The users that joined","users":"The users that joined"}},"messages.exportedChatInviteReplaced":{"comment":"The specified chat invite was replaced with another one","arguments":{"invite":"The replaced chat invite","new_invite":"The invite that replaces the previous invite","users":"Mentioned users"}},"phone.joinAsPeers":{"comment":"A list of peers that can be used to join a group call, presenting yourself as a specific user/channel.","arguments":{"peers":"Peers","chats":"Chats mentioned in the peers vector","users":"Users mentioned in the peers vector"}},"phone.exportedGroupCallInvite":{"comment":"An invite to a group call or livestream","arguments":{"link":"Invite link"}},"chatAdminWithInvites":{"comment":"Info about chat invites generated by admins.","arguments":{"admin_id":"The admin","invites_count":"Number of invites generated by the admin","revoked_invites_count":"Number of revoked invites"}},"messages.checkedHistoryImportPeer":{"comment":"Contains a confirmation text to be shown to the user, upon importing chat history, click here for more info ».","arguments":{"confirm_text":"A confirmation text to be shown to the user, upon importing chat history »."}},"messages.exportedChatInvite":{"comment":"Info about a chat invite","arguments":{"invite":"Info about the chat invite","users":"Mentioned users"}},"groupCallParticipantVideoSourceGroup":{"comment":"Describes a group of video synchronization source identifiers","arguments":{"semantics":"SDP semantics","sources":"Source IDs"}},"messages.chatAdminsWithInvites":{"comment":"Info about chat invites generated by admins.","arguments":{"admins":"Info about chat invites generated by admins.","users":"Mentioned users"}},"stickers.suggestedShortName":{"comment":"A suggested short name for a stickerpack","arguments":{"short_name":"Suggested short name"}},"botCommandScopeUsers":{"comment":"The specified bot commands will only be valid in all private chats with users.","arguments":{"gigagroup":"Is this a broadcast group?"}},"groupCallParticipantVideo":{"comment":"Info about a video stream","arguments":{"flags":"Flags, see TL conditional fields","paused":"Whether the stream is currently paused","endpoint":"Endpoint","source_groups":"Source groups","audio_source":"Audio source ID"}},"botCommandScopeChats":{"comment":"The specified bot commands will be valid in all groups and supergroups.","arguments":{"gigagroup":"Is this a broadcast group?"}},"botCommandScopeDefault":{"comment":"The commands will be valid in all dialogs","arguments":{"gigagroup":"Is this a broadcast group?"}},"botCommandScopePeer":{"comment":"The specified bot commands will be valid only in a specific dialog.","arguments":{"peer":"The dialog"}},"botCommandScopePeerUser":{"comment":"The specified bot commands will be valid only for a specific user in the specified group or supergroup.","arguments":{"peer":"The chat","user_id":"The user"}},"botCommandScopePeerAdmins":{"comment":"The specified bot commands will be valid for all admins of the specified group or supergroup.","arguments":{"peer":"The chat"}},"account.resetPasswordFailedWait":{"comment":"You recently requested a password reset that was canceled, please wait until the specified date before requesting another reset.","arguments":{"retry_date":"Wait until this date before requesting another reset."}},"botCommandScopeChatAdmins":{"comment":"The specified bot commands will be valid only for chat administrators, in all groups and supergroups.","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.resetPasswordRequestedWait":{"comment":"You successfully requested a password reset, please wait until the specified date before finalizing the reset.","arguments":{"until_date":"Wait until this date before finalizing the reset."}},"messages.sponsoredMessagesEmpty":{"comment":"No sponsored messages are available.","arguments":{"gigagroup":"Is this a broadcast group?"}},"searchResultsCalendarPeriod":{"comment":"Information about found messages sent on a specific day, used to split the messages in {@link messages.RawSearchResultsCalendar} constructors by days.\n\nMultiple searchResultsCalendarPeriod constructors are returned in {@link messages.RawSearchResultsCalendar}, each containing information about the first, last and total number of messages matching the filter that were sent on a specific day.","arguments":{"date":"The day this object is referring to.","min_msg_id":"First message ID that was sent on this day.","max_msg_id":"Last message ID that was sent on this day.","count":"All messages that were sent on this day."}},"sponsoredMessage":{"comment":"A sponsored message.","arguments":{"flags":"Flags, see TL conditional fields","recommended":"Whether the message needs to be labeled as \"recommended\" instead of \"sponsored\"","can_report":"Whether this message can be reported as specified here ».","random_id":"Message ID","url":"Contains the URL to open when the user clicks on the sponsored message.","title":"Contains the title of the sponsored message.","message":"Sponsored message","entities":"Message entities for styled text in message.","photo":"If set, contains a custom profile photo bubble that should be displayed for the sponsored message, like for messages sent in groups.","color":"If set, the sponsored message should use the message accent color » specified in color.","button_text":"Label of the sponsored message button.","sponsor_info":"If set, contains additional information about the sponsor to be shown along with the message.","additional_info":"If set, contains additional information about the sponsored message to be shown along with the message."}},"messages.sponsoredMessages":{"comment":"A set of sponsored messages associated to a channel","arguments":{"flags":"Flags, see TL conditional fields","posts_between":"If set, specifies the minimum number of messages between shown sponsored messages; otherwise, only one sponsored message must be shown after all ordinary messages.","messages":"Sponsored messages","chats":"Chats mentioned in the sponsored messages","users":"Users mentioned in the sponsored messages"}},"messages.searchResultsPositions":{"comment":"Information about sparse positions of messages","arguments":{"count":"Total number of found messages","positions":"List of message positions"}},"searchResultPosition":{"comment":"Information about a message in a specific position","arguments":{"msg_id":"Message ID","date":"When was the message sent","offset":"0-based message position in the full list of suitable messages"}},"messages.searchResultsCalendar":{"comment":"Information about found messages sent on a specific day","arguments":{"flags":"Flags, see TL conditional fields","inexact":"If set, indicates that the results may be inexact","count":"Total number of results matching query","min_date":"Starting timestamp of attached messages","min_msg_id":"Ending timestamp of attached messages","offset_id_offset":"Indicates the absolute position of messages[0] within the total result set with count count.
    This is useful, for example, if we need to display a progress/total counter (like photo 134 of 200, for all media in a chat, we could simply use photo ${offset_id_offset} of ${count}.","periods":"Used to split the messages by days: multiple SearchResultsCalendarPeriod constructors are returned, each containing information about the first, last and total number of messages matching the filter that were sent on a specific day.
    This information can be easily used to split the returned messages by day.","messages":"Messages","chats":"Mentioned chats","users":"Mentioned users"}},"channels.sendAsPeers":{"comment":"A list of peers that can be used to send messages in a specific group","arguments":{"peers":"Peers that can be used to send messages to the group","chats":"Mentioned chats","users":"Mentioned users"}},"account.resetPasswordOk":{"comment":"The 2FA password was reset successfully.","arguments":{"gigagroup":"Is this a broadcast group?"}},"users.userFull":{"comment":"Full user information","arguments":{"full_user":"Full user information","chats":"Mentioned chats","users":"Mentioned users"}},"messageReactions":{"comment":"Message reactions »","arguments":{"flags":"Flags, see TL conditional fields","min":"Similar to min objects, used for message reaction » constructors that are the same for all users so they don't have the reactions sent by the current user (you can use {@link messages.RawGetMessagesReactionsRequest} to get the full reaction info).","can_see_list":"Whether {@link messages.RawGetMessageReactionsListRequest} can be used to see how each specific peer reacted to the message","reactions_as_tags":"If set or if there are no reactions, all present and future reactions should be treated as message tags, see here » for more info.","results":"Reactions","recent_reactions":"List of recent peers and their reactions"}},"messages.peerSettings":{"comment":"Peer settings","arguments":{"settings":"Peer settings","chats":"Mentioned chats","users":"Mentioned users"}},"auth.loggedOut":{"comment":"Future auth token » to be used on subsequent authorizations","arguments":{"flags":"Flags, see TL conditional fields","future_auth_token":"Future auth token » to be used on subsequent authorizations"}},"availableReaction":{"comment":"Animations associated with a message reaction","arguments":{"flags":"Flags, see TL conditional fields","inactive":"If not set, the reaction can be added to new messages and enabled in chats.","premium":"Whether this reaction can only be used by Telegram Premium users","reaction":"Reaction emoji","title":"Reaction description","static_icon":"Static icon for the reaction","appear_animation":"The animated sticker to show when the user opens the reaction dropdown","select_animation":"The animated sticker to show when the user hovers over the reaction","activate_animation":"The animated sticker to show when the reaction is chosen and activated","effect_animation":"The background effect (still an animated sticker) to play under the activate_animation, when the reaction is chosen and activated","around_animation":"The animation that plays around the button when you press an existing reaction (played together with center_icon).","center_icon":"The animation of the emoji inside the button when you press an existing reaction (played together with around_animation)."}},"messages.availableReactionsNotModified":{"comment":"No new reactions are available","arguments":{"gigagroup":"Is this a broadcast group?"}},"messages.messageReactionsList":{"comment":"List of peers that reacted to a specific message","arguments":{"flags":"Flags, see TL conditional fields","count":"Total number of reactions matching query","reactions":"List of peers that reacted to a specific message","chats":"Mentioned chats","users":"Mentioned users","next_offset":"If set, indicates the next offset to use to load more results by invoking {@link messages.RawGetMessageReactionsListRequest}."}},"messages.availableReactions":{"comment":"Animations and metadata associated with message reactions »","arguments":{"hash":"Hash used for caching, for more info click here","reactions":"Animations and metadata associated with message reactions »"}},"phone.groupCallStreamChannels":{"comment":"Info about RTMP streams in a group call or livestream","arguments":{"channels":"RTMP streams"}},"messagePeerReaction":{"comment":"How a certain peer reacted to the message","arguments":{"flags":"Flags, see TL conditional fields","big":"Whether the specified message reaction » should elicit a bigger and longer reaction","unread":"Whether the reaction wasn't yet marked as read by the current user","my":"Starting from layer 159, {@link messages.RawSendReactionRequest} will send reactions from the peer (user or channel) specified using {@link messages.RawSaveDefaultSendAsRequest}.
    If set, this flag indicates that this reaction was sent by us, even if the peer doesn't point to the current account.","peer_id":"Peer that reacted to the message","date":"When was this reaction added","reaction":"Reaction emoji"}},"phone.groupCallStreamRtmpUrl":{"comment":"RTMP URL and stream key to be used in streaming software","arguments":{"url":"RTMP URL","key":"Stream key"}},"groupCallStreamChannel":{"comment":"Info about an RTMP stream in a group call or livestream","arguments":{"channel":"Channel ID","scale":"Specifies the duration of the video segment to fetch in milliseconds, by bitshifting 1000 to the right scale times: duration_ms := 1000 >> scale.","last_timestamp_ms":"Last seen timestamp to easily start fetching livestream chunks using {@link RawInputGroupCallStream}"}},"attachMenuBotIcon":{"comment":"Represents an attachment menu icon for bot mini apps »","arguments":{"flags":"Flags, see TL conditional fields","name":"One of the following values: note that animated icons must be played when the user clicks on the button, activating the bot mini app.

    default_static - Default attachment menu icon in SVG format
    placeholder_static - Default placeholder for opened Web Apps in SVG format
    ios_static - Attachment menu icon in SVG format for the official iOS app
    ios_animated - Animated attachment menu icon in TGS format for the official iOS app
    android_animated - Animated attachment menu icon in TGS format for the official Android app
    macos_animated - Animated attachment menu icon in TGS format for the official native Mac OS app
    ios_side_menu_static - Side menu icon in PNG format for the official iOS app
    android_side_menu_static - Side menu icon in SVG format for the official android app
    macos_side_menu_static - Side menu icon in PNG format for the official native Mac OS app","icon":"The actual icon file.","colors":"Attachment menu icon colors."}},"reactionCount":{"comment":"Reactions","arguments":{"flags":"Flags, see TL conditional fields","chosen_order":"If set, indicates that the current user also sent this reaction.
    The integer value indicates when was the reaction added: the bigger the value, the newer the reaction.","reaction":"The reaction.","count":"Number of users that reacted with this emoji."}},"attachMenuBot":{"comment":"Represents a bot mini app that can be launched from the attachment/side menu »\n\nAt least one of the show_in_attach_menu or the show_in_side_menu flags will always be set.","arguments":{"flags":"Flags, see TL conditional fields","inactive":"If set, before launching the mini app the client should ask the user to add the mini app to the attachment/side menu, and only if the user accepts, after invoking {@link messages.RawToggleBotInAttachMenuRequest} the app should be opened.","has_settings":"Deprecated flag, can be ignored.","request_write_access":"Whether the bot would like to send messages to the user.","show_in_attach_menu":"Whether, when installed, an attachment menu entry should be shown for the Mini App.","show_in_side_menu":"Whether, when installed, an entry in the main view side menu should be shown for the Mini App.","side_menu_disclaimer_needed":"If inactive if set and the user hasn't previously accepted the third-party mini apps Terms of Service for this bot, when showing the mini app installation prompt, an additional mandatory checkbox to accept the mini apps TOS and a disclaimer indicating that this Mini App is not affiliated to Telegram should be shown.","bot_id":"Bot ID","short_name":"Attachment menu item name","peer_types":"List of dialog types where this attachment menu entry should be shown","icons":"List of platform-specific static icons and animations to use for the attachment menu button"}},"attachMenuBotIconColor":{"comment":"Represents an attachment menu icon color for bot mini apps »","arguments":{"name":"One of the following values:
    light_icon - Color of the attachment menu icon (light mode)
    light_text - Color of the attachment menu label, once selected (light mode)
    dark_icon - Color of the attachment menu icon (dark mode)
    dark_text - Color of the attachment menu label, once selected (dark mode)","color":"Color in RGB24 format"}},"attachMenuBotsNotModified":{"comment":"The list of bot mini apps hasn't changed","arguments":{"gigagroup":"Is this a broadcast group?"}},"attachMenuBots":{"comment":"Represents a list of bot mini apps that can be launched from the attachment menu »","arguments":{"hash":"Hash used for caching, for more info click here","bots":"List of bot mini apps that can be launched from the attachment menu »","users":"Info about related users/bots"}},"webViewResultUrl":{"comment":"Contains the webview URL with appropriate theme and user info parameters added","arguments":{"flags":"Flags, see TL conditional fields","fullsize":"If set, the app must be opened in fullsize mode instead of compact mode.","query_id":"Webview session ID (only returned by inline button mini apps, menu button mini apps, attachment menu mini apps).","url":"Webview URL to open"}},"attachMenuBotsBot":{"comment":"Represents a bot mini app that can be launched from the attachment menu »","arguments":{"bot":"Represents a bot mini app that can be launched from the attachment menu »
    ","users":"Info about related users and bots"}},"webViewMessageSent":{"comment":"Info about a sent inline webview message","arguments":{"flags":"Flags, see TL conditional fields","msg_id":"Message ID"}},"botMenuButton":{"comment":"Bot menu button that opens a web app when clicked.","arguments":{"text":"Title to be displayed on the menu button instead of 'Menu'","url":"URL of a web app to open when the user clicks on the button"}},"botMenuButtonCommands":{"comment":"Bot menu button that opens the bot command list when clicked.","arguments":{"gigagroup":"Is this a broadcast group?"}},"botMenuButtonDefault":{"comment":"Placeholder bot menu button never returned to users: see the docs for more info.","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.savedRingtonesNotModified":{"comment":"The notification sound list hasn't changed.","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.savedRingtones":{"comment":"A list of saved notification sounds","arguments":{"hash":"Hash used for caching, for more info click here","ringtones":"Saved notification sounds"}},"notificationSoundDefault":{"comment":"Indicates the default notification sound should be used","arguments":{"gigagroup":"Is this a broadcast group?"}},"notificationSoundNone":{"comment":"No notification sound should be used","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.savedRingtone":{"comment":"The notification sound was already in MP3 format and was saved without any modification","arguments":{"gigagroup":"Is this a broadcast group?"}},"notificationSoundRingtone":{"comment":"A specific previously uploaded notification sound should be used","arguments":{"id":"Document ID of notification sound uploaded using {@link account.RawUploadRingtoneRequest}"}},"account.savedRingtoneConverted":{"comment":"The notification sound was not in MP3 format and was successfully converted and saved, use the returned Document to refer to the notification sound from now on","arguments":{"document":"The converted notification sound"}},"notificationSoundLocal":{"comment":"Indicates a specific local notification sound should be used","arguments":{"title":"Notification sound title","data":"Notification sound identifier (arbitrary data used by the client to identify a specific local notification sound)"}},"attachMenuPeerTypeSameBotPM":{"comment":"The bot attachment menu entry is available in the chat with the bot that offers it","arguments":{"gigagroup":"Is this a broadcast group?"}},"attachMenuPeerTypeBotPM":{"comment":"The bot attachment menu entry is available in private chats with other bots (excluding the bot that offers the current attachment menu)","arguments":{"gigagroup":"Is this a broadcast group?"}},"attachMenuPeerTypePM":{"comment":"The bot attachment menu entry is available in private chats with other users (not bots)","arguments":{"gigagroup":"Is this a broadcast group?"}},"attachMenuPeerTypeBroadcast":{"comment":"The bot attachment menu entry is available in channels","arguments":{"gigagroup":"Is this a broadcast group?"}},"attachMenuPeerTypeChat":{"comment":"The bot attachment menu entry is available in groups and supergroups","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputInvoiceMessage":{"comment":"An invoice contained in a {@link RawMessageMediaInvoice} message or paid media ».","arguments":{"peer":"Chat where the invoice/paid media was sent","msg_id":"Message ID"}},"payments.exportedInvoice":{"comment":"Exported invoice deep link","arguments":{"url":"Exported invoice deep link"}},"inputInvoiceSlug":{"comment":"An invoice slug taken from an invoice deep link or from the premium_invoice_slug app config parameter »","arguments":{"slug":"The invoice slug"}},"inputInvoicePremiumGiftCode":{"comment":"Used if the user wishes to start a channel/supergroup giveaway or send some giftcodes to members of a channel/supergroup, in exchange for boosts.","arguments":{"purpose":"Should be populated with {@link RawInputStorePaymentPremiumGiveaway} for giveaways and {@link RawInputStorePaymentPremiumGiftCode} for gifts.","option":"Should be populated with one of the giveaway options returned by {@link payments.RawGetPremiumGiftCodeOptionsRequest}, see the giveaways » documentation for more info."}},"inputInvoiceStars":{"comment":"Used to top up the Telegram Stars balance of the current account or someone else's account.","arguments":{"purpose":"Either an {@link RawInputStorePaymentStarsTopup} or an {@link RawInputStorePaymentStarsGift}."}},"messages.transcribedAudio":{"comment":"Transcribed text from a voice message »","arguments":{"flags":"Flags, see TL conditional fields","pending":"Whether the transcription is partial because audio transcription is still in progress, if set the user may receive further {@link RawUpdateTranscribedAudio} updates with the updated transcription.","transcription_id":"Transcription ID","text":"Transcripted text","trial_remains_num":"For non-Premium users, this flag will be set, indicating the remaining transcriptions in the free trial period.","trial_remains_until_date":"For non-Premium users, this flag will be set, indicating the date when the trial_remains_num counter will be reset to the maximum value of transcribe_audio_trial_weekly_number."}},"help.premiumPromo":{"comment":"Telegram Premium promotion information\n\nNote that the video_sections+videos fields are a list of videos, and the corresponding premium feature identifiers.
    \nThey're equivalent to a section => video dictionary, with keys from video_section and values from videos.
    \nThe keys in video_sections correspond to a specific feature identifier, and the associated promotional video should be shown when the associated feature row is clicked.","arguments":{"status_text":"Description of the current state of the user's Telegram Premium subscription","status_entities":"Message entities for styled text","video_sections":"A list of premium feature identifiers », associated to each video","videos":"A list of videos","period_options":"Telegram Premium subscription options","users":"Related user information"}},"inputStorePaymentPremiumGiftCode":{"comment":"Used to gift Telegram Premium subscriptions only to some specific subscribers of a channel/supergroup or to some of our contacts, see here » for more info on giveaways and gifts.","arguments":{"flags":"Flags, see TL conditional fields","users":"The users that will receive the Telegram Premium subscriptions.","boost_peer":"If set, the gifts will be sent on behalf of a channel/supergroup we are an admin of, which will also assign some boosts to it. Otherwise, the gift will be sent directly from the currently logged in user, and we will gain some extra boost slots. See here » for more info on giveaways and gifts.","currency":"Three-letter ISO 4217 currency code","amount":"Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."}},"inputStorePaymentPremiumGiveaway":{"comment":"Used to pay for a giveaway, see here » for more info.","arguments":{"flags":"Flags, see TL conditional fields","only_new_subscribers":"If set, only new subscribers starting from the giveaway creation date will be able to participate to the giveaway.","winners_are_visible":"If set, giveaway winners are public and will be listed in a {@link RawMessageMediaGiveawayResults} message that will be automatically sent to the channel once the giveaway ends.","boost_peer":"The channel/supergroup starting the giveaway, that the user must join to participate, that will receive the giveaway boosts; see here » for more info on giveaways.","additional_peers":"Additional channels that the user must join to participate to the giveaway can be specified here.","countries_iso2":"The set of users that can participate to the giveaway can be restricted by passing here an explicit whitelist of up to giveaway_countries_max countries, specified as two-letter ISO 3166-1 alpha-2 country codes.","prize_description":"Can contain a textual description of additional giveaway prizes.","random_id":"Random ID to avoid resending the giveaway","until_date":"The end date of the giveaway, must be at most giveaway_period_max seconds in the future; see here » for more info on giveaways.","currency":"Three-letter ISO 4217 currency code","amount":"Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."}},"inputStorePaymentPremiumSubscription":{"comment":"Info about a Telegram Premium purchase","arguments":{"flags":"Flags, see TL conditional fields","restore":"Pass true if this is a restore of a Telegram Premium purchase; only for the App Store","upgrade":"Pass true if this is an upgrade from a monthly subscription to a yearly subscription; only for App Store"}},"inputStorePaymentStarsTopup":{"comment":"Used to top up the Telegram Stars balance of the current account.","arguments":{"stars":"Amount of stars to topup","currency":"Three-letter ISO 4217 currency code","amount":"Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."}},"inputStorePaymentGiftPremium":{"comment":"Info about a gifted Telegram Premium purchase","arguments":{"user_id":"The user to which the Telegram Premium subscription was gifted","currency":"Three-letter ISO 4217 currency code","amount":"Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."}},"inputStorePaymentStarsGift":{"comment":"Used to gift Telegram Stars to a friend.","arguments":{"user_id":"The user to which the stars should be gifted.","stars":"Amount of stars to gift","currency":"Three-letter ISO 4217 currency code","amount":"Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."}},"premiumGiftOption":{"comment":"Telegram Premium gift option","arguments":{"flags":"Flags, see TL conditional fields","months":"Duration of gifted Telegram Premium subscription","currency":"Three-letter ISO 4217 currency code","amount":"Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).","bot_url":"An invoice deep link » to an invoice for in-app payment, using the official Premium bot; may be empty if direct payment isn't available.","store_product":"An identifier for the App Store/Play Store product associated with the Premium gift."}},"paymentFormMethod":{"comment":"Represents an additional payment method","arguments":{"url":"URL to open in a webview to process the payment","title":"Payment method description"}},"emojiStatus":{"comment":"An emoji status","arguments":{"document_id":"Custom emoji document ID"}},"emojiStatusUntil":{"comment":"An emoji status valid until the specified date","arguments":{"document_id":"Custom emoji document ID","until":"This status is valid until this date"}},"account.emojiStatuses":{"comment":"A list of emoji statuses","arguments":{"hash":"Hash used for caching, for more info click here","statuses":"Emoji statuses"}},"reactionEmpty":{"comment":"No reaction","arguments":{"gigagroup":"Is this a broadcast group?"}},"reactionEmoji":{"comment":"Normal emoji message reaction","arguments":{"emoticon":"Emoji"}},"account.emojiStatusesNotModified":{"comment":"The server-side list of emoji statuses hasn't changed","arguments":{"gigagroup":"Is this a broadcast group?"}},"chatReactionsSome":{"comment":"Some reactions are allowed","arguments":{"reactions":"Allowed set of reactions: the reactions_in_chat_max configuration field indicates the maximum number of reactions that can be specified in this field."}},"reactionCustomEmoji":{"comment":"Custom emoji message reaction","arguments":{"document_id":"Custom emoji document ID"}},"chatReactionsNone":{"comment":"No reactions are allowed","arguments":{"gigagroup":"Is this a broadcast group?"}},"chatReactionsAll":{"comment":"All reactions or all non-custom reactions are allowed","arguments":{"flags":"Flags, see TL conditional fields","allow_custom":"Whether to allow custom reactions"}},"messages.reactionsNotModified":{"comment":"The server-side list of message reactions hasn't changed","arguments":{"gigagroup":"Is this a broadcast group?"}},"emailVerificationCode":{"comment":"Email verification code","arguments":{"code":"Received verification code"}},"emailVerificationGoogle":{"comment":"Google ID email verification token","arguments":{"token":"Token"}},"emailVerifyPurposeLoginSetup":{"comment":"Email verification purpose: setup login email","arguments":{"phone_number":"Phone number","phone_code_hash":"Phone code hash as specified by the documentation"}},"emailVerifyPurposeLoginChange":{"comment":"Email verification purpose: change login email","arguments":{"gigagroup":"Is this a broadcast group?"}},"emojiStatusEmpty":{"comment":"No emoji status is set","arguments":{"gigagroup":"Is this a broadcast group?"}},"emailVerifyPurposePassport":{"comment":"Verify an email for use in telegram passport","arguments":{"gigagroup":"Is this a broadcast group?"}},"messages.reactions":{"comment":"List of message reactions","arguments":{"hash":"Hash used for caching, for more info click here","reactions":"Reactions"}},"emailVerificationApple":{"comment":"Apple ID email verification token","arguments":{"token":"Token"}},"account.emailVerifiedLogin":{"comment":"The email was verified correctly, and a login code was just sent to it.","arguments":{"email":"The verified email address.","sent_code":"Info about the sent login code"}},"premiumSubscriptionOption":{"comment":"Describes a Telegram Premium subscription option","arguments":{"flags":"Flags, see TL conditional fields","current":"Whether this subscription option is currently in use.","can_purchase_upgrade":"Whether this subscription option can be used to upgrade the existing Telegram Premium subscription. When upgrading Telegram Premium subscriptions bought through stores, make sure that the store transaction ID is equal to transaction, to avoid upgrading someone else's account, if the client is currently logged into multiple accounts.","transaction":"Identifier of the last in-store transaction for the currently used subscription on the current account.","months":"Duration of subscription in months","currency":"Three-letter ISO 4217 currency code","amount":"Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).","bot_url":"Deep link used to initiate payment","store_product":"Store product ID, only for official apps"}},"account.emailVerified":{"comment":"The email was verified correctly.","arguments":{"email":"The verified email address."}},"sendAsPeer":{"comment":"Indicates a peer that can be used to send messages","arguments":{"flags":"Flags, see TL conditional fields","premium_required":"Whether a Telegram Premium account is required to send messages as this peer","peer":"Peer"}},"stickerKeyword":{"comment":"Keywords for a certain sticker","arguments":{"document_id":"Sticker ID","keyword":"Keywords"}},"messageExtendedMediaPreview":{"comment":"Paid media preview for not yet purchased paid media, see here » for more info.","arguments":{"flags":"Flags, see TL conditional fields","w":"Width","h":"Height","thumb":"Extremely low resolution thumbnail.","video_duration":"Video duration for videos."}},"messageExtendedMedia":{"comment":"Already purchased paid media, see here » for more info.","arguments":{"media":"The media we purchased."}},"username":{"comment":"Contains information about a username.","arguments":{"flags":"Flags, see TL conditional fields","editable":"Whether the username is editable, meaning it wasn't bought on fragment.","active":"Whether the username is active.","username":"The username."}},"forumTopicDeleted":{"comment":"Represents a deleted forum topic.","arguments":{"id":"The ID of the deleted forum topic."}},"forumTopic":{"comment":"Represents a forum topic.","arguments":{"flags":"Flags, see TL conditional fields","my":"Whether the topic was created by the current user","closed":"Whether the topic is closed (no messages can be sent to it)","pinned":"Whether the topic is pinned","short":"Whether this constructor is a reduced version of the full topic information.
    If set, only the my, closed, id, date, title, icon_color, icon_emoji_id and from_id parameters will contain valid information.
    Reduced info is usually only returned in topic-related admin log events » and in the {@link messages.RawChannelMessages} constructor: if needed, full information can be fetched using {@link channels.RawGetForumTopicsByIDRequest}.","hidden":"Whether the topic is hidden (only valid for the \"General\" topic, id=1)","id":"Topic ID","date":"Topic creation date","title":"Topic title","icon_color":"If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F.","icon_emoji_id":"ID of the custom emoji used as topic icon.","top_message":"ID of the last message that was sent to this topic","read_inbox_max_id":"Position up to which all incoming messages are read.","read_outbox_max_id":"Position up to which all outgoing messages are read.","unread_count":"Number of unread messages","unread_mentions_count":"Number of unread mentions","unread_reactions_count":"Number of unread reactions to messages you sent","from_id":"ID of the peer that created the topic","notify_settings":"Notification settings","draft":"Message draft"}},"defaultHistoryTTL":{"comment":"Contains info about the default value of the Time-To-Live setting, applied to all new chats.","arguments":{"period":"Time-To-Live setting applied to all new chats."}},"exportedContactToken":{"comment":"Describes a temporary profile link.","arguments":{"url":"The temporary profile link.","expires":"Its expiration date"}},"messages.forumTopics":{"comment":"Contains information about multiple forum topics","arguments":{"flags":"Flags, see TL conditional fields","order_by_create_date":"Whether the returned topics are ordered by creation date; if set, pagination by offset_date should use {@link RawForumTopic}.date; otherwise topics are ordered by the last message date, so paginate by the date of the message referenced by {@link RawForumTopic}.top_message.","count":"Total number of topics matching query; may be more than the topics contained in topics, in which case pagination is required.","topics":"Forum topics","messages":"Related messages (contains the messages mentioned by {@link RawForumTopic}.top_message).","chats":"Related chats","users":"Related users","pts":"Event count after generation"}},"requestPeerTypeUser":{"comment":"Choose a user.","arguments":{"flags":"Flags, see TL conditional fields","bot":"Whether to allow choosing only bots.","premium":"Whether to allow choosing only Premium users."}},"requestPeerTypeChat":{"comment":"Choose a chat or supergroup","arguments":{"flags":"Flags, see TL conditional fields","creator":"Whether to allow only choosing chats or supergroups that were created by the current user.","bot_participant":"Whether to allow only choosing chats or supergroups where the bot is a participant.","has_username":"If specified, allows only choosing channels with or without a username, according to the value of Bool.","forum":"If specified, allows only choosing chats or supergroups that are or aren't forums, according to the value of Bool.","user_admin_rights":"If specified, allows only choosing chats or supergroups where the current user is an admin with at least the specified admin rights.","bot_admin_rights":"If specified, allows only choosing chats or supergroups where the bot is an admin with at least the specified admin rights."}},"requestPeerTypeBroadcast":{"comment":"Choose a channel","arguments":{"flags":"Flags, see TL conditional fields","creator":"Whether to allow only choosing channels that were created by the current user.","has_username":"If specified, allows only choosing channels with or without a username, according to the value of Bool.","user_admin_rights":"If specified, allows only choosing channels where the current user is an admin with at least the specified admin rights.","bot_admin_rights":"If specified, allows only choosing channels where the bot is an admin with at least the specified admin rights."}},"emojiListNotModified":{"comment":"The list of custom emojis hasn't changed.","arguments":{"gigagroup":"Is this a broadcast group?"}},"emojiList":{"comment":"Represents a list of custom emojis.","arguments":{"hash":"Hash used for caching, for more info click here","document_id":"Custom emoji IDs"}},"emojiGroupGreeting":{"comment":"Represents an emoji category, that should be moved to the top of the list when choosing a sticker for a business introduction","arguments":{"title":"Category name, i.e. \"Animals\", \"Flags\", \"Faces\" and so on...","icon_emoji_id":"A single custom emoji used as preview for the category.","emoticons":"A list of UTF-8 emojis, matching the category."}},"emojiGroup":{"comment":"Represents an emoji category.","arguments":{"title":"Category name, i.e. \"Animals\", \"Flags\", \"Faces\" and so on...","icon_emoji_id":"A single custom emoji used as preview for the category.","emoticons":"A list of UTF-8 emojis, matching the category."}},"textWithEntities":{"comment":"Styled text with message entities","arguments":{"text":"Text","entities":"Message entities for styled text"}},"messages.emojiGroupsNotModified":{"comment":"The list of emoji categories hasn't changed.","arguments":{"gigagroup":"Is this a broadcast group?"}},"messages.emojiGroups":{"comment":"Represents a list of emoji categories.","arguments":{"hash":"Hash used for caching, for more info click here","groups":"A list of emoji categories."}},"messages.translateResult":{"comment":"Translated text with entities","arguments":{"result":"Text+entities, for each input message."}},"autoSaveSettings":{"comment":"Media autosave settings","arguments":{"flags":"Flags, see TL conditional fields","photos":"Whether photos should be autosaved to the gallery.","videos":"Whether videos should be autosaved to the gallery.","video_max_size":"If set, specifies a size limit for autosavable videos"}},"emojiGroupPremium":{"comment":"An emoji category, used to select all Premium-only stickers (i.e. those with a Premium effect »)/Premium-only custom emojis (i.e. those where the {@link RawDocumentAttributeCustomEmoji}.free flag is not set)","arguments":{"title":"Category name, i.e. \"Animals\", \"Flags\", \"Faces\" and so on...","icon_emoji_id":"A single custom emoji used as preview for the category."}},"account.autoSaveSettings":{"comment":"Contains media autosave settings","arguments":{"users_settings":"Default media autosave settings for private chats","chats_settings":"Default media autosave settings for groups and supergroups","broadcasts_settings":"Default media autosave settings for channels","exceptions":"Peer-specific granular autosave settings","chats":"Chats mentioned in the peer-specific granular autosave settings","users":"Users mentioned in the peer-specific granular autosave settings"}},"autoSaveException":{"comment":"Peer-specific media autosave settings","arguments":{"peer":"The peer","settings":"Media autosave settings"}},"help.appConfigNotModified":{"comment":"The client configuration parameters haven't changed","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputBotAppID":{"comment":"Used to fetch information about a direct link Mini App by its ID","arguments":{"id":"direct link Mini App ID.","access_hash":"Access hash, obtained from the {@link RawBotApp} constructor."}},"help.appConfig":{"comment":"Contains various client configuration parameters","arguments":{"hash":"Hash used for caching, for more info click here","config":"Client configuration parameters"}},"inputBotAppShortName":{"comment":"Used to fetch information about a direct link Mini App by its short name","arguments":{"bot_id":"ID of the bot that owns the bot mini app","short_name":"Short name, obtained from a Direct Mini App deep link"}},"messages.botApp":{"comment":"Contains information about a direct link Mini App","arguments":{"flags":"Flags, see TL conditional fields","inactive":"Whether the web app was never used by the user, and confirmation must be asked from the user before opening it.","request_write_access":"The bot is asking permission to send messages to the user: if the user agrees, set the write_allowed flag when invoking {@link messages.RawRequestAppWebViewRequest}.","has_settings":"Deprecated flag, can be ignored.","app":"Bot app information"}},"botAppNotModified":{"comment":"Bot app info hasn't changed.","arguments":{"gigagroup":"Is this a broadcast group?"}},"readParticipantDate":{"comment":"Contains info about when a certain participant has read a message","arguments":{"user_id":"User ID","date":"When the user read the message"}},"inputChatlistDialogFilter":{"comment":"Folder ID","arguments":{"filter_id":"Folder ID"}},"chatlists.exportedChatlistInvite":{"comment":"Info about an exported chat folder deep link ».","arguments":{"filter":"Folder ID","invite":"The exported chat folder deep link »."}},"botApp":{"comment":"Contains information about a direct link Mini App.","arguments":{"flags":"Flags, see TL conditional fields","id":"bot mini app ID","access_hash":"bot mini app access hash","short_name":"bot mini app short name, used to generate Direct Mini App deep links.","title":"bot mini app title.","description":"bot mini app description.","photo":"bot mini app photo.","document":"bot mini app animation.","hash":"Hash to pass to {@link messages.RawGetBotAppRequest}, to avoid refetching bot app info if it hasn't changed."}},"exportedChatlistInvite":{"comment":"Exported chat folder deep link ».","arguments":{"flags":"Flags, see TL conditional fields","title":"Name of the link","url":"The chat folder deep link ».","peers":"Peers to import"}},"chatlists.exportedInvites":{"comment":"Info about multiple chat folder deep links ».","arguments":{"invites":"The chat folder deep links ».","chats":"Related chat information","users":"Related user information"}},"chatlists.chatlistInviteAlready":{"comment":"Updated info about a chat folder deep link » we already imported.","arguments":{"filter_id":"ID of the imported folder","missing_peers":"New peers to be imported","already_peers":"Peers that were already imported","chats":"Related chat information","users":"Related user information"}},"inlineBotWebView":{"comment":"Specifies an inline mode mini app button, shown on top of the inline query results list.","arguments":{"text":"Text of the button","url":"Webapp URL"}},"chatlists.chatlistInvite":{"comment":"Info about a chat folder deep link ».","arguments":{"flags":"Flags, see TL conditional fields","title":"Name of the link","emoticon":"Emoji to use as icon for the folder.","peers":"Supergroups and channels to join","chats":"Related chat information","users":"Related user information"}},"bots.botInfo":{"comment":"Localized information about a bot.","arguments":{"name":"Bot name","about":"Bot about text","description":"Bot description"}},"messagePeerVoteMultiple":{"comment":"How a peer voted in a multiple-choice poll","arguments":{"peer":"Peer ID","options":"Options chosen by the peer","date":"When did the peer cast their votes"}},"messagePeerVoteInputOption":{"comment":"How a peer voted in a poll (reduced constructor, returned if an option was provided to {@link messages.RawGetPollVotesRequest})","arguments":{"peer":"The peer that voted for the queried option","date":"When did the peer cast the vote"}},"chatlists.chatlistUpdates":{"comment":"Updated information about a chat folder deep link ».","arguments":{"missing_peers":"New peers to join","chats":"Related chat information","users":"Related user information"}},"storyViews":{"comment":"Aggregated view and reaction information of a story.","arguments":{"flags":"Flags, see TL conditional fields","has_viewers":"If set, indicates that the viewers list is currently viewable, and was not yet deleted because the story has expired while the user didn't have a Premium account.","views_count":"View counter of the story","forwards_count":"Forward counter of the story","reactions":"All reactions sent to this story","reactions_count":"Number of reactions added to the story","recent_viewers":"User IDs of some recent viewers of the story"}},"storyItemDeleted":{"comment":"Represents a previously active story, that was deleted","arguments":{"id":"Story ID"}},"storyItemSkipped":{"comment":"Represents an active story, whose full information was omitted for space and performance reasons; use {@link stories.RawGetStoriesByIDRequest} to fetch full info about the skipped story when and if needed.","arguments":{"flags":"Flags, see TL conditional fields","close_friends":"Whether this story can only be viewed by our close friends, see here » for more info","id":"Story ID","date":"When was the story posted.","expire_date":"When does the story expire."}},"storyItem":{"comment":"Represents a story.","arguments":{"flags":"Flags, see TL conditional fields","pinned":"Whether this story is pinned on the user's profile","public":"Whether this story is public and can be viewed by everyone","close_friends":"Whether this story can only be viewed by our close friends, see here » for more info","min":"Full information about this story was omitted for space and performance reasons; use {@link stories.RawGetStoriesByIDRequest} to fetch full info about this story when and if needed.","noforwards":"Whether this story is protected and thus cannot be forwarded; clients should also prevent users from saving attached media (i.e. videos should only be streamed, photos should be kept in RAM, et cetera).","edited":"Indicates whether the story was edited.","contacts":"Whether this story can only be viewed by our contacts","selected_contacts":"Whether this story can only be viewed by a select list of our contacts","out":"indicates whether we sent this story.","id":"ID of the story.","date":"When was the story posted.","from_id":"Sender of the story.","fwd_from":"For reposted stories », contains info about the original story.","expire_date":"When does the story expire.","caption":"Story caption.","entities":"Message entities for styled text","media":"Story media.","media_areas":"List of media areas, see here » for more info on media areas.","privacy":"Privacy rules indicating who can and can't view this story","views":"View date and reaction information","sent_reaction":"The reaction we sent."}},"stories.allStoriesNotModified":{"comment":"The list of active (or active and hidden) stories has not changed.","arguments":{"flags":"Flags, see TL conditional fields","state":"State to use to ask for updates","stealth_mode":"Current stealth mode information"}},"storyView":{"comment":"Story view date and reaction information","arguments":{"flags":"Flags, see TL conditional fields","blocked":"Whether we have completely blocked this user, including from viewing more of our stories.","blocked_my_stories_from":"Whether we have blocked this user from viewing more of our stories.","user_id":"The user that viewed the story","date":"When did the user view the story","reaction":"If present, contains the reaction that the user left on the story"}},"storyViewPublicForward":{"comment":"A certain peer has forwarded the story as a message to a public chat or channel.","arguments":{"flags":"Flags, see TL conditional fields","blocked":"Whether we have completely blocked this user, including from viewing more of our stories.","blocked_my_stories_from":"Whether we have blocked this user from viewing more of our stories.","message":"The message with the forwarded story."}},"messagePeerVote":{"comment":"How a peer voted in a poll","arguments":{"peer":"Peer ID","option":"The option chosen by the peer","date":"When did the peer cast the vote"}},"storyViewPublicRepost":{"comment":"A certain peer has reposted the story.","arguments":{"flags":"Flags, see TL conditional fields","blocked":"Whether we have completely blocked this user, including from viewing more of our stories.","blocked_my_stories_from":"Whether we have blocked this user from viewing more of our stories.","peer_id":"The peer that reposted the story.","story":"The reposted story."}},"stories.stories":{"comment":"List of stories","arguments":{"flags":"Flags, see TL conditional fields","count":"Total number of stories that can be fetched","stories":"Stories","pinned_to_top":"IDs of pinned stories.","chats":"Mentioned chats","users":"Mentioned users"}},"stories.allStories":{"comment":"Full list of active (or active and hidden) stories.","arguments":{"flags":"Flags, see TL conditional fields","has_more":"Whether more results can be fetched as described here ».","count":"Total number of active (or active and hidden) stories","state":"State to use for pagination","peer_stories":"Stories","chats":"Mentioned chats","users":"Mentioned users","stealth_mode":"Current stealth mode information"}},"stories.storyViewsList":{"comment":"Reaction and view counters for a story","arguments":{"flags":"Flags, see TL conditional fields","count":"Total number of results that can be fetched","views_count":"Total number of story views","forwards_count":"Total number of story forwards/reposts","reactions_count":"Number of reactions that were added to the story","views":"Story view date and reaction information","chats":"Mentioned chats","users":"Mentioned users","next_offset":"Offset for pagination"}},"stories.storyViews":{"comment":"Reaction and view counters for a list of stories","arguments":{"views":"View date and reaction information of multiple stories","users":"Mentioned users"}},"inputReplyToMessage":{"comment":"Reply to a message.","arguments":{"flags":"Flags, see TL conditional fields","reply_to_msg_id":"The message ID to reply to.","top_msg_id":"This field must contain the topic ID only when replying to messages in forum topics different from the \"General\" topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1).
    If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the \"General\" topic.","reply_to_peer_id":"Used to reply to messages sent to another chat (specified here), can only be used for non-protected chats and messages.","quote_text":"Used to quote-reply to only a certain section (specified here) of the original message. The maximum UTF-8 length for quotes is specified in the quote_length_max config key.","quote_entities":"Message entities for styled text from the quote_text field.","quote_offset":"Offset of the message quote_text within the original message (in UTF-16 code units)."}},"exportedStoryLink":{"comment":"Represents a story deep link.","arguments":{"link":"The story deep link."}},"mediaAreaCoordinates":{"comment":"Coordinates and size of a clicable rectangular area on top of a story.","arguments":{"flags":"Flags, see TL conditional fields","x":"The abscissa of the rectangle's center, as a percentage of the media width (0-100).","y":"The ordinate of the rectangle's center, as a percentage of the media height (0-100).","w":"The width of the rectangle, as a percentage of the media width (0-100).","h":"The height of the rectangle, as a percentage of the media height (0-100).","rotation":"Clockwise rotation angle of the rectangle, in degrees (0-360).","radius":"The radius of the rectangle corner rounding, as a percentage of the media width."}},"storiesStealthMode":{"comment":"Information about the current stealth mode session.","arguments":{"flags":"Flags, see TL conditional fields","active_until_date":"The date up to which stealth mode will be active.","cooldown_until_date":"The date starting from which the user will be allowed to re-enable stealth mode again."}},"mediaAreaGeoPoint":{"comment":"Represents a geolocation tag attached to a story.","arguments":{"flags":"Flags, see TL conditional fields","coordinates":"The size and position of the media area corresponding to the location sticker on top of the story media.","geo":"Coordinates of the geolocation tag.","address":"Optional textual representation of the address."}},"mediaAreaChannelPost":{"comment":"Represents a channel post.","arguments":{"coordinates":"The size and location of the media area corresponding to the location sticker on top of the story media.","channel_id":"The channel that posted the message","msg_id":"ID of the channel message"}},"inputReplyToStory":{"comment":"Reply to a story.","arguments":{"peer":"Sender of the story","story_id":"ID of the story to reply to."}},"mediaAreaUrl":{"comment":"Represents a URL media area.","arguments":{"coordinates":"The size and location of the media area corresponding to the URL button on top of the story media.","url":"URL to open when clicked."}},"inputMediaAreaChannelPost":{"comment":"Represents a channel post","arguments":{"coordinates":"The size and location of the media area corresponding to the location sticker on top of the story media.","channel":"The channel that posted the message","msg_id":"ID of the channel message"}},"mediaAreaSuggestedReaction":{"comment":"Represents a reaction bubble.","arguments":{"flags":"Flags, see TL conditional fields","dark":"Whether the reaction bubble has a dark background.","flipped":"Whether the reaction bubble is mirrored (see here » for more info).","coordinates":"The coordinates of the media area corresponding to the reaction button.","reaction":"The reaction that should be sent when this area is clicked."}},"mediaAreaVenue":{"comment":"Represents a location tag attached to a story, with additional venue information.","arguments":{"coordinates":"The size and location of the media area corresponding to the location sticker on top of the story media.","geo":"Coordinates of the venue","title":"Venue name","address":"Address","provider":"Venue provider: currently only \"foursquare\" and \"gplaces\" need to be supported.","venue_id":"Venue ID in the provider's database","venue_type":"Venue type in the provider's database"}},"stories.peerStories":{"comment":"Active story list of a specific peer.","arguments":{"stories":"Stories","chats":"Mentioned chats","users":"Mentioned users"}},"inputMediaAreaVenue":{"comment":"Represents a location tag attached to a story, with additional venue information.","arguments":{"coordinates":"The size and location of the media area corresponding to the location sticker on top of the story media.","query_id":"The query_id from {@link messages.RawBotResults}, see here » for more info.","result_id":"The id of the chosen result, see here » for more info."}},"messages.webPage":{"comment":"Represents an Instant View webpage.","arguments":{"webpage":"The instant view webpage.","chats":"Chats mentioned in the webpage.","users":"Users mentioned in the webpage."}},"mediaAreaWeather":{"comment":"Represents a weather widget ».","arguments":{"coordinates":"The size and location of the media area corresponding to the widget on top of the story media.","emoji":"Weather emoji, should be rendered as an animated emoji.","temperature_c":"Temperature in degrees Celsius.","color":"ARGB background color."}},"premiumGiftCodeOption":{"comment":"Contains info about a giveaway/gift option.","arguments":{"flags":"Flags, see TL conditional fields","users":"Number of users which will be able to activate the gift codes.","months":"Duration in months of each gifted Telegram Premium subscription.","store_product":"Identifier of the store product associated with the option, official apps only.","store_quantity":"Number of times the store product must be paid","currency":"Three-letter ISO 4217 currency code","amount":"Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."}},"peerStories":{"comment":"Stories associated to a peer","arguments":{"flags":"Flags, see TL conditional fields","peer":"The peer","max_read_id":"If set, contains the ID of the maximum read story","stories":"Stories"}},"payments.giveawayInfo":{"comment":"Contains info about an ongoing giveaway.\n\nIf neither the participating, joined_too_early_date, admin_disallowed_chat_id or disallowed_country flags are set, the user is not currently participating in the giveaway but could participate by joining all the channels specified in the {@link RawMessageMediaGiveaway}.channels field.","arguments":{"flags":"Flags, see TL conditional fields","participating":"The current user is participating in the giveaway.","preparing_results":"If set, the giveaway has ended and the results are being prepared.","start_date":"When was the giveaway started","joined_too_early_date":"The current user can't participate in the giveaway, because they were already a member of the channel when the giveaway started, and the only_new_subscribers was set when starting the giveaway.","admin_disallowed_chat_id":"If set, the current user can't participate in the giveaway, because they are an administrator in one of the channels (ID specified in this flag) that created the giveaway.","disallowed_country":"If set, the current user can't participate in this giveaway, because their phone number is from the specified disallowed country (specified as a two-letter ISO 3166-1 alpha-2 country code)."}},"prepaidGiveaway":{"comment":"Contains info about a prepaid giveaway ».","arguments":{"id":"Prepaid giveaway ID.","months":"Duration in months of each gifted Telegram Premium subscription.","quantity":"Number of given away Telegram Premium subscriptions.","date":"Payment date."}},"payments.giveawayInfoResults":{"comment":"A giveaway has ended.","arguments":{"flags":"Flags, see TL conditional fields","winner":"Whether we're one of the winners of this giveaway.","refunded":"Whether the giveaway was canceled and was fully refunded.","start_date":"Start date of the giveaway","gift_code_slug":"If we're one of the winners of this giveaway, contains the Premium gift code, see here » for more info on the full giveaway flow.","finish_date":"End date of the giveaway. May be bigger than the end date specified in parameters of the giveaway.","winners_count":"Number of winners in the giveaway","activated_count":"Number of winners, which activated their gift codes."}},"payments.checkedGiftCode":{"comment":"Contains info about a Telegram Premium giftcode link.","arguments":{"flags":"Flags, see TL conditional fields","via_giveaway":"Whether this giftcode was created by a giveaway.","from_id":"The peer that created the gift code.","giveaway_msg_id":"Message ID of the giveaway in the channel specified in from_id.","to_id":"The destination user of the gift.","date":"Creation date of the gift code.","months":"Duration in months of the gifted Telegram Premium subscription.","used_date":"When was the giftcode imported, if it was imported.","chats":"Mentioned chats","users":"Mentioned users"}},"storyFwdHeader":{"comment":"Contains info about the original poster of a reposted story.","arguments":{"flags":"Flags, see TL conditional fields","modified":"Whether the story media was modified before reposting it (for example by overlaying a round video with a reaction).","from":"Peer that originally posted the story; will be empty for stories forwarded from a user with forwards privacy enabled, in which case from_name will be set, instead.","from_name":"Will be set for stories forwarded from a user with forwards privacy enabled, in which case from will also be empty.","story_id":", contains the story ID"}},"boost":{"comment":"Info about one or more boosts applied by a specific user.","arguments":{"flags":"Flags, see TL conditional fields","gift":"Whether this boost was applied because the channel/supergroup directly gifted a subscription to the user.","giveaway":"Whether this boost was applied because the user was chosen in a giveaway started by the channel/supergroup.","unclaimed":"If set, the user hasn't yet invoked {@link payments.RawApplyGiftCodeRequest} to claim a subscription gifted directly or in a giveaway by the channel.","id":"Unique ID for this set of boosts.","user_id":"ID of the user that applied the boost.","giveaway_msg_id":"The message ID of the giveaway","date":"When was the boost applied","expires":"When does the boost expire","used_gift_slug":"The created Telegram Premium gift code, only set if either gift or giveaway are set AND it is either a gift code for the currently logged in user or if it was already claimed.","multiplier":"If set, this boost counts as multiplier boosts, otherwise it counts as a single boost."}},"premium.boostsStatus":{"comment":"Contains info about the current boost status of a peer.","arguments":{"flags":"Flags, see TL conditional fields","my_boost":"Whether we're currently boosting this channel/supergroup, my_boost_slots will also be set.","level":"The current boost level of the channel/supergroup.","current_level_boosts":"The number of boosts acquired so far in the current level.","boosts":"Total number of boosts acquired so far.","gift_boosts":"The number of boosts acquired from created Telegram Premium gift codes and giveaways; only returned to channel/supergroup admins.","next_level_boosts":"Total number of boosts needed to reach the next level; if absent, the next level isn't available.","premium_audience":"Only returned to channel/supergroup admins: contains the approximated number of Premium users subscribed to the channel/supergroup, related to the total number of subscribers.","boost_url":"Boost deep link » that can be used to boost the chat.","prepaid_giveaways":"A list of prepaid giveaways available for the chat; only returned to channel/supergroup admins.","my_boost_slots":"Indicates which of our boost slots we've assigned to this peer (populated if my_boost is set)."}},"premium.boostsList":{"comment":"List of boosts that were applied to a peer by multiple users.","arguments":{"flags":"Flags, see TL conditional fields","count":"Total number of results","boosts":"Boosts","next_offset":"Offset that can be used for pagination.","users":"Mentioned users"}},"premium.myBoosts":{"comment":"A list of peers we are currently boosting, and how many boost slots we have left.","arguments":{"my_boosts":"Info about boosted peers and remaining boost slots.","chats":"Referenced chats","users":"Referenced users"}},"myBoost":{"comment":"Contains information about a single boost slot ».","arguments":{"flags":"Flags, see TL conditional fields","slot":"Boost slot ID »","peer":"If set, indicates this slot is currently occupied, i.e. we are boosting this peer.
    Note that we can assign multiple boost slots to the same peer.","date":"When (unixtime) we started boosting the peer, 0 otherwise.","expires":"Indicates the (unixtime) expiration date of the boost in peer (0 if peer is not set).","cooldown_until_date":"If peer is set, indicates the (unixtime) date after which this boost can be reassigned to another channel."}},"stats.storyStats":{"comment":"Contains statistics about a story.","arguments":{"views_graph":"A graph containing the number of story views and shares","reactions_by_emotion_graph":"A bar graph containing the number of story reactions categorized by \"emotion\" (i.e. Positive, Negative, Other, etc...)"}},"publicForwardMessage":{"comment":"Contains info about a forward of a story as a message.","arguments":{"message":"Info about the message with the reposted story."}},"postInteractionCountersMessage":{"comment":"Interaction counters for a message.","arguments":{"msg_id":"Message ID","views":"Number of views","forwards":"Number of forwards to public channels","reactions":"Number of reactions"}},"publicForwardStory":{"comment":"Contains info about a forward of a story as a repost by a public channel.","arguments":{"peer":"The channel that reposted the story.","story":"The reposted story (may be different from the original story)."}},"help.peerColorSet":{"comment":"Represents a color palette that can be used in message accents ».","arguments":{"colors":"A list of 1-3 colors in RGB format, describing the accent color."}},"help.peerColorProfileSet":{"comment":"Represents a color palette that can be used in profile pages ».","arguments":{"palette_colors":"A list of 1-2 colors in RGB format, shown in the color palette settings to describe the current palette.","bg_colors":"A list of 1-2 colors in RGB format describing the colors used to generate the actual background used in the profile page.","story_colors":"A list of 2 colors in RGB format describing the colors of the gradient used for the unread active story indicator around the profile photo."}},"stats.publicForwards":{"comment":"Contains info about the forwards of a story as a message to public chats and reposts by public channels.","arguments":{"flags":"Flags, see TL conditional fields","count":"Total number of results","forwards":"Info about the forwards of a story.","next_offset":"Offset used for pagination.","chats":"Mentioned chats","users":"Mentioned users"}},"help.peerColorOption":{"comment":"Contains info about a color palette ».","arguments":{"flags":"Flags, see TL conditional fields","hidden":"Whether this palette should not be displayed as an option to the user when choosing a palette to apply to profile pages or message accents.","color_id":"Palette ID.","colors":"Light mode palette.
    Will be empty for IDs 0 to 6 inclusive, in which case a palette containing a single color from the following colors should be used: red, orange, violet, green, cyan, blue, pink for indexes 0 to 6 (i.e. the same colors used for randomized fallback message accent colors).","dark_colors":"Dark mode palette. Optional, defaults to the palette in colors (or the autogenerated palette for IDs 0 to 6) if absent.","channel_min_level":"Channels can use this palette only after reaching at least the boost level specified in this field.","group_min_level":"Supergroups can use this palette only after reaching at least the boost level specified in this field."}},"peerColor":{"comment":"Represents a color palette ».","arguments":{"flags":"Flags, see TL conditional fields","color":"Color palette ID, see here » for more info; if not set, the default palette should be used.","background_emoji_id":"Optional custom emoji ID used to generate the pattern."}},"help.peerColorsNotModified":{"comment":"The list of color palettes has not changed.","arguments":{"gigagroup":"Is this a broadcast group?"}},"help.peerColors":{"comment":"Contains info about multiple color palettes ».","arguments":{"hash":"Hash used for caching, for more info click here","colors":"Usable color palettes."}},"storyReaction":{"comment":"How a certain peer reacted to a story","arguments":{"peer_id":"The peer","date":"Reaction date","reaction":"The reaction"}},"stories.storyReactionsList":{"comment":"List of peers that reacted to or intercated with a specific story","arguments":{"flags":"Flags, see TL conditional fields","count":"Total number of reactions matching query","reactions":"List of peers that reacted to or interacted with a specific story","chats":"Mentioned chats","users":"Mentioned users","next_offset":"If set, indicates the next offset to use to load more results by invoking {@link stories.RawGetStoryReactionsListRequest}."}},"storyReactionPublicRepost":{"comment":"A certain peer has reposted the story.","arguments":{"peer_id":"The peer that reposted the story.","story":"The reposted story."}},"savedDialog":{"comment":"Represents a saved dialog ».","arguments":{"flags":"Flags, see TL conditional fields","pinned":"Is the dialog pinned","peer":"The dialog","top_message":"The latest message ID"}},"messages.savedDialogs":{"comment":"Represents some saved message dialogs ».","arguments":{"dialogs":"Saved message dialogs ».","messages":"List of last messages from each saved dialog","chats":"Mentioned chats","users":"Mentioned users"}},"storyReactionPublicForward":{"comment":"A certain peer has forwarded the story as a message to a public chat or channel.","arguments":{"message":"The message with the forwarded story."}},"messages.savedDialogsSlice":{"comment":"Incomplete list of saved message dialogs » with messages and auxiliary data.","arguments":{"count":"Total number of saved message dialogs","dialogs":"List of saved message dialogs","messages":"List of last messages from dialogs","chats":"Mentioned chats","users":"Mentioned users"}},"postInteractionCountersStory":{"comment":"Interaction counters for a story.","arguments":{"story_id":"Story ID","views":"Number of views","forwards":"Number of forwards and reposts to public chats and channels","reactions":"Number of reactions"}},"messages.savedDialogsNotModified":{"comment":"The saved dialogs haven't changed","arguments":{"count":"Number of saved dialogs found server-side by the query"}},"messages.savedReactionTagsNotModified":{"comment":"The list of reaction tag » names assigned by the user hasn't changed.","arguments":{"gigagroup":"Is this a broadcast group?"}},"savedReactionTag":{"comment":"Info about a saved message reaction tag ».","arguments":{"flags":"Flags, see TL conditional fields","reaction":"Reaction associated to the tag.","title":"Custom tag name assigned by the user (max 12 UTF-8 chars).","count":"Number of messages tagged with this tag."}},"messages.savedReactionTags":{"comment":"List of reaction tag » names assigned by the user.","arguments":{"tags":"Saved reaction tags.","hash":"Hash used for caching, for more info click here"}},"outboxReadDate":{"comment":"Exact read date of a private message we sent to another user.","arguments":{"date":"UNIX timestamp with the read date."}},"smsjobs.eligibleToJoin":{"comment":"SMS jobs eligibility","arguments":{"terms_url":"Terms of service URL","monthly_sent_sms":"Monthly sent SMSes"}},"smsJob":{"comment":"Info about an SMS job.","arguments":{"job_id":"Job ID","phone_number":"Destination phone number","text":"Text"}},"businessWeeklyOpen":{"comment":"A time interval, indicating the opening hours of a business.\n\nNote that opening hours specified by the user must be appropriately validated and transformed before uploading them to the server, as specified here ».","arguments":{"start_minute":"Start minute in minutes of the week, 0 to 7*24*60 inclusively.","end_minute":"End minute in minutes of the week, 1 to 8*24*60 inclusively (8 and not 7 because this allows to specify intervals that, for example, start on Sunday 21:00 and end on Monday 04:00 (6*24*60+21*60 to 7*24*60+4*60) without passing an invalid end_minute < start_minute). See here » for more info."}},"smsjobs.status":{"comment":"Status","arguments":{"flags":"Flags, see TL conditional fields","allow_international":"Allow international numbers","recent_sent":"Recently sent","recent_since":"Since","recent_remains":"Remaining","total_sent":"Total sent","total_since":"Total since","last_gift_slug":"Last gift deep link","terms_url":"Terms of service URL"}},"businessWorkHours":{"comment":"Specifies a set of Telegram Business opening hours.","arguments":{"flags":"Flags, see TL conditional fields","open_now":"Ignored if set while invoking {@link account.RawUpdateBusinessWorkHoursRequest}, only returned by the server in {@link RawUserFull}.business_work_hours, indicating whether the business is currently open according to the current time and the values in weekly_open and timezone.","timezone_id":"An ID of one of the timezones returned by {@link help.RawGetTimezonesListRequest}.
    The timezone ID is contained {@link RawTimezone}.id, a human-readable, localized name of the timezone is available in {@link RawTimezone}.name and the {@link RawTimezone}.utc_offset field contains the UTC offset in seconds, which may be displayed in hh:mm format by the client together with the human-readable name (i.e. $name UTC -01:00).","weekly_open":"A list of time intervals (max 28) represented by {@link RawBusinessWeeklyOpen}, indicating the opening hours of their business."}},"businessRecipients":{"comment":"Specifies the chats that can receive Telegram Business away » and greeting » messages.\n\nIf exclude_selected is set, specifies all chats that cannot receive Telegram Business away » and greeting » messages.","arguments":{"flags":"Flags, see TL conditional fields","existing_chats":"All existing private chats.","new_chats":"All new private chats.","contacts":"All private chats with contacts.","non_contacts":"All private chats with non-contacts.","exclude_selected":"If set, inverts the selection.","users":"Only private chats with the specified users."}},"inputBusinessRecipients":{"comment":"Specifies the chats that can receive Telegram Business away » and greeting » messages.\n\nIf exclude_selected is set, specifies all chats that cannot receive Telegram Business away » and greeting » messages.","arguments":{"flags":"Flags, see TL conditional fields","existing_chats":"All existing private chats.","new_chats":"All new private chats.","contacts":"All private chats with contacts.","non_contacts":"All private chats with non-contacts.","exclude_selected":"If set, inverts the selection.","users":"Only private chats with the specified users."}},"businessAwayMessageScheduleAlways":{"comment":"Always send Telegram Business away messages to users writing to us in private.","arguments":{"gigagroup":"Is this a broadcast group?"}},"businessAwayMessageScheduleOutsideWorkHours":{"comment":"Send Telegram Business away messages to users writing to us in private outside of the configured Telegram Business working hours.","arguments":{"gigagroup":"Is this a broadcast group?"}},"businessLocation":{"comment":"Represents the location of a Telegram Business ».","arguments":{"flags":"Flags, see TL conditional fields","geo_point":"Geographical coordinates (optional).","address":"Textual description of the address (mandatory)."}},"businessAwayMessageScheduleCustom":{"comment":"Send Telegram Business away messages to users writing to us in private in the specified time span.","arguments":{"start_date":"Start date (UNIX timestamp).","end_date":"End date (UNIX timestamp)."}},"inputBusinessGreetingMessage":{"comment":"Describes a Telegram Business greeting, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period.","arguments":{"shortcut_id":"ID of a quick reply shorcut, containing the greeting messages to send, see here » for more info.","recipients":"Allowed recipients for the greeting messages.","no_activity_days":"The number of days after which a private chat will be considered as inactive; currently, must be one of 7, 14, 21, or 28."}},"inputBusinessAwayMessage":{"comment":"Describes a Telegram Business away message, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user.","arguments":{"flags":"Flags, see TL conditional fields","offline_only":"If set, the messages will not be sent if the account was online in the last 10 minutes.","shortcut_id":"ID of a quick reply shorcut, containing the away messages to send, see here » for more info.","schedule":"Specifies when should the away messages be sent.","recipients":"Allowed recipients for the away messages."}},"businessGreetingMessage":{"comment":"Describes a Telegram Business greeting, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period.","arguments":{"shortcut_id":"ID of a quick reply shorcut, containing the greeting messages to send, see here » for more info.","recipients":"Allowed recipients for the greeting messages.","no_activity_days":"The number of days after which a private chat will be considered as inactive; currently, must be one of 7, 14, 21, or 28."}},"businessAwayMessage":{"comment":"Describes a Telegram Business away message, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user.","arguments":{"flags":"Flags, see TL conditional fields","offline_only":"If set, the messages will not be sent if the account was online in the last 10 minutes.","shortcut_id":"ID of a quick reply shorcut, containing the away messages to send, see here » for more info.","schedule":"Specifies when should the away messages be sent.","recipients":"Allowed recipients for the away messages."}},"timezone":{"comment":"Timezone information.","arguments":{"id":"Unique timezone ID.","name":"Human-readable and localized timezone name.","utc_offset":"UTC offset in seconds, which may be displayed in hh:mm format by the client together with the human-readable name (i.e. $name UTC -01:00)."}},"help.timezonesList":{"comment":"Timezone information that may be used elsewhere in the API, such as to set Telegram Business opening hours ».","arguments":{"timezones":"Timezones","hash":"Hash used for caching, for more info click here"}},"inputQuickReplyShortcut":{"comment":"Selects a quick reply shortcut by name.","arguments":{"shortcut":"Shortcut name."}},"quickReply":{"comment":"A quick reply shortcut.","arguments":{"shortcut_id":"Unique shortcut ID.","shortcut":"Shortcut name.","top_message":"ID of the last message in the shortcut.","count":"Total number of messages in the shortcut."}},"connectedBot":{"comment":"Contains info about a connected business bot ».","arguments":{"flags":"Flags, see TL conditional fields","can_reply":"Whether the the bot can reply to messages it receives through the connection","bot_id":"ID of the connected bot","recipients":"Specifies the private chats that a connected business bot » may receive messages and interact with.
    "}},"messages.dialogFilters":{"comment":"Folder and folder tags information","arguments":{"flags":"Flags, see TL conditional fields","tags_enabled":"Whether folder tags are enabled.","filters":"Folders."}},"messages.quickReplies":{"comment":"Info about quick reply shortcuts ».","arguments":{"quick_replies":"Quick reply shortcuts.","messages":"Messages mentioned in quick_replies.","chats":"Mentioned chats","users":"Mentioned users"}},"account.connectedBots":{"comment":"Info about currently connected business bots.","arguments":{"connected_bots":"Info about the connected bots","users":"Bot information"}},"messages.quickRepliesNotModified":{"comment":"Info about quick reply shortcuts » hasn't changed.","arguments":{"gigagroup":"Is this a broadcast group?"}},"inputQuickReplyShortcutId":{"comment":"Selects a quick reply shortcut by its numeric ID.","arguments":{"shortcut_id":"Shortcut ID."}},"help.timezonesListNotModified":{"comment":"The timezone list has not changed.","arguments":{"gigagroup":"Is this a broadcast group?"}},"businessIntro":{"comment":"Telegram Business introduction ».","arguments":{"flags":"Flags, see TL conditional fields","title":"Title of the introduction message (max intro_title_length_limit » UTF-8 characters).","description":"Profile introduction (max intro_description_length_limit » UTF-8 characters).","sticker":"Optional introduction sticker."}},"inputCollectiblePhone":{"comment":"Represents a phone number fragment collectible","arguments":{"phone":"Phone number"}},"birthday":{"comment":"Birthday information for a user.\n\nAlso used to invite users to gift Telegram Premium subscriptions » to other users with birthdays within a +1/-1 day time range, related to the current day.","arguments":{"flags":"Flags, see TL conditional fields","day":"Birth day","month":"Birth month","year":"(Optional) birth year."}},"inputCollectibleUsername":{"comment":"Represents a username fragment collectible","arguments":{"username":"Username"}},"inputBusinessIntro":{"comment":"Telegram Business introduction ».","arguments":{"flags":"Flags, see TL conditional fields","title":"Title of the introduction message","description":"Profile introduction","sticker":"Optional introduction sticker."}},"botBusinessConnection":{"comment":"Contains info about a bot business connection.","arguments":{"flags":"Flags, see TL conditional fields","can_reply":"Whether the bot can reply on behalf of the user to messages it receives through the business connection","disabled":"Whether this business connection is currently disabled","connection_id":"Business connection ID, used to identify messages coming from the connection and to reply to them as specified here ».","user_id":"ID of the user that the bot is connected to via this connection.","dc_id":"ID of the datacenter where to send queries wrapped in a {@link RawInvokeWithBusinessConnectionRequest} as specified here ».","date":"When was the connection created."}},"messages.myStickers":{"comment":"The list of stickersets owned by the current account ».","arguments":{"count":"Total number of owned stickersets.","sets":"Stickersets"}},"fragment.collectibleInfo":{"comment":"Info about a fragment collectible.","arguments":{"purchase_date":"Purchase date (unixtime)","currency":"Three-letter ISO 4217 currency code for amount","amount":"Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).","crypto_currency":"Cryptocurrency name.","crypto_amount":"Price, in the smallest units of the cryptocurrency.","url":"Fragment URL with more info about the collectible"}},"inputBusinessBotRecipients":{"comment":"Specifies the private chats that a connected business bot » may interact with.","arguments":{"flags":"Flags, see TL conditional fields","existing_chats":"Selects all existing private chats.","new_chats":"Selects all new private chats.","contacts":"Selects all private chats with contacts.","non_contacts":"Selects all private chats with non-contacts.","exclude_selected":"If set, then all private chats except the ones selected by existing_chats, new_chats, contacts, non_contacts and users are chosen.
    Note that if this flag is set, any values passed in exclude_users will be merged and moved into users by the server.","users":"Explicitly selected private chats.","exclude_users":"Identifiers of private chats that are always excluded."}},"contactBirthday":{"comment":"Birthday information of a contact.","arguments":{"contact_id":"User ID.","birthday":"Birthday information."}},"businessBotRecipients":{"comment":"Specifies the private chats that a connected business bot » may receive messages and interact with.","arguments":{"flags":"Flags, see TL conditional fields","existing_chats":"Selects all existing private chats.","new_chats":"Selects all new private chats.","contacts":"Selects all private chats with contacts.","non_contacts":"Selects all private chats with non-contacts.","exclude_selected":"If set, then all private chats except the ones selected by existing_chats, new_chats, contacts, non_contacts and users are chosen.
    Note that if this flag is set, any values passed in exclude_users will be merged and moved into users by the server, thus exclude_users will always be empty.","users":"Explicitly selected private chats.","exclude_users":"Identifiers of private chats that are always excluded."}},"businessChatLink":{"comment":"Contains info about a business chat deep link » created by the current account.","arguments":{"flags":"Flags, see TL conditional fields","link":"Business chat deep link.","message":"Message to pre-fill in the message input field.","entities":"Message entities for styled text","title":"Human-readable name of the link, to simplify management in the UI (only visible to the creator of the link).","views":"Number of times the link was resolved (clicked/scanned/etc...)."}},"account.businessChatLinks":{"comment":"Contains info about business chat deep links » created by the current account.","arguments":{"links":"Links","chats":"Mentioned chats","users":"Mentioned users"}},"inputBusinessChatLink":{"comment":"Contains info about a business chat deep link » to be created by the current account.","arguments":{"flags":"Flags, see TL conditional fields","message":"Message to pre-fill in the message input field.","entities":"Message entities for styled text","title":"Human-readable name of the link, to simplify management in the UI (only visible to the creator of the link)."}},"messages.invitedUsers":{"comment":"Contains info about successfully or unsuccessfully invited » users.","arguments":{"updates":"List of updates about successfully invited users (and eventually info about the created group)","missing_invitees":"A list of users that could not be invited, along with the reason why they couldn't be invited."}},"missingInvitee":{"comment":"Info about why a specific user could not be invited ».","arguments":{"flags":"Flags, see TL conditional fields","premium_would_allow_invite":"If set, we could not add the user only because the current account needs to purchase a Telegram Premium subscription to complete the operation.","premium_required_for_pm":"If set, we could not add the user because of their privacy settings, and additionally, the current account needs to purchase a Telegram Premium subscription to directly share an invite link with the user via a private message.","user_id":"ID of the user. If neither of the flags below are set, we could not add the user because of their privacy settings, and we can create and directly share an invite link with them using a normal message, instead."}},"contacts.contactBirthdays":{"comment":"Birthday information of our contacts.","arguments":{"contacts":"Birthday info","users":"User information"}},"requestedPeerUser":{"comment":"Info about a user, shared by a user with the currently logged in bot using {@link messages.RawSendBotRequestedPeerRequest}.\n\nAll fields except the ID are optional, and will be populated if present on the chosen user, according to the parameters of the requesting {@link RawInputKeyboardButtonRequestPeer}.","arguments":{"flags":"Flags, see TL conditional fields","user_id":"User ID.","first_name":"First name.","last_name":"Last name.","username":"Username.","photo":"Profile photo."}},"account.resolvedBusinessChatLinks":{"comment":"Contains info about a single resolved business chat deep link ».","arguments":{"flags":"Flags, see TL conditional fields","peer":"Destination peer","message":"Message to pre-fill in the message input field.","entities":"Message entities for styled text","chats":"Mentioned chats","users":"Mentioned users"}},"requestedPeerChat":{"comment":"Info about a chat, shared by a user with the currently logged in bot using {@link messages.RawSendBotRequestedPeerRequest}.\n\nAll fields except the ID are optional, and will be populated if present on the chosen chat, according to the parameters of the requesting {@link RawInputKeyboardButtonRequestPeer}.","arguments":{"flags":"Flags, see TL conditional fields","chat_id":"Chat ID.","title":"Chat title.","photo":"Chat photo."}},"sponsoredMessageReportOption":{"comment":"A report option for a sponsored message ».","arguments":{"text":"Localized description of the option.","option":"Option identifier to pass to {@link channels.RawReportSponsoredMessageRequest}."}},"requestedPeerChannel":{"comment":"Info about a channel/supergroup, shared by a user with the currently logged in bot using {@link messages.RawSendBotRequestedPeerRequest}.\n\nAll fields except the ID are optional, and will be populated if present on the chosen channel/supergroup, according to the parameters of the requesting {@link RawInputKeyboardButtonRequestPeer}.","arguments":{"flags":"Flags, see TL conditional fields","channel_id":"Channel/supergroup ID.","title":"Channel/supergroup title.","username":"Channel/supergroup username.","photo":"Channel/supergroup photo."}},"channels.sponsoredMessageReportResultChooseOption":{"comment":"The user must choose a report option from the localized options available in options, and after selection, {@link channels.RawReportSponsoredMessageRequest} must be invoked again, passing the option's option field to the option param of the method.","arguments":{"title":"Title of the option selection popup.","options":"Localized list of options."}},"channels.sponsoredMessageReportResultAdsHidden":{"comment":"Sponsored messages were hidden for the user in all chats.","arguments":{"gigagroup":"Is this a broadcast group?"}},"channels.sponsoredMessageReportResultReported":{"comment":"The sponsored message was reported successfully.","arguments":{"gigagroup":"Is this a broadcast group?"}},"stats.broadcastRevenueStats":{"comment":"Channel revenue ad statistics, see here » for more info.\n\nNote that all balances and currency amounts and graph values are in the smallest unit of the chosen cryptocurrency (currently nanotons for TONs, so to obtain a value in USD divide the chosen amount by 10^9, and then divide by usd_rate).","arguments":{"top_hours_graph":"Ad impressions graph","revenue_graph":"Ad revenue graph (in the smallest unit of the cryptocurrency in which revenue is calculated)","balances":"Current balance, current withdrawable balance and overall revenue","usd_rate":"Current conversion rate of the cryptocurrency (not in the smallest unit) in which revenue is calculated to USD"}},"broadcastRevenueTransactionRefund":{"comment":"Describes a refund for failed withdrawal of ad earnings »","arguments":{"amount":"Amount refunded.","date":"Date of refund.","provider":"Payment provider name."}},"broadcastRevenueTransactionProceeds":{"comment":"Describes earnings from sponsored messages in a channel in some time frame, see here » for more info.","arguments":{"amount":"Amount in the smallest unit of the cryptocurrency.","from_date":"Start unixtime for the timeframe.","to_date":"End unixtime for the timeframe."}},"broadcastRevenueTransactionWithdrawal":{"comment":"Describes a withdrawal of ad earnings »","arguments":{"flags":"Flags, see TL conditional fields","pending":"Whether the withdrawal is currently pending","failed":"Whether the withdrawal has failed","amount":"Amount withdrawn","date":"Withdrawal date","provider":"Payment provider name","transaction_date":"If neither pending nor failed are set, the transaction was completed successfully, and this field will contain the point in time (UNIX timestamp in seconds) when the withdrawal was completed successfully.","transaction_url":"If neither pending nor failed are set, the transaction was completed successfully, and this field will contain a URL where the withdrawal transaction can be viewed."}},"stats.broadcastRevenueWithdrawalUrl":{"comment":"Contains the URL to use to withdraw channel ad revenue.","arguments":{"url":"A unique URL to a Fragment page where the user will be able to specify and submit the address of the TON wallet where the funds will be sent."}},"stats.broadcastRevenueTransactions":{"comment":"Channel ad revenue transactions ».","arguments":{"count":"Total number of transactions.","transactions":"Transactions"}},"reactionNotificationsFromContacts":{"comment":"Receive notifications about reactions made only by our contacts.","arguments":{"gigagroup":"Is this a broadcast group?"}},"reactionsNotifySettings":{"comment":"Reaction notification settings, see here » for more info.","arguments":{"flags":"Flags, see TL conditional fields","messages_notify_from":"Message reaction notification settings, if not set completely disables notifications/updates about message reactions.","stories_notify_from":"Story reaction notification settings, if not set completely disables notifications/updates about reactions to stories.","sound":"Notification sound for reactions »","show_previews":"If false, push notifications » about message/story reactions will only be of type REACT_HIDDEN/REACT_STORY_HIDDEN, without any information about the reacted-to story or the reaction itself."}},"messages.availableEffects":{"comment":"The full list of usable animated message effects ».","arguments":{"hash":"Hash used for caching, for more info click here","effects":"Message effects","documents":"Documents specified in the effects constructors."}},"reactionNotificationsFromAll":{"comment":"Receive notifications about reactions made by any user.","arguments":{"gigagroup":"Is this a broadcast group?"}},"broadcastRevenueBalances":{"comment":"Describes channel ad revenue balances ».\n\nNote that all balances are in the smallest unit of the chosen cryptocurrency (currently nanotons for TONs, so to obtain a value in USD divide the chosen amount by 10^9, and then divide by usd_rate).","arguments":{"current_balance":"Amount of not-yet-withdrawn cryptocurrency.","available_balance":"Amount of withdrawable cryptocurrency, out of the currently available balance (available_balance <= current_balance).","overall_revenue":"Total amount of earned cryptocurrency."}},"factCheck":{"comment":"Represents a fact-check » created by an independent fact-checker.","arguments":{"flags":"Flags, see TL conditional fields","need_check":"If set, the country/text fields will not be set, and the fact check must be fetched manually by the client (if it isn't already cached with the key specified in hash) using bundled {@link messages.RawGetFactCheckRequest} requests, when the message with the factcheck scrolls into view.","country":"A two-letter ISO 3166-1 alpha-2 country code of the country for which the fact-check should be shown.","text":"The fact-check.","hash":"Hash used for caching, for more info click here"}},"messages.availableEffectsNotModified":{"comment":"The full list of usable animated message effects » hasn't changed.","arguments":{"gigagroup":"Is this a broadcast group?"}},"availableEffect":{"comment":"Represents a message effect ».\n\nAll long IDs except for id are {@link RawDocument}.ids from the containing {@link messages.RawAvailableEffects} constructor.\n\nSee here » for more info on how to use following fields.","arguments":{"flags":"Flags, see TL conditional fields","premium_required":"Whether a Premium subscription is required to use this effect.","id":"Unique effect ID.","emoticon":"Emoji corresponding to the effect, to be used as icon for the effect if static_icon_id is not set.","static_icon_id":"ID of the document containing the static icon (WEBP) of the effect.","effect_sticker_id":"Contains the preview animation (TGS format »), used for the effect selection menu.","effect_animation_id":"If set, contains the actual animated effect (TGS format »). If not set, the animated effect must be set equal to the premium animated sticker effect associated to the animated sticker specified in effect_sticker_id (always different from the preview animation, fetched thanks to the {@link RawVideoSize} of type f as specified here »)."}},"starsTransactionPeerUnsupported":{"comment":"Describes a Telegram Star transaction that cannot be described using the current layer.","arguments":{"gigagroup":"Is this a broadcast group?"}},"starsTransactionPeerAppStore":{"comment":"Describes a Telegram Star transaction with the App Store, used when purchasing Telegram Stars through the App Store.","arguments":{"gigagroup":"Is this a broadcast group?"}},"starsTransactionPeerPlayMarket":{"comment":"Describes a Telegram Star transaction with the Play Store, used when purchasing Telegram Stars through the Play Store.","arguments":{"gigagroup":"Is this a broadcast group?"}},"starsTransactionPeer":{"comment":"Describes a Telegram Star transaction with another peer.","arguments":{"peer":"The peer."}},"starsTransactionPeerPremiumBot":{"comment":"Describes a Telegram Star transaction made using @PremiumBot (i.e. using the {@link RawInputInvoiceStars} flow described here »).","arguments":{"gigagroup":"Is this a broadcast group?"}},"starsTransactionPeerAds":{"comment":"Describes a Telegram Star transaction used to pay for Telegram ads as specified here ».","arguments":{"gigagroup":"Is this a broadcast group?"}},"foundStory":{"comment":"A story found using global story search ».","arguments":{"peer":"The peer that posted the story.","story":"The story."}},"starsTopupOption":{"comment":"Telegram Stars topup option.","arguments":{"flags":"Flags, see TL conditional fields","extended":"If set, the option must only be shown in the full list of topup options.","stars":"Amount of Telegram stars.","store_product":"Identifier of the store product associated with the option, official apps only.","currency":"Three-letter ISO 4217 currency code","amount":"Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."}},"starsTransactionPeerFragment":{"comment":"Describes a Telegram Star transaction with Fragment, used when purchasing Telegram Stars through Fragment.","arguments":{"gigagroup":"Is this a broadcast group?"}},"geoPointAddress":{"comment":"Address optionally associated to a {@link RawGeoPoint}.","arguments":{"flags":"Flags, see TL conditional fields","country_iso2":"Two-letter ISO 3166-1 alpha-2 country code","state":"State","city":"City","street":"Street"}},"stories.foundStories":{"comment":"Stories found using global story search ».","arguments":{"flags":"Flags, see TL conditional fields","count":"Total number of results found for the query.","stories":"Matching stories.","next_offset":"Offset used to fetch the next page, if not set this is the final page.","chats":"Mentioned chats","users":"Mentioned users"}},"starsRevenueStatus":{"comment":"Describes Telegram Star revenue balances ».","arguments":{"flags":"Flags, see TL conditional fields","withdrawal_enabled":"If set, the user may withdraw up to available_balance stars.","current_balance":"Amount of not-yet-withdrawn Telegram Stars.","available_balance":"Amount of withdrawable Telegram Stars.","overall_revenue":"Total amount of earned Telegram Stars.","next_withdrawal_at":"Unixtime indicating when will withdrawal be available to the user. If not set, withdrawal can be started now."}},"starsTransaction":{"comment":"Represents a Telegram Stars transaction ».","arguments":{"flags":"Flags, see TL conditional fields","refund":"Whether this transaction is a refund.","pending":"The transaction is currently pending.","failed":"This transaction has failed.","gift":"This transaction was a gift from the user in peer.peer.","id":"Transaction ID.","stars":"Amount of Stars (negative for outgoing transactions).","date":"Date of the transaction (unixtime).","peer":"Source of the incoming transaction, or its recipient for outgoing transactions.","title":"For transactions with bots, title of the bought product.","description":"For transactions with bots, description of the bought product.","photo":"For transactions with bots, photo of the bought product.","transaction_date":"If neither pending nor failed are set, the transaction was completed successfully, and this field will contain the point in time (UNIX timestamp in seconds) when the withdrawal was completed successfully.","transaction_url":"If neither pending nor failed are set, the transaction was completed successfully, and this field will contain a URL where the withdrawal transaction can be viewed.","bot_payload":"Bot specified invoice payload (i.e. the payload passed to {@link RawInputMediaInvoice} when creating the invoice).","msg_id":"For paid media transactions », message ID of the paid media posted to peer.peer (can point to a deleted message; either way, extended_media will always contain the bought media).","extended_media":"The purchased paid media »."}},"payments.starsRevenueAdsAccountUrl":{"comment":"Contains a URL leading to a page where the user will be able to place ads for the channel/bot, paying using Telegram Stars.","arguments":{"url":"URL to open."}},"payments.starsStatus":{"comment":"Info about the current Telegram Star balance and transaction history ».","arguments":{"flags":"Flags, see TL conditional fields","balance":"Current Telegram Star balance.","history":"List of Telegram Star transactions (partial if next_offset is set).","next_offset":"Offset to use to fetch more transactions from the transaction history using {@link payments.RawGetStarsTransactionsRequest}.","chats":"Chats mentioned in history.","users":"Users mentioned in history."}},"payments.starsRevenueStats":{"comment":"Star revenue statistics, see here » for more info.\n\nNote that all balances and currency amounts and graph values are in Stars.","arguments":{"revenue_graph":"Star revenue graph (number of earned stars)","status":"Current balance, current withdrawable balance and overall earned Telegram Stars","usd_rate":"Current conversion rate of Telegram Stars to USD"}},"payments.starsRevenueWithdrawalUrl":{"comment":"Contains the URL to use to withdraw Telegram Star revenue.","arguments":{"url":"Contains the URL to use to withdraw Telegram Star revenue."}},"inputStarsTransaction":{"comment":"Used to fetch info about a Telegram Star transaction ».","arguments":{"flags":"Flags, see TL conditional fields","refund":"If set, fetches info about the refund transaction for this transaction.","id":"Transaction ID."}},"starsGiftOption":{"comment":"Telegram Stars gift option.","arguments":{"flags":"Flags, see TL conditional fields","extended":"If set, the option must only be shown in the full list of topup options.","stars":"Amount of Telegram stars.","store_product":"Identifier of the store product associated with the option, official apps only.","currency":"Three-letter ISO 4217 currency code","amount":"Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."}},"botPreviewMedia":{"comment":"Represents a Main Mini App preview media, see here » for more info.","arguments":{"date":"When was this media last updated.","media":"The actual photo/video."}},"bots.popularAppBots":{"comment":"Popular Main Mini Apps, to be used in the apps tab of global search ».","arguments":{"flags":"Flags, see TL conditional fields","next_offset":"Offset for pagination.","users":"The bots associated to each Main Mini App, see here » for more info."}},"updateGroupInvitePrivacyForbidden":{"comment":"0-N updates of this type may be returned only when invoking {@link messages.RawAddChatUserRequest}, {@link channels.RawInviteToChannelRequest} or {@link messages.RawCreateChatRequest}: it indicates we couldn't add a user to a chat because of their privacy settings; if required, an invite link can be shared with the user, instead.","arguments":{"user_id":"ID of the user we couldn't add."}},"bots.previewInfo":{"comment":"Contains info about Main Mini App previews, see here » for more info.","arguments":{"media":"All preview medias for the language code passed to {@link bots.RawGetPreviewInfoRequest}.","lang_codes":"All available language codes for which preview medias were uploaded (regardless of the language code passed to {@link bots.RawGetPreviewInfoRequest})."}},"appWebViewResultUrl":{"comment":"Contains the link that must be used to open a direct link Mini App.","arguments":{"url":"The URL to open"}},"simpleWebViewResultUrl":{"comment":"Contains the webview URL with appropriate theme parameters added","arguments":{"url":"URL"}},"inputStorePaymentStars":{"comment":"Used to top up the Telegram Stars balance using the Play Store/App Store flow (official apps only).","arguments":{"flags":"Flags, see TL conditional fields","stars":"Amount of stars to topup","currency":"Three-letter ISO 4217 currency code","amount":"Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."}},"sponsoredWebPage":{"comment":"Represents a sponsored website.","arguments":{"flags":"Flags, see TL conditional fields","url":"Web page URL.","site_name":"Website name.","photo":"Optional image preview."}}},"methods":{"invokeAfterMsgs":{"comment":"Invokes a query after a successful completion of previous queries","arguments":{"msg_ids":"List of messages on which a current query depends","query":"The query itself"},"available":"both"},"invokeAfterMsg":{"comment":"Invokes a query after successful completion of one of the previous queries.","arguments":{"msg_id":"Message identifier on which a current query depends","query":"The query itself"},"available":"both"},"invokeWithoutUpdates":{"comment":"Invoke a request without subscribing the used connection for updates (this is enabled by default for file queries).","arguments":{"query":"The query"},"available":"both"},"initConnection":{"comment":"Initialize connection","arguments":{"flags":"Flags, see TL conditional fields","api_id":"Application identifier (see. App configuration)","device_model":"Device model","system_version":"Operation system version","app_version":"Application version","system_lang_code":"Code for the language used on the device's OS, ISO 639-1 standard","lang_pack":"Platform identifier (i.e. android, tdesktop, etc).","lang_code":"Either an ISO 639-1 language code or a language pack name obtained from a language pack link.","proxy":"Info about an MTProto proxy","params":"Additional initConnection parameters.
    For now, only the tz_offset field is supported, for specifying the timezone offset in seconds.","query":"The query itself"},"throws":[{"code":400,"name":"CONNECTION_LAYER_INVALID","comment":"Layer invalid."}],"available":"both"},"invokeWithLayer":{"comment":"Invoke the specified query using the specified API layer","arguments":{"layer":"The layer to use","query":"The query"},"throws":[{"code":400,"name":"AUTH_BYTES_INVALID","comment":"The provided authorization is invalid."},{"code":400,"name":"CDN_METHOD_INVALID","comment":"You can't call this method in a CDN DC."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"CONNECTION_API_ID_INVALID","comment":"The provided API id is invalid."},{"code":406,"name":"INVITE_HASH_EXPIRED","comment":"The invite link has expired."}],"available":"both"},"invokeWithMessagesRange":{"comment":"Invoke with the given message range","arguments":{"range":"Message range","query":"Query"},"available":"both"},"invokeWithTakeout":{"comment":"Invoke a method within a takeout session, see here » for more info.","arguments":{"takeout_id":"Takeout session ID »","query":"Query"},"available":"both"},"invokeWithBusinessConnection":{"comment":"Invoke a method using a Telegram Business Bot connection, see here » for more info, including a list of the methods that can be wrapped in this constructor.\n\nMake sure to always send queries wrapped in a invokeWithBusinessConnection to the datacenter ID, specified in the dc_id field of the {@link RawBotBusinessConnection} that is being used.","arguments":{"connection_id":"Business connection ID.","query":"The actual query."},"available":"both"},"invokeWithGooglePlayIntegrity":{"comment":"Official clients only, invoke with Google Play Integrity token.","arguments":{"nonce":"Nonce.","token":"Token.","query":"Query."},"available":"both"},"invokeWithApnsSecret":{"comment":"Official clients only, invoke with Apple push verification.","arguments":{"nonce":"Nonce.","secret":"Secret.","query":"Query."},"available":"both"},"auth.signUp":{"comment":"Registers a validated phone number in the system.","arguments":{"flags":"Flags, see TL conditional fields","no_joined_notifications":"If set, users on Telegram that have already added phone_number to their contacts will not receive signup notifications about this user.","phone_number":"Phone number in the international format","phone_code_hash":"SMS-message ID","first_name":"New user first name","last_name":"New user last name"},"throws":[{"code":400,"name":"FIRSTNAME_INVALID","comment":"The first name is invalid."},{"code":400,"name":"LASTNAME_INVALID","comment":"The last name is invalid."},{"code":400,"name":"PHONE_CODE_EMPTY","comment":"phone_code is missing."},{"code":400,"name":"PHONE_CODE_EXPIRED","comment":"The phone code you provided has expired."},{"code":400,"name":"PHONE_CODE_INVALID","comment":"The provided phone code is invalid."},{"code":400,"name":"PHONE_NUMBER_FLOOD","comment":"You asked for the code too many times."},{"code":406,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."},{"code":400,"name":"PHONE_NUMBER_OCCUPIED","comment":"The phone number is already in use."}],"available":"user"},"auth.logOut":{"comment":"Logs out the user.","available":"both","arguments":{"gigagroup":"Is this a broadcast group?"}},"auth.signIn":{"comment":"Signs in a user with a validated phone number.","arguments":{"flags":"Flags, see TL conditional fields","phone_number":"Phone number in the international format","phone_code_hash":"SMS-message ID, obtained from {@link auth.RawSendCodeRequest}","phone_code":"Valid numerical code from the SMS-message","email_verification":"Email verification code or token"},"throws":[{"code":500,"name":"AUTH_RESTART","comment":"Restart the authorization process."},{"code":400,"name":"PHONE_CODE_EMPTY","comment":"phone_code is missing."},{"code":400,"name":"PHONE_CODE_EXPIRED","comment":"The phone code you provided has expired."},{"code":400,"name":"PHONE_CODE_INVALID","comment":"The provided phone code is invalid."},{"code":406,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."},{"code":400,"name":"PHONE_NUMBER_UNOCCUPIED","comment":"The phone number is not yet being used."},{"code":500,"name":"SIGN_IN_FAILED","comment":"Failure while signing in."},{"code":406,"name":"UPDATE_APP_TO_LOGIN","comment":"Please update to the latest version of MadelineProto to login."}],"available":"user"},"auth.resetAuthorizations":{"comment":"Terminates all user's authorized sessions except for the current one.\n\nAfter calling this method it is necessary to reregister the current device using the method {@link account.RawRegisterDeviceRequest}","throws":[{"code":406,"name":"FRESH_RESET_AUTHORISATION_FORBIDDEN","comment":"You can't logout other sessions if less than 24 hours have passed since you logged on the current session."}],"available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"auth.exportAuthorization":{"comment":"Returns data for copying authorization to another data-center.","arguments":{"dc_id":"Number of a target data-center"},"throws":[{"code":400,"name":"DC_ID_INVALID","comment":"The provided DC ID is invalid."}],"available":"both"},"auth.bindTempAuthKey":{"comment":"Binds a temporary authorization key temp_auth_key_id to the permanent authorization key perm_auth_key_id. Each permanent key may only be bound to one temporary key at a time, binding a new temporary key overwrites the previous one.\n\nFor more information, see Perfect Forward Secrecy.","arguments":{"perm_auth_key_id":"Permanent auth_key_id to bind to","nonce":"Random long from Binding message contents","expires_at":"UNIX timestamp in seconds to invalidate temporary key, see Binding message contents","encrypted_message":"See Generating encrypted_message"},"throws":[{"code":400,"name":"ENCRYPTED_MESSAGE_INVALID","comment":"Encrypted message invalid."},{"code":400,"name":"TEMP_AUTH_KEY_ALREADY_BOUND","comment":"The passed temporary key is already bound to another perm_auth_key_id."},{"code":400,"name":"TEMP_AUTH_KEY_EMPTY","comment":"No temporary auth key provided."}],"available":"both"},"auth.importBotAuthorization":{"comment":"Login as a bot","arguments":{"flags":"Reserved for future use","api_id":"Application identifier (see. App configuration)","api_hash":"Application identifier hash (see. App configuration)","bot_auth_token":"Bot token (see bots)"},"throws":[{"code":400,"name":"ACCESS_TOKEN_EXPIRED","comment":"Access token expired."},{"code":400,"name":"ACCESS_TOKEN_INVALID","comment":"Access token invalid."},{"code":400,"name":"API_ID_INVALID","comment":"API ID invalid."},{"code":400,"name":"API_ID_PUBLISHED_FLOOD","comment":"This API id was published somewhere, you can't use it now."}],"available":"both"},"auth.requestPasswordRecovery":{"comment":"Request recovery code of a 2FA password, only for accounts with a recovery email configured.","throws":[{"code":400,"name":"PASSWORD_EMPTY","comment":"The provided password is empty."},{"code":400,"name":"PASSWORD_RECOVERY_NA","comment":"No email was set, can't recover password via email."}],"available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"auth.sendCode":{"comment":"Send the verification code for login","arguments":{"phone_number":"Phone number in international format","api_id":"Application identifier (see App configuration)","api_hash":"Application secret hash (see App configuration)","settings":"Settings for the code type to send"},"throws":[{"code":400,"name":"API_ID_INVALID","comment":"API ID invalid."},{"code":400,"name":"API_ID_PUBLISHED_FLOOD","comment":"This API id was published somewhere, you can't use it now."},{"code":500,"name":"AUTH_RESTART","comment":"Restart the authorization process."},{"code":400,"name":"PHONE_NUMBER_APP_SIGNUP_FORBIDDEN","comment":"You can't sign up using this app."},{"code":400,"name":"PHONE_NUMBER_BANNED","comment":"The provided phone number is banned from telegram."},{"code":400,"name":"PHONE_NUMBER_FLOOD","comment":"You asked for the code too many times."},{"code":406,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."},{"code":406,"name":"PHONE_PASSWORD_FLOOD","comment":"You have tried logging in too many times."},{"code":400,"name":"PHONE_PASSWORD_PROTECTED","comment":"This phone is password protected."},{"code":400,"name":"SMS_CODE_CREATE_FAILED","comment":"An error occurred while creating the SMS code."},{"code":406,"name":"UPDATE_APP_TO_LOGIN","comment":"Please update to the latest version of MadelineProto to login."}],"available":"user"},"auth.checkPassword":{"comment":"Try logging to an account protected by a 2FA password.","arguments":{"password":"The account's password (see SRP)"},"throws":[{"code":400,"name":"PASSWORD_HASH_INVALID","comment":"The provided password hash is invalid."},{"code":400,"name":"SRP_ID_INVALID","comment":"Invalid SRP ID provided."},{"code":400,"name":"SRP_PASSWORD_CHANGED","comment":"Password has changed."}],"available":"user"},"auth.resendCode":{"comment":"Resend the login code via another medium, the phone code type is determined by the return value of the previous auth.sendCode/auth.resendCode: see login for more info.","arguments":{"flags":"Flags, see TL conditional fields","phone_number":"The phone number","phone_code_hash":"The phone code hash obtained from {@link auth.RawSendCodeRequest}","reason":"Official clients only, used if the device integrity verification failed, and no secret could be obtained to invoke {@link auth.RawRequestFirebaseSmsRequest}: in this case, the device integrity verification failure reason must be passed here."},"throws":[{"code":400,"name":"PHONE_CODE_EMPTY","comment":"phone_code is missing."},{"code":400,"name":"PHONE_CODE_EXPIRED","comment":"The phone code you provided has expired."},{"code":400,"name":"PHONE_CODE_HASH_EMPTY","comment":"phone_code_hash is missing."},{"code":406,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."},{"code":406,"name":"SEND_CODE_UNAVAILABLE","comment":"Returned when all available options for this type of number were already used (e.g. flash-call, then SMS, then this error might be returned to trigger a second resend)."}],"available":"user"},"auth.importAuthorization":{"comment":"Logs in a user using a key transmitted from their native data-center.","arguments":{"id":"User ID","bytes":"Authorization key"},"throws":[{"code":400,"name":"AUTH_BYTES_INVALID","comment":"The provided authorization is invalid."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"both"},"auth.dropTempAuthKeys":{"comment":"Delete all temporary authorization keys except for the ones specified","arguments":{"except_auth_keys":"The auth keys that shouldn't be dropped."},"available":"both"},"auth.cancelCode":{"comment":"Cancel the login verification code","arguments":{"phone_number":"Phone number","phone_code_hash":"Phone code hash from {@link auth.RawSendCodeRequest}"},"throws":[{"code":400,"name":"PHONE_CODE_EXPIRED","comment":"The phone code you provided has expired."},{"code":406,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."}],"available":"user"},"auth.exportLoginToken":{"comment":"Generate a login token, for login via QR code.
    \nThe generated login token should be encoded using base64url, then shown as a tg://login?token=base64encodedtoken deep link » in the QR code.\n\nFor more info, see login via QR code.","arguments":{"api_id":"Application identifier (see. App configuration)","api_hash":"Application identifier hash (see. App configuration)","except_ids":"List of already logged-in user IDs, to prevent logging in twice with the same user"},"throws":[{"code":400,"name":"API_ID_INVALID","comment":"API ID invalid."},{"code":400,"name":"API_ID_PUBLISHED_FLOOD","comment":"This API id was published somewhere, you can't use it now."}],"available":"user"},"auth.importLoginToken":{"comment":"Login using a redirected login token, generated in case of DC mismatch during QR code login.\n\nFor more info, see login via QR code.","arguments":{"token":"Login token"},"throws":[{"code":400,"name":"AUTH_TOKEN_ALREADY_ACCEPTED","comment":"The specified auth token was already accepted."},{"code":400,"name":"AUTH_TOKEN_EXPIRED","comment":"The authorization token has expired."},{"code":400,"name":"AUTH_TOKEN_INVALID","comment":"The specified auth token is invalid."},{"code":400,"name":"AUTH_TOKEN_INVALIDX","comment":"The specified auth token is invalid."}],"available":"user"},"auth.recoverPassword":{"comment":"Reset the 2FA password using the recovery code sent using {@link auth.RawRequestPasswordRecoveryRequest}.","arguments":{"flags":"Flags, see TL conditional fields","code":"Code received via email","new_settings":"New password"},"throws":[{"code":400,"name":"CODE_EMPTY","comment":"The provided code is empty."},{"code":400,"name":"NEW_SETTINGS_INVALID","comment":"The new password settings are invalid."}],"available":"user"},"auth.acceptLoginToken":{"comment":"Accept QR code login token, logging in the app that generated it.\n\nReturns info about the new session.\n\nFor more info, see login via QR code.","arguments":{"token":"Login token embedded in QR code, for more info, see login via QR code."},"throws":[{"code":400,"name":"AUTH_TOKEN_ALREADY_ACCEPTED","comment":"The specified auth token was already accepted."},{"code":400,"name":"AUTH_TOKEN_EXCEPTION","comment":"An error occurred while importing the auth token."},{"code":400,"name":"AUTH_TOKEN_EXPIRED","comment":"The authorization token has expired."},{"code":400,"name":"AUTH_TOKEN_INVALIDX","comment":"The specified auth token is invalid."}],"available":"user"},"auth.checkRecoveryPassword":{"comment":"Check if the 2FA recovery code sent using {@link auth.RawRequestPasswordRecoveryRequest} is valid, before passing it to {@link auth.RawRecoverPasswordRequest}.","arguments":{"code":"Code received via email"},"throws":[{"code":400,"name":"CODE_EMPTY","comment":"The provided code is empty."},{"code":400,"name":"PASSWORD_RECOVERY_EXPIRED","comment":"The recovery code has expired."}],"available":"user"},"auth.resetLoginEmail":{"comment":"Reset the login email ».","arguments":{"phone_number":"Phone number of the account","phone_code_hash":"Phone code hash, obtained as described in the documentation »"},"throws":[{"code":400,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."},{"code":400,"name":"TASK_ALREADY_EXISTS","comment":"An email reset was already requested."}],"available":"user"},"auth.requestFirebaseSms":{"comment":"Request an SMS code via Firebase.","arguments":{"flags":"Flags, see TL conditional fields","phone_number":"Phone number","phone_code_hash":"Phone code hash returned by {@link auth.RawSendCodeRequest}","safety_net_token":"On Android, a JWS object obtained as described in the auth documentation »","play_integrity_token":"On Android, an object obtained as described in the auth documentation »","ios_push_secret":"Secret token received via an apple push notification"},"throws":[{"code":400,"name":"PHONE_CODE_EMPTY","comment":"phone_code is missing."},{"code":400,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."}],"available":"user"},"auth.importWebTokenAuthorization":{"comment":"Login by importing an authorization token","arguments":{"api_id":"API ID","api_hash":"API hash","web_auth_token":"The authorization token"},"throws":[{"code":400,"name":"API_ID_INVALID","comment":"API ID invalid."}],"available":"user"},"account.updateNotifySettings":{"comment":"Edits notification settings from a given user/group, from all users/all groups.","arguments":{"peer":"Notification source","settings":"Notification settings"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"SETTINGS_INVALID","comment":"Invalid settings were provided."}],"available":"user"},"account.registerDevice":{"comment":"Register device to receive PUSH notifications","arguments":{"flags":"Flags, see TL conditional fields","no_muted":"Avoid receiving (silent and invisible background) notifications. Useful to save battery.","token_type":"Device token type, see PUSH updates for the possible values.","token":"Device token, see PUSH updates for the possible values.","app_sandbox":"If true is transmitted, a sandbox-certificate will be used during transmission.","secret":"For FCM and APNS VoIP, optional encryption key used to encrypt push notifications","other_uids":"List of user identifiers of other users currently using the client"},"throws":[{"code":400,"name":"TOKEN_EMPTY","comment":"The specified token is empty."},{"code":400,"name":"TOKEN_INVALID","comment":"The provided token is invalid."},{"code":400,"name":"TOKEN_TYPE_INVALID","comment":"The specified token type is invalid."},{"code":400,"name":"WEBPUSH_AUTH_INVALID","comment":"The specified web push authentication secret is invalid."},{"code":400,"name":"WEBPUSH_KEY_INVALID","comment":"The specified web push elliptic curve Diffie-Hellman public key is invalid."},{"code":400,"name":"WEBPUSH_TOKEN_INVALID","comment":"The specified web push token is invalid."}],"available":"user"},"auth.reportMissingCode":{"comment":"Official apps only, reports that the SMS authentication code wasn't delivered.","arguments":{"phone_number":"Phone number where we were supposed to receive the code","phone_code_hash":"The phone code hash obtained from {@link auth.RawSendCodeRequest}","mnc":"MNC of the current network operator."},"throws":[{"code":400,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."}],"available":"user"},"account.unregisterDevice":{"comment":"Deletes a device by its token, stops sending PUSH-notifications to it.","arguments":{"token_type":"Device token type, see PUSH updates for the possible values.","token":"Device token, see PUSH updates for the possible values.","other_uids":"List of user identifiers of other users currently using the client"},"throws":[{"code":400,"name":"TOKEN_INVALID","comment":"The provided token is invalid."}],"available":"user"},"account.updateProfile":{"comment":"Updates user profile.","arguments":{"flags":"Flags, see TL conditional fields","first_name":"New user first name","last_name":"New user last name","about":"New bio"},"throws":[{"code":400,"name":"ABOUT_TOO_LONG","comment":"About string too long."},{"code":400,"name":"FIRSTNAME_INVALID","comment":"The first name is invalid."}],"available":"user"},"account.resetNotifySettings":{"comment":"Resets all notification settings from users and groups.","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.updateStatus":{"comment":"Updates online user status.","arguments":{"offline":"If true is transmitted, user status will change to {@link RawUserStatusOffline}."},"available":"user"},"account.getWallPapers":{"comment":"Returns a list of available wallpapers.","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"account.reportPeer":{"comment":"Report a peer for violation of telegram's Terms of Service","arguments":{"peer":"The peer to report","reason":"The reason why this peer is being reported","message":"Comment for report moderation"},"throws":[{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"account.getNotifySettings":{"comment":"Gets current notification settings for a given user/group, from all users/all groups.","arguments":{"peer":"Notification source"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"account.checkUsername":{"comment":"Validates a username and checks availability.","arguments":{"username":"username
    Accepted characters: A-z (case-insensitive), 0-9 and underscores.
    Length: 5-32 characters."},"throws":[{"code":400,"name":"USERNAME_INVALID","comment":"The provided username is not valid."},{"code":400,"name":"USERNAME_OCCUPIED","comment":"The provided username is already occupied."},{"code":400,"name":"USERNAME_PURCHASE_AVAILABLE","comment":"The specified username can be purchased on https://fragment.com."}],"available":"user"},"account.getPrivacy":{"comment":"Get privacy settings of current account","arguments":{"key":"Peer category whose privacy settings should be fetched"},"throws":[{"code":400,"name":"PRIVACY_KEY_INVALID","comment":"The privacy key is invalid."}],"available":"user"},"account.updateUsername":{"comment":"Changes username for the current user.","arguments":{"username":"username or empty string if username is to be removed
    Accepted characters: a-z (case-insensitive), 0-9 and underscores.
    Length: 5-32 characters."},"throws":[{"code":400,"name":"USERNAME_INVALID","comment":"The provided username is not valid."},{"code":400,"name":"USERNAME_NOT_MODIFIED","comment":"The username was not modified."},{"code":400,"name":"USERNAME_OCCUPIED","comment":"The provided username is already occupied."},{"code":400,"name":"USERNAME_PURCHASE_AVAILABLE","comment":"The specified username can be purchased on https://fragment.com."}],"available":"user"},"account.sendChangePhoneCode":{"comment":"Verify a new phone number to associate to the current account","arguments":{"phone_number":"New phone number","settings":"Phone code settings"},"throws":[{"code":406,"name":"FRESH_CHANGE_PHONE_FORBIDDEN","comment":"You can't change phone number right after logging in, please wait at least 24 hours."},{"code":400,"name":"PHONE_NUMBER_BANNED","comment":"The provided phone number is banned from telegram."},{"code":406,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."},{"code":400,"name":"PHONE_NUMBER_OCCUPIED","comment":"The phone number is already in use."}],"available":"user"},"account.setAccountTTL":{"comment":"Set account self-destruction period","arguments":{"ttl":"Time to live in days"},"throws":[{"code":400,"name":"TTL_DAYS_INVALID","comment":"The provided TTL is invalid."}],"available":"user"},"account.getAccountTTL":{"comment":"Get days to live of account","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.setPrivacy":{"comment":"Change privacy settings of current account","arguments":{"key":"New privacy rule","rules":"Peers to which the privacy rule will apply."},"throws":[{"code":400,"name":"PRIVACY_KEY_INVALID","comment":"The privacy key is invalid."},{"code":400,"name":"PRIVACY_TOO_LONG","comment":"Too many privacy rules were specified, the current limit is 1000."},{"code":400,"name":"PRIVACY_VALUE_INVALID","comment":"The specified privacy rule combination is invalid."}],"available":"user"},"account.updateDeviceLocked":{"comment":"When client-side passcode lock feature is enabled, will not show message texts in incoming PUSH notifications.","arguments":{"period":"Inactivity period after which to start hiding message texts in PUSH notifications."},"available":"user"},"account.changePhone":{"comment":"Change the phone number of the current account","arguments":{"phone_number":"New phone number","phone_code_hash":"Phone code hash received when calling {@link account.RawSendChangePhoneCodeRequest}","phone_code":"Phone code received when calling {@link account.RawSendChangePhoneCodeRequest}"},"throws":[{"code":400,"name":"PHONE_CODE_EMPTY","comment":"phone_code is missing."},{"code":400,"name":"PHONE_CODE_EXPIRED","comment":"The phone code you provided has expired."},{"code":406,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."},{"code":400,"name":"PHONE_NUMBER_OCCUPIED","comment":"The phone number is already in use."}],"available":"user"},"account.getAuthorizations":{"comment":"Get logged-in sessions","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.resetAuthorization":{"comment":"Log out an active authorized session by its hash","arguments":{"hash":"Session hash"},"throws":[{"code":406,"name":"FRESH_RESET_AUTHORISATION_FORBIDDEN","comment":"You can't logout other sessions if less than 24 hours have passed since you logged on the current session."},{"code":400,"name":"HASH_INVALID","comment":"The provided hash is invalid."}],"available":"user"},"account.deleteAccount":{"comment":"Delete the user's account from the telegram servers.\n\nCan also be used to delete the account of a user that provided the login code, but forgot the 2FA password and no recovery method is configured, see here » for more info on password recovery, and here » for more info on account deletion.","arguments":{"flags":"Flags, see TL conditional fields","reason":"Why is the account being deleted, can be empty","password":"2FA password: this field can be omitted even for accounts with 2FA enabled: in this case account account deletion will be delayed by 7 days as specified in the docs »"},"throws":[{"code":420,"name":"2FA_CONFIRM_WAIT_%d","comment":"Since this account is active and protected by a 2FA password, we will delete it in 1 week for security purposes. You can cancel this process at any time, you'll be able to reset your account in %d seconds."}],"available":"user"},"account.getPasswordSettings":{"comment":"Get private info associated to the password info (recovery email, telegram passport info & so on)","arguments":{"password":"The password (see SRP)"},"throws":[{"code":400,"name":"PASSWORD_HASH_INVALID","comment":"The provided password hash is invalid."}],"available":"user"},"account.updatePasswordSettings":{"comment":"Set a new 2FA password","arguments":{"password":"The old password (see SRP)","new_settings":"The new password (see SRP)"},"throws":[{"code":400,"name":"EMAIL_INVALID","comment":"The specified email is invalid."},{"code":400,"name":"EMAIL_UNCONFIRMED","comment":"Email unconfirmed."},{"code":400,"name":"EMAIL_UNCONFIRMED_%d","comment":"The provided email isn't confirmed, %d is the length of the verification code that was just sent to the email: use {@link account.RawVerifyEmailRequest} to enter the received verification code and enable the recovery email."},{"code":400,"name":"NEW_SALT_INVALID","comment":"The new salt is invalid."},{"code":400,"name":"NEW_SETTINGS_EMPTY","comment":"No password is set on the current account, and no new password was specified in new_settings."},{"code":400,"name":"NEW_SETTINGS_INVALID","comment":"The new password settings are invalid."},{"code":400,"name":"PASSWORD_HASH_INVALID","comment":"The provided password hash is invalid."},{"code":400,"name":"SRP_ID_INVALID","comment":"Invalid SRP ID provided."},{"code":400,"name":"SRP_PASSWORD_CHANGED","comment":"Password has changed."}],"available":"user"},"account.getPassword":{"comment":"Obtain configuration for two-factor authorization with password","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.sendConfirmPhoneCode":{"comment":"Send confirmation code to cancel account deletion, for more info click here »","arguments":{"hash":"The hash from the service notification, for more info click here »","settings":"Phone code settings"},"throws":[{"code":400,"name":"HASH_INVALID","comment":"The provided hash is invalid."}],"available":"user"},"account.confirmPhone":{"comment":"Confirm a phone number to cancel account deletion, for more info click here »","arguments":{"phone_code_hash":"Phone code hash, for more info click here »","phone_code":"SMS code, for more info click here »"},"throws":[{"code":400,"name":"CODE_HASH_INVALID","comment":"Code hash invalid."},{"code":400,"name":"PHONE_CODE_EMPTY","comment":"phone_code is missing."}],"available":"user"},"account.getTmpPassword":{"comment":"Get temporary payment password","arguments":{"password":"SRP password parameters","period":"Time during which the temporary password will be valid, in seconds; should be between 60 and 86400"},"throws":[{"code":400,"name":"PASSWORD_HASH_INVALID","comment":"The provided password hash is invalid."},{"code":400,"name":"TMP_PASSWORD_DISABLED","comment":"The temporary password is disabled."}],"available":"user"},"account.getWebAuthorizations":{"comment":"Get web login widget authorizations","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.resetWebAuthorizations":{"comment":"Reset all active web telegram login sessions","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.getAllSecureValues":{"comment":"Get all saved Telegram Passport documents, for more info see the passport docs »","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.resetWebAuthorization":{"comment":"Log out an active web telegram login session","arguments":{"hash":"{@link RawWebAuthorization} hash"},"throws":[{"code":400,"name":"HASH_INVALID","comment":"The provided hash is invalid."}],"available":"user"},"account.saveSecureValue":{"comment":"Securely save Telegram Passport document, for more info see the passport docs »","arguments":{"value":"Secure value, for more info see the passport docs »","secure_secret_id":"Passport secret hash, for more info see the passport docs »"},"throws":[{"code":400,"name":"PASSWORD_REQUIRED","comment":"A 2FA password must be configured to use Telegram Passport."},{"code":400,"name":"SECURE_SECRET_REQUIRED","comment":"A secure secret is required."}],"available":"user"},"account.getSecureValue":{"comment":"Get saved Telegram Passport document, for more info see the passport docs »","arguments":{"types":"Requested value types"},"available":"user"},"account.getAuthorizationForm":{"comment":"Returns a Telegram Passport authorization form for sharing data with a service","arguments":{"bot_id":"User identifier of the service's bot","scope":"Telegram Passport element types requested by the service","public_key":"Service's public key"},"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."},{"code":400,"name":"PUBLIC_KEY_REQUIRED","comment":"A public key is required."}],"available":"user"},"account.sendVerifyPhoneCode":{"comment":"Send the verification phone code for telegram passport.","arguments":{"phone_number":"The phone number to verify","settings":"Phone code settings"},"throws":[{"code":400,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."}],"available":"user"},"account.acceptAuthorization":{"comment":"Sends a Telegram Passport authorization form, effectively sharing data with the service","arguments":{"bot_id":"Bot ID","scope":"Telegram Passport element types requested by the service","public_key":"Service's public key","value_hashes":"Types of values sent and their hashes","credentials":"Encrypted values"},"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."},{"code":400,"name":"PUBLIC_KEY_REQUIRED","comment":"A public key is required."}],"available":"user"},"account.verifyEmail":{"comment":"Verify an email address.","arguments":{"purpose":"Verification purpose","verification":"Email verification code or token"},"throws":[{"code":400,"name":"EMAIL_INVALID","comment":"The specified email is invalid."},{"code":400,"name":"EMAIL_NOT_ALLOWED","comment":"The specified email cannot be used to complete the operation."},{"code":400,"name":"EMAIL_VERIFY_EXPIRED","comment":"The verification email has expired."},{"code":400,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."}],"available":"user"},"account.sendVerifyEmailCode":{"comment":"Send an email verification code.","arguments":{"purpose":"Verification purpose.","email":"The email where to send the code."},"throws":[{"code":400,"name":"EMAIL_INVALID","comment":"The specified email is invalid."},{"code":400,"name":"EMAIL_NOT_ALLOWED","comment":"The specified email cannot be used to complete the operation."},{"code":400,"name":"EMAIL_NOT_SETUP","comment":"In order to change the login email with emailVerifyPurposeLoginChange, an existing login email must already be set using emailVerifyPurposeLoginSetup."},{"code":400,"name":"PHONE_HASH_EXPIRED","comment":"An invalid or expired phone_code_hash was provided."},{"code":400,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."}],"available":"user"},"account.deleteSecureValue":{"comment":"Delete stored Telegram Passport documents, for more info see the passport docs »","arguments":{"types":"Document types to delete"},"available":"user"},"account.confirmPasswordEmail":{"comment":"Verify an email to use as 2FA recovery method.","arguments":{"code":"The phone code that was received after setting a recovery email"},"throws":[{"code":400,"name":"CODE_INVALID","comment":"Code invalid."},{"code":400,"name":"EMAIL_HASH_EXPIRED","comment":"Email hash expired."}],"available":"user"},"account.finishTakeoutSession":{"comment":"Terminate a takeout session, see here » for more info.","arguments":{"flags":"Flags, see TL conditional fields","success":"Data exported successfully"},"throws":[{"code":403,"name":"TAKEOUT_REQUIRED","comment":"A takeout session needs to be initialized first, see here » for more info."}],"available":"user"},"account.resendPasswordEmail":{"comment":"Resend the code to verify an email to use as 2FA recovery method.","throws":[{"code":400,"name":"EMAIL_HASH_EXPIRED","comment":"Email hash expired."}],"available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.initTakeoutSession":{"comment":"Initialize a takeout session, see here » for more info.","arguments":{"flags":"Flags, see TL conditional fields","contacts":"Whether to export contacts","message_users":"Whether to export messages in private chats","message_chats":"Whether to export messages in basic groups","message_megagroups":"Whether to export messages in supergroups","message_channels":"Whether to export messages in channels","files":"Whether to export files","file_max_size":"Maximum size of files to export"},"throws":[{"code":420,"name":"TAKEOUT_INIT_DELAY_%d","comment":"Sorry, for security reasons, you will be able to begin downloading your data in %d seconds. We have notified all your devices about the export request to make sure it's authorized and to give you time to react if it's not."}],"available":"user"},"account.cancelPasswordEmail":{"comment":"Cancel the code that was sent to verify an email to use as 2FA recovery method.","throws":[{"code":400,"name":"EMAIL_HASH_EXPIRED","comment":"Email hash expired."}],"available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.verifyPhone":{"comment":"Verify a phone number for telegram passport.","arguments":{"phone_number":"Phone number","phone_code_hash":"Phone code hash received from the call to {@link account.RawSendVerifyPhoneCodeRequest}","phone_code":"Code received after the call to {@link account.RawSendVerifyPhoneCodeRequest}"},"throws":[{"code":400,"name":"PHONE_CODE_EMPTY","comment":"phone_code is missing."},{"code":400,"name":"PHONE_CODE_EXPIRED","comment":"The phone code you provided has expired."},{"code":400,"name":"PHONE_NUMBER_INVALID","comment":"The phone number is invalid."}],"available":"user"},"account.saveWallPaper":{"comment":"Install/uninstall wallpaper","arguments":{"wallpaper":"Wallpaper to install or uninstall","unsave":"Uninstall wallpaper?","settings":"Wallpaper settings"},"throws":[{"code":400,"name":"WALLPAPER_INVALID","comment":"The specified wallpaper is invalid."}],"available":"user"},"account.getWallPaper":{"comment":"Get info about a certain wallpaper","arguments":{"wallpaper":"The wallpaper to get info about"},"throws":[{"code":400,"name":"WALLPAPER_INVALID","comment":"The specified wallpaper is invalid."}],"available":"user"},"account.setContactSignUpNotification":{"comment":"Toggle contact sign up notifications","arguments":{"silent":"Whether to disable contact sign up notifications"},"available":"user"},"account.getNotifyExceptions":{"comment":"Returns list of chats with non-default notification settings","arguments":{"flags":"Flags, see TL conditional fields","compare_sound":"If set, chats with non-default sound will be returned","compare_stories":"If set, chats with non-default notification settings for stories will be returned","peer":"If specified, only chats of the specified category will be returned"},"available":"user"},"account.uploadWallPaper":{"comment":"Create and upload a new wallpaper","arguments":{"flags":"Flags, see TL conditional fields","for_chat":"Set this flag when uploading wallpapers to be passed to {@link messages.RawSetChatWallPaperRequest}.","file":"The JPG/PNG wallpaper","mime_type":"MIME type of uploaded wallpaper","settings":"Wallpaper settings"},"throws":[{"code":400,"name":"WALLPAPER_FILE_INVALID","comment":"The specified wallpaper file is invalid."},{"code":400,"name":"WALLPAPER_MIME_INVALID","comment":"The specified wallpaper MIME type is invalid."}],"available":"user"},"account.installWallPaper":{"comment":"Install wallpaper","arguments":{"wallpaper":"Wallpaper to install","settings":"Wallpaper settings"},"throws":[{"code":400,"name":"WALLPAPER_INVALID","comment":"The specified wallpaper is invalid."}],"available":"user"},"account.getContactSignUpNotification":{"comment":"Whether the user will receive notifications when contacts sign up","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.saveAutoDownloadSettings":{"comment":"Change media autodownload settings","arguments":{"flags":"Flags, see TL conditional fields","low":"Whether to save media in the low data usage preset","high":"Whether to save media in the high data usage preset","settings":"Media autodownload settings"},"available":"user"},"account.getAutoDownloadSettings":{"comment":"Get media autodownload settings","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.resetWallPapers":{"comment":"Delete all installed wallpapers, reverting to the default wallpaper set.","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.createTheme":{"comment":"Create a theme","arguments":{"flags":"Flags, see TL conditional fields","slug":"Unique theme ID used to generate theme deep links, can be empty to autogenerate a random ID.","title":"Theme name","document":"Theme file","settings":"Theme settings, multiple values can be provided for the different base themes (day/night mode, etc)."},"throws":[{"code":400,"name":"THEME_MIME_INVALID","comment":"The theme's MIME type is invalid."},{"code":400,"name":"THEME_TITLE_INVALID","comment":"The specified theme title is invalid."}],"available":"user"},"account.uploadTheme":{"comment":"Upload theme","arguments":{"flags":"Flags, see TL conditional fields","file":"Previously uploaded theme file with platform-specific colors for UI components, can be left unset when creating themes that only modify the wallpaper or accent colors.","thumb":"Thumbnail","file_name":"File name","mime_type":"MIME type, must be application/x-tgtheme-{format}, where format depends on the client"},"throws":[{"code":400,"name":"THEME_FILE_INVALID","comment":"Invalid theme file provided."},{"code":400,"name":"THEME_MIME_INVALID","comment":"The theme's MIME type is invalid."}],"available":"user"},"account.updateTheme":{"comment":"Update theme","arguments":{"flags":"Flags, see TL conditional fields","format":"Theme format, a string that identifies the theming engines supported by the client","theme":"Theme to update","slug":"Unique theme ID","title":"Theme name","document":"Theme file","settings":"Theme settings"},"throws":[{"code":400,"name":"THEME_INVALID","comment":"Invalid theme provided."}],"available":"user"},"account.installTheme":{"comment":"Install a theme","arguments":{"flags":"Flags, see TL conditional fields","dark":"Whether to install the dark version","theme":"Theme to install","format":"Theme format, a string that identifies the theming engines supported by the client","base_theme":"Indicates a basic theme provided by all clients"},"available":"user"},"account.getThemes":{"comment":"Get installed themes","arguments":{"format":"Theme format, a string that identifies the theming engines supported by the client","hash":"Hash used for caching, for more info click here."},"available":"user"},"account.setContentSettings":{"comment":"Set sensitive content settings (for viewing or hiding NSFW content)","arguments":{"flags":"Flags, see TL conditional fields","sensitive_enabled":"Enable NSFW content"},"throws":[{"code":403,"name":"SENSITIVE_CHANGE_FORBIDDEN","comment":"You can't change your sensitive content settings."}],"available":"user"},"account.getTheme":{"comment":"Get theme information","arguments":{"format":"Theme format, a string that identifies the theming engines supported by the client","theme":"Theme"},"throws":[{"code":400,"name":"THEME_FORMAT_INVALID","comment":"Invalid theme format provided."},{"code":400,"name":"THEME_INVALID","comment":"Invalid theme provided."}],"available":"user"},"account.getMultiWallPapers":{"comment":"Get info about multiple wallpapers","arguments":{"wallpapers":"Wallpapers to fetch info about"},"throws":[{"code":400,"name":"WALLPAPER_INVALID","comment":"The specified wallpaper is invalid."}],"available":"user"},"account.getContentSettings":{"comment":"Get sensitive content settings","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.setGlobalPrivacySettings":{"comment":"Set global privacy settings","arguments":{"settings":"Global privacy settings"},"throws":[{"code":400,"name":"AUTOARCHIVE_NOT_AVAILABLE","comment":"The autoarchive setting is not available at this time: please check the value of the autoarchive_setting_available field in client config » before calling this method."},{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."}],"available":"user"},"account.getGlobalPrivacySettings":{"comment":"Get global privacy settings","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.saveTheme":{"comment":"Save a theme","arguments":{"theme":"Theme to save","unsave":"Unsave"},"throws":[{"code":400,"name":"THEME_INVALID","comment":"Invalid theme provided."}],"available":"user"},"account.resetPassword":{"comment":"Initiate a 2FA password reset: can only be used if the user is already logged-in, see here for more info »","throws":[{"code":400,"name":"PASSWORD_EMPTY","comment":"The provided password is empty."}],"available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.reportProfilePhoto":{"comment":"Report a profile photo of a dialog","arguments":{"peer":"The dialog","photo_id":"Dialog photo ID","reason":"Report reason","message":"Comment for report moderation"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"account.declinePasswordReset":{"comment":"Abort a pending 2FA password reset, see here for more info »","throws":[{"code":400,"name":"RESET_REQUEST_MISSING","comment":"No password reset is in progress."}],"available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.getChatThemes":{"comment":"Get all available chat themes ».","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"account.setAuthorizationTTL":{"comment":"Set time-to-live of current session","arguments":{"authorization_ttl_days":"Time-to-live of current session in days"},"throws":[{"code":406,"name":"FRESH_RESET_AUTHORISATION_FORBIDDEN","comment":"You can't logout other sessions if less than 24 hours have passed since you logged on the current session."},{"code":400,"name":"TTL_DAYS_INVALID","comment":"The provided TTL is invalid."}],"available":"user"},"account.changeAuthorizationSettings":{"comment":"Change settings related to a session.","arguments":{"flags":"Flags, see TL conditional fields","confirmed":"If set, confirms a newly logged in session ».","hash":"Session ID from the {@link RawAuthorization} constructor, fetchable using {@link account.RawGetAuthorizationsRequest}","encrypted_requests_disabled":"Whether to enable or disable receiving encrypted chats: if the flag is not set, the previous setting is not changed","call_requests_disabled":"Whether to enable or disable receiving calls: if the flag is not set, the previous setting is not changed"},"throws":[{"code":400,"name":"HASH_INVALID","comment":"The provided hash is invalid."}],"available":"user"},"account.getSavedRingtones":{"comment":"Fetch saved notification sounds","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"account.saveRingtone":{"comment":"Save or remove saved notification sound.\n\nIf the notification sound is already in MP3 format, {@link account.RawSavedRingtone} will be returned.
    \nOtherwise, it will be automatically converted and a {@link account.RawSavedRingtoneConverted} will be returned, containing a new {@link RawDocument} object that should be used to refer to the ringtone from now on (ie when deleting it using the unsave parameter, or when downloading it).","arguments":{"id":"Notification sound uploaded using {@link account.RawUploadRingtoneRequest}","unsave":"Whether to add or delete the notification sound"},"throws":[{"code":400,"name":"RINGTONE_INVALID","comment":"The specified ringtone is invalid."}],"available":"user"},"account.uploadRingtone":{"comment":"Upload notification sound, use {@link account.RawSaveRingtoneRequest} to convert it and add it to the list of saved notification sounds.","arguments":{"file":"Notification sound","file_name":"File name","mime_type":"MIME type of file"},"throws":[{"code":400,"name":"RINGTONE_MIME_INVALID","comment":"The MIME type for the ringtone is invalid."}],"available":"user"},"account.updateEmojiStatus":{"comment":"Set an emoji status","arguments":{"emoji_status":"Emoji status to set"},"throws":[{"code":400,"name":"DOCUMENT_INVALID","comment":"The specified document is invalid."}],"available":"user"},"account.getDefaultEmojiStatuses":{"comment":"Get a list of default suggested emoji statuses","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"account.getRecentEmojiStatuses":{"comment":"Get recently used emoji statuses","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"account.reorderUsernames":{"comment":"Reorder usernames associated with the currently logged-in user.","arguments":{"order":"The new order for active usernames. All active usernames must be specified."},"throws":[{"code":400,"name":"ORDER_INVALID","comment":"The specified username order is invalid."},{"code":400,"name":"USERNAME_NOT_MODIFIED","comment":"The username was not modified."}],"available":"user"},"account.getDefaultProfilePhotoEmojis":{"comment":"Get a set of suggested custom emoji stickers that can be used as profile picture","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"account.clearRecentEmojiStatuses":{"comment":"Clears list of recently used emoji statuses","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.getDefaultGroupPhotoEmojis":{"comment":"Get a set of suggested custom emoji stickers that can be used as group picture","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"account.getAutoSaveSettings":{"comment":"Get autosave settings","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.toggleUsername":{"comment":"Activate or deactivate a purchased fragment.com username associated to the currently logged-in user.","arguments":{"username":"Username","active":"Whether to activate or deactivate it"},"throws":[{"code":400,"name":"USERNAMES_ACTIVE_TOO_MUCH","comment":"The maximum number of active usernames was reached."},{"code":400,"name":"USERNAME_INVALID","comment":"The provided username is not valid."},{"code":400,"name":"USERNAME_NOT_MODIFIED","comment":"The username was not modified."}],"available":"user"},"account.deleteAutoSaveExceptions":{"comment":"Clear all peer-specific autosave settings.","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.saveAutoSaveSettings":{"comment":"Modify autosave settings","arguments":{"flags":"Flags, see TL conditional fields","users":"Whether the new settings should affect all private chats","chats":"Whether the new settings should affect all groups","broadcasts":"Whether the new settings should affect all channels","peer":"Whether the new settings should affect a specific peer","settings":"The new autosave settings"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"account.invalidateSignInCodes":{"comment":"Invalidate the specified login codes, see here » for more info.","arguments":{"codes":"The login codes to invalidate."},"available":"user"},"account.updateColor":{"comment":"Update the accent color and background custom emoji » of the current account.","arguments":{"flags":"Flags, see TL conditional fields","for_profile":"Whether to change the accent color emoji pattern of the profile page; otherwise, the accent color and emoji pattern of messages will be changed.","color":"ID of the accent color palette » to use (not RGB24, see here » for more info).","background_emoji_id":"Custom emoji ID used in the accent color pattern."},"throws":[{"code":400,"name":"COLOR_INVALID","comment":"The specified color palette ID was invalid."},{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."}],"available":"user"},"account.getChannelDefaultEmojiStatuses":{"comment":"Get a list of default suggested channel emoji statuses.","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"account.getDefaultBackgroundEmojis":{"comment":"Get a set of suggested custom emoji stickers that can be used in an accent color pattern.","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"account.updateBusinessWorkHours":{"comment":"Specify a set of Telegram Business opening hours.
    \nThis info will be contained in {@link RawUserFull}.business_work_hours.\n\nTo remove all opening hours, invoke the method without setting the business_work_hours field.\n\nNote that the opening hours specified by the user must be appropriately validated and transformed before invoking the method, as specified here ».","arguments":{"flags":"Flags, see TL conditional fields","business_work_hours":"Opening hours (optional, if not set removes all opening hours)."},"throws":[{"code":400,"name":"BUSINESS_WORK_HOURS_EMPTY","comment":"No work hours were specified."},{"code":400,"name":"BUSINESS_WORK_HOURS_PERIOD_INVALID","comment":"The specified work hours are invalid, see here » for the exact requirements."},{"code":400,"name":"TIMEZONE_INVALID","comment":"The specified timezone does not exist."}],"available":"user"},"account.updateBusinessLocation":{"comment":"Businesses » may advertise their location using this method, see here » for more info.\n\nTo remove business location information invoke the method without setting any of the parameters.","arguments":{"flags":"Flags, see TL conditional fields","geo_point":"Optional, contains a set of geographical coordinates.","address":"Mandatory when setting/updating the location, contains a textual description of the address (max 96 UTF-8 chars)."},"available":"user"},"account.getChannelRestrictedStatusEmojis":{"comment":"Returns fetch the full list of custom emoji IDs » that cannot be used in channel emoji statuses ».","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"account.updateBusinessGreetingMessage":{"comment":"Set a list of Telegram Business greeting messages.","arguments":{"flags":"Flags, see TL conditional fields","message":"Greeting message configuration and contents."},"available":"user"},"account.getConnectedBots":{"comment":"List all currently connected business bots »","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.updateBusinessAwayMessage":{"comment":"Set a list of Telegram Business away messages.","arguments":{"flags":"Flags, see TL conditional fields","message":"Away message configuration and contents."},"available":"user"},"account.getBotBusinessConnection":{"comment":"Bots may invoke this method to re-fetch the {@link RawUpdateBotBusinessConnect} constructor associated with a specific business connection_id, see here » for more info on connected business bots.
    \nThis is needed for example for freshly logged in bots that are receiving some {@link RawUpdateBotNewBusinessMessage}, etc. updates because some users have already connected to the bot before it could login.
    \nIn this case, the bot is receiving messages from the business connection, but it hasn't cached the associated {@link RawUpdateBotBusinessConnect} with info about the connection (can it reply to messages? etc.) yet, and cannot receive the old ones because they were sent when the bot wasn't logged into the session yet.
    \nThis method can be used to fetch info about a not-yet-cached business connection, and should not be invoked if the info is already cached or to fetch changes, as eventual changes will automatically be sent as new {@link RawUpdateBotBusinessConnect} updates to the bot using the usual update delivery methods ».","arguments":{"connection_id":"Business connection ID »."},"throws":[{"code":400,"name":"CONNECTION_ID_INVALID","comment":"The specified connection ID is invalid."}],"available":"both"},"account.toggleConnectedBotPaused":{"comment":"Pause or unpause a specific chat, temporarily disconnecting it from all business bots ».","arguments":{"peer":"The chat to pause","paused":"Whether to pause or unpause the chat"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"account.updateBirthday":{"comment":"Update our birthday, see here » for more info.","arguments":{"flags":"Flags, see TL conditional fields","birthday":"Birthday."},"throws":[{"code":400,"name":"BIRTHDAY_INVALID","comment":"An invalid age was specified, must be between 0 and 150 years."}],"available":"user"},"account.disablePeerConnectedBot":{"comment":"Permanently disconnect a specific chat from all business bots » (equivalent to specifying it in recipients.exclude_users during initial configuration with {@link account.RawUpdateConnectedBotRequest}); to reconnect of a chat disconnected using this method the user must reconnect the entire bot by invoking {@link account.RawUpdateConnectedBotRequest}.","arguments":{"peer":"The chat to disconnect"},"throws":[{"code":400,"name":"BOT_ALREADY_DISABLED","comment":"The connected business bot was already disabled for the specified peer."},{"code":400,"name":"BOT_NOT_CONNECTED_YET","comment":"No business bot is connected to the currently logged in user."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"account.updateBusinessIntro":{"comment":"Set or remove the Telegram Business introduction ».","arguments":{"flags":"Flags, see TL conditional fields","intro":"Telegram Business introduction, to remove it call the method without setting this flag."},"available":"user"},"account.editBusinessChatLink":{"comment":"Edit a created business chat deep link ».","arguments":{"slug":"Slug of the link, obtained as specified here ».","link":"New link information."},"throws":[{"code":400,"name":"CHATLINK_SLUG_EMPTY","comment":"The specified slug is empty."},{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."}],"available":"user"},"account.getBusinessChatLinks":{"comment":"List all created business chat deep links ».","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.deleteBusinessChatLink":{"comment":"Delete a business chat deep link ».","arguments":{"slug":"Slug of the link, obtained as specified here »."},"throws":[{"code":400,"name":"CHATLINK_SLUG_EMPTY","comment":"The specified slug is empty."},{"code":400,"name":"CHATLINK_SLUG_EXPIRED","comment":"The specified business chat link has expired."}],"available":"user"},"account.updatePersonalChannel":{"comment":"Associate (or remove) a personal channel », that will be listed on our personal profile page ».\n\nChanging it will emit an {@link RawUpdateUser} update.","arguments":{"channel":"The channel, pass {@link RawInputChannelEmpty} to remove it."},"available":"user"},"account.updateConnectedBot":{"comment":"Connect a business bot » to the current account, or to change the current connection settings.","arguments":{"flags":"Flags, see TL conditional fields","can_reply":"Whether the bot can reply to messages it receives from us, on behalf of us using the business connection.","deleted":"Whether to fully disconnect the bot from the current account.","bot":"The bot to connect or disconnect","recipients":"Configuration for the business connection"},"throws":[{"code":400,"name":"BOT_BUSINESS_MISSING","comment":"The specified bot is not a business bot (the {@link RawUser}.bot_business flag is not set)."},{"code":400,"name":"BUSINESS_RECIPIENTS_EMPTY","comment":"You didn't set any flag in inputBusinessBotRecipients, thus the bot cannot work with any peer."},{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."}],"available":"user"},"users.getFullUser":{"comment":"Returns extended user info by ID.","arguments":{"id":"User ID"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"USERNAME_OCCUPIED","comment":"The provided username is already occupied."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"both"},"account.setReactionsNotifySettings":{"comment":"Change the reaction notification settings ».","arguments":{"settings":"New reaction notification settings."},"available":"user"},"account.getReactionsNotifySettings":{"comment":"Get the current reaction notification settings ».","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"account.toggleSponsoredMessages":{"comment":"Disable or re-enable Telegram ads for the current Premium account.\n\nUseful for business owners that may want to launch and view their own Telegram ads via the Telegram ad platform ».","arguments":{"enabled":"Enable or disable ads."},"available":"user"},"users.setSecureValueErrors":{"comment":"Notify the user that the sent passport data contains some errors The user will not be able to re-submit their Passport data to you until the errors are fixed (the contents of the field for which you returned the error must change).\n\nUse this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.","arguments":{"id":"The user","errors":"Errors"},"throws":[{"code":403,"name":"USER_BOT_INVALID","comment":"User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"bot"},"users.getUsers":{"comment":"Returns basic user info according to their identifiers.","arguments":{"id":"List of user identifiers"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"FROM_MESSAGE_BOT_DISABLED","comment":"Bots can't use fromMessage min constructors."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."}],"available":"both"},"contacts.getContactIDs":{"comment":"Get the telegram IDs of all contacts.
    \nReturns an array of Telegram user IDs for all contacts (0 if a contact does not have an associated Telegram account or have hidden their account using privacy settings).","arguments":{"hash":"Hash used for caching, for more info click here"},"available":"user"},"users.getIsPremiumRequiredToContact":{"comment":"Check whether we can write to the specified user (this method can only be called by non-Premium users), see here » for more info on the full flow.","arguments":{"id":"Users to fetch info about."},"available":"user"},"contacts.getStatuses":{"comment":"Use this method to obtain the online statuses of all contacts with an accessible Telegram account.","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"contacts.getContacts":{"comment":"Returns the current user's contact list.","arguments":{"hash":"Hash used for caching, for more info click here.
    Note that the hash is computed using the usual algorithm, passing to the algorithm first the previously returned {@link contacts.RawContacts}.saved_count field, then max 100000 sorted user IDs from the contact list, including the ID of the currently logged in user if it is saved as a contact.
    Example: tdlib implementation."},"available":"user"},"contacts.deleteContacts":{"comment":"Deletes several contacts from the list.","arguments":{"id":"User ID list"},"available":"user"},"contacts.deleteByPhones":{"comment":"Delete contacts by phone number","arguments":{"phones":"Phone numbers"},"available":"user"},"contacts.importContacts":{"comment":"Imports contacts: saves a full list on the server, adds already registered contacts to the contact list, returns added contacts and their info.\n\nUse {@link contacts.RawAddContactRequest} to add Telegram contacts without actually using their phone number.","arguments":{"contacts":"List of contacts to import"},"available":"user"},"contacts.unblock":{"comment":"Deletes a peer from a blocklist, see here » for more info.","arguments":{"flags":"Flags, see TL conditional fields","my_stories_from":"Whether the peer should be removed from the story blocklist; if not set, the peer will be removed from the main blocklist, see here » for more info.","id":"Peer"},"throws":[{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CONTACT_ID_INVALID","comment":"The provided contact ID is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"account.createBusinessChatLink":{"comment":"Create a business chat deep link ».","arguments":{"link":"Info about the link to create."},"throws":[{"code":400,"name":"CHATLINKS_TOO_MUCH","comment":"Too many business chat links were created, please delete some older links."},{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."}],"available":"user"},"contacts.getBlocked":{"comment":"Returns the list of blocked users.","arguments":{"flags":"Flags, see TL conditional fields","my_stories_from":"Whether to fetch the story blocklist; if not set, will fetch the main blocklist. See here » for differences between the two.","offset":"The number of list elements to be skipped","limit":"The number of list elements to be returned"},"available":"user"},"contacts.resolveUsername":{"comment":"Resolve a @username to get peer info","arguments":{"username":"@username to resolve"},"throws":[{"code":400,"name":"CONNECTION_LAYER_INVALID","comment":"Layer invalid."},{"code":400,"name":"USERNAME_INVALID","comment":"The provided username is not valid."},{"code":400,"name":"USERNAME_NOT_OCCUPIED","comment":"The provided username is not occupied."}],"available":"both"},"contacts.search":{"comment":"Returns users found by username substring.","arguments":{"q":"Target substring","limit":"Maximum number of users to be returned"},"throws":[{"code":400,"name":"QUERY_TOO_SHORT","comment":"The query string is too short."},{"code":400,"name":"SEARCH_QUERY_EMPTY","comment":"The search query is empty."}],"available":"user"},"contacts.resetSaved":{"comment":"Removes all contacts without an associated Telegram account.","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"contacts.resetTopPeerRating":{"comment":"Reset rating of top peer","arguments":{"category":"Top peer category","peer":"Peer whose rating should be reset"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"contacts.getSaved":{"comment":"Get all contacts, requires a takeout session, see here » for more info.","throws":[{"code":400,"name":"TAKEOUT_INVALID","comment":"The specified takeout ID is invalid."},{"code":403,"name":"TAKEOUT_REQUIRED","comment":"A takeout session needs to be initialized first, see here » for more info."}],"available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"contacts.toggleTopPeers":{"comment":"Enable/disable top peers","arguments":{"enabled":"Enable/disable"},"available":"user"},"contacts.addContact":{"comment":"Add an existing telegram user as contact.\n\nUse {@link contacts.RawImportContactsRequest} to add contacts by phone number, without knowing their Telegram ID.","arguments":{"flags":"Flags, see TL conditional fields","add_phone_privacy_exception":"Allow the other user to see our phone number?","id":"Telegram ID of the other user","first_name":"First name","last_name":"Last name","phone":"User's phone number, may be omitted to simply add the user to the contact list, without a phone number."},"throws":[{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CONTACT_ID_INVALID","comment":"The provided contact ID is invalid."},{"code":400,"name":"CONTACT_NAME_EMPTY","comment":"Contact name empty."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."}],"available":"user"},"contacts.getTopPeers":{"comment":"Get most used peers","arguments":{"flags":"Flags, see TL conditional fields","correspondents":"Users we've chatted most frequently with","bots_pm":"Most used bots","bots_inline":"Most used inline bots","phone_calls":"Most frequently called users","forward_users":"Users to which the users often forwards messages to","forward_chats":"Chats to which the users often forwards messages to","groups":"Often-opened groups and supergroups","channels":"Most frequently visited channels","bots_app":"Most frequently used Main Mini Bot Apps.","offset":"Offset for pagination","limit":"Maximum number of results to return, see pagination","hash":"Hash used for caching, for more info click here"},"throws":[{"code":400,"name":"TYPES_EMPTY","comment":"No top peer type was provided."}],"available":"user"},"contacts.acceptContact":{"comment":"If the add contact action bar is active, add that user as contact","arguments":{"id":"The user to add as contact"},"throws":[{"code":400,"name":"CONTACT_ADD_MISSING","comment":"Contact to add is missing."},{"code":400,"name":"CONTACT_ID_INVALID","comment":"The provided contact ID is invalid."},{"code":400,"name":"CONTACT_REQ_MISSING","comment":"Missing contact request."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."}],"available":"user"},"account.resolveBusinessChatLink":{"comment":"Resolve a business chat deep link ».","arguments":{"slug":"Slug of the link, obtained as specified here »."},"throws":[{"code":400,"name":"CHATLINK_SLUG_EMPTY","comment":"The specified slug is empty."},{"code":400,"name":"CHATLINK_SLUG_EXPIRED","comment":"The specified business chat link has expired."}],"available":"user"},"contacts.getLocated":{"comment":"Get users and geochats near you, see here » for more info.","arguments":{"flags":"Flags, see TL conditional fields","background":"While the geolocation of the current user is public, clients should update it in the background every half-an-hour or so, while setting this flag.
    Do this only if the new location is more than 1 KM away from the previous one, or if the previous location is unknown.","geo_point":"Geolocation","self_expires":"If set, the geolocation of the current user will be public for the specified number of seconds; pass 0x7fffffff to disable expiry, 0 to make the current geolocation private; if the flag isn't set, no changes will be applied."},"throws":[{"code":406,"name":"BUSINESS_ADDRESS_ACTIVE","comment":"The user is currently advertising a Business Location, the location may only be changed (or removed) using {@link account.RawUpdateBusinessLocationRequest}. ."},{"code":400,"name":"GEO_POINT_INVALID","comment":"Invalid geoposition provided."},{"code":406,"name":"USERPIC_PRIVACY_REQUIRED","comment":"You need to disable privacy settings for your profile picture in order to make your geolocation public."},{"code":406,"name":"USERPIC_UPLOAD_REQUIRED","comment":"You must have a profile picture to publish your geolocation."}],"available":"user"},"contacts.blockFromReplies":{"comment":"Stop getting notifications about discussion replies of a certain user in @replies","arguments":{"flags":"Flags, see TL conditional fields","delete_message":"Whether to delete the specified message as well","delete_history":"Whether to delete all @replies messages from this user as well","report_spam":"Whether to also report this user for spam","msg_id":"ID of the message in the @replies chat"},"throws":[{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."}],"available":"user"},"contacts.exportContactToken":{"comment":"Generates a temporary profile link for the currently logged-in user.","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"contacts.importContactToken":{"comment":"Obtain user info from a temporary profile link.","arguments":{"token":"The token extracted from the temporary profile link."},"throws":[{"code":400,"name":"IMPORT_TOKEN_INVALID","comment":"The specified token is invalid."}],"available":"user"},"contacts.resolvePhone":{"comment":"Resolve a phone number to get user info, if their privacy settings allow it.","arguments":{"phone":"Phone number in international format, possibly obtained from a phone number deep link."},"throws":[{"code":400,"name":"PHONE_NOT_OCCUPIED","comment":"No user is associated to the specified phone number."}],"available":"user"},"contacts.getBirthdays":{"comment":"Fetch all users with birthdays that fall within +1/-1 days, relative to the current day: this method should be invoked by clients every 6-8 hours, and if the result is non-empty, it should be used to appropriately update locally cached birthday information in {@link RawUser}.birthday.\n\nSee here » for more info.","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"contacts.setBlocked":{"comment":"Replace the contents of an entire blocklist, see here for more info ».","arguments":{"flags":"Flags, see TL conditional fields","my_stories_from":"Whether to edit the story blocklist; if not set, will edit the main blocklist. See here » for differences between the two.","id":"Full content of the blocklist.","limit":"Maximum number of results to return, see pagination"},"available":"user"},"messages.getDialogs":{"comment":"Returns the current user dialog list.","arguments":{"flags":"Flags, see TL conditional fields","exclude_pinned":"Exclude pinned dialogs","folder_id":"Peer folder ID, for more info click here","offset_date":"Offsets for pagination, for more info click here","offset_id":"Offsets for pagination, for more info click here (top_message ID used for pagination)","offset_peer":"Offset peer for pagination","limit":"Number of list elements to be returned","hash":"Hash used for caching, for more info click here"},"throws":[{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"FOLDER_ID_INVALID","comment":"Invalid folder ID."},{"code":400,"name":"OFFSET_PEER_ID_INVALID","comment":"The provided offset peer is invalid."}],"available":"user"},"messages.getHistory":{"comment":"Returns the conversation history with one interlocutor / within a chat","arguments":{"peer":"Target peer","offset_id":"Only return messages starting from the specified message ID","offset_date":"Only return messages sent before the specified date","add_offset":"Number of list elements to be skipped, negative values are also accepted.","limit":"Number of results to return","max_id":"If a positive value was transferred, the method will return only messages with IDs less than max_id","min_id":"If a positive value was transferred, the method will return only messages with IDs more than min_id","hash":"Result hash"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"TAKEOUT_INVALID","comment":"The specified takeout ID is invalid."}],"available":"user"},"contacts.editCloseFriends":{"comment":"Edit the close friends list, see here » for more info.","arguments":{"id":"Full list of user IDs of close friends, see here for more info."},"available":"user"},"messages.search":{"comment":"Search for messages.","arguments":{"flags":"Flags, see TL conditional fields","peer":"User or chat, histories with which are searched, or {@link RawInputPeerEmpty} constructor to search in all private chats and normal groups (not channels) ». Use {@link messages.RawSearchGlobalRequest} to search globally in all chats, groups, supergroups and channels.","q":"Text search request","from_id":"Only return messages sent by the specified user ID","saved_peer_id":"Search within the saved message dialog » with this ID.","saved_reaction":"You may search for saved messages tagged » with one or more reactions using this flag.","top_msg_id":"Thread ID","filter":"Filter to return only specified message types","min_date":"If a positive value was transferred, only messages with a sending date bigger than the transferred one will be returned","max_date":"If a positive value was transferred, only messages with a sending date smaller than the transferred one will be returned","offset_id":"Only return messages starting from the specified message ID","add_offset":"Additional offset","limit":"Number of results to return","max_id":"Maximum message ID to return","min_id":"Minimum message ID to return","hash":"Hash"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"FROM_PEER_INVALID","comment":"The specified from_id is invalid."},{"code":400,"name":"INPUT_FILTER_INVALID","comment":"The specified filter is invalid."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"PEER_ID_NOT_SUPPORTED","comment":"The provided peer ID is not supported."},{"code":400,"name":"SEARCH_QUERY_EMPTY","comment":"The search query is empty."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"user"},"messages.readHistory":{"comment":"Marks message history as read.","arguments":{"peer":"Target user or group","max_id":"If a positive value is passed, only messages with identifiers less or equal than the given one will be read"},"throws":[{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.getMessages":{"comment":"Returns the list of messages by their IDs.","arguments":{"id":"Message ID list"},"available":"both"},"messages.deleteHistory":{"comment":"Deletes communication history.","arguments":{"flags":"Flags, see TL conditional fields","just_clear":"Just clear history for the current user, without actually removing messages for every chat user","revoke":"Whether to delete the message history for all chat participants","peer":"User or chat, communication history of which will be deleted","max_id":"Maximum ID of message to delete","min_date":"Delete all messages newer than this UNIX timestamp","max_date":"Delete all messages older than this UNIX timestamp"},"throws":[{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_REVOKE_DATE_UNSUPPORTED","comment":"min_date and max_date are not available for using with non-user peers."},{"code":400,"name":"MAX_DATE_INVALID","comment":"The specified maximum date is invalid."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"MIN_DATE_INVALID","comment":"The specified minimum date is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.deleteMessages":{"comment":"Deletes messages by their identifiers.","arguments":{"flags":"Flags, see TL conditional fields","revoke":"Whether to delete messages for all participants of the chat","id":"Message ID list"},"throws":[{"code":403,"name":"MESSAGE_DELETE_FORBIDDEN","comment":"You can't delete one of the messages you tried to delete, most likely because it is a service message."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."}],"available":"both"},"contacts.block":{"comment":"Adds a peer to a blocklist, see here » for more info.","arguments":{"flags":"Flags, see TL conditional fields","my_stories_from":"Whether the peer should be added to the story blocklist; if not set, the peer will be added to the main blocklist, see here » for more info.","id":"Peer"},"throws":[{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CONTACT_ID_INVALID","comment":"The provided contact ID is invalid."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.setTyping":{"comment":"Sends a current user typing event (see SendMessageAction for all event types) to a conversation partner or group.","arguments":{"flags":"Flags, see TL conditional fields","peer":"Target user or group","top_msg_id":"Topic ID","action":"Type of action"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":403,"name":"GROUPCALL_FORBIDDEN","comment":"The group call has already ended."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."},{"code":403,"name":"USER_IS_BLOCKED","comment":"You were blocked by this user."},{"code":400,"name":"USER_IS_BOT","comment":"Bots can't send messages to other bots."}],"available":"both"},"messages.receivedMessages":{"comment":"Confirms receipt of messages by a client, cancels PUSH-notification sending.","arguments":{"max_id":"Maximum message ID available in a client."},"available":"user"},"messages.sendMessage":{"comment":"Sends a message to a chat","arguments":{"flags":"Flags, see TL conditional fields","no_webpage":"Set this flag to disable generation of the webpage preview","silent":"Send this message silently (no notifications for the receivers)","background":"Send this message as background message","clear_draft":"Clear the draft field","noforwards":"Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled","update_stickersets_order":"Whether to move used stickersets to top, see here for more info on this flag »","invert_media":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.","peer":"The destination where the message will be sent","reply_to":"If set, indicates that the message should be sent in reply to the specified message or story.
    Also used to quote other messages.","message":"The message","random_id":"Unique client message ID required to prevent message resending","reply_markup":"Reply markup for sending bot buttons","entities":"Message entities for sending styled text","schedule_date":"Scheduled message date for scheduled messages","send_as":"Send this message as the specified peer","quick_reply_shortcut":"Add the message to the specified quick reply shortcut », instead.","effect":"Specifies a message effect » to use for the message."},"throws":[{"code":400,"name":"ADMIN_RIGHTS_EMPTY","comment":"The chatAdminRights constructor passed in keyboardButtonRequestPeer.peer_type.user_admin_rights has no rights set (i.e. flags is 0)."},{"code":400,"name":"BOT_DOMAIN_INVALID","comment":"Bot domain invalid."},{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."},{"code":400,"name":"BUSINESS_PEER_INVALID","comment":"Messages can't be set to the specified peer through the current business connection."},{"code":400,"name":"BUTTON_DATA_INVALID","comment":"The data of one or more of the buttons you provided is invalid."},{"code":400,"name":"BUTTON_TYPE_INVALID","comment":"The type of one or more of the buttons you provided is invalid."},{"code":400,"name":"BUTTON_URL_INVALID","comment":"Button URL invalid."},{"code":400,"name":"BUTTON_USER_INVALID","comment":"The user_id passed to inputKeyboardButtonUserProfile is invalid!"},{"code":400,"name":"BUTTON_USER_PRIVACY_RESTRICTED","comment":"The privacy setting of the user specified in a {@link RawInputKeyboardButtonUserProfile} button do not allow creating such a button."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_GUEST_SEND_FORBIDDEN","comment":"You join the discussion group before commenting, see here » for more info."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_RESTRICTED","comment":"You can't send messages in this chat, you were restricted."},{"code":403,"name":"CHAT_SEND_PLAIN_FORBIDDEN","comment":"You can't send non-media (text) messages in this chat."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"DOCUMENT_INVALID","comment":"The specified document is invalid."},{"code":400,"name":"ENCRYPTION_DECLINED","comment":"The secret chat was declined."},{"code":400,"name":"ENTITIES_TOO_LONG","comment":"You provided too many styled message entities."},{"code":400,"name":"ENTITY_BOUNDS_INVALID","comment":"A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length."},{"code":400,"name":"ENTITY_MENTION_USER_INVALID","comment":"You mentioned an invalid user."},{"code":400,"name":"FROM_MESSAGE_BOT_DISABLED","comment":"Bots can't use fromMessage min constructors."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MESSAGE_EMPTY","comment":"The provided message is empty."},{"code":400,"name":"MESSAGE_TOO_LONG","comment":"The provided message is too long."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":500,"name":"MSG_WAIT_FAILED","comment":"A waiting call returned an error."},{"code":406,"name":"PAYMENT_UNSUPPORTED","comment":"A detailed description of the error will be received separately as described here »."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"PINNED_DIALOGS_TOO_MUCH","comment":"Too many pinned dialogs."},{"code":400,"name":"POLL_OPTION_INVALID","comment":"Invalid poll option provided."},{"code":406,"name":"PRIVACY_PREMIUM_REQUIRED","comment":"You need a Telegram Premium subscription to send a message to this user."},{"code":400,"name":"QUICK_REPLIES_TOO_MUCH","comment":"A maximum of appConfig.quick_replies_limit shortcuts may be created, the limit was reached."},{"code":400,"name":"QUOTE_TEXT_INVALID","comment":"The specified reply_to.quote_text field is invalid."},{"code":500,"name":"RANDOM_ID_DUPLICATE","comment":"You provided a random ID that was already used."},{"code":400,"name":"REPLY_MARKUP_INVALID","comment":"The provided reply markup is invalid."},{"code":400,"name":"REPLY_MARKUP_TOO_LONG","comment":"The specified reply_markup is too long."},{"code":400,"name":"REPLY_MESSAGES_TOO_MUCH","comment":"Each shortcut can contain a maximum of appConfig.quick_reply_messages_limit messages, the limit was reached."},{"code":400,"name":"REPLY_MESSAGE_ID_INVALID","comment":"The specified reply-to message ID is invalid."},{"code":400,"name":"REPLY_TO_INVALID","comment":"The specified reply_to field is invalid."},{"code":400,"name":"REPLY_TO_USER_INVALID","comment":"The replied-to user is invalid."},{"code":400,"name":"SCHEDULE_BOT_NOT_ALLOWED","comment":"Bots cannot schedule messages."},{"code":400,"name":"SCHEDULE_DATE_TOO_LATE","comment":"You can't schedule a message this far in the future."},{"code":400,"name":"SCHEDULE_STATUS_PRIVATE","comment":"Can't schedule until user is online, if the user's last seen timestamp is hidden by their privacy settings."},{"code":400,"name":"SCHEDULE_TOO_MUCH","comment":"There are too many scheduled messages."},{"code":400,"name":"SEND_AS_PEER_INVALID","comment":"You can't send messages as the specified peer."},{"code":420,"name":"SLOWMODE_WAIT_%d","comment":"Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat."},{"code":400,"name":"STORY_ID_INVALID","comment":"The specified story ID is invalid."},{"code":406,"name":"TOPIC_CLOSED","comment":"This topic was closed, you can't send messages to it anymore."},{"code":406,"name":"TOPIC_DELETED","comment":"The specified topic was deleted."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."},{"code":403,"name":"USER_IS_BLOCKED","comment":"You were blocked by this user."},{"code":400,"name":"USER_IS_BOT","comment":"Bots can't send messages to other bots."},{"code":400,"name":"WC_CONVERT_URL_INVALID","comment":"WC convert URL invalid."},{"code":400,"name":"YOU_BLOCKED_USER","comment":"You blocked this user."}],"available":"both"},"messages.forwardMessages":{"comment":"Forwards messages by their IDs.","arguments":{"flags":"Flags, see TL conditional fields","silent":"Whether to send messages silently (no notification will be triggered on the destination clients)","background":"Whether to send the message in background","with_my_score":"When forwarding games, whether to include your score in the game","drop_author":"Whether to forward messages without quoting the original author","drop_media_captions":"Whether to strip captions from media","noforwards":"Only for bots, disallows further re-forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled","from_peer":"Source of messages","id":"IDs of messages","random_id":"Random ID to prevent resending of messages","to_peer":"Destination peer","top_msg_id":"Destination forum topic","schedule_date":"Scheduled message date for scheduled messages","send_as":"Forward the messages as the specified peer","quick_reply_shortcut":"Add the messages to the specified quick reply shortcut », instead."},"throws":[{"code":400,"name":"BROADCAST_PUBLIC_VOTERS_FORBIDDEN","comment":"You can't forward polls with public voters."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":406,"name":"CHAT_FORWARDS_RESTRICTED","comment":"You can't forward messages from a protected chat."},{"code":403,"name":"CHAT_GUEST_SEND_FORBIDDEN","comment":"You join the discussion group before commenting, see here » for more info."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_RESTRICTED","comment":"You can't send messages in this chat, you were restricted."},{"code":403,"name":"CHAT_SEND_AUDIOS_FORBIDDEN","comment":"You can't send audio messages in this chat."},{"code":403,"name":"CHAT_SEND_DOCS_FORBIDDEN","comment":"You can't send documents in this chat."},{"code":403,"name":"CHAT_SEND_GAME_FORBIDDEN","comment":"You can't send a game to this chat."},{"code":403,"name":"CHAT_SEND_GIFS_FORBIDDEN","comment":"You can't send gifs in this chat."},{"code":403,"name":"CHAT_SEND_MEDIA_FORBIDDEN","comment":"You can't send media in this chat."},{"code":403,"name":"CHAT_SEND_PHOTOS_FORBIDDEN","comment":"You can't send photos in this chat."},{"code":403,"name":"CHAT_SEND_PLAIN_FORBIDDEN","comment":"You can't send non-media (text) messages in this chat."},{"code":403,"name":"CHAT_SEND_POLL_FORBIDDEN","comment":"You can't send polls in this chat."},{"code":403,"name":"CHAT_SEND_STICKERS_FORBIDDEN","comment":"You can't send stickers in this chat."},{"code":403,"name":"CHAT_SEND_VIDEOS_FORBIDDEN","comment":"You can't send videos in this chat."},{"code":403,"name":"CHAT_SEND_VOICES_FORBIDDEN","comment":"You can't send voice recordings in this chat."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"GROUPED_MEDIA_INVALID","comment":"Invalid grouped media."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MEDIA_EMPTY","comment":"The provided media object is invalid."},{"code":400,"name":"MESSAGE_IDS_EMPTY","comment":"No message ids were provided."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":406,"name":"PAYMENT_UNSUPPORTED","comment":"A detailed description of the error will be received separately as described here »."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."},{"code":406,"name":"PRIVACY_PREMIUM_REQUIRED","comment":"You need a Telegram Premium subscription to send a message to this user."},{"code":400,"name":"QUICK_REPLIES_TOO_MUCH","comment":"A maximum of appConfig.quick_replies_limit shortcuts may be created, the limit was reached."},{"code":400,"name":"QUIZ_ANSWER_MISSING","comment":"You can forward a quiz while hiding the original author only after choosing an option in the quiz."},{"code":500,"name":"RANDOM_ID_DUPLICATE","comment":"You provided a random ID that was already used."},{"code":400,"name":"RANDOM_ID_INVALID","comment":"A provided random ID is invalid."},{"code":400,"name":"REPLY_MESSAGES_TOO_MUCH","comment":"Each shortcut can contain a maximum of appConfig.quick_reply_messages_limit messages, the limit was reached."},{"code":400,"name":"SCHEDULE_BOT_NOT_ALLOWED","comment":"Bots cannot schedule messages."},{"code":400,"name":"SCHEDULE_DATE_TOO_LATE","comment":"You can't schedule a message this far in the future."},{"code":400,"name":"SCHEDULE_TOO_MUCH","comment":"There are too many scheduled messages."},{"code":400,"name":"SEND_AS_PEER_INVALID","comment":"You can't send messages as the specified peer."},{"code":400,"name":"SLOWMODE_MULTI_MSGS_DISABLED","comment":"Slowmode is enabled, you cannot forward multiple messages to this group."},{"code":420,"name":"SLOWMODE_WAIT_%d","comment":"Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat."},{"code":406,"name":"TOPIC_CLOSED","comment":"This topic was closed, you can't send messages to it anymore."},{"code":406,"name":"TOPIC_DELETED","comment":"The specified topic was deleted."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."},{"code":403,"name":"USER_IS_BLOCKED","comment":"You were blocked by this user."},{"code":400,"name":"USER_IS_BOT","comment":"Bots can't send messages to other bots."},{"code":403,"name":"VOICE_MESSAGES_FORBIDDEN","comment":"This user's privacy settings forbid you from sending voice messages."},{"code":400,"name":"YOU_BLOCKED_USER","comment":"You blocked this user."}],"available":"both"},"messages.sendMedia":{"comment":"Send a media","arguments":{"flags":"Flags, see TL conditional fields","silent":"Send message silently (no notification should be triggered)","background":"Send message in background","clear_draft":"Clear the draft","noforwards":"Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled","update_stickersets_order":"Whether to move used stickersets to top, see here for more info on this flag »","invert_media":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.","peer":"Destination","reply_to":"If set, indicates that the message should be sent in reply to the specified message or story.","media":"Attached media","message":"Caption","random_id":"Random ID to avoid resending the same message","reply_markup":"Reply markup for bot keyboards","entities":"Message entities for styled text","schedule_date":"Scheduled message date for scheduled messages","send_as":"Send this message as the specified peer","quick_reply_shortcut":"Add the message to the specified quick reply shortcut », instead.","effect":"Specifies a message effect » to use for the message."},"throws":[{"code":400,"name":"BOT_GAMES_DISABLED","comment":"Games can't be sent to channels."},{"code":400,"name":"BOT_PAYMENTS_DISABLED","comment":"Please enable bot payments in botfather before calling this method."},{"code":400,"name":"BROADCAST_PUBLIC_VOTERS_FORBIDDEN","comment":"You can't forward polls with public voters."},{"code":400,"name":"BUTTON_DATA_INVALID","comment":"The data of one or more of the buttons you provided is invalid."},{"code":400,"name":"BUTTON_POS_INVALID","comment":"The position of one of the keyboard buttons is invalid (i.e. a Game or Pay button not in the first position, and so on...)."},{"code":400,"name":"BUTTON_TYPE_INVALID","comment":"The type of one or more of the buttons you provided is invalid."},{"code":400,"name":"BUTTON_URL_INVALID","comment":"Button URL invalid."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_FORWARDS_RESTRICTED","comment":"You can't forward messages from a protected chat."},{"code":403,"name":"CHAT_GUEST_SEND_FORBIDDEN","comment":"You join the discussion group before commenting, see here » for more info."},{"code":400,"name":"CHAT_RESTRICTED","comment":"You can't send messages in this chat, you were restricted."},{"code":403,"name":"CHAT_SEND_AUDIOS_FORBIDDEN","comment":"You can't send audio messages in this chat."},{"code":403,"name":"CHAT_SEND_DOCS_FORBIDDEN","comment":"You can't send documents in this chat."},{"code":403,"name":"CHAT_SEND_GIFS_FORBIDDEN","comment":"You can't send gifs in this chat."},{"code":403,"name":"CHAT_SEND_MEDIA_FORBIDDEN","comment":"You can't send media in this chat."},{"code":403,"name":"CHAT_SEND_PHOTOS_FORBIDDEN","comment":"You can't send photos in this chat."},{"code":403,"name":"CHAT_SEND_PLAIN_FORBIDDEN","comment":"You can't send non-media (text) messages in this chat."},{"code":403,"name":"CHAT_SEND_POLL_FORBIDDEN","comment":"You can't send polls in this chat."},{"code":403,"name":"CHAT_SEND_ROUNDVIDEOS_FORBIDDEN","comment":"You can't send round videos to this chat."},{"code":403,"name":"CHAT_SEND_STICKERS_FORBIDDEN","comment":"You can't send stickers in this chat."},{"code":403,"name":"CHAT_SEND_VIDEOS_FORBIDDEN","comment":"You can't send videos in this chat."},{"code":403,"name":"CHAT_SEND_VOICES_FORBIDDEN","comment":"You can't send voice recordings in this chat."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"CURRENCY_TOTAL_AMOUNT_INVALID","comment":"The total amount of all prices is invalid."},{"code":400,"name":"DOCUMENT_INVALID","comment":"The specified document is invalid."},{"code":400,"name":"EMOTICON_INVALID","comment":"The specified emoji is invalid."},{"code":400,"name":"ENTITY_BOUNDS_INVALID","comment":"A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length."},{"code":400,"name":"EXTERNAL_URL_INVALID","comment":"External URL invalid."},{"code":400,"name":"FILE_PARTS_INVALID","comment":"The number of file parts is invalid."},{"code":400,"name":"FILE_PART_LENGTH_INVALID","comment":"The length of a file part is invalid."},{"code":400,"name":"FILE_REFERENCE_EMPTY","comment":"An empty file reference was specified."},{"code":400,"name":"FILE_REFERENCE_EXPIRED","comment":"File reference expired, it must be refetched as described in the documentation."},{"code":400,"name":"GAME_BOT_INVALID","comment":"Bots can't send another bot's game."},{"code":400,"name":"IMAGE_PROCESS_FAILED","comment":"Failure while processing image."},{"code":400,"name":"INPUT_FILE_INVALID","comment":"The specified InputFile is invalid."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MD5_CHECKSUM_INVALID","comment":"The MD5 checksums do not match."},{"code":400,"name":"MEDIA_CAPTION_TOO_LONG","comment":"The caption is too long."},{"code":400,"name":"MEDIA_EMPTY","comment":"The provided media object is invalid."},{"code":400,"name":"MEDIA_INVALID","comment":"Media invalid."},{"code":400,"name":"MESSAGE_EMPTY","comment":"The provided message is empty."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PAYMENT_PROVIDER_INVALID","comment":"The specified payment provider is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"PHOTO_EXT_INVALID","comment":"The extension of the photo is invalid."},{"code":400,"name":"PHOTO_INVALID_DIMENSIONS","comment":"The photo dimensions are invalid."},{"code":400,"name":"PHOTO_SAVE_FILE_INVALID","comment":"Internal issues, try again later."},{"code":400,"name":"POLL_ANSWERS_INVALID","comment":"Invalid poll answers were provided."},{"code":400,"name":"POLL_ANSWER_INVALID","comment":"One of the poll answers is not acceptable."},{"code":400,"name":"POLL_OPTION_DUPLICATE","comment":"Duplicate poll options provided."},{"code":400,"name":"POLL_OPTION_INVALID","comment":"Invalid poll option provided."},{"code":400,"name":"POLL_QUESTION_INVALID","comment":"One of the poll questions is not acceptable."},{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."},{"code":403,"name":"PRIVACY_PREMIUM_REQUIRED","comment":"You need a Telegram Premium subscription to send a message to this user."},{"code":400,"name":"QUICK_REPLIES_TOO_MUCH","comment":"A maximum of appConfig.quick_replies_limit shortcuts may be created, the limit was reached."},{"code":400,"name":"QUIZ_CORRECT_ANSWERS_EMPTY","comment":"No correct quiz answer was specified."},{"code":400,"name":"QUIZ_CORRECT_ANSWERS_TOO_MUCH","comment":"You specified too many correct answers in a quiz, quizzes can only have one right answer!"},{"code":400,"name":"QUIZ_CORRECT_ANSWER_INVALID","comment":"An invalid value was provided to the correct_answers field."},{"code":400,"name":"QUIZ_MULTIPLE_INVALID","comment":"Quizzes can't have the multiple_choice flag set!"},{"code":500,"name":"RANDOM_ID_DUPLICATE","comment":"You provided a random ID that was already used."},{"code":400,"name":"REPLY_MARKUP_BUY_EMPTY","comment":"Reply markup for buy button empty."},{"code":400,"name":"REPLY_MARKUP_GAME_EMPTY","comment":"A game message is being edited, but the newly provided keyboard doesn't have a keyboardButtonGame button."},{"code":400,"name":"REPLY_MARKUP_INVALID","comment":"The provided reply markup is invalid."},{"code":400,"name":"REPLY_MARKUP_TOO_LONG","comment":"The specified reply_markup is too long."},{"code":400,"name":"REPLY_MESSAGES_TOO_MUCH","comment":"Each shortcut can contain a maximum of appConfig.quick_reply_messages_limit messages, the limit was reached."},{"code":400,"name":"SCHEDULE_BOT_NOT_ALLOWED","comment":"Bots cannot schedule messages."},{"code":400,"name":"SCHEDULE_DATE_TOO_LATE","comment":"You can't schedule a message this far in the future."},{"code":400,"name":"SCHEDULE_TOO_MUCH","comment":"There are too many scheduled messages."},{"code":400,"name":"SEND_AS_PEER_INVALID","comment":"You can't send messages as the specified peer."},{"code":420,"name":"SLOWMODE_WAIT_%d","comment":"Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat."},{"code":400,"name":"STORY_ID_INVALID","comment":"The specified story ID is invalid."},{"code":406,"name":"TOPIC_CLOSED","comment":"This topic was closed, you can't send messages to it anymore."},{"code":406,"name":"TOPIC_DELETED","comment":"The specified topic was deleted."},{"code":400,"name":"TTL_MEDIA_INVALID","comment":"Invalid media Time To Live was provided."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."},{"code":403,"name":"USER_IS_BLOCKED","comment":"You were blocked by this user."},{"code":400,"name":"USER_IS_BOT","comment":"Bots can't send messages to other bots."},{"code":400,"name":"VIDEO_CONTENT_TYPE_INVALID","comment":"The video's content type is invalid."},{"code":400,"name":"VOICE_MESSAGES_FORBIDDEN","comment":"This user's privacy settings forbid you from sending voice messages."},{"code":400,"name":"WEBDOCUMENT_MIME_INVALID","comment":"Invalid webdocument mime type provided."},{"code":400,"name":"WEBPAGE_CURL_FAILED","comment":"Failure while fetching the webpage with cURL."},{"code":400,"name":"WEBPAGE_MEDIA_EMPTY","comment":"Webpage media empty."},{"code":400,"name":"WEBPAGE_NOT_FOUND","comment":"A preview for the specified webpage url could not be generated."},{"code":400,"name":"WEBPAGE_URL_INVALID","comment":"The specified webpage url is invalid."},{"code":400,"name":"YOU_BLOCKED_USER","comment":"You blocked this user."}],"available":"both"},"messages.reportSpam":{"comment":"Report a new incoming chat for spam, if the {@link RawPeerSettings} of the chat allow us to do that","arguments":{"peer":"Peer to report"},"throws":[{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.getPeerSettings":{"comment":"Get peer settings","arguments":{"peer":"The peer"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.getChats":{"comment":"Returns chat basic info on their IDs.","arguments":{"id":"List of chat IDs"},"throws":[{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"both"},"messages.report":{"comment":"Report a message in a chat for violation of telegram's Terms of Service","arguments":{"peer":"Peer","id":"IDs of messages to report","reason":"Why are these messages being reported","message":"Comment for report moderation"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.getFullChat":{"comment":"Get full info about a basic group.","arguments":{"chat_id":"Basic group ID."},"throws":[{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"both"},"messages.editChatTitle":{"comment":"Changes chat name and sends a service message on it.","arguments":{"chat_id":"Chat ID","title":"New chat name, different from the old one"},"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"CHAT_TITLE_EMPTY","comment":"No chat title provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"both"},"messages.editChatPhoto":{"comment":"Changes chat photo and sends a service message on it","arguments":{"chat_id":"Chat ID","photo":"Photo to be set"},"throws":[{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"IMAGE_PROCESS_FAILED","comment":"Failure while processing image."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"PHOTO_CROP_SIZE_SMALL","comment":"Photo is too small."},{"code":400,"name":"PHOTO_EXT_INVALID","comment":"The extension of the photo is invalid."},{"code":400,"name":"PHOTO_INVALID","comment":"Photo invalid."}],"available":"both"},"messages.addChatUser":{"comment":"Adds a user to a chat and sends a service message on it.","arguments":{"chat_id":"Chat ID","user_id":"User ID to be added","fwd_limit":"Number of last messages to be forwarded"},"throws":[{"code":400,"name":"BOT_GROUPS_BLOCKED","comment":"This bot can't be added to groups."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USERS_TOO_MUCH","comment":"The maximum number of users has been exceeded (to create a chat, for example)."},{"code":400,"name":"USER_ALREADY_PARTICIPANT","comment":"The user is already in the group."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."},{"code":400,"name":"USER_IS_BLOCKED","comment":"You were blocked by this user."},{"code":403,"name":"USER_NOT_MUTUAL_CONTACT","comment":"The provided user is not a mutual contact."},{"code":403,"name":"USER_PRIVACY_RESTRICTED","comment":"The user's privacy settings do not allow you to do this."},{"code":400,"name":"YOU_BLOCKED_USER","comment":"You blocked this user."}],"available":"user"},"messages.deleteChatUser":{"comment":"Deletes a user from a chat and sends a service message on it.","arguments":{"flags":"Flags, see TL conditional fields","revoke_history":"Remove the entire chat history of the specified user in this chat.","chat_id":"Chat ID","user_id":"User ID to be deleted"},"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."},{"code":400,"name":"USER_NOT_PARTICIPANT","comment":"You're not a member of this supergroup/channel."}],"available":"both"},"messages.getDhConfig":{"comment":"Returns configuration parameters for Diffie-Hellman key generation. Can also return a random sequence of bytes of required length.","arguments":{"version":"Value of the version parameter from {@link messages.RawDhConfig}, available at the client","random_length":"Length of the required random sequence"},"throws":[{"code":400,"name":"RANDOM_LENGTH_INVALID","comment":"Random length invalid."}],"available":"user"},"messages.requestEncryption":{"comment":"Sends a request to start a secret chat to the user.","arguments":{"user_id":"User ID","random_id":"Unique client request ID required to prevent resending. This also doubles as the chat ID.","g_a":"A = g ^ a mod p, see Wikipedia"},"throws":[{"code":400,"name":"DH_G_A_INVALID","comment":"g_a invalid."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"user"},"messages.acceptEncryption":{"comment":"Confirms creation of a secret chat","arguments":{"peer":"Secret chat ID","g_b":"B = g ^ b mod p, see Wikipedia","key_fingerprint":"64-bit fingerprint of the received key"},"throws":[{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"ENCRYPTION_ALREADY_ACCEPTED","comment":"Secret chat already accepted."},{"code":400,"name":"ENCRYPTION_ALREADY_DECLINED","comment":"The secret chat was already declined."}],"available":"user"},"messages.discardEncryption":{"comment":"Cancels a request for creation and/or delete info on secret chat.","arguments":{"flags":"Flags, see TL conditional fields","delete_history":"Whether to delete the entire chat history for the other user as well","chat_id":"Secret chat ID"},"throws":[{"code":400,"name":"CHAT_ID_EMPTY","comment":"The provided chat ID is empty."},{"code":400,"name":"ENCRYPTION_ALREADY_ACCEPTED","comment":"Secret chat already accepted."},{"code":400,"name":"ENCRYPTION_ALREADY_DECLINED","comment":"The secret chat was already declined."},{"code":400,"name":"ENCRYPTION_ID_INVALID","comment":"The provided secret chat ID is invalid."}],"available":"user"},"messages.setEncryptedTyping":{"comment":"Send typing event by the current user to a secret chat.","arguments":{"peer":"Secret chat ID","typing":"Typing.
    Possible values:
    true, if the user started typing and more than 5 seconds have passed since the last request
    false, if the user stopped typing"},"throws":[{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."}],"available":"user"},"messages.readEncryptedHistory":{"comment":"Marks message history within a secret chat as read.","arguments":{"peer":"Secret chat ID","max_date":"Maximum date value for received messages in history"},"throws":[{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"MAX_DATE_INVALID","comment":"The specified maximum date is invalid."},{"code":400,"name":"MSG_WAIT_FAILED","comment":"A waiting call returned an error."}],"available":"user"},"messages.sendEncrypted":{"comment":"Sends a text message to a secret chat.","arguments":{"flags":"Flags, see TL conditional fields","silent":"Send encrypted message without a notification","peer":"Secret chat ID","random_id":"Unique client message ID, necessary to avoid message resending","data":"TL-serialization of DecryptedMessage type, encrypted with a key that was created during chat initialization"},"throws":[{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"DATA_INVALID","comment":"Encrypted data invalid."},{"code":400,"name":"DATA_TOO_LONG","comment":"Data too long."},{"code":400,"name":"ENCRYPTION_DECLINED","comment":"The secret chat was declined."},{"code":500,"name":"MSG_WAIT_FAILED","comment":"A waiting call returned an error."},{"code":403,"name":"USER_IS_BLOCKED","comment":"You were blocked by this user."}],"available":"user"},"messages.sendEncryptedService":{"comment":"Sends a service message to a secret chat.","arguments":{"peer":"Secret chat ID","random_id":"Unique client message ID required to prevent message resending","data":"TL-serialization of DecryptedMessage type, encrypted with a key generated during chat initialization"},"throws":[{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"DATA_INVALID","comment":"Encrypted data invalid."},{"code":400,"name":"ENCRYPTION_DECLINED","comment":"The secret chat was declined."},{"code":400,"name":"ENCRYPTION_ID_INVALID","comment":"The provided secret chat ID is invalid."},{"code":500,"name":"MSG_WAIT_FAILED","comment":"A waiting call returned an error."},{"code":403,"name":"USER_DELETED","comment":"You can't send this secret message because the other participant deleted their account."},{"code":403,"name":"USER_IS_BLOCKED","comment":"You were blocked by this user."}],"available":"user"},"messages.readMessageContents":{"comment":"Notifies the sender about the recipient having listened a voice message or watched a video.","arguments":{"id":"Message ID list"},"available":"user"},"messages.reportEncryptedSpam":{"comment":"Report a secret chat for spam","arguments":{"peer":"The secret chat to report"},"throws":[{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."}],"available":"user"},"messages.getStickers":{"comment":"Get stickers by emoji","arguments":{"emoticon":"The emoji","hash":"Hash used for caching, for more info click here."},"throws":[{"code":400,"name":"EMOTICON_EMPTY","comment":"The emoji is empty."}],"available":"user"},"messages.exportChatInvite":{"comment":"Export an invite link for a chat","arguments":{"flags":"Flags, see TL conditional fields","legacy_revoke_permanent":"Legacy flag, reproducing legacy behavior of this method: if set, revokes all previous links before creating a new one. Kept for bot API BC, should not be used by modern clients.","request_needed":"Whether admin confirmation is required before admitting each separate user into the chat","peer":"Chat","expire_date":"Expiration date","usage_limit":"Maximum number of users that can join using this link","title":"Description of the invite link, visible only to administrators"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"EXPIRE_DATE_INVALID","comment":"The specified expiration date is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USAGE_LIMIT_INVALID","comment":"The specified usage limit is invalid."}],"available":"both"},"messages.getWebPagePreview":{"comment":"Get preview of webpage","arguments":{"flags":"Flags, see TL conditional fields","message":"Message from which to extract the preview","entities":"Message entities for styled text"},"throws":[{"code":400,"name":"ENTITY_BOUNDS_INVALID","comment":"A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length."},{"code":400,"name":"MESSAGE_EMPTY","comment":"The provided message is empty."}],"available":"user"},"messages.checkChatInvite":{"comment":"Check the validity of a chat invite link and get basic info about it","arguments":{"hash":"Invite hash from chat invite deep link »."},"throws":[{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"INVITE_HASH_EMPTY","comment":"The invite hash is empty."},{"code":406,"name":"INVITE_HASH_EXPIRED","comment":"The invite link has expired."},{"code":400,"name":"INVITE_HASH_INVALID","comment":"The invite hash is invalid."}],"available":"user"},"messages.getAllStickers":{"comment":"Get all installed stickers","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"messages.importChatInvite":{"comment":"Import a chat invite and join a private chat/supergroup/channel","arguments":{"hash":"hash from a chat invite deep link"},"throws":[{"code":400,"name":"CHANNELS_TOO_MUCH","comment":"You have joined too many channels/supergroups."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_INVALID","comment":"Invalid chat."},{"code":400,"name":"INVITE_HASH_EMPTY","comment":"The invite hash is empty."},{"code":406,"name":"INVITE_HASH_EXPIRED","comment":"The invite link has expired."},{"code":400,"name":"INVITE_HASH_INVALID","comment":"The invite hash is invalid."},{"code":400,"name":"INVITE_REQUEST_SENT","comment":"You have successfully requested to join this chat or channel."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USERS_TOO_MUCH","comment":"The maximum number of users has been exceeded (to create a chat, for example)."},{"code":400,"name":"USER_ALREADY_PARTICIPANT","comment":"The user is already in the group."},{"code":400,"name":"USER_CHANNELS_TOO_MUCH","comment":"One of the users you tried to add is already in too many channels/supergroups."}],"available":"user"},"messages.getStickerSet":{"comment":"Get info about a stickerset","arguments":{"stickerset":"Stickerset","hash":"Hash used for caching, for more info click here"},"throws":[{"code":400,"name":"EMOTICON_STICKERPACK_MISSING","comment":"inputStickerSetDice.emoji cannot be empty."},{"code":406,"name":"STICKERSET_INVALID","comment":"The provided sticker set is invalid."}],"available":"both"},"messages.uninstallStickerSet":{"comment":"Uninstall a stickerset","arguments":{"stickerset":"The stickerset to uninstall"},"throws":[{"code":406,"name":"STICKERSET_INVALID","comment":"The provided sticker set is invalid."}],"available":"user"},"messages.installStickerSet":{"comment":"Install a stickerset","arguments":{"stickerset":"Stickerset to install","archived":"Whether to archive stickerset"},"throws":[{"code":406,"name":"STICKERSET_INVALID","comment":"The provided sticker set is invalid."}],"available":"user"},"messages.startBot":{"comment":"Start a conversation with a bot using a deep linking parameter","arguments":{"bot":"The bot","peer":"The chat where to start the bot, can be the bot's private chat or a group","random_id":"Random ID to avoid resending the same message","start_param":"Deep linking parameter"},"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":500,"name":"RANDOM_ID_DUPLICATE","comment":"You provided a random ID that was already used."},{"code":400,"name":"START_PARAM_EMPTY","comment":"The start parameter is empty."},{"code":400,"name":"START_PARAM_INVALID","comment":"Start parameter invalid."},{"code":400,"name":"START_PARAM_TOO_LONG","comment":"Start parameter is too long."}],"available":"user"},"messages.getMessagesViews":{"comment":"Get and increase the view counter of a message sent or forwarded from a channel","arguments":{"peer":"Peer where the message was found","id":"ID of message","increment":"Whether to mark the message as viewed and increment the view counter"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.createChat":{"comment":"Creates a new chat.","arguments":{"flags":"Flags, see TL conditional fields","users":"List of user IDs to be invited","title":"Chat name","ttl_period":"Time-to-live of all messages that will be sent in the chat: once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. You can use {@link messages.RawSetDefaultHistoryTTLRequest} to edit this value later."},"throws":[{"code":500,"name":"CHAT_ID_GENERATE_FAILED","comment":"Failure while generating the chat ID."},{"code":400,"name":"CHAT_INVALID","comment":"Invalid chat."},{"code":400,"name":"CHAT_TITLE_EMPTY","comment":"No chat title provided."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"TTL_PERIOD_INVALID","comment":"The specified TTL period is invalid."},{"code":400,"name":"USERS_TOO_FEW","comment":"Not enough users (to create a chat, for example)."},{"code":406,"name":"USER_RESTRICTED","comment":"You're spamreported, you can't create channels or chats."}],"available":"user"},"messages.editChatAdmin":{"comment":"Make a user admin in a basic group.","arguments":{"chat_id":"The ID of the group","user_id":"The user to make admin","is_admin":"Whether to make them admin"},"throws":[{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."},{"code":400,"name":"USER_NOT_PARTICIPANT","comment":"You're not a member of this supergroup/channel."}],"available":"user"},"messages.migrateChat":{"comment":"Turn a basic group into a supergroup","arguments":{"chat_id":"Basic group to migrate"},"throws":[{"code":400,"name":"CHANNELS_TOO_MUCH","comment":"You have joined too many channels/supergroups."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":500,"name":"CHAT_INVALID","comment":"Invalid chat."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.reorderStickerSets":{"comment":"Reorder installed stickersets","arguments":{"flags":"Flags, see TL conditional fields","masks":"Reorder mask stickersets","emojis":"Reorder custom emoji stickersets","order":"New stickerset order by stickerset IDs"},"available":"user"},"messages.sendEncryptedFile":{"comment":"Sends a message with a file attachment to a secret chat","arguments":{"flags":"Flags, see TL conditional fields","silent":"Whether to send the file without triggering a notification","peer":"Secret chat ID","random_id":"Unique client message ID necessary to prevent message resending","data":"TL-serialization of DecryptedMessage type, encrypted with a key generated during chat initialization","file":"File attachment for the secret chat"},"throws":[{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"DATA_TOO_LONG","comment":"Data too long."},{"code":400,"name":"ENCRYPTION_DECLINED","comment":"The secret chat was declined."},{"code":400,"name":"FILE_EMTPY","comment":"An empty file was provided."},{"code":400,"name":"MD5_CHECKSUM_INVALID","comment":"The MD5 checksums do not match."},{"code":400,"name":"MSG_WAIT_FAILED","comment":"A waiting call returned an error."}],"available":"user"},"messages.searchGlobal":{"comment":"Search for messages and peers globally","arguments":{"flags":"Flags, see TL conditional fields","broadcasts_only":"If set, only returns results from channels (used in the global channel search tab »).","folder_id":"Peer folder ID, for more info click here","q":"Query","filter":"Global search filter","min_date":"If a positive value was specified, the method will return only messages with date bigger than min_date","max_date":"If a positive value was transferred, the method will return only messages with date smaller than max_date","offset_rate":"Initially 0, then set to the {@link messages.RawMessagesSlice}","offset_peer":"Offsets for pagination, for more info click here","offset_id":"Offsets for pagination, for more info click here","limit":"Offsets for pagination, for more info click here"},"throws":[{"code":400,"name":"FOLDER_ID_INVALID","comment":"Invalid folder ID."},{"code":400,"name":"INPUT_FILTER_INVALID","comment":"The specified filter is invalid."},{"code":400,"name":"SEARCH_QUERY_EMPTY","comment":"The search query is empty."}],"available":"user"},"messages.receivedQueue":{"comment":"Confirms receipt of messages in a secret chat by client, cancels push notifications.
    \nThe method returns a list of random_ids of messages for which push notifications were cancelled.","arguments":{"max_qts":"Maximum qts value available at the client"},"throws":[{"code":400,"name":"MAX_QTS_INVALID","comment":"The specified max_qts is invalid."},{"code":500,"name":"MSG_WAIT_FAILED","comment":"A waiting call returned an error."}],"available":"user"},"messages.getSavedGifs":{"comment":"Get saved GIFs.","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"messages.getInlineBotResults":{"comment":"Query an inline bot","arguments":{"flags":"Flags, see TL conditional fields","bot":"The bot to query","peer":"The currently opened chat","geo_point":"The geolocation, if requested","query":"The query","offset":"The offset within the results, will be passed directly as-is to the bot."},"throws":[{"code":400,"name":"BOT_INLINE_DISABLED","comment":"This bot can't be used in inline mode."},{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."},{"code":400,"name":"BOT_RESPONSE_TIMEOUT","comment":"A timeout occurred while fetching data from the bot."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":-503,"name":"Timeout","comment":"Timeout while fetching data."}],"available":"user"},"messages.getDocumentByHash":{"comment":"Get a document by its SHA256 hash, mainly used for gifs","arguments":{"sha256":"SHA256 of file","size":"Size of the file in bytes","mime_type":"Mime type"},"throws":[{"code":400,"name":"SHA256_HASH_INVALID","comment":"The provided SHA256 hash is invalid."}],"available":"both"},"messages.setInlineBotResults":{"comment":"Answer an inline query, for bots only","arguments":{"flags":"Flags, see TL conditional fields","gallery":"Set this flag if the results are composed of media files","private":"Set this flag if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query","query_id":"Unique identifier for the answered query","results":"Vector of results for the inline query","cache_time":"The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.","next_offset":"Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes.","switch_pm":"If passed, clients will display a button on top of the remaining inline result list with the specified text, that switches the user to a private chat with the bot and sends the bot a start message with a certain parameter.","switch_webview":"If passed, clients will display a button on top of the remaining inline result list with the specified text, that switches the user to the specified inline mode mini app."},"throws":[{"code":400,"name":"ARTICLE_TITLE_EMPTY","comment":"The title of the article is empty."},{"code":400,"name":"AUDIO_CONTENT_URL_EMPTY","comment":"The remote URL specified in the content field is empty."},{"code":400,"name":"AUDIO_TITLE_EMPTY","comment":"An empty audio title was provided."},{"code":400,"name":"BUTTON_DATA_INVALID","comment":"The data of one or more of the buttons you provided is invalid."},{"code":400,"name":"BUTTON_TYPE_INVALID","comment":"The type of one or more of the buttons you provided is invalid."},{"code":400,"name":"BUTTON_URL_INVALID","comment":"Button URL invalid."},{"code":400,"name":"DOCUMENT_INVALID","comment":"The specified document is invalid."},{"code":400,"name":"FILE_CONTENT_TYPE_INVALID","comment":"File content-type is invalid."},{"code":400,"name":"FILE_TITLE_EMPTY","comment":"An empty file title was specified."},{"code":400,"name":"GIF_CONTENT_TYPE_INVALID","comment":"GIF content-type invalid."},{"code":400,"name":"MESSAGE_EMPTY","comment":"The provided message is empty."},{"code":400,"name":"MESSAGE_TOO_LONG","comment":"The provided message is too long."},{"code":400,"name":"NEXT_OFFSET_INVALID","comment":"The specified offset is longer than 64 bytes."},{"code":400,"name":"PHOTO_CONTENT_TYPE_INVALID","comment":"Photo mime-type invalid."},{"code":400,"name":"PHOTO_CONTENT_URL_EMPTY","comment":"Photo URL invalid."},{"code":400,"name":"PHOTO_INVALID","comment":"Photo invalid."},{"code":400,"name":"PHOTO_THUMB_URL_EMPTY","comment":"Photo thumbnail URL is empty."},{"code":400,"name":"QUERY_ID_INVALID","comment":"The query ID is invalid."},{"code":400,"name":"REPLY_MARKUP_INVALID","comment":"The provided reply markup is invalid."},{"code":400,"name":"RESULTS_TOO_MUCH","comment":"Too many results were provided."},{"code":400,"name":"RESULT_ID_DUPLICATE","comment":"You provided a duplicate result ID."},{"code":400,"name":"RESULT_ID_INVALID","comment":"One of the specified result IDs is invalid."},{"code":400,"name":"RESULT_TYPE_INVALID","comment":"Result type invalid."},{"code":400,"name":"SEND_MESSAGE_MEDIA_INVALID","comment":"Invalid media provided."},{"code":400,"name":"SEND_MESSAGE_TYPE_INVALID","comment":"The message type is invalid."},{"code":400,"name":"START_PARAM_EMPTY","comment":"The start parameter is empty."},{"code":400,"name":"START_PARAM_INVALID","comment":"Start parameter invalid."},{"code":400,"name":"STICKER_DOCUMENT_INVALID","comment":"The specified sticker document is invalid."},{"code":400,"name":"SWITCH_PM_TEXT_EMPTY","comment":"The switch_pm.text field was empty."},{"code":400,"name":"SWITCH_WEBVIEW_URL_INVALID","comment":"The URL specified in switch_webview.url is invalid!"},{"code":400,"name":"URL_INVALID","comment":"Invalid URL provided."},{"code":403,"name":"USER_BOT_INVALID","comment":"User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."},{"code":400,"name":"VIDEO_TITLE_EMPTY","comment":"The specified video title is empty."},{"code":400,"name":"WEBDOCUMENT_INVALID","comment":"Invalid webdocument URL provided."},{"code":400,"name":"WEBDOCUMENT_MIME_INVALID","comment":"Invalid webdocument mime type provided."},{"code":400,"name":"WEBDOCUMENT_SIZE_TOO_BIG","comment":"Webdocument is too big!"},{"code":400,"name":"WEBDOCUMENT_URL_INVALID","comment":"The specified webdocument URL is invalid."}],"available":"bot"},"messages.getMessageEditData":{"comment":"Find out if a media message's caption can be edited","arguments":{"peer":"Peer where the media was sent","id":"ID of message"},"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":403,"name":"MESSAGE_AUTHOR_REQUIRED","comment":"Message author required."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.sendInlineBotResult":{"comment":"Send a result obtained using {@link messages.RawGetInlineBotResultsRequest}.","arguments":{"flags":"Flags, see TL conditional fields","silent":"Whether to send the message silently (no notification will be triggered on the other client)","background":"Whether to send the message in background","clear_draft":"Whether to clear the draft","hide_via":"Whether to hide the via @botname in the resulting message (only for bot usernames encountered in the {@link RawConfig})","peer":"Destination","reply_to":"If set, indicates that the message should be sent in reply to the specified message or story.","random_id":"Random ID to avoid resending the same query","query_id":"Query ID from {@link messages.RawGetInlineBotResultsRequest}","id":"Result ID from {@link messages.RawGetInlineBotResultsRequest}","schedule_date":"Scheduled message date for scheduled messages","send_as":"Send this message as the specified peer","quick_reply_shortcut":"Add the message to the specified quick reply shortcut », instead."},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_GUEST_SEND_FORBIDDEN","comment":"You join the discussion group before commenting, see here » for more info."},{"code":400,"name":"CHAT_RESTRICTED","comment":"You can't send messages in this chat, you were restricted."},{"code":403,"name":"CHAT_SEND_AUDIOS_FORBIDDEN","comment":"You can't send audio messages in this chat."},{"code":403,"name":"CHAT_SEND_GAME_FORBIDDEN","comment":"You can't send a game to this chat."},{"code":403,"name":"CHAT_SEND_GIFS_FORBIDDEN","comment":"You can't send gifs in this chat."},{"code":403,"name":"CHAT_SEND_INLINE_FORBIDDEN","comment":"You can't send inline messages in this group."},{"code":403,"name":"CHAT_SEND_MEDIA_FORBIDDEN","comment":"You can't send media in this chat."},{"code":403,"name":"CHAT_SEND_PHOTOS_FORBIDDEN","comment":"You can't send photos in this chat."},{"code":403,"name":"CHAT_SEND_PLAIN_FORBIDDEN","comment":"You can't send non-media (text) messages in this chat."},{"code":403,"name":"CHAT_SEND_STICKERS_FORBIDDEN","comment":"You can't send stickers in this chat."},{"code":403,"name":"CHAT_SEND_VOICES_FORBIDDEN","comment":"You can't send voice recordings in this chat."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"ENTITY_BOUNDS_INVALID","comment":"A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length."},{"code":400,"name":"INLINE_RESULT_EXPIRED","comment":"The inline query expired."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MEDIA_EMPTY","comment":"The provided media object is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"QUERY_ID_EMPTY","comment":"The query ID is empty."},{"code":400,"name":"QUICK_REPLIES_TOO_MUCH","comment":"A maximum of appConfig.quick_replies_limit shortcuts may be created, the limit was reached."},{"code":500,"name":"RANDOM_ID_DUPLICATE","comment":"You provided a random ID that was already used."},{"code":400,"name":"REPLY_MESSAGES_TOO_MUCH","comment":"Each shortcut can contain a maximum of appConfig.quick_reply_messages_limit messages, the limit was reached."},{"code":400,"name":"RESULT_ID_EMPTY","comment":"Result ID empty."},{"code":400,"name":"RESULT_ID_INVALID","comment":"One of the specified result IDs is invalid."},{"code":400,"name":"SCHEDULE_DATE_TOO_LATE","comment":"You can't schedule a message this far in the future."},{"code":400,"name":"SCHEDULE_TOO_MUCH","comment":"There are too many scheduled messages."},{"code":500,"name":"SEND_MEDIA_INVALID","comment":"The specified media is invalid."},{"code":420,"name":"SLOWMODE_WAIT_%d","comment":"Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat."},{"code":400,"name":"TOPIC_DELETED","comment":"The specified topic was deleted."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."},{"code":400,"name":"VOICE_MESSAGES_FORBIDDEN","comment":"This user's privacy settings forbid you from sending voice messages."},{"code":400,"name":"WEBPAGE_CURL_FAILED","comment":"Failure while fetching the webpage with cURL."},{"code":400,"name":"WEBPAGE_MEDIA_EMPTY","comment":"Webpage media empty."},{"code":400,"name":"YOU_BLOCKED_USER","comment":"You blocked this user."}],"available":"user"},"messages.editMessage":{"comment":"Edit message","arguments":{"flags":"Flags, see TL conditional fields","no_webpage":"Disable webpage preview","invert_media":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.","peer":"Where was the message sent","id":"ID of the message to edit","message":"New message","media":"New attached media","reply_markup":"Reply markup for inline keyboards","entities":"Message entities for styled text","schedule_date":"Scheduled message date for scheduled messages","quick_reply_shortcut_id":"If specified, edits a quick reply shortcut message, instead »."},"throws":[{"code":400,"name":"BOT_DOMAIN_INVALID","comment":"Bot domain invalid."},{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."},{"code":400,"name":"BUTTON_DATA_INVALID","comment":"The data of one or more of the buttons you provided is invalid."},{"code":400,"name":"BUTTON_TYPE_INVALID","comment":"The type of one or more of the buttons you provided is invalid."},{"code":400,"name":"BUTTON_URL_INVALID","comment":"Button URL invalid."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_FORWARDS_RESTRICTED","comment":"You can't forward messages from a protected chat."},{"code":403,"name":"CHAT_SEND_GIFS_FORBIDDEN","comment":"You can't send gifs in this chat."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"DOCUMENT_INVALID","comment":"The specified document is invalid."},{"code":400,"name":"ENTITIES_TOO_LONG","comment":"You provided too many styled message entities."},{"code":400,"name":"ENTITY_BOUNDS_INVALID","comment":"A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length."},{"code":400,"name":"FILE_PARTS_INVALID","comment":"The number of file parts is invalid."},{"code":400,"name":"IMAGE_PROCESS_FAILED","comment":"Failure while processing image."},{"code":403,"name":"INLINE_BOT_REQUIRED","comment":"Only the inline bot can edit message."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MEDIA_CAPTION_TOO_LONG","comment":"The caption is too long."},{"code":400,"name":"MEDIA_EMPTY","comment":"The provided media object is invalid."},{"code":400,"name":"MEDIA_GROUPED_INVALID","comment":"You tried to send media of different types in an album."},{"code":400,"name":"MEDIA_INVALID","comment":"Media invalid."},{"code":400,"name":"MEDIA_NEW_INVALID","comment":"The new media is invalid."},{"code":400,"name":"MEDIA_PREV_INVALID","comment":"Previous media invalid."},{"code":400,"name":"MEDIA_TTL_INVALID","comment":"The specified media TTL is invalid."},{"code":403,"name":"MESSAGE_AUTHOR_REQUIRED","comment":"Message author required."},{"code":400,"name":"MESSAGE_EDIT_TIME_EXPIRED","comment":"You can't edit this message anymore, too much time has passed since its creation."},{"code":400,"name":"MESSAGE_EMPTY","comment":"The provided message is empty."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"MESSAGE_NOT_MODIFIED","comment":"The provided message data is identical to the previous message data, the message wasn't modified."},{"code":400,"name":"MESSAGE_TOO_LONG","comment":"The provided message is too long."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":500,"name":"MSG_WAIT_FAILED","comment":"A waiting call returned an error."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"REPLY_MARKUP_INVALID","comment":"The provided reply markup is invalid."},{"code":400,"name":"REPLY_MARKUP_TOO_LONG","comment":"The specified reply_markup is too long."},{"code":400,"name":"SCHEDULE_DATE_INVALID","comment":"Invalid schedule date provided."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."},{"code":400,"name":"WEBPAGE_NOT_FOUND","comment":"A preview for the specified webpage url could not be generated."}],"available":"both"},"messages.editInlineBotMessage":{"comment":"Edit an inline bot message","arguments":{"flags":"Flags, see TL conditional fields","no_webpage":"Disable webpage preview","invert_media":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.","id":"Sent inline message ID","message":"Message","media":"Media","reply_markup":"Reply markup for inline keyboards","entities":"Message entities for styled text"},"throws":[{"code":400,"name":"BUTTON_DATA_INVALID","comment":"The data of one or more of the buttons you provided is invalid."},{"code":400,"name":"ENTITY_BOUNDS_INVALID","comment":"A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"MESSAGE_NOT_MODIFIED","comment":"The provided message data is identical to the previous message data, the message wasn't modified."}],"available":"both"},"messages.getBotCallbackAnswer":{"comment":"Press an inline callback button and get a callback answer from the bot","arguments":{"flags":"Flags, see TL conditional fields","game":"Whether this is a \"play game\" button","peer":"Where was the inline keyboard sent","msg_id":"ID of the Message with the inline keyboard","data":"Callback data","password":"For buttons {@link RawKeyboardButtonCallback}, the SRP payload generated using SRP."},"throws":[{"code":400,"name":"BOT_RESPONSE_TIMEOUT","comment":"A timeout occurred while fetching data from the bot."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"DATA_INVALID","comment":"Encrypted data invalid."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"PASSWORD_MISSING","comment":"You must enable 2FA before executing this operation."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":-503,"name":"Timeout","comment":"Timeout while fetching data."}],"available":"user"},"messages.setBotCallbackAnswer":{"comment":"Set the callback answer to a user button press (bots only)","arguments":{"flags":"Flags, see TL conditional fields","alert":"Whether to show the message as a popup instead of a toast notification","query_id":"Query ID","message":"Popup to show","url":"URL to open","cache_time":"Cache validity"},"throws":[{"code":400,"name":"MESSAGE_TOO_LONG","comment":"The provided message is too long."},{"code":400,"name":"QUERY_ID_INVALID","comment":"The query ID is invalid."},{"code":400,"name":"URL_INVALID","comment":"Invalid URL provided."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},"messages.saveDraft":{"comment":"Save a message draft associated to a chat.","arguments":{"flags":"Flags, see TL conditional fields","no_webpage":"Disable generation of the webpage preview","invert_media":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.","reply_to":"If set, indicates that the message should be sent in reply to the specified message or story.","peer":"Destination of the message that should be sent","message":"The draft","entities":"Message entities for styled text","media":"Attached media","effect":"Specifies a message effect » to use for the message."},"throws":[{"code":400,"name":"ENTITY_BOUNDS_INVALID","comment":"A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.getFeaturedStickers":{"comment":"Get featured stickers","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"messages.getPeerDialogs":{"comment":"Get dialog info of specified peers","arguments":{"peers":"Peers"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.readFeaturedStickers":{"comment":"Mark new featured stickers as read","arguments":{"id":"IDs of stickersets to mark as read"},"available":"user"},"messages.saveGif":{"comment":"Add GIF to saved gifs list","arguments":{"id":"GIF to save","unsave":"Whether to remove GIF from saved gifs list"},"throws":[{"code":400,"name":"GIF_ID_INVALID","comment":"The provided GIF ID is invalid."}],"available":"user"},"messages.getRecentStickers":{"comment":"Get recent stickers","arguments":{"flags":"Flags, see TL conditional fields","attached":"Get stickers recently attached to photo or video files","hash":"Hash used for caching, for more info click here."},"available":"user"},"messages.getAllDrafts":{"comment":"Return all message drafts.
    \nReturns all the latest {@link RawUpdateDraftMessage} updates related to all chats with drafts.","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"messages.saveRecentSticker":{"comment":"Add/remove sticker from recent stickers list","arguments":{"flags":"Flags, see TL conditional fields","attached":"Whether to add/remove stickers recently attached to photo or video files","id":"Sticker","unsave":"Whether to save or unsave the sticker"},"throws":[{"code":400,"name":"STICKER_ID_INVALID","comment":"The provided sticker ID is invalid."}],"available":"user"},"messages.clearRecentStickers":{"comment":"Clear recent stickers","arguments":{"flags":"Flags, see TL conditional fields","attached":"Set this flag to clear the list of stickers recently attached to photo or video files"},"available":"user"},"messages.getArchivedStickers":{"comment":"Get all archived stickers","arguments":{"flags":"Flags, see TL conditional fields","masks":"Get mask stickers","emojis":"Get custom emoji stickers","offset_id":"Offsets for pagination, for more info click here","limit":"Maximum number of results to return, see pagination"},"available":"user"},"messages.getMaskStickers":{"comment":"Get installed mask stickers","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"messages.setInlineGameScore":{"comment":"Use this method to set the score of the specified user in a game sent as an inline message (bots only).","arguments":{"flags":"Flags, see TL conditional fields","edit_message":"Set this flag if the game message should be automatically edited to include the current scoreboard","force":"Set this flag if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters","id":"ID of the inline message","user_id":"User identifier","score":"New score"},"throws":[{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},"messages.getInlineGameHighScores":{"comment":"Get highscores of a game sent using an inline bot","arguments":{"id":"ID of inline message","user_id":"Get high scores of a certain user"},"throws":[{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},"messages.getWebPage":{"comment":"Get instant view page","arguments":{"url":"URL of IV page to fetch","hash":"Hash used for caching, for more info click here.
    Note: the usual hash generation algorithm cannot be used in this case, please re-use the {@link RawWebPage}.hash field returned by a previous call to the method, or pass 0 if this is the first call or if the previous call did not return a {@link RawWebPage}."},"throws":[{"code":400,"name":"WC_CONVERT_URL_INVALID","comment":"WC convert URL invalid."}],"available":"user"},"messages.getCommonChats":{"comment":"Get chats in common with a user","arguments":{"user_id":"User ID","max_id":"Maximum ID of chat to return (see pagination)","limit":"Maximum number of results to return, see pagination"},"throws":[{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"user"},"messages.toggleDialogPin":{"comment":"Pin/unpin a dialog","arguments":{"flags":"Flags, see TL conditional fields","pinned":"Whether to pin or unpin the dialog","peer":"The dialog to pin"},"throws":[{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"PEER_HISTORY_EMPTY","comment":"You can't pin an empty chat with a user."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"PINNED_DIALOGS_TOO_MUCH","comment":"Too many pinned dialogs."}],"available":"user"},"messages.reorderPinnedDialogs":{"comment":"Reorder pinned dialogs","arguments":{"flags":"Flags, see TL conditional fields","force":"If set, dialogs pinned server-side but not present in the order field will be unpinned.","folder_id":"Peer folder ID, for more info click here","order":"New dialog order"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.setBotShippingResults":{"comment":"If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the bot will receive an {@link RawUpdateBotShippingQuery} update. Use this method to reply to shipping queries.","arguments":{"flags":"Flags, see TL conditional fields","query_id":"Unique identifier for the query to be answered","error":"Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable\"). Telegram will display this message to the user.","shipping_options":"A vector of available shipping options."},"throws":[{"code":400,"name":"QUERY_ID_INVALID","comment":"The query ID is invalid."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},"messages.getPinnedDialogs":{"comment":"Get pinned dialogs","arguments":{"folder_id":"Peer folder ID, for more info click here"},"throws":[{"code":400,"name":"FOLDER_ID_INVALID","comment":"Invalid folder ID."}],"available":"user"},"messages.setBotPrecheckoutResults":{"comment":"Once the user has confirmed their payment and shipping details, the bot receives an {@link RawUpdateBotPrecheckoutQuery} update.
    \nUse this method to respond to such pre-checkout queries.
    \nNote: Telegram must receive an answer within 10 seconds after the pre-checkout query was sent.","arguments":{"flags":"Flags, see TL conditional fields","success":"Set this flag if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order, otherwise do not set it, and set the error field, instead","query_id":"Unique identifier for the query to be answered","error":"Required if the success isn't set. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. \"Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!\"). Telegram will display this message to the user."},"throws":[{"code":400,"name":"ERROR_TEXT_EMPTY","comment":"The provided error message is empty."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},"messages.getFavedStickers":{"comment":"Get faved stickers","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"messages.uploadMedia":{"comment":"Upload a file and associate it to a chat (without actually sending it to the chat)","arguments":{"flags":"Flags, see TL conditional fields","business_connection_id":"Whether the media will be used only in the specified business connection », and not directly by the bot.","peer":"The chat, can be {@link RawInputPeerEmpty} for bots and {@link RawInputPeerSelf} for users.","media":"File uploaded in chunks as described in files »"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_RESTRICTED","comment":"You can't send messages in this chat, you were restricted."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"FILE_PARTS_INVALID","comment":"The number of file parts is invalid."},{"code":400,"name":"FILE_PART_LENGTH_INVALID","comment":"The length of a file part is invalid."},{"code":400,"name":"IMAGE_PROCESS_FAILED","comment":"Failure while processing image."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MEDIA_INVALID","comment":"Media invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"PHOTO_EXT_INVALID","comment":"The extension of the photo is invalid."},{"code":400,"name":"PHOTO_INVALID_DIMENSIONS","comment":"The photo dimensions are invalid."},{"code":400,"name":"PHOTO_SAVE_FILE_INVALID","comment":"Internal issues, try again later."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."},{"code":400,"name":"WEBPAGE_CURL_FAILED","comment":"Failure while fetching the webpage with cURL."}],"available":"both"},"messages.faveSticker":{"comment":"Mark or unmark a sticker as favorite","arguments":{"id":"Sticker in question","unfave":"Whether to add or remove a sticker from favorites"},"throws":[{"code":400,"name":"STICKER_ID_INVALID","comment":"The provided sticker ID is invalid."}],"available":"user"},"messages.sendScreenshotNotification":{"comment":"Notify the other user in a private chat that a screenshot of the chat was taken","arguments":{"peer":"Other user","reply_to":"Indicates the message that was screenshotted (the specified message ID can also be 0 to avoid indicating any specific message).","random_id":"Random ID to avoid message resending"},"throws":[{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"REPLY_MESSAGE_ID_INVALID","comment":"The specified reply-to message ID is invalid."},{"code":400,"name":"STORY_ID_INVALID","comment":"The specified story ID is invalid."},{"code":400,"name":"YOU_BLOCKED_USER","comment":"You blocked this user."}],"available":"user"},"messages.readMentions":{"comment":"Mark mentions as read","arguments":{"flags":"Flags, see TL conditional fields","peer":"Dialog","top_msg_id":"Mark as read only mentions within the specified forum topic"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.getRecentLocations":{"comment":"Get live location history of a certain user","arguments":{"peer":"User","limit":"Maximum number of results to return, see pagination","hash":"Hash used for caching, for more info click here"},"available":"user"},"messages.sendMultiMedia":{"comment":"Send an album or grouped media","arguments":{"flags":"Flags, see TL conditional fields","silent":"Whether to send the album silently (no notification triggered)","background":"Send in background?","clear_draft":"Whether to clear drafts","noforwards":"Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled","update_stickersets_order":"Whether to move used stickersets to top, see here for more info on this flag »","invert_media":"If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.","peer":"The destination chat","reply_to":"If set, indicates that the message should be sent in reply to the specified message or story.","multi_media":"The medias to send: note that they must be separately uploaded using {@link messages.RawUploadMediaRequest} first, using raw inputMediaUploaded* constructors is not supported.","schedule_date":"Scheduled message date for scheduled messages","send_as":"Send this message as the specified peer","quick_reply_shortcut":"Add the message to the specified quick reply shortcut », instead.","effect":"Specifies a message effect » to use for the message."},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_FORWARDS_RESTRICTED","comment":"You can't forward messages from a protected chat."},{"code":403,"name":"CHAT_SEND_MEDIA_FORBIDDEN","comment":"You can't send media in this chat."},{"code":403,"name":"CHAT_SEND_PHOTOS_FORBIDDEN","comment":"You can't send photos in this chat."},{"code":403,"name":"CHAT_SEND_VIDEOS_FORBIDDEN","comment":"You can't send videos in this chat."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"ENTITY_BOUNDS_INVALID","comment":"A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length."},{"code":400,"name":"FILE_REFERENCE_%d_EXPIRED","comment":"The file reference of the media file at index %d in the passed media array expired, it must be refreshed."},{"code":400,"name":"FILE_REFERENCE_%d_INVALID","comment":"The file reference of the media file at index %d in the passed media array is invalid."},{"code":400,"name":"MEDIA_CAPTION_TOO_LONG","comment":"The caption is too long."},{"code":400,"name":"MEDIA_EMPTY","comment":"The provided media object is invalid."},{"code":400,"name":"MEDIA_INVALID","comment":"Media invalid."},{"code":400,"name":"MULTI_MEDIA_TOO_LONG","comment":"Too many media files for album."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"QUICK_REPLIES_TOO_MUCH","comment":"A maximum of appConfig.quick_replies_limit shortcuts may be created, the limit was reached."},{"code":500,"name":"RANDOM_ID_DUPLICATE","comment":"You provided a random ID that was already used."},{"code":400,"name":"RANDOM_ID_EMPTY","comment":"Random ID empty."},{"code":400,"name":"REPLY_MESSAGES_TOO_MUCH","comment":"Each shortcut can contain a maximum of appConfig.quick_reply_messages_limit messages, the limit was reached."},{"code":400,"name":"SCHEDULE_DATE_TOO_LATE","comment":"You can't schedule a message this far in the future."},{"code":400,"name":"SCHEDULE_TOO_MUCH","comment":"There are too many scheduled messages."},{"code":400,"name":"SEND_AS_PEER_INVALID","comment":"You can't send messages as the specified peer."},{"code":420,"name":"SLOWMODE_WAIT_%d","comment":"Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat."},{"code":400,"name":"TOPIC_CLOSED","comment":"This topic was closed, you can't send messages to it anymore."},{"code":400,"name":"TOPIC_DELETED","comment":"The specified topic was deleted."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."}],"available":"both"},"messages.getGameHighScores":{"comment":"Get highscores of a game","arguments":{"peer":"Where was the game sent","id":"ID of message with game media attachment","user_id":"Get high scores made by a certain user"},"throws":[{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},"messages.uploadEncryptedFile":{"comment":"Upload encrypted file and associate it to a secret chat","arguments":{"peer":"The secret chat to associate the file to","file":"The file"},"throws":[{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."}],"available":"user"},"messages.markDialogUnread":{"comment":"Manually mark dialog as unread","arguments":{"flags":"Flags, see TL conditional fields","unread":"Mark as unread/read","peer":"Dialog"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.getSplitRanges":{"comment":"Get message ranges for saving the user's chat history","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"messages.setGameScore":{"comment":"Use this method to set the score of the specified user in a game sent as a normal message (bots only).","arguments":{"flags":"Flags, see TL conditional fields","edit_message":"Set this flag if the game message should be automatically edited to include the current scoreboard","force":"Set this flag if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters","peer":"Unique identifier of target chat","id":"Identifier of the sent message","user_id":"User identifier","score":"New score"},"throws":[{"code":400,"name":"BOT_SCORE_NOT_MODIFIED","comment":"The score wasn't modified."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"SCORE_INVALID","comment":"The specified game score is invalid."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},"messages.getAttachedStickers":{"comment":"Get stickers attached to a photo or video","arguments":{"media":"Stickered media"},"throws":[{"code":400,"name":"MEDIA_EMPTY","comment":"The provided media object is invalid."}],"available":"user"},"messages.searchStickerSets":{"comment":"Search for stickersets","arguments":{"flags":"Flags, see TL conditional fields","exclude_featured":"Exclude featured stickersets from results","q":"Query string","hash":"Hash used for caching, for more info click here."},"available":"user"},"messages.clearAllDrafts":{"comment":"Clear all drafts.","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"messages.updatePinnedMessage":{"comment":"Pin a message","arguments":{"flags":"Flags, see TL conditional fields","silent":"Pin the message silently, without triggering a notification","unpin":"Whether the message should unpinned or pinned","pm_oneside":"Whether the message should only be pinned on the local side of a one-to-one chat","peer":"The peer where to pin the message","id":"The message to pin or unpin"},"throws":[{"code":400,"name":"BOT_ONESIDE_NOT_AVAIL","comment":"Bots can't pin messages in PM just for themselves."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"PIN_RESTRICTED","comment":"You can't pin messages."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."}],"available":"both"},"messages.getPollResults":{"comment":"Get poll results","arguments":{"peer":"Peer where the poll was found","msg_id":"Message ID of poll message"},"throws":[{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.sendVote":{"comment":"Vote in a {@link RawPoll}\n\nStarting from layer 159, the vote will be sent from the peer specified using {@link messages.RawSaveDefaultSendAsRequest}.","arguments":{"peer":"The chat where the poll was sent","msg_id":"The message ID of the poll","options":"The options that were chosen"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"MESSAGE_POLL_CLOSED","comment":"Poll closed."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"OPTIONS_TOO_MUCH","comment":"Too many options provided."},{"code":400,"name":"OPTION_INVALID","comment":"Invalid option selected."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"REVOTE_NOT_ALLOWED","comment":"You cannot change your vote."}],"available":"user"},"messages.editChatAbout":{"comment":"Edit the description of a group/supergroup/channel.","arguments":{"peer":"The group/supergroup/channel.","about":"The new description"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ABOUT_NOT_MODIFIED","comment":"About text has not changed."},{"code":400,"name":"CHAT_ABOUT_TOO_LONG","comment":"Chat about too long."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"both"},"messages.getEmojiKeywords":{"comment":"Get localized emoji keywords ».","arguments":{"lang_code":"Language code"},"available":"user"},"messages.getEmojiKeywordsDifference":{"comment":"Get changed emoji keywords ».","arguments":{"lang_code":"Language code","from_version":"Previous stored emoji keyword list version"},"available":"user"},"messages.getEmojiKeywordsLanguages":{"comment":"Obtain a list of related languages that must be used when fetching emoji keyword lists ».\n\nUsually the method will return the passed language codes (if localized) + en + some language codes for similar languages (if applicable).","arguments":{"lang_codes":"The user's language codes"},"available":"user"},"messages.getUnreadMentions":{"comment":"Get unread messages where we were mentioned","arguments":{"flags":"Flags, see TL conditional fields","peer":"Peer where to look for mentions","top_msg_id":"If set, considers only messages within the specified forum topic","offset_id":"Offsets for pagination, for more info click here","add_offset":"Offsets for pagination, for more info click here","limit":"Maximum number of results to return, see pagination","max_id":"Maximum message ID to return, see pagination","min_id":"Minimum message ID to return, see pagination"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.requestUrlAuth":{"comment":"Get more info about a Seamless Telegram Login authorization request, for more info click here »","arguments":{"flags":"Flags, see TL conditional fields","peer":"Peer where the message is located","msg_id":"The message","button_id":"The ID of the button with the authorization request","url":"URL used for link URL authorization, click here for more info »"},"available":"user"},"messages.hidePeerSettingsBar":{"comment":"Should be called after the user hides the report spam/add as contact bar of a new chat, effectively prevents the user from executing the actions specified in the action bar ».","arguments":{"peer":"Peer"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.acceptUrlAuth":{"comment":"Use this to accept a Seamless Telegram Login authorization request, for more info click here »","arguments":{"flags":"Flags, see TL conditional fields","write_allowed":"Set this flag to allow the bot to send messages to you (if requested)","peer":"The location of the message","msg_id":"Message ID of the message with the login button","button_id":"ID of the login button","url":"URL used for link URL authorization, click here for more info »"},"available":"user"},"messages.sendScheduledMessages":{"comment":"Send scheduled messages right away","arguments":{"peer":"Peer","id":"Scheduled message IDs"},"throws":[{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":500,"name":"RANDOM_ID_DUPLICATE","comment":"You provided a random ID that was already used."}],"available":"user"},"messages.deleteScheduledMessages":{"comment":"Delete scheduled messages","arguments":{"peer":"Peer","id":"Scheduled message IDs"},"throws":[{"code":403,"name":"MESSAGE_DELETE_FORBIDDEN","comment":"You can't delete one of the messages you tried to delete, most likely because it is a service message."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.getScheduledHistory":{"comment":"Get scheduled messages","arguments":{"peer":"Peer","hash":"Hash used for caching, for more info click here.
    To generate the hash, populate the ids array with the id, date and edit_date (in this order) of the previously returned messages (in order, i.e. ids = [id1, date1, edit_date1, id2, date2, edit_date2, ...])."},"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.getDialogUnreadMarks":{"comment":"Get dialogs manually marked as unread","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"messages.getPollVotes":{"comment":"Get poll results for non-anonymous polls","arguments":{"flags":"Flags, see TL conditional fields","peer":"Chat where the poll was sent","id":"Message ID","option":"Get only results for the specified poll option","offset":"Offset for results, taken from the next_offset field of {@link messages.RawVotesList}, initially an empty string.
    Note: if no more results are available, the method call will return an empty next_offset; thus, avoid providing the next_offset returned in {@link messages.RawVotesList} if it is empty, to avoid an infinite loop.","limit":"Number of results to return"},"throws":[{"code":403,"name":"BROADCAST_FORBIDDEN","comment":"Channel poll voters and reactions cannot be fetched to prevent deanonymization."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":403,"name":"POLL_VOTE_REQUIRED","comment":"Cast a vote in the poll before calling this method."}],"available":"user"},"messages.getSuggestedDialogFilters":{"comment":"Get suggested folders","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"messages.toggleStickerSets":{"comment":"Apply changes to multiple stickersets","arguments":{"flags":"Flags, see TL conditional fields","uninstall":"Uninstall the specified stickersets","archive":"Archive the specified stickersets","unarchive":"Unarchive the specified stickersets","stickersets":"Stickersets to act upon"},"available":"user"},"messages.updateDialogFilter":{"comment":"Update folder","arguments":{"flags":"Flags, see TL conditional fields","id":"Folder ID","filter":"Folder info"},"throws":[{"code":400,"name":"CHATLIST_EXCLUDE_INVALID","comment":"The specified exclude_peers are invalid."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"FILTER_ID_INVALID","comment":"The specified filter ID is invalid."},{"code":400,"name":"FILTER_INCLUDE_EMPTY","comment":"The include_peers vector of the filter is empty."},{"code":400,"name":"FILTER_TITLE_EMPTY","comment":"The title field of the filter is empty."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.getDialogFilters":{"comment":"Get folders","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"messages.updateDialogFiltersOrder":{"comment":"Reorder folders","arguments":{"order":"New folder order"},"available":"user"},"messages.editChatDefaultBannedRights":{"comment":"Edit the default banned rights of a channel/supergroup/group.","arguments":{"peer":"The peer","banned_rights":"The new global rights"},"throws":[{"code":400,"name":"BANNED_RIGHTS_INVALID","comment":"You provided some invalid flags in the banned rights."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"UNTIL_DATE_INVALID","comment":"Invalid until date provided."}],"available":"both"},"messages.getReplies":{"comment":"Get messages in a reply thread","arguments":{"peer":"Peer","msg_id":"Message ID","offset_id":"Offsets for pagination, for more info click here","offset_date":"Offsets for pagination, for more info click here","add_offset":"Offsets for pagination, for more info click here","limit":"Maximum number of results to return, see pagination","max_id":"If a positive value was transferred, the method will return only messages with ID smaller than max_id","min_id":"If a positive value was transferred, the method will return only messages with ID bigger than min_id","hash":"Hash used for caching, for more info click here"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"TOPIC_ID_INVALID","comment":"The specified topic ID is invalid."}],"available":"user"},"messages.getOnlines":{"comment":"Get count of online users in a chat","arguments":{"peer":"The chat"},"throws":[{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.getDiscussionMessage":{"comment":"Get discussion message from the associated discussion group of a channel to show it on top of the comment section, without actually joining the group","arguments":{"peer":"Channel ID","msg_id":"Message ID"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"TOPIC_ID_INVALID","comment":"The specified topic ID is invalid."}],"available":"user"},"messages.getOldFeaturedStickers":{"comment":"Method for fetching previously featured stickers","arguments":{"offset":"Offset","limit":"Maximum number of results to return, see pagination","hash":"Hash used for caching, for more info click here."},"available":"user"},"messages.readDiscussion":{"comment":"Mark a thread as read","arguments":{"peer":"Group ID","msg_id":"ID of message that started the thread","read_max_id":"ID up to which thread messages were read"},"throws":[{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.unpinAllMessages":{"comment":"Unpin all pinned messages","arguments":{"flags":"Flags, see TL conditional fields","peer":"Chat where to unpin","top_msg_id":"Forum topic where to unpin"},"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"both"},"messages.deleteChat":{"comment":"Delete a chat","arguments":{"chat_id":"Chat ID"},"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.deletePhoneCallHistory":{"comment":"Delete the entire phone call history.","arguments":{"flags":"Flags, see TL conditional fields","revoke":"Whether to remove phone call history for participants as well"},"available":"user"},"messages.initHistoryImport":{"comment":"Import chat history from a foreign chat app into a specific Telegram chat, click here for more info about imported chats ».","arguments":{"peer":"The Telegram chat where the history should be imported.","file":"File with messages to import.","media_count":"Number of media files associated with the chat that will be uploaded using {@link messages.RawUploadImportedMediaRequest}."},"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"IMPORT_FILE_INVALID","comment":"The specified chat export file is invalid."},{"code":400,"name":"IMPORT_FORMAT_DATE_INVALID","comment":"The date specified in the import file is invalid."},{"code":400,"name":"IMPORT_FORMAT_UNRECOGNIZED","comment":"The specified chat export file was exported from an unsupported chat app."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":406,"name":"PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_%dMIN","comment":"Import for this chat is already in progress, wait %d minutes before starting a new one."}],"available":"user"},"messages.getEmojiURL":{"comment":"Returns an HTTP URL which can be used to automatically log in into translation platform and suggest new emoji keywords ». The URL will be valid for 30 seconds after generation.","arguments":{"lang_code":"Language code for which the emoji keywords will be suggested"},"available":"user"},"messages.getExportedChatInvite":{"comment":"Get info about a chat invite","arguments":{"peer":"Chat","link":"Invite link"},"throws":[{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"INVITE_HASH_EXPIRED","comment":"The invite link has expired."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.getExportedChatInvites":{"comment":"Get info about the chat invites of a specific chat","arguments":{"flags":"Flags, see TL conditional fields","revoked":"Whether to fetch revoked chat invites","peer":"Chat","admin_id":"Whether to only fetch chat invites from this admin","offset_date":"Offsets for pagination, for more info click here","offset_link":"Offsets for pagination, for more info click here","limit":"Maximum number of results to return, see pagination"},"throws":[{"code":400,"name":"ADMIN_ID_INVALID","comment":"The specified admin ID is invalid."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.startHistoryImport":{"comment":"Complete the history import process, importing all messages into the chat.
    \nTo be called only after initializing the import with {@link messages.RawInitHistoryImportRequest} and uploading all files using {@link messages.RawUploadImportedMediaRequest}.","arguments":{"peer":"The Telegram chat where the messages should be imported, click here for more info »","import_id":"Identifier of a history import session, returned by {@link messages.RawInitHistoryImportRequest}."},"throws":[{"code":400,"name":"IMPORT_ID_INVALID","comment":"The specified import ID is invalid."}],"available":"user"},"messages.deleteRevokedExportedChatInvites":{"comment":"Delete all revoked chat invites","arguments":{"peer":"Chat","admin_id":"ID of the admin that originally generated the revoked chat invites"},"throws":[{"code":400,"name":"ADMIN_ID_INVALID","comment":"The specified admin ID is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.getScheduledMessages":{"comment":"Get scheduled messages","arguments":{"peer":"Peer","id":"IDs of scheduled messages"},"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.editExportedChatInvite":{"comment":"Edit an exported chat invite","arguments":{"flags":"Flags, see TL conditional fields","revoked":"Whether to revoke the chat invite","peer":"Chat","link":"Invite link","expire_date":"New expiration date","usage_limit":"Maximum number of users that can join using this link","request_needed":"Whether admin confirmation is required before admitting each separate user into the chat","title":"Description of the invite link, visible only to administrators"},"throws":[{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_INVITE_PERMANENT","comment":"You can't set an expiration date on permanent invite links."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":403,"name":"EDIT_BOT_INVITE_FORBIDDEN","comment":"Normal users can't edit invites that were created by bots."},{"code":400,"name":"INVITE_HASH_EXPIRED","comment":"The invite link has expired."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USAGE_LIMIT_INVALID","comment":"The specified usage limit is invalid."}],"available":"both"},"messages.deleteExportedChatInvite":{"comment":"Delete a chat invite","arguments":{"peer":"Peer","link":"Invite link"},"throws":[{"code":400,"name":"INVITE_HASH_EXPIRED","comment":"The invite link has expired."},{"code":400,"name":"INVITE_REVOKED_MISSING","comment":"The specified invite link was already revoked or is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.getAdminsWithInvites":{"comment":"Get info about chat invites generated by admins.","arguments":{"peer":"Chat"},"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.getChatInviteImporters":{"comment":"Get info about the users that joined the chat using a specific chat invite","arguments":{"flags":"Flags, see TL conditional fields","requested":"If set, only returns info about users with pending join requests »","peer":"Chat","link":"Invite link","q":"Search for a user in the pending join requests » list: only available when the requested flag is set, cannot be used together with a specific link.","offset_date":"Offsets for pagination, for more info click here","offset_user":"User ID for pagination: if set, offset_date must also be set.","limit":"Maximum number of results to return, see pagination"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"INVITE_HASH_EXPIRED","comment":"The invite link has expired."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"SEARCH_WITH_LINK_NOT_SUPPORTED","comment":"You cannot provide a search query and an invite link at the same time."}],"available":"user"},"messages.checkHistoryImportPeer":{"comment":"Check whether chat history exported from another chat app can be imported into a specific Telegram chat, click here for more info ».\n\nIf the check succeeds, and no RPC errors are returned, a messages.CheckedHistoryImportPeer constructor will be returned, with a confirmation text to be shown to the user, before actually initializing the import.","arguments":{"peer":"The chat where we want to import history »."},"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USER_NOT_MUTUAL_CONTACT","comment":"The provided user is not a mutual contact."}],"available":"user"},"messages.setHistoryTTL":{"comment":"Set maximum Time-To-Live of all messages in the specified chat","arguments":{"peer":"The dialog","period":"Automatically delete all messages sent in the chat after this many seconds"},"throws":[{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"TTL_PERIOD_INVALID","comment":"The specified TTL period is invalid."}],"available":"user"},"messages.setChatTheme":{"comment":"Change the chat theme of a certain chat","arguments":{"peer":"Private chat where to change theme","emoticon":"Emoji, identifying a specific chat theme; a list of chat themes can be fetched using {@link account.RawGetChatThemesRequest}"},"throws":[{"code":400,"name":"EMOJI_INVALID","comment":"The specified theme emoji is valid."},{"code":400,"name":"EMOJI_NOT_MODIFIED","comment":"The theme wasn't changed."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.getMessageReadParticipants":{"comment":"Get which users read a specific message: only available for groups and supergroups with less than chat_read_mark_size_threshold members, read receipts will be stored for chat_read_mark_expire_period seconds after the message was sent, see client configuration for more info ».","arguments":{"peer":"Dialog","msg_id":"Message ID"},"throws":[{"code":400,"name":"CHAT_TOO_BIG","comment":"This method is not available for groups with more than chat_read_mark_size_threshold members, see client configuration »."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"MSG_TOO_OLD","comment":"chat_read_mark_expire_period seconds have passed since the message was sent, read receipts were deleted."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.getSearchResultsCalendar":{"comment":"Returns information about the next messages of the specified type in the chat split by days.\n\nReturns the results in reverse chronological order.
    \nCan return partial results for the last returned day.","arguments":{"flags":"Flags, see TL conditional fields","peer":"Peer where to search","saved_peer_id":"Search within the saved message dialog » with this ID.","filter":"Message filter, {@link RawInputMessagesFilterEmpty}, {@link RawInputMessagesFilterMyMentions} filters are not supported by this method.","offset_id":"Offsets for pagination, for more info click here","offset_date":"Offsets for pagination, for more info click here"},"throws":[{"code":400,"name":"FILTER_NOT_SUPPORTED","comment":"The specified filter cannot be used in this context."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.saveDefaultSendAs":{"comment":"Change the default peer that should be used when sending messages, reactions, poll votes to a specific group","arguments":{"peer":"Group","send_as":"The default peer that should be used when sending messages to the group"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"SEND_AS_PEER_INVALID","comment":"You can't send messages as the specified peer."}],"available":"user"},"messages.hideChatJoinRequest":{"comment":"Dismiss or approve a chat join request related to a specific chat or channel.","arguments":{"flags":"Flags, see TL conditional fields","approved":"Whether to dismiss or approve the chat join request »","peer":"The chat or channel","user_id":"The user whose join request » should be dismissed or approved"},"throws":[{"code":400,"name":"CHANNELS_TOO_MUCH","comment":"You have joined too many channels/supergroups."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"HIDE_REQUESTER_MISSING","comment":"The join request was missing or was already handled."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USER_ALREADY_PARTICIPANT","comment":"The user is already in the group."},{"code":403,"name":"USER_CHANNELS_TOO_MUCH","comment":"One of the users you tried to add is already in too many channels/supergroups."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"both"},"messages.checkHistoryImport":{"comment":"Obtains information about a chat export file, generated by a foreign chat app, click here for more info about imported chats ».","arguments":{"import_head":"Beginning of the message file; up to 100 lines."},"throws":[{"code":400,"name":"IMPORT_FORMAT_UNRECOGNIZED","comment":"The specified chat export file was exported from an unsupported chat app."}],"available":"user"},"messages.sendReaction":{"comment":"React to message.\n\nStarting from layer 159, the reaction will be sent from the peer specified using {@link messages.RawSaveDefaultSendAsRequest}.","arguments":{"flags":"Flags, see TL conditional fields","big":"Whether a bigger and longer reaction should be shown","add_to_recent":"Whether to add this reaction to the recent reactions list ».","peer":"Peer","msg_id":"Message ID to react to","reaction":"A list of reactions"},"throws":[{"code":403,"name":"ANONYMOUS_REACTIONS_DISABLED","comment":"Sorry, anonymous administrators cannot leave reactions or participate in polls."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"CUSTOM_REACTIONS_TOO_MANY","comment":"Too many custom reactions were specified."},{"code":400,"name":"DOCUMENT_INVALID","comment":"The specified document is invalid."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"MESSAGE_NOT_MODIFIED","comment":"The provided message data is identical to the previous message data, the message wasn't modified."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."},{"code":400,"name":"REACTIONS_TOO_MANY","comment":"The message already has exactly reactions_uniq_max reaction emojis, you can't react with a new emoji, see the docs for more info »."},{"code":400,"name":"REACTION_EMPTY","comment":"Empty reaction provided."},{"code":400,"name":"REACTION_INVALID","comment":"The specified reaction is invalid."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."}],"available":"user"},"messages.hideAllChatJoinRequests":{"comment":"Dismiss or approve all join requests related to a specific chat or channel.","arguments":{"flags":"Flags, see TL conditional fields","approved":"Whether to dismiss or approve all chat join requests »","peer":"The chat or channel","link":"Only dismiss or approve join requests » initiated using this invite link"},"throws":[{"code":400,"name":"CHANNELS_TOO_MUCH","comment":"You have joined too many channels/supergroups."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"HIDE_REQUESTER_MISSING","comment":"The join request was missing or was already handled."},{"code":400,"name":"INVITE_HASH_EXPIRED","comment":"The invite link has expired."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USER_CHANNELS_TOO_MUCH","comment":"One of the users you tried to add is already in too many channels/supergroups."}],"available":"user"},"messages.getMessagesReactions":{"comment":"Get message reactions »","arguments":{"peer":"Peer","id":"Message IDs"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."}],"available":"user"},"messages.setChatAvailableReactions":{"comment":"Change the set of message reactions » that can be used in a certain group, supergroup or channel","arguments":{"flags":"Flags, see TL conditional fields","peer":"Group where to apply changes","available_reactions":"Allowed reaction emojis","reactions_limit":"This flag may be used to impose a custom limit of unique reactions (i.e. a customizable version of appConfig.reactions_uniq_max); this field and the other info set by the method will then be available to users in {@link RawChannelFull} and {@link RawChatFull}."},"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.getAvailableReactions":{"comment":"Obtain available message reactions »","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"messages.uploadImportedMedia":{"comment":"Upload a media file associated with an imported chat, click here for more info ».","arguments":{"peer":"The Telegram chat where the media will be imported","import_id":"Identifier of a history import session, returned by {@link messages.RawInitHistoryImportRequest}","file_name":"File name","media":"Media metadata"},"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"IMPORT_ID_INVALID","comment":"The specified import ID is invalid."}],"available":"user"},"messages.toggleNoForwards":{"comment":"Enable or disable content protection on a channel or chat","arguments":{"peer":"The chat or channel","enabled":"Enable or disable content protection"},"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.getSearchResultsPositions":{"comment":"Returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation.\n\nReturns the results in reverse chronological order (i.e., in order of decreasing message_id).","arguments":{"flags":"Flags, see TL conditional fields","peer":"Peer where to search","saved_peer_id":"Search within the saved message dialog » with this ID.","filter":"Message filter, {@link RawInputMessagesFilterEmpty}, {@link RawInputMessagesFilterMyMentions} filters are not supported by this method.","offset_id":"Offsets for pagination, for more info click here","limit":"Maximum number of results to return, see pagination"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.setDefaultReaction":{"comment":"Change default emoji reaction to use in the quick reaction menu: the value is synced across devices and can be fetched using {@link help.RawGetConfigRequest}.","arguments":{"reaction":"New emoji reaction"},"throws":[{"code":400,"name":"REACTION_INVALID","comment":"The specified reaction is invalid."}],"available":"user"},"messages.translateText":{"comment":"Translate a given text.\n\nStyled text entities will only be preserved for Telegram Premium users.","arguments":{"flags":"Flags, see TL conditional fields","peer":"If the text is a chat message, the peer ID","id":"A list of message IDs to translate","text":"A list of styled messages to translate","to_lang":"Two-letter ISO 639-1 language code of the language to which the message is translated"},"throws":[{"code":400,"name":"INPUT_TEXT_EMPTY","comment":"The specified text is empty."},{"code":400,"name":"INPUT_TEXT_TOO_LONG","comment":"The specified text is too long."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"TO_LANG_INVALID","comment":"The specified destination language is invalid."},{"code":400,"name":"TRANSLATE_REQ_QUOTA_EXCEEDED","comment":"Translation is currently unavailable due to a temporary server-side lack of resources."}],"available":"user"},"messages.getSearchCounters":{"comment":"Get the number of results that would be found by a {@link messages.RawSearchRequest} call with the same parameters","arguments":{"flags":"Flags, see TL conditional fields","peer":"Peer where to search","saved_peer_id":"Search within the saved message dialog » with this ID.","top_msg_id":"If set, consider only messages within the specified forum topic","filters":"Search filters"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.getUnreadReactions":{"comment":"Get unread reactions to messages you sent","arguments":{"flags":"Flags, see TL conditional fields","peer":"Peer","top_msg_id":"If set, considers only reactions to messages within the specified forum topic","offset_id":"Offsets for pagination, for more info click here","add_offset":"Offsets for pagination, for more info click here","limit":"Maximum number of results to return, see pagination","max_id":"Only return reactions for messages up until this message ID","min_id":"Only return reactions for messages starting from this message ID"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.getAttachMenuBots":{"comment":"Returns installed attachment menu bot mini apps »","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"messages.readReactions":{"comment":"Mark message reactions » as read","arguments":{"flags":"Flags, see TL conditional fields","peer":"Peer","top_msg_id":"Mark as read only reactions to messages within the specified forum topic"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.getAttachMenuBot":{"comment":"Returns attachment menu entry for a bot mini app that can be launched from the attachment menu »","arguments":{"bot":"Bot ID"},"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."}],"available":"user"},"messages.requestWebView":{"comment":"Open a bot mini app, sending over user information after user confirmation.\n\nAfter calling this method, until the user closes the webview, {@link messages.RawProlongWebViewRequest} must be called every 60 seconds.","arguments":{"flags":"Flags, see TL conditional fields","from_bot_menu":"Whether the webview was opened by clicking on the bot's menu button ».","silent":"Whether the inline message that will be sent by the bot on behalf of the user once the web app interaction is {@link messages.RawSendWebViewResultMessageRequest} should be sent silently (no notifications for the receivers).","compact":"If set, requests to open the mini app in compact mode (as opposed to fullview mode). Must be set if the mode parameter of the attachment menu deep link is equal to compact.","peer":"Dialog where the web app is being opened, and where the resulting message will be sent (see the docs for more info »).","bot":"Bot that owns the web app","url":"Web app URL","start_param":"If the web app was opened from the attachment menu using a attachment menu deep link, start_param should contain the data from the startattach parameter.","theme_params":"Theme parameters »","platform":"Short name of the application; 0-64 English letters, digits, and underscores","reply_to":"If set, indicates that the inline message that will be sent by the bot on behalf of the user once the web app interaction is {@link messages.RawSendWebViewResultMessageRequest} should be sent in reply to the specified message or story.","send_as":"Open the web app as the specified peer, sending the resulting the message as the specified peer."},"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."},{"code":400,"name":"BOT_WEBVIEW_DISABLED","comment":"A webview cannot be opened in the specified conditions: emitted for example if from_bot_menu or url are set and peer is not the chat with the bot."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":403,"name":"PRIVACY_PREMIUM_REQUIRED","comment":"You need a Telegram Premium subscription to send a message to this user."},{"code":400,"name":"SEND_AS_PEER_INVALID","comment":"You can't send messages as the specified peer."},{"code":400,"name":"YOU_BLOCKED_USER","comment":"You blocked this user."}],"available":"user"},"messages.searchSentMedia":{"comment":"View and search recently sent media.
    \nThis method does not support pagination.","arguments":{"q":"Optional search query","filter":"Message filter","limit":"Maximum number of results to return (max 100)."},"throws":[{"code":400,"name":"FILTER_NOT_SUPPORTED","comment":"The specified filter cannot be used in this context."}],"available":"user"},"messages.sendWebViewResultMessage":{"comment":"Terminate webview interaction started with {@link messages.RawRequestWebViewRequest}, sending the specified message to the chat on behalf of the user.","arguments":{"bot_query_id":"Webview interaction ID obtained from {@link messages.RawRequestWebViewRequest}","result":"Message to send"},"throws":[{"code":400,"name":"QUERY_ID_INVALID","comment":"The query ID is invalid."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},"messages.prolongWebView":{"comment":"Indicate to the server (from the user side) that the user is still using a web app.\n\nIf the method returns a QUERY_ID_INVALID error, the webview must be closed.","arguments":{"flags":"Flags, see TL conditional fields","silent":"Whether the inline message that will be sent by the bot on behalf of the user once the web app interaction is {@link messages.RawSendWebViewResultMessageRequest} should be sent silently (no notifications for the receivers).","peer":"Dialog where the web app was opened.","bot":"Bot that owns the web app","query_id":"Web app interaction ID obtained from {@link messages.RawRequestWebViewRequest}","reply_to":"If set, indicates that the inline message that will be sent by the bot on behalf of the user once the web app interaction is {@link messages.RawSendWebViewResultMessageRequest} should be sent in reply to the specified message or story.","send_as":"Open the web app as the specified peer"},"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."}],"available":"user"},"messages.requestSimpleWebView":{"comment":"Open a bot mini app.","arguments":{"flags":"Flags, see TL conditional fields","from_switch_webview":"Whether the webapp was opened by clicking on the switch_webview button shown on top of the inline results list returned by {@link messages.RawGetInlineBotResultsRequest}.","from_side_menu":"Set this flag if opening the Mini App from the installed side menu entry ».","compact":"Deprecated.","bot":"Bot that owns the mini app","url":"Web app URL, if opening from a keyboard button or inline result","start_param":"Deprecated.","theme_params":"Theme parameters »","platform":"Short name of the application; 0-64 English letters, digits, and underscores"},"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."},{"code":400,"name":"URL_INVALID","comment":"Invalid URL provided."}],"available":"user"},"messages.sendWebViewData":{"comment":"Used by the user to relay data from an opened reply keyboard bot mini app to the bot that owns it.","arguments":{"bot":"Bot that owns the web app","random_id":"Unique client message ID to prevent duplicate sending of the same event","button_text":"Text of the {@link RawKeyboardButtonSimpleWebView} that was pressed to open the web app.","data":"Data to relay to the bot, obtained from a web_app_data_send JS event."},"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."}],"available":"user"},"messages.transcribeAudio":{"comment":"Transcribe voice message","arguments":{"peer":"Peer ID where the voice message was sent","msg_id":"Voice message ID"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."},{"code":400,"name":"TRANSCRIPTION_FAILED","comment":"Audio transcription failed."}],"available":"user"},"messages.rateTranscribedAudio":{"comment":"Rate transcribed voice message","arguments":{"peer":"Peer where the voice message was sent","msg_id":"Message ID","transcription_id":"Transcription ID","good":"Whether the transcription was correct"},"available":"user"},"messages.getMessageReactionsList":{"comment":"Get message reaction list, along with the sender of each reaction.","arguments":{"flags":"Flags, see TL conditional fields","peer":"Peer","id":"Message ID","reaction":"Get only reactions of this type","offset":"Offset for pagination (taken from the next_offset field of the returned messages.MessageReactionsList); empty in the first request.","limit":"Maximum number of results to return, see pagination"},"throws":[{"code":403,"name":"BROADCAST_FORBIDDEN","comment":"Channel poll voters and reactions cannot be fetched to prevent deanonymization."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."}],"available":"user"},"messages.getCustomEmojiDocuments":{"comment":"Fetch custom emoji stickers ».\n\nReturns a list of {@link RawDocument} with the animated custom emoji in TGS format, and a {@link RawDocumentAttributeCustomEmoji} attribute with the original emoji and info about the emoji stickerset this custom emoji belongs to.","arguments":{"document_id":"Custom emoji IDs from a {@link RawMessageEntityCustomEmoji}."},"available":"both"},"messages.reportReaction":{"comment":"Report a message reaction","arguments":{"peer":"Peer where the message was sent","id":"Message ID","reaction_peer":"Peer that sent the reaction"},"throws":[{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"user"},"messages.getFeaturedEmojiStickers":{"comment":"Gets featured custom emoji stickersets.","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"messages.toggleBotInAttachMenu":{"comment":"Enable or disable web bot attachment menu »","arguments":{"flags":"Flags, see TL conditional fields","write_allowed":"Whether the user authorizes the bot to write messages to them, if requested by {@link RawAttachMenuBot}.request_write_access","bot":"Bot ID","enabled":"Toggle"},"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."}],"available":"user"},"messages.getEmojiStickers":{"comment":"Gets the list of currently installed custom emoji stickersets.","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"messages.getTopReactions":{"comment":"Got popular message reactions","arguments":{"limit":"Maximum number of results to return, see pagination","hash":"Hash used for caching, for more info click here."},"available":"user"},"messages.getRecentReactions":{"comment":"Get recently used message reactions","arguments":{"limit":"Maximum number of results to return, see pagination","hash":"Hash used for caching, for more info click here."},"available":"user"},"messages.clearRecentReactions":{"comment":"Clear recently used message reactions","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"messages.getDefaultHistoryTTL":{"comment":"Gets the default value of the Time-To-Live setting, applied to all new chats.","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"messages.setDefaultHistoryTTL":{"comment":"Changes the default value of the Time-To-Live setting, applied to all new chats.","arguments":{"period":"The new default Time-To-Live of all messages sent in new chats."},"throws":[{"code":400,"name":"TTL_PERIOD_INVALID","comment":"The specified TTL period is invalid."}],"available":"user"},"messages.getEmojiGroups":{"comment":"Represents a list of emoji categories.","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"messages.getExtendedMedia":{"comment":"Fetch updated information about paid media, see here » for the full flow.\n\nThis method will return an array of {@link RawUpdateMessageExtendedMedia} updates, only for messages containing already bought paid media.
    \nNo information will be returned for messages containing not yet bought paid media.","arguments":{"peer":"Peer with visible paid media messages.","id":"IDs of currently visible messages containing paid media."},"available":"user"},"messages.sendBotRequestedPeer":{"comment":"Send one or more chosen peers, as requested by a {@link RawKeyboardButtonRequestPeer} button.","arguments":{"peer":"The bot that sent the {@link RawKeyboardButtonRequestPeer} button.","msg_id":"ID of the message that contained the reply keyboard with the {@link RawKeyboardButtonRequestPeer} button.","button_id":"The button_id field from the {@link RawKeyboardButtonRequestPeer} constructor.","requested_peers":"The chosen peers."},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.getEmojiProfilePhotoGroups":{"comment":"Represents a list of emoji categories, to be used when selecting custom emojis to set as profile picture.","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"messages.searchCustomEmoji":{"comment":"Look for custom emojis associated to a UTF8 emoji","arguments":{"emoticon":"The emoji","hash":"Hash used for caching, for more info click here."},"throws":[{"code":400,"name":"EMOTICON_EMPTY","comment":"The emoji is empty."}],"available":"user"},"messages.togglePeerTranslations":{"comment":"Show or hide the real-time chat translation popup for a certain chat","arguments":{"flags":"Flags, see TL conditional fields","disabled":"Whether to disable or enable the real-time chat translation popup","peer":"The peer"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.getEmojiStatusGroups":{"comment":"Represents a list of emoji categories, to be used when selecting custom emojis to set as custom emoji status.","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"messages.getBotApp":{"comment":"Obtain information about a direct link Mini App","arguments":{"app":"Bot app information obtained from a Direct Mini App deep link ».","hash":"Hash used for caching, for more info click here"},"throws":[{"code":400,"name":"BOT_APP_BOT_INVALID","comment":"The bot_id passed in the inputBotAppShortName constructor is invalid."},{"code":400,"name":"BOT_APP_INVALID","comment":"The specified bot app is invalid."},{"code":400,"name":"BOT_APP_SHORTNAME_INVALID","comment":"The specified bot app short name is invalid."}],"available":"user"},"messages.requestAppWebView":{"comment":"Open a bot mini app from a direct Mini App deep link, sending over user information after user confirmation.\n\nAfter calling this method, until the user closes the webview, {@link messages.RawProlongWebViewRequest} must be called every 60 seconds.","arguments":{"flags":"Flags, see TL conditional fields","write_allowed":"Set this flag if the bot is asking permission to send messages to the user as specified in the direct Mini App deep link docs, and the user agreed.","compact":"If set, requests to open the mini app in compact mode (as opposed to fullview mode). Must be set if the mode parameter of the direct Mini App deep link is equal to compact.","peer":"If the client has clicked on the link in a Telegram chat, pass the chat's peer information; otherwise pass the bot's peer information, instead.","app":"The app obtained by invoking {@link messages.RawGetBotAppRequest} as specified in the direct Mini App deep link docs.","start_param":"If the startapp query string parameter is present in the direct Mini App deep link, pass it to start_param.","theme_params":"Theme parameters »","platform":"Short name of the application; 0-64 English letters, digits, and underscores"},"throws":[{"code":400,"name":"BOT_APP_INVALID","comment":"The specified bot app is invalid."},{"code":400,"name":"BOT_APP_SHORTNAME_INVALID","comment":"The specified bot app short name is invalid."}],"available":"user"},"messages.searchEmojiStickerSets":{"comment":"Search for custom emoji stickersets »","arguments":{"flags":"Flags, see TL conditional fields","exclude_featured":"Exclude featured stickersets from results","q":"Query string","hash":"Hash used for caching, for more info click here."},"available":"user"},"messages.deleteSavedHistory":{"comment":"Deletes messages forwarded from a specific peer to saved messages ».","arguments":{"flags":"Flags, see TL conditional fields","peer":"Peer, whose messages will be deleted from saved messages »","max_id":"Maximum ID of message to delete","min_date":"Delete all messages newer than this UNIX timestamp","max_date":"Delete all messages older than this UNIX timestamp"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.setChatWallPaper":{"comment":"Set a custom wallpaper » in a specific private chat with another user.","arguments":{"flags":"Flags, see TL conditional fields","for_both":"Only for Premium users, sets the specified wallpaper for both users of the chat, without requiring confirmation from the other user.","revert":"If we don't like the new wallpaper the other user of the chat has chosen for us using the for_both flag, we can re-set our previous wallpaper just on our side using this flag.","peer":"The private chat where the wallpaper will be set","wallpaper":"The wallpaper », obtained as described in the wallpaper documentation »; must not be provided when installing a wallpaper obtained from a {@link RawMessageActionSetChatWallPaper} service message (id must be provided, instead).","settings":"Wallpaper settings, obtained as described in the wallpaper documentation » or from {@link RawMessageActionSetChatWallPaper}.wallpaper.settings.","id":"If the wallpaper was obtained from a {@link RawMessageActionSetChatWallPaper} service message, must contain the ID of that message."},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"WALLPAPER_INVALID","comment":"The specified wallpaper is invalid."},{"code":400,"name":"WALLPAPER_NOT_FOUND","comment":"The specified wallpaper could not be found."}],"available":"user"},"messages.getPinnedSavedDialogs":{"comment":"Get pinned saved dialogs, see here » for more info.","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"messages.getSavedHistory":{"comment":"Returns saved messages » forwarded from a specific peer","arguments":{"peer":"Target peer","offset_id":"Only return messages starting from the specified message ID","offset_date":"Only return messages sent before the specified date","add_offset":"Number of list elements to be skipped, negative values are also accepted.","limit":"Number of results to return","max_id":"If a positive value was transferred, the method will return only messages with IDs less than max_id","min_id":"If a positive value was transferred, the method will return only messages with IDs more than min_id","hash":"Result hash"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.getSavedDialogs":{"comment":"Returns the current saved dialog list, see here » for more info.","arguments":{"flags":"Flags, see TL conditional fields","exclude_pinned":"Exclude pinned dialogs","offset_date":"Offsets for pagination, for more info click here","offset_id":"Offsets for pagination, for more info click here (top_message ID used for pagination)","offset_peer":"Offset peer for pagination","limit":"Number of list elements to be returned","hash":"Hash used for caching, for more info click here"},"available":"user"},"messages.getSavedReactionTags":{"comment":"Fetch the full list of saved message tags created by the user.","arguments":{"flags":"Flags, see TL conditional fields","peer":"If set, returns tags only used in the specified saved message dialog.","hash":"Hash used for caching, for more info click here."},"available":"user"},"messages.reorderPinnedSavedDialogs":{"comment":"Reorder pinned saved message dialogs ».","arguments":{"flags":"Flags, see TL conditional fields","force":"If set, dialogs pinned server-side but not present in the order field will be unpinned.","order":"New dialog order"},"available":"user"},"messages.toggleSavedDialogPin":{"comment":"Pin or unpin a saved message dialog ».","arguments":{"flags":"Flags, see TL conditional fields","pinned":"Whether to pin or unpin the dialog","peer":"The dialog to pin"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.updateSavedReactionTag":{"comment":"Update the description of a saved message tag ».","arguments":{"flags":"Flags, see TL conditional fields","reaction":"Reaction associated to the tag","title":"Tag description, max 12 UTF-8 characters; to remove the description call the method without setting this flag."},"throws":[{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."},{"code":400,"name":"REACTION_INVALID","comment":"The specified reaction is invalid."}],"available":"user"},"messages.getDefaultTagReactions":{"comment":"Fetch a default recommended list of saved message tag reactions.","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"messages.getQuickReplies":{"comment":"Fetch basic info about all existing quick reply shortcuts.","arguments":{"hash":"Hash for pagination, generated as specified here » (not the usual algorithm used for hash generation.)"},"available":"user"},"messages.reorderQuickReplies":{"comment":"Reorder quick reply shortcuts.\n\nThis will emit an {@link RawUpdateQuickReplies} update to other logged-in sessions.","arguments":{"order":"IDs of all created quick reply shortcuts, in the desired order."},"throws":[{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."}],"available":"user"},"messages.getOutboxReadDate":{"comment":"Get the exact read date of one of our messages, sent to a private chat with another user.\n\nCan be only done for private outgoing messages not older than appConfig.pm_read_date_expire_period ».\n\nIf the peer's {@link RawUserFull}.read_dates_private flag is set, we will not be able to fetch the exact read date of messages we send to them, and a USER_PRIVACY_RESTRICTED RPC error will be emitted.
    \nThe exact read date of messages might still be unavailable for other reasons, see {@link RawGlobalPrivacySettings} for more info.
    \nTo set {@link RawUserFull}.read_dates_private for ourselves invoke {@link account.RawSetGlobalPrivacySettingsRequest}, setting the settings.hide_read_marks flag.","arguments":{"peer":"The user to whom we sent the message.","msg_id":"The message ID."},"throws":[{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"MESSAGE_NOT_READ_YET","comment":"The specified message wasn't read yet."},{"code":400,"name":"MESSAGE_TOO_OLD","comment":"The message is too old, the requested information is not available."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":403,"name":"USER_PRIVACY_RESTRICTED","comment":"The user's privacy settings do not allow you to do this."},{"code":403,"name":"YOUR_PRIVACY_RESTRICTED","comment":"You cannot fetch the read date of this message because you have disallowed other users to do so for your messages; to fix, allow other users to see your exact last online date OR purchase a Telegram Premium subscription."}],"available":"user"},"messages.editQuickReplyShortcut":{"comment":"Rename a quick reply shortcut.
    \nThis will emit an {@link RawUpdateQuickReplies} update to other logged-in sessions.","arguments":{"shortcut_id":"Shortcut ID.","shortcut":"New shortcut name."},"throws":[{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."},{"code":400,"name":"SHORTCUT_INVALID","comment":"The specified shortcut is invalid."}],"available":"user"},"messages.deleteQuickReplyShortcut":{"comment":"Completely delete a quick reply shortcut.
    \nThis will also emit an {@link RawUpdateDeleteQuickReply} update to other logged-in sessions (and no {@link RawUpdateDeleteQuickReplyMessages} updates, even if all the messages in the shortcuts are also deleted by this method).","arguments":{"shortcut_id":"Shortcut ID"},"throws":[{"code":400,"name":"SHORTCUT_INVALID","comment":"The specified shortcut is invalid."}],"available":"user"},"messages.checkQuickReplyShortcut":{"comment":"Before offering the user the choice to add a message to a quick reply shortcut, to make sure that none of the limits specified here » were reached.","arguments":{"shortcut":"Shorcut name (not ID!)."},"throws":[{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."}],"available":"user"},"messages.sendQuickReplyMessages":{"comment":"Send a quick reply shortcut ».","arguments":{"peer":"The peer where to send the shortcut (users only, for now).","shortcut_id":"The ID of the quick reply shortcut to send.","id":"Specify a subset of messages from the shortcut to send; if empty, defaults to all of them.","random_id":"Unique client IDs required to prevent message resending, one for each message we're sending, may be empty (but not recommended)."},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."}],"available":"user"},"messages.toggleDialogFilterTags":{"comment":"Enable or disable folder tags ».","arguments":{"enabled":"Enable or disable folder tags."},"throws":[{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."}],"available":"user"},"messages.getQuickReplyMessages":{"comment":"Fetch (a subset or all) messages in a quick reply shortcut ».","arguments":{"flags":"Flags, see TL conditional fields","shortcut_id":"Quick reply shortcut ID.","id":"IDs of the messages to fetch, if empty fetches all of them.","hash":"Hash used for caching, for more info click here"},"throws":[{"code":400,"name":"SHORTCUT_INVALID","comment":"The specified shortcut is invalid."}],"available":"user"},"messages.getMyStickers":{"comment":"Fetch all stickersets » owned by the current user.","arguments":{"offset_id":"Offsets for pagination, for more info click here","limit":"Maximum number of results to return, see pagination"},"available":"user"},"messages.deleteQuickReplyMessages":{"comment":"Delete one or more messages from a quick reply shortcut. This will also emit an {@link RawUpdateDeleteQuickReplyMessages} update.","arguments":{"shortcut_id":"Shortcut ID.","id":"IDs of shortcut messages to delete."},"throws":[{"code":400,"name":"SHORTCUT_INVALID","comment":"The specified shortcut is invalid."}],"available":"user"},"messages.getAvailableEffects":{"comment":"Fetch the full list of usable animated message effects ».","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"messages.getEmojiStickerGroups":{"comment":"Represents a list of emoji categories, to be used when choosing a sticker.","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"messages.deleteFactCheck":{"comment":"Delete a fact-check from a message.\n\nCan only be used by independent fact-checkers as specified by the appConfig.can_edit_factcheck configuration flag.","arguments":{"peer":"Peer where the message was sent.","msg_id":"Message ID"},"throws":[{"code":403,"name":"CHAT_ACTION_FORBIDDEN","comment":"You cannot execute this action."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.requestMainWebView":{"comment":"Open a Main Mini App.","arguments":{"flags":"Flags, see TL conditional fields","compact":"If set, requests to open the mini app in compact mode (as opposed to fullview mode). Must be set if the mode parameter of the Main Mini App link is equal to compact.","peer":"Currently open chat, may be {@link RawInputPeerEmpty} if no chat is currently open.","bot":"Bot that owns the main mini app.","start_param":"Start parameter, if opening from a Main Mini App link ».","theme_params":"Theme parameters »","platform":"Short name of the application; 0-64 English letters, digits, and underscores"},"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."}],"available":"user"},"messages.editFactCheck":{"comment":"Edit/create a fact-check on a message.\n\nCan only be used by independent fact-checkers as specified by the appConfig.can_edit_factcheck configuration flag.","arguments":{"peer":"Peer where the message was sent","msg_id":"Message ID","text":"Fact-check (maximum UTF-8 length specified in appConfig.factcheck_length_limit)."},"throws":[{"code":403,"name":"CHAT_ACTION_FORBIDDEN","comment":"You cannot execute this action."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"messages.getFactCheck":{"comment":"Fetch one or more factchecks, see here » for the full flow.","arguments":{"peer":"Peer where the messages were sent.","msg_id":"Messages that have associated {@link RawFactCheck} constructors with the need_check flag set."},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"updates.getState":{"comment":"Returns a current state of updates.","available":"both","arguments":{"gigagroup":"Is this a broadcast group?"}},"updates.getDifference":{"comment":"Get new updates.","arguments":{"flags":"Flags, see TL conditional fields","pts":"PTS, see updates.","pts_limit":"PTS limit","pts_total_limit":"For fast updating: if provided and pts + pts_total_limit < remote pts, {@link updates.RawDifferenceTooLong} will be returned.
    Simply tells the server to not return the difference if it is bigger than pts_total_limit
    If the remote pts is too big (> ~4000000), this field will default to 1000000","date":"date, see updates.","qts":"QTS, see updates.","qts_limit":"QTS limit"},"throws":[{"code":400,"name":"CDN_METHOD_INVALID","comment":"You can't call this method in a CDN DC."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"DATE_EMPTY","comment":"Date empty."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PERSISTENT_TIMESTAMP_EMPTY","comment":"Persistent timestamp empty."},{"code":400,"name":"PERSISTENT_TIMESTAMP_INVALID","comment":"Persistent timestamp invalid."},{"code":500,"name":"RANDOM_ID_DUPLICATE","comment":"You provided a random ID that was already used."},{"code":400,"name":"USERNAME_INVALID","comment":"The provided username is not valid."},{"code":400,"name":"USER_NOT_PARTICIPANT","comment":"You're not a member of this supergroup/channel."}],"available":"both"},"photos.updateProfilePhoto":{"comment":"Installs a previously uploaded photo as a profile photo.","arguments":{"flags":"Flags, see TL conditional fields","fallback":"If set, the chosen profile photo will be shown to users that can't display your main profile photo due to your privacy settings.","bot":"Can contain info of a bot we own, to change the profile photo of that bot, instead of the current user.","id":"Input photo"},"throws":[{"code":400,"name":"ALBUM_PHOTOS_TOO_MANY","comment":"You have uploaded too many profile photos, delete some before retrying."},{"code":400,"name":"FILE_PARTS_INVALID","comment":"The number of file parts is invalid."},{"code":400,"name":"IMAGE_PROCESS_FAILED","comment":"Failure while processing image."},{"code":400,"name":"LOCATION_INVALID","comment":"The provided location is invalid."},{"code":400,"name":"PHOTO_CROP_SIZE_SMALL","comment":"Photo is too small."},{"code":400,"name":"PHOTO_EXT_INVALID","comment":"The extension of the photo is invalid."},{"code":400,"name":"PHOTO_ID_INVALID","comment":"Photo ID invalid."}],"available":"both"},"updates.getChannelDifference":{"comment":"Returns the difference between the current state of updates of a certain channel and transmitted.","arguments":{"flags":"Flags, see TL conditional fields","force":"Set to true to skip some possibly unneeded updates and reduce server-side load","channel":"The channel","filter":"Messsage filter","pts":"Persistent timestamp (see updates)","limit":"How many updates to fetch, max 100000
    Ordinary (non-bot) users are supposed to pass 10-100"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHANNEL_PUBLIC_GROUP_NA","comment":"channel/supergroup not available."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"FROM_MESSAGE_BOT_DISABLED","comment":"Bots can't use fromMessage min constructors."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PERSISTENT_TIMESTAMP_EMPTY","comment":"Persistent timestamp empty."},{"code":400,"name":"PERSISTENT_TIMESTAMP_INVALID","comment":"Persistent timestamp invalid."},{"code":500,"name":"PERSISTENT_TIMESTAMP_OUTDATED","comment":"Channel internal replication issues, try again later (treat this like an RPC_CALL_FAIL)."},{"code":400,"name":"PINNED_DIALOGS_TOO_MUCH","comment":"Too many pinned dialogs."},{"code":400,"name":"RANGES_INVALID","comment":"Invalid range provided."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."}],"available":"both"},"photos.uploadProfilePhoto":{"comment":"Updates current user profile photo.\n\nThe file, video and video_emoji_markup flags are mutually exclusive.","arguments":{"flags":"Flags, see TL conditional fields","fallback":"If set, the chosen profile photo will be shown to users that can't display your main profile photo due to your privacy settings.","bot":"Can contain info of a bot we own, to change the profile photo of that bot, instead of the current user.","file":"Profile photo","video":"Animated profile picture video","video_start_ts":"Floating point UNIX timestamp in seconds, indicating the frame of the video/sticker that should be used as static preview; can only be used if video or video_emoji_markup is set.","video_emoji_markup":"Animated sticker profile picture, must contain either a {@link RawVideoSizeEmojiMarkup} or a {@link RawVideoSizeStickerMarkup} constructor."},"throws":[{"code":400,"name":"ALBUM_PHOTOS_TOO_MANY","comment":"You have uploaded too many profile photos, delete some before retrying."},{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."},{"code":400,"name":"EMOJI_MARKUP_INVALID","comment":"The specified video_emoji_markup was invalid."},{"code":400,"name":"FILE_PARTS_INVALID","comment":"The number of file parts is invalid."},{"code":400,"name":"IMAGE_PROCESS_FAILED","comment":"Failure while processing image."},{"code":400,"name":"PHOTO_CROP_FILE_MISSING","comment":"Photo crop file missing."},{"code":400,"name":"PHOTO_CROP_SIZE_SMALL","comment":"Photo is too small."},{"code":400,"name":"PHOTO_EXT_INVALID","comment":"The extension of the photo is invalid."},{"code":400,"name":"PHOTO_FILE_MISSING","comment":"Profile photo file missing."},{"code":400,"name":"PHOTO_INVALID","comment":"Photo invalid."},{"code":400,"name":"STICKER_MIME_INVALID","comment":"The specified sticker MIME type is invalid."},{"code":400,"name":"VIDEO_FILE_INVALID","comment":"The specified video file is invalid."}],"available":"both"},"photos.getUserPhotos":{"comment":"Returns the list of user photos.","arguments":{"user_id":"User ID","offset":"Number of list elements to be skipped","max_id":"If a positive value was transferred, the method will return only photos with IDs less than the set one. This parameter is often useful when refetching file references », as in conjuction with limit=1 and offset=-1 the {@link RawPhoto} object with the id specified in max_id can be fetched.","limit":"Number of list elements to be returned"},"throws":[{"code":400,"name":"MAX_ID_INVALID","comment":"The provided max ID is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"both"},"photos.deletePhotos":{"comment":"Deletes profile photos. The method returns a list of successfully deleted photo IDs.","arguments":{"id":"Input photos to delete"},"available":"user"},"photos.uploadContactProfilePhoto":{"comment":"Upload a custom profile picture for a contact, or suggest a new profile picture to a contact.\n\nThe file, video and video_emoji_markup flags are mutually exclusive.","arguments":{"flags":"Flags, see TL conditional fields","suggest":"If set, will send a {@link RawMessageActionSuggestProfilePhoto} service message to user_id, suggesting them to use the specified profile picture; otherwise, will set a personal profile picture for the user (only visible to the current user).","save":"If set, removes a previously set personal profile picture (does not affect suggested profile pictures, to remove them simply deleted the {@link RawMessageActionSuggestProfilePhoto} service message with {@link messages.RawDeleteMessagesRequest}).","user_id":"The contact","file":"Profile photo","video":"Animated profile picture video","video_start_ts":"Floating point UNIX timestamp in seconds, indicating the frame of the video/sticker that should be used as static preview; can only be used if video or video_emoji_markup is set.","video_emoji_markup":"Animated sticker profile picture, must contain either a {@link RawVideoSizeEmojiMarkup} or a {@link RawVideoSizeStickerMarkup} constructor."},"throws":[{"code":400,"name":"CONTACT_MISSING","comment":"The specified user is not a contact."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"user"},"upload.saveFilePart":{"comment":"Saves a part of file for further sending to one of the methods.","arguments":{"file_id":"Random file identifier created by the client","file_part":"Numerical order of a part","bytes":"Binary data, content of a part"},"throws":[{"code":400,"name":"FILE_PART_EMPTY","comment":"The provided file part is empty."},{"code":400,"name":"FILE_PART_INVALID","comment":"The file part number is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."}],"available":"both"},"upload.getFile":{"comment":"Returns content of a whole file or its part.","arguments":{"flags":"Flags, see TL conditional fields","precise":"Disable some checks on limit and offset values, useful for example to stream videos by keyframes","cdn_supported":"Whether the current client supports CDN downloads","location":"File location","offset":"Number of bytes to be skipped","limit":"Number of bytes to be returned"},"throws":[{"code":400,"name":"CDN_METHOD_INVALID","comment":"You can't call this method in a CDN DC."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":406,"name":"FILEREF_UPGRADE_NEEDED","comment":"The client has to be updated in order to support file references."},{"code":400,"name":"FILE_ID_INVALID","comment":"The provided file id is invalid."},{"code":400,"name":"FILE_REFERENCE_EXPIRED","comment":"File reference expired, it must be refetched as described in the documentation."},{"code":420,"name":"FLOOD_PREMIUM_WAIT_%d","comment":"Please wait %d seconds before repeating the action, or purchase a Telegram Premium subscription to remove this rate limit."},{"code":400,"name":"LIMIT_INVALID","comment":"The provided limit is invalid."},{"code":400,"name":"LOCATION_INVALID","comment":"The provided location is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"OFFSET_INVALID","comment":"The provided offset is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"both"},"upload.saveBigFilePart":{"comment":"Saves a part of a large file (over 10 MB in size) to be later passed to one of the methods.","arguments":{"file_id":"Random file id, created by the client","file_part":"Part sequence number","file_total_parts":"Total number of parts","bytes":"Binary data, part contents"},"throws":[{"code":400,"name":"FILE_PARTS_INVALID","comment":"The number of file parts is invalid."},{"code":400,"name":"FILE_PART_EMPTY","comment":"The provided file part is empty."},{"code":400,"name":"FILE_PART_INVALID","comment":"The file part number is invalid."},{"code":400,"name":"FILE_PART_SIZE_CHANGED","comment":"Provided file part size has changed."},{"code":400,"name":"FILE_PART_SIZE_INVALID","comment":"The provided file part size is invalid."},{"code":400,"name":"FILE_PART_TOO_BIG","comment":"The uploaded file part is too big."}],"available":"both"},"upload.getWebFile":{"comment":"Returns content of a web file, by proxying the request through telegram, see the webfile docs for more info.\n\nNote: the query must be sent to the DC specified in the webfile_dc_id MTProto configuration field.","arguments":{"location":"The file to download","offset":"Number of bytes to be skipped","limit":"Number of bytes to be returned"},"throws":[{"code":400,"name":"DOCUMENT_INVALID","comment":"The specified document is invalid."},{"code":400,"name":"LOCATION_INVALID","comment":"The provided location is invalid."}],"available":"user"},"upload.getCdnFile":{"comment":"Download a CDN file.","arguments":{"file_token":"File token","offset":"Offset of chunk to download","limit":"Length of chunk to download"},"throws":[{"code":400,"name":"FILE_TOKEN_INVALID","comment":"The master DC did not accept the file_token (e.g., the token has expired). Continue downloading the file from the master DC using upload.getFile."}],"available":"user"},"upload.reuploadCdnFile":{"comment":"Request a reupload of a certain file to a CDN DC.","arguments":{"file_token":"File token","request_token":"Request token"},"throws":[{"code":400,"name":"CDN_METHOD_INVALID","comment":"You can't call this method in a CDN DC."},{"code":500,"name":"CDN_UPLOAD_TIMEOUT","comment":"A server-side timeout occurred while reuploading the file to the CDN DC."},{"code":400,"name":"FILE_TOKEN_INVALID","comment":"The master DC did not accept the file_token (e.g., the token has expired). Continue downloading the file from the master DC using upload.getFile."},{"code":400,"name":"LOCATION_INVALID","comment":"The provided location is invalid."},{"code":400,"name":"REQUEST_TOKEN_INVALID","comment":"The master DC did not accept the request_token from the CDN DC. Continue downloading the file from the master DC using upload.getFile."},{"code":400,"name":"RSA_DECRYPT_FAILED","comment":"Internal RSA decryption failed."}],"available":"both"},"upload.getCdnFileHashes":{"comment":"Get SHA256 hashes for verifying downloaded CDN files","arguments":{"file_token":"File","offset":"Offset from which to start getting hashes"},"throws":[{"code":400,"name":"CDN_METHOD_INVALID","comment":"You can't call this method in a CDN DC."},{"code":400,"name":"FILE_TOKEN_INVALID","comment":"The master DC did not accept the file_token (e.g., the token has expired). Continue downloading the file from the master DC using upload.getFile."},{"code":400,"name":"RSA_DECRYPT_FAILED","comment":"Internal RSA decryption failed."}],"available":"both"},"upload.getFileHashes":{"comment":"Get SHA256 hashes for verifying downloaded files","arguments":{"location":"File","offset":"Offset from which to get file hashes"},"throws":[{"code":400,"name":"LOCATION_INVALID","comment":"The provided location is invalid."}],"available":"both"},"help.getNearestDc":{"comment":"Returns info on data center nearest to the user.","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"help.getAppUpdate":{"comment":"Returns information on update availability for the current application.","arguments":{"source":"Source"},"available":"user"},"help.getConfig":{"comment":"Returns current configuration, including data center configuration.","throws":[{"code":400,"name":"CONNECTION_API_ID_INVALID","comment":"The provided API id is invalid."},{"code":400,"name":"CONNECTION_APP_VERSION_EMPTY","comment":"App version is empty."},{"code":400,"name":"CONNECTION_LAYER_INVALID","comment":"Layer invalid."},{"code":400,"name":"DATA_INVALID","comment":"Encrypted data invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"USERNAME_INVALID","comment":"The provided username is not valid."},{"code":403,"name":"USER_PRIVACY_RESTRICTED","comment":"The user's privacy settings do not allow you to do this."}],"available":"both","arguments":{"gigagroup":"Is this a broadcast group?"}},"help.getSupport":{"comment":"Returns the support user for the \"ask a question\" feature.","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"help.getInviteText":{"comment":"Returns localized text of a text message with an invitation.","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"help.getCdnConfig":{"comment":"Get configuration for CDN file downloads.","available":"both","arguments":{"gigagroup":"Is this a broadcast group?"}},"help.getTermsOfServiceUpdate":{"comment":"Look for updates of telegram's terms of service","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"help.getRecentMeUrls":{"comment":"Get recently used t.me links.\n\nWhen installing official applications from \"Download Telegram\" buttons present in t.me pages, a referral parameter is passed to applications after installation.
    \nIf, after downloading the application, the user creates a new account (instead of logging into an existing one), the referral parameter should be imported using this method, which returns the t.me pages the user recently opened, before installing Telegram.","arguments":{"referer":"Referrer"},"available":"user"},"help.acceptTermsOfService":{"comment":"Accept the new terms of service","arguments":{"id":"ID of terms of service"},"throws":[{"code":400,"name":"DATA_JSON_INVALID","comment":"The provided JSON data is invalid."}],"available":"user"},"help.setBotUpdatesStatus":{"comment":"Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only","arguments":{"pending_updates_count":"Number of pending updates","message":"Error message, if present"},"throws":[{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},"help.getDeepLinkInfo":{"comment":"Get info about an unsupported deep link, see here for more info ».","arguments":{"path":"Path component of a tg: link"},"available":"user"},"help.saveAppLog":{"comment":"Saves logs of application on the server.","arguments":{"events":"List of input events"},"available":"user"},"help.getAppConfig":{"comment":"Get app-specific configuration, see client configuration for more info on the result.","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"help.getPassportConfig":{"comment":"Get passport configuration","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"help.getPromoData":{"comment":"Get MTProxy/Public Service Announcement information","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"help.hidePromoData":{"comment":"Hide MTProxy/Public Service Announcement information","arguments":{"peer":"Peer to hide"},"available":"user"},"help.getSupportName":{"comment":"Get localized name of the telegram support user","throws":[{"code":403,"name":"USER_INVALID","comment":"Invalid user provided."}],"available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"help.getCountriesList":{"comment":"Get name, ISO code, localized name and phone codes/patterns of all available countries","arguments":{"lang_code":"Language code of the current user","hash":"Hash used for caching, for more info click here."},"available":"user"},"help.editUserInfo":{"comment":"Internal use","arguments":{"user_id":"User","message":"Message","entities":"Message entities for styled text"},"throws":[{"code":400,"name":"ENTITY_BOUNDS_INVALID","comment":"A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length."},{"code":403,"name":"USER_INVALID","comment":"Invalid user provided."}],"available":"user"},"help.getPeerColors":{"comment":"Get the set of accent color palettes » that can be used for message accents.","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"help.getUserInfo":{"comment":"Can only be used by TSF members to obtain internal information.","arguments":{"user_id":"User ID"},"throws":[{"code":403,"name":"USER_INVALID","comment":"Invalid user provided."}],"available":"user"},"help.dismissSuggestion":{"comment":"Dismiss a suggestion, see here for more info ».","arguments":{"peer":"In the case of pending suggestions in {@link RawChannelFull}, the channel ID.","suggestion":"Suggestion, see here for more info »."},"available":"user"},"help.getTimezonesList":{"comment":"Returns timezone information that may be used elsewhere in the API, such as to set Telegram Business opening hours ».","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"help.getPeerProfileColors":{"comment":"Get the set of accent color palettes » that can be used in profile page backgrounds.","arguments":{"hash":"Hash used for caching, for more info click here."},"available":"user"},"help.getPremiumPromo":{"comment":"Get Telegram Premium promotion information","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"channels.deleteMessages":{"comment":"Delete messages in a channel/supergroup","arguments":{"channel":"Channel/supergroup","id":"IDs of messages to delete"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"MESSAGE_DELETE_FORBIDDEN","comment":"You can't delete one of the messages you tried to delete, most likely because it is a service message."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."}],"available":"both"},"channels.readHistory":{"comment":"Mark channel/supergroup history as read","arguments":{"channel":"Channel/supergroup","max_id":"ID of message up to which messages should be marked as read"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."}],"available":"user"},"channels.reportSpam":{"comment":"Reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup","arguments":{"channel":"Supergroup","participant":"Participant whose messages should be reported","id":"IDs of spam messages"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"user"},"channels.getMessages":{"comment":"Get channel/supergroup messages","arguments":{"channel":"Channel/supergroup","id":"IDs of messages to get"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MESSAGE_IDS_EMPTY","comment":"No message ids were provided."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."}],"available":"both"},"channels.getParticipants":{"comment":"Get the participants of a supergroup/channel","arguments":{"channel":"Channel","filter":"Which participant types to fetch","offset":"Offset","limit":"Limit","hash":"Hash"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."}],"available":"both"},"channels.getParticipant":{"comment":"Get info about a channel/supergroup participant","arguments":{"channel":"Channel/supergroup","participant":"Participant to get info about"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PARTICIPANT_ID_INVALID","comment":"The specified participant ID is invalid."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."},{"code":400,"name":"USER_NOT_PARTICIPANT","comment":"You're not a member of this supergroup/channel."}],"available":"both"},"channels.getChannels":{"comment":"Get info about channels/supergroups","arguments":{"id":"IDs of channels/supergroups to get info about"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."}],"available":"both"},"channels.getFullChannel":{"comment":"Get full info about a supergroup, gigagroup or channel","arguments":{"channel":"The channel, supergroup or gigagroup to get info about"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHANNEL_PUBLIC_GROUP_NA","comment":"channel/supergroup not available."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."}],"available":"both"},"channels.editTitle":{"comment":"Edit the name of a channel/supergroup","arguments":{"channel":"Channel/supergroup","title":"New name"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"CHAT_TITLE_EMPTY","comment":"No chat title provided."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."}],"available":"both"},"channels.editAdmin":{"comment":"Modify the admin rights of a user in a supergroup/channel.","arguments":{"channel":"The supergroup/channel.","user_id":"The ID of the user whose admin rights should be modified","admin_rights":"The admin rights","rank":"Indicates the role (rank) of the admin in the group: just an arbitrary string"},"throws":[{"code":400,"name":"ADMINS_TOO_MUCH","comment":"There are too many admins."},{"code":400,"name":"ADMIN_RANK_EMOJI_NOT_ALLOWED","comment":"An admin rank cannot contain emojis."},{"code":400,"name":"ADMIN_RANK_INVALID","comment":"The specified admin rank is invalid."},{"code":400,"name":"BOTS_TOO_MUCH","comment":"There are too many bots in this chat/channel."},{"code":400,"name":"BOT_CHANNELS_NA","comment":"Bots can't edit admin privileges."},{"code":400,"name":"BOT_GROUPS_BLOCKED","comment":"This bot can't be added to groups."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_INVITE_REQUIRED","comment":"You do not have the rights to do this."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":406,"name":"FRESH_CHANGE_ADMINS_FORBIDDEN","comment":"You were just elected admin, you can't add or modify other admins yet."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":403,"name":"RIGHT_FORBIDDEN","comment":"Your admin rights do not allow you to do this."},{"code":400,"name":"USERS_TOO_MUCH","comment":"The maximum number of users has been exceeded (to create a chat, for example)."},{"code":400,"name":"USER_BLOCKED","comment":"User blocked."},{"code":403,"name":"USER_CHANNELS_TOO_MUCH","comment":"One of the users you tried to add is already in too many channels/supergroups."},{"code":400,"name":"USER_CREATOR","comment":"For channels.editAdmin: you've tried to edit the admin rights of the owner, but you're not the owner; for channels.leaveChannel: you can't leave this channel, because you're its creator."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."},{"code":403,"name":"USER_NOT_MUTUAL_CONTACT","comment":"The provided user is not a mutual contact."},{"code":403,"name":"USER_PRIVACY_RESTRICTED","comment":"The user's privacy settings do not allow you to do this."},{"code":403,"name":"USER_RESTRICTED","comment":"You're spamreported, you can't create channels or chats."}],"available":"both"},"channels.checkUsername":{"comment":"Check if a username is free and can be assigned to a channel/supergroup","arguments":{"channel":"The channel/supergroup that will assigned the specified username","username":"The username to check"},"throws":[{"code":400,"name":"CHANNELS_ADMIN_PUBLIC_TOO_MUCH","comment":"You're admin of too many public channels, make some channels private to change the username of this channel."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USERNAME_INVALID","comment":"The provided username is not valid."},{"code":400,"name":"USERNAME_OCCUPIED","comment":"The provided username is already occupied."},{"code":400,"name":"USERNAME_PURCHASE_AVAILABLE","comment":"The specified username can be purchased on https://fragment.com."}],"available":"user"},"channels.inviteToChannel":{"comment":"Invite users to a channel/supergroup","arguments":{"channel":"Channel/supergroup","users":"Users to invite"},"throws":[{"code":400,"name":"BOTS_TOO_MUCH","comment":"There are too many bots in this chat/channel."},{"code":400,"name":"BOT_GROUPS_BLOCKED","comment":"This bot can't be added to groups."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_INVALID","comment":"Invalid chat."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"USERS_TOO_MUCH","comment":"The maximum number of users has been exceeded (to create a chat, for example)."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."},{"code":400,"name":"USER_BLOCKED","comment":"User blocked."},{"code":400,"name":"USER_BOT","comment":"Bots can only be admins in channels."},{"code":403,"name":"USER_CHANNELS_TOO_MUCH","comment":"One of the users you tried to add is already in too many channels/supergroups."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."},{"code":400,"name":"USER_KICKED","comment":"This user was kicked from this supergroup/channel."},{"code":403,"name":"USER_NOT_MUTUAL_CONTACT","comment":"The provided user is not a mutual contact."},{"code":403,"name":"USER_PRIVACY_RESTRICTED","comment":"The user's privacy settings do not allow you to do this."}],"available":"user"},"channels.editPhoto":{"comment":"Change the photo of a channel/supergroup","arguments":{"channel":"Channel/supergroup whose photo should be edited","photo":"New photo"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"FILE_PARTS_INVALID","comment":"The number of file parts is invalid."},{"code":400,"name":"FILE_REFERENCE_INVALID","comment":"The specified file reference is invalid."},{"code":400,"name":"IMAGE_PROCESS_FAILED","comment":"Failure while processing image."},{"code":400,"name":"PHOTO_CROP_SIZE_SMALL","comment":"Photo is too small."},{"code":400,"name":"PHOTO_EXT_INVALID","comment":"The extension of the photo is invalid."},{"code":400,"name":"PHOTO_INVALID","comment":"Photo invalid."},{"code":400,"name":"STICKER_MIME_INVALID","comment":"The specified sticker MIME type is invalid."}],"available":"both"},"channels.updateUsername":{"comment":"Change or remove the username of a supergroup/channel","arguments":{"channel":"Channel","username":"New username, pass an empty string to remove the username"},"throws":[{"code":400,"name":"CHANNELS_ADMIN_PUBLIC_TOO_MUCH","comment":"You're admin of too many public channels, make some channels private to change the username of this channel."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"USERNAME_INVALID","comment":"The provided username is not valid."},{"code":400,"name":"USERNAME_NOT_MODIFIED","comment":"The username was not modified."},{"code":400,"name":"USERNAME_OCCUPIED","comment":"The provided username is already occupied."},{"code":400,"name":"USERNAME_PURCHASE_AVAILABLE","comment":"The specified username can be purchased on https://fragment.com."}],"available":"user"},"channels.joinChannel":{"comment":"Join a channel/supergroup","arguments":{"channel":"Channel/supergroup to join"},"throws":[{"code":400,"name":"CHANNELS_TOO_MUCH","comment":"You have joined too many channels/supergroups."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_INVALID","comment":"Invalid chat."},{"code":400,"name":"INVITE_HASH_EMPTY","comment":"The invite hash is empty."},{"code":406,"name":"INVITE_HASH_EXPIRED","comment":"The invite link has expired."},{"code":400,"name":"INVITE_HASH_INVALID","comment":"The invite hash is invalid."},{"code":400,"name":"INVITE_REQUEST_SENT","comment":"You have successfully requested to join this chat or channel."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USERS_TOO_MUCH","comment":"The maximum number of users has been exceeded (to create a chat, for example)."},{"code":400,"name":"USER_ALREADY_PARTICIPANT","comment":"The user is already in the group."},{"code":400,"name":"USER_CHANNELS_TOO_MUCH","comment":"One of the users you tried to add is already in too many channels/supergroups."}],"available":"user"},"channels.leaveChannel":{"comment":"Leave a channel/supergroup","arguments":{"channel":"Channel/supergroup to leave"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHANNEL_PUBLIC_GROUP_NA","comment":"channel/supergroup not available."},{"code":400,"name":"CHAT_INVALID","comment":"Invalid chat."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"USER_BANNED_IN_CHANNEL","comment":"You're banned from sending messages in supergroups/channels."},{"code":400,"name":"USER_CREATOR","comment":"For channels.editAdmin: you've tried to edit the admin rights of the owner, but you're not the owner; for channels.leaveChannel: you can't leave this channel, because you're its creator."},{"code":400,"name":"USER_NOT_PARTICIPANT","comment":"You're not a member of this supergroup/channel."}],"available":"both"},"channels.createChannel":{"comment":"Create a supergroup/channel.","arguments":{"flags":"Flags, see TL conditional fields","broadcast":"Whether to create a channel","megagroup":"Whether to create a supergroup","for_import":"Whether the supergroup is being created to import messages from a foreign chat service using {@link messages.RawInitHistoryImportRequest}","forum":"Whether to create a forum","title":"Channel title","about":"Channel description","geo_point":"Geogroup location, see here » for more info on geogroups.","address":"Geogroup address, see here » for more info on geogroups.","ttl_period":"Time-to-live of all messages that will be sent in the supergroup: once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. You can use {@link messages.RawSetDefaultHistoryTTLRequest} to edit this value later."},"throws":[{"code":400,"name":"ADDRESS_INVALID","comment":"The specified geopoint address is invalid."},{"code":400,"name":"CHANNELS_ADMIN_LOCATED_TOO_MUCH","comment":"The user has reached the limit of public geogroups."},{"code":400,"name":"CHANNELS_TOO_MUCH","comment":"You have joined too many channels/supergroups."},{"code":400,"name":"CHAT_ABOUT_TOO_LONG","comment":"Chat about too long."},{"code":500,"name":"CHAT_INVALID","comment":"Invalid chat."},{"code":400,"name":"CHAT_TITLE_EMPTY","comment":"No chat title provided."},{"code":400,"name":"TTL_PERIOD_INVALID","comment":"The specified TTL period is invalid."},{"code":406,"name":"USER_RESTRICTED","comment":"You're spamreported, you can't create channels or chats."}],"available":"user"},"channels.exportMessageLink":{"comment":"Get link and embed info of a message in a channel/supergroup","arguments":{"flags":"Flags, see TL conditional fields","grouped":"Whether to include other grouped media (for albums)","thread":"Whether to also include a thread ID, if available, inside of the link","channel":"Channel","id":"Message ID"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."}],"available":"user"},"channels.deleteChannel":{"comment":"Delete a channel/supergroup","arguments":{"channel":"Channel/supergroup to delete"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":406,"name":"CHANNEL_TOO_LARGE","comment":"Channel is too large to be deleted; this error is issued when trying to delete channels with more than 1000 members (subject to change)."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."}],"available":"user"},"channels.toggleSignatures":{"comment":"Enable/disable message signatures in channels","arguments":{"channel":"Channel","enabled":"Value"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."}],"available":"user"},"channels.getAdminedPublicChannels":{"comment":"Get channels/supergroups/geogroups we're admin in. Usually called when the user exceeds the {@link RawConfig} for owned public channels/supergroups/geogroups, and the user is given the choice to remove one of their channels/supergroups/geogroups.","arguments":{"flags":"Flags, see TL conditional fields","by_location":"Get geogroups","check_limit":"If set and the user has reached the limit of owned public channels/supergroups/geogroups, instead of returning the channel list one of the specified errors will be returned.
    Useful to check if a new public channel can indeed be created, even before asking the user to enter a channel username to use in {@link channels.RawCheckUsernameRequest}/{@link channels.RawUpdateUsernameRequest}.","for_personal":"Set this flag to only fetch the full list of channels that may be passed to {@link account.RawUpdatePersonalChannelRequest} to display them on our profile page."},"throws":[{"code":400,"name":"CHANNELS_ADMIN_LOCATED_TOO_MUCH","comment":"The user has reached the limit of public geogroups."},{"code":400,"name":"CHANNELS_ADMIN_PUBLIC_TOO_MUCH","comment":"You're admin of too many public channels, make some channels private to change the username of this channel."}],"available":"user"},"channels.getAdminLog":{"comment":"Get the admin log of a channel/supergroup","arguments":{"flags":"Flags, see TL conditional fields","channel":"Channel","q":"Search query, can be empty","events_filter":"Event filter","admins":"Only show events from these admins","max_id":"Maximum ID of message to return (see pagination)","min_id":"Minimum ID of message to return (see pagination)","limit":"Maximum number of results to return, see pagination"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."}],"available":"user"},"channels.editBanned":{"comment":"Ban/unban/kick a user in a supergroup/channel.","arguments":{"channel":"The supergroup/channel.","participant":"Participant to ban","banned_rights":"The banned rights"},"throws":[{"code":406,"name":"BANNED_RIGHTS_INVALID","comment":"You provided some invalid flags in the banned rights."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PARTICIPANT_ID_INVALID","comment":"The specified participant ID is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USER_ADMIN_INVALID","comment":"You're not an admin."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"both"},"channels.readMessageContents":{"comment":"Mark channel/supergroup message contents as read","arguments":{"channel":"Channel/supergroup","id":"IDs of messages whose contents should be marked as read"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":406,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."}],"available":"user"},"channels.deleteHistory":{"comment":"Delete the history of a supergroup","arguments":{"flags":"Flags, see TL conditional fields","for_everyone":"Whether the history should be deleted for everyone","channel":"Supergroup whose history must be deleted","max_id":"ID of message up to which the history must be deleted"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PARICIPANT_MISSING","comment":"The current user is not in the channel."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHANNEL_TOO_BIG","comment":"This channel has too many participants (>1000) to be deleted."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."}],"available":"user"},"channels.setStickers":{"comment":"Associate a stickerset to the supergroup","arguments":{"channel":"Supergroup","stickerset":"The stickerset to associate"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"PARTICIPANTS_TOO_FEW","comment":"Not enough participants."},{"code":406,"name":"STICKERSET_OWNER_ANONYMOUS","comment":"Provided stickerset can't be installed as group stickerset to prevent admin deanonymization."}],"available":"both"},"channels.togglePreHistoryHidden":{"comment":"Hide/unhide message history for new channel/supergroup users","arguments":{"channel":"Channel/supergroup","enabled":"Hide/unhide"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_LINK_EXISTS","comment":"The chat is public, you can't hide the history to new users."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"FORUM_ENABLED","comment":"You can't execute the specified action because the group is a forum, disable forum functionality to continue."}],"available":"user"},"channels.getGroupsForDiscussion":{"comment":"Get all groups that can be used as discussion groups.\n\nReturned basic group chats must be first upgraded to supergroups before they can be set as a discussion group.
    \nTo set a returned supergroup as a discussion group, access to its old messages must be enabled using {@link channels.RawTogglePreHistoryHiddenRequest}, first.","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"channels.getLeftChannels":{"comment":"Get a list of channels/supergroups we left, requires a takeout session, see here » for more info.","arguments":{"offset":"Offset for pagination"},"throws":[{"code":403,"name":"TAKEOUT_REQUIRED","comment":"A takeout session needs to be initialized first, see here » for more info."}],"available":"user"},"channels.editLocation":{"comment":"Edit location of geo group, see here » for more info on geogroups.","arguments":{"channel":"Geogroup","geo_point":"New geolocation","address":"Address string"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"MEGAGROUP_GEO_REQUIRED","comment":"This method can only be invoked on a geogroup."},{"code":400,"name":"MEGAGROUP_REQUIRED","comment":"You can only use this method on a supergroup."}],"available":"user"},"channels.setDiscussionGroup":{"comment":"Associate a group to a channel as discussion group for that channel","arguments":{"broadcast":"Channel","group":"Discussion group to associate to the channel"},"throws":[{"code":400,"name":"BROADCAST_ID_INVALID","comment":"Broadcast ID invalid."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"LINK_NOT_MODIFIED","comment":"Discussion link not modified."},{"code":400,"name":"MEGAGROUP_ID_INVALID","comment":"Invalid supergroup ID."},{"code":400,"name":"MEGAGROUP_PREHISTORY_HIDDEN","comment":"Group with hidden history for new members can't be set as discussion groups."}],"available":"user"},"channels.getInactiveChannels":{"comment":"Get inactive channels and supergroups","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"channels.editCreator":{"comment":"Transfer channel ownership","arguments":{"channel":"Channel","user_id":"New channel owner","password":"2FA password of account"},"throws":[{"code":400,"name":"CHANNELS_ADMIN_PUBLIC_TOO_MUCH","comment":"You're admin of too many public channels, make some channels private to change the username of this channel."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"PASSWORD_HASH_INVALID","comment":"The provided password hash is invalid."},{"code":400,"name":"PASSWORD_MISSING","comment":"You must enable 2FA before executing this operation."},{"code":400,"name":"PASSWORD_TOO_FRESH_%d","comment":"The password was modified less than 24 hours ago, try again in %d seconds."},{"code":400,"name":"SESSION_TOO_FRESH_%d","comment":"This session was created less than 24 hours ago, try again in %d seconds."},{"code":400,"name":"SRP_ID_INVALID","comment":"Invalid SRP ID provided."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"user"},"channels.convertToGigagroup":{"comment":"Convert a supergroup to a gigagroup, when requested by channel suggestions.","arguments":{"channel":"The supergroup to convert"},"throws":[{"code":400,"name":"CHANNEL_ID_INVALID","comment":"The specified supergroup ID is invalid."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"FORUM_ENABLED","comment":"You can't execute the specified action because the group is a forum, disable forum functionality to continue."},{"code":400,"name":"PARTICIPANTS_TOO_FEW","comment":"Not enough participants."}],"available":"user"},"channels.toggleSlowMode":{"comment":"Toggle supergroup slow mode: if enabled, users will only be able to send one message every seconds seconds","arguments":{"channel":"The supergroup","seconds":"Users will only be able to send one message every seconds seconds, 0 to disable the limitation"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"SECONDS_INVALID","comment":"Invalid duration provided."}],"available":"user"},"channels.viewSponsoredMessage":{"comment":"Mark a specific sponsored message as read","arguments":{"channel":"Peer","random_id":"Message ID"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."}],"available":"user"},"channels.getSponsoredMessages":{"comment":"Get a list of sponsored messages","arguments":{"channel":"Peer"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."}],"available":"user"},"channels.deleteParticipantHistory":{"comment":"Delete all messages sent by a specific participant of a given supergroup","arguments":{"channel":"Supergroup","participant":"The participant whose messages should be deleted"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PARTICIPANT_ID_INVALID","comment":"The specified participant ID is invalid."}],"available":"user"},"channels.getSendAs":{"comment":"Obtains a list of peers that can be used to send messages in a specific group","arguments":{"peer":"The group where we intend to send messages"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"channels.deactivateAllUsernames":{"comment":"Disable all purchased usernames of a supergroup or channel","arguments":{"channel":"Supergroup or channel"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."}],"available":"user"},"channels.toggleForum":{"comment":"Enable or disable forum functionality in a supergroup.","arguments":{"channel":"Supergroup ID","enabled":"Enable or disable forum functionality"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_DISCUSSION_UNALLOWED","comment":"You can't enable forum topics in a discussion group linked to a channel."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."}],"available":"user"},"channels.toggleJoinToSend":{"comment":"Set whether all users should join a discussion group in order to comment on a post »","arguments":{"channel":"Discussion group","enabled":"Toggle"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."}],"available":"user"},"channels.createForumTopic":{"comment":"Create a forum topic; requires manage_topics rights.","arguments":{"flags":"Flags, see TL conditional fields","channel":"The forum","title":"Topic title (maximum UTF-8 length: 128)","icon_color":"If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F.","icon_emoji_id":"ID of the custom emoji used as topic icon. Telegram Premium users can use any custom emoji, other users can only use the custom emojis contained in the {@link RawInputStickerSetEmojiDefaultTopicIcons} emoji pack.","random_id":"Unique client message ID to prevent duplicate sending of the same event","send_as":"Create the topic as the specified peer"},"throws":[{"code":400,"name":"CHANNEL_FORUM_MISSING","comment":"This supergroup is not a forum."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":403,"name":"CHAT_WRITE_FORBIDDEN","comment":"You can't write in this chat."},{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."},{"code":400,"name":"TOPIC_TITLE_EMPTY","comment":"The specified topic title is empty."}],"available":"both"},"channels.toggleJoinRequest":{"comment":"Set whether all users should request admin approval to join the group ».","arguments":{"channel":"Group","enabled":"Toggle"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"CHAT_PUBLIC_REQUIRED","comment":"You can only enable join requests in public groups."}],"available":"user"},"channels.reorderUsernames":{"comment":"Reorder active usernames","arguments":{"channel":"The supergroup or channel","order":"The new order for active usernames. All active usernames must be specified."},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."}],"available":"user"},"channels.getForumTopicsByID":{"comment":"Get forum topics by their ID","arguments":{"channel":"Forum","topics":"Topic IDs"},"throws":[{"code":400,"name":"CHANNEL_FORUM_MISSING","comment":"This supergroup is not a forum."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"TOPICS_EMPTY","comment":"You specified no topic IDs."}],"available":"user"},"channels.editForumTopic":{"comment":"Edit forum topic; requires manage_topics rights.","arguments":{"flags":"Flags, see TL conditional fields","channel":"Supergroup","topic_id":"Topic ID","title":"If present, will update the topic title (maximum UTF-8 length: 128).","icon_emoji_id":"If present, updates the custom emoji used as topic icon. Telegram Premium users can use any custom emoji, other users can only use the custom emojis contained in the {@link RawInputStickerSetEmojiDefaultTopicIcons} emoji pack. Pass 0 to switch to the fallback topic icon.","closed":"If present, will update the open/closed status of the topic.","hidden":"If present, will hide/unhide the topic (only valid for the \"General\" topic, id=1)."},"throws":[{"code":400,"name":"CHANNEL_FORUM_MISSING","comment":"This supergroup is not a forum."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"DOCUMENT_INVALID","comment":"The specified document is invalid."},{"code":400,"name":"GENERAL_MODIFY_ICON_FORBIDDEN","comment":"You can't modify the icon of the \"General\" topic."},{"code":400,"name":"TOPIC_CLOSE_SEPARATELY","comment":"The close flag cannot be provided together with any of the other flags."},{"code":400,"name":"TOPIC_HIDE_SEPARATELY","comment":"The hide flag cannot be provided together with any of the other flags."},{"code":400,"name":"TOPIC_ID_INVALID","comment":"The specified topic ID is invalid."},{"code":400,"name":"TOPIC_NOT_MODIFIED","comment":"The updated topic info is equal to the current topic info, nothing was changed."}],"available":"both"},"channels.getForumTopics":{"comment":"Get topics of a forum","arguments":{"flags":"Flags, see TL conditional fields","channel":"Supergroup","q":"Search query","offset_date":"Offsets for pagination, for more info click here, date of the last message of the last found topic. Use 0 or any date in the future to get results from the last topic.","offset_id":"Offsets for pagination, for more info click here, ID of the last message of the last found topic (or initially 0).","offset_topic":"Offsets for pagination, for more info click here, ID of the last found topic (or initially 0).","limit":"Maximum number of results to return, see pagination. For optimal performance, the number of returned topics is chosen by the server and can be smaller than the specified limit."},"throws":[{"code":400,"name":"CHANNEL_FORUM_MISSING","comment":"This supergroup is not a forum."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."}],"available":"user"},"channels.toggleUsername":{"comment":"Activate or deactivate a purchased fragment.com username associated to a supergroup or channel we own.","arguments":{"channel":"Supergroup or channel","username":"Username","active":"Whether to activate or deactivate the username"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"USERNAMES_ACTIVE_TOO_MUCH","comment":"The maximum number of active usernames was reached."},{"code":400,"name":"USERNAME_INVALID","comment":"The provided username is not valid."},{"code":400,"name":"USERNAME_NOT_MODIFIED","comment":"The username was not modified."}],"available":"user"},"channels.updatePinnedForumTopic":{"comment":"Pin or unpin forum topics","arguments":{"channel":"Supergroup ID","topic_id":"Forum topic ID","pinned":"Whether to pin or unpin the topic"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"TOPIC_ID_INVALID","comment":"The specified topic ID is invalid."}],"available":"user"},"channels.deleteTopicHistory":{"comment":"Delete message history of a forum topic","arguments":{"channel":"Forum","top_msg_id":"Topic ID"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"TOPIC_ID_INVALID","comment":"The specified topic ID is invalid."}],"available":"both"},"channels.reorderPinnedForumTopics":{"comment":"Reorder pinned forum topics","arguments":{"flags":"Flags, see TL conditional fields","force":"If not set, the order of only the topics present both server-side and in order will be changed (i.e. mentioning topics not pinned server-side in order will not pin them, and not mentioning topics pinned server-side will not unpin them).
    If set, the entire server-side pinned topic list will be replaced with order (i.e. mentioning topics not pinned server-side in order will pin them, and not mentioning topics pinned server-side will unpin them)","channel":"Supergroup ID","order":"Topic IDs »"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."}],"available":"user"},"channels.reportAntiSpamFalsePositive":{"comment":"Report a native antispam false positive","arguments":{"channel":"Supergroup ID","msg_id":"Message ID that was mistakenly deleted by the native antispam system, taken from the admin log"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."}],"available":"user"},"channels.toggleAntiSpam":{"comment":"Enable or disable the native antispam system.","arguments":{"channel":"Supergroup ID. The specified supergroup must have at least telegram_antispam_group_size_min members to enable antispam functionality, as specified by the client configuration parameters.","enabled":"Enable or disable the native antispam system."},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."}],"available":"user"},"channels.toggleParticipantsHidden":{"comment":"Hide or display the participants list in a supergroup.\n\nThe supergroup must have at least hidden_members_group_size_min participants in order to use this method, as specified by the client configuration parameters ».","arguments":{"channel":"Supergroup ID","enabled":"If true, will hide the participants list; otherwise will unhide it."},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"CHAT_NOT_MODIFIED","comment":"No changes were made to chat information because the new information you passed is identical to the current information."},{"code":400,"name":"PARTICIPANTS_TOO_FEW","comment":"Not enough participants."}],"available":"user"},"channels.toggleViewForumAsMessages":{"comment":"Users may also choose to display messages from all topics of a forum as if they were sent to a normal group, using a \"View as messages\" setting in the local client: this setting only affects the current account, and is synced to other logged in sessions using this method.\n\nInvoking this method will update the value of the view_forum_as_messages flag of {@link RawChannelFull} or {@link RawDialog} and emit an {@link RawUpdateChannelViewForumAsMessages}.","arguments":{"channel":"The forum","enabled":"The new value of the view_forum_as_messages flag."},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."}],"available":"user"},"channels.updateColor":{"comment":"Update the accent color and background custom emoji » of a channel.","arguments":{"flags":"Flags, see TL conditional fields","for_profile":"Whether to change the accent color emoji pattern of the profile page; otherwise, the accent color and emoji pattern of messages will be changed.
    Channels can change both message and profile palettes; supergroups can only change the profile palette, of course after reaching the appropriate boost level.","channel":"Channel whose accent color should be changed.","color":"ID of the accent color palette » to use (not RGB24, see here » for more info); if not set, the default palette is used.","background_emoji_id":"Custom emoji ID used in the accent color pattern."},"throws":[{"code":400,"name":"BOOSTS_REQUIRED","comment":"The specified channel must first be boosted by its users in order to perform this action."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."}],"available":"user"},"channels.getChannelRecommendations":{"comment":"Obtain a list of similarly themed public channels, selected based on similarities in their subscriber bases.","arguments":{"flags":"Flags, see TL conditional fields","channel":"The method will return channels related to the passed channel. If not set, the method will returns channels related to channels the user has joined."},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."}],"available":"user"},"channels.setBoostsToUnblockRestrictions":{"comment":"Admins with {@link RawChatAdminRights} may allow users that apply a certain number of booosts » to the group to bypass {@link channels.RawToggleSlowModeRequest} and other » supergroup restrictions, see here » for more info.","arguments":{"channel":"The supergroup.","boosts":"The number of required boosts (1-8, 0 to disable)."},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."}],"available":"user"},"channels.setEmojiStickers":{"comment":"Set a custom emoji stickerset for supergroups. Only usable after reaching at least the boost level » specified in the group_emoji_stickers_level_min » config parameter.","arguments":{"channel":"The supergroup","stickerset":"The custom emoji stickerset to associate to the supergroup"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."}],"available":"user"},"channels.reportSponsoredMessage":{"comment":"Report a sponsored message », see here » for more info on the full flow.","arguments":{"channel":"The channel where the sponsored message can be seen.","random_id":"ID of the sponsored message.","option":"Chosen report option, initially an empty string, see here » for more info on the full flow."},"throws":[{"code":400,"name":"AD_EXPIRED","comment":"The ad has expired (too old or not found)."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."}],"available":"user"},"bots.answerWebhookJSONQuery":{"comment":"Answers a custom query; for bots only","arguments":{"query_id":"Identifier of a custom query","data":"JSON-serialized answer to the query"},"throws":[{"code":400,"name":"DATA_JSON_INVALID","comment":"The provided JSON data is invalid."},{"code":400,"name":"QUERY_ID_INVALID","comment":"The query ID is invalid."},{"code":403,"name":"USER_BOT_INVALID","comment":"User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},"channels.searchPosts":{"comment":"Globally search for posts from public channels » (including those we aren't a member of) containing a specific hashtag.","arguments":{"hashtag":"The hashtag to search, without the # character.","offset_rate":"Initially 0, then set to the {@link messages.RawMessagesSlice}","offset_peer":"Offsets for pagination, for more info click here","offset_id":"Offsets for pagination, for more info click here","limit":"Maximum number of results to return, see pagination"},"available":"user"},"bots.resetBotCommands":{"comment":"Clear bot commands for the specified bot scope and language code","arguments":{"scope":"Command scope","lang_code":"Language code"},"throws":[{"code":400,"name":"LANG_CODE_INVALID","comment":"The specified language code is invalid."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},"bots.sendCustomRequest":{"comment":"Sends a custom request; for bots only","arguments":{"custom_method":"The method name","params":"JSON-serialized method parameters"},"throws":[{"code":400,"name":"DATA_JSON_INVALID","comment":"The provided JSON data is invalid."},{"code":400,"name":"METHOD_INVALID","comment":"The specified method is invalid."},{"code":403,"name":"USER_BOT_INVALID","comment":"User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},"bots.getBotCommands":{"comment":"Obtain a list of bot commands for the specified bot scope and language code","arguments":{"scope":"Command scope","lang_code":"Language code"},"throws":[{"code":400,"name":"USER_BOT_INVALID","comment":"User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},"bots.setBotCommands":{"comment":"Set bot command list","arguments":{"scope":"Command scope","lang_code":"Language code","commands":"Bot commands"},"throws":[{"code":400,"name":"BOT_COMMAND_DESCRIPTION_INVALID","comment":"The specified command description is invalid."},{"code":400,"name":"BOT_COMMAND_INVALID","comment":"The specified command is invalid."},{"code":400,"name":"LANG_CODE_INVALID","comment":"The specified language code is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"bot"},"channels.restrictSponsoredMessages":{"comment":"Disable ads on the specified channel, for all users.\n\nAvailable only after reaching at least the boost level » specified in the channel_restrict_sponsored_level_min » config parameter.","arguments":{"channel":"The channel.","restricted":"Whether to disable or re-enable ads."},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."}],"available":"user"},"bots.setBotMenuButton":{"comment":"Sets the menu button action » for a given user or for all users","arguments":{"user_id":"User ID","button":"Bot menu button action"},"throws":[{"code":400,"name":"BUTTON_TEXT_INVALID","comment":"The specified button text is invalid."},{"code":400,"name":"BUTTON_URL_INVALID","comment":"Button URL invalid."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},"channels.clickSponsoredMessage":{"comment":"Informs the server that the user has either:","arguments":{"channel":"Channel where the sponsored message was posted","random_id":"Message ID"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."}],"available":"user"},"bots.setBotGroupDefaultAdminRights":{"comment":"Set the default suggested admin rights for bots being added as admins to groups, see here for more info on how to handle them ».","arguments":{"admin_rights":"Admin rights"},"throws":[{"code":400,"name":"RIGHTS_NOT_MODIFIED","comment":"The new admin rights are equal to the old rights, no change was made."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},"bots.getBotMenuButton":{"comment":"Gets the menu button action for a given user or for all users, previously set using {@link bots.RawSetBotMenuButtonRequest}; users can see this information in the {@link RawBotInfo} constructor.","arguments":{"user_id":"User ID or empty for the default menu button."},"throws":[{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},"channels.updateEmojiStatus":{"comment":"Set an emoji status for a channel or supergroup.","arguments":{"channel":"The channel/supergroup, must have at least channel_emoji_status_level_min/group_emoji_status_level_min boosts.","emoji_status":"Emoji status to set"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."}],"available":"user"},"bots.setBotInfo":{"comment":"Set localized name, about text and description of a bot (or of the current account, if called by a bot).","arguments":{"flags":"Flags, see TL conditional fields","bot":"If called by a user, must contain the peer of a bot we own.","lang_code":"Language code, if left empty update the fallback about text and description","name":"New bot name","about":"New about text","description":"New description"},"throws":[{"code":400,"name":"USER_BOT_INVALID","comment":"User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts."}],"available":"both"},"bots.setBotBroadcastDefaultAdminRights":{"comment":"Set the default suggested admin rights for bots being added as admins to channels, see here for more info on how to handle them ».","arguments":{"admin_rights":"Admin rights"},"throws":[{"code":400,"name":"RIGHTS_NOT_MODIFIED","comment":"The new admin rights are equal to the old rights, no change was made."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."}],"available":"bot"},"bots.getBotInfo":{"comment":"Get localized name, about text and description of a bot (or of the current account, if called by a bot).","arguments":{"flags":"Flags, see TL conditional fields","bot":"If called by a user, must contain the peer of a bot we own.","lang_code":"Language code, if left empty this method will return the fallback about text and description."},"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."},{"code":400,"name":"LANG_CODE_INVALID","comment":"The specified language code is invalid."},{"code":400,"name":"USER_BOT_INVALID","comment":"User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts."}],"available":"both"},"bots.toggleUsername":{"comment":"Activate or deactivate a purchased fragment.com username associated to a bot we own.","arguments":{"bot":"The bot","username":"Username","active":"Whether to activate or deactivate it"},"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."},{"code":400,"name":"USERNAME_NOT_MODIFIED","comment":"The username was not modified."}],"available":"user"},"bots.reorderUsernames":{"comment":"Reorder usernames associated to a bot we own.","arguments":{"bot":"The bot","order":"The new order for active usernames. All active usernames must be specified."},"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."},{"code":400,"name":"USERNAME_NOT_MODIFIED","comment":"The username was not modified."}],"available":"user"},"bots.canSendMessage":{"comment":"Check whether the specified bot can send us messages","arguments":{"bot":"The bot"},"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."}],"available":"user"},"bots.getPopularAppBots":{"comment":"Fetch popular Main Mini Apps, to be used in the apps tab of global search ».","arguments":{"offset":"Offset for pagination, initially an empty string, then re-use the next_offset returned by the previous query.","limit":"Maximum number of results to return, see pagination"},"available":"user"},"bots.allowSendMessage":{"comment":"Allow the specified bot to send us messages","arguments":{"bot":"The bot"},"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."}],"available":"user"},"bots.addPreviewMedia":{"comment":"Add a main mini app preview, see here » for more info.\n\nOnly owners of bots with a configured Main Mini App can use this method, see see here » for more info on how to check if you can invoke this method.","arguments":{"bot":"The bot that owns the Main Mini App.","lang_code":"ISO 639-1 language code, indicating the localization of the preview to add.","media":"The photo/video preview, uploaded using {@link messages.RawUploadMediaRequest}."},"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."}],"available":"user"},"bots.editPreviewMedia":{"comment":"Edit a main mini app preview, see here » for more info.\n\nOnly owners of bots with a configured Main Mini App can use this method, see see here » for more info on how to check if you can invoke this method.","arguments":{"bot":"The bot that owns the Main Mini App.","lang_code":"ISO 639-1 language code, indicating the localization of the preview to edit.","media":"The photo/video preview to replace, previously fetched as specified here ».","new_media":"The new photo/video preview, uploaded using {@link messages.RawUploadMediaRequest}."},"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."}],"available":"user"},"bots.invokeWebViewCustomMethod":{"comment":"Send a custom request from a mini bot app, triggered by a web_app_invoke_custom_method event ».\n\nThe response should be sent using a custom_method_invoked event, see here » for more info on the flow.","arguments":{"bot":"Identifier of the bot associated to the mini bot app","custom_method":"Identifier of the custom method to invoke","params":"Method parameters"},"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."},{"code":400,"name":"DATA_JSON_INVALID","comment":"The provided JSON data is invalid."}],"available":"user"},"bots.reorderPreviewMedias":{"comment":"Reorder a main mini app previews, see here » for more info.\n\nOnly owners of bots with a configured Main Mini App can use this method, see see here » for more info on how to check if you can invoke this method.","arguments":{"bot":"The bot that owns the Main Mini App.","lang_code":"ISO 639-1 language code, indicating the localization of the previews to reorder.","order":"New order of the previews."},"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."}],"available":"user"},"bots.getPreviewMedias":{"comment":"Fetch main mini app previews, see here » for more info.","arguments":{"bot":"The bot that owns the Main Mini App."},"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."}],"available":"user"},"bots.deletePreviewMedia":{"comment":"Delete a main mini app preview, see here » for more info.\n\nOnly owners of bots with a configured Main Mini App can use this method, see see here » for more info on how to check if you can invoke this method.","arguments":{"bot":"The bot that owns the Main Mini App.","lang_code":"ISO 639-1 language code, indicating the localization of the preview to delete.","media":"The photo/video preview to delete, previously fetched as specified here »."},"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."}],"available":"user"},"payments.getPaymentForm":{"comment":"Get a payment form","arguments":{"flags":"Flags, see TL conditional fields","invoice":"Invoice","theme_params":"A JSON object with the following keys, containing color theme information (integers, RGB24) to pass to the payment provider, to apply in eventual verification pages:
    bg_color - Background color
    text_color - Text color
    hint_color - Hint text color
    link_color - Link color
    button_color - Button color
    button_text_color - Button text color"},"throws":[{"code":400,"name":"BOOST_PEER_INVALID","comment":"The specified boost_peer is invalid."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"SLUG_INVALID","comment":"The specified invoice slug is invalid."},{"code":400,"name":"UNTIL_DATE_INVALID","comment":"Invalid until date provided."}],"available":"user"},"payments.validateRequestedInfo":{"comment":"Submit requested order information for validation","arguments":{"flags":"Flags, see TL conditional fields","save":"Save order information to re-use it for future orders","invoice":"Invoice","info":"Requested order information"},"throws":[{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"payments.sendPaymentForm":{"comment":"Send compiled payment form","arguments":{"flags":"Flags, see TL conditional fields","form_id":"Form ID","invoice":"Invoice","requested_info_id":"ID of saved and validated {@link payments.RawValidatedRequestedInfo}","shipping_option_id":"Chosen shipping option ID","credentials":"Payment credentials","tip_amount":"Tip, in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)."},"throws":[{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"payments.clearSavedInfo":{"comment":"Clear saved payment information","arguments":{"flags":"Flags, see TL conditional fields","credentials":"Remove saved payment credentials","info":"Clear the last order settings saved by the user"},"available":"user"},"payments.getBankCardData":{"comment":"Get info about a credit card","arguments":{"number":"Credit card number"},"throws":[{"code":400,"name":"BANK_CARD_NUMBER_INVALID","comment":"The specified card number is invalid."}],"available":"user"},"payments.getPaymentReceipt":{"comment":"Get payment receipt","arguments":{"peer":"The peer where the payment receipt was sent","msg_id":"Message ID of receipt"},"throws":[{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."}],"available":"user"},"payments.exportInvoice":{"comment":"Generate an invoice deep link","arguments":{"invoice_media":"Invoice"},"throws":[{"code":400,"name":"CURRENCY_TOTAL_AMOUNT_INVALID","comment":"The total amount of all prices is invalid."},{"code":400,"name":"INVOICE_PAYLOAD_INVALID","comment":"The specified invoice payload is invalid."},{"code":400,"name":"MEDIA_INVALID","comment":"Media invalid."},{"code":400,"name":"PAYMENT_PROVIDER_INVALID","comment":"The specified payment provider is invalid."}],"available":"both"},"payments.getSavedInfo":{"comment":"Get saved payment information","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"payments.assignAppStoreTransaction":{"comment":"Informs server about a purchase made through the App Store: for official applications only.","arguments":{"receipt":"Receipt","purpose":"Payment purpose"},"throws":[{"code":400,"name":"RECEIPT_EMPTY","comment":"The specified receipt is empty."}],"available":"user"},"payments.assignPlayMarketTransaction":{"comment":"Informs server about a purchase made through the Play Store: for official applications only.","arguments":{"receipt":"Receipt","purpose":"Payment purpose"},"throws":[{"code":400,"name":"DATA_JSON_INVALID","comment":"The provided JSON data is invalid."}],"available":"user"},"payments.canPurchasePremium":{"comment":"Checks whether Telegram Premium purchase is possible. Must be called before in-store Premium purchase, official apps only.","arguments":{"purpose":"Payment purpose"},"throws":[{"code":406,"name":"PREMIUM_CURRENTLY_UNAVAILABLE","comment":"You cannot currently purchase a Premium subscription."}],"available":"user"},"bots.getPreviewInfo":{"comment":"Bot owners only, fetch main mini app preview information, see here » for more info.\n\nNote: technically non-owners may also invoke this method, but it will always behave exactly as {@link bots.RawGetPreviewMediasRequest}, returning only previews for the current language and an empty lang_codes array, regardless of the passed lang_code, so please only use {@link bots.RawGetPreviewMediasRequest} if you're not the owner of the bot.","arguments":{"bot":"The bot that owns the Main Mini App.","lang_code":"Fetch previews for the specified ISO 639-1 language code."},"throws":[{"code":400,"name":"BOT_INVALID","comment":"This is not a valid bot."}],"available":"user"},"payments.getPremiumGiftCodeOptions":{"comment":"Obtain a list of Telegram Premium giveaway/gift code » options.","arguments":{"flags":"Flags, see TL conditional fields","boost_peer":"The channel that will start the giveaway"},"available":"user"},"payments.applyGiftCode":{"comment":"Apply a Telegram Premium giftcode »","arguments":{"slug":"The code to apply"},"throws":[{"code":400,"name":"GIFT_SLUG_EXPIRED","comment":"The specified gift slug has expired."},{"code":400,"name":"GIFT_SLUG_INVALID","comment":"The specified slug is invalid."},{"code":420,"name":"PREMIUM_SUB_ACTIVE_UNTIL_%d","comment":"You already have a premium subscription active until unixtime %d ."}],"available":"user"},"payments.getGiveawayInfo":{"comment":"Obtain information about a Telegram Premium giveaway ».","arguments":{"peer":"The peer where the giveaway was posted.","msg_id":"Message ID of the {@link RawMessageActionGiveawayLaunch} service message"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"payments.getStarsStatus":{"comment":"Get the current Telegram Stars balance of the current account (with peer={@link RawInputPeerSelf}), or the stars balance of the bot specified in peer.","arguments":{"peer":"Peer of which to get the balance."},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"payments.sendStarsForm":{"comment":"Make a payment using Telegram Stars, see here » for more info.","arguments":{"flags":"Flags, see TL conditional fields","form_id":"Payment form ID","invoice":"Invoice"},"throws":[{"code":400,"name":"BALANCE_TOO_LOW","comment":"The transaction cannot be completed because the current Telegram Stars balance is too low."},{"code":400,"name":"FORM_EXPIRED","comment":"The form was generated more than 10 minutes ago and has expired, please re-generate it using {@link payments.RawGetPaymentFormRequest} and pass the new form_id."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"payments.getStarsTopupOptions":{"comment":"Obtain a list of Telegram Stars topup options » as {@link RawStarsTopupOption} constructors.","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"payments.getStarsRevenueWithdrawalUrl":{"comment":"Withdraw funds from a channel or bot's star balance ».","arguments":{"peer":"Channel or bot from which to withdraw funds.","stars":"Amount of stars to withdraw.","password":"2FA password, see here » for more info."},"throws":[{"code":400,"name":"PASSWORD_HASH_INVALID","comment":"The provided password hash is invalid."},{"code":400,"name":"PASSWORD_MISSING","comment":"You must enable 2FA before executing this operation."},{"code":400,"name":"PASSWORD_TOO_FRESH_%d","comment":"The password was modified less than 24 hours ago, try again in %d seconds."}],"available":"user"},"payments.getStarsRevenueStats":{"comment":"Get Telegram Star revenue statistics ».","arguments":{"flags":"Flags, see TL conditional fields","dark":"Whether to enable dark theme for graph colors","peer":"Get statistics for the specified bot, channel or ourselves ({@link RawInputPeerSelf})."},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"payments.launchPrepaidGiveaway":{"comment":"Launch a prepaid giveaway ».","arguments":{"peer":"The peer where to launch the giveaway.","giveaway_id":"The prepaid giveaway ID.","purpose":"Giveway parameters"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"payments.getStarsTransactions":{"comment":"Fetch Telegram Stars transactions.\n\nThe inbound and outbound flags are mutually exclusive: if none of the two are set, both incoming and outgoing transactions are fetched.","arguments":{"flags":"Flags, see TL conditional fields","inbound":"If set, fetches only incoming transactions.","outbound":"If set, fetches only outgoing transactions.","ascending":"Return transactions in ascending order by date (instead of descending order by date).","peer":"Fetch the transaction history of the peer ({@link RawInputPeerSelf} or a bot we own).","offset":"Offset for pagination, obtained from the returned next_offset, initially an empty string ».","limit":"Maximum number of results to return, see pagination"},"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"both"},"payments.getStarsTransactionsByID":{"comment":"Obtain info about Telegram Star transactions » using specific transaction IDs.","arguments":{"peer":"Channel or bot.","id":"Transaction IDs."},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"payments.getStarsRevenueAdsAccountUrl":{"comment":"Returns a URL for a Telegram Ad platform account that can be used to set up advertisements for channel/bot in peer, paid using the Telegram Stars owned by the specified peer, see here » for more info.","arguments":{"peer":"Channel or bot that owns the stars."},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"payments.getStarsGiftOptions":{"comment":"Obtain a list of Telegram Stars gift options » as {@link RawStarsGiftOption} constructors.","arguments":{"flags":"Flags, see TL conditional fields","user_id":"Receiver of the gift (optional)."},"available":"user"},"stickers.removeStickerFromSet":{"comment":"Remove a sticker from the set where it belongs. The sticker set must have been created by the current user/bot.","arguments":{"sticker":"The sticker to remove"},"throws":[{"code":400,"name":"STICKER_INVALID","comment":"The provided sticker is invalid."}],"available":"both"},"stickers.createStickerSet":{"comment":"Create a stickerset.","arguments":{"flags":"Flags, see TL conditional fields","masks":"Whether this is a mask stickerset","emojis":"Whether this is a custom emoji stickerset.","text_color":"Whether the color of TGS custom emojis contained in this set should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context. For custom emoji stickersets only.","user_id":"Stickerset owner","title":"Stickerset name, 1-64 chars","short_name":"Short name of sticker set, to be used in sticker deep links ». Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and, if called by a bot, must end in \"_by_\". is case insensitive. 1-64 characters.","thumb":"Thumbnail","stickers":"Stickers","software":"Used when importing stickers using the sticker import SDKs, specifies the name of the software that created the stickers"},"throws":[{"code":400,"name":"PACK_SHORT_NAME_INVALID","comment":"Short pack name invalid."},{"code":400,"name":"PACK_SHORT_NAME_OCCUPIED","comment":"A stickerpack with this name already exists."},{"code":400,"name":"PACK_TITLE_INVALID","comment":"The stickerpack title is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"STICKERS_EMPTY","comment":"No sticker provided."},{"code":400,"name":"STICKER_EMOJI_INVALID","comment":"Sticker emoji invalid."},{"code":400,"name":"STICKER_FILE_INVALID","comment":"Sticker file invalid."},{"code":400,"name":"STICKER_GIF_DIMENSIONS","comment":"The specified video sticker has invalid dimensions."},{"code":400,"name":"STICKER_PNG_DIMENSIONS","comment":"Sticker png dimensions invalid."},{"code":400,"name":"STICKER_PNG_NOPNG","comment":"One of the specified stickers is not a valid PNG file."},{"code":400,"name":"STICKER_TGS_NODOC","comment":"You must send the animated sticker as a document."},{"code":400,"name":"STICKER_TGS_NOTGS","comment":"Invalid TGS sticker provided."},{"code":400,"name":"STICKER_THUMB_PNG_NOPNG","comment":"Incorrect stickerset thumb file provided, PNG / WEBP expected."},{"code":400,"name":"STICKER_THUMB_TGS_NOTGS","comment":"Incorrect stickerset TGS thumb file provided."},{"code":400,"name":"STICKER_VIDEO_BIG","comment":"The specified video sticker is too big."},{"code":400,"name":"STICKER_VIDEO_NODOC","comment":"You must send the video sticker as a document."},{"code":400,"name":"STICKER_VIDEO_NOWEBM","comment":"The specified video sticker is not in webm format."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"both"},"payments.refundStarsCharge":{"comment":"Refund a Telegram Stars transaction, see here » for more info.","arguments":{"user_id":"User to refund.","charge_id":"Transaction ID."},"throws":[{"code":400,"name":"CHARGE_ALREADY_REFUNDED","comment":"The transaction was already refunded."},{"code":400,"name":"USER_BOT_REQUIRED","comment":"This method can only be called by a bot."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"bot"},"payments.checkGiftCode":{"comment":"Obtain information about a Telegram Premium giftcode »","arguments":{"slug":"The giftcode to check"},"throws":[{"code":400,"name":"GIFT_SLUG_EXPIRED","comment":"The specified gift slug has expired."},{"code":400,"name":"GIFT_SLUG_INVALID","comment":"The specified slug is invalid."}],"available":"user"},"stickers.addStickerToSet":{"comment":"Add a sticker to a stickerset. The sticker set must have been created by the current user/bot.","arguments":{"stickerset":"The stickerset","sticker":"The sticker"},"throws":[{"code":400,"name":"STICKERPACK_STICKERS_TOO_MUCH","comment":"There are too many stickers in this stickerpack, you can't add any more."},{"code":406,"name":"STICKERSET_INVALID","comment":"The provided sticker set is invalid."},{"code":400,"name":"STICKERS_TOO_MUCH","comment":"There are too many stickers in this stickerpack, you can't add any more."},{"code":400,"name":"STICKER_PNG_NOPNG","comment":"One of the specified stickers is not a valid PNG file."},{"code":400,"name":"STICKER_TGS_NOTGS","comment":"Invalid TGS sticker provided."}],"available":"both"},"stickers.changeStickerPosition":{"comment":"Changes the absolute position of a sticker in the set to which it belongs. The sticker set must have been created by the current user/bot.","arguments":{"sticker":"The sticker","position":"The new position of the sticker, zero-based"},"throws":[{"code":400,"name":"STICKER_INVALID","comment":"The provided sticker is invalid."}],"available":"both"},"stickers.setStickerSetThumb":{"comment":"Set stickerset thumbnail","arguments":{"flags":"Flags, see TL conditional fields","stickerset":"Stickerset","thumb":"Thumbnail (only for normal stickersets, not custom emoji stickersets).","thumb_document_id":"Only for custom emoji stickersets, ID of a custom emoji present in the set to use as thumbnail; pass 0 to fallback to the first custom emoji of the set."},"throws":[{"code":400,"name":"STICKERSET_INVALID","comment":"The provided sticker set is invalid."},{"code":400,"name":"STICKER_THUMB_PNG_NOPNG","comment":"Incorrect stickerset thumb file provided, PNG / WEBP expected."},{"code":400,"name":"STICKER_THUMB_TGS_NOTGS","comment":"Incorrect stickerset TGS thumb file provided."}],"available":"both"},"stickers.checkShortName":{"comment":"Check whether the given short name is available","arguments":{"short_name":"Short name"},"throws":[{"code":400,"name":"SHORT_NAME_INVALID","comment":"The specified short name is invalid."},{"code":400,"name":"SHORT_NAME_OCCUPIED","comment":"The specified short name is already in use."}],"available":"user"},"stickers.deleteStickerSet":{"comment":"Deletes a stickerset we created.","arguments":{"stickerset":"Stickerset to delete"},"throws":[{"code":400,"name":"STICKERSET_INVALID","comment":"The provided sticker set is invalid."}],"available":"both"},"stickers.suggestShortName":{"comment":"Suggests a short name for a given stickerpack name","arguments":{"title":"Sticker pack name"},"throws":[{"code":400,"name":"TITLE_INVALID","comment":"The specified stickerpack title is invalid."}],"available":"user"},"stickers.changeSticker":{"comment":"Update the keywords, emojis or mask coordinates of a sticker.","arguments":{"flags":"Flags, see TL conditional fields","sticker":"The sticker","emoji":"If set, updates the emoji list associated to the sticker","mask_coords":"If set, updates the mask coordinates","keywords":"If set, updates the sticker keywords (separated by commas). Can't be provided for mask stickers."},"throws":[{"code":400,"name":"STICKER_INVALID","comment":"The provided sticker is invalid."}],"available":"both"},"stickers.renameStickerSet":{"comment":"Renames a stickerset.","arguments":{"stickerset":"Stickerset to rename","title":"New stickerset title"},"throws":[{"code":400,"name":"STICKERSET_INVALID","comment":"The provided sticker set is invalid."}],"available":"both"},"phone.receivedCall":{"comment":"Optional: notify the server that the user is currently busy in a call: this will automatically refuse all incoming phone calls until the current phone call is ended.","arguments":{"peer":"The phone call we're currently in"},"throws":[{"code":400,"name":"CALL_ALREADY_DECLINED","comment":"The call was already declined."},{"code":400,"name":"CALL_PEER_INVALID","comment":"The provided call peer object is invalid."}],"available":"user"},"phone.requestCall":{"comment":"Start a telegram phone call","arguments":{"flags":"Flags, see TL conditional fields","video":"Whether to start a video call","user_id":"Destination of the phone call","random_id":"Random ID to avoid resending the same object","g_a_hash":"Parameter for E2E encryption key exchange »","protocol":"Phone call settings"},"throws":[{"code":400,"name":"CALL_PROTOCOL_FLAGS_INVALID","comment":"Call protocol flags invalid."},{"code":400,"name":"INPUT_USER_DEACTIVATED","comment":"The specified user was deleted."},{"code":400,"name":"PARTICIPANT_VERSION_OUTDATED","comment":"The other participant does not use an up to date telegram client with support for calls."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."},{"code":403,"name":"USER_IS_BLOCKED","comment":"You were blocked by this user."},{"code":403,"name":"USER_PRIVACY_RESTRICTED","comment":"The user's privacy settings do not allow you to do this."}],"available":"user"},"stickers.replaceSticker":{"comment":"Replace a sticker in a stickerset ».","arguments":{"sticker":"Old sticker document.","new_sticker":"New sticker."},"throws":[{"code":400,"name":"STICKER_INVALID","comment":"The provided sticker is invalid."}],"available":"both"},"phone.acceptCall":{"comment":"Accept incoming call","arguments":{"peer":"The call to accept","g_b":"Parameter for E2E encryption key exchange »","protocol":"Phone call settings"},"throws":[{"code":400,"name":"CALL_ALREADY_ACCEPTED","comment":"The call was already accepted."},{"code":400,"name":"CALL_ALREADY_DECLINED","comment":"The call was already declined."},{"code":500,"name":"CALL_OCCUPY_FAILED","comment":"The call failed because the user is already making another call."},{"code":400,"name":"CALL_PEER_INVALID","comment":"The provided call peer object is invalid."},{"code":406,"name":"CALL_PROTOCOL_COMPAT_LAYER_INVALID","comment":"The other side of the call does not support any of the VoIP protocols supported by the local client, as specified by the protocol.layer and protocol.library_versions fields."},{"code":400,"name":"CALL_PROTOCOL_FLAGS_INVALID","comment":"Call protocol flags invalid."}],"available":"user"},"phone.confirmCall":{"comment":"Complete phone call E2E encryption key exchange »","arguments":{"peer":"The phone call","g_a":"Parameter for E2E encryption key exchange »","key_fingerprint":"Key fingerprint","protocol":"Phone call settings"},"throws":[{"code":400,"name":"CALL_ALREADY_DECLINED","comment":"The call was already declined."},{"code":400,"name":"CALL_PEER_INVALID","comment":"The provided call peer object is invalid."}],"available":"user"},"phone.setCallRating":{"comment":"Rate a call, returns info about the rating message sent to the official VoIP bot.","arguments":{"flags":"Flags, see TL conditional fields","user_initiative":"Whether the user decided on their own initiative to rate the call","peer":"The call to rate","rating":"Rating in 1-5 stars","comment":"An additional comment"},"throws":[{"code":400,"name":"CALL_PEER_INVALID","comment":"The provided call peer object is invalid."}],"available":"user"},"phone.getCallConfig":{"comment":"Get phone call configuration to be passed to libtgvoip's shared config","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"phone.saveCallDebug":{"comment":"Send phone call debug data to server","arguments":{"peer":"Phone call","debug":"Debug statistics obtained from libtgvoip"},"throws":[{"code":400,"name":"CALL_PEER_INVALID","comment":"The provided call peer object is invalid."},{"code":400,"name":"DATA_JSON_INVALID","comment":"The provided JSON data is invalid."}],"available":"user"},"phone.sendSignalingData":{"comment":"Send VoIP signaling data","arguments":{"peer":"Phone call","data":"Signaling payload"},"throws":[{"code":400,"name":"CALL_PEER_INVALID","comment":"The provided call peer object is invalid."}],"available":"user"},"phone.leaveGroupCall":{"comment":"Leave a group call","arguments":{"call":"The group call","source":"Your source ID"},"throws":[{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."}],"available":"user"},"phone.joinGroupCall":{"comment":"Join a group call","arguments":{"flags":"Flags, see TL conditional fields","muted":"If set, the user will be muted by default upon joining.","video_stopped":"If set, the user's video will be disabled by default upon joining.","call":"The group call","join_as":"Join the group call, presenting yourself as the specified user/channel","invite_hash":"The invitation hash from the invite link », if provided allows speaking in a livestream or muted group chat.","params":"WebRTC parameters"},"throws":[{"code":400,"name":"DATA_JSON_INVALID","comment":"The provided JSON data is invalid."},{"code":403,"name":"GROUPCALL_FORBIDDEN","comment":"The group call has already ended."},{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."},{"code":400,"name":"GROUPCALL_SSRC_DUPLICATE_MUCH","comment":"The app needs to retry joining the group call with a new SSRC value."},{"code":400,"name":"JOIN_AS_PEER_INVALID","comment":"The specified peer cannot be used to join a group call."}],"available":"user"},"phone.createGroupCall":{"comment":"Create a group call or livestream","arguments":{"flags":"Flags, see TL conditional fields","rtmp_stream":"Whether RTMP stream support should be enabled: only the group/supergroup/channel owner can use this flag.","peer":"Associate the group call or livestream to the provided group/supergroup/channel","random_id":"Unique client message ID required to prevent creation of duplicate group calls","title":"Call title","schedule_date":"For scheduled group call or livestreams, the absolute date when the group call will start"},"throws":[{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"CREATE_CALL_FAILED","comment":"An error occurred while creating the call."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"SCHEDULE_DATE_INVALID","comment":"Invalid schedule date provided."}],"available":"user"},"phone.discardGroupCall":{"comment":"Terminate a group call","arguments":{"call":"The group call to terminate"},"throws":[{"code":400,"name":"GROUPCALL_ALREADY_DISCARDED","comment":"The group call was already discarded."},{"code":403,"name":"GROUPCALL_FORBIDDEN","comment":"The group call has already ended."},{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."}],"available":"user"},"phone.toggleGroupCallSettings":{"comment":"Change group call settings","arguments":{"flags":"Flags, see TL conditional fields","reset_invite_hash":"Invalidate existing invite links","call":"Group call","join_muted":"Whether all users will that join this group call are muted by default upon joining the group call"},"throws":[{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."},{"code":400,"name":"GROUPCALL_NOT_MODIFIED","comment":"Group call settings weren't modified."}],"available":"user"},"phone.inviteToGroupCall":{"comment":"Invite a set of users to a group call.","arguments":{"call":"The group call","users":"The users to invite."},"throws":[{"code":403,"name":"GROUPCALL_FORBIDDEN","comment":"The group call has already ended."},{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."},{"code":400,"name":"INVITE_FORBIDDEN_WITH_JOINAS","comment":"If the user has anonymously joined a group call as a channel, they can't invite other users to the group call because that would cause deanonymization, because the invite would be sent using the original user ID, not the anonymized channel ID."},{"code":400,"name":"USER_ALREADY_INVITED","comment":"You have already invited this user."},{"code":403,"name":"USER_NOT_PARTICIPANT","comment":"You're not a member of this supergroup/channel."}],"available":"user"},"phone.getGroupCall":{"comment":"Get info about a group call","arguments":{"call":"The group call","limit":"Maximum number of results to return, see pagination"},"throws":[{"code":403,"name":"GROUPCALL_FORBIDDEN","comment":"The group call has already ended."},{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."}],"available":"user"},"phone.getGroupParticipants":{"comment":"Get group call participants","arguments":{"call":"Group call","ids":"If specified, will fetch group participant info about the specified peers","sources":"If specified, will fetch group participant info about the specified WebRTC source IDs","offset":"Offset for results, taken from the next_offset field of {@link phone.RawGroupParticipants}, initially an empty string.
    Note: if no more results are available, the method call will return an empty next_offset; thus, avoid providing the next_offset returned in {@link phone.RawGroupParticipants} if it is empty, to avoid an infinite loop.","limit":"Maximum number of results to return, see pagination"},"throws":[{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."}],"available":"user"},"phone.checkGroupCall":{"comment":"Check whether the group call Server Forwarding Unit is currently receiving the streams with the specified WebRTC source IDs.
    \nReturns an intersection of the source IDs specified in sources, and the source IDs currently being forwarded by the SFU.","arguments":{"call":"Group call","sources":"Source IDs"},"throws":[{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."},{"code":400,"name":"GROUPCALL_JOIN_MISSING","comment":"You haven't joined this group call."}],"available":"user"},"phone.discardCall":{"comment":"Refuse or end running call","arguments":{"flags":"Flags, see TL conditional fields","video":"Whether this is a video call","peer":"The phone call","duration":"Call duration","reason":"Why was the call discarded","connection_id":"Preferred libtgvoip relay ID"},"throws":[{"code":400,"name":"CALL_ALREADY_ACCEPTED","comment":"The call was already accepted."},{"code":500,"name":"CALL_OCCUPY_FAILED","comment":"The call failed because the user is already making another call."},{"code":400,"name":"CALL_PEER_INVALID","comment":"The provided call peer object is invalid."}],"available":"user"},"phone.toggleGroupCallRecord":{"comment":"Start or stop recording a group call: the recorded audio and video streams will be automatically sent to Saved messages (the chat with ourselves).","arguments":{"flags":"Flags, see TL conditional fields","start":"Whether to start or stop recording","video":"Whether to also record video streams","call":"The group call or livestream","title":"Recording title","video_portrait":"If video stream recording is enabled, whether to record in portrait or landscape mode"},"throws":[{"code":403,"name":"GROUPCALL_FORBIDDEN","comment":"The group call has already ended."},{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."},{"code":400,"name":"GROUPCALL_NOT_MODIFIED","comment":"Group call settings weren't modified."}],"available":"user"},"phone.editGroupCallTitle":{"comment":"Edit the title of a group call or livestream","arguments":{"call":"Group call","title":"New title"},"throws":[{"code":403,"name":"GROUPCALL_FORBIDDEN","comment":"The group call has already ended."},{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."}],"available":"user"},"phone.editGroupCallParticipant":{"comment":"Edit information about a given group call participant\n\nNote: flags.N?Bool parameters can have three possible values:","arguments":{"flags":"Flags, see TL conditional fields","call":"The group call","participant":"The group call participant (can also be the user itself)","muted":"Whether to mute or unmute the specified participant","volume":"New volume","raise_hand":"Raise or lower hand","video_stopped":"Start or stop the video stream","video_paused":"Pause or resume the video stream","presentation_paused":"Pause or resume the screen sharing stream"},"throws":[{"code":403,"name":"GROUPCALL_FORBIDDEN","comment":"The group call has already ended."},{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."},{"code":400,"name":"PARTICIPANT_JOIN_MISSING","comment":"Trying to enable a presentation, when the user hasn't joined the Video Chat with {@link phone.RawJoinGroupCallRequest}."},{"code":400,"name":"RAISE_HAND_FORBIDDEN","comment":"You cannot raise your hand."},{"code":400,"name":"USER_VOLUME_INVALID","comment":"The specified user volume is invalid."},{"code":400,"name":"VIDEO_PAUSE_FORBIDDEN","comment":"You cannot pause the video stream."},{"code":400,"name":"VIDEO_STOP_FORBIDDEN","comment":"You cannot stop the video stream."}],"available":"user"},"phone.getGroupCallJoinAs":{"comment":"Get a list of peers that can be used to join a group call, presenting yourself as a specific user/channel.","arguments":{"peer":"The dialog whose group call or livestream we're trying to join"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"phone.exportGroupCallInvite":{"comment":"Get an invite link for a group call or livestream","arguments":{"flags":"Flags, see TL conditional fields","can_self_unmute":"For livestreams or muted group chats, if set, users that join using this link will be able to speak without explicitly requesting permission by (for example by raising their hand).","call":"The group call"},"throws":[{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."},{"code":403,"name":"PUBLIC_CHANNEL_MISSING","comment":"You can only export group call invite links for public chats or channels."}],"available":"user"},"phone.toggleGroupCallStartSubscription":{"comment":"Subscribe or unsubscribe to a scheduled group call","arguments":{"call":"Scheduled group call","subscribed":"Enable or disable subscription"},"throws":[{"code":403,"name":"GROUPCALL_ALREADY_STARTED","comment":"The groupcall has already started, you can join directly using {@link phone.RawJoinGroupCallRequest}."},{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."}],"available":"user"},"phone.startScheduledGroupCall":{"comment":"Start a scheduled group call.","arguments":{"call":"The scheduled group call"},"throws":[{"code":403,"name":"GROUPCALL_ALREADY_STARTED","comment":"The groupcall has already started, you can join directly using {@link phone.RawJoinGroupCallRequest}."},{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."}],"available":"user"},"phone.joinGroupCallPresentation":{"comment":"Start screen sharing in a call","arguments":{"call":"The group call","params":"WebRTC parameters"},"throws":[{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."},{"code":403,"name":"PARTICIPANT_JOIN_MISSING","comment":"Trying to enable a presentation, when the user hasn't joined the Video Chat with {@link phone.RawJoinGroupCallRequest}."}],"available":"user"},"phone.saveDefaultGroupCallJoinAs":{"comment":"Set the default peer that will be used to join a group call in a specific dialog.","arguments":{"peer":"The dialog","join_as":"The default peer that will be used to join group calls in this dialog, presenting yourself as a specific user/channel."},"throws":[{"code":400,"name":"JOIN_AS_PEER_INVALID","comment":"The specified peer cannot be used to join a group call."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"phone.leaveGroupCallPresentation":{"comment":"Stop screen sharing in a group call","arguments":{"call":"The group call"},"throws":[{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."}],"available":"user"},"phone.saveCallLog":{"comment":"Save phone call debug information","arguments":{"peer":"Phone call","file":"Logs"},"throws":[{"code":400,"name":"CALL_PEER_INVALID","comment":"The provided call peer object is invalid."}],"available":"user"},"langpack.getLangPack":{"comment":"Get localization pack strings","arguments":{"lang_pack":"Platform identifier (i.e. android, tdesktop, etc).","lang_code":"Either an ISO 639-1 language code or a language pack name obtained from a language pack link."},"throws":[{"code":400,"name":"LANGUAGE_INVALID","comment":"The specified lang_code is invalid."},{"code":400,"name":"LANG_CODE_NOT_SUPPORTED","comment":"The specified language code is not supported."},{"code":400,"name":"LANG_PACK_INVALID","comment":"The provided language pack is invalid."}],"available":"user"},"phone.getGroupCallStreamRtmpUrl":{"comment":"Get RTMP URL and stream key for RTMP livestreams. Can be used even before creating the actual RTMP livestream with {@link phone.RawCreateGroupCallRequest} (the rtmp_stream flag must be set).","arguments":{"peer":"Peer to livestream into","revoke":"Whether to revoke the previous stream key or simply return the existing one"},"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"phone.getGroupCallStreamChannels":{"comment":"Get info about RTMP streams in a group call or livestream.
    \nThis method should be invoked to the same group/channel-related DC used for downloading livestream chunks.
    \nAs usual, the media DC is preferred, if available.","arguments":{"call":"Group call or livestream"},"throws":[{"code":400,"name":"GROUPCALL_INVALID","comment":"The specified group call is invalid."},{"code":400,"name":"GROUPCALL_JOIN_MISSING","comment":"You haven't joined this group call."}],"available":"user"},"langpack.getLanguages":{"comment":"Get information about all languages in a localization pack","arguments":{"lang_pack":"Platform identifier (i.e. android, tdesktop, etc)."},"throws":[{"code":400,"name":"LANG_PACK_INVALID","comment":"The provided language pack is invalid."}],"available":"user"},"langpack.getDifference":{"comment":"Get new strings in language pack","arguments":{"lang_pack":"Platform identifier (i.e. android, tdesktop, etc).","lang_code":"Either an ISO 639-1 language code or a language pack name obtained from a language pack link.","from_version":"Previous localization pack version"},"throws":[{"code":400,"name":"LANG_PACK_INVALID","comment":"The provided language pack is invalid."}],"available":"user"},"langpack.getStrings":{"comment":"Get strings from a language pack","arguments":{"lang_pack":"Platform identifier (i.e. android, tdesktop, etc).","lang_code":"Either an ISO 639-1 language code or a language pack name obtained from a language pack link.","keys":"Strings to get"},"throws":[{"code":400,"name":"LANG_CODE_NOT_SUPPORTED","comment":"The specified language code is not supported."},{"code":400,"name":"LANG_PACK_INVALID","comment":"The provided language pack is invalid."}],"available":"user"},"folders.editPeerFolders":{"comment":"Edit peers in peer folder","arguments":{"folder_peers":"New peer list"},"throws":[{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"CHAT_ID_INVALID","comment":"The provided chat id is invalid."},{"code":400,"name":"FOLDER_ID_INVALID","comment":"Invalid folder ID."}],"available":"user"},"stats.getMegagroupStats":{"comment":"Get supergroup statistics","arguments":{"flags":"Flags, see TL conditional fields","dark":"Whether to enable dark theme for graph colors","channel":"Supergroup ID"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"MEGAGROUP_REQUIRED","comment":"You can only use this method on a supergroup."}],"available":"user"},"stats.loadAsyncGraph":{"comment":"Load channel statistics graph asynchronously","arguments":{"flags":"Flags, see TL conditional fields","token":"Graph token from {@link RawStatsGraphAsync} constructor","x":"Zoom value, if required"},"throws":[{"code":400,"name":"GRAPH_EXPIRED_RELOAD","comment":"This graph has expired, please obtain a new graph token."},{"code":400,"name":"GRAPH_INVALID_RELOAD","comment":"Invalid graph token provided, please reload the stats and provide the updated token."},{"code":400,"name":"GRAPH_OUTDATED_RELOAD","comment":"The graph is outdated, please get a new async token using stats.getBroadcastStats."}],"available":"user"},"langpack.getLanguage":{"comment":"Get information about a language in a localization pack","arguments":{"lang_pack":"Platform identifier (i.e. android, tdesktop, etc).","lang_code":"Either an ISO 639-1 language code or a language pack name obtained from a language pack link."},"throws":[{"code":400,"name":"LANG_CODE_NOT_SUPPORTED","comment":"The specified language code is not supported."},{"code":400,"name":"LANG_PACK_INVALID","comment":"The provided language pack is invalid."}],"available":"user"},"stats.getMessagePublicForwards":{"comment":"Obtains a list of messages, indicating to which other public channels was a channel message forwarded.
    \nWill return a list of {@link RawMessage} with peer_id equal to the public channel to which this message was forwarded.","arguments":{"channel":"Source channel","msg_id":"Source message ID","offset":"Offset for pagination, empty string on first call, then use the next_offset field of the returned constructor (if present, otherwise no more results are available).","limit":"Maximum number of results to return, see pagination"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"stats.getBroadcastStats":{"comment":"Get channel statistics","arguments":{"flags":"Flags, see TL conditional fields","dark":"Whether to enable dark theme for graph colors","channel":"The channel"},"throws":[{"code":400,"name":"BROADCAST_REQUIRED","comment":"This method can only be called on a channel, please use stats.getMegagroupStats for supergroups."},{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":403,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."}],"available":"user"},"stats.getMessageStats":{"comment":"Get message statistics","arguments":{"flags":"Flags, see TL conditional fields","dark":"Whether to enable dark theme for graph colors","channel":"Channel ID","msg_id":"Message ID"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"MESSAGE_ID_INVALID","comment":"The provided message id is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"stats.getStoryPublicForwards":{"comment":"Obtain forwards of a story as a message to public chats and reposts by public channels.","arguments":{"peer":"Peer where the story was originally posted","id":"Story ID","offset":"Offset for pagination, from {@link stats.RawPublicForwards}.next_offset.","limit":"Maximum number of results to return, see pagination"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"stats.getBroadcastRevenueWithdrawalUrl":{"comment":"Withdraw funds from a channel's ad revenue balance ».","arguments":{"channel":"The channel","password":"2FA password, see here » for more info."},"throws":[{"code":400,"name":"PASSWORD_HASH_INVALID","comment":"The provided password hash is invalid."},{"code":400,"name":"PASSWORD_MISSING","comment":"You must enable 2FA before executing this operation."},{"code":400,"name":"PASSWORD_TOO_FRESH_%d","comment":"The password was modified less than 24 hours ago, try again in %d seconds."}],"available":"user"},"stats.getStoryStats":{"comment":"Get statistics for a certain story.","arguments":{"flags":"Flags, see TL conditional fields","dark":"Whether to enable the dark theme for graph colors","peer":"The peer that posted the story","id":"Story ID"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"chatlists.exportChatlistInvite":{"comment":"Export a folder », creating a chat folder deep link ».","arguments":{"chatlist":"The folder to export","title":"An optional name for the link","peers":"The list of channels, group and supergroups to share with the link. Basic groups will automatically be converted to supergroups when invoking the method."},"throws":[{"code":400,"name":"FILTER_ID_INVALID","comment":"The specified filter ID is invalid."},{"code":400,"name":"FILTER_NOT_SUPPORTED","comment":"The specified filter cannot be used in this context."},{"code":400,"name":"INVITES_TOO_MUCH","comment":"The maximum number of per-folder invites specified by the chatlist_invites_limit_default/chatlist_invites_limit_premium client configuration parameters » was reached."},{"code":400,"name":"PEERS_LIST_EMPTY","comment":"The specified list of peers is empty."}],"available":"user"},"stats.getBroadcastRevenueStats":{"comment":"Get channel ad revenue statistics ».","arguments":{"flags":"Flags, see TL conditional fields","dark":"Whether to enable dark theme for graph colors","channel":"The channel"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."}],"available":"user"},"stats.getBroadcastRevenueTransactions":{"comment":"Fetch channel ad revenue transaction history ».","arguments":{"channel":"The channel","offset":"Offset for pagination","limit":"Maximum number of results to return, see pagination"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."}],"available":"user"},"chatlists.deleteExportedInvite":{"comment":"Delete a previously created chat folder deep link ».","arguments":{"chatlist":"The related folder","slug":"slug obtained from the chat folder deep link »."},"throws":[{"code":400,"name":"FILTER_ID_INVALID","comment":"The specified filter ID is invalid."},{"code":400,"name":"FILTER_NOT_SUPPORTED","comment":"The specified filter cannot be used in this context."}],"available":"user"},"chatlists.getExportedInvites":{"comment":"List all chat folder deep links » associated to a folder","arguments":{"chatlist":"The folder"},"throws":[{"code":400,"name":"FILTER_ID_INVALID","comment":"The specified filter ID is invalid."}],"available":"user"},"chatlists.editExportedInvite":{"comment":"Edit a chat folder deep link ».","arguments":{"flags":"Flags, see TL conditional fields","chatlist":"Folder ID","slug":"slug obtained from the chat folder deep link ».","title":"If set, sets a new name for the link","peers":"If set, changes the list of peers shared with the link"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"FILTER_ID_INVALID","comment":"The specified filter ID is invalid."},{"code":400,"name":"FILTER_NOT_SUPPORTED","comment":"The specified filter cannot be used in this context."},{"code":400,"name":"INVITE_SLUG_EMPTY","comment":"The specified invite slug is empty."},{"code":400,"name":"INVITE_SLUG_EXPIRED","comment":"The specified chat folder link has expired."},{"code":400,"name":"PEERS_LIST_EMPTY","comment":"The specified list of peers is empty."}],"available":"user"},"chatlists.getLeaveChatlistSuggestions":{"comment":"Returns identifiers of pinned or always included chats from a chat folder imported using a chat folder deep link », which are suggested to be left when the chat folder is deleted.","arguments":{"chatlist":"Folder ID"},"throws":[{"code":400,"name":"FILTER_ID_INVALID","comment":"The specified filter ID is invalid."},{"code":400,"name":"FILTER_NOT_SUPPORTED","comment":"The specified filter cannot be used in this context."}],"available":"user"},"chatlists.getChatlistUpdates":{"comment":"Fetch new chats associated with an imported chat folder deep link ». Must be invoked at most every chatlist_update_period seconds (as per the related client configuration parameter »).","arguments":{"chatlist":"The folder"},"throws":[{"code":400,"name":"FILTER_ID_INVALID","comment":"The specified filter ID is invalid."},{"code":400,"name":"FILTER_NOT_SUPPORTED","comment":"The specified filter cannot be used in this context."},{"code":400,"name":"INPUT_CHATLIST_INVALID","comment":"The specified folder is invalid."}],"available":"user"},"chatlists.hideChatlistUpdates":{"comment":"Dismiss new pending peers recently added to a chat folder deep link ».","arguments":{"chatlist":"The folder"},"throws":[{"code":400,"name":"FILTER_ID_INVALID","comment":"The specified filter ID is invalid."},{"code":400,"name":"FILTER_NOT_SUPPORTED","comment":"The specified filter cannot be used in this context."}],"available":"user"},"chatlists.joinChatlistUpdates":{"comment":"Join channels and supergroups recently added to a chat folder deep link ».","arguments":{"chatlist":"The folder","peers":"List of new chats to join, fetched using {@link chatlists.RawGetChatlistUpdatesRequest} and filtered as specified in the documentation »."},"throws":[{"code":400,"name":"FILTER_ID_INVALID","comment":"The specified filter ID is invalid."},{"code":400,"name":"FILTER_INCLUDE_EMPTY","comment":"The include_peers vector of the filter is empty."}],"available":"user"},"chatlists.joinChatlistInvite":{"comment":"Import a chat folder deep link », joining some or all the chats in the folder.","arguments":{"slug":"slug obtained from a chat folder deep link ».","peers":"List of new chats to join, fetched using {@link chatlists.RawCheckChatlistInviteRequest} and filtered as specified in the documentation »."},"throws":[{"code":400,"name":"FILTER_INCLUDE_EMPTY","comment":"The include_peers vector of the filter is empty."},{"code":400,"name":"INVITE_SLUG_EMPTY","comment":"The specified invite slug is empty."},{"code":400,"name":"INVITE_SLUG_EXPIRED","comment":"The specified chat folder link has expired."}],"available":"user"},"stories.canSendStory":{"comment":"Check whether we can post stories as the specified peer.","arguments":{"peer":"The peer from which we wish to post stories."},"throws":[{"code":400,"name":"BOOSTS_REQUIRED","comment":"The specified channel must first be boosted by its users in order to perform this action."},{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."},{"code":400,"name":"STORIES_TOO_MUCH","comment":"You have hit the maximum active stories limit as specified by the story_expiring_limit_* client configuration parameters: you should buy a Premium subscription, delete an active story, or wait for the oldest story to expire."},{"code":400,"name":"STORY_SEND_FLOOD_MONTHLY_%d","comment":"You've hit the monthly story limit as specified by the stories_sent_monthly_limit_* client configuration parameters: wait for the specified number of seconds before posting a new story."},{"code":400,"name":"STORY_SEND_FLOOD_WEEKLY_%d","comment":"You've hit the weekly story limit as specified by the stories_sent_weekly_limit_* client configuration parameters: wait for the specified number of seconds before posting a new story."}],"available":"user"},"stories.sendStory":{"comment":"Uploads a Telegram Story.","arguments":{"flags":"Flags, see TL conditional fields","pinned":"Whether to add the story to the profile automatically upon expiration. If not set, the story will only be added to the archive, see here » for more info.","noforwards":"If set, disables forwards, screenshots, and downloads.","fwd_modified":"Set this flag when reposting stories with fwd_from_id+fwd_from_id, if the media was modified before reposting.","peer":"The peer to send the story as.","media":"The story media.","media_areas":"Media areas associated to the story, see here » for more info.","caption":"Story caption.","entities":"Message entities for styled text, if allowed by the stories_entities client configuration parameter ».","privacy_rules":"Privacy rules for the story, indicating who can or can't view the story.","random_id":"Unique client message ID required to prevent message resending.","period":"Period after which the story is moved to archive (and to the profile if pinned is set), in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 for Telegram Premium users, and 86400 otherwise.","fwd_from_id":"If set, indicates that this story is a repost of story with ID fwd_from_story posted by the peer in fwd_from_id.","fwd_from_story":"If set, indicates that this story is a repost of story with ID fwd_from_story posted by the peer in fwd_from_id."},"throws":[{"code":400,"name":"BOOSTS_REQUIRED","comment":"The specified channel must first be boosted by its users in order to perform this action."},{"code":400,"name":"IMAGE_PROCESS_FAILED","comment":"Failure while processing image."},{"code":400,"name":"MEDIA_EMPTY","comment":"The provided media object is invalid."},{"code":400,"name":"MEDIA_FILE_INVALID","comment":"The specified media file is invalid."},{"code":400,"name":"MEDIA_TYPE_INVALID","comment":"The specified media type cannot be used in stories."},{"code":400,"name":"MEDIA_VIDEO_STORY_MISSING","comment":"A non-story video cannot be repubblished as a story (emitted when trying to resend a non-story video as a story using inputDocument)."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."},{"code":400,"name":"STORIES_TOO_MUCH","comment":"You have hit the maximum active stories limit as specified by the story_expiring_limit_* client configuration parameters: you should buy a Premium subscription, delete an active story, or wait for the oldest story to expire."},{"code":400,"name":"STORY_PERIOD_INVALID","comment":"The specified story period is invalid for this account."},{"code":400,"name":"VENUE_ID_INVALID","comment":"The specified venue ID is invalid."}],"available":"user"},"stories.editStory":{"comment":"Edit an uploaded story","arguments":{"flags":"Flags, see TL conditional fields","peer":"Peer where the story was posted.","id":"ID of story to edit.","media":"If specified, replaces the story media.","media_areas":"Media areas associated to the story, see here » for more info.","caption":"If specified, replaces the story caption.","entities":"Message entities for styled text in the caption, if allowed by the stories_entities client configuration parameter ».","privacy_rules":"If specified, alters the privacy settings » of the story, changing who can or can't view the story."},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"STORY_NOT_MODIFIED","comment":"The new story information you passed is equal to the previous story information, thus it wasn't modified."}],"available":"user"},"stories.deleteStories":{"comment":"Deletes some posted stories.","arguments":{"peer":"Channel/user from where to delete stories.","id":"IDs of stories to delete."},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"STORY_ID_EMPTY","comment":"You specified no story IDs."}],"available":"user"},"chatlists.leaveChatlist":{"comment":"Delete a folder imported using a chat folder deep link »","arguments":{"chatlist":"Folder ID","peers":"Also leave the specified channels and groups"},"throws":[{"code":400,"name":"FILTER_ID_INVALID","comment":"The specified filter ID is invalid."}],"available":"user"},"stories.getAllStories":{"comment":"Fetch the List of active (or active and hidden) stories, see here » for more info on watching stories.","arguments":{"flags":"Flags, see TL conditional fields","next":"If next and state are both set, uses the passed state to paginate to the next results; if neither state nor next are set, fetches the initial page; if state is set and next is not set, check for changes in the active/hidden peerset, see here » for more info on the full flow.","hidden":"If set, fetches the hidden active story list, otherwise fetches the active story list, see here » for more info on the full flow.","state":"If next and state are both set, uses the passed state to paginate to the next results; if neither state nor next are set, fetches the initial page; if state is set and next is not set, check for changes in the active/hidden peerset, see here » for more info on the full flow."},"available":"user"},"stories.togglePinned":{"comment":"Pin or unpin one or more stories","arguments":{"peer":"Peer where to pin or unpin stories","id":"IDs of stories to pin or unpin","pinned":"Whether to pin or unpin the stories"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"stories.getPinnedStories":{"comment":"Fetch the stories pinned on a peer's profile.","arguments":{"peer":"Peer whose pinned stories should be fetched","offset_id":"Offsets for pagination, for more info click here","limit":"Maximum number of results to return, see pagination"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"USER_ID_INVALID","comment":"The provided user ID is invalid."}],"available":"user"},"stories.getStoriesArchive":{"comment":"Fetch the story archive » of a peer we control.","arguments":{"peer":"Peer whose archived stories should be fetched","offset_id":"Offsets for pagination, for more info click here","limit":"Maximum number of results to return, see pagination"},"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"stories.toggleAllStoriesHidden":{"comment":"Hide the active stories of a specific peer, preventing them from being displayed on the action bar on the homescreen.","arguments":{"hidden":"Whether to hide or unhide all active stories of the peer"},"available":"user"},"stories.readStories":{"comment":"Mark all stories up to a certain ID as read, for a given peer; will emit an {@link RawUpdateReadStories} update to all logged-in sessions.","arguments":{"peer":"The peer whose stories should be marked as read.","max_id":"Mark all stories up to and including this ID as read"},"throws":[{"code":400,"name":"MAX_ID_INVALID","comment":"The provided max ID is invalid."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"STORIES_NEVER_CREATED","comment":"This peer hasn't ever posted any stories."}],"available":"user"},"stories.getStoriesByID":{"comment":"Obtain full info about a set of stories by their IDs.","arguments":{"peer":"Peer where the stories were posted","id":"Story IDs"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"STORIES_NEVER_CREATED","comment":"This peer hasn't ever posted any stories."},{"code":400,"name":"STORY_ID_EMPTY","comment":"You specified no story IDs."}],"available":"user"},"stories.incrementStoryViews":{"comment":"Increment the view counter of one or more stories.","arguments":{"peer":"Peer where the stories were posted.","id":"IDs of the stories (maximum 200 at a time)."},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"STORY_ID_EMPTY","comment":"You specified no story IDs."}],"available":"user"},"stories.getStoryViewsList":{"comment":"Obtain the list of users that have viewed a specific story we posted","arguments":{"flags":"Flags, see TL conditional fields","just_contacts":"Whether to only fetch view reaction/views made by our contacts","reactions_first":"Whether to return {@link RawStoryView} info about users that reacted to the story (i.e. if set, the server will first sort results by view date as usual, and then also additionally sort the list by putting {@link RawStoryView}s with an associated reaction first in the list). Ignored if forwards_first is set.","forwards_first":"If set, returns forwards and reposts first, then reactions, then other views; otherwise returns interactions sorted just by interaction date.","peer":"Peer where the story was posted","q":"Search for specific peers","id":"Story ID","offset":"Offset for pagination, obtained from {@link stories.RawStoryViewsList}.next_offset","limit":"Maximum number of results to return, see pagination"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"STORY_ID_INVALID","comment":"The specified story ID is invalid."}],"available":"user"},"stories.exportStoryLink":{"comment":"Generate a story deep link for a specific story","arguments":{"peer":"Peer where the story was posted","id":"Story ID"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"STORY_ID_EMPTY","comment":"You specified no story IDs."},{"code":400,"name":"USER_PUBLIC_MISSING","comment":"Cannot generate a link to stories posted by a peer without a username."}],"available":"user"},"stories.report":{"comment":"Report a story.","arguments":{"peer":"The peer that uploaded the story.","id":"IDs of the stories to report.","reason":"Why are these storeis being reported.","message":"Comment for report moderation"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"stories.activateStealthMode":{"comment":"Activates stories stealth mode, see here » for more info.\n\nWill return an {@link RawUpdateStoriesStealthMode}.","arguments":{"flags":"Flags, see TL conditional fields","past":"Whether to erase views from any stories opened in the past stories_stealth_past_period seconds », as specified by the client configuration.","future":"Whether to hide future story views for the next stories_stealth_future_period seconds », as specified by the client configuration."},"throws":[{"code":400,"name":"PREMIUM_ACCOUNT_REQUIRED","comment":"A premium account is required to execute this action."}],"available":"user"},"chatlists.checkChatlistInvite":{"comment":"Obtain information about a chat folder deep link ».","arguments":{"slug":"slug obtained from the chat folder deep link »"},"throws":[{"code":400,"name":"INVITE_SLUG_EMPTY","comment":"The specified invite slug is empty."},{"code":400,"name":"INVITE_SLUG_EXPIRED","comment":"The specified chat folder link has expired."}],"available":"user"},"stories.getStoriesViews":{"comment":"Obtain info about the view count, forward count, reactions and recent viewers of one or more stories.","arguments":{"peer":"Peer whose stories should be fetched","id":"Story IDs"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"STORY_ID_EMPTY","comment":"You specified no story IDs."}],"available":"user"},"stories.sendReaction":{"comment":"React to a story.","arguments":{"flags":"Flags, see TL conditional fields","add_to_recent":"Whether to add this reaction to the recent reactions list ».","peer":"The peer that sent the story","story_id":"ID of the story to react to","reaction":"Reaction"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"REACTION_INVALID","comment":"The specified reaction is invalid."},{"code":400,"name":"STORY_ID_EMPTY","comment":"You specified no story IDs."},{"code":400,"name":"STORY_ID_INVALID","comment":"The specified story ID is invalid."}],"available":"user"},"stories.getPeerStories":{"comment":"Fetch the full active story list of a specific peer.","arguments":{"peer":"Peer whose stories should be fetched"},"throws":[{"code":400,"name":"CHANNEL_INVALID","comment":"The provided channel is invalid."},{"code":400,"name":"CHANNEL_PRIVATE","comment":"You haven't joined this channel/supergroup."},{"code":400,"name":"MSG_ID_INVALID","comment":"Invalid message ID provided."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"stories.getPeerMaxIDs":{"comment":"Get the IDs of the maximum read stories for a set of peers.","arguments":{"id":"Peers"},"available":"user"},"stories.getAllReadPeerStories":{"comment":"Obtain the latest read story ID for all peers when first logging in, returned as a list of {@link RawUpdateReadStories} updates, see here » for more info.","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"stories.getStoryReactionsList":{"comment":"Get the reaction and interaction list of a story posted to a channel, along with the sender of each reaction.\n\nCan only be used by channel admins.","arguments":{"flags":"Flags, see TL conditional fields","forwards_first":"If set, returns forwards and reposts first, then reactions, then other views; otherwise returns interactions sorted just by interaction date.","peer":"Channel","id":"Story ID","reaction":"Get only reactions of this type","offset":"Offset for pagination (taken from the next_offset field of the returned stories.StoryReactionsList); empty in the first request.","limit":"Maximum number of results to return, see pagination"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"stories.searchPosts":{"comment":"Globally search for stories using a hashtag or a location media area, see here » for more info on the full flow.\n\nEither hashtag or area must be set when invoking the method.","arguments":{"flags":"Flags, see TL conditional fields","hashtag":"Hashtag (without the #)","area":"A {@link RawMediaAreaGeoPoint} or a {@link RawMediaAreaVenue}.
    Note {@link RawMediaAreaGeoPoint} areas may be searched only if they have an associated address.","offset":"Offset for pagination: initially an empty string, then the next_offset from the previously returned {@link stories.RawFoundStories}.","limit":"Maximum number of results to return, see pagination"},"throws":[{"code":400,"name":"HASHTAG_INVALID","comment":"The specified hashtag is invalid."}],"available":"user"},"stories.togglePeerStoriesHidden":{"comment":"Hide the active stories of a user, preventing them from being displayed on the action bar on the homescreen, see here » for more info.","arguments":{"peer":"Peer whose stories should be (un)hidden.","hidden":"Whether to hide or unhide stories."},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"stories.togglePinnedToTop":{"comment":"Pin some stories to the top of the profile, see here » for more info.","arguments":{"peer":"Peer where to pin stories.","id":"IDs of the stories to pin (max stories_pinned_to_top_count_max)."},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"STORY_ID_INVALID","comment":"The specified story ID is invalid."}],"available":"user"},"stories.getChatsToSend":{"comment":"Obtain a list of channels where the user can post stories","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"premium.applyBoost":{"comment":"Apply one or more boosts » to a peer.","arguments":{"flags":"Flags, see TL conditional fields","slots":"Which boost slots to assign to this peer.","peer":"The peer to boost."},"throws":[{"code":400,"name":"BOOSTS_EMPTY","comment":"No boost slots were specified."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."},{"code":400,"name":"SLOTS_EMPTY","comment":"The specified slot list is empty."}],"available":"user"},"premium.getMyBoosts":{"comment":"Obtain which peers are we currently boosting, and how many boost slots we have left.","available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"premium.getBoostsList":{"comment":"Obtains info about the boosts that were applied to a certain channel or supergroup (admins only)","arguments":{"flags":"Flags, see TL conditional fields","gifts":"Whether to return only info about boosts received from gift codes and giveaways created by the channel/supergroup »","peer":"The channel/supergroup","offset":"Offset for pagination, obtained from {@link premium.RawBoostsList}.next_offset","limit":"Maximum number of results to return, see pagination"},"throws":[{"code":400,"name":"CHAT_ADMIN_REQUIRED","comment":"You must be an admin in this chat to do this."},{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"premium.getBoostsStatus":{"comment":"Gets the current number of boosts of a channel/supergroup.","arguments":{"peer":"The peer."},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"user"},"premium.getUserBoosts":{"comment":"Returns the lists of boost that were applied to a channel/supergroup by a specific user (admins only)","arguments":{"peer":"The channel/supergroup","user_id":"The user"},"throws":[{"code":400,"name":"PEER_ID_INVALID","comment":"The provided peer id is invalid."}],"available":"both"},"smsjobs.isEligibleToJoin":{"comment":"Check if we can process SMS jobs (official clients only).","throws":[{"code":403,"name":"NOT_ELIGIBLE","comment":"The current user is not eligible to join the Peer-to-Peer Login Program."}],"available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"smsjobs.leave":{"comment":"Disable SMS jobs (official clients only).","throws":[{"code":400,"name":"NOT_JOINED","comment":"The current user hasn't joined the Peer-to-Peer Login Program."}],"available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"smsjobs.updateSettings":{"comment":"Update SMS job settings (official clients only).","arguments":{"flags":"Flags, see TL conditional fields","allow_international":"Allow international numbers?"},"throws":[{"code":400,"name":"NOT_JOINED","comment":"The current user hasn't joined the Peer-to-Peer Login Program."}],"available":"user"},"smsjobs.getStatus":{"comment":"Get SMS jobs status (official clients only).","throws":[{"code":400,"name":"NOT_JOINED","comment":"The current user hasn't joined the Peer-to-Peer Login Program."}],"available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"smsjobs.join":{"comment":"Enable SMS jobs (official clients only).","throws":[{"code":400,"name":"NOT_ELIGIBLE","comment":"The current user is not eligible to join the Peer-to-Peer Login Program."}],"available":"user","arguments":{"gigagroup":"Is this a broadcast group?"}},"smsjobs.finishJob":{"comment":"Finish an SMS job (official clients only).","arguments":{"flags":"Flags, see TL conditional fields","job_id":"Job ID.","error":"If failed, the error."},"throws":[{"code":400,"name":"SMSJOB_ID_INVALID","comment":"The specified job ID is invalid."}],"available":"user"},"fragment.getCollectibleInfo":{"comment":"Fetch information about a fragment collectible, see here » for more info on the full flow.","arguments":{"collectible":"Collectible to fetch info about."},"throws":[{"code":400,"name":"COLLECTIBLE_INVALID","comment":"The specified collectible is invalid."},{"code":400,"name":"COLLECTIBLE_NOT_FOUND","comment":"The specified collectible could not be found."}],"available":"user"},"smsjobs.getSmsJob":{"comment":"Get info about an SMS job (official clients only).","arguments":{"job_id":"Job ID"},"throws":[{"code":400,"name":"SMSJOB_ID_INVALID","comment":"The specified job ID is invalid."}],"available":"user"}},"unions":{"Error":"An object containing a query error.","InputChatPhoto":"Defines a new group profile photo.","Peer":"Identifier of a private chat, basic group, group or channel (see here » for more info).","InputPhoto":"Defines a photo for further interaction.","InputFileLocation":"Defines the location of a file for download.","InputGeoPoint":"Defines a GeoPoint.","InputPeer":"Peer","InputContact":"Object defines a contact from the user's phone book.","storage.FileType":"Object describes the file type.","InputUser":"Defines a user for subsequent interaction.","InputFile":"Defines a file uploaded by the client.","InputMedia":"Defines media content of a message.","UserProfilePhoto":"Object contains info on the user's profile photo.","Chat":"Object defines a group.","User":"Object defines a user.","UserStatus":"User online status","ChatParticipant":"Details of a group member.","Message":"Object describing a message.","ChatPhoto":"Object defines a group profile photo.","MessageMedia":"Media","ChatParticipants":"Object contains info on group members.","PhotoSize":"Location of a certain size of a picture","ChatFull":"Full info about a channel, supergroup, gigagroup or basic group.","Dialog":"Chat info.","Photo":"Object describes a photo.","MessageAction":"Object describing actions connected to a service message.","GeoPoint":"Object defines a GeoPoint.","auth.SentCode":"Contains info on a confirmation code message sent via SMS, phone call or Telegram.","auth.ExportedAuthorization":"Exported authorization","auth.Authorization":"Object contains info on user authorization.","InputPeerNotifySettings":"Notifications settings.","InputNotifyPeer":"Object defines the set of users and/or groups that generate notifications.","PeerNotifySettings":"Notification settings.","PeerSettings":"List of actions that are possible when interacting with this user, to be shown as suggested actions in the chat bar","ReportReason":"Report reason","ImportedContact":"Object contains info on a successfully imported contact.","UserFull":"Object contains extended user info.","Contact":"A contact of the current user.","ContactStatus":"Contact status: online / offline.","contacts.Contacts":"Info on the current user's contact list.","WallPaper":"Object contains info on a wallpaper.","contacts.Blocked":"Info on users from the current user's black list.","contacts.ImportedContacts":"Object contains info on successfully imported contacts.","messages.Dialogs":"Object contains a list of chats with messages and auxiliary data.","messages.Messages":"Object contains information on list of messages with auxiliary data.","messages.Chats":"Object contains list of chats with auxiliary data.","messages.ChatFull":"Full info about a channel, supergroup, gigagroup or basic group.","MessagesFilter":"Object describes message filter.","messages.AffectedHistory":"Object contains info on affected part of communication history with the user or in a chat.","Update":"Object contains info on events occurred.","updates.State":"Object contains info on state for further updates.","updates.Difference":"Occurred changes.","photos.Photos":"Object contains list of photos with auxiliary data.","Updates":"Object which is perceived by the client without a call on its part when an event occurs.","photos.Photo":"Photo with auxiliary data.","upload.File":"Contains info on file.","NearestDc":"Object contains info on nearest data center.","help.InviteText":"Object contains info on the text of a message with an invitation.","Config":"Object contains info on API configuring parameters.","help.AppUpdate":"Contains info on app update availability.","EncryptedChat":"Object contains info on an encrypted chat.","InputEncryptedChat":"Object sets an encrypted chat ID.","DcOption":"Information for connection to data center.","EncryptedFile":"Seta an encrypted file.","InputEncryptedFile":"Object sets encrypted file for attachment","EncryptedMessage":"Object contains encrypted message.","messages.SentEncryptedMessage":"Contains info on message sent to an encrypted chat.","InputDocument":"Defines a document for subsequent interaction.","Document":"A document.","messages.DhConfig":"Contains Diffie-Hellman key generation protocol parameters.","help.Support":"Info about the support user, relevant to the current user.","contacts.Found":"Object contains info on users found by name substring and auxiliary data.","NotifyPeer":"Object defines the set of users and/or groups that generate notifications.","SendMessageAction":"User actions. Use this to provide users with detailed info about their chat partner's actions: typing or sending attachments of all kinds.","InputPrivacyKey":"Privacy keys together with privacy rules » indicate what can or can't someone do and are specified by a PrivacyKey constructor, and its input counterpart InputPrivacyKey.\n\nSee the privacy documentation » for more info.","PrivacyKey":"Privacy keys together with privacy rules » indicate what can or can't someone do and are specified by a PrivacyKey constructor, and its input counterpart InputPrivacyKey.\n\nSee the privacy documentation » for more info.","account.PrivacyRules":"Privacy rules","AccountDaysTTL":"Time-to-live of current account","InputPrivacyRule":"Privacy rules indicate who can or can't do something and are specified by a PrivacyRule, and its input counterpart InputPrivacyRule.\n\nSee the privacy documentation » for more info.","DocumentAttribute":"Various possible attributes of a document (used to define if it's a sticker, a GIF, a video, a mask sticker, an image, an audio, and so on)","messages.Stickers":"Stickers","messages.AllStickers":"All stickers","StickerPack":"Stickerpack","messages.AffectedMessages":"Messages affected by changes","WebPage":"Instant View webpage preview","PrivacyRule":"Privacy rules together with privacy keys indicate what can or can't someone do and are specified by a PrivacyRule constructor, and its input counterpart InputPrivacyRule.\n\nSee the privacy documentation » for more info.","Authorization":"Represents a logged-in session","account.Authorizations":"Logged-in sessions","auth.PasswordRecovery":"Recovery info of a 2FA password, only for accounts with a recovery email configured.","account.Password":"Configuration for two-factor authorization","ChatInvite":"Chat invite","ExportedChatInvite":"Exported chat invite","ReceivedNotifyMessage":"Confirmation of message receipt","account.PasswordInputSettings":"Constructor for setting up a new 2FA SRP password","StickerSet":"Represents a stickerset (stickerpack)","messages.StickerSet":"Stickerset","account.PasswordSettings":"Private info associated to the password info (recovery email, telegram passport info & so on)","InputStickerSet":"Represents a stickerset","KeyboardButton":"Bot or inline keyboard buttons","KeyboardButtonRow":"Bot or inline keyboard rows","BotInfo":"Info about bots (available bot commands, etc)","ReplyMarkup":"Reply markup for bot and inline keyboards","InputChannel":"Represents a channel","contacts.ResolvedPeer":"Peer returned after resolving a @username","updates.ChannelDifference":"Contains the difference (new messages) between our local channel state and the remote state","MessageRange":"Indicates a range of chat messages","channels.ChannelParticipants":"Channel/supergroup participants","ChannelMessagesFilter":"Filter for fetching only certain types of channel messages","MessageEntity":"Message entities, representing styled text in a message","ChannelParticipantsFilter":"Filter for fetching channel participants","BotCommand":"Describes a bot command that can be used in a chat","ChannelParticipant":"Channel participant","channels.ChannelParticipant":"Channel participant","help.TermsOfService":"Contains info about the latest telegram Terms Of Service.","messages.SavedGifs":"Saved GIFs","InputBotInlineResult":"Inline bot result","InputBotInlineMessage":"Represents a sent inline message from the perspective of a bot","BotInlineResult":"Results of an inline query","BotInlineMessage":"Inline message","ExportedMessageLink":"HTTP link and embed info of channel message","messages.BotResults":"Result of a query to an inline bot","MessageFwdHeader":"Info about a forwarded message","auth.SentCodeType":"Type of the verification code that was sent","auth.CodeType":"Type of verification code that will be sent next if you call the resendCode method","messages.MessageEditData":"Message edit data for media","InlineBotSwitchPM":"The bot requested the user to message them in private","messages.BotCallbackAnswer":"Callback answer of bot","messages.PeerDialogs":"List of dialogs","TopPeerCategory":"Top peer category","TopPeerCategoryPeers":"Top peers by top peer category","TopPeer":"Top peer","contacts.TopPeers":"Top peers","InputBotInlineMessageID":"Represents a sent inline message from the perspective of a bot","messages.FeaturedStickers":"Featured stickers","DraftMessage":"Represents a message draft.","StickerSetCovered":"Stickerset preview","messages.ArchivedStickers":"Archived stickers","MaskCoords":"Mask coordinates (if this is a mask sticker, attached to a photo)","messages.StickerSetInstallResult":"Result of stickerset installation process","InputStickeredMedia":"Represents a media with attached stickers","messages.RecentStickers":"Recent stickers","Game":"Indicates an already sent game","InputGame":"A game to send","messages.HighScores":"High scores (in games)","HighScore":"Game high score","DataJSON":"Represent a JSON-encoded object","PhoneCallDiscardReason":"Why was the phone call discarded?","RichText":"Rich text","LabeledPrice":"Labeled pricetag","Invoice":"Invoice","PaymentRequestedInfo":"Requested payment info","PageBlock":"Represents an instant view page element","InputWebDocument":"Specifies a document that will have to be downloaded from the URL by the telegram servers","PaymentSavedCredentials":"Saved payment credentials","PostAddress":"Shipping address","WebDocument":"Remote document","upload.WebFile":"Remote file","payments.PaymentForm":"Payment form","InputWebFileLocation":"Location of remote file","PaymentCharge":"Charged payment","account.TmpPassword":"Temporary password","payments.PaymentResult":"Payment result","payments.ValidatedRequestedInfo":"Validated requested info","payments.PaymentReceipt":"Payment receipt","payments.SavedInfo":"Saved payment info","InputPaymentCredentials":"Payment credentials","InputStickerSetItem":"Sticker","PhoneConnection":"Phone call connection","PhoneCall":"Phone call","InputPhoneCall":"Phone call","PhoneCallProtocol":"Phone call protocol","ShippingOption":"Shipping options","upload.CdnFile":"Represents the download status of a CDN file","phone.PhoneCall":"Phone call","CdnConfig":"Configuration for CDN file downloads.","LangPackLanguage":"Language pack language","LangPackDifference":"Language pack changes","LangPackString":"Language pack string","ChannelAdminLogEvent":"An event in a channel admin log","ChannelAdminLogEventAction":"Channel admin log event","CdnPublicKey":"Public key to use only during handshakes to CDN DCs.","channels.AdminLogResults":"Admin log events","RecentMeUrl":"Recent t.me urls","PopularContact":"Popular contact","help.RecentMeUrls":"Recent t.me URLs","ChannelAdminLogEventsFilter":"Filter for fetching events in the channel admin log","account.WebAuthorizations":"Web authorizations","InputMessage":"A message","WebAuthorization":"Web authorization","InputSingleMedia":"A single media in an album or grouped media sent with {@link messages.RawSendMultiMediaRequest}.","InputDialogPeer":"Peer, or all peers in a certain folder","DialogPeer":"Peer, or all peers in a folder","messages.FoundStickerSets":"Found stickersets","SecureFile":"Secure passport file, for more info see the passport docs »","FileHash":"Hash of an uploaded file, to be checked for validity after download","InputSecureFile":"Secure passport file, for more info see the passport docs »","help.TermsOfServiceUpdate":"Update of Telegram's terms of service","SecureData":"Secure passport data, for more info see the passport docs »","SecurePlainData":"Plaintext verified passport data.","SecureValue":"Secure Telegram Passport value","SecureValueType":"Secure value type","messages.FavedStickers":"Favorited stickers","SecureValueHash":"Secure value hash","InputSecureValue":"Secure value, for more info see the passport docs »","SecureValueError":"Secure value error","SecureCredentialsEncrypted":"Encrypted secure credentials","InputClientProxy":"Info about an MTProxy used to connect.","help.DeepLinkInfo":"Contains information about an unsupported deep link »","account.SentEmailCode":"The email code that was sent","account.AuthorizationForm":"Authorization form","account.Takeout":"Takeout info","SavedContact":"Saved contact","SecureSecretSettings":"Telegram passport settings","SecurePasswordKdfAlgo":"KDF algorithm to use for computing telegram passport hash","PasswordKdfAlgo":"Key derivation function to use when generating the password hash for SRP two-factor authorization","InputCheckPasswordSRP":"Constructors for checking the validity of a 2FA SRP password.\n\nSee here » for more info on the 2FA authentication flow for methods that require it, before and after login.","SecureRequiredType":"Required secure file type","help.PassportConfig":"Telegram passport configuration","InputAppEvent":"Object contains info about an event that occurred in the application.","PageTableCell":"Represents a table in an instant view table","JSONValue":"JSON value","PageTableRow":"Table row","PageCaption":"Page caption","PageListItem":"Item in block list","JSONObjectValue":"JSON key: value pair","PageRelatedArticle":"Related articles","PageListOrderedItem":"Represents an instant view ordered list","help.SupportName":"Get localized name for support user","PollAnswer":"Indicates a possible answer to a poll.","help.UserInfo":"User info","Page":"Instant view page","Poll":"Indicates a poll message","PollResults":"Results of poll","StatsURL":"URL with chat statistics","PollAnswerVoters":"How users voted on a certain poll answer","ChatOnlines":"Number of online users in a chat","ChatAdminRights":"Represents the rights of an admin in a channel/supergroup.","account.WallPapers":"Wallpapers","WallPaperSettings":"Wallpaper rendering information.","ChatBannedRights":"Represents the rights of a normal user in a supergroup/channel/chat.","InputWallPaper":"Wallpaper","AutoDownloadSettings":"Media autodownload settings","CodeSettings":"Settings for the code type to send","account.AutoDownloadSettings":"Media autodownload settings","EmojiKeyword":"Emoji keyword","EmojiKeywordsDifference":"New emoji keywords","Folder":"A folder","EmojiLanguage":"Emoji language","EmojiURL":"Emoji URL","InputFolderPeer":"Peer in a folder","FolderPeer":"Peer associated to folder","messages.SearchCounter":"Number of results that would be returned by a search","ChannelLocation":"Geographical location of supergroup (geogroups)","UrlAuthResult":"URL authorization result","PeerLocated":"Geolocated peer","RestrictionReason":"Restriction reason","Theme":"Cloud theme","InputTheme":"Cloud theme","account.ContentSettings":"Sensitive content settings","auth.LoginToken":"Login token (for QR code login)","account.Themes":"Installed themes","messages.InactiveChats":"Inactive chat list","BaseTheme":"Basic theme settings","InputThemeSettings":"Theme settings","ThemeSettings":"Theme settings","WebPageAttribute":"Webpage attributes","BankCardOpenUrl":"Credit card info URL provided by the bank","messages.VotesList":"How users voted in a poll","payments.BankCardData":"Credit card info, provided by the card's bank(s)","StatsDateRangeDays":"Channel statistics date range","DialogFilterSuggested":"Suggested dialog filters (folder »)","DialogFilter":"Dialog filter (folder »)","StatsAbsValueAndPrev":"Channel statistics value pair","StatsPercentValue":"Channel statistics percentage","StatsGraph":"Channel statistics graph","stats.BroadcastStats":"Channel statistics","VideoSize":"Represents an animated video thumbnail","help.PromoData":"Info about pinned MTProxy or Public Service Announcement peers.","StatsGroupTopPoster":"Most active user in a supergroup","stats.MegagroupStats":"Supergroup statistics","StatsGroupTopInviter":"Most active inviter in a supergroup","StatsGroupTopAdmin":"Most active admin in a supergroup","GlobalPrivacySettings":"Global privacy settings","help.Country":"Name, ISO code, localized name and phone codes/patterns of a specific country","help.CountryCode":"Country code and phone number pattern of a specific country","help.CountriesList":"Name, ISO code, localized name and phone codes/patterns of all available countries","MessageViews":"View, forward counter + info about replies of a specific message","messages.DiscussionMessage":"Info about a message thread","MessageReplyHeader":"Reply information","messages.MessageViews":"View, forward counter + info about replies","MessageReplies":"Info about post comments (for channels) or message replies (for groups)","stats.MessageStats":"Message statistics","GroupCallParticipant":"Info about a group call participant","PeerBlocked":"Info about a blocked user","GroupCall":"A group call","phone.GroupCall":"Contains info about a group call, and partial info about its participants.","InlineQueryPeerType":"Inline query peer type.","InputGroupCall":"Indicates a group call","messages.HistoryImport":"Identifier of a history import session, click here for more info ».","messages.HistoryImportParsed":"Contains information about a chat export file, generated by a foreign chat app.","messages.AffectedFoundMessages":"Messages found and affected by changes","ChatInviteImporter":"When and which user joined the chat using a chat invite","messages.ExportedChatInvite":"Contains info about a chat invite, and eventually a pointer to the newest chat invite.","messages.ChatInviteImporters":"List of users that imported a chat invitation link.","messages.ChatAdminsWithInvites":"Info about chat invites generated by admins.","ChatAdminWithInvites":"Info about chat invites generated by admins.","messages.ExportedChatInvites":"Info about chat invites exported by a certain admin.","phone.GroupParticipants":"Info about the participants of a group call or livestream","phone.JoinAsPeers":"A list of peers that can be used to join a group call, presenting yourself as a specific user/channel.","phone.ExportedGroupCallInvite":"An exported group call invitation.","account.ResetPasswordResult":"Result of an {@link account.RawResetPasswordRequest} request.","BotCommandScope":"Represents a scope where the bot commands, specified using {@link bots.RawSetBotCommandsRequest} will be valid.","GroupCallParticipantVideoSourceGroup":"Describes a group of video synchronization source identifiers","messages.CheckedHistoryImportPeer":"Contains a confirmation text to be shown to the user, upon importing chat history, click here for more info ».","stickers.SuggestedShortName":"A suggested short name for the specified stickerpack","SponsoredMessage":"A sponsored message","GroupCallParticipantVideo":"Info about a video stream","messages.SponsoredMessages":"A set of sponsored messages associated with a channel","SearchResultsCalendarPeriod":"Information about found messages sent on a specific day, used to split the messages in {@link messages.RawSearchResultsCalendar} constructors by days.","messages.SearchResultsCalendar":"Information about found messages sent on a specific day","SearchResultsPosition":"Information about a message in a specific position","channels.SendAsPeers":"A list of peers that can be used to send messages in a specific group","messages.PeerSettings":"Peer settings","users.UserFull":"Full user information, with attached context peers for reactions","messages.SearchResultsPositions":"Information about sparse positions of messages","auth.LoggedOut":"Future auth token » to be used on subsequent authorizations","MessageReactions":"Message reactions »","messages.AvailableReactions":"Animations and metadata associated with message reactions »","AvailableReaction":"Animations associated with a message reaction","messages.MessageReactionsList":"List of peers that reacted to a specific message","ReactionCount":"Number of users that reacted with a certain emoji","MessagePeerReaction":"How a certain peer reacted to the message","phone.GroupCallStreamChannels":"Info about RTMP streams in a group call or livestream","GroupCallStreamChannel":"Info about an RTMP stream in a group call or livestream","AttachMenuBotIconColor":"Represents an attachment menu icon color for bot mini apps »","phone.GroupCallStreamRtmpUrl":"RTMP URL and stream key to be used in streaming software","AttachMenuBotIcon":"Represents an attachment menu icon for bot mini apps »","AttachMenuBots":"Represents a list of bot mini apps that can be launched from the attachment menu »","AttachMenuBot":"Represents a bot mini app that can be launched from the attachment menu »","WebViewResult":"Contains the webview URL with appropriate theme and user info parameters added","WebViewMessageSent":"Contains information about an inline message sent by a Web App on behalf of a user.","BotMenuButton":"Indicates the action to execute when pressing the in-UI menu button for bots","account.SavedRingtones":"Contains a list of saved notification sounds","NotificationSound":"Represents a notification sound","AttachMenuPeerType":"Indicates a supported peer type for a bot mini app attachment menu","account.SavedRingtone":"Contains information about a saved notification sound","AttachMenuBotsBot":"Represents a bot mini app that can be launched from the attachment menu »","payments.ExportedInvoice":"Exported invoice","InputInvoice":"An invoice","messages.TranscribedAudio":"Transcribed text from a voice message","InputStorePaymentPurpose":"Info about a Telegram Premium purchase","PremiumGiftOption":"Telegram Premium gift option","PaymentFormMethod":"Represents a payment method","EmojiStatus":"Emoji status","ChatReactions":"Available chat reactions","messages.Reactions":"A set of message reactions","help.PremiumPromo":"Telegram Premium promotion information","EmailVerifyPurpose":"Email verification purpose","PremiumSubscriptionOption":"Telegram Premium subscription option","SendAsPeer":"Indicates a peer that can be used to send messages","account.EmojiStatuses":"A list of emoji statuses","EmailVerification":"Email verification code or token","MessageExtendedMedia":"Paid media, see here » for more info.","Reaction":"Message reaction","account.EmailVerified":"Email verification status","Username":"Contains information about a username","StickerKeyword":"Keywords for a certain sticker","ForumTopic":"Contains information about a forum topic","messages.ForumTopics":"Contains information about multiple forum topics","DefaultHistoryTTL":"Contains info about the default value of the Time-To-Live setting, applied to all new chats.","ExportedContactToken":"Describes a temporary profile link.","RequestPeerType":"Filtering criteria to use for the peer selection list shown to the user.","messages.EmojiGroups":"Represents a list of emoji categories.","EmojiGroup":"Represents an emoji category.","TextWithEntities":"Styled text with message entities","messages.TranslatedText":"Translated text with entities.","EmojiList":"Represents a list of custom emojis.","AutoSaveSettings":"Media autosave settings","BotApp":"Contains information about a direct link Mini App.","InputBotApp":"Used to fetch information about a direct link Mini App","messages.BotApp":"Contains information about a direct link Mini App","ReadParticipantDate":"Contains info about when a certain participant has read a message","InlineBotWebView":"Specifies an inline mode mini app button, shown on top of the inline query results list.","InputChatlist":"Represents a folder","account.AutoSaveSettings":"Contains media autosave settings","chatlists.ExportedInvites":"A list of exported chat folder deep links ».","ExportedChatlistInvite":"An exported chat folder deep link ».","chatlists.ChatlistInvite":"Info about a chat folder deep link ».","help.AppConfig":"Contains various client configuration parameters","bots.BotInfo":"Localized name, about text and description of a bot.","chatlists.ChatlistUpdates":"Updated info about a chat folder deep link ».","MessagePeerVote":"How a user voted in a poll","chatlists.ExportedChatlistInvite":"Exported chat folder deep link ».","StoryItem":"Represents a Telegram Story","StoryView":"Story view date and reaction information","StoryViews":"Aggregated view and reaction information of a story","AutoSaveException":"Peer-specific autosave settings","stories.StoryViewsList":"Reaction and view counters for a story","stories.StoryViews":"Reaction and view counters for a list of stories","stories.AllStories":"Full list of active (or active and hidden) stories.","stories.Stories":"List of stories","ExportedStoryLink":"Represents a story deep link","InputReplyTo":"Contains info about a message or story to reply to.","MediaAreaCoordinates":"Coordinates and size of a clicable rectangular area on top of a story.","StoriesStealthMode":"Story stealth mode status","PeerStories":"Stories associated to a peer","MediaArea":"Represents a story media area »","stories.PeerStories":"Active story list of a specific peer.","messages.WebPage":"Contains an instant view webpage.","payments.CheckedGiftCode":"Info about a Telegram Premium Giftcode.","PremiumGiftCodeOption":"Giveaway option.","PrepaidGiveaway":"Contains info about a prepaid giveaway ».","Boost":"Info about one or more boosts applied by a specific user.","premium.BoostsList":"List of boosts that were applied to a peer by multiple users.","payments.GiveawayInfo":"Info about a Telegram Premium Giveaway.","MyBoost":"Contains information about a single boost slot ».","premium.MyBoosts":"A list of peers we are currently boosting, and how many boost slots we have left.","premium.BoostsStatus":"Contains info about the current boost status of a peer.","StoryFwdHeader":"Contains info about the original poster of a reposted story.","PostInteractionCounters":"Interaction counters","stats.StoryStats":"Contains statistics about a story.","stats.PublicForwards":"Contains info about the forwards of a story as a message to public chats and reposts by public channels.","PublicForward":"Contains info about the forwards of a story as a message to public chats and reposts by public channels.","PeerColor":"Represents a color palette ».","help.PeerColorOption":"Contains info about a color palette ».","stories.StoryReactionsList":"List of peers that reacted to a specific story","help.PeerColorSet":"Contains info about a color palette ».","StoryReaction":"How a certain peer reacted to or interacted with a story","SavedDialog":"Represents a saved message dialog ».","messages.SavedReactionTags":"List of reaction tag » names assigned by the user.","help.PeerColors":"Contains info about multiple color palettes ».","SavedReactionTag":"Info about a saved message reaction tag ».","BusinessWeeklyOpen":"A time interval, indicating the opening hours of a Telegram Business.","BusinessWorkHours":"Specifies a set of Telegram Business opening hours.","messages.SavedDialogs":"Represents some saved message dialogs ».","smsjobs.EligibilityToJoin":"SMS jobs eligibility","OutboxReadDate":"Exact read date of a private message we sent to another user.","smsjobs.Status":"Status","SmsJob":"Info about an SMS job.","BusinessLocation":"Represents the location of a Telegram Business ».","InputBusinessRecipients":"Specifies the chats that can receive Telegram Business away » and greeting » messages.\n\nIf exclude_selected is set, specifies all chats that cannot receive Telegram Business away » and greeting » messages.","BusinessRecipients":"Specifies the chats that can receive Telegram Business away » and greeting » messages.","InputBusinessAwayMessage":"Describes a Telegram Business away message, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user.","InputBusinessGreetingMessage":"Describes a Telegram Business greeting, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period.","BusinessGreetingMessage":"Describes a Telegram Business greeting, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period.","BusinessAwayMessageSchedule":"Specifies when should the Telegram Business away messages be sent.","BusinessAwayMessage":"Describes a Telegram Business away message, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user.","Timezone":"Timezone information.","QuickReply":"A quick reply shortcut.","messages.QuickReplies":"Info about quick reply shortcuts ».","ConnectedBot":"Contains info about a connected business bot ».","messages.DialogFilters":"Folder information","Birthday":"Birthday information for a user.","InputQuickReplyShortcut":"Represents a quick reply shortcut ».","account.ConnectedBots":"Info about currently connected business bots.","BotBusinessConnection":"Contains info about a bot business connection.","help.TimezonesList":"Timezone information that may be used elsewhere in the API, such as to set Telegram Business opening hours ».","InputBusinessIntro":"Telegram Business introduction ».","BusinessIntro":"Telegram Business introduction ».","messages.MyStickers":"The list of stickersets owned by the current account ».","InputCollectible":"Represents a Fragment collectible ».","BusinessBotRecipients":"Specifies the private chats that a connected business bot » may receive messages and interact with.","InputBusinessBotRecipients":"Specifies the private chats that a connected business bot » may interact with.","ContactBirthday":"Birthday information of a contact.","MissingInvitee":"Info about why a specific user could not be invited ».","contacts.ContactBirthdays":"Birthday information of our contacts.","fragment.CollectibleInfo":"Info about a fragment collectible.","InputBusinessChatLink":"Contains info about a business chat deep link » to be created by the current account.","RequestedPeer":"Info about a peer, shared by a user with the currently logged in bot using {@link messages.RawSendBotRequestedPeerRequest}.","account.ResolvedBusinessChatLinks":"Contains info about a single resolved business chat deep link ».","BusinessChatLink":"Contains info about a business chat deep link » created by the current account.","account.BusinessChatLinks":"Contains info about business chat deep links » created by the current account.","SponsoredMessageReportOption":"A report option for a sponsored message ».","messages.InvitedUsers":"Contains info about successfully or unsuccessfully invited » users.","channels.SponsoredMessageReportResult":"Status of the method call used to report a sponsored message ».","stats.BroadcastRevenueStats":"Channel revenue ad statistics, see here » for more info.","stats.BroadcastRevenueWithdrawalUrl":"Contains the URL to use to withdraw channel ad revenue.","BroadcastRevenueTransaction":"A channel ad revenue » transaction.","ReactionsNotifySettings":"Reaction notification settings, see here » for more info.","BroadcastRevenueBalances":"Channel ad revenue balance » information.","ReactionNotificationsFrom":"Reaction notification settings","messages.AvailableEffects":"Full list of usable animated message effects ».","AvailableEffect":"Describes a message effect ».","stats.BroadcastRevenueTransactions":"Channel ad revenue transactions ».","FactCheck":"Represents a fact-check » created by an independent fact-checker.","StarsTransactionPeer":"Source of an incoming Telegram Star transaction, or its recipient for outgoing Telegram Star transactions.","payments.StarsStatus":"Info about the current Telegram Star balance and transaction history ».","StarsTransaction":"Represents a Telegram Stars transaction ».","StarsTopupOption":"Telegram Stars topup option.","FoundStory":"A story found using global story search ».","stories.FoundStories":"Stories found using global story search ».","GeoPointAddress":"Address optionally associated to a {@link RawGeoPoint}.","StarsRevenueStatus":"Describes Telegram Star revenue balances ».","payments.StarsRevenueStats":"Star revenue statistics, see here » for more info.\n\nNote that all balances and currency amounts and graph values are in Stars.","payments.StarsRevenueAdsAccountUrl":"Contains a URL leading to a page where the user will be able to place ads for the channel/bot, paying using Telegram Stars.","InputStarsTransaction":"Used to fetch info about a Telegram Star transaction ».","StarsGiftOption":"Telegram Stars gift option.","payments.StarsRevenueWithdrawalUrl":"Contains the URL to use to withdraw Telegram Star revenue.","bots.PopularAppBots":"Popular Main Mini Apps, to be used in the apps tab of global search ».","BotPreviewMedia":"Represents a Main Mini App preview media, see here » for more info.","bots.PreviewInfo":"Contains info about Main Mini App previews, see here » for more info.","SimpleWebViewResult":"Contains the webview URL with appropriate theme parameters added","AppWebViewResult":"Contains the link that must be used to open a direct link Mini App.","SponsoredWebPage":"Represents a sponsored website."}} \ No newline at end of file +{ "updated": "07.08.2024, 17:19:59 (layer 185) - from https://corefork.telegram.org", "classes": { "error": { "comment": "Error.", "arguments": { "code": "Error code", "text": "Message" } }, "inputUser": { "comment": "Defines a user for further interaction.", "arguments": { "user_id": "User identifier", "access_hash": "access_hash value from the {@link RawUser} constructor" } }, "inputPeerUserFromMessage": { "comment": "Defines a min user that was seen in a certain message of a certain chat.", "arguments": { "peer": "The chat where the user was seen", "msg_id": "The message ID", "user_id": "The identifier of the user that was seen" } }, "inputPeerChat": { "comment": "Defines a chat for further interaction.", "arguments": { "chat_id": "Chat identifier" } }, "inputPeerUser": { "comment": "Defines a user for further interaction.", "arguments": { "user_id": "User identifier", "access_hash": "access_hash value from the {@link RawUser} constructor" } }, "inputUserSelf": { "comment": "Defines the current user.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputPeerChannel": { "comment": "Defines a channel for further interaction.", "arguments": { "channel_id": "Channel identifier", "access_hash": "access_hash value from the {@link RawChannel} constructor" } }, "inputPeerEmpty": { "comment": "An empty constructor, no user or chat is defined.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputUserEmpty": { "comment": "Empty constructor, does not define a user.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputPeerChannelFromMessage": { "comment": "Defines a min channel that was seen in a certain message of a certain chat.", "arguments": { "peer": "The chat where the channel's message was seen", "msg_id": "The message ID", "channel_id": "The identifier of the channel that was seen" } }, "inputUserFromMessage": { "comment": "Defines a min user that was seen in a certain message of a certain chat.", "arguments": { "peer": "The chat where the user was seen", "msg_id": "The message ID", "user_id": "The identifier of the user that was seen" } }, "inputPeerSelf": { "comment": "Defines the current user.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputPhoneContact": { "comment": "Phone contact.", "arguments": { "client_id": "An arbitrary 64-bit integer: it should be set, for example, to an incremental number when using {@link contacts.RawImportContactsRequest}, in order to retry importing only the contacts that weren't imported successfully, according to the client_ids returned in {@link contacts.RawImportedContacts}.retry_contacts.", "phone": "Phone number", "first_name": "Contact's first name", "last_name": "Contact's last name" } }, "inputMediaEmpty": { "comment": "Empty media content of a message.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputFile": { "comment": "Defines a file saved in parts using the method {@link upload.RawSaveFilePartRequest}.", "arguments": { "id": "Random file identifier created by the client", "parts": "Number of parts saved", "name": "Full name of the file", "md5_checksum": "In case the file's md5-hash was passed, contents of the file will be checked prior to use" } }, "inputFileBig": { "comment": "Assigns a big file (over 10 MB in size), saved in part using the method {@link upload.RawSaveBigFilePartRequest}.", "arguments": { "id": "Random file id, created by the client", "parts": "Number of parts saved", "name": "Full file name" } }, "inputFileStoryDocument": { "comment": "Used to edit the thumbnail/static preview of a story, see here » for more info on the full flow.", "arguments": { "id": "The old story video." } }, "inputMediaUploadedPhoto": { "comment": "Photo", "arguments": { "flags": "Flags, see TL conditional fields", "spoiler": "Whether this media should be hidden behind a spoiler warning", "file": "The uploaded file", "stickers": "Attached mask stickers", "ttl_seconds": "Time to live in seconds of self-destructing photo" } }, "inputMediaPhoto": { "comment": "Forwarded photo", "arguments": { "flags": "Flags, see TL conditional fields", "spoiler": "Whether this media should be hidden behind a spoiler warning", "id": "Photo to be forwarded", "ttl_seconds": "Time to live in seconds of self-destructing photo" } }, "inputMediaGeoPoint": { "comment": "Map.", "arguments": { "geo_point": "GeoPoint" } }, "inputMediaContact": { "comment": "Phone book contact", "arguments": { "phone_number": "Phone number", "first_name": "Contact's first name", "last_name": "Contact's last name", "vcard": "Contact vcard" } }, "inputMediaDocument": { "comment": "Forwarded document", "arguments": { "flags": "Flags, see TL conditional fields", "spoiler": "Whether this media should be hidden behind a spoiler warning", "id": "The document to be forwarded.", "ttl_seconds": "Time to live of self-destructing document", "query": "Text query or emoji that was used by the user to find this sticker or GIF: used to improve search result relevance." } }, "inputMediaVenue": { "comment": "Can be used to send a venue geolocation.", "arguments": { "geo_point": "Geolocation", "title": "Venue name", "address": "Physical address of the venue", "provider": "Venue provider: currently only \"foursquare\" and \"gplaces\" (Google Places) need to be supported", "venue_id": "Venue ID in the provider's database", "venue_type": "Venue type in the provider's database" } }, "inputMediaGame": { "comment": "A game", "arguments": { "id": "The game to forward" } }, "inputMediaInvoice": { "comment": "Generated invoice of a bot payment", "arguments": { "flags": "Flags, see TL conditional fields", "title": "Product name, 1-32 characters", "description": "Product description, 1-255 characters", "photo": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.", "invoice": "The actual invoice", "payload": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.", "provider": "Payments provider token, obtained via Botfather", "provider_data": "JSON-encoded data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.", "start_param": "Unique bot deep links start parameter. If present, forwarded copies of the sent message will have a URL button with a deep link to the bot (instead of a Pay button), with the value used as the start parameter. If absent, forwarded copies of the sent message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using the same invoice.", "extended_media": "Deprecated" } }, "inputMediaDocumentExternal": { "comment": "Document that will be downloaded by the telegram servers", "arguments": { "flags": "Flags, see TL conditional fields", "spoiler": "Whether this media should be hidden behind a spoiler warning", "url": "URL of the document", "ttl_seconds": "Self-destruct time to live of document" } }, "inputMediaPhotoExternal": { "comment": "New photo that will be uploaded by the server using the specified URL", "arguments": { "flags": "Flags, see TL conditional fields", "spoiler": "Whether this media should be hidden behind a spoiler warning", "url": "URL of the photo", "ttl_seconds": "Self-destruct time to live of photo" } }, "inputMediaGeoLive": { "comment": "Live geolocation", "arguments": { "flags": "Flags, see TL conditional fields", "stopped": "Whether sending of the geolocation was stopped", "geo_point": "Current geolocation", "heading": "For live locations, a direction in which the location moves, in degrees; 1-360.", "period": "Validity period of the current location", "proximity_notification_radius": "For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000)" } }, "inputMediaUploadedDocument": { "comment": "New document", "arguments": { "flags": "Flags, see TL conditional fields", "nosound_video": "Whether the specified document is a video file with no audio tracks (a GIF animation (even as MPEG4), for example)", "force_file": "Force the media file to be uploaded as document", "spoiler": "Whether this media should be hidden behind a spoiler warning", "file": "The uploaded file", "thumb": "Thumbnail of the document, uploaded as for the file", "mime_type": "MIME type of document", "attributes": "Attributes that specify the type of the document (video, audio, voice, sticker, etc.)", "stickers": "Attached stickers", "ttl_seconds": "Time to live in seconds of self-destructing document" } }, "inputMediaPoll": { "comment": "A poll", "arguments": { "flags": "Flags, see TL conditional fields", "poll": "The poll to send", "correct_answers": "Correct answer IDs (for quiz polls)", "solution": "Explanation of quiz solution", "solution_entities": "Message entities for styled text" } }, "inputMediaDice": { "comment": "Send a dice-based animated sticker", "arguments": { "emoticon": "The emoji, for now \"🏀\", \"🎲\" and \"🎯\" are supported" } }, "inputMediaStory": { "comment": "Forwarded story", "arguments": { "peer": "Peer where the story was posted", "id": "Story ID" } }, "inputMediaWebPage": { "comment": "Specifies options that will be used to generate the link preview for the caption, or even a standalone link preview without an attached message.", "arguments": { "flags": "Flags, see TL conditional fields", "force_large_media": "If set, specifies that a large media preview should be used.", "force_small_media": "If set, specifies that a small media preview should be used.", "optional": "If not set, a WEBPAGE_NOT_FOUND RPC error will be emitted if a webpage preview cannot be generated for the specified url; otherwise, no error will be emitted (unless the provided message is also empty, in which case a MESSAGE_EMPTY will be emitted, instead).", "url": "The URL to use for the link preview." } }, "inputChatPhotoEmpty": { "comment": "Empty constructor, remove group photo.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputChatUploadedPhoto": { "comment": "New photo to be set as group profile photo.\n\nThe file, video and video_emoji_markup flags are mutually exclusive.", "arguments": { "flags": "Flags, see TL conditional fields", "file": "File saved in parts using the method {@link upload.RawSaveFilePartRequest}", "video": "Square video for animated profile picture", "video_start_ts": "Floating point UNIX timestamp in seconds, indicating the frame of the video/sticker that should be used as static preview; can only be used if video or video_emoji_markup is set.", "video_emoji_markup": "Animated sticker profile picture, must contain either a {@link RawVideoSizeEmojiMarkup} or a {@link RawVideoSizeStickerMarkup} constructor." } }, "inputChatPhoto": { "comment": "Existing photo to be set as a chat profile photo.", "arguments": { "id": "Existing photo" } }, "inputMediaPaidMedia": { "comment": "Paid media, see here » for more info.", "arguments": { "stars_amount": "The price of the media in Telegram Stars.", "extended_media": "Photos or videos." } }, "inputGeoPointEmpty": { "comment": "Empty GeoPoint constructor.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputPhotoEmpty": { "comment": "Empty constructor.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputEncryptedFileLocation": { "comment": "Location of encrypted secret chat file.", "arguments": { "id": "File ID, id parameter value from {@link RawEncryptedFile}", "access_hash": "Checksum, access_hash parameter value from {@link RawEncryptedFile}" } }, "inputGeoPoint": { "comment": "Defines a GeoPoint by its coordinates.", "arguments": { "flags": "Flags, see TL conditional fields", "lat": "Latitude", "long": "Longitude", "accuracy_radius": "The estimated horizontal accuracy of the location, in meters; as defined by the sender." } }, "inputPhoto": { "comment": "Defines a photo for further interaction.", "arguments": { "id": "Photo identifier", "access_hash": "access_hash value from the {@link RawPhoto} constructor", "file_reference": "File reference" } }, "inputDocumentFileLocation": { "comment": "Document location (video, voice, audio, basically every type except photo)", "arguments": { "id": "Document ID", "access_hash": "access_hash parameter from the {@link RawDocument} constructor", "file_reference": "File reference", "thumb_size": "Thumbnail size to download the thumbnail" } }, "inputSecureFileLocation": { "comment": "Location of encrypted telegram passport file.", "arguments": { "id": "File ID, id parameter value from {@link RawSecureFile}", "access_hash": "Checksum, access_hash parameter value from {@link RawSecureFile}" } }, "inputPhotoLegacyFileLocation": { "comment": "DEPRECATED legacy photo file location", "arguments": { "id": "Photo ID", "access_hash": "Access hash", "file_reference": "File reference", "volume_id": "Volume ID", "local_id": "Local ID", "secret": "Secret" } }, "inputPhotoFileLocation": { "comment": "Use this object to download a photo with {@link upload.RawGetFileRequest} method", "arguments": { "id": "Photo ID, obtained from the {@link RawPhoto} object", "access_hash": "Photo's access hash, obtained from the {@link RawPhoto} object", "file_reference": "File reference", "thumb_size": "The PhotoSize to download: must be set to the type field of the desired PhotoSize object of the {@link RawPhoto}" } }, "peerUser": { "comment": "Chat partner", "arguments": { "user_id": "User identifier" } }, "peerChat": { "comment": "Group.", "arguments": { "chat_id": "Group identifier" } }, "inputStickerSetThumb": { "comment": "Location of stickerset thumbnail (see files)", "arguments": { "stickerset": "Sticker set", "thumb_version": "Thumbnail version" } }, "storage.filePartial": { "comment": "Part of a bigger file.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "storage.fileUnknown": { "comment": "Unknown type.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputTakeoutFileLocation": { "comment": "Used to download a JSON file that will contain all personal data related to features that do not have a specialized takeout method yet, see here » for more info on the takeout API.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputGroupCallStream": { "comment": "Chunk of a livestream", "arguments": { "flags": "Flags, see TL conditional fields", "call": "Livestream info", "time_ms": "Timestamp in milliseconds", "scale": "Specifies the duration of the video segment to fetch in milliseconds, by bitshifting 1000 to the right scale times: duration_ms := 1000 >> scale", "video_channel": "Selected video channel", "video_quality": "Selected video quality (0 = lowest, 1 = medium, 2 = best)" } }, "peerChannel": { "comment": "Channel/supergroup", "arguments": { "channel_id": "Channel ID" } }, "storage.fileGif": { "comment": "GIF image. MIME type: image/gif.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "storage.fileJpeg": { "comment": "JPEG image. MIME type: image/jpeg.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputFileLocation": { "comment": "DEPRECATED location of a photo", "arguments": { "volume_id": "Server volume", "local_id": "File identifier", "secret": "Check sum to access the file", "file_reference": "File reference" } }, "inputPeerPhotoFileLocation": { "comment": "Location of profile photo of channel/group/supergroup/user", "arguments": { "flags": "Flags, see TL conditional fields", "big": "Whether to download the high-quality version of the picture", "peer": "The peer whose profile picture should be downloaded", "photo_id": "Photo ID" } }, "storage.filePng": { "comment": "PNG image. MIME type: image/png.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "storage.filePdf": { "comment": "PDF document image. MIME type: application/pdf.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "storage.fileMp3": { "comment": "Mp3 audio. MIME type: audio/mpeg.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "storage.fileMov": { "comment": "Quicktime video. MIME type: video/quicktime.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "storage.fileMp4": { "comment": "MPEG-4 video. MIME type: video/mp4.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "userEmpty": { "comment": "Empty constructor, non-existent user.", "arguments": { "id": "User identifier or 0" } }, "userProfilePhotoEmpty": { "comment": "Profile photo has not been set, or was hidden.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "storage.fileWebp": { "comment": "WEBP image. MIME type: image/webp.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "userStatusEmpty": { "comment": "User status has not been set yet.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "user": { "comment": "Indicates info about a certain user.\n\nUnless specified otherwise, when updating the local peer database, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).\n\nSee here » for an implementation of the logic to use when updating the local user peer database.", "arguments": { "flags": "Flags, see TL conditional fields", "self": "Whether this user indicates the currently logged in user", "contact": "Whether this user is a contact
    When updating the local peer database, do not apply changes to this field if the min flag is set.", "mutual_contact": "Whether this user is a mutual contact.
    When updating the local peer database, do not apply changes to this field if the min flag is set.", "deleted": "Whether the account of this user was deleted.
    Changes to this flag should invalidate the local {@link RawUserFull} cache for this user ID, see here » for more info.", "bot": "Is this user a bot?
    Changes to this flag should invalidate the local {@link RawUserFull} cache for this user ID, see here » for more info.", "bot_chat_history": "Can the bot see all messages in groups?", "bot_nochats": "Can the bot be added to groups?", "verified": "Whether this user is verified", "restricted": "Access to this user must be restricted for the reason specified in restriction_reason", "min": "See min", "bot_inline_geo": "Whether the bot can request our geolocation in inline mode", "support": "Whether this is an official support user", "scam": "This may be a scam user", "apply_min_photo": "If set and min is set, the value of photo can be used to update the local database, see the documentation of that flag for more info.", "fake": "If set, this user was reported by many users as a fake or scam user: be careful when interacting with them.", "bot_attach_menu": "Whether this bot offers an attachment menu web app", "premium": "Whether this user is a Telegram Premium user
    Changes to this flag should invalidate the local {@link RawUserFull} cache for this user ID, see here » for more info.
    Changes to this flag if the self flag is set should also trigger the following calls, to refresh the respective caches:
    - The {@link help.RawGetConfigRequest} cache
    - The {@link messages.RawGetTopReactionsRequest} cache if the bot flag is not set", "attach_menu_enabled": "Whether we installed the attachment menu web app offered by this bot.
    When updating the local peer database, do not apply changes to this field if the min flag is set.", "flags2": "Flags, see TL conditional fields", "bot_can_edit": "Whether we can edit the profile picture, name, about text and description of this bot because we own it.
    When updating the local peer database, do not apply changes to this field if the min flag is set.
    Changes to this flag (if min is not set) should invalidate the local {@link RawUserFull} cache for this user ID.", "close_friend": "Whether we marked this user as a close friend, see here » for more info.
    When updating the local peer database, do not apply changes to this field if the min flag is set.", "stories_hidden": "Whether we have hidden » all active stories of this user.
    When updating the local peer database, do not apply changes to this field if the min flag is set.", "stories_unavailable": "No stories from this user are visible.", "contact_require_premium": "If set, we can only write to this user if they have already sent some messages to us, if we are subscribed to Telegram Premium, or if they're a mutual contact ({@link RawUser}.mutual_contact).
    All the secondary conditions listed above must be checked separately to verify whether we can still write to the user, even if this flag is set (i.e. a mutual contact will have this flag set even if we can still write to them, and so on...); to avoid doing these extra checks if we haven't yet cached all the required information (for example while displaying the chat list in the sharing UI) the {@link users.RawGetIsPremiumRequiredToContactRequest} method may be invoked instead, passing the list of users currently visible in the UI, returning a list of booleans that directly specify whether we can or cannot write to each user; alternatively, the {@link RawUserFull}.contact_require_premium flag contains the same (fully checked, i.e. it's not just a copy of this flag) info returned by {@link users.RawGetIsPremiumRequiredToContactRequest}.
    To set this flag for ourselves invoke {@link account.RawSetGlobalPrivacySettingsRequest}, setting the settings.new_noncontact_peers_require_premium flag.", "bot_business": "Whether this bot can be connected to a user as specified here ».", "bot_has_main_app": "If set, this bot has configured a Main Mini App ».", "id": "ID of the user, see here » for more info.", "access_hash": "Access hash of the user, see here » for more info.
    If this flag is set, when updating the local peer database, generate a virtual flag called min_access_hash, which is:
    - Set to true if min is set AND
    - The phone flag is not set OR
    - The phone flag is set and the associated phone number string is non-empty
    - Set to false otherwise.

    Then, apply both access_hash and min_access_hash to the local database if:
    - min_access_hash is false OR
    - min_access_hash is true AND
    - There is no locally cached object for this user OR
    - There is no access_hash in the local cache OR
    - The cached object's min_access_hash is also true
    If the final merged object stored to the database has the min_access_hash field set to true, the related access_hash is only suitable to use in {@link RawInputPeerPhotoFileLocation}, to directly download the profile pictures of users, everywhere else a inputPeer*FromMessage constructor will have to be generated as specified here ».
    Bots can also use min access hashes in some conditions, by passing 0 instead of the min access hash.", "first_name": "First name.
    When updating the local peer database, apply changes to this field only if:
    - The min flag is not set OR
    - The min flag is set AND
    - The min flag of the locally cached user entry is set.", "last_name": "Last name.
    When updating the local peer database, apply changes to this field only if:
    - The min flag is not set OR
    - The min flag is set AND
    - The min flag of the locally cached user entry is set.", "username": "Main active username.
    When updating the local peer database, apply changes to this field only if:
    - The min flag is not set OR
    - The min flag is set AND
    - The min flag of the locally cached user entry is set.
    Changes to this flag should invalidate the local {@link RawUserFull} cache for this user ID if the above conditions are respected and the bot_can_edit flag is also set.", "phone": "Phone number.
    When updating the local peer database, apply changes to this field only if:
    - The min flag is not set OR
    - The min flag is set AND
    - The min flag of the locally cached user entry is set.", "photo": "Profile picture of user.
    When updating the local peer database, apply changes to this field only if:
    - The min flag is not set OR
    - The min flag is set AND
    - The apply_min_photo flag is set OR
    - The min flag of the locally cached user entry is set.", "status": "Online status of user.
    When updating the local peer database, apply changes to this field only if:
    - The min flag is not set OR
    - The min flag is set AND
    - The min flag of the locally cached user entry is set OR
    - The locally cached user entry is equal to {@link RawUserStatusEmpty}.", "bot_info_version": "Version of the {@link RawUserFull}, incremented every time it changes.
    Changes to this flag should invalidate the local {@link RawUserFull} cache for this user ID, see here » for more info.", "restriction_reason": "Contains the reason why access to this user must be restricted.", "bot_inline_placeholder": "Inline placeholder for this inline bot", "lang_code": "Language code of the user", "emoji_status": "Emoji status", "usernames": "Additional usernames.
    When updating the local peer database, apply changes to this field only if:
    - The min flag is not set OR
    - The min flag is set AND
    - The min flag of the locally cached user entry is set.
    Changes to this flag (if the above conditions are respected) should invalidate the local {@link RawUserFull} cache for this user ID.", "stories_max_id": "ID of the maximum read story.
    When updating the local peer database, do not apply changes to this field if the min flag of the incoming constructor is set.", "color": "The user's accent color.", "profile_color": "The user's profile color.", "bot_active_users": "Monthly Active Users (MAU) of this bot (may be absent for small bots)." } }, "userStatusRecently": { "comment": "Online status: last seen recently", "arguments": { "flags": "Flags, see TL conditional fields", "by_me": "If set, the exact user status of this user is actually available to us, but to view it we must first purchase a Premium subscription, or allow this user to see our exact last online status. See {@link RawPrivacyKeyStatusTimestamp} for more info." } }, "userStatusLastWeek": { "comment": "Online status: last seen last week", "arguments": { "flags": "Flags, see TL conditional fields", "by_me": "If set, the exact user status of this user is actually available to us, but to view it we must first purchase a Premium subscription, or allow this user to see our exact last online status. See {@link RawPrivacyKeyStatusTimestamp} for more info." } }, "userStatusOffline": { "comment": "The user's offline status.", "arguments": { "was_online": "Time the user was last seen online" } }, "userStatusLastMonth": { "comment": "Online status: last seen last month", "arguments": { "flags": "Flags, see TL conditional fields", "by_me": "If set, the exact user status of this user is actually available to us, but to view it we must first purchase a Premium subscription, or allow this user to see our exact last online status. See {@link RawPrivacyKeyStatusTimestamp} for more info." } }, "userStatusOnline": { "comment": "Online status of the user.", "arguments": { "expires": "Time to expiration of the current online status" } }, "userProfilePhoto": { "comment": "User profile photo.", "arguments": { "flags": "Flags, see TL conditional fields", "has_video": "Whether an animated profile picture is available for this user", "personal": "Whether this profile photo is only visible to us (i.e. it was set using {@link photos.RawUploadContactProfilePhotoRequest}).", "photo_id": "Identifier of the respective photo", "stripped_thumb": "Stripped thumbnail", "dc_id": "DC ID where the photo is stored" } }, "chatEmpty": { "comment": "Empty constructor, group doesn't exist", "arguments": { "id": "Group identifier" } }, "chat": { "comment": "Info about a group.\n\nWhen updating the local peer database, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).\n\nSee here » for an implementation of the logic to use when updating the local user peer database.", "arguments": { "flags": "Flags, see TL conditional fields", "creator": "Whether the current user is the creator of the group", "left": "Whether the current user has left the group", "deactivated": "Whether the group was migrated", "call_active": "Whether a group call is currently active", "call_not_empty": "Whether there's anyone in the group call", "noforwards": "Whether this group is protected, thus does not allow forwarding messages from it", "id": "ID of the group, see here » for more info", "title": "Title", "photo": "Chat photo", "participants_count": "Participant count", "date": "Date of creation of the group", "version": "Used in basic groups to reorder updates and make sure that all of them were received.", "migrated_to": "Means this chat was upgraded to a supergroup", "admin_rights": "Admin rights of the user in the group", "default_banned_rights": "Default banned rights of all users in the group" } }, "chatForbidden": { "comment": "A group to which the user has no access. E.g., because the user was kicked from the group.", "arguments": { "id": "User identifier", "title": "Group name" } }, "channel": { "comment": "Channel/supergroup info\n\nWhen updating the local peer database, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).\n\nThe only exception to the above rule is when the min flag is set, in which case only the following fields must be applied over any locally stored version:\n\nSee here » for an implementation of the logic to use when updating the local user peer database.", "arguments": { "flags": "Flags, see TL conditional fields", "creator": "Whether the current user is the creator of this channel", "left": "Whether the current user has left or is not a member of this channel", "broadcast": "Is this a channel?", "verified": "Is this channel verified by telegram?", "megagroup": "Is this a supergroup?
    Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info.", "restricted": "Whether viewing/writing in this channel for a reason (see restriction_reason)", "signatures": "Whether signatures are enabled (channels)", "min": "See min", "scam": "This channel/supergroup is probably a scam
    Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info.", "has_link": "Whether this channel has a linked discussion group » (or this supergroup is a channel's discussion group). The actual ID of the linked channel/supergroup is contained in {@link RawChannelFull}.linked_chat_id.
    Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info.", "has_geo": "Whether this channel has a geo position", "slowmode_enabled": "Whether slow mode is enabled for groups to prevent flood in chat.
    Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info.", "call_active": "Whether a group call or livestream is currently active", "call_not_empty": "Whether there's anyone in the group call or livestream", "fake": "If set, this supergroup/channel was reported by many users as a fake or scam: be careful when interacting with it.
    Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info.", "gigagroup": "Whether this supergroup is a gigagroup
    Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info.", "noforwards": "Whether this channel or group is protected, thus does not allow forwarding messages from it", "join_to_send": "Whether a user needs to join the supergroup before they can send messages: can be false only for discussion groups », toggle using {@link channels.RawToggleJoinToSendRequest}
    Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info.", "join_request": "Whether a user's join request will have to be approved by administrators, toggle using {@link channels.RawToggleJoinRequestRequest}
    Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info.", "forum": "Whether this supergroup is a forum.
    Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info.", "flags2": "Flags, see TL conditional fields", "stories_hidden": "Whether we have hidden all stories posted by this channel ».", "stories_hidden_min": "If set, indicates that the stories_hidden flag was not populated, and its value must cannot be relied on; use the previously cached value, or re-fetch the constructor using {@link channels.RawGetChannelsRequest} to obtain the latest value of the stories_hidden flag.", "stories_unavailable": "No stories from the channel are visible.", "id": "ID of the channel, see here » for more info", "access_hash": "Access hash, see here » for more info", "title": "Title", "username": "Main active username.", "photo": "Profile photo", "date": "Date when the user joined the supergroup/channel, or if the user isn't a member, its creation date", "restriction_reason": "Contains the reason why access to this channel must be restricted.
    Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info.", "admin_rights": "Admin rights of the user in this channel (see rights)", "banned_rights": "Banned rights of the user in this channel (see rights)", "default_banned_rights": "Default chat rights (see rights)", "participants_count": "Participant count", "usernames": "Additional usernames", "stories_max_id": "ID of the maximum read story.", "color": "The channel's accent color.", "profile_color": "The channel's profile color.", "emoji_status": "Emoji status", "level": "Boost level.
    Changes to this flag should invalidate the local {@link RawChannelFull} cache for this channel/supergroup ID, see here » for more info." } }, "chatFull": { "comment": "Full info about a basic group.\n\nWhen updating the local peer database », all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).", "arguments": { "flags": "Flags, see TL conditional fields", "can_set_username": "Can we change the username of this chat", "has_scheduled": "Whether scheduled messages are available", "translations_disabled": "Whether the real-time chat translation popup should be hidden.", "id": "ID of the chat", "about": "About string for this chat", "participants": "Participant list", "chat_photo": "Chat photo", "notify_settings": "Notification settings", "exported_invite": "Chat invite", "bot_info": "Info about bots that are in this chat", "pinned_msg_id": "Message ID of the last pinned message", "folder_id": "Peer folder ID, for more info click here", "call": "Group call information", "ttl_period": "Time-To-Live of messages sent by the current user to this chat", "groupcall_default_join_as": "When using {@link phone.RawGetGroupCallJoinAsRequest} to get a list of peers that can be used to join a group call, this field indicates the peer that should be selected by default.", "theme_emoticon": "Emoji representing a specific chat theme", "requests_pending": "Pending join requests »", "recent_requesters": "IDs of users who requested to join recently", "available_reactions": "Allowed message reactions »", "reactions_limit": "This flag may be used to impose a custom limit of unique reactions (i.e. a customizable version of appConfig.reactions_uniq_max)." } }, "channelFull": { "comment": "Full info about a channel, supergroup or gigagroup.\n\nWhen updating the local peer database », all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).", "arguments": { "flags": "Flags, see TL conditional fields", "can_view_participants": "Can we view the participant list?", "can_set_username": "Can we set the channel's username?", "can_set_stickers": "Can we {@link channels.RawSetStickersRequest} a stickerpack to the supergroup?", "hidden_prehistory": "Is the history before we joined hidden to us?", "can_set_location": "Can we set the geolocation of this group (for geogroups)", "has_scheduled": "Whether scheduled messages are available", "can_view_stats": "Can the user view channel/supergroup statistics", "blocked": "Whether any anonymous admin of this supergroup was blocked: if set, you won't receive messages from anonymous group admins in discussion replies via @replies", "flags2": "Flags, see TL conditional fields", "can_delete_channel": "Can we delete this channel?", "antispam": "Whether native antispam functionality is enabled in this supergroup.", "participants_hidden": "Whether the participant list is hidden.", "translations_disabled": "Whether the real-time chat translation popup should be hidden.", "stories_pinned_available": "Whether this user has some pinned stories.", "view_forum_as_messages": "Users may also choose to display messages from all topics of a forum as if they were sent to a normal group, using a \"View as messages\" setting in the local client.
    This setting only affects the current account, and is synced to other logged in sessions using the {@link channels.RawToggleViewForumAsMessagesRequest} method; invoking this method will update the value of this flag.", "restricted_sponsored": "Whether ads on this channel were disabled as specified here » (this flag is only visible to the owner of the channel).", "can_view_revenue": "If set, this user can view ad revenue statistics » for this channel.", "paid_media_allowed": "Whether the current user can send or forward paid media » to this channel.", "can_view_stars_revenue": "If set, this user can view Telegram Star revenue statistics » for this channel.", "id": "ID of the channel", "about": "Info about the channel", "participants_count": "Number of participants of the channel", "admins_count": "Number of channel admins", "kicked_count": "Number of users kicked from the channel", "banned_count": "Number of users banned from the channel", "online_count": "Number of users currently online", "read_inbox_max_id": "Position up to which all incoming messages are read.", "read_outbox_max_id": "Position up to which all outgoing messages are read.", "unread_count": "Count of unread messages", "chat_photo": "Channel picture", "notify_settings": "Notification settings", "exported_invite": "Invite link", "bot_info": "Info about bots in the channel/supergroup", "migrated_from_chat_id": "The chat ID from which this group was migrated", "migrated_from_max_id": "The message ID in the original chat at which this group was migrated", "pinned_msg_id": "Message ID of the last pinned message", "stickerset": "Associated stickerset", "available_min_id": "Identifier of a maximum unavailable message in a channel due to hidden history.", "folder_id": "Peer folder ID, for more info click here", "linked_chat_id": "ID of the linked discussion chat for channels (and vice versa, the ID of the linked channel for discussion chats).", "location": "Location of the geo group", "slowmode_seconds": "If specified, users in supergroups will only be able to send one message every slowmode_seconds seconds", "slowmode_next_send_date": "Indicates when the user will be allowed to send another message in the supergroup (unixtime)", "stats_dc": "If set, specifies the DC to use for fetching channel statistics", "pts": "Latest PTS for this channel", "call": "Livestream or group call information", "ttl_period": "Time-To-Live of messages in this channel or supergroup", "pending_suggestions": "A list of suggested actions for the supergroup admin, see here for more info ».", "groupcall_default_join_as": "When using {@link phone.RawGetGroupCallJoinAsRequest} to get a list of peers that can be used to join a group call, this field indicates the peer that should be selected by default.", "theme_emoticon": "Emoji representing a specific chat theme", "requests_pending": "Pending join requests »", "recent_requesters": "IDs of users who requested to join recently", "default_send_as": "Default peer used for sending messages to this channel", "available_reactions": "Allowed message reactions »", "reactions_limit": "This flag may be used to impose a custom limit of unique reactions (i.e. a customizable version of appConfig.reactions_uniq_max).", "stories": "Channel stories", "wallpaper": "Wallpaper", "boosts_applied": "The number of boosts the current user has applied to the current supergroup.", "boosts_unrestrict": "The number of boosts this supergroup requires to bypass slowmode and other restrictions, see here » for more info.", "emojiset": "Custom emoji stickerset associated to the current supergroup, set using {@link channels.RawSetEmojiStickersRequest} after reaching the appropriate boost level, see here » for more info." } }, "chatParticipant": { "comment": "Group member.", "arguments": { "user_id": "Member user ID", "inviter_id": "ID of the user that added the member to the group", "date": "Date added to the group" } }, "channelForbidden": { "comment": "Indicates a channel/supergroup we can't access because we were banned, or for some other reason.", "arguments": { "flags": "Flags, see TL conditional fields", "broadcast": "Is this a channel", "megagroup": "Is this a supergroup", "id": "Channel ID", "access_hash": "Access hash", "title": "Title", "until_date": "The ban is valid until the specified date" } }, "chatParticipantCreator": { "comment": "Represents the creator of the group", "arguments": { "user_id": "ID of the user that created the group" } }, "chatParticipantAdmin": { "comment": "Chat admin", "arguments": { "user_id": "ID of a group member that is admin", "inviter_id": "ID of the user that added the member to the group", "date": "Date when the user was added" } }, "chatPhoto": { "comment": "Group profile photo.", "arguments": { "flags": "Flags, see TL conditional fields", "has_video": "Whether the user has an animated profile picture", "photo_id": "Photo ID", "stripped_thumb": "Stripped thumbnail", "dc_id": "DC where this photo is stored" } }, "chatParticipants": { "comment": "Group members.", "arguments": { "chat_id": "Group identifier", "participants": "List of group members", "version": "Group version number" } }, "messageEmpty": { "comment": "Empty constructor, non-existent message.", "arguments": { "flags": "Flags, see TL conditional fields", "id": "Message identifier", "peer_id": "Peer ID, the chat where this message was sent" } }, "chatPhotoEmpty": { "comment": "Group photo is not set.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "chatParticipantsForbidden": { "comment": "Info on members is unavailable", "arguments": { "flags": "Flags, see TL conditional fields", "chat_id": "Group ID", "self_participant": "Info about the group membership of the current user" } }, "messageService": { "comment": "Indicates a service message", "arguments": { "flags": "Flags, see TL conditional fields", "out": "Whether the message is outgoing", "mentioned": "Whether we were mentioned in the message", "media_unread": "Whether the message contains unread media", "silent": "Whether the message is silent", "post": "Whether it's a channel post", "legacy": "This is a legacy message: it has to be refetched with the new layer", "id": "Message ID", "from_id": "ID of the sender of this message", "peer_id": "Sender of service message", "reply_to": "Reply (thread) information", "date": "Message date", "action": "Event connected with the service message", "ttl_period": "Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well." } }, "message": { "comment": "A message", "arguments": { "flags": "Flags, see TL conditional fields", "out": "Is this an outgoing message", "mentioned": "Whether we were mentioned in this message", "media_unread": "Whether there are unread media attachments in this message", "silent": "Whether this is a silent message (no notification triggered)", "post": "Whether this is a channel post", "from_scheduled": "Whether this is a scheduled message", "legacy": "This is a legacy message: it has to be refetched with the new layer", "edit_hide": "Whether the message should be shown as not modified to the user, even if an edit date is present", "pinned": "Whether this message is pinned", "noforwards": "Whether this message is protected and thus cannot be forwarded; clients should also prevent users from saving attached media (i.e. videos should only be streamed, photos should be kept in RAM, et cetera).", "invert_media": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.", "flags2": "Flags, see TL conditional fields", "offline": "If set, the message was sent because of a scheduled action by the message sender, for example, as away, or a greeting service message.", "id": "ID of the message", "from_id": "ID of the sender of the message", "from_boosts_applied": "Supergroups only, contains the number of boosts this user has given the current supergroup, and should be shown in the UI in the header of the message.
    Only present for incoming messages from non-anonymous supergroup members that have boosted the supergroup.
    Note that this counter should be locally overridden for non-anonymous outgoing messages, according to the current value of {@link RawChannelFull}.boosts_applied, to ensure the value is correct even for messages sent by the current user before a supergroup was boosted (or after a boost has expired or the number of boosts has changed); do not update this value for incoming messages from other users, even if their boosts have changed.", "peer_id": "Peer ID, the chat where this message was sent", "saved_peer_id": "Messages fetched from a saved messages dialog » will have peer={@link RawInputPeerSelf} and the saved_peer_id flag set to the ID of the saved dialog.
    ", "fwd_from": "Info about forwarded messages", "via_bot_id": "ID of the inline bot that generated the message", "via_business_bot_id": "Whether the message was sent by the business bot specified in via_bot_id on behalf of the user.", "reply_to": "Reply information", "date": "Date of the message", "message": "The message", "media": "Media attachment", "reply_markup": "Reply markup (bot/inline keyboards)", "entities": "Message entities for styled text", "views": "View count for channel posts", "forwards": "Forward counter", "replies": "Info about post comments (for channels) or message replies (for groups)", "edit_date": "Last edit date of this message", "post_author": "Name of the author of this message for channel posts (with signatures enabled)", "grouped_id": "Multiple media messages sent using {@link messages.RawSendMultiMediaRequest} with the same grouped ID indicate an album or media group", "reactions": "Reactions to this message", "restriction_reason": "Contains the reason why access to this message must be restricted.", "ttl_period": "Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well.", "quick_reply_shortcut_id": "If set, this message is a quick reply shortcut message » (note that quick reply shortcut messages sent to a private chat will not have this field set).", "effect": "A message effect that should be played as specified here ».", "factcheck": "Represents a fact-check »." } }, "messageMediaPhoto": { "comment": "Attached photo.", "arguments": { "flags": "Flags, see TL conditional fields", "spoiler": "Whether this media should be hidden behind a spoiler warning", "photo": "Photo", "ttl_seconds": "Time to live in seconds of self-destructing photo" } }, "messageMediaEmpty": { "comment": "Empty constructor.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messageMediaGeo": { "comment": "Attached map.", "arguments": { "geo": "GeoPoint" } }, "messageMediaUnsupported": { "comment": "Current version of the client does not support this media type.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messageMediaWebPage": { "comment": "Preview of webpage", "arguments": { "flags": "Flags, see TL conditional fields", "force_large_media": "If set, specifies that a large media preview should be used.", "force_small_media": "If set, specifies that a small media preview should be used.", "manual": "If set, indicates that the URL used for the webpage preview was specified manually using {@link RawInputMediaWebPage}, and may not be related to any of the URLs specified in the message.", "safe": "If set, the webpage can be opened directly without user confirmation; otherwise, user confirmation is required, showing the exact URL that will be opened.", "webpage": "Webpage preview" } }, "messageMediaContact": { "comment": "Attached contact.", "arguments": { "phone_number": "Phone number", "first_name": "Contact's first name", "last_name": "Contact's last name", "vcard": "VCARD of contact", "user_id": "User identifier or 0, if the user with the given phone number is not registered" } }, "messageMediaDocument": { "comment": "Document (video, audio, voice, sticker, any media type except photo)", "arguments": { "flags": "Flags, see TL conditional fields", "nopremium": "Whether this is a normal sticker, if not set this is a premium sticker and a premium sticker animation must be played.", "spoiler": "Whether this media should be hidden behind a spoiler warning", "video": "Whether this is a video.", "round": "Whether this is a round video.", "voice": "Whether this is a voice message.", "document": "Attached document", "alt_document": "Currently only used for story videos, may contain an alternative version of the story video, explicitly encoded using H.264 (in MPEG4 transport) at a lower resolution than document.", "ttl_seconds": "Time to live of self-destructing document" } }, "messageMediaVenue": { "comment": "Venue", "arguments": { "geo": "Geolocation of venue", "title": "Venue name", "address": "Address", "provider": "Venue provider: currently only \"foursquare\" and \"gplaces\" (Google Places) need to be supported", "venue_id": "Venue ID in the provider's database", "venue_type": "Venue type in the provider's database" } }, "messageMediaGame": { "comment": "Telegram game", "arguments": { "game": "Game" } }, "messageMediaInvoice": { "comment": "Invoice", "arguments": { "flags": "Flags, see TL conditional fields", "shipping_address_requested": "Whether the shipping address was requested", "test": "Whether this is an example invoice", "title": "Product name, 1-32 characters", "description": "Product description, 1-255 characters", "photo": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.", "receipt_msg_id": "Message ID of receipt: if set, clients should change the text of the first {@link RawKeyboardButtonBuy} button always attached to the {@link RawMessage} to a localized version of the word Receipt", "currency": "Three-letter ISO 4217 currency code, or XTR for Telegram Stars.", "total_amount": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", "start_param": "Unique bot deep-linking parameter that can be used to generate this invoice", "extended_media": "Deprecated" } }, "messageMediaGeoLive": { "comment": "Indicates a live geolocation", "arguments": { "flags": "Flags, see TL conditional fields", "geo": "Geolocation", "heading": "For live locations, a direction in which the location moves, in degrees; 1-360", "period": "Validity period of provided geolocation", "proximity_notification_radius": "For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000)." } }, "messageMediaDice": { "comment": "Dice-based animated sticker", "arguments": { "value": "Dice value", "emoticon": "The emoji, for now \"🏀\", \"🎲\" and \"🎯\" are supported" } }, "messageMediaStory": { "comment": "Represents a forwarded story or a story mention.", "arguments": { "flags": "Flags, see TL conditional fields", "via_mention": "If set, indicates that this someone has mentioned us in this story (i.e. by tagging us in the description) or vice versa, we have mentioned the other peer (if the message is outgoing).", "peer": "Peer that posted the story.", "id": "Story ID", "story": "The story itself, if absent fetch it using {@link stories.RawGetStoriesByIDRequest} and the peer/id parameters specified above." } }, "messageMediaGiveaway": { "comment": "Contains info about a giveaway, see here » for more info.", "arguments": { "flags": "Flags, see TL conditional fields", "only_new_subscribers": "If set, only new subscribers starting from the giveaway creation date will be able to participate to the giveaway.", "winners_are_visible": "If set, giveaway winners are public and will be listed in a {@link RawMessageMediaGiveawayResults} message that will be automatically sent to the channel once the giveaway ends.", "channels": "The channels that the user must join to participate in the giveaway.", "countries_iso2": "If set, only users residing in these countries can participate in the giveaway, (specified as a list of two-letter ISO 3166-1 alpha-2 country codes); otherwise there are no country-based limitations.", "prize_description": "Can contain a textual description of additional giveaway prizes.", "quantity": "Number of Telegram Premium subscriptions given away.", "months": "Duration in months of each Telegram Premium subscription in the giveaway.", "until_date": "The end date of the giveaway." } }, "messageMediaPoll": { "comment": "Poll", "arguments": { "poll": "The poll", "results": "The results of the poll" } }, "messageMediaGiveawayResults": { "comment": "A giveaway with public winners has finished, this constructor contains info about the winners.", "arguments": { "flags": "Flags, see TL conditional fields", "only_new_subscribers": "If set, only new subscribers starting from the giveaway creation date participated in the giveaway.", "refunded": "If set, the giveaway was canceled and was fully refunded.", "channel_id": "ID of the channel/supergroup that was automatically boosted by the winners of the giveaway for duration of the Premium subscription.", "additional_peers_count": "Number of other channels that participated in the giveaway.", "launch_msg_id": "Identifier of the message with the giveaway in channel_id.", "winners_count": "Total number of winners in the giveaway.", "unclaimed_count": "Number of not-yet-claimed prizes.", "winners": "Up to 100 user identifiers of the winners of the giveaway.", "months": "Duration in months of each Telegram Premium subscription in the giveaway.", "prize_description": "Can contain a textual description of additional giveaway prizes.", "until_date": "Point in time (UNIX timestamp in seconds) when the winners were selected. May be bigger than winners selection date specified in initial parameters of the giveaway." } }, "messageMediaPaidMedia": { "comment": "Paid media, see here » for more info.", "arguments": { "stars_amount": "The price of the media in Telegram Stars.", "extended_media": "Either the paid-for media, or super low resolution media previews if the media wasn't purchased yet, see here » for more info." } }, "messageActionEmpty": { "comment": "Empty constructor.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messageActionChatCreate": { "comment": "Group created", "arguments": { "title": "Group name", "users": "List of group members" } }, "messageActionChatEditTitle": { "comment": "Group name changed.", "arguments": { "title": "New group name" } }, "messageActionChatEditPhoto": { "comment": "Group profile changed", "arguments": { "photo": "New group profile photo" } }, "messageActionChatDeletePhoto": { "comment": "Group profile photo removed.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messageActionChatAddUser": { "comment": "New member in the group", "arguments": { "users": "Users that were invited to the chat" } }, "messageActionChatDeleteUser": { "comment": "User left the group.", "arguments": { "user_id": "Leaving user ID" } }, "messageActionChatMigrateTo": { "comment": "Indicates the chat was migrated to the specified supergroup", "arguments": { "channel_id": "The supergroup it was migrated to" } }, "messageActionChannelCreate": { "comment": "The channel was created", "arguments": { "title": "Original channel/supergroup title" } }, "messageActionPinMessage": { "comment": "A message was pinned", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messageActionChatJoinedByLink": { "comment": "A user joined the chat via an invite link", "arguments": { "inviter_id": "ID of the user that created the invite link" } }, "messageActionChannelMigrateFrom": { "comment": "Indicates the channel was migrated from the specified chat", "arguments": { "title": "The old chat title", "chat_id": "The old chat ID" } }, "messageActionHistoryClear": { "comment": "Chat history was cleared", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messageActionGameScore": { "comment": "Someone scored in a game", "arguments": { "game_id": "Game ID", "score": "Score" } }, "messageActionPaymentSent": { "comment": "A payment was sent", "arguments": { "flags": "Flags, see TL conditional fields", "recurring_init": "Whether this is the first payment of a recurring payment we just subscribed to", "recurring_used": "Whether this payment is part of a recurring payment", "currency": "Three-letter ISO 4217 currency code, or XTR for Telegram Stars.", "total_amount": "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", "invoice_slug": "An invoice slug taken from an invoice deep link or from the premium_invoice_slug app config parameter »" } }, "messageActionPhoneCall": { "comment": "A phone call", "arguments": { "flags": "Flags, see TL conditional fields", "video": "Is this a video call?", "call_id": "Call ID", "reason": "If the call has ended, the reason why it ended", "duration": "Duration of the call in seconds" } }, "messageActionScreenshotTaken": { "comment": "A screenshot of the chat was taken", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messageActionCustomAction": { "comment": "Custom action (most likely not supported by the current layer, an upgrade might be needed)", "arguments": { "message": "Action message" } }, "messageActionBotAllowed": { "comment": "We have given the bot permission to send us direct messages.\n\nThe optional fields specify how did we authorize the bot to send us messages.", "arguments": { "flags": "Flags, see TL conditional fields", "attach_menu": "We have authorized the bot to send us messages by installing the bot's attachment menu.", "from_request": "We have allowed the bot to send us messages using {@link bots.RawAllowSendMessageRequest}.", "domain": "We have authorized the bot to send us messages by logging into a website via Telegram Login »; this field contains the domain name of the website on which the user has logged in.", "app": "We have authorized the bot to send us messages by opening the specified bot mini app." } }, "messageActionSecureValuesSentMe": { "comment": "Secure telegram passport values were received", "arguments": { "values": "Vector with information about documents and other Telegram Passport elements that were shared with the bot", "credentials": "Encrypted credentials required to decrypt the data" } }, "messageActionPaymentSentMe": { "comment": "A user just sent a payment to me (a bot)", "arguments": { "flags": "Flags, see TL conditional fields", "recurring_init": "Whether this is the first payment of a recurring payment we just subscribed to", "recurring_used": "Whether this payment is part of a recurring payment", "currency": "Three-letter ISO 4217 currency code, or XTR for Telegram Stars.", "total_amount": "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", "payload": "Bot specified invoice payload", "info": "Order info provided by the user", "shipping_option_id": "Identifier of the shipping option chosen by the user", "charge": "Provider payment identifier" } }, "messageActionSecureValuesSent": { "comment": "Request for secure telegram passport values was sent", "arguments": { "types": "Secure value types" } }, "messageActionContactSignUp": { "comment": "A contact just signed up to telegram", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messageActionGroupCall": { "comment": "The group call has ended", "arguments": { "flags": "Flags, see TL conditional fields", "call": "Group call", "duration": "Group call duration" } }, "messageActionInviteToGroupCall": { "comment": "A set of users was invited to the group call", "arguments": { "call": "The group call", "users": "The invited users" } }, "messageActionSetChatTheme": { "comment": "The chat theme was changed", "arguments": { "emoticon": "The emoji that identifies a chat theme" } }, "messageActionSetMessagesTTL": { "comment": "The Time-To-Live of messages in this chat was changed.", "arguments": { "flags": "Flags, see TL conditional fields", "period": "New Time-To-Live of all messages sent in this chat; if 0, autodeletion was disabled.", "auto_setting_from": "If set, the chat TTL setting was set not due to a manual change by one of participants, but automatically because one of the participants has the {@link messages.RawSetDefaultHistoryTTLRequest}. For example, when a user writes to us for the first time and we have set a default messages TTL of 1 week, this service message (with auto_setting_from=our_userid) will be emitted before our first message." } }, "messageActionGeoProximityReached": { "comment": "A user of the chat is now in proximity of another user", "arguments": { "from_id": "The user or chat that is now in proximity of to_id", "to_id": "The user or chat that subscribed to live geolocation proximity alerts", "distance": "Distance, in meters (0-100000)" } }, "messageActionWebViewDataSentMe": { "comment": "Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (bot side service message).", "arguments": { "text": "Text of the {@link RawKeyboardButtonSimpleWebView} that was pressed to open the web app.", "data": "Relayed data." } }, "messageActionGroupCallScheduled": { "comment": "A group call was scheduled", "arguments": { "call": "The group call", "schedule_date": "When is this group call scheduled to start" } }, "messageActionChatJoinedByRequest": { "comment": "A user was accepted into the group by an admin", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messageActionWebViewDataSent": { "comment": "Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (user side service message).\n\nClients should display a service message with the text Data from the «$text» button was transferred to the bot.", "arguments": { "text": "Text of the {@link RawKeyboardButtonSimpleWebView} that was pressed to open the web app." } }, "messageActionTopicCreate": { "comment": "A forum topic was created.", "arguments": { "flags": "Flags, see TL conditional fields", "title": "Topic name.", "icon_color": "If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F.", "icon_emoji_id": "ID of the custom emoji used as topic icon." } }, "messageActionGiftPremium": { "comment": "Info about a gifted Telegram Premium subscription", "arguments": { "flags": "Flags, see TL conditional fields", "currency": "Three-letter ISO 4217 currency code", "amount": "Price of the gift in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", "months": "Duration of the gifted Telegram Premium subscription", "crypto_currency": "If the gift was bought using a cryptocurrency, the cryptocurrency name.", "crypto_amount": "If the gift was bought using a cryptocurrency, price of the gift in the smallest units of a cryptocurrency." } }, "messageActionRequestedPeer": { "comment": "Contains info about one or more peers that the we (the user) shared with the bot after clicking on a {@link RawKeyboardButtonRequestPeer} button (service message sent by the user).", "arguments": { "button_id": "button_id contained in the {@link RawKeyboardButtonRequestPeer}", "peers": "The shared peers" } }, "messageActionSuggestProfilePhoto": { "comment": "A new profile picture was suggested using {@link photos.RawUploadContactProfilePhotoRequest}.", "arguments": { "photo": "The photo that the user suggested we set as profile picture." } }, "messageActionTopicEdit": { "comment": "Forum topic information was edited.", "arguments": { "flags": "Flags, see TL conditional fields", "title": "New topic title.", "icon_emoji_id": "ID of the new custom emoji used as topic icon, or if it was removed.", "closed": "Whether the topic was opened or closed.", "hidden": "Whether the topic was hidden or unhidden (only valid for the \"General\" topic, id=1)." } }, "messageActionSetChatWallPaper": { "comment": "The wallpaper » of the current chat was changed.", "arguments": { "flags": "Flags, see TL conditional fields", "same": "If set, indicates the user applied a wallpaper » previously sent by the other user in a {@link RawMessageActionSetChatWallPaper} message.", "for_both": "If set, indicates the wallpaper was forcefully applied for both sides, without explicit confirmation from the other side.
    If the message is incoming, and we did not like the new wallpaper the other user has chosen for us, we can re-set our previous wallpaper just on our side, by invoking {@link messages.RawSetChatWallPaperRequest}, providing only the revert flag (and obviously the peer parameter).", "wallpaper": "New wallpaper" } }, "messageActionGiftCode": { "comment": "Contains a Telegram Premium giftcode link.", "arguments": { "flags": "Flags, see TL conditional fields", "via_giveaway": "If set, this gift code was received from a giveaway » started by a channel/supergroup we're subscribed to.", "unclaimed": "If set, the link was not redeemed yet.", "boost_peer": "Identifier of the channel/supergroup that created the gift code either directly or through a giveaway: if we import this giftcode link, we will also automatically boost this channel/supergroup.", "months": "Duration in months of the gifted Telegram Premium subscription.", "slug": "Slug of the Telegram Premium giftcode link", "currency": "Three-letter ISO 4217 currency code", "amount": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", "crypto_currency": "If set, the gift was made using the specified cryptocurrency.", "crypto_amount": "If crypto_currency is set, contains the paid amount, in the smallest units of the cryptocurrency." } }, "messageActionBoostApply": { "comment": "Some boosts » were applied to the channel or supergroup.", "arguments": { "boosts": "Number of applied boosts." } }, "messageActionGiveawayLaunch": { "comment": "A giveaway was started.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messageActionRequestedPeerSentMe": { "comment": "Contains info about one or more peers that the a user shared with the me (the bot) after clicking on a {@link RawKeyboardButtonRequestPeer} button (service message received by the bot).", "arguments": { "button_id": "button_id contained in the {@link RawKeyboardButtonRequestPeer}", "peers": "Info about the shared peers." } }, "messageActionGiveawayResults": { "comment": "A giveaway has ended.", "arguments": { "winners_count": "Number of winners in the giveaway", "unclaimed_count": "Number of undistributed prizes" } }, "messageActionGiftStars": { "comment": "You gifted or were gifted some Telegram Stars.", "arguments": { "flags": "Flags, see TL conditional fields", "currency": "Three-letter ISO 4217 currency code", "amount": "Price of the gift in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", "stars": "Amount of gifted stars", "crypto_currency": "If the gift was bought using a cryptocurrency, the cryptocurrency name.", "crypto_amount": "If the gift was bought using a cryptocurrency, price of the gift in the smallest units of a cryptocurrency.", "transaction_id": "Identifier of the transaction, only visible to the receiver of the gift." } }, "messageActionPaymentRefunded": { "comment": "Describes a payment refund (service message received by both users and bots).", "arguments": { "flags": "Flags, see TL conditional fields", "peer": "Identifier of the peer that returned the funds.", "currency": "Currency, XTR for Telegram Stars.", "total_amount": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", "payload": "Bot specified invoice payload (only received by bots).", "charge": "Provider payment identifier" } }, "dialog": { "comment": "Chat", "arguments": { "flags": "Flags, see TL conditional fields", "pinned": "Is the dialog pinned", "unread_mark": "Whether the chat was manually marked as unread", "view_forum_as_messages": "Users may also choose to display messages from all topics of a forum as if they were sent to a normal group, using a \"View as messages\" setting in the local client.
    This setting only affects the current account, and is synced to other logged in sessions using the {@link channels.RawToggleViewForumAsMessagesRequest} method; invoking this method will update the value of this flag.", "peer": "The chat", "top_message": "The latest message ID", "read_inbox_max_id": "Position up to which all incoming messages are read.", "read_outbox_max_id": "Position up to which all outgoing messages are read.", "unread_count": "Number of unread messages", "unread_mentions_count": "Number of unread mentions", "unread_reactions_count": "Number of unread reactions to messages you sent", "notify_settings": "Notification settings", "pts": "PTS", "draft": "Message draft", "folder_id": "Peer folder ID, for more info click here", "ttl_period": "Time-to-live of all messages sent in this dialog" } }, "dialogFolder": { "comment": "Dialog in folder", "arguments": { "flags": "Flags, see TL conditional fields", "pinned": "Is this folder pinned", "folder": "The folder", "peer": "Peer in folder", "top_message": "Latest message ID of dialog", "unread_muted_peers_count": "Number of unread muted peers in folder", "unread_unmuted_peers_count": "Number of unread unmuted peers in folder", "unread_muted_messages_count": "Number of unread messages from muted peers in folder", "unread_unmuted_messages_count": "Number of unread messages from unmuted peers in folder" } }, "photoEmpty": { "comment": "Empty constructor, non-existent photo", "arguments": { "id": "Photo identifier" } }, "photo": { "comment": "Photo", "arguments": { "flags": "Flags, see TL conditional fields", "has_stickers": "Whether the photo has mask stickers attached to it", "id": "ID", "access_hash": "Access hash", "file_reference": "file reference", "date": "Date of upload", "sizes": "Available sizes for download", "video_sizes": "For animated profiles, the MPEG4 videos", "dc_id": "DC ID to use for download" } }, "photoSizeEmpty": { "comment": "Empty constructor. Image with this thumbnail is unavailable.", "arguments": { "type": "Thumbnail type »" } }, "photoStrippedSize": { "comment": "A low-resolution compressed JPG payload", "arguments": { "type": "Thumbnail type", "bytes": "Thumbnail data, see here for more info on decompression »" } }, "photoCachedSize": { "comment": "Description of an image and its content.", "arguments": { "type": "Thumbnail type", "w": "Image width", "h": "Image height", "bytes": "Binary data, file content" } }, "photoPathSize": { "comment": "Messages with animated stickers can have a compressed svg (< 300 bytes) to show the outline of the sticker before fetching the actual lottie animation.", "arguments": { "type": "Always j", "bytes": "Compressed SVG path payload, see here for decompression instructions" } }, "photoSizeProgressive": { "comment": "Progressively encoded photosize", "arguments": { "type": "Photosize type »", "w": "Photo width", "h": "Photo height", "sizes": "Sizes of progressive JPEG file prefixes, which can be used to preliminarily show the image." } }, "photoSize": { "comment": "Image description.", "arguments": { "type": "Thumbnail type »", "w": "Image width", "h": "Image height", "size": "File size" } }, "geoPointEmpty": { "comment": "Empty constructor.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "geoPoint": { "comment": "GeoPoint.", "arguments": { "flags": "Flags, see TL conditional fields", "long": "Longitude", "lat": "Latitude", "access_hash": "Access hash", "accuracy_radius": "The estimated horizontal accuracy of the location, in meters; as defined by the sender." } }, "auth.sentCode": { "comment": "Contains info about a sent verification code.", "arguments": { "flags": "Flags, see TL conditional fields", "type": "Phone code type", "phone_code_hash": "Phone code hash, to be stored and later re-used with {@link auth.RawSignInRequest}", "next_type": "Phone code type that will be sent next, if the phone code is not received within timeout seconds: to send it use {@link auth.RawResendCodeRequest}", "timeout": "Timeout for reception of the phone code" } }, "auth.sentCodeSuccess": { "comment": "The user successfully authorized using future auth tokens", "arguments": { "authorization": "Authorization info" } }, "inputNotifyPeer": { "comment": "Notifications generated by a certain user or group.", "arguments": { "peer": "User or group" } }, "auth.authorization": { "comment": "Contains user authorization info.", "arguments": { "flags": "Flags, see TL conditional fields", "setup_password_required": "Suggests the user to set up a 2-step verification password to be able to log in again", "otherwise_relogin_days": "Iff setup_password_required is set and the user declines to set a 2-step verification password, they will be able to log into their account via SMS again only after this many days pass.", "tmp_sessions": "Temporary passport sessions", "future_auth_token": "A future auth token", "user": "Info on authorized user" } }, "inputNotifyUsers": { "comment": "Notifications generated by all users.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "auth.exportedAuthorization": { "comment": "Data for copying of authorization between data centers.", "arguments": { "id": "current user identifier", "bytes": "authorizes key" } }, "auth.authorizationSignUpRequired": { "comment": "An account with this phone number doesn't exist on telegram: the user has to enter basic information and sign up", "arguments": { "flags": "Flags, see TL conditional fields", "terms_of_service": "Telegram's terms of service: the user must read and accept the terms of service before signing up to telegram" } }, "inputNotifyChats": { "comment": "Notifications generated by all groups.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputNotifyBroadcasts": { "comment": "All channels", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputNotifyForumTopic": { "comment": "Notifications generated by a topic in a forum.", "arguments": { "peer": "Forum ID", "top_msg_id": "Topic ID" } }, "inputPeerNotifySettings": { "comment": "Notification settings.", "arguments": { "flags": "Flags, see TL conditional fields", "show_previews": "If the text of the message shall be displayed in notification", "silent": "Peer was muted?", "mute_until": "Date until which all notifications shall be switched off", "sound": "Identifier of an audio file to play for notifications.", "stories_muted": "Whether story notifications should be disabled.", "stories_hide_sender": "Whether the sender name should be displayed in story notifications.", "stories_sound": "Identifier of an audio file to play for story notifications." } }, "peerSettings": { "comment": "List of actions that are possible when interacting with this user, to be shown as suggested actions in the chat action bar », see here » for more info.", "arguments": { "flags": "Flags, see TL conditional fields", "report_spam": "Whether we can still report the user for spam", "add_contact": "Whether we can add the user as contact", "block_contact": "Whether we can block the user", "share_contact": "Whether we can share the user's contact", "need_contacts_exception": "Whether a special exception for contacts is needed", "report_geo": "Whether we can report a geo group as irrelevant for this location", "autoarchived": "Whether this peer was automatically archived according to {@link RawGlobalPrivacySettings} and can be unarchived", "invite_members": "If set, this is a recently created group chat to which new members can be invited", "request_chat_broadcast": "This flag is set if request_chat_title and request_chat_date fields are set and the join request » is related to a channel (otherwise if only the request fields are set, the join request » is related to a chat).", "business_bot_paused": "This flag is set if both business_bot_id and business_bot_manage_url are set and all connected business bots » were paused in this chat using {@link account.RawToggleConnectedBotPausedRequest}.", "business_bot_can_reply": "This flag is set if both business_bot_id and business_bot_manage_url are set and connected business bots » can reply to messages in this chat, as specified by the settings during initial configuration.", "geo_distance": "Distance in meters between us and this peer", "request_chat_title": "If set, this is a private chat with an administrator of a chat or channel to which the user sent a join request, and this field contains the chat/channel's title.", "request_chat_date": "If set, this is a private chat with an administrator of a chat or channel to which the user sent a join request, and this field contains the timestamp when the join request » was sent.", "business_bot_id": "Contains the ID of the business bot » managing this chat, used to display info about the bot in the action bar.", "business_bot_manage_url": "Contains a deep link », used to open a management menu in the business bot. This flag is set if and only if business_bot_id is set." } }, "wallPaper": { "comment": "Represents a wallpaper based on an image.", "arguments": { "id": "Identifier", "flags": "Flags, see TL conditional fields", "creator": "Whether we created this wallpaper", "default": "Whether this is the default wallpaper", "pattern": "Whether this is a pattern wallpaper »", "dark": "Whether this wallpaper should be used in dark mode.", "access_hash": "Access hash", "slug": "Unique wallpaper ID, used when generating wallpaper links or importing wallpaper links.", "document": "The actual wallpaper", "settings": "Info on how to generate the wallpaper, according to these instructions »." } }, "peerNotifySettings": { "comment": "Notification settings.", "arguments": { "flags": "Flags, see TL conditional fields", "show_previews": "(Ternary value) If set, indicates whether or not to display previews of messages in notifications; otherwise the default behavior should be used.", "silent": "(Ternary value) If set, indicates whether to mute or unmute the peer; otherwise the default behavior should be used.", "mute_until": "Mute all notifications until this date", "ios_sound": "Notification sound for the official iOS application", "android_sound": "Notification sound for the official android application", "other_sound": "Notification sound for other applications", "stories_muted": "Whether story notifications should be disabled.", "stories_hide_sender": "Whether the sender name should be displayed in story notifications.", "stories_ios_sound": "Sound for story notifications on the official iOS application", "stories_android_sound": "Sound for story notifications on the official Android application", "stories_other_sound": "Sound for story notifications on other applications" } }, "wallPaperNoFile": { "comment": "Represents a wallpaper only based on colors/gradients.", "arguments": { "id": "Wallpaper ID", "flags": "Flags, see TL conditional fields", "default": "Whether this is the default wallpaper", "dark": "Whether this wallpaper should be used in dark mode.", "settings": "Info on how to generate the wallpaper." } }, "inputReportReasonSpam": { "comment": "Report for spam", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputReportReasonPornography": { "comment": "Report for pornography", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputReportReasonOther": { "comment": "Other", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputReportReasonViolence": { "comment": "Report for violence", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputReportReasonGeoIrrelevant": { "comment": "Report an irrelevant geo group", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputReportReasonIllegalDrugs": { "comment": "Report for illegal drugs", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputReportReasonFake": { "comment": "Report for impersonation", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputReportReasonCopyright": { "comment": "Report for copyrighted content", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "userFull": { "comment": "Extended user info\n\nWhen updating the local peer database », all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).", "arguments": { "flags": "Flags, see TL conditional fields", "blocked": "Whether you have blocked this user", "phone_calls_available": "Whether this user can make VoIP calls", "phone_calls_private": "Whether this user's privacy settings allow you to call them", "can_pin_message": "Whether you can pin messages in the chat with this user, you can do this only for a chat with yourself", "has_scheduled": "Whether scheduled messages are available", "video_calls_available": "Whether the user can receive video calls", "voice_messages_forbidden": "Whether this user doesn't allow sending voice messages in a private chat with them", "translations_disabled": "Whether the real-time chat translation popup should be hidden.", "stories_pinned_available": "Whether this user has some pinned stories.", "blocked_my_stories_from": "Whether we've blocked this user, preventing them from seeing our stories ».", "wallpaper_overridden": "Whether the other user has chosen a custom wallpaper for us using {@link messages.RawSetChatWallPaperRequest} and the for_both flag, see here » for more info.", "contact_require_premium": "If set, we cannot write to this user: subscribe to Telegram Premium to get permission to write to this user.
    To set this flag for ourselves invoke {@link account.RawSetGlobalPrivacySettingsRequest}, setting the settings.new_noncontact_peers_require_premium flag, see here » for more info.", "read_dates_private": "If set, we cannot fetch the exact read date of messages we send to this user using {@link messages.RawGetOutboxReadDateRequest}.
    The exact read date of messages might still be unavailable for other reasons, see {@link messages.RawGetOutboxReadDateRequest} for more info.
    To set this flag for ourselves invoke {@link account.RawSetGlobalPrivacySettingsRequest}, setting the settings.hide_read_marks flag.", "flags2": "Flags, see TL conditional fields", "sponsored_enabled": "Whether ads were re-enabled for the current account (only accessible to the currently logged-in user), see here » for more info.", "id": "User ID", "about": "Bio of the user", "settings": "Peer settings", "personal_photo": "Personal profile photo, to be shown instead of profile_photo.", "profile_photo": "Profile photo", "fallback_photo": "Fallback profile photo, displayed if no photo is present in profile_photo or personal_photo, due to privacy settings.", "notify_settings": "Notification settings", "bot_info": "For bots, info about the bot (bot commands, etc)", "pinned_msg_id": "Message ID of the last pinned message", "common_chats_count": "Chats in common with this user", "folder_id": "Peer folder ID, for more info click here", "ttl_period": "Time To Live of all messages in this chat; once a message is this many seconds old, it must be deleted.", "theme_emoticon": "Emoji associated with chat theme", "private_forward_name": "Anonymized text to be shown instead of the user's name on forwarded messages", "bot_group_admin_rights": "A suggested set of administrator rights for the bot, to be shown when adding the bot as admin to a group, see here for more info on how to handle them ».", "bot_broadcast_admin_rights": "A suggested set of administrator rights for the bot, to be shown when adding the bot as admin to a channel, see here for more info on how to handle them ».", "premium_gifts": "Telegram Premium subscriptions gift options", "wallpaper": "Wallpaper to use in the private chat with the user.", "stories": "Active stories »", "business_work_hours": "Telegram Business working hours ».", "business_location": "Telegram Business location ».", "business_greeting_message": "Telegram Business greeting message ».", "business_away_message": "Telegram Business away message ».", "business_intro": "Specifies a custom Telegram Business profile introduction ».", "birthday": "Contains info about the user's birthday ».", "personal_channel_id": "ID of the associated personal channel », that should be shown in the profile page.", "personal_channel_message": "ID of the latest message of the associated personal channel », that should be previewed in the profile page." } }, "contact": { "comment": "A contact of the current user that is registered in the system.", "arguments": { "user_id": "User identifier", "mutual": "Current user is in the user's contact list" } }, "inputReportReasonPersonalDetails": { "comment": "Report for divulgation of personal details", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputReportReasonChildAbuse": { "comment": "Report for child abuse", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "importedContact": { "comment": "Successfully imported contact.", "arguments": { "user_id": "User identifier", "client_id": "The contact's client identifier (passed to one of the InputContact constructors)" } }, "contacts.contactsNotModified": { "comment": "Contact list on the server is the same as the list on the client.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "contactStatus": { "comment": "Contact status: online / offline.", "arguments": { "user_id": "User identifier", "status": "Online status" } }, "contacts.contacts": { "comment": "The current user's contact list and info on users.", "arguments": { "contacts": "Contact list", "saved_count": "Number of contacts that were saved successfully", "users": "User list" } }, "contacts.importedContacts": { "comment": "Info on successfully imported contacts.", "arguments": { "imported": "List of successfully imported contacts", "popular_invites": "Popular contacts", "retry_contacts": "List of contact ids that could not be imported due to system limitation and will need to be imported at a later date.", "users": "List of users" } }, "contacts.blocked": { "comment": "Full list of blocked users.", "arguments": { "blocked": "List of blocked users", "chats": "Blocked chats", "users": "List of users" } }, "messages.dialogs": { "comment": "Full list of chats with messages and auxiliary data.", "arguments": { "dialogs": "List of chats", "messages": "List of last messages from each chat", "chats": "List of groups mentioned in the chats", "users": "List of users mentioned in messages and groups" } }, "contacts.blockedSlice": { "comment": "Incomplete list of blocked users.", "arguments": { "count": "Total number of elements in the list", "blocked": "List of blocked users", "chats": "Blocked chats", "users": "List of users" } }, "messages.dialogsSlice": { "comment": "Incomplete list of dialogs with messages and auxiliary data.", "arguments": { "count": "Total number of dialogs", "dialogs": "List of dialogs", "messages": "List of last messages from dialogs", "chats": "List of chats mentioned in dialogs", "users": "List of users mentioned in messages and chats" } }, "messages.dialogsNotModified": { "comment": "Dialogs haven't changed", "arguments": { "count": "Number of dialogs found server-side by the query" } }, "messages.messages": { "comment": "Full list of messages with auxiliary data.", "arguments": { "messages": "List of messages", "chats": "List of chats mentioned in dialogs", "users": "List of users mentioned in messages and chats" } }, "messages.messagesSlice": { "comment": "Incomplete list of messages and auxiliary data.", "arguments": { "flags": "Flags, see TL conditional fields", "inexact": "If set, indicates that the results may be inexact", "count": "Total number of messages in the list", "next_rate": "Rate to use in the offset_rate parameter in the next call to {@link messages.RawSearchGlobalRequest}", "offset_id_offset": "Indicates the absolute position of messages[0] within the total result set with count count.
    This is useful, for example, if the result was fetched using offset_id, and we need to display a progress/total counter (like photo 134 of 200, for all media in a chat, we could simply use photo ${offset_id_offset} of ${count}.", "messages": "List of messages", "chats": "List of chats mentioned in messages", "users": "List of users mentioned in messages and chats" } }, "messages.channelMessages": { "comment": "Channel messages", "arguments": { "flags": "Flags, see TL conditional fields", "inexact": "If set, returned results may be inexact", "pts": "Event count after generation", "count": "Total number of results were found server-side (may not be all included here)", "offset_id_offset": "Indicates the absolute position of messages[0] within the total result set with count count.
    This is useful, for example, if the result was fetched using offset_id, and we need to display a progress/total counter (like photo 134 of 200, for all media in a chat, we could simply use photo ${offset_id_offset} of ${count}.", "messages": "Found messages", "topics": "Forum topic information", "chats": "Chats", "users": "Users" } }, "messages.chats": { "comment": "List of chats with auxiliary data.", "arguments": { "chats": "List of chats" } }, "messages.messagesNotModified": { "comment": "No new messages matching the query were found", "arguments": { "count": "Number of results found server-side by the given query" } }, "messages.affectedHistory": { "comment": "Affected part of communication history with the user or in a chat.", "arguments": { "pts": "Number of events occurred in a text box", "pts_count": "Number of affected events", "offset": "If a parameter contains positive value, it is necessary to repeat the method call using the given value; during the proceeding of all the history the value itself shall gradually decrease" } }, "inputMessagesFilterPhotos": { "comment": "Filter for messages containing photos.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputMessagesFilterEmpty": { "comment": "Filter is absent.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputMessagesFilterDocument": { "comment": "Filter for messages containing documents.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messages.chatFull": { "comment": "Full info about a channel, supergroup, gigagroup or basic group.", "arguments": { "full_chat": "Full info", "chats": "Mentioned chats", "users": "Mentioned users" } }, "inputMessagesFilterPhotoVideo": { "comment": "Filter for messages containing photos or videos.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputMessagesFilterVideo": { "comment": "Filter for messages containing videos.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputMessagesFilterMusic": { "comment": "Return only messages containing audio files", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputMessagesFilterVoice": { "comment": "Return only messages containing voice notes", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputMessagesFilterPhoneCalls": { "comment": "Return only phone calls", "arguments": { "flags": "Flags, see TL conditional fields", "missed": "Return only missed phone calls" } }, "inputMessagesFilterUrl": { "comment": "Return only messages containing URLs", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputMessagesFilterGif": { "comment": "Return only messages containing gifs", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputMessagesFilterChatPhotos": { "comment": "Return only chat photo changes", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputMessagesFilterRoundVideo": { "comment": "Return only round videos", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputMessagesFilterRoundVoice": { "comment": "Return only round videos and voice notes", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputMessagesFilterMyMentions": { "comment": "Return only messages where the current user was mentioned.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputMessagesFilterContacts": { "comment": "Return only messages containing contacts", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputMessagesFilterGeo": { "comment": "Return only messages containing geolocations", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputMessagesFilterPinned": { "comment": "Fetch only pinned messages", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "updateNewMessage": { "comment": "New message in a private chat or in a basic group.", "arguments": { "message": "Message", "pts": "New quantity of actions in a message box", "pts_count": "Number of generated events" } }, "updateMessageID": { "comment": "Sent message with random_id client identifier was assigned an identifier.", "arguments": { "id": "id identifier of a respective Message", "random_id": "Previously transferred client random_id identifier" } }, "updateDeleteMessages": { "comment": "Messages were deleted.", "arguments": { "messages": "List of identifiers of deleted messages", "pts": "New quality of actions in a message box", "pts_count": "Number of generated events" } }, "updateChatUserTyping": { "comment": "The user is preparing a message in a group; typing, recording, uploading, etc. This update is valid for 6 seconds. If no further updates of this kind are received after 6 seconds, it should be considered that the user stopped doing whatever they were doing", "arguments": { "chat_id": "Group id", "from_id": "Peer that started typing (can be the chat itself, in case of anonymous admins).", "action": "Type of action" } }, "updateUserStatus": { "comment": "Contact status update.", "arguments": { "user_id": "User identifier", "status": "New status" } }, "updateUserTyping": { "comment": "The user is preparing a message; typing, recording, uploading, etc. This update is valid for 6 seconds. If no further updates of this kind are received after 6 seconds, it should be considered that the user stopped doing whatever they were doing", "arguments": { "user_id": "User id", "action": "Action type" } }, "updateChatParticipants": { "comment": "Composition of chat participants changed.", "arguments": { "participants": "Updated chat participants" } }, "updateNewAuthorization": { "comment": "A new session logged into the current user's account through an unknown device.", "arguments": { "flags": "Flags, see TL conditional fields", "unconfirmed": "Whether the session is unconfirmed, see here » for more info.", "hash": "Hash used for caching, for more info click here", "date": "Authorization date", "device": "Name of device, for example Android", "location": "Location, for example USA, NY (IP=1.2.3.4)" } }, "messages.chatsSlice": { "comment": "Partial list of chats, more would have to be fetched with pagination", "arguments": { "count": "Total number of results that were found server-side (not all are included in chats)", "chats": "Chats" } }, "updateUserName": { "comment": "Changes the user's first name, last name and username.", "arguments": { "user_id": "User identifier", "first_name": "New first name. Corresponds to the new value of real_first_name field of the {@link RawUserFull} constructor.", "last_name": "New last name. Corresponds to the new value of real_last_name field of the {@link RawUserFull} constructor.", "usernames": "Usernames." } }, "updateNewEncryptedMessage": { "comment": "New encrypted message.", "arguments": { "message": "Message", "qts": "New qts value, see updates » for more info." } }, "updateEncryptedChatTyping": { "comment": "Interlocutor is typing a message in an encrypted chat. Update period is 6 second. If upon this time there is no repeated update, it shall be considered that the interlocutor stopped typing.", "arguments": { "chat_id": "Chat ID" } }, "updateEncryptedMessagesRead": { "comment": "Communication history in an encrypted chat was marked as read.", "arguments": { "chat_id": "Chat ID", "max_date": "Maximum value of data for read messages", "date": "Time when messages were read" } }, "updateChatParticipantAdd": { "comment": "New group member.", "arguments": { "chat_id": "Group ID", "user_id": "ID of the new member", "inviter_id": "ID of the user, who added member to the group", "date": "When was the participant added", "version": "Chat version number" } }, "updateEncryption": { "comment": "Change of state in an encrypted chat.", "arguments": { "chat": "Encrypted chat", "date": "Date of change" } }, "updateChatParticipantDelete": { "comment": "A member has left the group.", "arguments": { "chat_id": "Group ID", "user_id": "ID of the user", "version": "Used in basic groups to reorder updates and make sure that all of them was received." } }, "updateDcOptions": { "comment": "Changes in the data center configuration options.", "arguments": { "dc_options": "New connection options" } }, "updateNotifySettings": { "comment": "Changes in notification settings.", "arguments": { "peer": "Notification source", "notify_settings": "New notification settings" } }, "updateServiceNotification": { "comment": "A service message for the user.\n\nThe app must show the message to the user upon receiving this update. In case the popup parameter was passed, the text message must be displayed in a popup alert immediately upon receipt. It is recommended to handle the text as you would an ordinary message in terms of highlighting links, etc. The message must also be stored locally as part of the message history with the user id 777000 (Telegram Notifications).", "arguments": { "flags": "Flags, see TL conditional fields", "popup": "If set, the message must be displayed in a popup.", "invert_media": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.", "inbox_date": "When was the notification received
    The message must also be stored locally as part of the message history with the user id 777000 (Telegram Notifications).", "type": "String, identical in format and contents to the type field in API errors. Describes type of service message. It is acceptable to ignore repeated messages of the same type within a short period of time (15 minutes).", "message": "Message text", "media": "Media content (optional)", "entities": "Message entities for styled text" } }, "updateReadHistoryInbox": { "comment": "Incoming messages were read", "arguments": { "flags": "Flags, see TL conditional fields", "folder_id": "Peer folder ID, for more info click here", "peer": "Peer", "max_id": "Maximum ID of messages read", "still_unread_count": "Number of messages that are still unread", "pts": "Event count after generation", "pts_count": "Number of events that were generated" } }, "updateUserPhone": { "comment": "A user's phone number was changed", "arguments": { "user_id": "User ID", "phone": "New phone number" } }, "updateReadHistoryOutbox": { "comment": "Outgoing messages were read", "arguments": { "peer": "Peer", "max_id": "Maximum ID of read outgoing messages", "pts": "Event count after generation", "pts_count": "Number of events that were generated" } }, "updateChannelTooLong": { "comment": "There are new updates in the specified channel, the client must fetch them.
    \nIf the difference is too long or if the channel isn't currently in the states, start fetching from the specified pts.", "arguments": { "flags": "Flags, see TL conditional fields", "channel_id": "The channel", "pts": "The PTS." } }, "updateWebPage": { "comment": "An instant view webpage preview was generated", "arguments": { "webpage": "Webpage preview", "pts": "Event count after generation", "pts_count": "Number of events that were generated" } }, "updateChannel": { "comment": "Channel/supergroup ({@link RawChannel} and/or {@link RawChannelFull}) information was updated.\n\nThis update can only be received through getDifference or in {@link RawUpdates}/{@link RawUpdatesCombined} constructors, so it will always come bundled with the updated {@link RawChannel}, that should be applied as usual », without re-fetching the info manually.\n\nHowever, full peer information will not come bundled in updates, so the full peer cache ({@link RawChannelFull}) must be invalidated for channel_id when receiving this update.", "arguments": { "channel_id": "Channel ID" } }, "updateReadChannelInbox": { "comment": "Incoming messages in a channel/supergroup were read", "arguments": { "flags": "Flags, see TL conditional fields", "folder_id": "Peer folder ID, for more info click here", "channel_id": "Channel/supergroup ID", "max_id": "Position up to which all incoming messages are read.", "still_unread_count": "Count of messages weren't read yet", "pts": "Event count after generation" } }, "updateNewChannelMessage": { "comment": "A new message was sent in a channel/supergroup", "arguments": { "message": "New message", "pts": "Event count after generation", "pts_count": "Number of events that were generated" } }, "updateDeleteChannelMessages": { "comment": "Some messages in a supergroup/channel were deleted", "arguments": { "channel_id": "Channel ID", "messages": "IDs of messages that were deleted", "pts": "Event count after generation", "pts_count": "Number of events that were generated" } }, "updateChatParticipantAdmin": { "comment": "Admin permissions of a user in a basic group were changed", "arguments": { "chat_id": "Chat ID", "user_id": "ID of the (de)admined user", "is_admin": "Whether the user was rendered admin", "version": "Used in basic groups to reorder updates and make sure that all of them was received." } }, "updateReadMessagesContents": { "comment": "Contents of messages in the common message box were read", "arguments": { "flags": "Flags, see TL conditional fields", "messages": "IDs of read messages", "pts": "Event count after generation", "pts_count": "Number of events that were generated", "date": "When was the last message in messages marked as read." } }, "updateSavedGifs": { "comment": "The saved gif list has changed, the client should refetch it using {@link messages.RawGetSavedGifsRequest}", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "updateStickerSets": { "comment": "Installed stickersets have changed, the client should refetch them as described in the docs.", "arguments": { "flags": "Flags, see TL conditional fields", "masks": "Whether mask stickersets have changed", "emojis": "Whether the list of installed custom emoji stickersets has changed" } }, "updateBotInlineSend": { "comment": "The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot.", "arguments": { "flags": "Flags, see TL conditional fields", "user_id": "The user that chose the result", "query": "The query that was used to obtain the result", "geo": "Optional. Sender location, only for bots that require user location", "id": "The unique identifier for the result that was chosen", "msg_id": "Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message." } }, "updateNewStickerSet": { "comment": "A new stickerset was installed", "arguments": { "stickerset": "The installed stickerset" } }, "updateChannelMessageViews": { "comment": "The view counter of a message in a channel has changed", "arguments": { "channel_id": "Channel ID", "id": "ID of the message", "views": "New view counter" } }, "updateStickerSetsOrder": { "comment": "The order of stickersets was changed", "arguments": { "flags": "Flags, see TL conditional fields", "masks": "Whether the updated stickers are mask stickers", "emojis": "Whether the updated stickers are custom emoji stickers", "order": "New sticker order by sticker ID" } }, "updateBotInlineQuery": { "comment": "An incoming inline query", "arguments": { "flags": "Flags, see TL conditional fields", "query_id": "Query ID", "user_id": "User that sent the query", "query": "Text of query", "geo": "Attached geolocation", "peer_type": "Type of the chat from which the inline query was sent.", "offset": "Offset to navigate through results" } }, "updateEditChannelMessage": { "comment": "A message was edited in a channel/supergroup", "arguments": { "message": "The new message", "pts": "Event count after generation", "pts_count": "Number of events that were generated" } }, "updateBotCallbackQuery": { "comment": "A callback button was pressed, and the button data was sent to the bot that created the button", "arguments": { "flags": "Flags, see TL conditional fields", "query_id": "Query ID", "user_id": "ID of the user that pressed the button", "peer": "Chat where the inline keyboard was sent", "msg_id": "Message ID", "chat_instance": "Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.", "data": "Callback data", "game_short_name": "Short name of a Game to be returned, serves as the unique identifier for the game" } }, "updateInlineBotCallbackQuery": { "comment": "This notification is received by bots when a button is pressed", "arguments": { "flags": "Flags, see TL conditional fields", "query_id": "Query ID", "user_id": "ID of the user that pressed the button", "msg_id": "ID of the inline message with the button", "chat_instance": "Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.", "data": "Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field.", "game_short_name": "Short name of a Game to be returned, serves as the unique identifier for the game" } }, "updateReadChannelOutbox": { "comment": "Outgoing messages in a channel/supergroup were read", "arguments": { "channel_id": "Channel/supergroup ID", "max_id": "Position up to which all outgoing messages are read." } }, "updateDraftMessage": { "comment": "Notifies a change of a message draft.", "arguments": { "flags": "Flags, see TL conditional fields", "peer": "The peer to which the draft is associated", "top_msg_id": "ID of the forum topic to which the draft is associated", "draft": "The draft" } }, "updateEditMessage": { "comment": "A message was edited", "arguments": { "message": "The new edited message", "pts": "PTS", "pts_count": "PTS count" } }, "updateReadFeaturedStickers": { "comment": "Some featured stickers were marked as read", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "updatePtsChanged": { "comment": "Common message box sequence PTS has changed, state has to be refetched using updates.getState", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "updateConfig": { "comment": "The server-side configuration has changed; the client should re-fetch the config using {@link help.RawGetConfigRequest} and {@link help.RawGetAppConfigRequest}.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "updateChannelWebPage": { "comment": "A webpage preview of a link in a channel/supergroup message was generated", "arguments": { "channel_id": "Channel/supergroup ID", "webpage": "Generated webpage preview", "pts": "Event count after generation", "pts_count": "Number of events that were generated" } }, "updateBotWebhookJSON": { "comment": "A new incoming event; for bots only", "arguments": { "data": "The event" } }, "updatePrivacy": { "comment": "Privacy rules were changed", "arguments": { "key": "Peers to which the privacy rules apply", "rules": "New privacy rules" } }, "updatePinnedDialogs": { "comment": "Pinned dialogs were updated", "arguments": { "flags": "Flags, see TL conditional fields", "folder_id": "Peer folder ID, for more info click here", "order": "New order of pinned dialogs" } }, "updateRecentStickers": { "comment": "The recent sticker list was updated", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "updateBotWebhookJSONQuery": { "comment": "A new incoming query; for bots only", "arguments": { "query_id": "Query identifier", "data": "Query data", "timeout": "Query timeout" } }, "updateDialogPinned": { "comment": "A dialog was pinned/unpinned", "arguments": { "flags": "Flags, see TL conditional fields", "pinned": "Whether the dialog was pinned", "folder_id": "Peer folder ID, for more info click here", "peer": "The dialog" } }, "updateBotPrecheckoutQuery": { "comment": "This object contains information about an incoming pre-checkout query.", "arguments": { "flags": "Flags, see TL conditional fields", "query_id": "Unique query identifier", "user_id": "User who sent the query", "payload": "Bot specified invoice payload", "info": "Order info provided by the user", "shipping_option_id": "Identifier of the shipping option chosen by the user", "currency": "Three-letter ISO 4217 currency code, or XTR for Telegram Stars.", "total_amount": "Total amount in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." } }, "updateBotShippingQuery": { "comment": "This object contains information about an incoming shipping query.", "arguments": { "query_id": "Unique query identifier", "user_id": "User who sent the query", "payload": "Bot specified invoice payload", "shipping_address": "User specified shipping address" } }, "updateLangPackTooLong": { "comment": "A language pack has changed, the client should manually fetch the changed strings using {@link langpack.RawGetDifferenceRequest}", "arguments": { "lang_code": "Language code" } }, "updatePhoneCall": { "comment": "An incoming phone call", "arguments": { "phone_call": "Phone call" } }, "updateLangPack": { "comment": "Language pack updated", "arguments": { "difference": "Changed strings" } }, "updateChannelReadMessagesContents": { "comment": "The specified channel/supergroup messages were read", "arguments": { "flags": "Flags, see TL conditional fields", "channel_id": "Channel/supergroup ID", "top_msg_id": "Forum topic ID.", "messages": "IDs of messages that were read" } }, "updateFavedStickers": { "comment": "The list of favorited stickers was changed, the client should call {@link messages.RawGetFavedStickersRequest} to refetch the new list", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "updateChannelAvailableMessages": { "comment": "The history of a channel/supergroup was hidden.", "arguments": { "channel_id": "Channel/supergroup ID", "available_min_id": "Identifier of a maximum unavailable message in a channel due to hidden history." } }, "updateContactsReset": { "comment": "All contacts were deleted", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "updateMessagePoll": { "comment": "The results of a poll have changed", "arguments": { "flags": "Flags, see TL conditional fields", "poll_id": "Poll ID", "poll": "If the server knows the client hasn't cached this poll yet, the poll itself", "results": "New poll results" } }, "updateChatDefaultBannedRights": { "comment": "Default banned rights in a normal chat were updated", "arguments": { "peer": "The chat", "default_banned_rights": "New default banned rights", "version": "Version" } }, "updateDialogUnreadMark": { "comment": "The manual unread mark of a chat was changed", "arguments": { "flags": "Flags, see TL conditional fields", "unread": "Was the chat marked or unmarked as read", "peer": "The dialog" } }, "updatePeerSettings": { "comment": "Settings of a certain peer have changed", "arguments": { "peer": "The peer", "settings": "Associated peer settings" } }, "updatePeerLocated": { "comment": "List of peers near you was updated", "arguments": { "peers": "Geolocated peer list update" } }, "updateNewScheduledMessage": { "comment": "A message was added to the schedule queue of a chat", "arguments": { "message": "Message" } }, "updateFolderPeers": { "comment": "The peer list of a peer folder was updated", "arguments": { "folder_peers": "New peer list", "pts": "Event count after generation", "pts_count": "Number of events that were generated" } }, "updateDeleteScheduledMessages": { "comment": "Some scheduled messages were deleted from the schedule queue of a chat", "arguments": { "peer": "Peer", "messages": "Deleted scheduled messages" } }, "updateTheme": { "comment": "A cloud theme was updated", "arguments": { "theme": "Theme" } }, "updateDialogFilter": { "comment": "A new folder was added", "arguments": { "flags": "Flags, see TL conditional fields", "id": "Folder ID", "filter": "Folder info" } }, "updateGeoLiveViewed": { "comment": "Live geo position message was viewed", "arguments": { "peer": "The user that viewed the live geo position", "msg_id": "Message ID of geo position message" } }, "updateLoginToken": { "comment": "A login token (for login via QR code) was accepted.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "updateMessagePollVote": { "comment": "A specific peer has voted in a poll", "arguments": { "poll_id": "Poll ID", "peer": "The peer that voted in the poll", "options": "Chosen option(s)", "qts": "New qts value, see updates » for more info." } }, "updateDialogFilterOrder": { "comment": "New folder order", "arguments": { "order": "Ordered folder IDs" } }, "updateDialogFilters": { "comment": "Clients should update folder info", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "updateChannelMessageForwards": { "comment": "The forward counter of a message in a channel has changed", "arguments": { "channel_id": "Channel ID", "id": "ID of the message", "forwards": "New forward counter" } }, "updateReadChannelDiscussionInbox": { "comment": "Incoming comments in a discussion thread were marked as read", "arguments": { "flags": "Flags, see TL conditional fields", "channel_id": "Discussion group ID", "top_msg_id": "ID of the group message that started the thread (message in linked discussion group)", "read_max_id": "Message ID of latest read incoming message for this thread", "broadcast_id": "If set, contains the ID of the channel that contains the post that started the comment thread in the discussion group (channel_id)", "broadcast_post": "If set, contains the ID of the channel post that started the comment thread" } }, "updatePeerBlocked": { "comment": "We blocked a peer, see here » for more info on blocklists.", "arguments": { "flags": "Flags, see TL conditional fields", "blocked": "Whether the peer was blocked or unblocked", "blocked_my_stories_from": "Whether the peer was added/removed to/from the story blocklist; if not set, this update affects the main blocklist, see here » for more info.", "peer_id": "The (un)blocked peer" } }, "updatePhoneCallSignalingData": { "comment": "Incoming phone call signaling payload", "arguments": { "phone_call_id": "Phone call ID", "data": "Signaling payload" } }, "updateReadChannelDiscussionOutbox": { "comment": "Outgoing comments in a discussion thread were marked as read", "arguments": { "channel_id": "Supergroup ID", "top_msg_id": "ID of the group message that started the thread", "read_max_id": "Message ID of latest read outgoing message for this thread" } }, "updatePinnedChannelMessages": { "comment": "Messages were pinned/unpinned in a channel/supergroup", "arguments": { "flags": "Flags, see TL conditional fields", "pinned": "Whether the messages were pinned or unpinned", "channel_id": "Channel ID", "messages": "Messages", "pts": "Event count after generation", "pts_count": "Number of events that were generated" } }, "updateChannelUserTyping": { "comment": "A user is typing in a supergroup, channel or message thread", "arguments": { "flags": "Flags, see TL conditional fields", "channel_id": "Channel ID", "top_msg_id": "Thread ID", "from_id": "The peer that is typing", "action": "Whether the user is typing, sending a media or doing something else" } }, "updatePinnedMessages": { "comment": "Some messages were pinned in a chat", "arguments": { "flags": "Flags, see TL conditional fields", "pinned": "Whether the messages were pinned or unpinned", "peer": "Peer", "messages": "Message IDs", "pts": "Event count after generation", "pts_count": "Number of events that were generated" } }, "updateChat": { "comment": "Chat ({@link RawChat} and/or {@link RawChatFull}) information was updated.\n\nThis update can only be received through getDifference or in {@link RawUpdates}/{@link RawUpdatesCombined} constructors, so it will always come bundled with the updated {@link RawChat}, that should be applied as usual », without re-fetching the info manually.\n\nHowever, full peer information will not come bundled in updates, so the full peer cache ({@link RawChatFull}) must be invalidated for chat_id when receiving this update.", "arguments": { "chat_id": "Chat ID" } }, "updateGroupCallParticipants": { "comment": "The participant list of a certain group call has changed", "arguments": { "call": "Group call", "participants": "New participant list", "version": "Version" } }, "updateChannelParticipant": { "comment": "A participant has left, joined, was banned or admined in a channel or supergroup.", "arguments": { "flags": "Flags, see TL conditional fields", "via_chatlist": "Whether the participant joined using a chat folder deep link ».", "channel_id": "Channel ID", "date": "Date of the event", "actor_id": "User that triggered the change (inviter, admin that kicked the user, or the even the user_id itself)", "user_id": "User that was affected by the change", "prev_participant": "Previous participant status", "new_participant": "New participant status", "invite": "Chat invite used to join the channel/supergroup", "qts": "New qts value, see updates » for more info." } }, "updateGroupCall": { "comment": "A new groupcall was started", "arguments": { "chat_id": "The channel/supergroup where this group call or livestream takes place", "call": "Info about the group call or livestream" } }, "updateBotStopped": { "comment": "A bot was stopped or re-started.", "arguments": { "user_id": "The user ID", "date": "When did this action occur", "stopped": "Whether the bot was stopped or started", "qts": "New qts value, see updates » for more info." } }, "updatePeerHistoryTTL": { "comment": "The Time-To-Live for messages sent by the current user in a specific chat has changed", "arguments": { "flags": "Flags, see TL conditional fields", "peer": "The chat", "ttl_period": "The new Time-To-Live" } }, "updateChatParticipant": { "comment": "A user has joined or left a specific chat", "arguments": { "flags": "Flags, see TL conditional fields", "chat_id": "Chat ID", "date": "When did this event occur", "actor_id": "User that triggered the change (inviter, admin that kicked the user, or the even the user_id itself)", "user_id": "User that was affected by the change", "prev_participant": "Previous participant info (empty if this participant just joined)", "new_participant": "New participant info (empty if this participant just left)", "invite": "The invite that was used to join the group", "qts": "New qts value, see updates » for more info." } }, "updateGroupCallConnection": { "comment": "New WebRTC parameters", "arguments": { "flags": "Flags, see TL conditional fields", "presentation": "Are these parameters related to the screen capture session currently in progress?", "params": "WebRTC parameters" } }, "updateBotCommands": { "comment": "The command set of a certain bot in a certain chat has changed.", "arguments": { "peer": "The affected chat", "bot_id": "ID of the bot that changed its command set", "commands": "New bot commands" } }, "updateMessageReactions": { "comment": "New message reactions » are available", "arguments": { "flags": "Flags, see TL conditional fields", "peer": "Peer", "msg_id": "Message ID", "top_msg_id": "Forum topic ID", "reactions": "Reactions" } }, "updateBotChatInviteRequester": { "comment": "Someone has requested to join a chat or channel (bots only, users will receive an {@link RawUpdatePendingJoinRequests}, instead)", "arguments": { "peer": "The chat or channel in question", "date": "When was the join request » made", "user_id": "The user ID that is asking to join the chat or channel", "about": "Bio of the user", "invite": "Chat invite link that was used by the user to send the join request »", "qts": "QTS event sequence identifier" } }, "updatePendingJoinRequests": { "comment": "Someone has requested to join a chat or channel", "arguments": { "peer": "Chat or channel", "requests_pending": "Number of pending join requests » for the chat or channel", "recent_requesters": "IDs of users that have recently requested to join" } }, "updateAttachMenuBots": { "comment": "The list of installed attachment menu entries » has changed, use {@link messages.RawGetAttachMenuBotsRequest} to fetch the updated list.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "updateBotMenuButton": { "comment": "The menu button behavior for the specified bot has changed", "arguments": { "bot_id": "Bot ID", "button": "New menu button" } }, "updateWebViewResultSent": { "comment": "Indicates to a bot that a webview was closed and an inline message was sent on behalf of the user using {@link messages.RawSendWebViewResultMessageRequest}", "arguments": { "query_id": "Web app interaction ID" } }, "updateSavedRingtones": { "comment": "The list of saved notification sounds has changed, use {@link account.RawGetSavedRingtonesRequest} to fetch the new list.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "updateRecentEmojiStatuses": { "comment": "The list of recent emoji statuses has changed", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "updateTranscribedAudio": { "comment": "A pending voice message transcription » initiated with {@link messages.RawTranscribeAudioRequest} was updated.", "arguments": { "flags": "Flags, see TL conditional fields", "pending": "Whether this transcription is still pending and further {@link RawUpdateTranscribedAudio} about it will be sent in the future.", "peer": "Peer of the transcribed message", "msg_id": "Transcribed message ID", "transcription_id": "Transcription ID", "text": "Transcribed text" } }, "updateUserEmojiStatus": { "comment": "The emoji status of a certain user has changed", "arguments": { "user_id": "User ID", "emoji_status": "New emoji status" } }, "updateReadFeaturedEmojiStickers": { "comment": "Some featured custom emoji stickers were marked as read", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "updateRecentReactions": { "comment": "The list of recent message reactions has changed", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "updateMoveStickerSetToTop": { "comment": "A stickerset was just moved to top, see here for more info »", "arguments": { "flags": "Flags, see TL conditional fields", "masks": "This update is referring to a mask stickerset", "emojis": "This update is referring to a custom emoji stickerset", "stickerset": "Stickerset ID" } }, "updateChannelPinnedTopics": { "comment": "The pinned topics of a forum have changed.", "arguments": { "flags": "Flags, see TL conditional fields", "channel_id": "Forum ID.", "order": "Ordered list containing the IDs of all pinned topics." } }, "updateUser": { "comment": "User ({@link RawUser} and/or {@link RawUserFull}) information was updated.\n\nThis update can only be received through getDifference or in {@link RawUpdates}/{@link RawUpdatesCombined} constructors, so it will always come bundled with the updated {@link RawUser}, that should be applied as usual », without re-fetching the info manually.\n\nHowever, full peer information will not come bundled in updates, so the full peer cache ({@link RawUserFull}) must be invalidated for user_id when receiving this update.", "arguments": { "user_id": "User ID" } }, "updateChannelPinnedTopic": { "comment": "A forum topic » was pinned or unpinned.", "arguments": { "flags": "Flags, see TL conditional fields", "pinned": "Whether the topic was pinned or unpinned", "channel_id": "The forum ID", "topic_id": "The topic ID" } }, "updateStory": { "comment": "A new story was posted.", "arguments": { "peer": "ID of the poster.", "story": "The story that was posted." } }, "updateAutoSaveSettings": { "comment": "Media autosave settings have changed and must be refetched using {@link account.RawGetAutoSaveSettingsRequest}.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "updateReadStories": { "comment": "Stories of a specific peer were marked as read.", "arguments": { "peer": "The peer", "max_id": "ID of the last story that was marked as read" } }, "updateStoryID": { "comment": "A story was successfully uploaded.\n\nOnce a story is successfully uploaded, an {@link RawUpdateStoryID} will be returned, indicating the story ID (id) that was attributed to the story (like for messages, random_id indicates the random_id that was passed to {@link stories.RawSendStoryRequest}: this way, you can tell which story was assigned a specific id by checking which {@link stories.RawSendStoryRequest} call has the returned random_id).", "arguments": { "id": "The id that was attributed to the story.", "random_id": "The random_id that was passed to {@link stories.RawSendStoryRequest}." } }, "updateStoriesStealthMode": { "comment": "Indicates that stories stealth mode was activated.", "arguments": { "stealth_mode": "Information about the current stealth mode session." } }, "updateSentStoryReaction": { "comment": "Indicates we reacted to a story ».", "arguments": { "peer": "The peer that sent the story", "story_id": "ID of the story we reacted to", "reaction": "The reaction that was sent" } }, "updateBotChatBoost": { "comment": "A channel/supergroup boost has changed (bots only)", "arguments": { "peer": "Channel", "boost": "New boost information", "qts": "QTS event sequence identifier" } }, "updateMessageExtendedMedia": { "comment": "You bought a paid media »: this update contains the revealed media.", "arguments": { "peer": "Peer where the paid media was posted", "msg_id": "ID of the message containing the paid media", "extended_media": "Revealed media, contains only {@link RawMessageExtendedMedia} constructors." } }, "updateChannelViewForumAsMessages": { "comment": "Users may also choose to display messages from all topics as if they were sent to a normal group, using a \"View as messages\" setting in the local client.
    \nThis setting only affects the current account, and is synced to other logged in sessions using the {@link channels.RawToggleViewForumAsMessagesRequest} method; invoking this method will update the value of the view_forum_as_messages flag of {@link RawChannelFull} or {@link RawDialog} and emit an {@link RawUpdateChannelViewForumAsMessages}.", "arguments": { "channel_id": "The forum ID", "enabled": "The new value of the toggle." } }, "updateSavedDialogPinned": { "comment": "A saved message dialog was pinned/unpinned", "arguments": { "flags": "Flags, see TL conditional fields", "pinned": "Whether the dialog was pinned", "peer": "The dialog" } }, "updatePinnedSavedDialogs": { "comment": "Pinned saved dialogs » were updated", "arguments": { "flags": "Flags, see TL conditional fields", "order": "New order of pinned saved dialogs" } }, "updateBotMessageReactions": { "comment": "Bots only: the number of reactions on a message with anonymous reactions has changed.", "arguments": { "peer": "Peer of the reacted-to message.", "msg_id": "ID of the reacted-to message.", "date": "Date of the change.", "reactions": "New reaction counters.", "qts": "QTS event sequence identifier" } }, "updateSavedReactionTags": { "comment": "The list of reaction tag » names assigned by the user has changed and should be refetched using {@link messages.RawGetSavedReactionTagsRequest}.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "updateBotMessageReaction": { "comment": "Bots only: a user has changed their reactions on a message with public reactions.", "arguments": { "peer": "Peer of the reacted-to message.", "msg_id": "ID of the reacted-to message.", "date": "Date of the change.", "actor": "The user that (un)reacted to the message.", "old_reactions": "Old reactions", "new_reactions": "New reactions", "qts": "QTS event sequence identifier" } }, "updatePeerWallpaper": { "comment": "The wallpaper » of a given peer has changed.", "arguments": { "flags": "Flags, see TL conditional fields", "wallpaper_overridden": "Whether the other user has chosen a custom wallpaper for us using {@link messages.RawSetChatWallPaperRequest} and the for_both flag, see here » for more info.", "peer": "The peer where the wallpaper has changed.", "wallpaper": "The new wallpaper, if none the wallpaper was removed and the default wallpaper should be used." } }, "updateSmsJob": { "comment": "A new SMS job was received", "arguments": { "job_id": "SMS job ID" } }, "updateQuickReplies": { "comment": "Info about or the order of quick reply shortcuts » was changed.", "arguments": { "quick_replies": "New quick reply shortcut order and information." } }, "updateNewQuickReply": { "comment": "A new quick reply shortcut » was created.", "arguments": { "quick_reply": "Quick reply shortcut." } }, "updateQuickReplyMessage": { "comment": "A new message was added to a quick reply shortcut ».", "arguments": { "message": "The message that was added (the {@link RawMessage}.quick_reply_shortcut_id field will contain the shortcut ID)." } }, "updateDeleteQuickReply": { "comment": "A quick reply shortcut » was deleted. This will not emit {@link RawUpdateDeleteQuickReplyMessages} updates, even if all the messages in the shortcut are also deleted by this update.", "arguments": { "shortcut_id": "ID of the quick reply shortcut that was deleted." } }, "updateDeleteQuickReplyMessages": { "comment": "One or more messages in a quick reply shortcut » were deleted.", "arguments": { "shortcut_id": "Quick reply shortcut ID.", "messages": "IDs of the deleted messages." } }, "updateBotNewBusinessMessage": { "comment": "A message was received via a connected business chat ».", "arguments": { "flags": "Flags, see TL conditional fields", "connection_id": "Connection ID.", "message": "New message.", "reply_to_message": "The message that message is replying to.", "qts": "New qts value, see updates » for more info." } }, "updateBotEditBusinessMessage": { "comment": "A message was edited in a connected business chat ».", "arguments": { "flags": "Flags, see TL conditional fields", "connection_id": "Business connection ID", "message": "New message.", "reply_to_message": "The message that message is replying to.", "qts": "New qts value, see updates » for more info." } }, "updateBotDeleteBusinessMessage": { "comment": "A message was deleted in a connected business chat ».", "arguments": { "connection_id": "Business connection ID.", "peer": "Peer where the messages were deleted.", "messages": "IDs of the messages that were deleted.", "qts": "New qts value, see updates » for more info." } }, "updateBotBusinessConnect": { "comment": "Connecting or disconnecting a business bot or changing the connection settings will emit an {@link RawUpdateBotBusinessConnect} update to the bot, with the new settings and a connection_id that will be used by the bot to handle updates from and send messages as the user.", "arguments": { "connection": "Business connection settings", "qts": "New qts value, see updates » for more info." } }, "updateNewStoryReaction": { "comment": "Represents a new reaction to a story.", "arguments": { "story_id": "Story ID.", "peer": "The peer where the story was posted.", "reaction": "The reaction." } }, "updateBroadcastRevenueTransactions": { "comment": "A new channel ad revenue transaction was made, see here » for more info.", "arguments": { "peer": "Channel", "balances": "New ad revenue balance." } }, "updateStarsBalance": { "comment": "The current account's Telegram Stars balance » has changed.", "arguments": { "balance": "New balance." } }, "updateBusinessBotCallbackQuery": { "comment": "A callback button sent via a business connection was pressed, and the button data was sent to the bot that created the button.", "arguments": { "flags": "Flags, see TL conditional fields", "query_id": "Query ID", "user_id": "ID of the user that pressed the button", "connection_id": "Business connection ID", "message": "Message that contains the keyboard (also contains info about the chat where the message was sent).", "reply_to_message": "The message that message is replying to.", "chat_instance": "Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.", "data": "Callback data" } }, "updates.difference": { "comment": "Full list of occurred events.", "arguments": { "new_messages": "List of new messages", "new_encrypted_messages": "List of new encrypted secret chat messages", "other_updates": "List of updates", "chats": "List of chats mentioned in events", "users": "List of users mentioned in events", "state": "Current state" } }, "updates.state": { "comment": "Updates state.", "arguments": { "pts": "Number of events occurred in a text box", "qts": "Position in a sequence of updates in secret chats. For further details refer to article secret chats", "date": "Date of condition", "seq": "Number of sent updates", "unread_count": "Number of unread messages" } }, "updates.differenceEmpty": { "comment": "No events.", "arguments": { "date": "Current date", "seq": "Number of sent updates" } }, "updateStarsRevenueStatus": { "comment": "The Telegram Star balance of a channel/bot we own has changed ».", "arguments": { "peer": "Channel/bot", "status": "New Telegram Star balance." } }, "updates.differenceSlice": { "comment": "Incomplete list of occurred events.", "arguments": { "new_messages": "List of new messages", "new_encrypted_messages": "New messages from the encrypted event sequence", "other_updates": "List of updates", "chats": "List of chats mentioned in events", "users": "List of users mentioned in events", "intermediate_state": "Intermediary state" } }, "updatesTooLong": { "comment": "Too many updates, it is necessary to execute {@link updates.RawGetDifferenceRequest}.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "updateShort": { "comment": "Shortened constructor containing info on one update not requiring auxiliary data", "arguments": { "update": "Update", "date": "Date of event" } }, "updates.differenceTooLong": { "comment": "The difference is too long, and the specified state must be used to refetch updates.", "arguments": { "pts": "The new state to use." } }, "updatesCombined": { "comment": "Constructor for a group of updates.", "arguments": { "updates": "List of updates", "users": "List of users mentioned in updates", "chats": "List of chats mentioned in updates", "date": "Current date", "seq_start": "Value seq for the earliest update in a group", "seq": "Value seq for the latest update in a group" } }, "updates": { "comment": "Full constructor of updates", "arguments": { "updates": "List of updates", "users": "List of users mentioned in updates", "chats": "List of chats mentioned in updates", "date": "Current date", "seq": "Total number of sent updates" } }, "updateShortSentMessage": { "comment": "Shortened constructor containing info on one outgoing message to a contact (the destination chat has to be extracted from the method call that returned this object).", "arguments": { "flags": "Flags, see TL conditional fields", "out": "Whether the message is outgoing", "id": "ID of the sent message", "pts": "PTS", "pts_count": "PTS count", "date": "date", "media": "Attached media", "entities": "Entities for styled text", "ttl_period": "Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well." } }, "updateShortChatMessage": { "comment": "Shortened constructor containing info on one new incoming text message from a chat", "arguments": { "flags": "Flags, see TL conditional fields", "out": "Whether the message is outgoing", "mentioned": "Whether we were mentioned in this message", "media_unread": "Whether the message contains some unread mentions", "silent": "If true, the message is a silent message, no notifications should be triggered", "id": "ID of the message", "from_id": "ID of the sender of the message", "chat_id": "ID of the chat where the message was sent", "message": "Message", "pts": "PTS", "pts_count": "PTS count", "date": "date", "fwd_from": "Info about a forwarded message", "via_bot_id": "Info about the inline bot used to generate this message", "reply_to": "Reply (thread) information", "entities": "Entities for styled text", "ttl_period": "Time To Live of the message, once updateShortChatMessage.date+updateShortChatMessage.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well." } }, "photos.photos": { "comment": "Full list of photos with auxiliary data.", "arguments": { "photos": "List of photos", "users": "List of mentioned users" } }, "photos.photosSlice": { "comment": "Incomplete list of photos with auxiliary data.", "arguments": { "count": "Total number of photos", "photos": "List of photos", "users": "List of mentioned users" } }, "photos.photo": { "comment": "Photo with auxiliary data.", "arguments": { "photo": "Photo", "users": "Users" } }, "upload.file": { "comment": "File content.", "arguments": { "type": "File type", "mtime": "Modification time", "bytes": "Binary data, file content" } }, "updateShortMessage": { "comment": "Info about a message sent to (received from) another user", "arguments": { "flags": "Flags, see TL conditional fields", "out": "Whether the message is outgoing", "mentioned": "Whether we were mentioned in the message", "media_unread": "Whether there are some unread mentions in this message", "silent": "If true, the message is a silent message, no notifications should be triggered", "id": "The message ID", "user_id": "The ID of the sender (if outgoing will be the ID of the destination) of the message", "message": "The message", "pts": "PTS", "pts_count": "PTS count", "date": "date", "fwd_from": "Info about a forwarded message", "via_bot_id": "Info about the inline bot used to generate this message", "reply_to": "Reply and thread information", "entities": "Entities for styled text", "ttl_period": "Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well." } }, "dcOption": { "comment": "Data center", "arguments": { "flags": "Flags, see TL conditional fields", "ipv6": "Whether the specified IP is an IPv6 address", "media_only": "Whether this DC should only be used to download or upload files", "tcpo_only": "Whether this DC only supports connection with transport obfuscation", "cdn": "Whether this is a CDN DC.", "static": "If set, this IP should be used when connecting through a proxy", "this_port_only": "If set, clients must connect using only the specified port, without trying any other port.", "id": "DC ID", "ip_address": "IP address of DC", "port": "Port", "secret": "If the tcpo_only flag is set, specifies the secret to use when connecting using transport obfuscation" } }, "nearestDc": { "comment": "Nearest data center, according to geo-ip.", "arguments": { "country": "Country code determined by geo-ip", "this_dc": "Number of current data center", "nearest_dc": "Number of nearest data center" } }, "upload.fileCdnRedirect": { "comment": "The file must be downloaded from a CDN DC.", "arguments": { "dc_id": "CDN DC ID", "file_token": "File token (see CDN files)", "encryption_key": "Encryption key (see CDN files)", "encryption_iv": "Encryption IV (see CDN files)", "file_hashes": "File hashes (see CDN files)" } }, "config": { "comment": "Current configuration", "arguments": { "flags": "Flags, see TL conditional fields", "default_p2p_contacts": "Whether the client should use P2P by default for phone calls with contacts", "preload_featured_stickers": "Whether the client should preload featured stickers", "revoke_pm_inbox": "Whether incoming private messages can be deleted for both participants", "blocked_mode": "Indicates that telegram is probably censored by governments/ISPs in the current region", "force_try_ipv6": "Whether to forcefully connect using IPv6 dcOptions, even if the client knows that IPv4 is available.", "date": "Current date at the server", "expires": "Expiration date of this config: when it expires it'll have to be refetched using {@link help.RawGetConfigRequest}", "test_mode": "Whether we're connected to the test DCs", "this_dc": "ID of the DC that returned the reply", "dc_options": "DC IP list", "dc_txt_domain_name": "Domain name for fetching encrypted DC list from DNS TXT record", "chat_size_max": "Maximum member count for normal groups", "megagroup_size_max": "Maximum member count for supergroups", "forwarded_count_max": "Maximum number of messages that can be forwarded at once using {@link messages.RawForwardMessagesRequest}.", "online_update_period_ms": "The client should {@link account.RawUpdateStatusRequest} every N milliseconds", "offline_blur_timeout_ms": "Delay before offline status needs to be sent to the server", "offline_idle_timeout_ms": "Time without any user activity after which it should be treated offline", "online_cloud_timeout_ms": "If we are offline, but were online from some other client in last online_cloud_timeout_ms milliseconds after we had gone offline, then delay offline notification for notify_cloud_delay_ms milliseconds.", "notify_cloud_delay_ms": "If we are offline, but online from some other client then delay sending the offline notification for notify_cloud_delay_ms milliseconds.", "notify_default_delay_ms": "If some other client is online, then delay notification for notification_default_delay_ms milliseconds", "push_chat_period_ms": "Not for client use", "push_chat_limit": "Not for client use", "edit_time_limit": "Only messages with age smaller than the one specified can be edited", "revoke_time_limit": "Only channel/supergroup messages with age smaller than the specified can be deleted", "revoke_pm_time_limit": "Only private messages with age smaller than the specified can be deleted", "rating_e_decay": "Exponential decay rate for computing top peer rating", "stickers_recent_limit": "Maximum number of recent stickers", "channels_read_media_period": "Indicates that round videos (video notes) and voice messages sent in channels and older than the specified period must be marked as read", "tmp_sessions": "Temporary passport sessions", "call_receive_timeout_ms": "Maximum allowed outgoing ring time in VoIP calls: if the user we're calling doesn't reply within the specified time (in milliseconds), we should hang up the call", "call_ring_timeout_ms": "Maximum allowed incoming ring time in VoIP calls: if the current user doesn't reply within the specified time (in milliseconds), the call will be automatically refused", "call_connect_timeout_ms": "VoIP connection timeout: if the instance of libtgvoip on the other side of the call doesn't connect to our instance of libtgvoip within the specified time (in milliseconds), the call must be aborted", "call_packet_timeout_ms": "If during a VoIP call a packet isn't received for the specified period of time, the call must be aborted", "me_url_prefix": "The domain to use to parse deep links ».", "autoupdate_url_prefix": "URL to use to auto-update the current app", "gif_search_username": "Username of the bot to use to search for GIFs", "venue_search_username": "Username of the bot to use to search for venues", "img_search_username": "Username of the bot to use for image search", "static_maps_provider": "ID of the map provider to use for venues", "caption_length_max": "Maximum length of caption (length in utf8 codepoints)", "message_length_max": "Maximum length of messages (length in utf8 codepoints)", "webfile_dc_id": "DC ID to use to download webfiles", "suggested_lang_code": "Suggested language code", "lang_pack_version": "Language pack version", "base_lang_pack_version": "Basic language pack version", "reactions_default": "Default message reaction", "autologin_token": "Autologin token, click here for more info on URL authorization »." } }, "help.noAppUpdate": { "comment": "No updates are available for the application.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "help.inviteText": { "comment": "Text of a text message with an invitation to install Telegram.", "arguments": { "message": "Text of the message" } }, "help.appUpdate": { "comment": "An update is available for the application.", "arguments": { "flags": "Flags, see TL conditional fields", "can_not_skip": "Unskippable, the new info must be shown to the user (with a popup or something else)", "id": "Update ID", "version": "New version name", "text": "Text description of the update", "entities": "Message entities for styled text", "document": "Application binary", "url": "Application download URL", "sticker": "Associated sticker" } }, "inputEncryptedFile": { "comment": "Sets forwarded encrypted file for attachment.", "arguments": { "id": "File ID, value of id parameter from {@link RawEncryptedFile}", "access_hash": "Checking sum, value of access_hash parameter from {@link RawEncryptedFile}" } }, "inputEncryptedFileUploaded": { "comment": "Sets new encrypted file saved by parts using upload.saveFilePart method.", "arguments": { "id": "Random file ID created by client", "parts": "Number of saved parts", "md5_checksum": "In case md5-HASH of the (already encrypted) file was transmitted, file content will be checked prior to use", "key_fingerprint": "32-bit fingerprint of the key used to encrypt a file" } }, "inputEncryptedFileEmpty": { "comment": "Empty constructor.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "encryptedChatRequested": { "comment": "Request to create an encrypted chat.", "arguments": { "flags": "Flags, see TL conditional fields", "folder_id": "Peer folder ID, for more info click here", "id": "Chat ID", "access_hash": "Check sum depending on user ID", "date": "Chat creation date", "admin_id": "Chat creator ID", "participant_id": "ID of second chat participant", "g_a": "A = g ^ a mod p, see Wikipedia" } }, "encryptedChatDiscarded": { "comment": "Discarded or deleted chat.", "arguments": { "flags": "Flags, see TL conditional fields", "history_deleted": "Whether both users of this secret chat should also remove all of its messages", "id": "Chat ID" } }, "messages.dhConfigNotModified": { "comment": "Configuring parameters did not change.", "arguments": { "random": "Random sequence of bytes of assigned length" } }, "encryptedChatEmpty": { "comment": "Empty constructor.", "arguments": { "id": "Chat ID" } }, "inputEncryptedFileBigUploaded": { "comment": "Assigns a new big encrypted file (over 10 MB in size), saved in parts using the method {@link upload.RawSaveBigFilePartRequest}.", "arguments": { "id": "Random file id, created by the client", "parts": "Number of saved parts", "key_fingerprint": "32-bit imprint of the key used to encrypt the file" } }, "encryptedMessage": { "comment": "Encrypted message.", "arguments": { "random_id": "Random message ID, assigned by the author of message", "chat_id": "ID of encrypted chat", "date": "Date of sending", "bytes": "TL-serialization of DecryptedMessage type, encrypted with the key created at chat initialization", "file": "Attached encrypted file" } }, "encryptedFileEmpty": { "comment": "Empty constructor, non-existing file.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "encryptedMessageService": { "comment": "Encrypted service message", "arguments": { "random_id": "Random message ID, assigned by the author of message", "chat_id": "ID of encrypted chat", "date": "Date of sending", "bytes": "TL-serialization of the DecryptedMessage type, encrypted with the key created at chat initialization" } }, "encryptedChat": { "comment": "Encrypted chat", "arguments": { "id": "Chat ID", "access_hash": "Check sum dependent on the user ID", "date": "Date chat was created", "admin_id": "Chat creator ID", "participant_id": "ID of the second chat participant", "g_a_or_b": "B = g ^ b mod p, if the currently authorized user is the chat's creator,
    or A = g ^ a mod p otherwise
    See Wikipedia for more info", "key_fingerprint": "64-bit fingerprint of received key" } }, "encryptedFile": { "comment": "Encrypted file.", "arguments": { "id": "File ID", "access_hash": "Checking sum depending on user ID", "size": "File size in bytes", "dc_id": "Number of data center", "key_fingerprint": "32-bit fingerprint of key used for file encryption" } }, "messages.dhConfig": { "comment": "New set of configuring parameters.", "arguments": { "g": "New value prime, see Wikipedia", "p": "New value primitive root, see Wikipedia", "version": "Version of set of parameters", "random": "Random sequence of bytes of assigned length" } }, "inputEncryptedChat": { "comment": "Creates an encrypted chat.", "arguments": { "chat_id": "Chat ID", "access_hash": "Checking sum from constructor {@link RawEncryptedChat}, {@link RawEncryptedChatWaiting} or {@link RawEncryptedChatRequested}" } }, "encryptedChatWaiting": { "comment": "Chat waiting for approval of second participant.", "arguments": { "id": "Chat ID", "access_hash": "Checking sum depending on user ID", "date": "Date of chat creation", "admin_id": "Chat creator ID", "participant_id": "ID of second chat participant" } }, "messages.sentEncryptedMessage": { "comment": "Message without file attachments sent to an encrypted file.", "arguments": { "date": "Date of sending" } }, "messages.sentEncryptedFile": { "comment": "Message with a file enclosure sent to a protected chat", "arguments": { "date": "Sending date", "file": "Attached file" } }, "document": { "comment": "Document", "arguments": { "flags": "Flags, see TL conditional fields", "id": "Document ID", "access_hash": "Check sum, dependent on document ID", "file_reference": "File reference", "date": "Creation date", "mime_type": "MIME type", "size": "Size", "thumbs": "Thumbnails", "video_thumbs": "Video thumbnails", "dc_id": "DC ID", "attributes": "Attributes" } }, "documentEmpty": { "comment": "Empty constructor, document doesn't exist.", "arguments": { "id": "Document ID or 0" } }, "inputDocument": { "comment": "Defines a document for subsequent interaction.", "arguments": { "id": "Document ID", "access_hash": "access_hash parameter from the {@link RawDocument} constructor", "file_reference": "File reference" } }, "notifyPeer": { "comment": "Notifications generated by a certain user or group.", "arguments": { "peer": "user or group" } }, "notifyChats": { "comment": "Notifications generated by all groups.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "notifyForumTopic": { "comment": "Notifications generated by a topic in a forum.", "arguments": { "peer": "Forum ID", "top_msg_id": "Topic ID" } }, "notifyBroadcasts": { "comment": "Channel notification settings", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputDocumentEmpty": { "comment": "Empty constructor.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "notifyUsers": { "comment": "Notifications generated by all users.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "sendMessageCancelAction": { "comment": "Invalidate all previous action updates. E.g. when user deletes entered text or aborts a video upload.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "sendMessageRecordVideoAction": { "comment": "User is recording a video.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "sendMessageTypingAction": { "comment": "User is typing.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "help.support": { "comment": "Info on support user.", "arguments": { "phone_number": "Phone number", "user": "User" } }, "sendMessageUploadVideoAction": { "comment": "User is uploading a video.", "arguments": { "progress": "Progress percentage" } }, "sendMessageRecordAudioAction": { "comment": "User is recording a voice message.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "sendMessageUploadDocumentAction": { "comment": "User is uploading a file.", "arguments": { "progress": "Progress percentage" } }, "sendMessageUploadAudioAction": { "comment": "User is uploading a voice message.", "arguments": { "progress": "Progress percentage" } }, "sendMessageUploadPhotoAction": { "comment": "User is uploading a photo.", "arguments": { "progress": "Progress percentage" } }, "sendMessageGeoLocationAction": { "comment": "User is selecting a location to share.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "sendMessageChooseContactAction": { "comment": "User is selecting a contact to share.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "speakingInGroupCallAction": { "comment": "User is currently speaking in the group call", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "sendMessageGamePlayAction": { "comment": "User is playing a game", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "sendMessageUploadRoundAction": { "comment": "User is uploading a round video", "arguments": { "progress": "Progress percentage" } }, "sendMessageEmojiInteractionSeen": { "comment": "User is watching an animated emoji reaction triggered by another user, click here for more info ».", "arguments": { "emoticon": "Emoji" } }, "sendMessageHistoryImportAction": { "comment": "Chat history is being imported", "arguments": { "progress": "Progress percentage" } }, "sendMessageChooseStickerAction": { "comment": "User is choosing a sticker", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "sendMessageEmojiInteraction": { "comment": "User has clicked on an animated emoji triggering a reaction, click here for more info ».", "arguments": { "emoticon": "Emoji", "msg_id": "Message ID of the animated emoji that was clicked", "interaction": "A JSON object with interaction info, click here for more info »" } }, "contacts.found": { "comment": "Users found by name substring and auxiliary data.", "arguments": { "my_results": "Personalized results", "results": "List of found user identifiers", "chats": "Found chats", "users": "List of users" } }, "inputPrivacyKeyStatusTimestamp": { "comment": "Whether people will be able to see our exact last online timestamp.\n\nNote that if we decide to hide our exact last online timestamp to someone (i.e., users A, B, C, or all users) and we do not have a Premium subscription, we won't be able to see the exact last online timestamp of those users (A, B, C, or all users), even if those users do share it with us.\n\nIf those users do share their exact online status with us, but we can't see it due to the reason mentioned above, the by_me flag of {@link RawUserStatusRecently}, {@link RawUserStatusLastWeek}, {@link RawUserStatusLastMonth} will be set.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputPrivacyKeyPhoneCall": { "comment": "Whether you will accept phone calls", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputPrivacyKeyChatInvite": { "comment": "Whether people will be able to invite you to chats", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputPrivacyKeyProfilePhoto": { "comment": "Whether people will be able to see your profile picture", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputPrivacyKeyPhoneNumber": { "comment": "Whether people will be able to see your phone number", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputPrivacyKeyPhoneP2P": { "comment": "Whether to allow P2P communication during VoIP calls", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputPrivacyKeyAddedByPhone": { "comment": "Whether people can add you to their contact list by your phone number", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputPrivacyKeyForwards": { "comment": "Whether messages forwarded from you will be anonymous", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputPrivacyKeyVoiceMessages": { "comment": "Whether people can send you voice messages or round videos (Premium users only).", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "privacyKeyStatusTimestamp": { "comment": "Whether we can see the last online timestamp of this user.\n\nNote that if we decide to hide our exact last online timestamp to someone (i.e., users A, B, C, or all users) and we do not have a Premium subscription, we won't be able to see the exact last online timestamp of those users (A, B, C, or all users), even if those users do share it with us.\n\nIf those users do share their exact online status with us, but we can't see it due to the reason mentioned above, the by_me flag of {@link RawUserStatusRecently}, {@link RawUserStatusLastWeek}, {@link RawUserStatusLastMonth} will be set.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputPrivacyKeyAbout": { "comment": "Whether people can see your bio", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "sendMessageRecordRoundAction": { "comment": "User is recording a round video to share", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputPrivacyKeyBirthday": { "comment": "Whether the user can see our birthday.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "privacyKeyChatInvite": { "comment": "Whether the user can be invited to chats", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "privacyKeyForwards": { "comment": "Whether messages forwarded from the user will be anonymously forwarded", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "privacyKeyPhoneP2P": { "comment": "Whether P2P connections in phone calls with this user are allowed", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "privacyKeyProfilePhoto": { "comment": "Whether the profile picture of the user is visible", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "privacyKeyPhoneCall": { "comment": "Whether the user accepts phone calls", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "privacyKeyAddedByPhone": { "comment": "Whether this user can be added to our contact list by their phone number", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "privacyKeyBirthday": { "comment": "Whether the user can see our birthday.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "privacyKeyVoiceMessages": { "comment": "Whether the user accepts voice messages", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "privacyKeyPhoneNumber": { "comment": "Whether the user allows us to see their phone number", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputPrivacyValueAllowContacts": { "comment": "Allow only contacts", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "privacyKeyAbout": { "comment": "Whether people can see your bio", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputPrivacyValueDisallowUsers": { "comment": "Disallow only certain users", "arguments": { "users": "Users to disallow" } }, "inputPrivacyValueDisallowContacts": { "comment": "Disallow only contacts", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputPrivacyValueAllowCloseFriends": { "comment": "Allow only close friends »", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputPrivacyValueAllowChatParticipants": { "comment": "Allow only participants of certain chats", "arguments": { "chats": "Allowed chat IDs" } }, "inputPrivacyValueDisallowChatParticipants": { "comment": "Disallow only participants of certain chats", "arguments": { "chats": "Disallowed chat IDs" } }, "inputPrivacyValueAllowPremium": { "comment": "Allow only users with a Premium subscription », currently only usable for {@link RawInputPrivacyKeyChatInvite}.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "privacyValueAllowAll": { "comment": "Allow all users", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "privacyValueAllowContacts": { "comment": "Allow all contacts", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputPrivacyValueAllowUsers": { "comment": "Allow only certain users", "arguments": { "users": "Allowed users" } }, "inputPrivacyValueAllowAll": { "comment": "Allow all users", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "privacyValueDisallowContacts": { "comment": "Disallow only contacts", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "privacyValueAllowUsers": { "comment": "Allow only certain users", "arguments": { "users": "Allowed users" } }, "privacyValueDisallowAll": { "comment": "Disallow all users", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "privacyValueAllowChatParticipants": { "comment": "Allow all participants of certain chats", "arguments": { "chats": "Allowed chats" } }, "privacyValueDisallowUsers": { "comment": "Disallow only certain users", "arguments": { "users": "Disallowed users" } }, "privacyValueDisallowChatParticipants": { "comment": "Disallow only participants of certain chats", "arguments": { "chats": "Disallowed chats" } }, "inputPrivacyValueDisallowAll": { "comment": "Disallow all", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "accountDaysTTL": { "comment": "Time to live in days of the current account", "arguments": { "days": "This account will self-destruct in the specified number of days" } }, "privacyValueAllowPremium": { "comment": "Allow only users with a Premium subscription », currently only usable for {@link RawInputPrivacyKeyChatInvite}.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.privacyRules": { "comment": "Privacy rules", "arguments": { "rules": "Privacy rules", "chats": "Chats to which the rules apply", "users": "Users to which the rules apply" } }, "documentAttributeImageSize": { "comment": "Defines the width and height of an image uploaded as document", "arguments": { "w": "Width of image", "h": "Height of image" } }, "documentAttributeAnimated": { "comment": "Defines an animated GIF", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "privacyValueAllowCloseFriends": { "comment": "Allow only close friends »", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "documentAttributeSticker": { "comment": "Defines a sticker", "arguments": { "flags": "Flags, see TL conditional fields", "mask": "Whether this is a mask sticker", "alt": "Alternative emoji representation of sticker", "stickerset": "Associated stickerset", "mask_coords": "Mask coordinates (if this is a mask sticker, attached to a photo)" } }, "documentAttributeVideo": { "comment": "Defines a video", "arguments": { "flags": "Flags, see TL conditional fields", "round_message": "Whether this is a round video", "supports_streaming": "Whether the video supports streaming", "nosound": "Whether the specified document is a video file with no audio tracks (a GIF animation (even as MPEG4), for example)", "duration": "Duration in seconds", "w": "Video width", "h": "Video height", "preload_prefix_size": "Number of bytes to preload when preloading videos (particularly video stories).", "video_start_ts": "Floating point UNIX timestamp in seconds, indicating the frame of the video that should be used as static preview and thumbnail." } }, "documentAttributeFilename": { "comment": "A simple document with a file name", "arguments": { "file_name": "The file name" } }, "documentAttributeAudio": { "comment": "Represents an audio file", "arguments": { "flags": "Flags, see TL conditional fields", "voice": "Whether this is a voice message", "duration": "Duration in seconds", "title": "Name of song", "performer": "Performer", "waveform": "Waveform: consists in a series of bitpacked 5-bit values.
    Example implementation: android." } }, "documentAttributeHasStickers": { "comment": "Whether the current document has stickers attached", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "documentAttributeCustomEmoji": { "comment": "Info about a custom emoji", "arguments": { "flags": "Flags, see TL conditional fields", "free": "Whether this custom emoji can be sent by non-Premium users", "text_color": "Whether the color of this TGS custom emoji should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context.", "alt": "The actual emoji", "stickerset": "The emoji stickerset to which this emoji belongs." } }, "messages.stickersNotModified": { "comment": "No new stickers were found for the given query", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messages.stickers": { "comment": "Found stickers", "arguments": { "hash": "Hash used for caching, for more info click here", "stickers": "Stickers" } }, "stickerPack": { "comment": "A stickerpack is a group of stickers associated to the same emoji.
    \nIt is not a sticker pack the way it is usually intended, you may be looking for a StickerSet.", "arguments": { "emoticon": "Emoji", "documents": "Stickers" } }, "messages.allStickersNotModified": { "comment": "Info about all installed stickers hasn't changed", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messages.allStickers": { "comment": "Info about all installed stickers", "arguments": { "hash": "Hash used for caching, for more info click here", "sets": "All stickersets" } }, "webPageEmpty": { "comment": "No preview is available for the webpage", "arguments": { "flags": "Flags, see TL conditional fields", "id": "Preview ID", "url": "URL of the webpage." } }, "webPagePending": { "comment": "A preview of the webpage is currently being generated", "arguments": { "flags": "Flags, see TL conditional fields", "id": "ID of preview", "url": "URL of the webpage", "date": "When was the processing started" } }, "messages.affectedMessages": { "comment": "Events affected by operation", "arguments": { "pts": "Event count after generation", "pts_count": "Number of events that were generated" } }, "webPageNotModified": { "comment": "The preview of the webpage hasn't changed", "arguments": { "flags": "Flags, see TL conditional fields", "cached_page_views": "Page view count" } }, "webPage": { "comment": "Webpage preview", "arguments": { "flags": "Flags, see TL conditional fields", "has_large_media": "Whether the size of the media in the preview can be changed.", "id": "Preview ID", "url": "URL of previewed webpage", "display_url": "Webpage URL to be displayed to the user", "hash": "Hash used for caching, for more info click here", "type": "Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else, see here » for a full list.", "site_name": "Short name of the site (e.g., Google Docs, App Store)", "title": "Title of the content", "description": "Content description", "photo": "Image representing the content", "embed_url": "URL to show in the embedded preview", "embed_type": "MIME type of the embedded preview, (e.g., text/html or video/mp4)", "embed_width": "Width of the embedded preview", "embed_height": "Height of the embedded preview", "duration": "Duration of the content, in seconds", "author": "Author of the content", "document": "Preview of the content as a media file", "cached_page": "Page contents in instant view format", "attributes": "Webpage attributes" } }, "account.authorizations": { "comment": "Logged-in sessions", "arguments": { "authorization_ttl_days": "Time-to-live of session", "authorizations": "Logged-in sessions" } }, "authorization": { "comment": "Logged-in session", "arguments": { "flags": "Flags, see TL conditional fields", "current": "Whether this is the current session", "official_app": "Whether the session is from an official app", "password_pending": "Whether the session is still waiting for a 2FA password", "encrypted_requests_disabled": "Whether this session will accept encrypted chats", "call_requests_disabled": "Whether this session will accept phone calls", "unconfirmed": "Whether the session is unconfirmed, see here » for more info.", "hash": "Identifier", "device_model": "Device model", "platform": "Platform", "system_version": "System version", "api_id": "API ID", "app_name": "App name", "app_version": "App version", "date_created": "When was the session created", "date_active": "When was the session last active", "ip": "Last known IP", "country": "Country determined from IP", "region": "Region determined from IP" } }, "account.password": { "comment": "Configuration for two-factor authorization", "arguments": { "flags": "Flags, see TL conditional fields", "has_recovery": "Whether the user has a recovery method configured", "has_secure_values": "Whether telegram passport is enabled", "has_password": "Whether the user has a password", "current_algo": "The KDF algorithm for SRP two-factor authentication of the current password", "srp_B": "Srp B param for SRP authorization", "srp_id": "Srp ID param for SRP authorization", "hint": "Text hint for the password", "email_unconfirmed_pattern": "A password recovery email with the specified pattern is still awaiting verification", "new_algo": "The KDF algorithm for SRP two-factor authentication to use when creating new passwords", "new_secure_algo": "The KDF algorithm for telegram passport", "secure_random": "Secure random string", "pending_reset_date": "The 2FA password will be automatically removed at this date, unless the user cancels the operation", "login_email_pattern": "A verified login email with the specified pattern is configured" } }, "account.passwordSettings": { "comment": "Private info associated to the password info (recovery email, telegram passport info & so on)", "arguments": { "flags": "Flags, see TL conditional fields", "email": "2FA Recovery email", "secure_settings": "Telegram passport settings" } }, "account.passwordInputSettings": { "comment": "Settings for setting up a new password", "arguments": { "flags": "Flags, see TL conditional fields", "new_algo": "The SRP algorithm to use", "new_password_hash": "The computed password hash", "hint": "Text hint for the password", "email": "Password recovery email", "new_secure_settings": "Telegram passport settings" } }, "auth.passwordRecovery": { "comment": "Recovery info of a 2FA password, only for accounts with a recovery email configured.", "arguments": { "email_pattern": "The email to which the recovery code was sent must match this pattern." } }, "chatInviteExported": { "comment": "Exported chat invite", "arguments": { "flags": "Flags, see TL conditional fields", "revoked": "Whether this chat invite was revoked", "permanent": "Whether this chat invite has no expiration", "request_needed": "Whether users importing this invite link will have to be approved to join the channel or group", "link": "Chat invitation link", "admin_id": "ID of the admin that created this chat invite", "date": "When was this chat invite created", "start_date": "When was this chat invite last modified", "expire_date": "When does this chat invite expire", "usage_limit": "Maximum number of users that can join using this link", "usage": "How many users joined using this link", "requested": "Number of users that have already used this link to join", "title": "Custom description for the invite link, visible only to admins" } }, "receivedNotifyMessage": { "comment": "Message ID, for which PUSH-notifications were cancelled.", "arguments": { "id": "Message ID, for which PUSH-notifications were canceled", "flags": "Reserved for future use" } }, "chatInviteAlready": { "comment": "The user has already joined this chat", "arguments": { "chat": "The chat connected to the invite" } }, "chatInvite": { "comment": "Chat invite info", "arguments": { "flags": "Flags, see TL conditional fields", "channel": "Whether this is a channel/supergroup or a normal group", "broadcast": "Whether this is a channel", "public": "Whether this is a public channel/supergroup", "megagroup": "Whether this is a supergroup", "request_needed": "Whether the join request » must be first approved by an administrator", "verified": "Is this chat or channel verified by Telegram?", "scam": "This chat is probably a scam", "fake": "If set, this chat was reported by many users as a fake or scam: be careful when interacting with it.", "title": "Chat/supergroup/channel title", "about": "Description of the group of channel", "photo": "Chat/supergroup/channel photo", "participants_count": "Participant count", "participants": "A few of the participants that are in the group", "color": "Profile color palette ID" } }, "chatInvitePublicJoinRequests": { "comment": "Used in updates and in the channel log to indicate when a user is requesting to join or has joined a discussion group", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputStickerSetEmpty": { "comment": "Empty constructor", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputStickerSetID": { "comment": "Stickerset by ID", "arguments": { "id": "ID", "access_hash": "Access hash" } }, "inputStickerSetShortName": { "comment": "Stickerset by short name, from a stickerset deep link »", "arguments": { "short_name": "Short name from a stickerset deep link »" } }, "inputStickerSetAnimatedEmoji": { "comment": "Animated emojis stickerset", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputStickerSetPremiumGifts": { "comment": "Stickers to show when receiving a gifted Telegram Premium subscription", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputStickerSetAnimatedEmojiAnimations": { "comment": "Animated emoji reaction stickerset (contains animations to play when a user clicks on a given animated emoji)", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputStickerSetEmojiGenericAnimations": { "comment": "Generic animation stickerset containing animations to play when reacting to messages using a normal emoji without a custom animation", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputStickerSetEmojiChannelDefaultStatuses": { "comment": "Default custom emoji status stickerset for channel statuses", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputStickerSetDice": { "comment": "Used for fetching animated dice stickers", "arguments": { "emoticon": "The emoji, for now \"🏀\", \"🎲\" and \"🎯\" are supported" } }, "inputStickerSetEmojiDefaultTopicIcons": { "comment": "Default custom emoji stickerset for forum topic icons", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messages.stickerSet": { "comment": "Stickerset and stickers inside it", "arguments": { "set": "The stickerset", "packs": "Emoji info for stickers", "keywords": "Keywords for some or every sticker in the stickerset.", "documents": "Stickers in stickerset" } }, "chatInvitePeek": { "comment": "A chat invitation that also allows peeking into the group to read messages without joining it.", "arguments": { "chat": "Chat information", "expires": "Read-only anonymous access to this group will be revoked at this date" } }, "messages.stickerSetNotModified": { "comment": "The stickerset hasn't changed", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "botInfo": { "comment": "Info about bots (available bot commands, etc)", "arguments": { "flags": "Flags, see TL conditional fields", "has_preview_medias": "If set, the bot has some preview medias for the configured Main Mini App, see here » for more info on Main Mini App preview medias.", "user_id": "ID of the bot", "description": "Description of the bot", "description_photo": "Description photo", "description_document": "Description animation in MPEG4 format", "commands": "Bot commands that can be used in the chat", "menu_button": "Indicates the action to execute when pressing the in-UI menu button for bots" } }, "keyboardButton": { "comment": "Bot keyboard button", "arguments": { "text": "Button text" } }, "inputStickerSetEmojiDefaultStatuses": { "comment": "Default custom emoji status stickerset", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "botCommand": { "comment": "Describes a bot command that can be used in a chat", "arguments": { "command": "/command name", "description": "Description of the command" } }, "stickerSet": { "comment": "Represents a stickerset (stickerpack)", "arguments": { "flags": "Flags, see TL conditional fields", "archived": "Whether this stickerset was archived (due to too many saved stickers in the current account)", "official": "Is this stickerset official", "masks": "Is this a mask stickerset", "emojis": "This is a custom emoji stickerset", "text_color": "Whether the color of this TGS custom emoji stickerset should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context.", "channel_emoji_status": "If set, this custom emoji stickerset can be used in channel/supergroup emoji statuses.", "creator": "Whether we created this stickerset", "installed_date": "When was this stickerset installed", "id": "ID of the stickerset", "access_hash": "Access hash of stickerset", "title": "Title of stickerset", "short_name": "Short name of stickerset, used when sharing stickerset using stickerset deep links.", "thumbs": "Stickerset thumbnail", "thumb_dc_id": "DC ID of thumbnail", "thumb_version": "Thumbnail version", "thumb_document_id": "Document ID of custom emoji thumbnail, fetch the document using {@link messages.RawGetCustomEmojiDocumentsRequest}", "count": "Number of stickers in pack", "hash": "Hash" } }, "keyboardButtonCallback": { "comment": "Callback button", "arguments": { "flags": "Flags, see TL conditional fields", "requires_password": "Whether the user should verify their identity by entering their 2FA SRP parameters to the {@link messages.RawGetBotCallbackAnswerRequest} method. NOTE: telegram and the bot WILL NOT have access to the plaintext password, thanks to SRP. This button is mainly used by the official @botfather bot, for verifying the user's identity before transferring ownership of a bot to another user.", "text": "Button text", "data": "Callback data" } }, "keyboardButtonUrl": { "comment": "URL button", "arguments": { "text": "Button label", "url": "URL" } }, "keyboardButtonRequestPhone": { "comment": "Button to request a user's phone number", "arguments": { "text": "Button text" } }, "keyboardButtonGame": { "comment": "Button to start a game", "arguments": { "text": "Button text" } }, "keyboardButtonSwitchInline": { "comment": "Button to force a user to switch to inline mode: pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field.", "arguments": { "flags": "Flags, see TL conditional fields", "same_peer": "If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field.", "text": "Button label", "query": "The inline query to use", "peer_types": "Filter to use when selecting chats." } }, "inputKeyboardButtonUrlAuth": { "comment": "Button to request a user to {@link messages.RawAcceptUrlAuthRequest} via URL using Seamless Telegram Login.", "arguments": { "flags": "Flags, see TL conditional fields", "request_write_access": "Set this flag to request the permission for your bot to send messages to the user.", "text": "Button text", "fwd_text": "New text of the button in forwarded messages.", "url": "An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.
    NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization.", "bot": "Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details." } }, "keyboardButtonBuy": { "comment": "Button to buy a product", "arguments": { "text": "Button text" } }, "keyboardButtonUrlAuth": { "comment": "Button to request a user to authorize via URL using Seamless Telegram Login. When the user clicks on such a button, {@link messages.RawRequestUrlAuthRequest} should be called, providing the button_id and the ID of the container message. The returned {@link RawUrlAuthResultRequest} object will contain more details about the authorization request (request_write_access if the bot would like to send messages to the user along with the username of the bot which will be used for user authorization). Finally, the user can choose to call {@link messages.RawAcceptUrlAuthRequest} to get a {@link RawUrlAuthResultAccepted} with the URL to open instead of the url of this constructor, or a {@link RawUrlAuthResultDefault}, in which case the url of this constructor must be opened, instead. If the user refuses the authorization request but still wants to open the link, the url of this constructor must be used.", "arguments": { "flags": "Flags, see TL conditional fields", "text": "Button label", "fwd_text": "New text of the button in forwarded messages.", "url": "An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.

    NOTE: Services must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization.", "button_id": "ID of the button to pass to {@link messages.RawRequestUrlAuthRequest}" } }, "keyboardButtonRequestPoll": { "comment": "A button that allows the user to create and send a poll when pressed; available only in private", "arguments": { "flags": "Flags, see TL conditional fields", "quiz": "If set, only quiz polls can be sent", "text": "Button text" } }, "keyboardButtonUserProfile": { "comment": "Button that links directly to a user profile", "arguments": { "text": "Button text", "user_id": "User ID" } }, "inputKeyboardButtonUserProfile": { "comment": "Button that links directly to a user profile", "arguments": { "text": "Button text", "user_id": "User ID" } }, "keyboardButtonRequestGeoLocation": { "comment": "Button to request a user's geolocation", "arguments": { "text": "Button text" } }, "keyboardButtonWebView": { "comment": "Button to open a bot mini app using {@link messages.RawRequestWebViewRequest}, sending over user information after user confirmation.\n\nCan only be sent or received as part of an inline keyboard, use {@link RawKeyboardButtonSimpleWebView} for reply keyboards.", "arguments": { "text": "Button text", "url": "Web app url" } }, "keyboardButtonSimpleWebView": { "comment": "Button to open a bot mini app using {@link messages.RawRequestSimpleWebViewRequest}, without sending user information to the web app.\n\nCan only be sent or received as part of a reply keyboard, use {@link RawKeyboardButtonWebView} for inline keyboards.", "arguments": { "text": "Button text", "url": "Web app URL" } }, "keyboardButtonRow": { "comment": "Inline keyboard row", "arguments": { "buttons": "Bot or inline keyboard buttons" } }, "replyKeyboardHide": { "comment": "Hide sent bot keyboard", "arguments": { "flags": "Flags, see TL conditional fields", "selective": "Use this flag if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.

    Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet" } }, "inputKeyboardButtonRequestPeer": { "comment": "Prompts the user to select and share one or more peers with the bot using {@link messages.RawSendBotRequestedPeerRequest}.", "arguments": { "flags": "Flags, see TL conditional fields", "name_requested": "Set this flag to request the peer's name.", "username_requested": "Set this flag to request the peer's @username (if any).", "photo_requested": "Set this flag to request the peer's photo (if any).", "text": "Button text", "button_id": "Button ID, to be passed to {@link messages.RawSendBotRequestedPeerRequest}.", "peer_type": "Filtering criteria to use for the peer selection list shown to the user.
    The list should display all existing peers of the specified type, and should also offer an option for the user to create and immediately use one or more (up to max_quantity) peers of the specified type, if needed.", "max_quantity": "Maximum number of peers that can be chosen." } }, "replyKeyboardForceReply": { "comment": "Force the user to send a reply", "arguments": { "flags": "Flags, see TL conditional fields", "single_use": "Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again.", "selective": "Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.
    Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard.", "placeholder": "The placeholder to be shown in the input field when the keyboard is active; 1-64 characters." } }, "replyKeyboardMarkup": { "comment": "Bot keyboard", "arguments": { "flags": "Flags, see TL conditional fields", "resize": "Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). If not set, the custom keyboard is always of the same height as the app's standard keyboard.", "single_use": "Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again.", "selective": "Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.

    Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard.", "persistent": "Requests clients to always show the keyboard when the regular keyboard is hidden.", "rows": "Button row", "placeholder": "The placeholder to be shown in the input field when the keyboard is active; 1-64 characters." } }, "keyboardButtonRequestPeer": { "comment": "Prompts the user to select and share one or more peers with the bot using {@link messages.RawSendBotRequestedPeerRequest}", "arguments": { "text": "Button text", "button_id": "Button ID, to be passed to {@link messages.RawSendBotRequestedPeerRequest}.", "peer_type": "Filtering criteria to use for the peer selection list shown to the user.
    The list should display all existing peers of the specified type, and should also offer an option for the user to create and immediately use one or more (up to max_quantity) peers of the specified type, if needed.", "max_quantity": "Maximum number of peers that can be chosen." } }, "messageEntityHashtag": { "comment": "#hashtag message entity", "arguments": { "offset": "Offset of message entity within message (in UTF-16 code units)", "length": "Length of message entity within message (in UTF-16 code units)" } }, "replyInlineMarkup": { "comment": "Bot or inline keyboard", "arguments": { "rows": "Bot or inline keyboard rows" } }, "messageEntityUnknown": { "comment": "Unknown message entity", "arguments": { "offset": "Offset of message entity within message (in UTF-16 code units)", "length": "Length of message entity within message (in UTF-16 code units)" } }, "messageEntityMention": { "comment": "Message entity mentioning a user by @username; {@link RawMessageEntityMentionName} can also be used to mention users by their ID.", "arguments": { "offset": "Offset of message entity within message (in UTF-16 code units)", "length": "Length of message entity within message (in UTF-16 code units)" } }, "messageEntityBotCommand": { "comment": "Message entity representing a bot /command", "arguments": { "offset": "Offset of message entity within message (in UTF-16 code units)", "length": "Length of message entity within message (in UTF-16 code units)" } }, "messageEntityUrl": { "comment": "Message entity representing an in-text url: https://google.com; for text urls, use {@link RawMessageEntityTextUrl}.", "arguments": { "offset": "Offset of message entity within message (in UTF-16 code units)", "length": "Length of message entity within message (in UTF-16 code units)" } }, "messageEntityEmail": { "comment": "Message entity representing an email@example.com.", "arguments": { "offset": "Offset of message entity within message (in UTF-16 code units)", "length": "Length of message entity within message (in UTF-16 code units)" } }, "messageEntityBold": { "comment": "Message entity representing bold text.", "arguments": { "offset": "Offset of message entity within message (in UTF-16 code units)", "length": "Length of message entity within message (in UTF-16 code units)" } }, "messageEntityCode": { "comment": "Message entity representing a codeblock.", "arguments": { "offset": "Offset of message entity within message (in UTF-16 code units)", "length": "Length of message entity within message (in UTF-16 code units)" } }, "messageEntityItalic": { "comment": "Message entity representing italic text.", "arguments": { "offset": "Offset of message entity within message (in UTF-16 code units)", "length": "Length of message entity within message (in UTF-16 code units)" } }, "messageEntityPre": { "comment": "Message entity representing a preformatted codeblock, allowing the user to specify a programming language for the codeblock.", "arguments": { "offset": "Offset of message entity within message (in UTF-16 code units)", "length": "Length of message entity within message (in UTF-16 code units)", "language": "Programming language of the code" } }, "messageEntityMentionName": { "comment": "Message entity representing a user mention: for creating a mention use {@link RawInputMessageEntityMentionName}.", "arguments": { "offset": "Offset of message entity within message (in UTF-16 code units)", "length": "Length of message entity within message (in UTF-16 code units)", "user_id": "Identifier of the user that was mentioned" } }, "messageEntityTextUrl": { "comment": "Message entity representing a text url: for in-text urls like https://google.com use {@link RawMessageEntityUrl}.\n\nNote that an additional confirmation popup with the full URL must be displayed to the user before opening this link, unless the domain satisfies the conditions specified in the domain whitelist documentation ».", "arguments": { "offset": "Offset of message entity within message (in UTF-16 code units)", "length": "Length of message entity within message (in UTF-16 code units)", "url": "The actual URL" } }, "inputMessageEntityMentionName": { "comment": "Message entity that can be used to create a user user mention: received mentions use the {@link RawMessageEntityMentionName} constructor, instead.", "arguments": { "offset": "Offset of message entity within message (in UTF-16 code units)", "length": "Length of message entity within message (in UTF-16 code units)", "user_id": "Identifier of the user that was mentioned" } }, "messageEntityPhone": { "comment": "Message entity representing a phone number.", "arguments": { "offset": "Offset of message entity within message (in UTF-16 code units)", "length": "Length of message entity within message (in UTF-16 code units)" } }, "messageEntityUnderline": { "comment": "Message entity representing underlined text.", "arguments": { "offset": "Offset of message entity within message (in UTF-16 code units)", "length": "Length of message entity within message (in UTF-16 code units)" } }, "messageEntityStrike": { "comment": "Message entity representing strikethrough text.", "arguments": { "offset": "Offset of message entity within message (in UTF-16 code units)", "length": "Length of message entity within message (in UTF-16 code units)" } }, "messageEntitySpoiler": { "comment": "Message entity representing a spoiler", "arguments": { "offset": "Offset of message entity within message (in UTF-16 code units)", "length": "Length of message entity within message (in UTF-16 code units)" } }, "messageEntityBankCard": { "comment": "Indicates a credit card number", "arguments": { "offset": "Offset of message entity within message (in UTF-16 code units)", "length": "Length of message entity within message (in UTF-16 code units)" } }, "messageEntityBlockquote": { "comment": "Message entity representing a block quote.", "arguments": { "flags": "Flags, see TL conditional fields", "collapsed": "Whether the quote is collapsed by default.", "offset": "Offset of message entity within message (in UTF-16 code units)", "length": "Length of message entity within message (in UTF-16 code units)" } }, "messageEntityCashtag": { "comment": "Message entity representing a $cashtag.", "arguments": { "offset": "Offset of message entity within message (in UTF-16 code units)", "length": "Length of message entity within message (in UTF-16 code units)" } }, "inputChannel": { "comment": "Represents a channel", "arguments": { "channel_id": "Channel ID", "access_hash": "Access hash taken from the {@link RawChannel} constructor" } }, "inputChannelFromMessage": { "comment": "Defines a min channel that was seen in a certain message of a certain chat.", "arguments": { "peer": "The chat where the channel was seen", "msg_id": "The message ID in the chat where the channel was seen", "channel_id": "The channel ID" } }, "messageRange": { "comment": "Indicates a range of chat messages", "arguments": { "min_id": "Start of range (message ID)", "max_id": "End of range (message ID)" } }, "inputChannelEmpty": { "comment": "Represents the absence of a channel", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "contacts.resolvedPeer": { "comment": "Resolved peer", "arguments": { "peer": "The peer", "chats": "Chats", "users": "Users" } }, "messageEntityCustomEmoji": { "comment": "Represents a custom emoji.
    \nNote that this entity must wrap exactly one regular emoji (the one contained in {@link RawDocumentAttributeCustomEmoji}.alt) in the related text, otherwise the server will ignore it.", "arguments": { "offset": "Offset of message entity within message (in UTF-16 code units)", "length": "Length of message entity within message (in UTF-16 code units)", "document_id": "Document ID of the custom emoji, use {@link messages.RawGetCustomEmojiDocumentsRequest} to fetch the emoji animation and the actual emoji it represents." } }, "updates.channelDifferenceEmpty": { "comment": "There are no new updates", "arguments": { "flags": "Flags, see TL conditional fields", "final": "Whether there are more updates that must be fetched (always false)", "pts": "The latest PTS", "timeout": "Clients are supposed to refetch the channel difference after timeout seconds have elapsed, if the user is currently viewing the chat, see here » for more info." } }, "channelMessagesFilterEmpty": { "comment": "No filter", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "updates.channelDifference": { "comment": "The new updates", "arguments": { "flags": "Flags, see TL conditional fields", "final": "Whether there are more updates to be fetched using getDifference, starting from the provided pts", "pts": "The PTS from which to start getting updates the next time", "timeout": "Clients are supposed to refetch the channel difference after timeout seconds have elapsed, if the user is currently viewing the chat, see here » for more info.", "new_messages": "New messages", "other_updates": "Other updates", "chats": "Chats", "users": "Users" } }, "channelMessagesFilter": { "comment": "Filter for getting only certain types of channel messages", "arguments": { "flags": "Flags, see TL conditional fields", "exclude_new_messages": "Whether to exclude new messages from the search", "ranges": "A range of messages to fetch" } }, "updates.channelDifferenceTooLong": { "comment": "The provided pts + limit < remote pts. Simply, there are too many updates to be fetched (more than limit), the client has to resolve the update gap in one of the following ways (assuming the existence of a persistent database to locally store messages):\n\nIt should be also noted that some messages like live location messages shouldn't be deleted.", "arguments": { "flags": "Flags, see TL conditional fields", "final": "Whether there are more updates that must be fetched (always false)", "timeout": "Clients are supposed to refetch the channel difference after timeout seconds have elapsed", "dialog": "Dialog containing the latest PTS that can be used to reset the channel state", "messages": "The latest messages", "chats": "Chats from messages", "users": "Users from messages" } }, "channelParticipantSelf": { "comment": "Myself", "arguments": { "flags": "Flags, see TL conditional fields", "via_request": "Whether I joined upon specific approval of an admin", "user_id": "User ID", "inviter_id": "User that invited me to the channel/supergroup", "date": "When did I join the channel/supergroup" } }, "channelParticipant": { "comment": "Channel/supergroup participant", "arguments": { "user_id": "Participant user ID", "date": "Date joined" } }, "channelParticipantAdmin": { "comment": "Admin", "arguments": { "flags": "Flags, see TL conditional fields", "can_edit": "Can this admin promote other admins with the same permissions?", "self": "Is this the current user", "user_id": "Admin user ID", "inviter_id": "User that invited the admin to the channel/group", "promoted_by": "User that promoted the user to admin", "date": "When did the user join", "admin_rights": "Admin rights", "rank": "The role (rank) of the admin in the group: just an arbitrary string, admin by default" } }, "channelParticipantBanned": { "comment": "Banned/kicked user", "arguments": { "flags": "Flags, see TL conditional fields", "left": "Whether the user has left the group", "peer": "The banned peer", "kicked_by": "User was kicked by the specified admin", "date": "When did the user join the group", "banned_rights": "Banned rights" } }, "channelParticipantsBots": { "comment": "Fetch only bot participants", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "channelParticipantsRecent": { "comment": "Fetch only recent participants", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "channelParticipantLeft": { "comment": "A participant that left the channel/supergroup", "arguments": { "peer": "The peer that left" } }, "channelParticipantsBanned": { "comment": "Fetch only banned participants", "arguments": { "q": "Optional filter for searching banned participants by name (otherwise empty)" } }, "channelParticipantsContacts": { "comment": "Fetch only participants that are also contacts", "arguments": { "q": "Optional search query for searching contact participants by name" } }, "channelParticipantsAdmins": { "comment": "Fetch only admin participants", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "channelParticipantsKicked": { "comment": "Fetch only kicked participants", "arguments": { "q": "Optional filter for searching kicked participants by name (otherwise empty)" } }, "channelParticipantsSearch": { "comment": "Query participants by name", "arguments": { "q": "Search query" } }, "channelParticipantsMentions": { "comment": "This filter is used when looking for supergroup members to mention.
    \nThis filter will automatically remove anonymous admins, and return even non-participant users that replied to a specific thread through the comment section of a channel.", "arguments": { "flags": "Flags, see TL conditional fields", "q": "Filter by user name or username", "top_msg_id": "Look only for users that posted in this thread" } }, "channelParticipantCreator": { "comment": "Channel/supergroup creator", "arguments": { "flags": "Flags, see TL conditional fields", "user_id": "User ID", "admin_rights": "Creator admin rights", "rank": "The role (rank) of the group creator in the group: just an arbitrary string, admin by default" } }, "channels.channelParticipants": { "comment": "Represents multiple channel participants", "arguments": { "count": "Total number of participants that correspond to the given query", "participants": "Participants", "chats": "Mentioned chats", "users": "Users mentioned in participant info" } }, "messages.savedGifsNotModified": { "comment": "No new saved gifs were found", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "channels.channelParticipant": { "comment": "Represents a channel participant", "arguments": { "participant": "The channel participant", "chats": "Mentioned chats", "users": "Users" } }, "help.termsOfService": { "comment": "Info about the latest telegram Terms Of Service", "arguments": { "flags": "Flags, see TL conditional fields", "popup": "Whether a prompt must be showed to the user, in order to accept the new terms.", "id": "ID of the new terms", "text": "Text of the new terms", "entities": "Message entities for styled text", "min_age_confirm": "Minimum age required to sign up to telegram, the user must confirm that they is older than the minimum age." } }, "inputBotInlineMessageText": { "comment": "Simple text message", "arguments": { "flags": "Flags, see TL conditional fields", "no_webpage": "Disable webpage preview", "invert_media": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.", "message": "Message", "entities": "Message entities for styled text", "reply_markup": "Inline keyboard" } }, "inputBotInlineMessageMediaAuto": { "comment": "A media", "arguments": { "flags": "Flags, see TL conditional fields", "invert_media": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.", "message": "Caption", "entities": "Message entities for styled text", "reply_markup": "Inline keyboard" } }, "inputBotInlineMessageMediaVenue": { "comment": "Venue", "arguments": { "flags": "Flags, see TL conditional fields", "geo_point": "Geolocation", "title": "Venue name", "address": "Address", "provider": "Venue provider: currently only \"foursquare\" and \"gplaces\" (Google Places) need to be supported", "venue_id": "Venue ID in the provider's database", "venue_type": "Venue type in the provider's database", "reply_markup": "Inline keyboard" } }, "channels.channelParticipantsNotModified": { "comment": "No new participant info could be found", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputBotInlineMessageMediaContact": { "comment": "A contact", "arguments": { "flags": "Flags, see TL conditional fields", "phone_number": "Phone number", "first_name": "First name", "last_name": "Last name", "vcard": "VCard info", "reply_markup": "Inline keyboard" } }, "inputBotInlineMessageMediaInvoice": { "comment": "An invoice", "arguments": { "flags": "Flags, see TL conditional fields", "title": "Product name, 1-32 characters", "description": "Product description, 1-255 characters", "photo": "Invoice photo", "invoice": "The invoice", "payload": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.", "provider": "Payments provider token, obtained via Botfather", "provider_data": "A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider.", "reply_markup": "Inline keyboard" } }, "inputBotInlineMessageGame": { "comment": "A game", "arguments": { "flags": "Flags, see TL conditional fields", "reply_markup": "Inline keyboard" } }, "inputBotInlineResult": { "comment": "An inline bot result", "arguments": { "flags": "Flags, see TL conditional fields", "id": "ID of result", "type": "Result type (see bot API docs)", "title": "Result title", "description": "Result description", "url": "URL of result", "thumb": "Thumbnail for result", "content": "Result contents", "send_message": "Message to send when the result is selected" } }, "inputBotInlineMessageMediaGeo": { "comment": "Geolocation", "arguments": { "flags": "Flags, see TL conditional fields", "geo_point": "Geolocation", "heading": "For live locations, a direction in which the location moves, in degrees; 1-360", "period": "Validity period", "proximity_notification_radius": "For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000)", "reply_markup": "Reply markup for bot/inline keyboards" } }, "inputBotInlineMessageMediaWebPage": { "comment": "Specifies options that will be used to generate the link preview for the message, or even a standalone link preview without an attached message.", "arguments": { "flags": "Flags, see TL conditional fields", "invert_media": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.", "force_large_media": "If set, specifies that a large media preview should be used.", "force_small_media": "If set, specifies that a small media preview should be used.", "optional": "If not set, a WEBPAGE_NOT_FOUND RPC error will be emitted if a webpage preview cannot be generated for the specified url; otherwise, no error will be emitted (unless the provided message is also empty, in which case a MESSAGE_EMPTY will be emitted, instead).", "message": "The message, can be empty.", "entities": "Message entities for styled text", "url": "The URL to use for the link preview.", "reply_markup": "Inline keyboard" } }, "messages.savedGifs": { "comment": "Saved gifs", "arguments": { "hash": "Hash used for caching, for more info click here", "gifs": "List of saved gifs" } }, "inputBotInlineResultDocument": { "comment": "Document (media of any type except for photos)", "arguments": { "flags": "Flags, see TL conditional fields", "id": "Result ID", "type": "Result type (see bot API docs)", "title": "Result title", "description": "Result description", "document": "Document to send", "send_message": "Message to send when the result is selected" } }, "inputBotInlineResultGame": { "comment": "Game", "arguments": { "id": "Result ID", "short_name": "Game short name", "send_message": "Message to send when the result is selected" } }, "inputBotInlineResultPhoto": { "comment": "Photo", "arguments": { "id": "Result ID", "type": "Result type (see bot API docs)", "photo": "Photo to send", "send_message": "Message to send when the result is selected" } }, "botInlineMessageText": { "comment": "Send a simple text message", "arguments": { "flags": "Flags, see TL conditional fields", "no_webpage": "Disable webpage preview", "invert_media": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.", "message": "The message", "entities": "Message entities for styled text", "reply_markup": "Inline keyboard" } }, "botInlineMessageMediaAuto": { "comment": "Send whatever media is attached to the {@link RawBotInlineMediaResult}", "arguments": { "flags": "Flags, see TL conditional fields", "invert_media": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.", "message": "Caption", "entities": "Message entities for styled text", "reply_markup": "Inline keyboard" } }, "botInlineMessageMediaGeo": { "comment": "Send a geolocation", "arguments": { "flags": "Flags, see TL conditional fields", "geo": "Geolocation", "heading": "For live locations, a direction in which the location moves, in degrees; 1-360.", "period": "Validity period", "proximity_notification_radius": "For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000).", "reply_markup": "Inline keyboard" } }, "botInlineMessageMediaVenue": { "comment": "Send a venue", "arguments": { "flags": "Flags, see TL conditional fields", "geo": "Geolocation of venue", "title": "Venue name", "address": "Address", "provider": "Venue provider: currently only \"foursquare\" and \"gplaces\" (Google Places) need to be supported", "venue_id": "Venue ID in the provider's database", "venue_type": "Venue type in the provider's database", "reply_markup": "Inline keyboard" } }, "botInlineMessageMediaWebPage": { "comment": "Specifies options that must be used to generate the link preview for the message, or even a standalone link preview without an attached message.", "arguments": { "flags": "Flags, see TL conditional fields", "invert_media": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.", "force_large_media": "If set, specifies that a large media preview should be used.", "force_small_media": "If set, specifies that a small media preview should be used.", "manual": "If set, indicates that the URL used for the webpage preview was specified manually using {@link RawInputMediaWebPage}, and may not be related to any of the URLs specified in the message.", "safe": "If set, the link can be opened directly without user confirmation.", "message": "The message, can be empty.", "entities": "Message entities for styled text", "url": "The URL to use for the link preview.", "reply_markup": "Reply markup for sending bot buttons" } }, "botInlineMessageMediaInvoice": { "comment": "Send an invoice", "arguments": { "flags": "Flags, see TL conditional fields", "shipping_address_requested": "Set this flag if you require the user's shipping address to complete the order", "test": "Test invoice", "title": "Product name, 1-32 characters", "description": "Product description, 1-255 characters", "photo": "Product photo", "currency": "Three-letter ISO 4217 currency code, or XTR for Telegram Stars.", "total_amount": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", "reply_markup": "Inline keyboard" } }, "botInlineResult": { "comment": "Generic result", "arguments": { "flags": "Flags, see TL conditional fields", "id": "Result ID", "type": "Result type (see bot API docs)", "title": "Result title", "description": "Result description", "url": "URL of article or webpage", "thumb": "Thumbnail for the result", "content": "Content of the result", "send_message": "Message to send" } }, "botInlineMediaResult": { "comment": "Media result", "arguments": { "flags": "Flags, see TL conditional fields", "id": "Result ID", "type": "Result type (see bot API docs)", "photo": "If type is photo, the photo to send", "document": "If type is document, the document to send", "title": "Result title", "description": "Description", "send_message": "Depending on the type and on the constructor, contains the caption of the media or the content of the message to be sent instead of the media" } }, "messages.botResults": { "comment": "Result of a query to an inline bot", "arguments": { "flags": "Flags, see TL conditional fields", "gallery": "Whether the result is a picture gallery", "query_id": "Query ID", "next_offset": "The next offset to use when navigating through results", "switch_pm": "Shown as a button on top of the remaining inline result list; if clicked, redirects the user to a private chat with the bot with the specified start parameter.", "switch_webview": "Shown as a button on top of the remaining inline result list; if clicked, opens the specified inline mode mini app.", "results": "The results", "cache_time": "Caching validity of the results", "users": "Users mentioned in the results" } }, "auth.codeTypeSms": { "comment": "The next time, the authentication code will be delivered via an immediately canceled incoming call.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "auth.codeTypeCall": { "comment": "The next time, the authentication code is to be delivered via an outgoing phone call.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "botInlineMessageMediaContact": { "comment": "Send a contact", "arguments": { "flags": "Flags, see TL conditional fields", "phone_number": "Phone number", "first_name": "First name", "last_name": "Last name", "vcard": "VCard info", "reply_markup": "Inline keyboard" } }, "auth.codeTypeFlashCall": { "comment": "The next time, the authentication code will be delivered via an immediately canceled incoming call.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messageFwdHeader": { "comment": "Info about a forwarded message", "arguments": { "flags": "Flags, see TL conditional fields", "imported": "Whether this message was imported from a foreign chat service, click here for more info »", "saved_out": "Only for messages forwarded to saved messages », set if the original message was outgoing (though the message may have been originally outgoing even if this flag is not set, if from_id points to the current user).", "from_id": "The ID of the user that originally sent the message", "from_name": "The name of the user that originally sent the message", "date": "When was the message originally sent", "channel_post": "ID of the channel message that was forwarded", "post_author": "For channels and if signatures are enabled, author of the channel message", "saved_from_peer": "Only for messages forwarded to saved messages », contains the dialog where the message was originally sent.", "saved_from_msg_id": "Only for messages forwarded to saved messages », contains the original ID of the message in saved_from_peer.", "saved_from_id": "Only for forwarded messages reforwarded to saved messages », contains the sender of the original message (i.e. if user A sends a message, then user B forwards it somewhere, then user C saves it to saved messages, this field will contain the ID of user B and from_id will contain the ID of user A).", "saved_from_name": "Only for forwarded messages from users with forward privacy enabled, sent by users with forward privacy enabled, reforwarded to saved messages », contains the sender of the original message (i.e. if user A (fwd privacy enabled) sends a message, then user B (fwd privacy enabled) forwards it somewhere, then user C saves it to saved messages, this field will contain the name of user B and from_name will contain the name of user A).", "saved_date": "Only for forwarded messages reforwarded to saved messages », indicates when was the original message sent (i.e. if user A sends a message @ unixtime 1, then user B forwards it somewhere @ unixtime 2, then user C saves it to saved messages @ unixtime 3, this field will contain 2, date will contain 1 and the date of the containing {@link RawMessage} will contain 3).", "psa_type": "PSA type" } }, "exportedMessageLink": { "comment": "Link to a message in a supergroup/channel", "arguments": { "link": "URL", "html": "Embed code" } }, "auth.codeTypeMissedCall": { "comment": "The next time, the authentication code will be delivered via an immediately canceled incoming call, handled manually by the user.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "auth.codeTypeFragmentSms": { "comment": "The next time, the authentication code will be delivered via fragment.com", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "auth.sentCodeTypeApp": { "comment": "The code was sent through the telegram app", "arguments": { "length": "Length of the code in bytes" } }, "auth.sentCodeTypeSms": { "comment": "The code was sent via SMS", "arguments": { "length": "Length of the code in bytes" } }, "auth.sentCodeTypeFlashCall": { "comment": "The code will be sent via a flash phone call, that will be closed immediately. The phone code will then be the phone number itself, just make sure that the phone number matches the specified pattern.", "arguments": { "pattern": "pattern to match" } }, "auth.sentCodeTypeCall": { "comment": "The code will be sent via a phone call: a synthesized voice will tell the user which verification code to input.", "arguments": { "length": "Length of the verification code" } }, "auth.sentCodeTypeMissedCall": { "comment": "The code will be sent via a flash phone call, that will be closed immediately. The last digits of the phone number that calls are the code that must be entered manually by the user.", "arguments": { "prefix": "Prefix of the phone number from which the call will be made", "length": "Length of the verification code" } }, "auth.sentCodeTypeSetUpEmailRequired": { "comment": "The user should add and verify an email address in order to login as described here ».", "arguments": { "flags": "Flags, see TL conditional fields", "apple_signin_allowed": "Whether authorization through Apple ID is allowed", "google_signin_allowed": "Whether authorization through Google ID is allowed" } }, "auth.sentCodeTypeEmailCode": { "comment": "The code was sent via the previously configured login email »", "arguments": { "flags": "Flags, see TL conditional fields", "apple_signin_allowed": "Whether authorization through Apple ID is allowed", "google_signin_allowed": "Whether authorization through Google ID is allowed", "email_pattern": "Pattern of the email", "length": "Length of the sent verification code", "reset_available_period": "Clients should wait for the specified amount of seconds before allowing the user to invoke {@link auth.RawResetLoginEmailRequest} (will be 0 for Premium users).", "reset_pending_date": "An email reset was already requested, and will occur at the specified date." } }, "auth.sentCodeTypeFirebaseSms": { "comment": "An authentication code should be delivered via SMS after Firebase attestation, as described in the auth documentation ».", "arguments": { "flags": "Flags, see TL conditional fields", "nonce": "On Android, the nonce to be used as described in the auth documentation »", "play_integrity_project_id": "Google Play Integrity project ID", "play_integrity_nonce": "Play Integrity API nonce", "receipt": "On iOS, must be compared with the receipt extracted from the received push notification.", "push_timeout": "On iOS: if a push notification with the ios_push_secret isn't received within push_timeout seconds, the next_type authentication method must be used, with {@link auth.RawResendCodeRequest}.", "length": "Length of the code that will be delivered." } }, "auth.sentCodeTypeFragmentSms": { "comment": "The code was delivered via fragment.com.", "arguments": { "url": "Open the specified URL to log into fragment.com with the wallet that owns the specified phone number and view the code.", "length": "Length of the delivered code." } }, "auth.sentCodeTypeSmsPhrase": { "comment": "The code was sent via SMS as a secret phrase starting with the word specified in beginning", "arguments": { "flags": "Flags, see TL conditional fields", "beginning": "If set, the secret phrase (and the SMS) starts with this word." } }, "auth.sentCodeTypeSmsWord": { "comment": "The code was sent via SMS as a secret word, starting with the letter specified in beginning", "arguments": { "flags": "Flags, see TL conditional fields", "beginning": "If set, the secret word in the sent SMS (which may contain multiple words) starts with this letter." } }, "messages.botCallbackAnswer": { "comment": "Callback answer sent by the bot in response to a button press", "arguments": { "flags": "Flags, see TL conditional fields", "alert": "Whether an alert should be shown to the user instead of a toast notification", "has_url": "Whether an URL is present", "native_ui": "Whether to show games in WebView or in native UI.", "message": "Alert to show", "url": "URL to open", "cache_time": "For how long should this answer be cached" } }, "inputBotInlineMessageID": { "comment": "Represents a sent inline message from the perspective of a bot (legacy constructor)", "arguments": { "dc_id": "DC ID to use when working with this inline message", "id": "ID of message, contains both the (32-bit, legacy) owner ID and the message ID, used only for Bot API backwards compatibility with 32-bit user ID.", "access_hash": "Access hash of message" } }, "inputBotInlineMessageID64": { "comment": "Represents a sent inline message from the perspective of a bot", "arguments": { "dc_id": "DC ID to use when working with this inline message", "owner_id": "ID of the owner of this message", "id": "ID of message", "access_hash": "Access hash of message" } }, "inlineBotSwitchPM": { "comment": "The bot requested the user to message them in private", "arguments": { "text": "Text for the button that switches the user to a private chat with the bot and sends the bot a start message with the parameter start_parameter (can be empty)", "start_param": "The parameter for the /start parameter" } }, "messages.peerDialogs": { "comment": "Dialog info of multiple peers", "arguments": { "dialogs": "Dialog info", "messages": "Messages mentioned in dialog info", "chats": "Chats", "users": "Users", "state": "Current update state of dialog" } }, "messages.messageEditData": { "comment": "Message edit data for media", "arguments": { "flags": "Flags, see TL conditional fields", "caption": "Media caption, if the specified media's caption can be edited" } }, "topPeer": { "comment": "Top peer", "arguments": { "peer": "Peer", "rating": "Rating as computed in top peer rating »" } }, "topPeerCategoryBotsPM": { "comment": "Most used bots", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "topPeerCategoryBotsInline": { "comment": "Most used inline bots", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "topPeerCategoryGroups": { "comment": "Often-opened groups and supergroups", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "topPeerCategoryChannels": { "comment": "Most frequently visited channels", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "topPeerCategoryPhoneCalls": { "comment": "Most frequently called users", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "topPeerCategoryForwardUsers": { "comment": "Users to which the users often forwards messages to", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "topPeerCategoryCorrespondents": { "comment": "Users we've chatted most frequently with", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "topPeerCategoryBotsApp": { "comment": "Most frequently used Main Mini Bot Apps.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "topPeerCategoryPeers": { "comment": "Top peer category", "arguments": { "category": "Top peer category of peers", "count": "Count of peers", "peers": "Peers" } }, "topPeerCategoryForwardChats": { "comment": "Chats to which the users often forwards messages to", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "contacts.topPeersDisabled": { "comment": "Top peers disabled", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "contacts.topPeers": { "comment": "Top peers", "arguments": { "categories": "Top peers by top peer category", "chats": "Chats", "users": "Users" } }, "contacts.topPeersNotModified": { "comment": "Top peer info hasn't changed", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "draftMessageEmpty": { "comment": "Empty draft", "arguments": { "flags": "Flags, see TL conditional fields", "date": "When was the draft last updated" } }, "messages.featuredStickers": { "comment": "Featured stickersets", "arguments": { "flags": "Flags, see TL conditional fields", "premium": "Whether this is a premium stickerset", "hash": "Hash used for caching, for more info click here", "count": "Total number of featured stickers", "sets": "Featured stickersets", "unread": "IDs of new featured stickersets" } }, "messages.featuredStickersNotModified": { "comment": "Featured stickers haven't changed", "arguments": { "count": "Total number of featured stickers" } }, "messages.recentStickersNotModified": { "comment": "No new recent sticker was found", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "draftMessage": { "comment": "Represents a message draft.", "arguments": { "flags": "Flags, see TL conditional fields", "no_webpage": "Whether no webpage preview will be generated", "invert_media": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.", "reply_to": "If set, indicates that the message should be sent in reply to the specified message or story.", "message": "The draft", "entities": "Message entities for styled text.", "media": "Media.", "date": "Date of last update of the draft.", "effect": "A message effect that should be played as specified here »." } }, "messages.recentStickers": { "comment": "Recently used stickers", "arguments": { "hash": "Hash used for caching, for more info click here", "packs": "Emojis associated to stickers", "stickers": "Recent stickers", "dates": "When was each sticker last used" } }, "messages.archivedStickers": { "comment": "Archived stickersets", "arguments": { "count": "Number of archived stickers", "sets": "Archived stickersets" } }, "messages.stickerSetInstallResultArchive": { "comment": "The stickerset was installed, but since there are too many stickersets some were archived", "arguments": { "sets": "Archived stickersets" } }, "messages.stickerSetInstallResultSuccess": { "comment": "The stickerset was installed successfully", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "stickerSetFullCovered": { "comment": "Stickerset preview with all stickers of the stickerset included.
    \nCurrently used only for custom emoji stickersets, to avoid a further call to {@link messages.RawGetStickerSetRequest}.", "arguments": { "set": "Stickerset", "packs": "Emoji information about every sticker in the stickerset", "keywords": "Keywords for some or every sticker in the stickerset.", "documents": "Stickers" } }, "stickerSetMultiCovered": { "comment": "Stickerset, with multiple stickers as preview", "arguments": { "set": "Stickerset", "covers": "Preview stickers" } }, "stickerSetNoCovered": { "comment": "Just the stickerset information, with no previews.", "arguments": { "set": "Stickerset information." } }, "inputStickeredMediaPhoto": { "comment": "A photo with stickers attached", "arguments": { "id": "The photo" } }, "maskCoords": { "comment": "Position on a photo where a mask should be placed when attaching stickers to media »\n\nThe n position indicates where the mask should be placed:", "arguments": { "n": "Part of the face, relative to which the mask should be placed", "x": "Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position)", "y": "Shift by Y-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just below the default mask position)", "zoom": "Mask scaling coefficient. (For example, 2.0 means a doubled size)" } }, "stickerSetCovered": { "comment": "Stickerset with a single sticker as preview", "arguments": { "set": "Stickerset", "cover": "Preview" } }, "inputStickeredMediaDocument": { "comment": "A document with stickers attached", "arguments": { "id": "The document" } }, "game": { "comment": "Indicates an already sent game", "arguments": { "flags": "Flags, see TL conditional fields", "id": "ID of the game", "access_hash": "Access hash of the game", "short_name": "Short name for the game", "title": "Title of the game", "description": "Game description", "photo": "Game preview", "document": "Optional attached document" } }, "inputGameID": { "comment": "Indicates an already sent game", "arguments": { "id": "game ID from Game constructor", "access_hash": "access hash from Game constructor" } }, "inputGameShortName": { "comment": "Game by short name", "arguments": { "bot_id": "The bot that provides the game", "short_name": "The game's short name, usually obtained from a game link »" } }, "textPlain": { "comment": "Plain text", "arguments": { "text": "Text" } }, "highScore": { "comment": "Game highscore", "arguments": { "pos": "Position in highscore list", "user_id": "User ID", "score": "Score" } }, "textItalic": { "comment": "Italic text", "arguments": { "text": "Text" } }, "textUnderline": { "comment": "Underlined text", "arguments": { "text": "Text" } }, "textEmpty": { "comment": "Empty rich text element", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messages.highScores": { "comment": "Highscores in a game", "arguments": { "scores": "Highscores", "users": "Users, associated to the highscores" } }, "textUrl": { "comment": "Link", "arguments": { "text": "Text of link", "url": "Webpage HTTP URL", "webpage_id": "If a preview was already generated for the page, the page ID" } }, "textBold": { "comment": "Bold text", "arguments": { "text": "Text" } }, "textFixed": { "comment": "fixed-width rich text", "arguments": { "text": "Text" } }, "textConcat": { "comment": "Concatenation of rich texts", "arguments": { "texts": "Concatenated rich texts" } }, "textSubscript": { "comment": "Subscript text", "arguments": { "text": "Text" } }, "textStrike": { "comment": "Strikethrough text", "arguments": { "text": "Text" } }, "textEmail": { "comment": "Rich text email link", "arguments": { "text": "Link text", "email": "Email address" } }, "textSuperscript": { "comment": "Superscript text", "arguments": { "text": "Text" } }, "textMarked": { "comment": "Highlighted text", "arguments": { "text": "Text" } }, "textAnchor": { "comment": "Text linking to another section of the page", "arguments": { "text": "Text", "name": "Section name" } }, "textImage": { "comment": "Inline image", "arguments": { "document_id": "Document ID", "w": "Width", "h": "Height" } }, "textPhone": { "comment": "Rich text linked to a phone number", "arguments": { "text": "Text", "phone": "Phone number" } }, "pageBlockTitle": { "comment": "Title", "arguments": { "text": "Title" } }, "pageBlockSubtitle": { "comment": "Subtitle", "arguments": { "text": "Text" } }, "pageBlockAuthorDate": { "comment": "Author and date of creation of article", "arguments": { "author": "Author name", "published_date": "Date of publication" } }, "pageBlockSubheader": { "comment": "Subheader", "arguments": { "text": "Subheader" } }, "pageBlockHeader": { "comment": "Page header", "arguments": { "text": "Contents" } }, "pageBlockParagraph": { "comment": "A paragraph", "arguments": { "text": "Text" } }, "pageBlockDivider": { "comment": "An empty block separating a page", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "pageBlockPreformatted": { "comment": "Preformatted (
     text)", "arguments": { "text": "Text", "language": "Programming language of preformatted text" } }, "pageBlockFooter": { "comment": "Page footer", "arguments": { "text": "Contents" } }, "pageBlockList": { "comment": "Unordered list of IV blocks", "arguments": { "items": "List of blocks in an IV page" } }, "pageBlockBlockquote": { "comment": "Quote (equivalent to the HTML 
    )", "arguments": { "text": "Quote contents", "caption": "Caption" } }, "pageBlockAnchor": { "comment": "Link to section within the page itself (like anchor)", "arguments": { "name": "Name of target section" } }, "pageBlockPullquote": { "comment": "Pullquote", "arguments": { "text": "Text", "caption": "Caption" } }, "pageBlockCover": { "comment": "A page cover", "arguments": { "cover": "Cover" } }, "pageBlockUnsupported": { "comment": "Unsupported IV element", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "pageBlockPhoto": { "comment": "A photo", "arguments": { "flags": "Flags, see TL conditional fields", "photo_id": "Photo ID", "caption": "Caption", "url": "HTTP URL of page the photo leads to when clicked", "webpage_id": "ID of preview of the page the photo leads to when clicked" } }, "pageBlockEmbed": { "comment": "An embedded webpage", "arguments": { "flags": "Flags, see TL conditional fields", "full_width": "Whether the block should be full width", "allow_scrolling": "Whether scrolling should be allowed", "url": "Web page URL, if available", "html": "HTML-markup of the embedded page", "poster_photo_id": "Poster photo, if available", "w": "Block width, if known", "h": "Block height, if known", "caption": "Caption" } }, "pageBlockVideo": { "comment": "Video", "arguments": { "flags": "Flags, see TL conditional fields", "autoplay": "Whether the video is set to autoplay", "loop": "Whether the video is set to loop", "video_id": "Video ID", "caption": "Caption" } }, "pageBlockSlideshow": { "comment": "Slideshow", "arguments": { "items": "Slideshow items", "caption": "Caption" } }, "pageBlockCollage": { "comment": "Collage of media", "arguments": { "items": "Media elements", "caption": "Caption" } }, "pageBlockChannel": { "comment": "Reference to a telegram channel", "arguments": { "channel": "The channel/supergroup/chat" } }, "pageBlockKicker": { "comment": "Kicker", "arguments": { "text": "Contents" } }, "pageBlockTable": { "comment": "Table", "arguments": { "flags": "Flags, see TL conditional fields", "bordered": "Does the table have a visible border?", "striped": "Is the table striped?", "title": "Title", "rows": "Table rows" } }, "pageBlockEmbedPost": { "comment": "An embedded post", "arguments": { "url": "Web page URL", "webpage_id": "ID of generated webpage preview", "author_photo_id": "ID of the author's photo", "author": "Author name", "date": "Creation date", "blocks": "Post contents", "caption": "Caption" } }, "pageBlockOrderedList": { "comment": "Ordered list of IV blocks", "arguments": { "items": "List items" } }, "pageBlockMap": { "comment": "A map", "arguments": { "geo": "Location of the map center", "zoom": "Map zoom level; 13-20", "w": "Map width in pixels before applying scale; 16-102", "h": "Map height in pixels before applying scale; 16-1024", "caption": "Caption" } }, "phoneCallDiscardReasonMissed": { "comment": "The phone call was missed", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "phoneCallDiscardReasonDisconnect": { "comment": "The phone call was disconnected", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "pageBlockDetails": { "comment": "A collapsible details block", "arguments": { "flags": "Flags, see TL conditional fields", "open": "Whether the block is open by default", "blocks": "Block contents", "title": "Always visible heading for the block" } }, "pageBlockRelatedArticles": { "comment": "Related articles", "arguments": { "title": "Title", "articles": "Related articles" } }, "phoneCallDiscardReasonHangup": { "comment": "The phone call was ended normally", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "pageBlockAudio": { "comment": "Audio", "arguments": { "audio_id": "Audio ID (to be fetched from the container {@link RawPage} constructor", "caption": "Audio caption" } }, "dataJSON": { "comment": "Represents a json-encoded object", "arguments": { "data": "JSON-encoded object" } }, "labeledPrice": { "comment": "This object represents a portion of the price for goods or services.", "arguments": { "label": "Portion label", "amount": "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." } }, "phoneCallDiscardReasonBusy": { "comment": "The phone call was discarded because the user is busy in another call", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "invoice": { "comment": "Invoice", "arguments": { "flags": "Flags, see TL conditional fields", "test": "Test invoice", "name_requested": "Set this flag if you require the user's full name to complete the order", "phone_requested": "Set this flag if you require the user's phone number to complete the order", "email_requested": "Set this flag if you require the user's email address to complete the order", "shipping_address_requested": "Set this flag if you require the user's shipping address to complete the order", "flexible": "Set this flag if the final price depends on the shipping method", "phone_to_provider": "Set this flag if user's phone number should be sent to provider", "email_to_provider": "Set this flag if user's email address should be sent to provider", "recurring": "Whether this is a recurring payment", "currency": "Three-letter ISO 4217 currency code, or XTR for Telegram Stars.", "prices": "Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)", "max_tip_amount": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", "suggested_tip_amounts": "A vector of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.", "terms_url": "Terms of service URL" } }, "paymentCharge": { "comment": "Payment identifier", "arguments": { "id": "Telegram payment identifier", "provider_charge_id": "Provider payment identifier" } }, "postAddress": { "comment": "Shipping address", "arguments": { "street_line1": "First line for the address", "street_line2": "Second line for the address", "city": "City", "state": "State, if applicable (empty otherwise)", "country_iso2": "ISO 3166-1 alpha-2 country code", "post_code": "Address post code" } }, "webDocument": { "comment": "Remote document", "arguments": { "url": "Document URL", "access_hash": "Access hash", "size": "File size", "mime_type": "MIME type", "attributes": "Attributes for media types" } }, "paymentRequestedInfo": { "comment": "Order info provided by the user", "arguments": { "flags": "Flags, see TL conditional fields", "name": "User's full name", "phone": "User's phone number", "email": "User's email address", "shipping_address": "User's shipping address" } }, "webDocumentNoProxy": { "comment": "Remote document that can be downloaded without proxying through telegram", "arguments": { "url": "Document URL", "size": "File size", "mime_type": "MIME type", "attributes": "Attributes for media types" } }, "paymentSavedCredentialsCard": { "comment": "Saved credit card", "arguments": { "id": "Card ID", "title": "Title" } }, "inputWebFileLocation": { "comment": "Location of a remote HTTP(s) file", "arguments": { "url": "HTTP URL of file", "access_hash": "Access hash" } }, "inputWebFileGeoPointLocation": { "comment": "Used to download a server-generated image with the map preview from a {@link RawGeoPoint}, see the webfile docs for more info ».", "arguments": { "geo_point": "Generated from the lat, long and accuracy_radius parameters of the {@link RawGeoPoint}", "access_hash": "Access hash of the {@link RawGeoPoint}", "w": "Map width in pixels before applying scale; 16-1024", "h": "Map height in pixels before applying scale; 16-1024", "zoom": "Map zoom level; 13-20", "scale": "Map scale; 1-3" } }, "inputWebDocument": { "comment": "The document", "arguments": { "url": "Remote document URL to be downloaded using the appropriate method", "size": "Remote file size", "mime_type": "Mime type", "attributes": "Attributes for media types" } }, "upload.webFile": { "comment": "Represents a chunk of an HTTP webfile downloaded through telegram's secure MTProto servers", "arguments": { "size": "File size", "mime_type": "Mime type", "file_type": "File type", "mtime": "Modified time", "bytes": "Data" } }, "payments.paymentForm": { "comment": "Payment form", "arguments": { "flags": "Flags, see TL conditional fields", "can_save_credentials": "Whether the user can choose to save credentials.", "password_missing": "Indicates that the user can save payment credentials, but only after setting up a 2FA password (currently the account doesn't have a 2FA password)", "form_id": "Form ID", "bot_id": "Bot ID", "title": "Form title", "description": "Description", "photo": "Product photo", "invoice": "Invoice", "provider_id": "Payment provider ID.", "url": "Payment form URL", "native_provider": "Payment provider name.
    One of the following:
    - stripe", "native_params": "Contains information about the payment provider, if available, to support it natively without the need for opening the URL.
    A JSON object that can contain the following fields:

    - apple_pay_merchant_id: Apple Pay merchant ID
    - google_pay_public_key: Google Pay public key
    - need_country: True, if the user country must be provided,
    - need_zip: True, if the user ZIP/postal code must be provided,
    - need_cardholder_name: True, if the cardholder name must be provided
    ", "additional_methods": "Additional payment methods", "saved_info": "Saved server-side order information", "saved_credentials": "Contains information about saved card credentials", "users": "Users" } }, "inputWebFileAudioAlbumThumbLocation": { "comment": "Used to download an album cover for any music file using {@link upload.RawGetWebFileRequest}, see the webfile docs for more info ».", "arguments": { "flags": "Flags, see TL conditional fields", "small": "Used to return a thumbnail with 100x100 resolution (instead of the default 600x600)", "document": "The audio file in question: must NOT be provided in secret chats, provide the title and performer fields instead.", "title": "Song title: should only be used in secret chats, in normal chats provide document instead, as it has more lax rate limits.", "performer": "Song performer: should only be used in secret chats, in normal chats provide document instead, as it has more lax rate limits." } }, "payments.paymentResult": { "comment": "Payment result", "arguments": { "updates": "Info about the payment" } }, "payments.paymentFormStars": { "comment": "Represents a payment form, for payments to be using Telegram Stars, see here » for more info.", "arguments": { "flags": "Flags, see TL conditional fields", "form_id": "Form ID.", "bot_id": "Bot ID.", "title": "Form title", "description": "Description", "photo": "Product photo", "invoice": "Invoice", "users": "Info about users mentioned in the other fields." } }, "payments.paymentVerificationNeeded": { "comment": "Payment was not successful, additional verification is needed", "arguments": { "url": "URL for additional payment credentials verification" } }, "payments.paymentReceiptStars": { "comment": "Receipt for payment made using Telegram Stars.", "arguments": { "flags": "Flags, see TL conditional fields", "date": "Date of generation", "bot_id": "Bot ID", "title": "Title", "description": "Description", "photo": "Product photo", "invoice": "Invoice", "currency": "Currency, always XTR.", "total_amount": "Amount of Telegram Stars.", "transaction_id": "Transaction ID", "users": "Info about users mentioned in the other fields." } }, "payments.savedInfo": { "comment": "Saved server-side order information", "arguments": { "flags": "Flags, see TL conditional fields", "has_saved_credentials": "Whether the user has some saved payment credentials", "saved_info": "Saved server-side order information" } }, "payments.validatedRequestedInfo": { "comment": "Validated user-provided info", "arguments": { "flags": "Flags, see TL conditional fields", "id": "ID", "shipping_options": "Shipping options" } }, "inputPaymentCredentialsSaved": { "comment": "Saved payment credentials", "arguments": { "id": "Credential ID", "tmp_password": "Temporary password" } }, "inputPaymentCredentials": { "comment": "Payment credentials", "arguments": { "flags": "Flags, see TL conditional fields", "save": "Save payment credential for future use", "data": "Payment credentials" } }, "inputPaymentCredentialsApplePay": { "comment": "Apple pay payment credentials", "arguments": { "payment_data": "Payment data" } }, "inputStickerSetItem": { "comment": "Sticker in a stickerset", "arguments": { "flags": "Flags, see TL conditional fields", "document": "The sticker", "emoji": "Associated emoji", "mask_coords": "Coordinates for mask sticker", "keywords": "Set of keywords, separated by commas (can't be provided for mask stickers)" } }, "inputPhoneCall": { "comment": "Phone call", "arguments": { "id": "Call ID", "access_hash": "Access hash" } }, "shippingOption": { "comment": "Shipping option", "arguments": { "id": "Option ID", "title": "Title", "prices": "List of price portions" } }, "inputPaymentCredentialsGooglePay": { "comment": "Google Pay payment credentials", "arguments": { "payment_token": "Payment token" } }, "account.tmpPassword": { "comment": "Temporary payment password", "arguments": { "tmp_password": "Temporary password", "valid_until": "Validity period" } }, "phoneCallEmpty": { "comment": "Empty constructor", "arguments": { "id": "Call ID" } }, "phoneCallRequested": { "comment": "Requested phone call", "arguments": { "flags": "Flags, see TL conditional fields", "video": "Whether this is a video call", "id": "Phone call ID", "access_hash": "Access hash", "date": "When was the phone call created", "admin_id": "ID of the creator of the phone call", "participant_id": "ID of the other participant of the phone call", "g_a_hash": "Parameter for key exchange", "protocol": "Call protocol info to be passed to libtgvoip" } }, "phoneCallWaiting": { "comment": "Incoming phone call", "arguments": { "flags": "Flags, see TL conditional fields", "video": "Is this a video call", "id": "Call ID", "access_hash": "Access hash", "date": "Date", "admin_id": "Admin ID", "participant_id": "Participant ID", "protocol": "Phone call protocol info", "receive_date": "When was the phone call received" } }, "phoneCall": { "comment": "Phone call", "arguments": { "flags": "Flags, see TL conditional fields", "p2p_allowed": "Whether P2P connection to the other peer is allowed", "video": "Whether this is a video call", "id": "Call ID", "access_hash": "Access hash", "date": "Date of creation of the call", "admin_id": "User ID of the creator of the call", "participant_id": "User ID of the other participant in the call", "g_a_or_b": "Parameter for key exchange", "key_fingerprint": "Key fingerprint", "protocol": "Call protocol info to be passed to libtgvoip", "connections": "List of endpoints the user can connect to exchange call data", "start_date": "When was the call actually started", "custom_parameters": "Custom JSON-encoded call parameters to be passed to tgcalls." } }, "phoneCallAccepted": { "comment": "An accepted phone call", "arguments": { "flags": "Flags, see TL conditional fields", "video": "Whether this is a video call", "id": "ID of accepted phone call", "access_hash": "Access hash of phone call", "date": "When was the call accepted", "admin_id": "ID of the call creator", "participant_id": "ID of the other user in the call", "g_b": "B parameter for secure E2E phone call key exchange", "protocol": "Protocol to use for phone call" } }, "phoneCallDiscarded": { "comment": "Indicates a discarded phone call", "arguments": { "flags": "Flags, see TL conditional fields", "need_rating": "Whether the server required the user to {@link phone.RawSetCallRatingRequest} the call", "need_debug": "Whether the server required the client to {@link phone.RawSaveCallDebugRequest} the libtgvoip call debug data", "video": "Whether the call was a video call", "id": "Call ID", "reason": "Why was the phone call discarded", "duration": "Duration of the phone call in seconds" } }, "phoneConnectionWebrtc": { "comment": "WebRTC connection parameters", "arguments": { "flags": "Flags, see TL conditional fields", "turn": "Whether this is a TURN endpoint", "stun": "Whether this is a STUN endpoint", "id": "Endpoint ID", "ip": "IP address", "ipv6": "IPv6 address", "port": "Port", "username": "Username", "password": "Password" } }, "phoneCallProtocol": { "comment": "Protocol info for libtgvoip", "arguments": { "flags": "Flags, see TL conditional fields", "udp_p2p": "Whether to allow P2P connection to the other participant", "udp_reflector": "Whether to allow connection to the other participants through the reflector servers", "min_layer": "Minimum layer for remote libtgvoip", "max_layer": "Maximum layer for remote libtgvoip", "library_versions": "When using {@link phone.RawRequestCallRequest} and {@link phone.RawAcceptCallRequest}, specify all library versions supported by the client.
    The server will merge and choose the best library version supported by both peers, returning only the best value in the result of the callee's {@link phone.RawAcceptCallRequest} and in the {@link RawPhoneCallAccepted} update received by the caller." } }, "payments.paymentReceipt": { "comment": "Receipt", "arguments": { "flags": "Flags, see TL conditional fields", "date": "Date of generation", "bot_id": "Bot ID", "provider_id": "Provider ID", "title": "Title", "description": "Description", "photo": "Photo", "invoice": "Invoice", "info": "Info", "shipping": "Selected shipping option", "tip_amount": "Tipped amount", "currency": "Three-letter ISO 4217 currency code", "total_amount": "Total amount in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", "credentials_title": "Payment credential name", "users": "Users" } }, "phoneConnection": { "comment": "Identifies an endpoint that can be used to connect to the other user in a phone call", "arguments": { "flags": "Flags, see TL conditional fields", "tcp": "Whether TCP should be used", "id": "Endpoint ID", "ip": "IP address of endpoint", "ipv6": "IPv6 address of endpoint", "port": "Port ID", "peer_tag": "Our peer tag" } }, "phone.phoneCall": { "comment": "A VoIP phone call", "arguments": { "phone_call": "The VoIP phone call", "users": "VoIP phone call participants" } }, "upload.cdnFileReuploadNeeded": { "comment": "The file was cleared from the temporary RAM cache of the CDN and has to be re-uploaded.", "arguments": { "request_token": "Request token (see CDN)" } }, "upload.cdnFile": { "comment": "Represent a chunk of a CDN file.", "arguments": { "bytes": "The data" } }, "cdnPublicKey": { "comment": "Public key to use only during handshakes to CDN DCs.", "arguments": { "dc_id": "CDN DC ID", "public_key": "RSA public key" } }, "cdnConfig": { "comment": "Configuration for CDN file downloads.", "arguments": { "public_keys": "Vector of public keys to use only during handshakes to CDN DCs." } }, "langPackString": { "comment": "Translated localization string", "arguments": { "key": "Language key", "value": "Value" } }, "langPackLanguage": { "comment": "Identifies a localization pack", "arguments": { "flags": "Flags, see TL conditional fields", "official": "Whether the language pack is official", "rtl": "Is this a localization pack for an RTL language", "beta": "Is this a beta localization pack?", "name": "Language name", "native_name": "Language name in the language itself", "lang_code": "Language code (pack identifier)", "base_lang_code": "Identifier of a base language pack; may be empty. If a string is missed in the language pack, then it should be fetched from base language pack. Unsupported in custom language packs", "plural_code": "A language code to be used to apply plural forms. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info", "strings_count": "Total number of non-deleted strings from the language pack", "translated_count": "Total number of translated strings from the language pack", "translations_url": "Link to language translation interface; empty for custom local language packs" } }, "langPackStringPluralized": { "comment": "A language pack string which has different forms based on the number of some object it mentions. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info", "arguments": { "flags": "Flags, see TL conditional fields", "key": "Localization key", "zero_value": "Value for zero objects", "one_value": "Value for one object", "two_value": "Value for two objects", "few_value": "Value for a few objects", "many_value": "Value for many objects", "other_value": "Default value" } }, "channelAdminLogEventActionChangeAbout": { "comment": "The description was changed", "arguments": { "prev_value": "Previous description", "new_value": "New description" } }, "langPackDifference": { "comment": "Changes to the app's localization pack", "arguments": { "lang_code": "Language code", "from_version": "Previous version number", "version": "New version number", "strings": "Localized strings" } }, "channelAdminLogEventActionChangeTitle": { "comment": "Channel/supergroup title was changed", "arguments": { "prev_value": "Previous title", "new_value": "New title" } }, "langPackStringDeleted": { "comment": "Deleted localization string", "arguments": { "key": "Localization key" } }, "channelAdminLogEventActionToggleInvites": { "comment": "Invites were enabled/disabled", "arguments": { "new_value": "New value" } }, "channelAdminLogEventActionChangeUsername": { "comment": "Channel/supergroup username was changed", "arguments": { "prev_value": "Old username", "new_value": "New username" } }, "channelAdminLogEventActionUpdatePinned": { "comment": "A message was pinned", "arguments": { "message": "The message that was pinned" } }, "channelAdminLogEventActionEditMessage": { "comment": "A message was edited", "arguments": { "prev_message": "Old message", "new_message": "New message" } }, "channelAdminLogEventActionDeleteMessage": { "comment": "A message was deleted", "arguments": { "message": "The message that was deleted" } }, "channelAdminLogEventActionToggleSignatures": { "comment": "Channel signatures were enabled/disabled", "arguments": { "new_value": "New value" } }, "channelAdminLogEventActionParticipantLeave": { "comment": "A user left the channel/supergroup (in the case of big groups, info of the user that has joined isn't shown)", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "channelAdminLogEventActionParticipantJoin": { "comment": "A user has joined the group (in the case of big groups, info of the user that has joined isn't shown)", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "channelAdminLogEventActionChangePhoto": { "comment": "The channel/supergroup's picture was changed", "arguments": { "prev_photo": "Previous picture", "new_photo": "New picture" } }, "channelAdminLogEventActionParticipantInvite": { "comment": "A user was invited to the group", "arguments": { "participant": "The user that was invited" } }, "channelAdminLogEventActionParticipantToggleAdmin": { "comment": "The admin rights of a user were changed", "arguments": { "prev_participant": "Previous admin rights", "new_participant": "New admin rights" } }, "channelAdminLogEventActionParticipantToggleBan": { "comment": "The banned rights of a user were changed", "arguments": { "prev_participant": "Old banned rights of user", "new_participant": "New banned rights of user" } }, "channelAdminLogEventActionChangeStickerSet": { "comment": "The supergroup's stickerset was changed", "arguments": { "prev_stickerset": "Previous stickerset", "new_stickerset": "New stickerset" } }, "channelAdminLogEventActionDefaultBannedRights": { "comment": "The default banned rights were modified", "arguments": { "prev_banned_rights": "Previous global banned rights", "new_banned_rights": "New global banned rights." } }, "channelAdminLogEventActionTogglePreHistoryHidden": { "comment": "The hidden prehistory setting was {@link channels.RawTogglePreHistoryHiddenRequest}", "arguments": { "new_value": "New value" } }, "channelAdminLogEventActionChangeLinkedChat": { "comment": "The linked chat was changed", "arguments": { "prev_value": "Previous linked chat", "new_value": "New linked chat" } }, "channelAdminLogEventActionStopPoll": { "comment": "A poll was stopped", "arguments": { "message": "The poll that was stopped" } }, "channelAdminLogEventActionChangeLocation": { "comment": "The geo group location was changed", "arguments": { "prev_value": "Previous location", "new_value": "New location" } }, "channelAdminLogEventActionToggleSlowMode": { "comment": "{@link channels.RawToggleSlowModeRequest}", "arguments": { "prev_value": "Previous slow mode value", "new_value": "New slow mode value" } }, "channelAdminLogEventActionDiscardGroupCall": { "comment": "A group call was terminated", "arguments": { "call": "The group call that was terminated" } }, "channelAdminLogEventActionParticipantMute": { "comment": "A group call participant was muted", "arguments": { "participant": "The participant that was muted" } }, "channelAdminLogEventActionParticipantUnmute": { "comment": "A group call participant was unmuted", "arguments": { "participant": "The participant that was unmuted" } }, "channelAdminLogEventActionToggleGroupCallSetting": { "comment": "Group call settings were changed", "arguments": { "join_muted": "Whether all users are muted by default upon joining" } }, "channelAdminLogEventActionParticipantJoinByInvite": { "comment": "A user joined the supergroup/channel using a specific invite link", "arguments": { "flags": "Flags, see TL conditional fields", "via_chatlist": "The participant joined by importing a chat folder deep link ».", "invite": "The invite link used to join the supergroup/channel" } }, "channelAdminLogEventActionExportedInviteDelete": { "comment": "A chat invite was deleted", "arguments": { "invite": "The deleted chat invite" } }, "channelAdminLogEventActionStartGroupCall": { "comment": "A group call was started", "arguments": { "call": "Group call" } }, "channelAdminLogEventActionExportedInviteRevoke": { "comment": "A specific invite link was revoked", "arguments": { "invite": "The invite link that was revoked" } }, "channelAdminLogEventActionExportedInviteEdit": { "comment": "A chat invite was edited", "arguments": { "prev_invite": "Previous chat invite information", "new_invite": "New chat invite information" } }, "channelAdminLogEventActionChangeHistoryTTL": { "comment": "The Time-To-Live of messages in this chat was changed", "arguments": { "prev_value": "Previous value", "new_value": "New value" } }, "channelAdminLogEventActionParticipantJoinByRequest": { "comment": "A new member was accepted to the chat by an admin", "arguments": { "invite": "The invite link that was used to join the chat", "approved_by": "ID of the admin that approved the invite" } }, "channelAdminLogEventActionChangeAvailableReactions": { "comment": "The set of allowed message reactions » for this channel has changed", "arguments": { "prev_value": "Previously allowed reaction emojis", "new_value": "New allowed reaction emojis" } }, "channelAdminLogEventActionToggleForum": { "comment": "Forum functionality was enabled or disabled.", "arguments": { "new_value": "Whether forum functionality was enabled or disabled." } }, "channelAdminLogEventActionParticipantVolume": { "comment": "channelAdminLogEvent.user_id has set the volume of participant.peer to participant.volume", "arguments": { "participant": "The participant whose volume was changed" } }, "channelAdminLogEventActionSendMessage": { "comment": "A message was posted in a channel", "arguments": { "message": "The message that was sent" } }, "channelAdminLogEventActionChangeUsernames": { "comment": "The list of usernames associated with the channel was changed", "arguments": { "prev_value": "Previous set of usernames", "new_value": "New set of usernames" } }, "channelAdminLogEventActionCreateTopic": { "comment": "A forum topic was created", "arguments": { "topic": "The forum topic that was created" } }, "channelAdminLogEventActionToggleNoForwards": { "comment": "Forwards were enabled or disabled", "arguments": { "new_value": "Old value" } }, "channelAdminLogEventActionEditTopic": { "comment": "A forum topic was edited", "arguments": { "prev_topic": "Previous topic information", "new_topic": "New topic information" } }, "channelAdminLogEventActionChangePeerColor": { "comment": "The message accent color was changed", "arguments": { "prev_value": "Previous accent palette", "new_value": "New accent palette" } }, "channelAdminLogEventActionChangeWallpaper": { "comment": "The wallpaper was changed", "arguments": { "prev_value": "Previous wallpaper", "new_value": "New wallpaper" } }, "channelAdminLogEventActionChangeProfilePeerColor": { "comment": "The profile accent color was changed", "arguments": { "prev_value": "Previous accent palette", "new_value": "New accent palette" } }, "channelAdminLogEventActionToggleAntiSpam": { "comment": "Native antispam functionality was enabled or disabled.", "arguments": { "new_value": "Whether antispam functionality was enabled or disabled." } }, "channelAdminLogEventActionChangeEmojiStatus": { "comment": "The emoji status was changed", "arguments": { "prev_value": "Previous emoji status", "new_value": "New emoji status" } }, "channelAdminLogEventActionPinTopic": { "comment": "A forum topic was pinned or unpinned", "arguments": { "flags": "Flags, see TL conditional fields", "prev_topic": "Previous topic information", "new_topic": "New topic information" } }, "channelAdminLogEventActionChangeEmojiStickerSet": { "comment": "The supergroup's custom emoji stickerset was changed.", "arguments": { "prev_stickerset": "Old value", "new_stickerset": "New value" } }, "channels.adminLogResults": { "comment": "Admin log events", "arguments": { "events": "Admin log events", "chats": "Chats mentioned in events", "users": "Users mentioned in events" } }, "channelAdminLogEvent": { "comment": "Admin log event", "arguments": { "id": "Event ID", "date": "Date", "user_id": "User ID", "action": "Action" } }, "messages.favedStickersNotModified": { "comment": "No new favorited stickers were found", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "popularContact": { "comment": "Popular contact", "arguments": { "client_id": "Contact identifier", "importers": "How many people imported this contact" } }, "recentMeUrlUnknown": { "comment": "Unknown t.me url", "arguments": { "url": "URL" } }, "channelAdminLogEventsFilter": { "comment": "Filter only certain admin log events", "arguments": { "flags": "Flags, see TL conditional fields", "join": "{@link RawChannelAdminLogEventActionParticipantJoin}, including {@link RawChannelAdminLogEventActionParticipantJoinByInvite} and {@link RawChannelAdminLogEventActionParticipantJoinByRequest}.", "leave": "{@link RawChannelAdminLogEventActionParticipantLeave}", "invite": "{@link RawChannelAdminLogEventActionParticipantInvite}", "ban": "{@link RawChannelAdminLogEventActionParticipantToggleBan}", "unban": "{@link RawChannelAdminLogEventActionParticipantToggleBan}", "kick": "{@link RawChannelAdminLogEventActionParticipantToggleBan}", "unkick": "{@link RawChannelAdminLogEventActionParticipantToggleBan}", "promote": "{@link RawChannelAdminLogEventActionParticipantToggleAdmin}", "demote": "{@link RawChannelAdminLogEventActionParticipantToggleAdmin}", "info": "Info change events (when {@link RawChannelAdminLogEventActionChangeAbout}, {@link RawChannelAdminLogEventActionChangeLinkedChat}, {@link RawChannelAdminLogEventActionChangeLocation}, {@link RawChannelAdminLogEventActionChangePhoto}, {@link RawChannelAdminLogEventActionChangeStickerSet}, {@link RawChannelAdminLogEventActionChangeTitle} or {@link RawChannelAdminLogEventActionChangeUsername}, {@link RawChannelAdminLogEventActionToggleSlowMode}, {@link RawChannelAdminLogEventActionChangeHistoryTTL} settings of a channel gets modified)", "settings": "Settings change events ({@link RawChannelAdminLogEventActionToggleInvites}, {@link RawChannelAdminLogEventActionTogglePreHistoryHidden}, {@link RawChannelAdminLogEventActionToggleSignatures}, {@link RawChannelAdminLogEventActionDefaultBannedRights}, {@link RawChannelAdminLogEventActionToggleForum})", "pinned": "{@link RawChannelAdminLogEventActionUpdatePinned}", "edit": "{@link RawChannelAdminLogEventActionEditMessage}", "delete": "{@link RawChannelAdminLogEventActionDeleteMessage}", "group_call": "Group call events", "invites": "Invite events", "send": "A message was posted in a channel", "forums": "Forum-related events" } }, "messages.favedStickers": { "comment": "Favorited stickers", "arguments": { "hash": "Hash used for caching, for more info click here", "packs": "Emojis associated to stickers", "stickers": "Favorited stickers" } }, "channelAdminLogEventActionDeleteTopic": { "comment": "A forum topic was deleted", "arguments": { "topic": "The forum topic that was deleted" } }, "recentMeUrlChat": { "comment": "Recent t.me link to a chat", "arguments": { "url": "t.me URL", "chat_id": "Chat ID" } }, "recentMeUrlStickerSet": { "comment": "Recent t.me stickerset installation URL", "arguments": { "url": "t.me URL", "set": "Stickerset" } }, "recentMeUrlChatInvite": { "comment": "Recent t.me invite link to a chat", "arguments": { "url": "t.me URL", "chat_invite": "Chat invitation" } }, "help.recentMeUrls": { "comment": "Recent t.me URLs", "arguments": { "urls": "URLs", "chats": "Chats", "users": "Users" } }, "recentMeUrlUser": { "comment": "Recent t.me link to a user", "arguments": { "url": "URL", "user_id": "User ID" } }, "webAuthorization": { "comment": "Represents a bot logged in using the Telegram login widget", "arguments": { "hash": "Authorization hash", "bot_id": "Bot ID", "domain": "The domain name of the website on which the user has logged in.", "browser": "Browser user-agent", "platform": "Platform", "date_created": "When was the web session created", "date_active": "When was the web session last active", "ip": "IP address", "region": "Region, determined from IP address" } }, "account.webAuthorizations": { "comment": "Web authorizations", "arguments": { "authorizations": "Web authorization list", "users": "Users" } }, "inputMessageID": { "comment": "Message by ID", "arguments": { "id": "Message ID" } }, "inputMessageReplyTo": { "comment": "Message to which the specified message replies to", "arguments": { "id": "ID of the message that replies to the message we need" } }, "inputSingleMedia": { "comment": "A single media in an album or grouped media sent with {@link messages.RawSendMultiMediaRequest}.", "arguments": { "flags": "Flags, see TL conditional fields", "media": "The media", "random_id": "Unique client media ID required to prevent message resending", "message": "A caption for the media", "entities": "Message entities for styled text" } }, "inputDialogPeerFolder": { "comment": "All peers in a peer folder", "arguments": { "folder_id": "Peer folder ID, for more info click here" } }, "inputDialogPeer": { "comment": "A peer", "arguments": { "peer": "Peer" } }, "inputMessageCallbackQuery": { "comment": "Used by bots for fetching information about the message that originated a callback query", "arguments": { "id": "Message ID", "query_id": "Callback query ID" } }, "inputMessagePinned": { "comment": "Pinned message", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "dialogPeer": { "comment": "Peer", "arguments": { "peer": "Peer" } }, "dialogPeerFolder": { "comment": "Peer folder", "arguments": { "folder_id": "Peer folder ID, for more info click here" } }, "messages.foundStickerSetsNotModified": { "comment": "No further results were found", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messages.foundStickerSets": { "comment": "Found stickersets", "arguments": { "hash": "Hash used for caching, for more info click here", "sets": "Found stickersets" } }, "fileHash": { "comment": "SHA256 Hash of an uploaded file, to be checked for validity after download", "arguments": { "offset": "Offset from where to start computing SHA-256 hash", "limit": "Length", "hash": "SHA-256 Hash of file chunk, to be checked for validity after download" } }, "help.termsOfServiceUpdateEmpty": { "comment": "No changes were made to telegram's terms of service", "arguments": { "expires": "New TOS updates will have to be queried using {@link help.RawGetTermsOfServiceUpdateRequest} in expires seconds" } }, "inputSecureFileUploaded": { "comment": "Uploaded secure file, for more info see the passport docs »", "arguments": { "id": "Secure file ID", "parts": "Secure file part count", "md5_checksum": "MD5 hash of encrypted uploaded file, to be checked server-side", "file_hash": "File hash", "secret": "Secret" } }, "inputSecureFile": { "comment": "Pre-uploaded passport file, for more info see the passport docs »", "arguments": { "id": "Secure file ID", "access_hash": "Secure file access hash" } }, "help.termsOfServiceUpdate": { "comment": "Info about an update of telegram's terms of service. If the terms of service are declined, then the {@link account.RawDeleteAccountRequest} method should be called with the reason \"Decline ToS update\"", "arguments": { "expires": "New TOS updates will have to be queried using {@link help.RawGetTermsOfServiceUpdateRequest} in expires seconds", "terms_of_service": "New terms of service" } }, "secureFile": { "comment": "Secure passport file, for more info see the passport docs »", "arguments": { "id": "ID", "access_hash": "Access hash", "size": "File size", "dc_id": "DC ID", "date": "Date of upload", "file_hash": "File hash", "secret": "Secret" } }, "secureFileEmpty": { "comment": "Empty constructor", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputClientProxy": { "comment": "Info about an MTProxy used to connect.", "arguments": { "address": "Proxy address", "port": "Proxy port" } }, "secureData": { "comment": "Secure passport data, for more info see the passport docs »", "arguments": { "data": "Data", "data_hash": "Data hash", "secret": "Secret" } }, "secureValueTypeDriverLicense": { "comment": "Driver's license", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "securePlainEmail": { "comment": "Email address to use in telegram passport: it must be verified, first ».", "arguments": { "email": "Email address" } }, "secureValueTypePassport": { "comment": "Passport", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "securePlainPhone": { "comment": "Phone number to use in telegram passport: it must be verified, first ».", "arguments": { "phone": "Phone number" } }, "secureValueTypePersonalDetails": { "comment": "Personal details", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "secureValueTypeIdentityCard": { "comment": "Identity card", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "secureValueTypeAddress": { "comment": "Address", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "secureValueTypeBankStatement": { "comment": "Bank statement", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "secureValueTypeInternalPassport": { "comment": "Internal passport", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "secureValueTypePassportRegistration": { "comment": "Internal registration passport", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "secureValueTypeTemporaryRegistration": { "comment": "Temporary registration", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "secureValueTypeUtilityBill": { "comment": "Utility bill", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "secureValueTypePhone": { "comment": "Phone", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "secureValueTypeEmail": { "comment": "Email", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "secureValueTypeRentalAgreement": { "comment": "Rental agreement", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "secureValue": { "comment": "Secure value", "arguments": { "flags": "Flags, see TL conditional fields", "type": "Secure passport value type", "data": "Encrypted Telegram Passport element data", "front_side": "Encrypted passport file with the front side of the document", "reverse_side": "Encrypted passport file with the reverse side of the document", "selfie": "Encrypted passport file with a selfie of the user holding the document", "translation": "Array of encrypted passport files with translated versions of the provided documents", "files": "Array of encrypted passport files with photos the of the documents", "plain_data": "Plaintext verified passport data", "hash": "Data hash" } }, "secureValueHash": { "comment": "Secure value hash", "arguments": { "type": "Secure value type", "hash": "Hash" } }, "secureValueErrorFrontSide": { "comment": "Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.", "arguments": { "type": "One of {@link RawSecureValueTypePassport}, {@link RawSecureValueTypeDriverLicense}, {@link RawSecureValueTypeIdentityCard}, {@link RawSecureValueTypeInternalPassport}", "file_hash": "File hash", "text": "Error message" } }, "inputSecureValue": { "comment": "Secure value, for more info see the passport docs »", "arguments": { "flags": "Flags, see TL conditional fields", "type": "Secure passport value type", "data": "Encrypted Telegram Passport element data", "front_side": "Encrypted passport file with the front side of the document", "reverse_side": "Encrypted passport file with the reverse side of the document", "selfie": "Encrypted passport file with a selfie of the user holding the document", "translation": "Array of encrypted passport files with translated versions of the provided documents", "files": "Array of encrypted passport files with photos the of the documents", "plain_data": "Plaintext verified passport data" } }, "secureValueErrorData": { "comment": "Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.", "arguments": { "type": "The section of the user's Telegram Passport which has the error, one of {@link RawSecureValueTypePersonalDetails}, {@link RawSecureValueTypePassport}, {@link RawSecureValueTypeDriverLicense}, {@link RawSecureValueTypeIdentityCard}, {@link RawSecureValueTypeInternalPassport}, {@link RawSecureValueTypeAddress}", "data_hash": "Data hash", "field": "Name of the data field which has the error", "text": "Error message" } }, "secureValueErrorReverseSide": { "comment": "Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.", "arguments": { "type": "One of {@link RawSecureValueTypeDriverLicense}, {@link RawSecureValueTypeIdentityCard}", "file_hash": "File hash", "text": "Error message" } }, "secureValueErrorFile": { "comment": "Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.", "arguments": { "type": "One of {@link RawSecureValueTypeUtilityBill}, {@link RawSecureValueTypeBankStatement}, {@link RawSecureValueTypeRentalAgreement}, {@link RawSecureValueTypePassportRegistration}, {@link RawSecureValueTypeTemporaryRegistration}", "file_hash": "File hash", "text": "Error message" } }, "secureValueErrorSelfie": { "comment": "Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.", "arguments": { "type": "One of {@link RawSecureValueTypePassport}, {@link RawSecureValueTypeDriverLicense}, {@link RawSecureValueTypeIdentityCard}, {@link RawSecureValueTypeInternalPassport}", "file_hash": "File hash", "text": "Error message" } }, "secureValueErrorFiles": { "comment": "Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.", "arguments": { "type": "One of {@link RawSecureValueTypeUtilityBill}, {@link RawSecureValueTypeBankStatement}, {@link RawSecureValueTypeRentalAgreement}, {@link RawSecureValueTypePassportRegistration}, {@link RawSecureValueTypeTemporaryRegistration}", "file_hash": "File hash", "text": "Error message" } }, "secureValueError": { "comment": "Secure value error", "arguments": { "type": "Type of element which has the issue", "hash": "Hash", "text": "Error message" } }, "account.authorizationForm": { "comment": "Telegram Passport authorization form", "arguments": { "flags": "Flags, see TL conditional fields", "required_types": "Required Telegram Passport documents", "values": "Already submitted Telegram Passport documents", "errors": "Telegram Passport errors", "users": "Info about the bot to which the form will be submitted", "privacy_policy_url": "URL of the service's privacy policy" } }, "secureCredentialsEncrypted": { "comment": "Encrypted credentials required to decrypt telegram passport data.", "arguments": { "data": "Encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication, as described in decrypting data »", "hash": "Data hash for data authentication as described in decrypting data »", "secret": "Secret, encrypted with the bot's public RSA key, required for data decryption as described in decrypting data »" } }, "help.deepLinkInfoEmpty": { "comment": "Deep link info empty", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "secureValueErrorTranslationFiles": { "comment": "Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation changes.", "arguments": { "type": "One of {@link RawSecureValueTypePersonalDetails}, {@link RawSecureValueTypePassport}, {@link RawSecureValueTypeDriverLicense}, {@link RawSecureValueTypeIdentityCard}, {@link RawSecureValueTypeInternalPassport}, {@link RawSecureValueTypeUtilityBill}, {@link RawSecureValueTypeBankStatement}, {@link RawSecureValueTypeRentalAgreement}, {@link RawSecureValueTypePassportRegistration}, {@link RawSecureValueTypeTemporaryRegistration}", "file_hash": "Hash", "text": "Error message" } }, "secureValueErrorTranslationFile": { "comment": "Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.", "arguments": { "type": "One of {@link RawSecureValueTypePersonalDetails}, {@link RawSecureValueTypePassport}, {@link RawSecureValueTypeDriverLicense}, {@link RawSecureValueTypeIdentityCard}, {@link RawSecureValueTypeInternalPassport}, {@link RawSecureValueTypeUtilityBill}, {@link RawSecureValueTypeBankStatement}, {@link RawSecureValueTypeRentalAgreement}, {@link RawSecureValueTypePassportRegistration}, {@link RawSecureValueTypeTemporaryRegistration}", "file_hash": "File hash", "text": "Error message" } }, "passwordKdfAlgoUnknown": { "comment": "Unknown KDF (most likely, the client is outdated and does not support the specified KDF algorithm)", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "help.deepLinkInfo": { "comment": "Deep link info, see the here for more details", "arguments": { "flags": "Flags, see TL conditional fields", "update_app": "An update of the app is required to parse this link", "message": "Message to show to the user", "entities": "Message entities for styled text" } }, "passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow": { "comment": "This key derivation algorithm defines that SRP 2FA login must be used", "arguments": { "salt1": "One of two salts used by the derivation function (see SRP 2FA login)", "salt2": "One of two salts used by the derivation function (see SRP 2FA login)", "g": "Base (see SRP 2FA login)", "p": "2048-bit modulus (see SRP 2FA login)" } }, "account.sentEmailCode": { "comment": "The sent email code", "arguments": { "email_pattern": "The email (to which the code was sent) must match this pattern", "length": "The length of the verification code" } }, "securePasswordKdfAlgoSHA512": { "comment": "SHA512 KDF algo", "arguments": { "salt": "Salt" } }, "securePasswordKdfAlgoPBKDF2HMACSHA512iter100000": { "comment": "PBKDF2 with SHA512 and 100000 iterations KDF algo", "arguments": { "salt": "Salt" } }, "savedPhoneContact": { "comment": "Saved contact", "arguments": { "phone": "Phone number", "first_name": "First name", "last_name": "Last name", "date": "Date added" } }, "account.takeout": { "comment": "Takeout info", "arguments": { "id": "Takeout ID" } }, "inputCheckPasswordEmpty": { "comment": "There is no password", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputCheckPasswordSRP": { "comment": "Constructor for checking the validity of a 2FA SRP password (see SRP)", "arguments": { "srp_id": "SRP ID", "A": "A parameter (see SRP)", "M1": "M1 parameter (see SRP)" } }, "secureRequiredTypeOneOf": { "comment": "One of", "arguments": { "types": "Secure required value types" } }, "secureSecretSettings": { "comment": "Secure settings", "arguments": { "secure_algo": "Secure KDF algo", "secure_secret": "Secure secret", "secure_secret_id": "Secret ID" } }, "help.passportConfigNotModified": { "comment": "Password configuration not modified", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputAppEvent": { "comment": "Event that occurred in the application.", "arguments": { "time": "Client's exact timestamp for the event", "type": "Type of event", "peer": "Arbitrary numeric value for more convenient selection of certain event types, or events referring to a certain object", "data": "Details of the event" } }, "help.passportConfig": { "comment": "Telegram passport configuration", "arguments": { "hash": "Hash used for caching, for more info click here", "countries_langs": "Localization" } }, "securePasswordKdfAlgoUnknown": { "comment": "Unknown KDF algo (most likely the client has to be updated)", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "secureRequiredType": { "comment": "Required type", "arguments": { "flags": "Flags, see TL conditional fields", "native_names": "Native names", "selfie_required": "Is a selfie required", "translation_required": "Is a translation required", "type": "Secure value type" } }, "jsonObjectValue": { "comment": "JSON key: value pair", "arguments": { "key": "Key", "value": "Value" } }, "jsonBool": { "comment": "JSON boolean value", "arguments": { "value": "Value" } }, "jsonNumber": { "comment": "JSON numeric value", "arguments": { "value": "Value" } }, "jsonString": { "comment": "JSON string", "arguments": { "value": "Value" } }, "jsonNull": { "comment": "null JSON value", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "jsonArray": { "comment": "JSON array", "arguments": { "value": "JSON values" } }, "jsonObject": { "comment": "JSON object value", "arguments": { "value": "Values" } }, "pageTableCell": { "comment": "Table cell", "arguments": { "flags": "Flags, see TL conditional fields", "header": "Is this element part of the column header", "align_center": "Horizontally centered block", "align_right": "Right-aligned block", "valign_middle": "Vertically centered block", "valign_bottom": "Block vertically-aligned to the bottom", "text": "Content", "colspan": "For how many columns should this cell extend", "rowspan": "For how many rows should this cell extend" } }, "pageCaption": { "comment": "Page caption", "arguments": { "text": "Caption", "credit": "Credits" } }, "pageListItemText": { "comment": "List item", "arguments": { "text": "Text" } }, "pageTableRow": { "comment": "Table row", "arguments": { "cells": "Table cells" } }, "pageListOrderedItemText": { "comment": "Ordered list of text items", "arguments": { "num": "Number of element within ordered list", "text": "Text" } }, "pageListItemBlocks": { "comment": "List item", "arguments": { "blocks": "Blocks" } }, "pageRelatedArticle": { "comment": "Related article", "arguments": { "flags": "Flags, see TL conditional fields", "url": "URL of article", "webpage_id": "Webpage ID of generated IV preview", "title": "Title", "description": "Description", "photo_id": "ID of preview photo", "author": "Author name", "published_date": "Date of publication" } }, "pageListOrderedItemBlocks": { "comment": "Ordered list of IV blocks", "arguments": { "num": "Number of element within ordered list", "blocks": "Item contents" } }, "page": { "comment": "Instant view page", "arguments": { "flags": "Flags, see TL conditional fields", "part": "Indicates that not full page preview is available to the client and it will need to fetch full Instant View from the server using {@link messages.RawGetWebPagePreviewRequest}.", "rtl": "Whether the page contains RTL text", "v2": "Whether this is an IV v2 page", "url": "Original page HTTP URL", "blocks": "Page elements (like with HTML elements, only as TL constructors)", "photos": "Photos in page", "documents": "Media in page", "views": "View count" } }, "help.userInfo": { "comment": "Internal use", "arguments": { "message": "Info", "entities": "Message entities for styled text", "author": "Author", "date": "Date" } }, "pollAnswer": { "comment": "A possible answer of a poll", "arguments": { "text": "Textual representation of the answer (only Premium users can use custom emoji entities here).", "option": "The param that has to be passed to {@link messages.RawSendVoteRequest}." } }, "help.supportName": { "comment": "Localized name for telegram support", "arguments": { "name": "Localized name" } }, "poll": { "comment": "Poll", "arguments": { "id": "ID of the poll", "flags": "Flags, see TL conditional fields", "closed": "Whether the poll is closed and doesn't accept any more answers", "public_voters": "Whether cast votes are publicly visible to all users (non-anonymous poll)", "multiple_choice": "Whether multiple options can be chosen as answer", "quiz": "Whether this is a quiz (with wrong and correct answers, results shown in the return type)", "question": "The question of the poll (only Premium users can use custom emoji entities here).", "answers": "The possible answers, vote using {@link messages.RawSendVoteRequest}.", "close_period": "Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date.", "close_date": "Point in time (UNIX timestamp in seconds) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future; can't be used together with close_period." } }, "statsURL": { "comment": "URL with chat statistics", "arguments": { "url": "Chat statistics" } }, "chatOnlines": { "comment": "Number of online users in a chat", "arguments": { "onlines": "Number of online users" } }, "chatAdminRights": { "comment": "Represents the rights of an admin in a channel/supergroup.", "arguments": { "flags": "Flags, see TL conditional fields", "change_info": "If set, allows the admin to modify the description of the channel/supergroup", "post_messages": "If set, allows the admin to post messages in the channel", "edit_messages": "If set, allows the admin to also edit messages from other admins in the channel", "delete_messages": "If set, allows the admin to also delete messages from other admins in the channel", "ban_users": "If set, allows the admin to ban users from the channel/supergroup", "invite_users": "If set, allows the admin to invite users in the channel/supergroup", "pin_messages": "If set, allows the admin to pin messages in the channel/supergroup", "add_admins": "If set, allows the admin to add other admins with the same (or more limited) permissions in the channel/supergroup", "anonymous": "Whether this admin is anonymous", "manage_call": "If set, allows the admin to change group call/livestream settings", "other": "Set this flag if none of the other flags are set, but you still want the user to be an admin: if this or any of the other flags are set, the admin can get the chat admin log, get chat statistics, get message statistics in channels, get channel members, see anonymous administrators in supergroups and ignore slow mode.", "manage_topics": "If set, allows the admin to create, delete or modify forum topics ».", "post_stories": "If set, allows the admin to post stories as the channel.", "edit_stories": "If set, allows the admin to edit stories posted by the other admins of the channel.", "delete_stories": "If set, allows the admin to delete stories posted by the other admins of the channel." } }, "pollAnswerVoters": { "comment": "A poll answer, and how users voted on it", "arguments": { "flags": "Flags, see TL conditional fields", "chosen": "Whether we have chosen this answer", "correct": "For quizzes, whether the option we have chosen is correct", "option": "The param that has to be passed to {@link messages.RawSendVoteRequest}.", "voters": "How many users voted for this option" } }, "help.userInfoEmpty": { "comment": "Internal use", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "pollResults": { "comment": "Results of poll", "arguments": { "flags": "Flags, see TL conditional fields", "min": "Similar to min objects, used for poll constructors that are the same for all users so they don't have the option chosen by the current user (you can use {@link messages.RawGetPollResultsRequest} to get the full poll results).", "results": "Poll results", "total_voters": "Total number of people that voted in the poll", "recent_voters": "IDs of the last users that recently voted in the poll", "solution": "Explanation of quiz solution", "solution_entities": "Message entities for styled text in quiz solution" } }, "inputWallPaper": { "comment": "Wallpaper", "arguments": { "id": "Wallpaper ID", "access_hash": "Access hash" } }, "inputWallPaperSlug": { "comment": "Wallpaper by slug (a unique ID, obtained from a wallpaper link »)", "arguments": { "slug": "Unique wallpaper ID" } }, "account.wallPapers": { "comment": "Installed wallpapers", "arguments": { "hash": "Hash used for caching, for more info click here", "wallpapers": "Wallpapers" } }, "wallPaperSettings": { "comment": "Wallpaper rendering information.", "arguments": { "flags": "Flags, see TL conditional fields", "blur": "For image wallpapers »: if set, the JPEG must be downscaled to fit in 450x450 square and then box-blurred with radius 12.", "motion": "If set, the background needs to be slightly moved when the device is rotated.", "background_color": "Used for solid », gradient » and freeform gradient » fills.", "second_background_color": "Used for gradient » and freeform gradient » fills.", "third_background_color": "Used for freeform gradient » fills.", "fourth_background_color": "Used for freeform gradient » fills.", "intensity": "Used for pattern wallpapers ».", "rotation": "Clockwise rotation angle of the gradient, in degrees; 0-359. Should be always divisible by 45.", "emoticon": "If set, this wallpaper can be used as a channel wallpaper and is represented by the specified UTF-8 emoji." } }, "account.wallPapersNotModified": { "comment": "No new wallpapers were found", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "autoDownloadSettings": { "comment": "Autodownload settings", "arguments": { "flags": "Flags, see TL conditional fields", "disabled": "Disable automatic media downloads?", "video_preload_large": "Whether to preload the first seconds of videos larger than the specified limit", "audio_preload_next": "Whether to preload the next audio track when you're listening to music", "phonecalls_less_data": "Whether to enable data saving mode in phone calls", "stories_preload": "Whether to preload stories; in particular, the first {@link RawDocumentAttributeVideo}.preload_prefix_size bytes of story videos should be preloaded.", "photo_size_max": "Maximum size of photos to preload", "video_size_max": "Maximum size of videos to preload", "file_size_max": "Maximum size of other files to preload", "video_upload_maxbitrate": "Maximum suggested bitrate for uploading videos", "small_queue_active_operations_max": "A limit, specifying the maximum number of files that should be downloaded in parallel from the same DC, for files smaller than 20MB.", "large_queue_active_operations_max": "A limit, specifying the maximum number of files that should be downloaded in parallel from the same DC, for files bigger than 20MB." } }, "inputWallPaperNoFile": { "comment": "Wallpaper with no file access hash, used for example when deleting (unsave=true) wallpapers using {@link account.RawSaveWallPaperRequest}, specifying just the wallpaper ID.", "arguments": { "id": "Wallpaper ID" } }, "codeSettings": { "comment": "Settings used by telegram servers for sending the confirm code.\n\nExample implementations: telegram for android, tdlib.", "arguments": { "flags": "Flags, see TL conditional fields", "allow_flashcall": "Whether to allow phone verification via phone calls.", "current_number": "Pass true if the phone number is used on the current device. Ignored if allow_flashcall is not set.", "allow_app_hash": "If a token that will be included in eventually sent SMSs is required: required in newer versions of android, to use the android SMS receiver APIs", "allow_missed_call": "Whether this device supports receiving the code using the {@link auth.RawCodeTypeMissedCall} method", "allow_firebase": "Whether Firebase auth is supported", "unknown_number": "Set this flag if there is a SIM card in the current device, but it is not possible to check whether the specified phone number matches the SIM's phone number.", "logout_tokens": "Previously stored future auth tokens, see the documentation for more info »", "token": "Used only by official iOS apps for Firebase auth: device token for apple push.", "app_sandbox": "Used only by official iOS apps for firebase auth: whether a sandbox-certificate will be used during transmission of the push notification." } }, "chatBannedRights": { "comment": "Represents the rights of a normal user in a supergroup/channel/chat. In this case, the flags are inverted: if set, a flag does not allow a user to do X.", "arguments": { "flags": "Flags, see TL conditional fields", "view_messages": "If set, does not allow a user to view messages in a supergroup/channel/chat", "send_messages": "If set, does not allow a user to send messages in a supergroup/chat", "send_media": "If set, does not allow a user to send any media in a supergroup/chat", "send_stickers": "If set, does not allow a user to send stickers in a supergroup/chat", "send_gifs": "If set, does not allow a user to send gifs in a supergroup/chat", "send_games": "If set, does not allow a user to send games in a supergroup/chat", "send_inline": "If set, does not allow a user to use inline bots in a supergroup/chat.", "embed_links": "If set, does not allow a user to embed links in the messages of a supergroup/chat", "send_polls": "If set, does not allow a user to send polls in a supergroup/chat", "change_info": "If set, does not allow any user to change the description of a supergroup/chat", "invite_users": "If set, does not allow any user to invite users in a supergroup/chat", "pin_messages": "If set, does not allow any user to pin messages in a supergroup/chat", "manage_topics": "If set, does not allow any user to create, delete or modify forum topics ».", "send_photos": "If set, does not allow a user to send photos in a supergroup/chat.", "send_videos": "If set, does not allow a user to send videos in a supergroup/chat.", "send_roundvideos": "If set, does not allow a user to send round videos in a supergroup/chat.", "send_audios": "If set, does not allow a user to send audio files in a supergroup/chat.", "send_voices": "If set, does not allow a user to send voice messages in a supergroup/chat.", "send_docs": "If set, does not allow a user to send documents in a supergroup/chat.", "send_plain": "If set, does not allow a user to send text messages in a supergroup/chat.", "until_date": "Validity of said permissions (it is considered forever any value less then 30 seconds or more then 366 days)." } }, "account.autoDownloadSettings": { "comment": "Media autodownload settings", "arguments": { "low": "Low data usage preset", "medium": "Medium data usage preset", "high": "High data usage preset" } }, "emojiKeyword": { "comment": "Emoji keyword", "arguments": { "keyword": "Keyword", "emoticons": "Emojis associated to keyword" } }, "emojiKeywordDeleted": { "comment": "Deleted emoji keyword", "arguments": { "keyword": "Keyword", "emoticons": "Emojis that were associated to keyword" } }, "emojiKeywordsDifference": { "comment": "Changes to emoji keywords", "arguments": { "lang_code": "Language code for keywords", "from_version": "Previous emoji keyword list version", "version": "Current version of emoji keyword list", "keywords": "Emojis associated to keywords" } }, "emojiURL": { "comment": "An HTTP URL which can be used to automatically log in into translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation", "arguments": { "url": "An HTTP URL which can be used to automatically log in into translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation" } }, "emojiLanguage": { "comment": "Emoji language", "arguments": { "lang_code": "Language code" } }, "folderPeer": { "comment": "Peer in a folder", "arguments": { "peer": "Folder peer info", "folder_id": "Peer folder ID, for more info click here" } }, "folder": { "comment": "Folder", "arguments": { "flags": "Flags, see TL conditional fields", "autofill_new_broadcasts": "Automatically add new channels to this folder", "autofill_public_groups": "Automatically add joined new public supergroups to this folder", "autofill_new_correspondents": "Automatically add new private chats to this folder", "id": "Folder ID", "title": "Folder title", "photo": "Folder picture" } }, "inputFolderPeer": { "comment": "Peer in a folder", "arguments": { "peer": "Peer", "folder_id": "Peer folder ID, for more info click here" } }, "messages.searchCounter": { "comment": "Indicates how many results would be found by a {@link messages.RawSearchRequest} call with the same parameters", "arguments": { "flags": "Flags, see TL conditional fields", "inexact": "If set, the results may be inexact", "filter": "Provided message filter", "count": "Number of results that were found server-side" } }, "urlAuthResultRequest": { "comment": "Details about the authorization request, for more info click here »", "arguments": { "flags": "Flags, see TL conditional fields", "request_write_access": "Whether the bot would like to send messages to the user", "bot": "Username of a bot, which will be used for user authorization. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details.", "domain": "The domain name of the website on which the user will log in." } }, "urlAuthResultAccepted": { "comment": "Details about an accepted authorization request, for more info click here »", "arguments": { "url": "The URL name of the website on which the user has logged in." } }, "peerLocated": { "comment": "Peer geolocated nearby", "arguments": { "peer": "Peer", "expires": "Validity period of current data", "distance": "Distance from the peer in meters" } }, "channelLocationEmpty": { "comment": "No location (normal supergroup)", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "channelLocation": { "comment": "Geographical location of supergroup (geogroups)", "arguments": { "geo_point": "Geographical location of supergroup", "address": "Textual description of the address" } }, "urlAuthResultDefault": { "comment": "Details about an accepted authorization request, for more info click here »", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "peerSelfLocated": { "comment": "Current peer", "arguments": { "expires": "Expiry of geolocation info for current peer" } }, "theme": { "comment": "Theme", "arguments": { "flags": "Flags, see TL conditional fields", "creator": "Whether the current user is the creator of this theme", "default": "Whether this is the default theme", "for_chat": "Whether this theme is meant to be used as a chat theme", "id": "Theme ID", "access_hash": "Theme access hash", "slug": "Unique theme ID", "title": "Theme name", "document": "Theme", "settings": "Theme settings", "emoticon": "Theme emoji", "installs_count": "Installation count" } }, "restrictionReason": { "comment": "Restriction reason.\n\nContains the reason why access to a certain object must be restricted. Clients are supposed to deny access to the channel if the platform field is equal to all or to the current platform (ios, android, wp, etc.). Platforms can be concatenated (ios-android, ios-wp), unknown platforms are to be ignored. The text is the error message that should be shown to the user.", "arguments": { "platform": "Platform identifier (ios, android, wp, all, etc.), can be concatenated with a dash as separator (android-ios, ios-wp, etc)", "reason": "Restriction reason (porno, terms, etc.)", "text": "Error message to be shown to the user" } }, "account.themesNotModified": { "comment": "No new themes were installed", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputTheme": { "comment": "Theme", "arguments": { "id": "ID", "access_hash": "Access hash" } }, "inputThemeSlug": { "comment": "Theme by theme ID", "arguments": { "slug": "Unique theme ID obtained from a theme deep link »" } }, "auth.loginTokenSuccess": { "comment": "Login via token (QR code) succeeded!", "arguments": { "authorization": "Authorization info" } }, "auth.loginToken": { "comment": "Login token (for QR code login)", "arguments": { "expires": "Expiration date of QR code", "token": "Token to render in QR code" } }, "account.themes": { "comment": "Installed themes", "arguments": { "hash": "Hash used for caching, for more info click here", "themes": "Themes" } }, "auth.loginTokenMigrateTo": { "comment": "Repeat the query to the specified DC", "arguments": { "dc_id": "DC ID", "token": "Token to use for login" } }, "baseThemeDay": { "comment": "Day theme", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.contentSettings": { "comment": "Sensitive content settings", "arguments": { "flags": "Flags, see TL conditional fields", "sensitive_enabled": "Whether viewing of sensitive (NSFW) content is enabled", "sensitive_can_change": "Whether the current client can change the sensitive content settings to view NSFW content" } }, "baseThemeNight": { "comment": "Night theme", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "baseThemeTinted": { "comment": "Tinted theme", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "baseThemeClassic": { "comment": "Classic theme", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messages.inactiveChats": { "comment": "Inactive chat list", "arguments": { "dates": "When was the chat last active", "chats": "Chat list", "users": "Users mentioned in the chat list" } }, "baseThemeArctic": { "comment": "Arctic theme", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputThemeSettings": { "comment": "Theme settings", "arguments": { "flags": "Flags, see TL conditional fields", "message_colors_animated": "If set, the freeform gradient fill needs to be animated on every sent message", "base_theme": "Default theme on which this theme is based", "accent_color": "Accent color, ARGB format", "outbox_accent_color": "Accent color of outgoing messages in ARGB format", "message_colors": "The fill to be used as a background for outgoing messages, in RGB24 format.
    If just one or two equal colors are provided, describes a solid fill of a background.
    If two different colors are provided, describes the top and bottom colors of a 0-degree gradient.
    If three or four colors are provided, describes a freeform gradient fill of a background.", "wallpaper": "{@link RawInputWallPaper} or {@link RawInputWallPaper} when passing wallpaper files for image or pattern wallpapers, {@link RawInputWallPaperNoFile} with id=0 otherwise.", "wallpaper_settings": "Wallpaper settings." } }, "webPageAttributeTheme": { "comment": "Page theme", "arguments": { "flags": "Flags, see TL conditional fields", "documents": "Theme files", "settings": "Theme settings" } }, "webPageAttributeStickerSet": { "comment": "Contains info about a stickerset », for a {@link RawWebPage} preview of a stickerset deep link » (the {@link RawWebPage} will have a type of telegram_stickerset).", "arguments": { "flags": "Flags, see TL conditional fields", "emojis": "Whether this i s a custom emoji stickerset.", "text_color": "Whether the color of this TGS custom emoji stickerset should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context.", "stickers": "A subset of the stickerset in the stickerset." } }, "themeSettings": { "comment": "Theme settings", "arguments": { "flags": "Flags, see TL conditional fields", "message_colors_animated": "If set, the freeform gradient fill needs to be animated on every sent message.", "base_theme": "Base theme", "accent_color": "Accent color, ARGB format", "outbox_accent_color": "Accent color of outgoing messages in ARGB format", "message_colors": "The fill to be used as a background for outgoing messages, in RGB24 format.
    If just one or two equal colors are provided, describes a solid fill of a background.
    If two different colors are provided, describes the top and bottom colors of a 0-degree gradient.
    If three or four colors are provided, describes a freeform gradient fill of a background.", "wallpaper": "Wallpaper" } }, "bankCardOpenUrl": { "comment": "Credit card info URL provided by the bank", "arguments": { "url": "Info URL", "name": "Bank name" } }, "messages.votesList": { "comment": "How users voted in a poll", "arguments": { "flags": "Flags, see TL conditional fields", "count": "Total number of votes for all options (or only for the chosen option, if provided to {@link messages.RawGetPollVotesRequest})", "votes": "Vote info for each user", "chats": "Mentioned chats", "users": "Info about users that voted in the poll", "next_offset": "Offset to use with the next {@link messages.RawGetPollVotesRequest} request, empty string if no more results are available." } }, "webPageAttributeStory": { "comment": "Webpage preview of a Telegram story", "arguments": { "flags": "Flags, see TL conditional fields", "peer": "Peer that posted the story", "id": "Story ID", "story": "May contain the story, if not the story should be fetched when and if needed using {@link stories.RawGetStoriesByIDRequest} with the above id and peer." } }, "dialogFilterDefault": { "comment": "Used only when reordering folders to indicate the default (all chats) folder.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "payments.bankCardData": { "comment": "Credit card info, provided by the card's bank(s)", "arguments": { "title": "Credit card title", "open_urls": "Info URL(s) provided by the card's bank(s)" } }, "dialogFilterChatlist": { "comment": "A folder imported using a chat folder deep link ».", "arguments": { "flags": "Flags, see TL conditional fields", "has_my_invites": "Whether the current user has created some chat folder deep links » to share the folder as well.", "id": "ID of the folder", "title": "Name of the folder (max 12 UTF-8 chars)", "emoticon": "Emoji to use as icon for the folder.", "color": "A color ID for the folder tag associated to this folder, see here » for more info.", "pinned_peers": "Pinned chats, folders can have unlimited pinned chats", "include_peers": "Chats to include in the folder" } }, "dialogFilter": { "comment": "Dialog filter AKA folder", "arguments": { "flags": "Flags, see TL conditional fields", "contacts": "Whether to include all contacts in this folder", "non_contacts": "Whether to include all non-contacts in this folder", "groups": "Whether to include all groups in this folder", "broadcasts": "Whether to include all channels in this folder", "bots": "Whether to include all bots in this folder", "exclude_muted": "Whether to exclude muted chats from this folder", "exclude_read": "Whether to exclude read chats from this folder", "exclude_archived": "Whether to exclude archived chats from this folder", "id": "Folder ID", "title": "Folder name (max 12 UTF-8 chars)", "emoticon": "Emoji to use as icon for the folder.", "color": "A color ID for the folder tag associated to this folder, see here » for more info.", "pinned_peers": "Pinned chats, folders can have unlimited pinned chats", "include_peers": "Include the following chats in this folder", "exclude_peers": "Exclude the following chats from this folder" } }, "dialogFilterSuggested": { "comment": "Suggested folders", "arguments": { "filter": "Folder info", "description": "Folder description" } }, "statsAbsValueAndPrev": { "comment": "Statistics value couple; initial and final value for period of time currently in consideration", "arguments": { "current": "Current value", "previous": "Previous value" } }, "statsPercentValue": { "comment": "Channel statistics percentage.
    \nCompute the percentage simply by doing part * total / 100", "arguments": { "part": "Partial value", "total": "Total value" } }, "statsDateRangeDays": { "comment": "Channel statistics date range", "arguments": { "min_date": "Initial date", "max_date": "Final date" } }, "statsGraphError": { "comment": "An error occurred while generating the statistics graph", "arguments": { "error": "The error" } }, "statsGraph": { "comment": "Channel statistics graph", "arguments": { "flags": "Flags, see TL conditional fields", "json": "Statistics data", "zoom_token": "Zoom token" } }, "help.promoDataEmpty": { "comment": "No PSA/MTProxy info is available", "arguments": { "expires": "Re-fetch PSA/MTProxy info after the specified number of seconds" } }, "stats.broadcastStats": { "comment": "Channel statistics.", "arguments": { "period": "Period in consideration", "followers": "Follower count change for period in consideration", "views_per_post": "total_viewcount/postcount, for posts posted during the period in consideration.
    Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date).", "shares_per_post": "total_sharecount/postcount, for posts posted during the period in consideration.
    Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)", "reactions_per_post": "total_reactions/postcount, for posts posted during the period in consideration.
    Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)", "views_per_story": "total_views/storycount, for posts posted during the period in consideration.
    Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)", "shares_per_story": "total_shares/storycount, for posts posted during the period in consideration.
    Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)", "reactions_per_story": "total_reactions/storycount, for posts posted during the period in consideration.
    Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)", "enabled_notifications": "Percentage of subscribers with enabled notifications", "growth_graph": "Channel growth graph (absolute subscriber count)", "followers_graph": "Followers growth graph (relative subscriber count)", "mute_graph": "Muted users graph (relative)", "top_hours_graph": "Views per hour graph (absolute)", "interactions_graph": "Interactions graph (absolute)", "iv_interactions_graph": "IV interactions graph (absolute)", "views_by_source_graph": "Views by source graph (absolute)", "new_followers_by_source_graph": "New followers by source graph (absolute)", "languages_graph": "Subscriber language graph (pie chart)", "reactions_by_emotion_graph": "A graph containing the number of reactions on posts categorized by emotion", "story_interactions_graph": "A graph containing the number of story views and shares", "story_reactions_by_emotion_graph": "A graph containing the number of reactions on stories categorized by emotion", "recent_posts_interactions": "Detailed statistics about number of views and shares of recently sent messages and stories" } }, "videoSizeEmojiMarkup": { "comment": "An animated profile picture based on a custom emoji sticker.", "arguments": { "emoji_id": "Custom emoji ID: the custom emoji sticker is shown at the center of the profile picture and occupies at most 67% of it.", "background_colors": "1, 2, 3 or 4 RBG-24 colors used to generate a solid (1), gradient (2) or freeform gradient (3, 4) background, similar to how fill wallpapers are generated. The rotation angle for gradient backgrounds is 0." } }, "help.promoData": { "comment": "MTProxy/Public Service Announcement information", "arguments": { "flags": "Flags, see TL conditional fields", "proxy": "MTProxy-related channel", "expires": "Expiry of PSA/MTProxy info", "peer": "MTProxy/PSA peer", "chats": "Chat info", "users": "User info", "psa_type": "PSA type", "psa_message": "PSA message" } }, "videoSizeStickerMarkup": { "comment": "An animated profile picture based on a sticker.", "arguments": { "stickerset": "Stickerset", "sticker_id": "Sticker ID", "background_colors": "1, 2, 3 or 4 RBG-24 colors used to generate a solid (1), gradient (2) or freeform gradient (3, 4) background, similar to how fill wallpapers are generated. The rotation angle for gradient backgrounds is 0." } }, "statsGroupTopPoster": { "comment": "Information about an active user in a supergroup", "arguments": { "user_id": "User ID", "messages": "Number of messages for statistics period in consideration", "avg_chars": "Average number of characters per message" } }, "statsGroupTopAdmin": { "comment": "Information about an active admin in a supergroup", "arguments": { "user_id": "User ID", "deleted": "Number of deleted messages for statistics period in consideration", "kicked": "Number of kicked users for statistics period in consideration", "banned": "Number of banned users for statistics period in consideration" } }, "stats.megagroupStats": { "comment": "Supergroup statistics", "arguments": { "period": "Period in consideration", "members": "Member count change for period in consideration", "messages": "Message number change for period in consideration", "viewers": "Number of users that viewed messages, for range in consideration", "posters": "Number of users that posted messages, for range in consideration", "growth_graph": "Supergroup growth graph (absolute subscriber count)", "members_graph": "Members growth (relative subscriber count)", "new_members_by_source_graph": "New members by source graph", "languages_graph": "Subscriber language graph (pie chart)", "messages_graph": "Message activity graph (stacked bar graph, message type)", "actions_graph": "Group activity graph (deleted, modified messages, blocked users)", "top_hours_graph": "Activity per hour graph (absolute)", "weekdays_graph": "Activity per day of week graph (absolute)", "top_posters": "Info about most active group members", "top_admins": "Info about most active group admins", "top_inviters": "Info about most active group inviters", "users": "Info about users mentioned in statistics" } }, "statsGroupTopInviter": { "comment": "Information about an active supergroup inviter", "arguments": { "user_id": "User ID", "invitations": "Number of invitations for statistics period in consideration" } }, "globalPrivacySettings": { "comment": "Global privacy settings", "arguments": { "flags": "Flags, see TL conditional fields", "archive_and_mute_new_noncontact_peers": "Whether to archive and mute new chats from non-contacts", "keep_archived_unmuted": "Whether unmuted chats will be kept in the Archive chat list when they get a new message.", "keep_archived_folders": "Whether unmuted chats that are always included or pinned in a folder, will be kept in the Archive chat list when they get a new message. Ignored if keep_archived_unmuted is set.", "hide_read_marks": "If this flag is set, the {@link RawInputPrivacyKeyStatusTimestamp} key will also apply to the ability to use {@link messages.RawGetOutboxReadDateRequest} on messages sent to us.
    Meaning, users that cannot see our exact last online date due to the current value of the {@link RawInputPrivacyKeyStatusTimestamp} key will receive a 403 USER_PRIVACY_RESTRICTED error when invoking {@link messages.RawGetOutboxReadDateRequest} to fetch the exact read date of a message they sent to us.
    The {@link RawUserFull}.read_dates_private flag will be set for users that have this flag enabled.", "new_noncontact_peers_require_premium": "If set, only users that have a premium account, are in our contact list, or already have a private chat with us can write to us; a 403 PRIVACY_PREMIUM_REQUIRED error will be emitted otherwise.
    The {@link RawUserFull}.contact_require_premium flag will be set for users that have this flag enabled.
    To check whether we can write to a user with this flag enabled, if we haven't yet cached all the required information (for example we don't have the {@link RawUserFull} or history of all users while displaying the chat list in the sharing UI) the {@link users.RawGetIsPremiumRequiredToContactRequest} method may be invoked, passing the list of users currently visible in the UI, returning a list of booleans that directly specify whether we can or cannot write to each user.
    Premium users only, non-Premium users will receive a PREMIUM_ACCOUNT_REQUIRED error when trying to enable this flag." } }, "help.countryCode": { "comment": "Country code and phone number pattern of a specific country", "arguments": { "flags": "Flags, see TL conditional fields", "country_code": "ISO country code", "prefixes": "Possible phone prefixes", "patterns": "Phone patterns: for example, XXX XXX XXX" } }, "statsGraphAsync": { "comment": "This channel statistics graph must be generated asynchronously using {@link stats.RawLoadAsyncGraphRequest} to reduce server load", "arguments": { "token": "Token to use for fetching the async graph" } }, "help.countriesListNotModified": { "comment": "The country list has not changed", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "videoSize": { "comment": "An animated profile picture in MPEG4 format", "arguments": { "flags": "Flags, see TL conditional fields", "type": "u for animated profile pictures, and v for trimmed and downscaled video previews", "w": "Video width", "h": "Video height", "size": "File size", "video_start_ts": "Timestamp that should be shown as static preview to the user (seconds)" } }, "help.country": { "comment": "Name, ISO code, localized name and phone codes/patterns of a specific country", "arguments": { "flags": "Flags, see TL conditional fields", "hidden": "Whether this country should not be shown in the list", "iso2": "ISO code of country", "default_name": "Name of the country in the country's language", "name": "Name of the country in the user's language, if different from the original name", "country_codes": "Phone codes/patterns" } }, "messageViews": { "comment": "View, forward counter + info about replies of a specific message", "arguments": { "flags": "Flags, see TL conditional fields", "views": "View count of message", "forwards": "Forward count of message", "replies": "Reply and thread information of message" } }, "help.countriesList": { "comment": "Name, ISO code, localized name and phone codes/patterns of all available countries", "arguments": { "countries": "Name, ISO code, localized name and phone codes/patterns of all available countries", "hash": "Hash used for caching, for more info click here" } }, "messages.messageViews": { "comment": "View, forward counter + info about replies", "arguments": { "views": "View, forward counter + info about replies", "chats": "Chats mentioned in constructor", "users": "Users mentioned in constructor" } }, "messageReplyHeader": { "comment": "Message replies and thread information", "arguments": { "flags": "Flags, see TL conditional fields", "reply_to_scheduled": "This is a reply to a scheduled message.", "forum_topic": "Whether this message was sent in a forum topic (except for the General topic).", "quote": "Whether this message is quoting a part of another message.", "reply_to_msg_id": "ID of message to which this message is replying", "reply_to_peer_id": "For replies sent in channel discussion threads of which the current user is not a member, the discussion group ID", "reply_from": "When replying to a message sent by a certain peer to another chat, contains info about the peer that originally sent the message to that other chat.", "reply_media": "When replying to a media sent by a certain peer to another chat, contains the media of the replied-to message.", "reply_to_top_id": "ID of the message that started this message thread", "quote_text": "Used to quote-reply to only a certain section (specified here) of the original message.", "quote_entities": "Message entities for styled text from the quote_text field.", "quote_offset": "Offset of the message quote_text within the original message (in UTF-16 code units)." } }, "messages.discussionMessage": { "comment": "Information about a message thread", "arguments": { "flags": "Flags, see TL conditional fields", "messages": "The messages from which the thread starts. The messages are returned in reverse chronological order (i.e., in order of decreasing message ID).", "max_id": "Message ID of latest reply in this thread", "read_inbox_max_id": "Message ID of latest read incoming message in this thread", "read_outbox_max_id": "Message ID of latest read outgoing message in this thread", "unread_count": "Number of unread messages", "chats": "Chats mentioned in constructor", "users": "Users mentioned in constructor" } }, "messageReplyStoryHeader": { "comment": "Represents a reply to a story", "arguments": { "peer": "Sender of the story.", "story_id": "Story ID" } }, "messageReplies": { "comment": "Info about the comment section of a channel post, or a simple message thread", "arguments": { "flags": "Flags, see TL conditional fields", "comments": "Whether this constructor contains information about the comment section of a channel post, or a simple message thread", "replies": "Contains the total number of replies in this thread or comment section.", "replies_pts": "PTS of the message that started this thread.", "recent_repliers": "For channel post comments, contains information about the last few comment posters for a specific thread, to show a small list of commenter profile pictures in client previews.", "channel_id": "For channel post comments, contains the ID of the associated discussion supergroup", "max_id": "ID of the latest message in this thread or comment section.", "read_max_id": "Contains the ID of the latest read message in this thread or comment section." } }, "stats.messageStats": { "comment": "Message statistics", "arguments": { "views_graph": "Message view graph", "reactions_by_emotion_graph": "A graph containing the number of reactions on stories categorized by emotion" } }, "groupCall": { "comment": "Info about a group call or livestream", "arguments": { "flags": "Flags, see TL conditional fields", "join_muted": "Whether the user should be muted upon joining the call", "can_change_join_muted": "Whether the current user can change the value of the join_muted flag using {@link phone.RawToggleGroupCallSettingsRequest}", "join_date_asc": "Specifies the ordering to use when locally sorting by date and displaying in the UI group call participants.", "schedule_start_subscribed": "Whether we subscribed to the scheduled call", "can_start_video": "Whether you can start streaming video into the call", "record_video_active": "Whether the group call is currently being recorded", "rtmp_stream": "Whether RTMP streams are allowed", "listeners_hidden": "Whether the listeners list is hidden and cannot be fetched using {@link phone.RawGetGroupParticipantsRequest}. The phone.groupParticipants.count and groupCall.participants_count counters will still include listeners.", "id": "Group call ID", "access_hash": "Group call access hash", "participants_count": "Participant count", "title": "Group call title", "stream_dc_id": "DC ID to be used for livestream chunks", "record_start_date": "When was the recording started", "schedule_date": "When is the call scheduled to start", "unmuted_video_count": "Number of people currently streaming video into the call", "unmuted_video_limit": "Maximum number of people allowed to stream video into the call", "version": "Version" } }, "groupCallDiscarded": { "comment": "An ended group call", "arguments": { "id": "Group call ID", "access_hash": "Group call access hash", "duration": "Group call duration" } }, "peerBlocked": { "comment": "Information about a blocked peer", "arguments": { "peer_id": "Peer ID", "date": "When was the peer blocked" } }, "groupCallParticipant": { "comment": "Info about a group call participant", "arguments": { "flags": "Flags, see TL conditional fields", "muted": "Whether the participant is muted", "left": "Whether the participant has left", "can_self_unmute": "Whether the participant can unmute themselves", "just_joined": "Whether the participant has just joined", "versioned": "If set, and {@link RawUpdateGroupCallParticipants}.version < locally stored call.version, info about this participant should be ignored. If (...), and {@link RawUpdateGroupCallParticipants}.version > call.version+1, the participant list should be refetched using {@link phone.RawGetGroupParticipantsRequest}.", "min": "If not set, the volume and muted_by_you fields can be safely used to overwrite locally cached information; otherwise, volume will contain valid information only if volume_by_admin is set both in the cache and in the received constructor.", "muted_by_you": "Whether this participant was muted by the current user", "volume_by_admin": "Whether our volume can only changed by an admin", "self": "Whether this participant is the current user", "video_joined": "Whether this participant is currently broadcasting video", "peer": "Peer information", "date": "When did this participant join the group call", "active_date": "When was this participant last active in the group call", "source": "Source ID", "volume": "Volume, if not set the volume is set to 100%.", "about": "Info about this participant", "raise_hand_rating": "Specifies the UI visualization order of peers with raised hands: peers with a higher rating should be showed first in the list.", "video": "Info about the video stream the participant is currently broadcasting", "presentation": "Info about the screen sharing stream the participant is currently broadcasting" } }, "phone.groupCall": { "comment": "Contains info about a group call, and partial info about its participants.", "arguments": { "call": "Info about the group call", "participants": "A partial list of participants.", "participants_next_offset": "Next offset to use when fetching the remaining participants using {@link phone.RawGetGroupParticipantsRequest}", "chats": "Chats mentioned in the participants vector", "users": "Users mentioned in the participants vector" } }, "inputGroupCall": { "comment": "Points to a specific group call", "arguments": { "id": "Group call ID", "access_hash": "Group call access hash" } }, "phone.groupParticipants": { "comment": "Info about the participants of a group call or livestream", "arguments": { "count": "Number of participants", "participants": "List of participants", "next_offset": "If not empty, the specified list of participants is partial, and more participants can be fetched specifying this parameter as offset in {@link phone.RawGetGroupParticipantsRequest}.", "chats": "Mentioned chats", "users": "Mentioned users", "version": "Version info" } }, "inlineQueryPeerTypeSameBotPM": { "comment": "Peer type: private chat with the bot itself", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inlineQueryPeerTypeChat": { "comment": "Peer type: chat", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inlineQueryPeerTypeBotPM": { "comment": "Peer type: private chat with a bot.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inlineQueryPeerTypeBroadcast": { "comment": "Peer type: channel", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inlineQueryPeerTypeMegagroup": { "comment": "Peer type: supergroup", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messages.historyImport": { "comment": "ID of a specific chat import session, click here for more info ».", "arguments": { "id": "History import ID" } }, "messages.historyImportParsed": { "comment": "Contains information about a chat export file generated by a foreign chat app, click here for more info.
    \nIf neither the pm or group flags are set, the specified chat export was generated from a chat of unknown type.", "arguments": { "flags": "Flags, see TL conditional fields", "pm": "The chat export file was generated from a private chat.", "group": "The chat export file was generated from a group chat.", "title": "Title of the chat." } }, "inlineQueryPeerTypePM": { "comment": "Peer type: private chat", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messages.affectedFoundMessages": { "comment": "Messages found and affected by changes", "arguments": { "pts": "Event count after generation", "pts_count": "Number of events that were generated", "offset": "If bigger than zero, the request must be repeated to remove more messages", "messages": "Affected message IDs" } }, "messages.exportedChatInvites": { "comment": "Info about chat invites exported by a certain admin.", "arguments": { "count": "Number of invites exported by the admin", "invites": "Exported invites", "users": "Info about the admin" } }, "chatInviteImporter": { "comment": "When and which user joined the chat using a chat invite", "arguments": { "flags": "Flags, see TL conditional fields", "requested": "Whether this user currently has a pending join request »", "via_chatlist": "The participant joined by importing a chat folder deep link ».", "user_id": "The user", "date": "When did the user join", "about": "For users with pending requests, contains bio of the user that requested to join", "approved_by": "The administrator that approved the join request » of the user" } }, "messages.chatInviteImporters": { "comment": "Info about the users that joined the chat using a specific chat invite", "arguments": { "count": "Number of users that joined", "importers": "The users that joined", "users": "The users that joined" } }, "messages.exportedChatInviteReplaced": { "comment": "The specified chat invite was replaced with another one", "arguments": { "invite": "The replaced chat invite", "new_invite": "The invite that replaces the previous invite", "users": "Mentioned users" } }, "phone.joinAsPeers": { "comment": "A list of peers that can be used to join a group call, presenting yourself as a specific user/channel.", "arguments": { "peers": "Peers", "chats": "Chats mentioned in the peers vector", "users": "Users mentioned in the peers vector" } }, "phone.exportedGroupCallInvite": { "comment": "An invite to a group call or livestream", "arguments": { "link": "Invite link" } }, "chatAdminWithInvites": { "comment": "Info about chat invites generated by admins.", "arguments": { "admin_id": "The admin", "invites_count": "Number of invites generated by the admin", "revoked_invites_count": "Number of revoked invites" } }, "messages.checkedHistoryImportPeer": { "comment": "Contains a confirmation text to be shown to the user, upon importing chat history, click here for more info ».", "arguments": { "confirm_text": "A confirmation text to be shown to the user, upon importing chat history »." } }, "messages.exportedChatInvite": { "comment": "Info about a chat invite", "arguments": { "invite": "Info about the chat invite", "users": "Mentioned users" } }, "groupCallParticipantVideoSourceGroup": { "comment": "Describes a group of video synchronization source identifiers", "arguments": { "semantics": "SDP semantics", "sources": "Source IDs" } }, "messages.chatAdminsWithInvites": { "comment": "Info about chat invites generated by admins.", "arguments": { "admins": "Info about chat invites generated by admins.", "users": "Mentioned users" } }, "stickers.suggestedShortName": { "comment": "A suggested short name for a stickerpack", "arguments": { "short_name": "Suggested short name" } }, "botCommandScopeUsers": { "comment": "The specified bot commands will only be valid in all private chats with users.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "groupCallParticipantVideo": { "comment": "Info about a video stream", "arguments": { "flags": "Flags, see TL conditional fields", "paused": "Whether the stream is currently paused", "endpoint": "Endpoint", "source_groups": "Source groups", "audio_source": "Audio source ID" } }, "botCommandScopeChats": { "comment": "The specified bot commands will be valid in all groups and supergroups.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "botCommandScopeDefault": { "comment": "The commands will be valid in all dialogs", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "botCommandScopePeer": { "comment": "The specified bot commands will be valid only in a specific dialog.", "arguments": { "peer": "The dialog" } }, "botCommandScopePeerUser": { "comment": "The specified bot commands will be valid only for a specific user in the specified group or supergroup.", "arguments": { "peer": "The chat", "user_id": "The user" } }, "botCommandScopePeerAdmins": { "comment": "The specified bot commands will be valid for all admins of the specified group or supergroup.", "arguments": { "peer": "The chat" } }, "account.resetPasswordFailedWait": { "comment": "You recently requested a password reset that was canceled, please wait until the specified date before requesting another reset.", "arguments": { "retry_date": "Wait until this date before requesting another reset." } }, "botCommandScopeChatAdmins": { "comment": "The specified bot commands will be valid only for chat administrators, in all groups and supergroups.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.resetPasswordRequestedWait": { "comment": "You successfully requested a password reset, please wait until the specified date before finalizing the reset.", "arguments": { "until_date": "Wait until this date before finalizing the reset." } }, "messages.sponsoredMessagesEmpty": { "comment": "No sponsored messages are available.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "searchResultsCalendarPeriod": { "comment": "Information about found messages sent on a specific day, used to split the messages in {@link messages.RawSearchResultsCalendar} constructors by days.\n\nMultiple searchResultsCalendarPeriod constructors are returned in {@link messages.RawSearchResultsCalendar}, each containing information about the first, last and total number of messages matching the filter that were sent on a specific day.", "arguments": { "date": "The day this object is referring to.", "min_msg_id": "First message ID that was sent on this day.", "max_msg_id": "Last message ID that was sent on this day.", "count": "All messages that were sent on this day." } }, "sponsoredMessage": { "comment": "A sponsored message.", "arguments": { "flags": "Flags, see TL conditional fields", "recommended": "Whether the message needs to be labeled as \"recommended\" instead of \"sponsored\"", "can_report": "Whether this message can be reported as specified here ».", "random_id": "Message ID", "url": "Contains the URL to open when the user clicks on the sponsored message.", "title": "Contains the title of the sponsored message.", "message": "Sponsored message", "entities": "Message entities for styled text in message.", "photo": "If set, contains a custom profile photo bubble that should be displayed for the sponsored message, like for messages sent in groups.", "color": "If set, the sponsored message should use the message accent color » specified in color.", "button_text": "Label of the sponsored message button.", "sponsor_info": "If set, contains additional information about the sponsor to be shown along with the message.", "additional_info": "If set, contains additional information about the sponsored message to be shown along with the message." } }, "messages.sponsoredMessages": { "comment": "A set of sponsored messages associated to a channel", "arguments": { "flags": "Flags, see TL conditional fields", "posts_between": "If set, specifies the minimum number of messages between shown sponsored messages; otherwise, only one sponsored message must be shown after all ordinary messages.", "messages": "Sponsored messages", "chats": "Chats mentioned in the sponsored messages", "users": "Users mentioned in the sponsored messages" } }, "messages.searchResultsPositions": { "comment": "Information about sparse positions of messages", "arguments": { "count": "Total number of found messages", "positions": "List of message positions" } }, "searchResultPosition": { "comment": "Information about a message in a specific position", "arguments": { "msg_id": "Message ID", "date": "When was the message sent", "offset": "0-based message position in the full list of suitable messages" } }, "messages.searchResultsCalendar": { "comment": "Information about found messages sent on a specific day", "arguments": { "flags": "Flags, see TL conditional fields", "inexact": "If set, indicates that the results may be inexact", "count": "Total number of results matching query", "min_date": "Starting timestamp of attached messages", "min_msg_id": "Ending timestamp of attached messages", "offset_id_offset": "Indicates the absolute position of messages[0] within the total result set with count count.
    This is useful, for example, if we need to display a progress/total counter (like photo 134 of 200, for all media in a chat, we could simply use photo ${offset_id_offset} of ${count}.", "periods": "Used to split the messages by days: multiple SearchResultsCalendarPeriod constructors are returned, each containing information about the first, last and total number of messages matching the filter that were sent on a specific day.
    This information can be easily used to split the returned messages by day.", "messages": "Messages", "chats": "Mentioned chats", "users": "Mentioned users" } }, "channels.sendAsPeers": { "comment": "A list of peers that can be used to send messages in a specific group", "arguments": { "peers": "Peers that can be used to send messages to the group", "chats": "Mentioned chats", "users": "Mentioned users" } }, "account.resetPasswordOk": { "comment": "The 2FA password was reset successfully.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "users.userFull": { "comment": "Full user information", "arguments": { "full_user": "Full user information", "chats": "Mentioned chats", "users": "Mentioned users" } }, "messageReactions": { "comment": "Message reactions »", "arguments": { "flags": "Flags, see TL conditional fields", "min": "Similar to min objects, used for message reaction » constructors that are the same for all users so they don't have the reactions sent by the current user (you can use {@link messages.RawGetMessagesReactionsRequest} to get the full reaction info).", "can_see_list": "Whether {@link messages.RawGetMessageReactionsListRequest} can be used to see how each specific peer reacted to the message", "reactions_as_tags": "If set or if there are no reactions, all present and future reactions should be treated as message tags, see here » for more info.", "results": "Reactions", "recent_reactions": "List of recent peers and their reactions" } }, "messages.peerSettings": { "comment": "Peer settings", "arguments": { "settings": "Peer settings", "chats": "Mentioned chats", "users": "Mentioned users" } }, "auth.loggedOut": { "comment": "Future auth token » to be used on subsequent authorizations", "arguments": { "flags": "Flags, see TL conditional fields", "future_auth_token": "Future auth token » to be used on subsequent authorizations" } }, "availableReaction": { "comment": "Animations associated with a message reaction", "arguments": { "flags": "Flags, see TL conditional fields", "inactive": "If not set, the reaction can be added to new messages and enabled in chats.", "premium": "Whether this reaction can only be used by Telegram Premium users", "reaction": "Reaction emoji", "title": "Reaction description", "static_icon": "Static icon for the reaction", "appear_animation": "The animated sticker to show when the user opens the reaction dropdown", "select_animation": "The animated sticker to show when the user hovers over the reaction", "activate_animation": "The animated sticker to show when the reaction is chosen and activated", "effect_animation": "The background effect (still an animated sticker) to play under the activate_animation, when the reaction is chosen and activated", "around_animation": "The animation that plays around the button when you press an existing reaction (played together with center_icon).", "center_icon": "The animation of the emoji inside the button when you press an existing reaction (played together with around_animation)." } }, "messages.availableReactionsNotModified": { "comment": "No new reactions are available", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messages.messageReactionsList": { "comment": "List of peers that reacted to a specific message", "arguments": { "flags": "Flags, see TL conditional fields", "count": "Total number of reactions matching query", "reactions": "List of peers that reacted to a specific message", "chats": "Mentioned chats", "users": "Mentioned users", "next_offset": "If set, indicates the next offset to use to load more results by invoking {@link messages.RawGetMessageReactionsListRequest}." } }, "messages.availableReactions": { "comment": "Animations and metadata associated with message reactions »", "arguments": { "hash": "Hash used for caching, for more info click here", "reactions": "Animations and metadata associated with message reactions »" } }, "phone.groupCallStreamChannels": { "comment": "Info about RTMP streams in a group call or livestream", "arguments": { "channels": "RTMP streams" } }, "messagePeerReaction": { "comment": "How a certain peer reacted to the message", "arguments": { "flags": "Flags, see TL conditional fields", "big": "Whether the specified message reaction » should elicit a bigger and longer reaction", "unread": "Whether the reaction wasn't yet marked as read by the current user", "my": "Starting from layer 159, {@link messages.RawSendReactionRequest} will send reactions from the peer (user or channel) specified using {@link messages.RawSaveDefaultSendAsRequest}.
    If set, this flag indicates that this reaction was sent by us, even if the peer doesn't point to the current account.", "peer_id": "Peer that reacted to the message", "date": "When was this reaction added", "reaction": "Reaction emoji" } }, "phone.groupCallStreamRtmpUrl": { "comment": "RTMP URL and stream key to be used in streaming software", "arguments": { "url": "RTMP URL", "key": "Stream key" } }, "groupCallStreamChannel": { "comment": "Info about an RTMP stream in a group call or livestream", "arguments": { "channel": "Channel ID", "scale": "Specifies the duration of the video segment to fetch in milliseconds, by bitshifting 1000 to the right scale times: duration_ms := 1000 >> scale.", "last_timestamp_ms": "Last seen timestamp to easily start fetching livestream chunks using {@link RawInputGroupCallStream}" } }, "attachMenuBotIcon": { "comment": "Represents an attachment menu icon for bot mini apps »", "arguments": { "flags": "Flags, see TL conditional fields", "name": "One of the following values: note that animated icons must be played when the user clicks on the button, activating the bot mini app.

    default_static - Default attachment menu icon in SVG format
    placeholder_static - Default placeholder for opened Web Apps in SVG format
    ios_static - Attachment menu icon in SVG format for the official iOS app
    ios_animated - Animated attachment menu icon in TGS format for the official iOS app
    android_animated - Animated attachment menu icon in TGS format for the official Android app
    macos_animated - Animated attachment menu icon in TGS format for the official native Mac OS app
    ios_side_menu_static - Side menu icon in PNG format for the official iOS app
    android_side_menu_static - Side menu icon in SVG format for the official android app
    macos_side_menu_static - Side menu icon in PNG format for the official native Mac OS app", "icon": "The actual icon file.", "colors": "Attachment menu icon colors." } }, "reactionCount": { "comment": "Reactions", "arguments": { "flags": "Flags, see TL conditional fields", "chosen_order": "If set, indicates that the current user also sent this reaction.
    The integer value indicates when was the reaction added: the bigger the value, the newer the reaction.", "reaction": "The reaction.", "count": "Number of users that reacted with this emoji." } }, "attachMenuBot": { "comment": "Represents a bot mini app that can be launched from the attachment/side menu »\n\nAt least one of the show_in_attach_menu or the show_in_side_menu flags will always be set.", "arguments": { "flags": "Flags, see TL conditional fields", "inactive": "If set, before launching the mini app the client should ask the user to add the mini app to the attachment/side menu, and only if the user accepts, after invoking {@link messages.RawToggleBotInAttachMenuRequest} the app should be opened.", "has_settings": "Deprecated flag, can be ignored.", "request_write_access": "Whether the bot would like to send messages to the user.", "show_in_attach_menu": "Whether, when installed, an attachment menu entry should be shown for the Mini App.", "show_in_side_menu": "Whether, when installed, an entry in the main view side menu should be shown for the Mini App.", "side_menu_disclaimer_needed": "If inactive if set and the user hasn't previously accepted the third-party mini apps Terms of Service for this bot, when showing the mini app installation prompt, an additional mandatory checkbox to accept the mini apps TOS and a disclaimer indicating that this Mini App is not affiliated to Telegram should be shown.", "bot_id": "Bot ID", "short_name": "Attachment menu item name", "peer_types": "List of dialog types where this attachment menu entry should be shown", "icons": "List of platform-specific static icons and animations to use for the attachment menu button" } }, "attachMenuBotIconColor": { "comment": "Represents an attachment menu icon color for bot mini apps »", "arguments": { "name": "One of the following values:
    light_icon - Color of the attachment menu icon (light mode)
    light_text - Color of the attachment menu label, once selected (light mode)
    dark_icon - Color of the attachment menu icon (dark mode)
    dark_text - Color of the attachment menu label, once selected (dark mode)", "color": "Color in RGB24 format" } }, "attachMenuBotsNotModified": { "comment": "The list of bot mini apps hasn't changed", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "attachMenuBots": { "comment": "Represents a list of bot mini apps that can be launched from the attachment menu »", "arguments": { "hash": "Hash used for caching, for more info click here", "bots": "List of bot mini apps that can be launched from the attachment menu »", "users": "Info about related users/bots" } }, "webViewResultUrl": { "comment": "Contains the webview URL with appropriate theme and user info parameters added", "arguments": { "flags": "Flags, see TL conditional fields", "fullsize": "If set, the app must be opened in fullsize mode instead of compact mode.", "query_id": "Webview session ID (only returned by inline button mini apps, menu button mini apps, attachment menu mini apps).", "url": "Webview URL to open" } }, "attachMenuBotsBot": { "comment": "Represents a bot mini app that can be launched from the attachment menu »", "arguments": { "bot": "Represents a bot mini app that can be launched from the attachment menu »
    ", "users": "Info about related users and bots" } }, "webViewMessageSent": { "comment": "Info about a sent inline webview message", "arguments": { "flags": "Flags, see TL conditional fields", "msg_id": "Message ID" } }, "botMenuButton": { "comment": "Bot menu button that opens a web app when clicked.", "arguments": { "text": "Title to be displayed on the menu button instead of 'Menu'", "url": "URL of a web app to open when the user clicks on the button" } }, "botMenuButtonCommands": { "comment": "Bot menu button that opens the bot command list when clicked.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "botMenuButtonDefault": { "comment": "Placeholder bot menu button never returned to users: see the docs for more info.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.savedRingtonesNotModified": { "comment": "The notification sound list hasn't changed.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.savedRingtones": { "comment": "A list of saved notification sounds", "arguments": { "hash": "Hash used for caching, for more info click here", "ringtones": "Saved notification sounds" } }, "notificationSoundDefault": { "comment": "Indicates the default notification sound should be used", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "notificationSoundNone": { "comment": "No notification sound should be used", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.savedRingtone": { "comment": "The notification sound was already in MP3 format and was saved without any modification", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "notificationSoundRingtone": { "comment": "A specific previously uploaded notification sound should be used", "arguments": { "id": "Document ID of notification sound uploaded using {@link account.RawUploadRingtoneRequest}" } }, "account.savedRingtoneConverted": { "comment": "The notification sound was not in MP3 format and was successfully converted and saved, use the returned Document to refer to the notification sound from now on", "arguments": { "document": "The converted notification sound" } }, "notificationSoundLocal": { "comment": "Indicates a specific local notification sound should be used", "arguments": { "title": "Notification sound title", "data": "Notification sound identifier (arbitrary data used by the client to identify a specific local notification sound)" } }, "attachMenuPeerTypeSameBotPM": { "comment": "The bot attachment menu entry is available in the chat with the bot that offers it", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "attachMenuPeerTypeBotPM": { "comment": "The bot attachment menu entry is available in private chats with other bots (excluding the bot that offers the current attachment menu)", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "attachMenuPeerTypePM": { "comment": "The bot attachment menu entry is available in private chats with other users (not bots)", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "attachMenuPeerTypeBroadcast": { "comment": "The bot attachment menu entry is available in channels", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "attachMenuPeerTypeChat": { "comment": "The bot attachment menu entry is available in groups and supergroups", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputInvoiceMessage": { "comment": "An invoice contained in a {@link RawMessageMediaInvoice} message or paid media ».", "arguments": { "peer": "Chat where the invoice/paid media was sent", "msg_id": "Message ID" } }, "payments.exportedInvoice": { "comment": "Exported invoice deep link", "arguments": { "url": "Exported invoice deep link" } }, "inputInvoiceSlug": { "comment": "An invoice slug taken from an invoice deep link or from the premium_invoice_slug app config parameter »", "arguments": { "slug": "The invoice slug" } }, "inputInvoicePremiumGiftCode": { "comment": "Used if the user wishes to start a channel/supergroup giveaway or send some giftcodes to members of a channel/supergroup, in exchange for boosts.", "arguments": { "purpose": "Should be populated with {@link RawInputStorePaymentPremiumGiveaway} for giveaways and {@link RawInputStorePaymentPremiumGiftCode} for gifts.", "option": "Should be populated with one of the giveaway options returned by {@link payments.RawGetPremiumGiftCodeOptionsRequest}, see the giveaways » documentation for more info." } }, "inputInvoiceStars": { "comment": "Used to top up the Telegram Stars balance of the current account or someone else's account.", "arguments": { "purpose": "Either an {@link RawInputStorePaymentStarsTopup} or an {@link RawInputStorePaymentStarsGift}." } }, "messages.transcribedAudio": { "comment": "Transcribed text from a voice message »", "arguments": { "flags": "Flags, see TL conditional fields", "pending": "Whether the transcription is partial because audio transcription is still in progress, if set the user may receive further {@link RawUpdateTranscribedAudio} updates with the updated transcription.", "transcription_id": "Transcription ID", "text": "Transcripted text", "trial_remains_num": "For non-Premium users, this flag will be set, indicating the remaining transcriptions in the free trial period.", "trial_remains_until_date": "For non-Premium users, this flag will be set, indicating the date when the trial_remains_num counter will be reset to the maximum value of transcribe_audio_trial_weekly_number." } }, "help.premiumPromo": { "comment": "Telegram Premium promotion information\n\nNote that the video_sections+videos fields are a list of videos, and the corresponding premium feature identifiers.
    \nThey're equivalent to a section => video dictionary, with keys from video_section and values from videos.
    \nThe keys in video_sections correspond to a specific feature identifier, and the associated promotional video should be shown when the associated feature row is clicked.", "arguments": { "status_text": "Description of the current state of the user's Telegram Premium subscription", "status_entities": "Message entities for styled text", "video_sections": "A list of premium feature identifiers », associated to each video", "videos": "A list of videos", "period_options": "Telegram Premium subscription options", "users": "Related user information" } }, "inputStorePaymentPremiumGiftCode": { "comment": "Used to gift Telegram Premium subscriptions only to some specific subscribers of a channel/supergroup or to some of our contacts, see here » for more info on giveaways and gifts.", "arguments": { "flags": "Flags, see TL conditional fields", "users": "The users that will receive the Telegram Premium subscriptions.", "boost_peer": "If set, the gifts will be sent on behalf of a channel/supergroup we are an admin of, which will also assign some boosts to it. Otherwise, the gift will be sent directly from the currently logged in user, and we will gain some extra boost slots. See here » for more info on giveaways and gifts.", "currency": "Three-letter ISO 4217 currency code", "amount": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." } }, "inputStorePaymentPremiumGiveaway": { "comment": "Used to pay for a giveaway, see here » for more info.", "arguments": { "flags": "Flags, see TL conditional fields", "only_new_subscribers": "If set, only new subscribers starting from the giveaway creation date will be able to participate to the giveaway.", "winners_are_visible": "If set, giveaway winners are public and will be listed in a {@link RawMessageMediaGiveawayResults} message that will be automatically sent to the channel once the giveaway ends.", "boost_peer": "The channel/supergroup starting the giveaway, that the user must join to participate, that will receive the giveaway boosts; see here » for more info on giveaways.", "additional_peers": "Additional channels that the user must join to participate to the giveaway can be specified here.", "countries_iso2": "The set of users that can participate to the giveaway can be restricted by passing here an explicit whitelist of up to giveaway_countries_max countries, specified as two-letter ISO 3166-1 alpha-2 country codes.", "prize_description": "Can contain a textual description of additional giveaway prizes.", "random_id": "Random ID to avoid resending the giveaway", "until_date": "The end date of the giveaway, must be at most giveaway_period_max seconds in the future; see here » for more info on giveaways.", "currency": "Three-letter ISO 4217 currency code", "amount": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." } }, "inputStorePaymentPremiumSubscription": { "comment": "Info about a Telegram Premium purchase", "arguments": { "flags": "Flags, see TL conditional fields", "restore": "Pass true if this is a restore of a Telegram Premium purchase; only for the App Store", "upgrade": "Pass true if this is an upgrade from a monthly subscription to a yearly subscription; only for App Store" } }, "inputStorePaymentStarsTopup": { "comment": "Used to top up the Telegram Stars balance of the current account.", "arguments": { "stars": "Amount of stars to topup", "currency": "Three-letter ISO 4217 currency code", "amount": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." } }, "inputStorePaymentGiftPremium": { "comment": "Info about a gifted Telegram Premium purchase", "arguments": { "user_id": "The user to which the Telegram Premium subscription was gifted", "currency": "Three-letter ISO 4217 currency code", "amount": "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." } }, "inputStorePaymentStarsGift": { "comment": "Used to gift Telegram Stars to a friend.", "arguments": { "user_id": "The user to which the stars should be gifted.", "stars": "Amount of stars to gift", "currency": "Three-letter ISO 4217 currency code", "amount": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." } }, "premiumGiftOption": { "comment": "Telegram Premium gift option", "arguments": { "flags": "Flags, see TL conditional fields", "months": "Duration of gifted Telegram Premium subscription", "currency": "Three-letter ISO 4217 currency code", "amount": "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", "bot_url": "An invoice deep link » to an invoice for in-app payment, using the official Premium bot; may be empty if direct payment isn't available.", "store_product": "An identifier for the App Store/Play Store product associated with the Premium gift." } }, "paymentFormMethod": { "comment": "Represents an additional payment method", "arguments": { "url": "URL to open in a webview to process the payment", "title": "Payment method description" } }, "emojiStatus": { "comment": "An emoji status", "arguments": { "document_id": "Custom emoji document ID" } }, "emojiStatusUntil": { "comment": "An emoji status valid until the specified date", "arguments": { "document_id": "Custom emoji document ID", "until": "This status is valid until this date" } }, "account.emojiStatuses": { "comment": "A list of emoji statuses", "arguments": { "hash": "Hash used for caching, for more info click here", "statuses": "Emoji statuses" } }, "reactionEmpty": { "comment": "No reaction", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "reactionEmoji": { "comment": "Normal emoji message reaction", "arguments": { "emoticon": "Emoji" } }, "account.emojiStatusesNotModified": { "comment": "The server-side list of emoji statuses hasn't changed", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "chatReactionsSome": { "comment": "Some reactions are allowed", "arguments": { "reactions": "Allowed set of reactions: the reactions_in_chat_max configuration field indicates the maximum number of reactions that can be specified in this field." } }, "reactionCustomEmoji": { "comment": "Custom emoji message reaction", "arguments": { "document_id": "Custom emoji document ID" } }, "chatReactionsNone": { "comment": "No reactions are allowed", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "chatReactionsAll": { "comment": "All reactions or all non-custom reactions are allowed", "arguments": { "flags": "Flags, see TL conditional fields", "allow_custom": "Whether to allow custom reactions" } }, "messages.reactionsNotModified": { "comment": "The server-side list of message reactions hasn't changed", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "emailVerificationCode": { "comment": "Email verification code", "arguments": { "code": "Received verification code" } }, "emailVerificationGoogle": { "comment": "Google ID email verification token", "arguments": { "token": "Token" } }, "emailVerifyPurposeLoginSetup": { "comment": "Email verification purpose: setup login email", "arguments": { "phone_number": "Phone number", "phone_code_hash": "Phone code hash as specified by the documentation" } }, "emailVerifyPurposeLoginChange": { "comment": "Email verification purpose: change login email", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "emojiStatusEmpty": { "comment": "No emoji status is set", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "emailVerifyPurposePassport": { "comment": "Verify an email for use in telegram passport", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messages.reactions": { "comment": "List of message reactions", "arguments": { "hash": "Hash used for caching, for more info click here", "reactions": "Reactions" } }, "emailVerificationApple": { "comment": "Apple ID email verification token", "arguments": { "token": "Token" } }, "account.emailVerifiedLogin": { "comment": "The email was verified correctly, and a login code was just sent to it.", "arguments": { "email": "The verified email address.", "sent_code": "Info about the sent login code" } }, "premiumSubscriptionOption": { "comment": "Describes a Telegram Premium subscription option", "arguments": { "flags": "Flags, see TL conditional fields", "current": "Whether this subscription option is currently in use.", "can_purchase_upgrade": "Whether this subscription option can be used to upgrade the existing Telegram Premium subscription. When upgrading Telegram Premium subscriptions bought through stores, make sure that the store transaction ID is equal to transaction, to avoid upgrading someone else's account, if the client is currently logged into multiple accounts.", "transaction": "Identifier of the last in-store transaction for the currently used subscription on the current account.", "months": "Duration of subscription in months", "currency": "Three-letter ISO 4217 currency code", "amount": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", "bot_url": "Deep link used to initiate payment", "store_product": "Store product ID, only for official apps" } }, "account.emailVerified": { "comment": "The email was verified correctly.", "arguments": { "email": "The verified email address." } }, "sendAsPeer": { "comment": "Indicates a peer that can be used to send messages", "arguments": { "flags": "Flags, see TL conditional fields", "premium_required": "Whether a Telegram Premium account is required to send messages as this peer", "peer": "Peer" } }, "stickerKeyword": { "comment": "Keywords for a certain sticker", "arguments": { "document_id": "Sticker ID", "keyword": "Keywords" } }, "messageExtendedMediaPreview": { "comment": "Paid media preview for not yet purchased paid media, see here » for more info.", "arguments": { "flags": "Flags, see TL conditional fields", "w": "Width", "h": "Height", "thumb": "Extremely low resolution thumbnail.", "video_duration": "Video duration for videos." } }, "messageExtendedMedia": { "comment": "Already purchased paid media, see here » for more info.", "arguments": { "media": "The media we purchased." } }, "username": { "comment": "Contains information about a username.", "arguments": { "flags": "Flags, see TL conditional fields", "editable": "Whether the username is editable, meaning it wasn't bought on fragment.", "active": "Whether the username is active.", "username": "The username." } }, "forumTopicDeleted": { "comment": "Represents a deleted forum topic.", "arguments": { "id": "The ID of the deleted forum topic." } }, "forumTopic": { "comment": "Represents a forum topic.", "arguments": { "flags": "Flags, see TL conditional fields", "my": "Whether the topic was created by the current user", "closed": "Whether the topic is closed (no messages can be sent to it)", "pinned": "Whether the topic is pinned", "short": "Whether this constructor is a reduced version of the full topic information.
    If set, only the my, closed, id, date, title, icon_color, icon_emoji_id and from_id parameters will contain valid information.
    Reduced info is usually only returned in topic-related admin log events » and in the {@link messages.RawChannelMessages} constructor: if needed, full information can be fetched using {@link channels.RawGetForumTopicsByIDRequest}.", "hidden": "Whether the topic is hidden (only valid for the \"General\" topic, id=1)", "id": "Topic ID", "date": "Topic creation date", "title": "Topic title", "icon_color": "If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F.", "icon_emoji_id": "ID of the custom emoji used as topic icon.", "top_message": "ID of the last message that was sent to this topic", "read_inbox_max_id": "Position up to which all incoming messages are read.", "read_outbox_max_id": "Position up to which all outgoing messages are read.", "unread_count": "Number of unread messages", "unread_mentions_count": "Number of unread mentions", "unread_reactions_count": "Number of unread reactions to messages you sent", "from_id": "ID of the peer that created the topic", "notify_settings": "Notification settings", "draft": "Message draft" } }, "defaultHistoryTTL": { "comment": "Contains info about the default value of the Time-To-Live setting, applied to all new chats.", "arguments": { "period": "Time-To-Live setting applied to all new chats." } }, "exportedContactToken": { "comment": "Describes a temporary profile link.", "arguments": { "url": "The temporary profile link.", "expires": "Its expiration date" } }, "messages.forumTopics": { "comment": "Contains information about multiple forum topics", "arguments": { "flags": "Flags, see TL conditional fields", "order_by_create_date": "Whether the returned topics are ordered by creation date; if set, pagination by offset_date should use {@link RawForumTopic}.date; otherwise topics are ordered by the last message date, so paginate by the date of the message referenced by {@link RawForumTopic}.top_message.", "count": "Total number of topics matching query; may be more than the topics contained in topics, in which case pagination is required.", "topics": "Forum topics", "messages": "Related messages (contains the messages mentioned by {@link RawForumTopic}.top_message).", "chats": "Related chats", "users": "Related users", "pts": "Event count after generation" } }, "requestPeerTypeUser": { "comment": "Choose a user.", "arguments": { "flags": "Flags, see TL conditional fields", "bot": "Whether to allow choosing only bots.", "premium": "Whether to allow choosing only Premium users." } }, "requestPeerTypeChat": { "comment": "Choose a chat or supergroup", "arguments": { "flags": "Flags, see TL conditional fields", "creator": "Whether to allow only choosing chats or supergroups that were created by the current user.", "bot_participant": "Whether to allow only choosing chats or supergroups where the bot is a participant.", "has_username": "If specified, allows only choosing channels with or without a username, according to the value of Bool.", "forum": "If specified, allows only choosing chats or supergroups that are or aren't forums, according to the value of Bool.", "user_admin_rights": "If specified, allows only choosing chats or supergroups where the current user is an admin with at least the specified admin rights.", "bot_admin_rights": "If specified, allows only choosing chats or supergroups where the bot is an admin with at least the specified admin rights." } }, "requestPeerTypeBroadcast": { "comment": "Choose a channel", "arguments": { "flags": "Flags, see TL conditional fields", "creator": "Whether to allow only choosing channels that were created by the current user.", "has_username": "If specified, allows only choosing channels with or without a username, according to the value of Bool.", "user_admin_rights": "If specified, allows only choosing channels where the current user is an admin with at least the specified admin rights.", "bot_admin_rights": "If specified, allows only choosing channels where the bot is an admin with at least the specified admin rights." } }, "emojiListNotModified": { "comment": "The list of custom emojis hasn't changed.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "emojiList": { "comment": "Represents a list of custom emojis.", "arguments": { "hash": "Hash used for caching, for more info click here", "document_id": "Custom emoji IDs" } }, "emojiGroupGreeting": { "comment": "Represents an emoji category, that should be moved to the top of the list when choosing a sticker for a business introduction", "arguments": { "title": "Category name, i.e. \"Animals\", \"Flags\", \"Faces\" and so on...", "icon_emoji_id": "A single custom emoji used as preview for the category.", "emoticons": "A list of UTF-8 emojis, matching the category." } }, "emojiGroup": { "comment": "Represents an emoji category.", "arguments": { "title": "Category name, i.e. \"Animals\", \"Flags\", \"Faces\" and so on...", "icon_emoji_id": "A single custom emoji used as preview for the category.", "emoticons": "A list of UTF-8 emojis, matching the category." } }, "textWithEntities": { "comment": "Styled text with message entities", "arguments": { "text": "Text", "entities": "Message entities for styled text" } }, "messages.emojiGroupsNotModified": { "comment": "The list of emoji categories hasn't changed.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messages.emojiGroups": { "comment": "Represents a list of emoji categories.", "arguments": { "hash": "Hash used for caching, for more info click here", "groups": "A list of emoji categories." } }, "messages.translateResult": { "comment": "Translated text with entities", "arguments": { "result": "Text+entities, for each input message." } }, "autoSaveSettings": { "comment": "Media autosave settings", "arguments": { "flags": "Flags, see TL conditional fields", "photos": "Whether photos should be autosaved to the gallery.", "videos": "Whether videos should be autosaved to the gallery.", "video_max_size": "If set, specifies a size limit for autosavable videos" } }, "emojiGroupPremium": { "comment": "An emoji category, used to select all Premium-only stickers (i.e. those with a Premium effect »)/Premium-only custom emojis (i.e. those where the {@link RawDocumentAttributeCustomEmoji}.free flag is not set)", "arguments": { "title": "Category name, i.e. \"Animals\", \"Flags\", \"Faces\" and so on...", "icon_emoji_id": "A single custom emoji used as preview for the category." } }, "account.autoSaveSettings": { "comment": "Contains media autosave settings", "arguments": { "users_settings": "Default media autosave settings for private chats", "chats_settings": "Default media autosave settings for groups and supergroups", "broadcasts_settings": "Default media autosave settings for channels", "exceptions": "Peer-specific granular autosave settings", "chats": "Chats mentioned in the peer-specific granular autosave settings", "users": "Users mentioned in the peer-specific granular autosave settings" } }, "autoSaveException": { "comment": "Peer-specific media autosave settings", "arguments": { "peer": "The peer", "settings": "Media autosave settings" } }, "help.appConfigNotModified": { "comment": "The client configuration parameters haven't changed", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputBotAppID": { "comment": "Used to fetch information about a direct link Mini App by its ID", "arguments": { "id": "direct link Mini App ID.", "access_hash": "Access hash, obtained from the {@link RawBotApp} constructor." } }, "help.appConfig": { "comment": "Contains various client configuration parameters", "arguments": { "hash": "Hash used for caching, for more info click here", "config": "Client configuration parameters" } }, "inputBotAppShortName": { "comment": "Used to fetch information about a direct link Mini App by its short name", "arguments": { "bot_id": "ID of the bot that owns the bot mini app", "short_name": "Short name, obtained from a Direct Mini App deep link" } }, "messages.botApp": { "comment": "Contains information about a direct link Mini App", "arguments": { "flags": "Flags, see TL conditional fields", "inactive": "Whether the web app was never used by the user, and confirmation must be asked from the user before opening it.", "request_write_access": "The bot is asking permission to send messages to the user: if the user agrees, set the write_allowed flag when invoking {@link messages.RawRequestAppWebViewRequest}.", "has_settings": "Deprecated flag, can be ignored.", "app": "Bot app information" } }, "botAppNotModified": { "comment": "Bot app info hasn't changed.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "readParticipantDate": { "comment": "Contains info about when a certain participant has read a message", "arguments": { "user_id": "User ID", "date": "When the user read the message" } }, "inputChatlistDialogFilter": { "comment": "Folder ID", "arguments": { "filter_id": "Folder ID" } }, "chatlists.exportedChatlistInvite": { "comment": "Info about an exported chat folder deep link ».", "arguments": { "filter": "Folder ID", "invite": "The exported chat folder deep link »." } }, "botApp": { "comment": "Contains information about a direct link Mini App.", "arguments": { "flags": "Flags, see TL conditional fields", "id": "bot mini app ID", "access_hash": "bot mini app access hash", "short_name": "bot mini app short name, used to generate Direct Mini App deep links.", "title": "bot mini app title.", "description": "bot mini app description.", "photo": "bot mini app photo.", "document": "bot mini app animation.", "hash": "Hash to pass to {@link messages.RawGetBotAppRequest}, to avoid refetching bot app info if it hasn't changed." } }, "exportedChatlistInvite": { "comment": "Exported chat folder deep link ».", "arguments": { "flags": "Flags, see TL conditional fields", "title": "Name of the link", "url": "The chat folder deep link ».", "peers": "Peers to import" } }, "chatlists.exportedInvites": { "comment": "Info about multiple chat folder deep links ».", "arguments": { "invites": "The chat folder deep links ».", "chats": "Related chat information", "users": "Related user information" } }, "chatlists.chatlistInviteAlready": { "comment": "Updated info about a chat folder deep link » we already imported.", "arguments": { "filter_id": "ID of the imported folder", "missing_peers": "New peers to be imported", "already_peers": "Peers that were already imported", "chats": "Related chat information", "users": "Related user information" } }, "inlineBotWebView": { "comment": "Specifies an inline mode mini app button, shown on top of the inline query results list.", "arguments": { "text": "Text of the button", "url": "Webapp URL" } }, "chatlists.chatlistInvite": { "comment": "Info about a chat folder deep link ».", "arguments": { "flags": "Flags, see TL conditional fields", "title": "Name of the link", "emoticon": "Emoji to use as icon for the folder.", "peers": "Supergroups and channels to join", "chats": "Related chat information", "users": "Related user information" } }, "bots.botInfo": { "comment": "Localized information about a bot.", "arguments": { "name": "Bot name", "about": "Bot about text", "description": "Bot description" } }, "messagePeerVoteMultiple": { "comment": "How a peer voted in a multiple-choice poll", "arguments": { "peer": "Peer ID", "options": "Options chosen by the peer", "date": "When did the peer cast their votes" } }, "messagePeerVoteInputOption": { "comment": "How a peer voted in a poll (reduced constructor, returned if an option was provided to {@link messages.RawGetPollVotesRequest})", "arguments": { "peer": "The peer that voted for the queried option", "date": "When did the peer cast the vote" } }, "chatlists.chatlistUpdates": { "comment": "Updated information about a chat folder deep link ».", "arguments": { "missing_peers": "New peers to join", "chats": "Related chat information", "users": "Related user information" } }, "storyViews": { "comment": "Aggregated view and reaction information of a story.", "arguments": { "flags": "Flags, see TL conditional fields", "has_viewers": "If set, indicates that the viewers list is currently viewable, and was not yet deleted because the story has expired while the user didn't have a Premium account.", "views_count": "View counter of the story", "forwards_count": "Forward counter of the story", "reactions": "All reactions sent to this story", "reactions_count": "Number of reactions added to the story", "recent_viewers": "User IDs of some recent viewers of the story" } }, "storyItemDeleted": { "comment": "Represents a previously active story, that was deleted", "arguments": { "id": "Story ID" } }, "storyItemSkipped": { "comment": "Represents an active story, whose full information was omitted for space and performance reasons; use {@link stories.RawGetStoriesByIDRequest} to fetch full info about the skipped story when and if needed.", "arguments": { "flags": "Flags, see TL conditional fields", "close_friends": "Whether this story can only be viewed by our close friends, see here » for more info", "id": "Story ID", "date": "When was the story posted.", "expire_date": "When does the story expire." } }, "storyItem": { "comment": "Represents a story.", "arguments": { "flags": "Flags, see TL conditional fields", "pinned": "Whether this story is pinned on the user's profile", "public": "Whether this story is public and can be viewed by everyone", "close_friends": "Whether this story can only be viewed by our close friends, see here » for more info", "min": "Full information about this story was omitted for space and performance reasons; use {@link stories.RawGetStoriesByIDRequest} to fetch full info about this story when and if needed.", "noforwards": "Whether this story is protected and thus cannot be forwarded; clients should also prevent users from saving attached media (i.e. videos should only be streamed, photos should be kept in RAM, et cetera).", "edited": "Indicates whether the story was edited.", "contacts": "Whether this story can only be viewed by our contacts", "selected_contacts": "Whether this story can only be viewed by a select list of our contacts", "out": "indicates whether we sent this story.", "id": "ID of the story.", "date": "When was the story posted.", "from_id": "Sender of the story.", "fwd_from": "For reposted stories », contains info about the original story.", "expire_date": "When does the story expire.", "caption": "Story caption.", "entities": "Message entities for styled text", "media": "Story media.", "media_areas": "List of media areas, see here » for more info on media areas.", "privacy": "Privacy rules indicating who can and can't view this story", "views": "View date and reaction information", "sent_reaction": "The reaction we sent." } }, "stories.allStoriesNotModified": { "comment": "The list of active (or active and hidden) stories has not changed.", "arguments": { "flags": "Flags, see TL conditional fields", "state": "State to use to ask for updates", "stealth_mode": "Current stealth mode information" } }, "storyView": { "comment": "Story view date and reaction information", "arguments": { "flags": "Flags, see TL conditional fields", "blocked": "Whether we have completely blocked this user, including from viewing more of our stories.", "blocked_my_stories_from": "Whether we have blocked this user from viewing more of our stories.", "user_id": "The user that viewed the story", "date": "When did the user view the story", "reaction": "If present, contains the reaction that the user left on the story" } }, "storyViewPublicForward": { "comment": "A certain peer has forwarded the story as a message to a public chat or channel.", "arguments": { "flags": "Flags, see TL conditional fields", "blocked": "Whether we have completely blocked this user, including from viewing more of our stories.", "blocked_my_stories_from": "Whether we have blocked this user from viewing more of our stories.", "message": "The message with the forwarded story." } }, "messagePeerVote": { "comment": "How a peer voted in a poll", "arguments": { "peer": "Peer ID", "option": "The option chosen by the peer", "date": "When did the peer cast the vote" } }, "storyViewPublicRepost": { "comment": "A certain peer has reposted the story.", "arguments": { "flags": "Flags, see TL conditional fields", "blocked": "Whether we have completely blocked this user, including from viewing more of our stories.", "blocked_my_stories_from": "Whether we have blocked this user from viewing more of our stories.", "peer_id": "The peer that reposted the story.", "story": "The reposted story." } }, "stories.stories": { "comment": "List of stories", "arguments": { "flags": "Flags, see TL conditional fields", "count": "Total number of stories that can be fetched", "stories": "Stories", "pinned_to_top": "IDs of pinned stories.", "chats": "Mentioned chats", "users": "Mentioned users" } }, "stories.allStories": { "comment": "Full list of active (or active and hidden) stories.", "arguments": { "flags": "Flags, see TL conditional fields", "has_more": "Whether more results can be fetched as described here ».", "count": "Total number of active (or active and hidden) stories", "state": "State to use for pagination", "peer_stories": "Stories", "chats": "Mentioned chats", "users": "Mentioned users", "stealth_mode": "Current stealth mode information" } }, "stories.storyViewsList": { "comment": "Reaction and view counters for a story", "arguments": { "flags": "Flags, see TL conditional fields", "count": "Total number of results that can be fetched", "views_count": "Total number of story views", "forwards_count": "Total number of story forwards/reposts", "reactions_count": "Number of reactions that were added to the story", "views": "Story view date and reaction information", "chats": "Mentioned chats", "users": "Mentioned users", "next_offset": "Offset for pagination" } }, "stories.storyViews": { "comment": "Reaction and view counters for a list of stories", "arguments": { "views": "View date and reaction information of multiple stories", "users": "Mentioned users" } }, "inputReplyToMessage": { "comment": "Reply to a message.", "arguments": { "flags": "Flags, see TL conditional fields", "reply_to_msg_id": "The message ID to reply to.", "top_msg_id": "This field must contain the topic ID only when replying to messages in forum topics different from the \"General\" topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1).
    If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the \"General\" topic.", "reply_to_peer_id": "Used to reply to messages sent to another chat (specified here), can only be used for non-protected chats and messages.", "quote_text": "Used to quote-reply to only a certain section (specified here) of the original message. The maximum UTF-8 length for quotes is specified in the quote_length_max config key.", "quote_entities": "Message entities for styled text from the quote_text field.", "quote_offset": "Offset of the message quote_text within the original message (in UTF-16 code units)." } }, "exportedStoryLink": { "comment": "Represents a story deep link.", "arguments": { "link": "The story deep link." } }, "mediaAreaCoordinates": { "comment": "Coordinates and size of a clicable rectangular area on top of a story.", "arguments": { "flags": "Flags, see TL conditional fields", "x": "The abscissa of the rectangle's center, as a percentage of the media width (0-100).", "y": "The ordinate of the rectangle's center, as a percentage of the media height (0-100).", "w": "The width of the rectangle, as a percentage of the media width (0-100).", "h": "The height of the rectangle, as a percentage of the media height (0-100).", "rotation": "Clockwise rotation angle of the rectangle, in degrees (0-360).", "radius": "The radius of the rectangle corner rounding, as a percentage of the media width." } }, "storiesStealthMode": { "comment": "Information about the current stealth mode session.", "arguments": { "flags": "Flags, see TL conditional fields", "active_until_date": "The date up to which stealth mode will be active.", "cooldown_until_date": "The date starting from which the user will be allowed to re-enable stealth mode again." } }, "mediaAreaGeoPoint": { "comment": "Represents a geolocation tag attached to a story.", "arguments": { "flags": "Flags, see TL conditional fields", "coordinates": "The size and position of the media area corresponding to the location sticker on top of the story media.", "geo": "Coordinates of the geolocation tag.", "address": "Optional textual representation of the address." } }, "mediaAreaChannelPost": { "comment": "Represents a channel post.", "arguments": { "coordinates": "The size and location of the media area corresponding to the location sticker on top of the story media.", "channel_id": "The channel that posted the message", "msg_id": "ID of the channel message" } }, "inputReplyToStory": { "comment": "Reply to a story.", "arguments": { "peer": "Sender of the story", "story_id": "ID of the story to reply to." } }, "mediaAreaUrl": { "comment": "Represents a URL media area.", "arguments": { "coordinates": "The size and location of the media area corresponding to the URL button on top of the story media.", "url": "URL to open when clicked." } }, "inputMediaAreaChannelPost": { "comment": "Represents a channel post", "arguments": { "coordinates": "The size and location of the media area corresponding to the location sticker on top of the story media.", "channel": "The channel that posted the message", "msg_id": "ID of the channel message" } }, "mediaAreaSuggestedReaction": { "comment": "Represents a reaction bubble.", "arguments": { "flags": "Flags, see TL conditional fields", "dark": "Whether the reaction bubble has a dark background.", "flipped": "Whether the reaction bubble is mirrored (see here » for more info).", "coordinates": "The coordinates of the media area corresponding to the reaction button.", "reaction": "The reaction that should be sent when this area is clicked." } }, "mediaAreaVenue": { "comment": "Represents a location tag attached to a story, with additional venue information.", "arguments": { "coordinates": "The size and location of the media area corresponding to the location sticker on top of the story media.", "geo": "Coordinates of the venue", "title": "Venue name", "address": "Address", "provider": "Venue provider: currently only \"foursquare\" and \"gplaces\" need to be supported.", "venue_id": "Venue ID in the provider's database", "venue_type": "Venue type in the provider's database" } }, "stories.peerStories": { "comment": "Active story list of a specific peer.", "arguments": { "stories": "Stories", "chats": "Mentioned chats", "users": "Mentioned users" } }, "inputMediaAreaVenue": { "comment": "Represents a location tag attached to a story, with additional venue information.", "arguments": { "coordinates": "The size and location of the media area corresponding to the location sticker on top of the story media.", "query_id": "The query_id from {@link messages.RawBotResults}, see here » for more info.", "result_id": "The id of the chosen result, see here » for more info." } }, "messages.webPage": { "comment": "Represents an Instant View webpage.", "arguments": { "webpage": "The instant view webpage.", "chats": "Chats mentioned in the webpage.", "users": "Users mentioned in the webpage." } }, "mediaAreaWeather": { "comment": "Represents a weather widget ».", "arguments": { "coordinates": "The size and location of the media area corresponding to the widget on top of the story media.", "emoji": "Weather emoji, should be rendered as an animated emoji.", "temperature_c": "Temperature in degrees Celsius.", "color": "ARGB background color." } }, "premiumGiftCodeOption": { "comment": "Contains info about a giveaway/gift option.", "arguments": { "flags": "Flags, see TL conditional fields", "users": "Number of users which will be able to activate the gift codes.", "months": "Duration in months of each gifted Telegram Premium subscription.", "store_product": "Identifier of the store product associated with the option, official apps only.", "store_quantity": "Number of times the store product must be paid", "currency": "Three-letter ISO 4217 currency code", "amount": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." } }, "peerStories": { "comment": "Stories associated to a peer", "arguments": { "flags": "Flags, see TL conditional fields", "peer": "The peer", "max_read_id": "If set, contains the ID of the maximum read story", "stories": "Stories" } }, "payments.giveawayInfo": { "comment": "Contains info about an ongoing giveaway.\n\nIf neither the participating, joined_too_early_date, admin_disallowed_chat_id or disallowed_country flags are set, the user is not currently participating in the giveaway but could participate by joining all the channels specified in the {@link RawMessageMediaGiveaway}.channels field.", "arguments": { "flags": "Flags, see TL conditional fields", "participating": "The current user is participating in the giveaway.", "preparing_results": "If set, the giveaway has ended and the results are being prepared.", "start_date": "When was the giveaway started", "joined_too_early_date": "The current user can't participate in the giveaway, because they were already a member of the channel when the giveaway started, and the only_new_subscribers was set when starting the giveaway.", "admin_disallowed_chat_id": "If set, the current user can't participate in the giveaway, because they are an administrator in one of the channels (ID specified in this flag) that created the giveaway.", "disallowed_country": "If set, the current user can't participate in this giveaway, because their phone number is from the specified disallowed country (specified as a two-letter ISO 3166-1 alpha-2 country code)." } }, "prepaidGiveaway": { "comment": "Contains info about a prepaid giveaway ».", "arguments": { "id": "Prepaid giveaway ID.", "months": "Duration in months of each gifted Telegram Premium subscription.", "quantity": "Number of given away Telegram Premium subscriptions.", "date": "Payment date." } }, "payments.giveawayInfoResults": { "comment": "A giveaway has ended.", "arguments": { "flags": "Flags, see TL conditional fields", "winner": "Whether we're one of the winners of this giveaway.", "refunded": "Whether the giveaway was canceled and was fully refunded.", "start_date": "Start date of the giveaway", "gift_code_slug": "If we're one of the winners of this giveaway, contains the Premium gift code, see here » for more info on the full giveaway flow.", "finish_date": "End date of the giveaway. May be bigger than the end date specified in parameters of the giveaway.", "winners_count": "Number of winners in the giveaway", "activated_count": "Number of winners, which activated their gift codes." } }, "payments.checkedGiftCode": { "comment": "Contains info about a Telegram Premium giftcode link.", "arguments": { "flags": "Flags, see TL conditional fields", "via_giveaway": "Whether this giftcode was created by a giveaway.", "from_id": "The peer that created the gift code.", "giveaway_msg_id": "Message ID of the giveaway in the channel specified in from_id.", "to_id": "The destination user of the gift.", "date": "Creation date of the gift code.", "months": "Duration in months of the gifted Telegram Premium subscription.", "used_date": "When was the giftcode imported, if it was imported.", "chats": "Mentioned chats", "users": "Mentioned users" } }, "storyFwdHeader": { "comment": "Contains info about the original poster of a reposted story.", "arguments": { "flags": "Flags, see TL conditional fields", "modified": "Whether the story media was modified before reposting it (for example by overlaying a round video with a reaction).", "from": "Peer that originally posted the story; will be empty for stories forwarded from a user with forwards privacy enabled, in which case from_name will be set, instead.", "from_name": "Will be set for stories forwarded from a user with forwards privacy enabled, in which case from will also be empty.", "story_id": ", contains the story ID" } }, "boost": { "comment": "Info about one or more boosts applied by a specific user.", "arguments": { "flags": "Flags, see TL conditional fields", "gift": "Whether this boost was applied because the channel/supergroup directly gifted a subscription to the user.", "giveaway": "Whether this boost was applied because the user was chosen in a giveaway started by the channel/supergroup.", "unclaimed": "If set, the user hasn't yet invoked {@link payments.RawApplyGiftCodeRequest} to claim a subscription gifted directly or in a giveaway by the channel.", "id": "Unique ID for this set of boosts.", "user_id": "ID of the user that applied the boost.", "giveaway_msg_id": "The message ID of the giveaway", "date": "When was the boost applied", "expires": "When does the boost expire", "used_gift_slug": "The created Telegram Premium gift code, only set if either gift or giveaway are set AND it is either a gift code for the currently logged in user or if it was already claimed.", "multiplier": "If set, this boost counts as multiplier boosts, otherwise it counts as a single boost." } }, "premium.boostsStatus": { "comment": "Contains info about the current boost status of a peer.", "arguments": { "flags": "Flags, see TL conditional fields", "my_boost": "Whether we're currently boosting this channel/supergroup, my_boost_slots will also be set.", "level": "The current boost level of the channel/supergroup.", "current_level_boosts": "The number of boosts acquired so far in the current level.", "boosts": "Total number of boosts acquired so far.", "gift_boosts": "The number of boosts acquired from created Telegram Premium gift codes and giveaways; only returned to channel/supergroup admins.", "next_level_boosts": "Total number of boosts needed to reach the next level; if absent, the next level isn't available.", "premium_audience": "Only returned to channel/supergroup admins: contains the approximated number of Premium users subscribed to the channel/supergroup, related to the total number of subscribers.", "boost_url": "Boost deep link » that can be used to boost the chat.", "prepaid_giveaways": "A list of prepaid giveaways available for the chat; only returned to channel/supergroup admins.", "my_boost_slots": "Indicates which of our boost slots we've assigned to this peer (populated if my_boost is set)." } }, "premium.boostsList": { "comment": "List of boosts that were applied to a peer by multiple users.", "arguments": { "flags": "Flags, see TL conditional fields", "count": "Total number of results", "boosts": "Boosts", "next_offset": "Offset that can be used for pagination.", "users": "Mentioned users" } }, "premium.myBoosts": { "comment": "A list of peers we are currently boosting, and how many boost slots we have left.", "arguments": { "my_boosts": "Info about boosted peers and remaining boost slots.", "chats": "Referenced chats", "users": "Referenced users" } }, "myBoost": { "comment": "Contains information about a single boost slot ».", "arguments": { "flags": "Flags, see TL conditional fields", "slot": "Boost slot ID »", "peer": "If set, indicates this slot is currently occupied, i.e. we are boosting this peer.
    Note that we can assign multiple boost slots to the same peer.", "date": "When (unixtime) we started boosting the peer, 0 otherwise.", "expires": "Indicates the (unixtime) expiration date of the boost in peer (0 if peer is not set).", "cooldown_until_date": "If peer is set, indicates the (unixtime) date after which this boost can be reassigned to another channel." } }, "stats.storyStats": { "comment": "Contains statistics about a story.", "arguments": { "views_graph": "A graph containing the number of story views and shares", "reactions_by_emotion_graph": "A bar graph containing the number of story reactions categorized by \"emotion\" (i.e. Positive, Negative, Other, etc...)" } }, "publicForwardMessage": { "comment": "Contains info about a forward of a story as a message.", "arguments": { "message": "Info about the message with the reposted story." } }, "postInteractionCountersMessage": { "comment": "Interaction counters for a message.", "arguments": { "msg_id": "Message ID", "views": "Number of views", "forwards": "Number of forwards to public channels", "reactions": "Number of reactions" } }, "publicForwardStory": { "comment": "Contains info about a forward of a story as a repost by a public channel.", "arguments": { "peer": "The channel that reposted the story.", "story": "The reposted story (may be different from the original story)." } }, "help.peerColorSet": { "comment": "Represents a color palette that can be used in message accents ».", "arguments": { "colors": "A list of 1-3 colors in RGB format, describing the accent color." } }, "help.peerColorProfileSet": { "comment": "Represents a color palette that can be used in profile pages ».", "arguments": { "palette_colors": "A list of 1-2 colors in RGB format, shown in the color palette settings to describe the current palette.", "bg_colors": "A list of 1-2 colors in RGB format describing the colors used to generate the actual background used in the profile page.", "story_colors": "A list of 2 colors in RGB format describing the colors of the gradient used for the unread active story indicator around the profile photo." } }, "stats.publicForwards": { "comment": "Contains info about the forwards of a story as a message to public chats and reposts by public channels.", "arguments": { "flags": "Flags, see TL conditional fields", "count": "Total number of results", "forwards": "Info about the forwards of a story.", "next_offset": "Offset used for pagination.", "chats": "Mentioned chats", "users": "Mentioned users" } }, "help.peerColorOption": { "comment": "Contains info about a color palette ».", "arguments": { "flags": "Flags, see TL conditional fields", "hidden": "Whether this palette should not be displayed as an option to the user when choosing a palette to apply to profile pages or message accents.", "color_id": "Palette ID.", "colors": "Light mode palette.
    Will be empty for IDs 0 to 6 inclusive, in which case a palette containing a single color from the following colors should be used: red, orange, violet, green, cyan, blue, pink for indexes 0 to 6 (i.e. the same colors used for randomized fallback message accent colors).", "dark_colors": "Dark mode palette. Optional, defaults to the palette in colors (or the autogenerated palette for IDs 0 to 6) if absent.", "channel_min_level": "Channels can use this palette only after reaching at least the boost level specified in this field.", "group_min_level": "Supergroups can use this palette only after reaching at least the boost level specified in this field." } }, "peerColor": { "comment": "Represents a color palette ».", "arguments": { "flags": "Flags, see TL conditional fields", "color": "Color palette ID, see here » for more info; if not set, the default palette should be used.", "background_emoji_id": "Optional custom emoji ID used to generate the pattern." } }, "help.peerColorsNotModified": { "comment": "The list of color palettes has not changed.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "help.peerColors": { "comment": "Contains info about multiple color palettes ».", "arguments": { "hash": "Hash used for caching, for more info click here", "colors": "Usable color palettes." } }, "storyReaction": { "comment": "How a certain peer reacted to a story", "arguments": { "peer_id": "The peer", "date": "Reaction date", "reaction": "The reaction" } }, "stories.storyReactionsList": { "comment": "List of peers that reacted to or intercated with a specific story", "arguments": { "flags": "Flags, see TL conditional fields", "count": "Total number of reactions matching query", "reactions": "List of peers that reacted to or interacted with a specific story", "chats": "Mentioned chats", "users": "Mentioned users", "next_offset": "If set, indicates the next offset to use to load more results by invoking {@link stories.RawGetStoryReactionsListRequest}." } }, "storyReactionPublicRepost": { "comment": "A certain peer has reposted the story.", "arguments": { "peer_id": "The peer that reposted the story.", "story": "The reposted story." } }, "savedDialog": { "comment": "Represents a saved dialog ».", "arguments": { "flags": "Flags, see TL conditional fields", "pinned": "Is the dialog pinned", "peer": "The dialog", "top_message": "The latest message ID" } }, "messages.savedDialogs": { "comment": "Represents some saved message dialogs ».", "arguments": { "dialogs": "Saved message dialogs ».", "messages": "List of last messages from each saved dialog", "chats": "Mentioned chats", "users": "Mentioned users" } }, "storyReactionPublicForward": { "comment": "A certain peer has forwarded the story as a message to a public chat or channel.", "arguments": { "message": "The message with the forwarded story." } }, "messages.savedDialogsSlice": { "comment": "Incomplete list of saved message dialogs » with messages and auxiliary data.", "arguments": { "count": "Total number of saved message dialogs", "dialogs": "List of saved message dialogs", "messages": "List of last messages from dialogs", "chats": "Mentioned chats", "users": "Mentioned users" } }, "postInteractionCountersStory": { "comment": "Interaction counters for a story.", "arguments": { "story_id": "Story ID", "views": "Number of views", "forwards": "Number of forwards and reposts to public chats and channels", "reactions": "Number of reactions" } }, "messages.savedDialogsNotModified": { "comment": "The saved dialogs haven't changed", "arguments": { "count": "Number of saved dialogs found server-side by the query" } }, "messages.savedReactionTagsNotModified": { "comment": "The list of reaction tag » names assigned by the user hasn't changed.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "savedReactionTag": { "comment": "Info about a saved message reaction tag ».", "arguments": { "flags": "Flags, see TL conditional fields", "reaction": "Reaction associated to the tag.", "title": "Custom tag name assigned by the user (max 12 UTF-8 chars).", "count": "Number of messages tagged with this tag." } }, "messages.savedReactionTags": { "comment": "List of reaction tag » names assigned by the user.", "arguments": { "tags": "Saved reaction tags.", "hash": "Hash used for caching, for more info click here" } }, "outboxReadDate": { "comment": "Exact read date of a private message we sent to another user.", "arguments": { "date": "UNIX timestamp with the read date." } }, "smsjobs.eligibleToJoin": { "comment": "SMS jobs eligibility", "arguments": { "terms_url": "Terms of service URL", "monthly_sent_sms": "Monthly sent SMSes" } }, "smsJob": { "comment": "Info about an SMS job.", "arguments": { "job_id": "Job ID", "phone_number": "Destination phone number", "text": "Text" } }, "businessWeeklyOpen": { "comment": "A time interval, indicating the opening hours of a business.\n\nNote that opening hours specified by the user must be appropriately validated and transformed before uploading them to the server, as specified here ».", "arguments": { "start_minute": "Start minute in minutes of the week, 0 to 7*24*60 inclusively.", "end_minute": "End minute in minutes of the week, 1 to 8*24*60 inclusively (8 and not 7 because this allows to specify intervals that, for example, start on Sunday 21:00 and end on Monday 04:00 (6*24*60+21*60 to 7*24*60+4*60) without passing an invalid end_minute < start_minute). See here » for more info." } }, "smsjobs.status": { "comment": "Status", "arguments": { "flags": "Flags, see TL conditional fields", "allow_international": "Allow international numbers", "recent_sent": "Recently sent", "recent_since": "Since", "recent_remains": "Remaining", "total_sent": "Total sent", "total_since": "Total since", "last_gift_slug": "Last gift deep link", "terms_url": "Terms of service URL" } }, "businessWorkHours": { "comment": "Specifies a set of Telegram Business opening hours.", "arguments": { "flags": "Flags, see TL conditional fields", "open_now": "Ignored if set while invoking {@link account.RawUpdateBusinessWorkHoursRequest}, only returned by the server in {@link RawUserFull}.business_work_hours, indicating whether the business is currently open according to the current time and the values in weekly_open and timezone.", "timezone_id": "An ID of one of the timezones returned by {@link help.RawGetTimezonesListRequest}.
    The timezone ID is contained {@link RawTimezone}.id, a human-readable, localized name of the timezone is available in {@link RawTimezone}.name and the {@link RawTimezone}.utc_offset field contains the UTC offset in seconds, which may be displayed in hh:mm format by the client together with the human-readable name (i.e. $name UTC -01:00).", "weekly_open": "A list of time intervals (max 28) represented by {@link RawBusinessWeeklyOpen}, indicating the opening hours of their business." } }, "businessRecipients": { "comment": "Specifies the chats that can receive Telegram Business away » and greeting » messages.\n\nIf exclude_selected is set, specifies all chats that cannot receive Telegram Business away » and greeting » messages.", "arguments": { "flags": "Flags, see TL conditional fields", "existing_chats": "All existing private chats.", "new_chats": "All new private chats.", "contacts": "All private chats with contacts.", "non_contacts": "All private chats with non-contacts.", "exclude_selected": "If set, inverts the selection.", "users": "Only private chats with the specified users." } }, "inputBusinessRecipients": { "comment": "Specifies the chats that can receive Telegram Business away » and greeting » messages.\n\nIf exclude_selected is set, specifies all chats that cannot receive Telegram Business away » and greeting » messages.", "arguments": { "flags": "Flags, see TL conditional fields", "existing_chats": "All existing private chats.", "new_chats": "All new private chats.", "contacts": "All private chats with contacts.", "non_contacts": "All private chats with non-contacts.", "exclude_selected": "If set, inverts the selection.", "users": "Only private chats with the specified users." } }, "businessAwayMessageScheduleAlways": { "comment": "Always send Telegram Business away messages to users writing to us in private.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "businessAwayMessageScheduleOutsideWorkHours": { "comment": "Send Telegram Business away messages to users writing to us in private outside of the configured Telegram Business working hours.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "businessLocation": { "comment": "Represents the location of a Telegram Business ».", "arguments": { "flags": "Flags, see TL conditional fields", "geo_point": "Geographical coordinates (optional).", "address": "Textual description of the address (mandatory)." } }, "businessAwayMessageScheduleCustom": { "comment": "Send Telegram Business away messages to users writing to us in private in the specified time span.", "arguments": { "start_date": "Start date (UNIX timestamp).", "end_date": "End date (UNIX timestamp)." } }, "inputBusinessGreetingMessage": { "comment": "Describes a Telegram Business greeting, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period.", "arguments": { "shortcut_id": "ID of a quick reply shorcut, containing the greeting messages to send, see here » for more info.", "recipients": "Allowed recipients for the greeting messages.", "no_activity_days": "The number of days after which a private chat will be considered as inactive; currently, must be one of 7, 14, 21, or 28." } }, "inputBusinessAwayMessage": { "comment": "Describes a Telegram Business away message, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user.", "arguments": { "flags": "Flags, see TL conditional fields", "offline_only": "If set, the messages will not be sent if the account was online in the last 10 minutes.", "shortcut_id": "ID of a quick reply shorcut, containing the away messages to send, see here » for more info.", "schedule": "Specifies when should the away messages be sent.", "recipients": "Allowed recipients for the away messages." } }, "businessGreetingMessage": { "comment": "Describes a Telegram Business greeting, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period.", "arguments": { "shortcut_id": "ID of a quick reply shorcut, containing the greeting messages to send, see here » for more info.", "recipients": "Allowed recipients for the greeting messages.", "no_activity_days": "The number of days after which a private chat will be considered as inactive; currently, must be one of 7, 14, 21, or 28." } }, "businessAwayMessage": { "comment": "Describes a Telegram Business away message, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user.", "arguments": { "flags": "Flags, see TL conditional fields", "offline_only": "If set, the messages will not be sent if the account was online in the last 10 minutes.", "shortcut_id": "ID of a quick reply shorcut, containing the away messages to send, see here » for more info.", "schedule": "Specifies when should the away messages be sent.", "recipients": "Allowed recipients for the away messages." } }, "timezone": { "comment": "Timezone information.", "arguments": { "id": "Unique timezone ID.", "name": "Human-readable and localized timezone name.", "utc_offset": "UTC offset in seconds, which may be displayed in hh:mm format by the client together with the human-readable name (i.e. $name UTC -01:00)." } }, "help.timezonesList": { "comment": "Timezone information that may be used elsewhere in the API, such as to set Telegram Business opening hours ».", "arguments": { "timezones": "Timezones", "hash": "Hash used for caching, for more info click here" } }, "inputQuickReplyShortcut": { "comment": "Selects a quick reply shortcut by name.", "arguments": { "shortcut": "Shortcut name." } }, "quickReply": { "comment": "A quick reply shortcut.", "arguments": { "shortcut_id": "Unique shortcut ID.", "shortcut": "Shortcut name.", "top_message": "ID of the last message in the shortcut.", "count": "Total number of messages in the shortcut." } }, "connectedBot": { "comment": "Contains info about a connected business bot ».", "arguments": { "flags": "Flags, see TL conditional fields", "can_reply": "Whether the the bot can reply to messages it receives through the connection", "bot_id": "ID of the connected bot", "recipients": "Specifies the private chats that a connected business bot » may receive messages and interact with.
    " } }, "messages.dialogFilters": { "comment": "Folder and folder tags information", "arguments": { "flags": "Flags, see TL conditional fields", "tags_enabled": "Whether folder tags are enabled.", "filters": "Folders." } }, "messages.quickReplies": { "comment": "Info about quick reply shortcuts ».", "arguments": { "quick_replies": "Quick reply shortcuts.", "messages": "Messages mentioned in quick_replies.", "chats": "Mentioned chats", "users": "Mentioned users" } }, "account.connectedBots": { "comment": "Info about currently connected business bots.", "arguments": { "connected_bots": "Info about the connected bots", "users": "Bot information" } }, "messages.quickRepliesNotModified": { "comment": "Info about quick reply shortcuts » hasn't changed.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "inputQuickReplyShortcutId": { "comment": "Selects a quick reply shortcut by its numeric ID.", "arguments": { "shortcut_id": "Shortcut ID." } }, "help.timezonesListNotModified": { "comment": "The timezone list has not changed.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "businessIntro": { "comment": "Telegram Business introduction ».", "arguments": { "flags": "Flags, see TL conditional fields", "title": "Title of the introduction message (max intro_title_length_limit » UTF-8 characters).", "description": "Profile introduction (max intro_description_length_limit » UTF-8 characters).", "sticker": "Optional introduction sticker." } }, "inputCollectiblePhone": { "comment": "Represents a phone number fragment collectible", "arguments": { "phone": "Phone number" } }, "birthday": { "comment": "Birthday information for a user.\n\nAlso used to invite users to gift Telegram Premium subscriptions » to other users with birthdays within a +1/-1 day time range, related to the current day.", "arguments": { "flags": "Flags, see TL conditional fields", "day": "Birth day", "month": "Birth month", "year": "(Optional) birth year." } }, "inputCollectibleUsername": { "comment": "Represents a username fragment collectible", "arguments": { "username": "Username" } }, "inputBusinessIntro": { "comment": "Telegram Business introduction ».", "arguments": { "flags": "Flags, see TL conditional fields", "title": "Title of the introduction message", "description": "Profile introduction", "sticker": "Optional introduction sticker." } }, "botBusinessConnection": { "comment": "Contains info about a bot business connection.", "arguments": { "flags": "Flags, see TL conditional fields", "can_reply": "Whether the bot can reply on behalf of the user to messages it receives through the business connection", "disabled": "Whether this business connection is currently disabled", "connection_id": "Business connection ID, used to identify messages coming from the connection and to reply to them as specified here ».", "user_id": "ID of the user that the bot is connected to via this connection.", "dc_id": "ID of the datacenter where to send queries wrapped in a {@link RawInvokeWithBusinessConnectionRequest} as specified here ».", "date": "When was the connection created." } }, "messages.myStickers": { "comment": "The list of stickersets owned by the current account ».", "arguments": { "count": "Total number of owned stickersets.", "sets": "Stickersets" } }, "fragment.collectibleInfo": { "comment": "Info about a fragment collectible.", "arguments": { "purchase_date": "Purchase date (unixtime)", "currency": "Three-letter ISO 4217 currency code for amount", "amount": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).", "crypto_currency": "Cryptocurrency name.", "crypto_amount": "Price, in the smallest units of the cryptocurrency.", "url": "Fragment URL with more info about the collectible" } }, "inputBusinessBotRecipients": { "comment": "Specifies the private chats that a connected business bot » may interact with.", "arguments": { "flags": "Flags, see TL conditional fields", "existing_chats": "Selects all existing private chats.", "new_chats": "Selects all new private chats.", "contacts": "Selects all private chats with contacts.", "non_contacts": "Selects all private chats with non-contacts.", "exclude_selected": "If set, then all private chats except the ones selected by existing_chats, new_chats, contacts, non_contacts and users are chosen.
    Note that if this flag is set, any values passed in exclude_users will be merged and moved into users by the server.", "users": "Explicitly selected private chats.", "exclude_users": "Identifiers of private chats that are always excluded." } }, "contactBirthday": { "comment": "Birthday information of a contact.", "arguments": { "contact_id": "User ID.", "birthday": "Birthday information." } }, "businessBotRecipients": { "comment": "Specifies the private chats that a connected business bot » may receive messages and interact with.", "arguments": { "flags": "Flags, see TL conditional fields", "existing_chats": "Selects all existing private chats.", "new_chats": "Selects all new private chats.", "contacts": "Selects all private chats with contacts.", "non_contacts": "Selects all private chats with non-contacts.", "exclude_selected": "If set, then all private chats except the ones selected by existing_chats, new_chats, contacts, non_contacts and users are chosen.
    Note that if this flag is set, any values passed in exclude_users will be merged and moved into users by the server, thus exclude_users will always be empty.", "users": "Explicitly selected private chats.", "exclude_users": "Identifiers of private chats that are always excluded." } }, "businessChatLink": { "comment": "Contains info about a business chat deep link » created by the current account.", "arguments": { "flags": "Flags, see TL conditional fields", "link": "Business chat deep link.", "message": "Message to pre-fill in the message input field.", "entities": "Message entities for styled text", "title": "Human-readable name of the link, to simplify management in the UI (only visible to the creator of the link).", "views": "Number of times the link was resolved (clicked/scanned/etc...)." } }, "account.businessChatLinks": { "comment": "Contains info about business chat deep links » created by the current account.", "arguments": { "links": "Links", "chats": "Mentioned chats", "users": "Mentioned users" } }, "inputBusinessChatLink": { "comment": "Contains info about a business chat deep link » to be created by the current account.", "arguments": { "flags": "Flags, see TL conditional fields", "message": "Message to pre-fill in the message input field.", "entities": "Message entities for styled text", "title": "Human-readable name of the link, to simplify management in the UI (only visible to the creator of the link)." } }, "messages.invitedUsers": { "comment": "Contains info about successfully or unsuccessfully invited » users.", "arguments": { "updates": "List of updates about successfully invited users (and eventually info about the created group)", "missing_invitees": "A list of users that could not be invited, along with the reason why they couldn't be invited." } }, "missingInvitee": { "comment": "Info about why a specific user could not be invited ».", "arguments": { "flags": "Flags, see TL conditional fields", "premium_would_allow_invite": "If set, we could not add the user only because the current account needs to purchase a Telegram Premium subscription to complete the operation.", "premium_required_for_pm": "If set, we could not add the user because of their privacy settings, and additionally, the current account needs to purchase a Telegram Premium subscription to directly share an invite link with the user via a private message.", "user_id": "ID of the user. If neither of the flags below are set, we could not add the user because of their privacy settings, and we can create and directly share an invite link with them using a normal message, instead." } }, "contacts.contactBirthdays": { "comment": "Birthday information of our contacts.", "arguments": { "contacts": "Birthday info", "users": "User information" } }, "requestedPeerUser": { "comment": "Info about a user, shared by a user with the currently logged in bot using {@link messages.RawSendBotRequestedPeerRequest}.\n\nAll fields except the ID are optional, and will be populated if present on the chosen user, according to the parameters of the requesting {@link RawInputKeyboardButtonRequestPeer}.", "arguments": { "flags": "Flags, see TL conditional fields", "user_id": "User ID.", "first_name": "First name.", "last_name": "Last name.", "username": "Username.", "photo": "Profile photo." } }, "account.resolvedBusinessChatLinks": { "comment": "Contains info about a single resolved business chat deep link ».", "arguments": { "flags": "Flags, see TL conditional fields", "peer": "Destination peer", "message": "Message to pre-fill in the message input field.", "entities": "Message entities for styled text", "chats": "Mentioned chats", "users": "Mentioned users" } }, "requestedPeerChat": { "comment": "Info about a chat, shared by a user with the currently logged in bot using {@link messages.RawSendBotRequestedPeerRequest}.\n\nAll fields except the ID are optional, and will be populated if present on the chosen chat, according to the parameters of the requesting {@link RawInputKeyboardButtonRequestPeer}.", "arguments": { "flags": "Flags, see TL conditional fields", "chat_id": "Chat ID.", "title": "Chat title.", "photo": "Chat photo." } }, "sponsoredMessageReportOption": { "comment": "A report option for a sponsored message ».", "arguments": { "text": "Localized description of the option.", "option": "Option identifier to pass to {@link channels.RawReportSponsoredMessageRequest}." } }, "requestedPeerChannel": { "comment": "Info about a channel/supergroup, shared by a user with the currently logged in bot using {@link messages.RawSendBotRequestedPeerRequest}.\n\nAll fields except the ID are optional, and will be populated if present on the chosen channel/supergroup, according to the parameters of the requesting {@link RawInputKeyboardButtonRequestPeer}.", "arguments": { "flags": "Flags, see TL conditional fields", "channel_id": "Channel/supergroup ID.", "title": "Channel/supergroup title.", "username": "Channel/supergroup username.", "photo": "Channel/supergroup photo." } }, "channels.sponsoredMessageReportResultChooseOption": { "comment": "The user must choose a report option from the localized options available in options, and after selection, {@link channels.RawReportSponsoredMessageRequest} must be invoked again, passing the option's option field to the option param of the method.", "arguments": { "title": "Title of the option selection popup.", "options": "Localized list of options." } }, "channels.sponsoredMessageReportResultAdsHidden": { "comment": "Sponsored messages were hidden for the user in all chats.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "channels.sponsoredMessageReportResultReported": { "comment": "The sponsored message was reported successfully.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "stats.broadcastRevenueStats": { "comment": "Channel revenue ad statistics, see here » for more info.\n\nNote that all balances and currency amounts and graph values are in the smallest unit of the chosen cryptocurrency (currently nanotons for TONs, so to obtain a value in USD divide the chosen amount by 10^9, and then divide by usd_rate).", "arguments": { "top_hours_graph": "Ad impressions graph", "revenue_graph": "Ad revenue graph (in the smallest unit of the cryptocurrency in which revenue is calculated)", "balances": "Current balance, current withdrawable balance and overall revenue", "usd_rate": "Current conversion rate of the cryptocurrency (not in the smallest unit) in which revenue is calculated to USD" } }, "broadcastRevenueTransactionRefund": { "comment": "Describes a refund for failed withdrawal of ad earnings »", "arguments": { "amount": "Amount refunded.", "date": "Date of refund.", "provider": "Payment provider name." } }, "broadcastRevenueTransactionProceeds": { "comment": "Describes earnings from sponsored messages in a channel in some time frame, see here » for more info.", "arguments": { "amount": "Amount in the smallest unit of the cryptocurrency.", "from_date": "Start unixtime for the timeframe.", "to_date": "End unixtime for the timeframe." } }, "broadcastRevenueTransactionWithdrawal": { "comment": "Describes a withdrawal of ad earnings »", "arguments": { "flags": "Flags, see TL conditional fields", "pending": "Whether the withdrawal is currently pending", "failed": "Whether the withdrawal has failed", "amount": "Amount withdrawn", "date": "Withdrawal date", "provider": "Payment provider name", "transaction_date": "If neither pending nor failed are set, the transaction was completed successfully, and this field will contain the point in time (UNIX timestamp in seconds) when the withdrawal was completed successfully.", "transaction_url": "If neither pending nor failed are set, the transaction was completed successfully, and this field will contain a URL where the withdrawal transaction can be viewed." } }, "stats.broadcastRevenueWithdrawalUrl": { "comment": "Contains the URL to use to withdraw channel ad revenue.", "arguments": { "url": "A unique URL to a Fragment page where the user will be able to specify and submit the address of the TON wallet where the funds will be sent." } }, "stats.broadcastRevenueTransactions": { "comment": "Channel ad revenue transactions ».", "arguments": { "count": "Total number of transactions.", "transactions": "Transactions" } }, "reactionNotificationsFromContacts": { "comment": "Receive notifications about reactions made only by our contacts.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "reactionsNotifySettings": { "comment": "Reaction notification settings, see here » for more info.", "arguments": { "flags": "Flags, see TL conditional fields", "messages_notify_from": "Message reaction notification settings, if not set completely disables notifications/updates about message reactions.", "stories_notify_from": "Story reaction notification settings, if not set completely disables notifications/updates about reactions to stories.", "sound": "Notification sound for reactions »", "show_previews": "If false, push notifications » about message/story reactions will only be of type REACT_HIDDEN/REACT_STORY_HIDDEN, without any information about the reacted-to story or the reaction itself." } }, "messages.availableEffects": { "comment": "The full list of usable animated message effects ».", "arguments": { "hash": "Hash used for caching, for more info click here", "effects": "Message effects", "documents": "Documents specified in the effects constructors." } }, "reactionNotificationsFromAll": { "comment": "Receive notifications about reactions made by any user.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "broadcastRevenueBalances": { "comment": "Describes channel ad revenue balances ».\n\nNote that all balances are in the smallest unit of the chosen cryptocurrency (currently nanotons for TONs, so to obtain a value in USD divide the chosen amount by 10^9, and then divide by usd_rate).", "arguments": { "current_balance": "Amount of not-yet-withdrawn cryptocurrency.", "available_balance": "Amount of withdrawable cryptocurrency, out of the currently available balance (available_balance <= current_balance).", "overall_revenue": "Total amount of earned cryptocurrency." } }, "factCheck": { "comment": "Represents a fact-check » created by an independent fact-checker.", "arguments": { "flags": "Flags, see TL conditional fields", "need_check": "If set, the country/text fields will not be set, and the fact check must be fetched manually by the client (if it isn't already cached with the key specified in hash) using bundled {@link messages.RawGetFactCheckRequest} requests, when the message with the factcheck scrolls into view.", "country": "A two-letter ISO 3166-1 alpha-2 country code of the country for which the fact-check should be shown.", "text": "The fact-check.", "hash": "Hash used for caching, for more info click here" } }, "messages.availableEffectsNotModified": { "comment": "The full list of usable animated message effects » hasn't changed.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "availableEffect": { "comment": "Represents a message effect ».\n\nAll long IDs except for id are {@link RawDocument}.ids from the containing {@link messages.RawAvailableEffects} constructor.\n\nSee here » for more info on how to use following fields.", "arguments": { "flags": "Flags, see TL conditional fields", "premium_required": "Whether a Premium subscription is required to use this effect.", "id": "Unique effect ID.", "emoticon": "Emoji corresponding to the effect, to be used as icon for the effect if static_icon_id is not set.", "static_icon_id": "ID of the document containing the static icon (WEBP) of the effect.", "effect_sticker_id": "Contains the preview animation (TGS format »), used for the effect selection menu.", "effect_animation_id": "If set, contains the actual animated effect (TGS format »). If not set, the animated effect must be set equal to the premium animated sticker effect associated to the animated sticker specified in effect_sticker_id (always different from the preview animation, fetched thanks to the {@link RawVideoSize} of type f as specified here »)." } }, "starsTransactionPeerUnsupported": { "comment": "Describes a Telegram Star transaction that cannot be described using the current layer.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "starsTransactionPeerAppStore": { "comment": "Describes a Telegram Star transaction with the App Store, used when purchasing Telegram Stars through the App Store.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "starsTransactionPeerPlayMarket": { "comment": "Describes a Telegram Star transaction with the Play Store, used when purchasing Telegram Stars through the Play Store.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "starsTransactionPeer": { "comment": "Describes a Telegram Star transaction with another peer.", "arguments": { "peer": "The peer." } }, "starsTransactionPeerPremiumBot": { "comment": "Describes a Telegram Star transaction made using @PremiumBot (i.e. using the {@link RawInputInvoiceStars} flow described here »).", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "starsTransactionPeerAds": { "comment": "Describes a Telegram Star transaction used to pay for Telegram ads as specified here ».", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "foundStory": { "comment": "A story found using global story search ».", "arguments": { "peer": "The peer that posted the story.", "story": "The story." } }, "starsTopupOption": { "comment": "Telegram Stars topup option.", "arguments": { "flags": "Flags, see TL conditional fields", "extended": "If set, the option must only be shown in the full list of topup options.", "stars": "Amount of Telegram stars.", "store_product": "Identifier of the store product associated with the option, official apps only.", "currency": "Three-letter ISO 4217 currency code", "amount": "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." } }, "starsTransactionPeerFragment": { "comment": "Describes a Telegram Star transaction with Fragment, used when purchasing Telegram Stars through Fragment.", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "geoPointAddress": { "comment": "Address optionally associated to a {@link RawGeoPoint}.", "arguments": { "flags": "Flags, see TL conditional fields", "country_iso2": "Two-letter ISO 3166-1 alpha-2 country code", "state": "State", "city": "City", "street": "Street" } }, "stories.foundStories": { "comment": "Stories found using global story search ».", "arguments": { "flags": "Flags, see TL conditional fields", "count": "Total number of results found for the query.", "stories": "Matching stories.", "next_offset": "Offset used to fetch the next page, if not set this is the final page.", "chats": "Mentioned chats", "users": "Mentioned users" } }, "starsRevenueStatus": { "comment": "Describes Telegram Star revenue balances ».", "arguments": { "flags": "Flags, see TL conditional fields", "withdrawal_enabled": "If set, the user may withdraw up to available_balance stars.", "current_balance": "Amount of not-yet-withdrawn Telegram Stars.", "available_balance": "Amount of withdrawable Telegram Stars.", "overall_revenue": "Total amount of earned Telegram Stars.", "next_withdrawal_at": "Unixtime indicating when will withdrawal be available to the user. If not set, withdrawal can be started now." } }, "starsTransaction": { "comment": "Represents a Telegram Stars transaction ».", "arguments": { "flags": "Flags, see TL conditional fields", "refund": "Whether this transaction is a refund.", "pending": "The transaction is currently pending.", "failed": "This transaction has failed.", "gift": "This transaction was a gift from the user in peer.peer.", "id": "Transaction ID.", "stars": "Amount of Stars (negative for outgoing transactions).", "date": "Date of the transaction (unixtime).", "peer": "Source of the incoming transaction, or its recipient for outgoing transactions.", "title": "For transactions with bots, title of the bought product.", "description": "For transactions with bots, description of the bought product.", "photo": "For transactions with bots, photo of the bought product.", "transaction_date": "If neither pending nor failed are set, the transaction was completed successfully, and this field will contain the point in time (UNIX timestamp in seconds) when the withdrawal was completed successfully.", "transaction_url": "If neither pending nor failed are set, the transaction was completed successfully, and this field will contain a URL where the withdrawal transaction can be viewed.", "bot_payload": "Bot specified invoice payload (i.e. the payload passed to {@link RawInputMediaInvoice} when creating the invoice).", "msg_id": "For paid media transactions », message ID of the paid media posted to peer.peer (can point to a deleted message; either way, extended_media will always contain the bought media).", "extended_media": "The purchased paid media »." } }, "payments.starsRevenueAdsAccountUrl": { "comment": "Contains a URL leading to a page where the user will be able to place ads for the channel/bot, paying using Telegram Stars.", "arguments": { "url": "URL to open." } }, "payments.starsStatus": { "comment": "Info about the current Telegram Star balance and transaction history ».", "arguments": { "flags": "Flags, see TL conditional fields", "balance": "Current Telegram Star balance.", "history": "List of Telegram Star transactions (partial if next_offset is set).", "next_offset": "Offset to use to fetch more transactions from the transaction history using {@link payments.RawGetStarsTransactionsRequest}.", "chats": "Chats mentioned in history.", "users": "Users mentioned in history." } }, "payments.starsRevenueStats": { "comment": "Star revenue statistics, see here » for more info.\n\nNote that all balances and currency amounts and graph values are in Stars.", "arguments": { "revenue_graph": "Star revenue graph (number of earned stars)", "status": "Current balance, current withdrawable balance and overall earned Telegram Stars", "usd_rate": "Current conversion rate of Telegram Stars to USD" } }, "payments.starsRevenueWithdrawalUrl": { "comment": "Contains the URL to use to withdraw Telegram Star revenue.", "arguments": { "url": "Contains the URL to use to withdraw Telegram Star revenue." } }, "inputStarsTransaction": { "comment": "Used to fetch info about a Telegram Star transaction ».", "arguments": { "flags": "Flags, see TL conditional fields", "refund": "If set, fetches info about the refund transaction for this transaction.", "id": "Transaction ID." } }, "starsGiftOption": { "comment": "Telegram Stars gift option.", "arguments": { "flags": "Flags, see TL conditional fields", "extended": "If set, the option must only be shown in the full list of topup options.", "stars": "Amount of Telegram stars.", "store_product": "Identifier of the store product associated with the option, official apps only.", "currency": "Three-letter ISO 4217 currency code", "amount": "Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." } }, "botPreviewMedia": { "comment": "Represents a Main Mini App preview media, see here » for more info.", "arguments": { "date": "When was this media last updated.", "media": "The actual photo/video." } }, "bots.popularAppBots": { "comment": "Popular Main Mini Apps, to be used in the apps tab of global search ».", "arguments": { "flags": "Flags, see TL conditional fields", "next_offset": "Offset for pagination.", "users": "The bots associated to each Main Mini App, see here » for more info." } }, "updateGroupInvitePrivacyForbidden": { "comment": "0-N updates of this type may be returned only when invoking {@link messages.RawAddChatUserRequest}, {@link channels.RawInviteToChannelRequest} or {@link messages.RawCreateChatRequest}: it indicates we couldn't add a user to a chat because of their privacy settings; if required, an invite link can be shared with the user, instead.", "arguments": { "user_id": "ID of the user we couldn't add." } }, "bots.previewInfo": { "comment": "Contains info about Main Mini App previews, see here » for more info.", "arguments": { "media": "All preview medias for the language code passed to {@link bots.RawGetPreviewInfoRequest}.", "lang_codes": "All available language codes for which preview medias were uploaded (regardless of the language code passed to {@link bots.RawGetPreviewInfoRequest})." } }, "appWebViewResultUrl": { "comment": "Contains the link that must be used to open a direct link Mini App.", "arguments": { "url": "The URL to open" } }, "simpleWebViewResultUrl": { "comment": "Contains the webview URL with appropriate theme parameters added", "arguments": { "url": "URL" } }, "inputStorePaymentStars": { "comment": "Used to top up the Telegram Stars balance using the Play Store/App Store flow (official apps only).", "arguments": { "flags": "Flags, see TL conditional fields", "stars": "Amount of stars to topup", "currency": "Three-letter ISO 4217 currency code", "amount": "Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." } }, "sponsoredWebPage": { "comment": "Represents a sponsored website.", "arguments": { "flags": "Flags, see TL conditional fields", "url": "Web page URL.", "site_name": "Website name.", "photo": "Optional image preview." } } }, "methods": { "invokeAfterMsgs": { "comment": "Invokes a query after a successful completion of previous queries", "arguments": { "msg_ids": "List of messages on which a current query depends", "query": "The query itself" }, "available": "both" }, "invokeAfterMsg": { "comment": "Invokes a query after successful completion of one of the previous queries.", "arguments": { "msg_id": "Message identifier on which a current query depends", "query": "The query itself" }, "available": "both" }, "invokeWithoutUpdates": { "comment": "Invoke a request without subscribing the used connection for updates (this is enabled by default for file queries).", "arguments": { "query": "The query" }, "available": "both" }, "initConnection": { "comment": "Initialize connection", "arguments": { "flags": "Flags, see TL conditional fields", "api_id": "Application identifier (see. App configuration)", "device_model": "Device model", "system_version": "Operation system version", "app_version": "Application version", "system_lang_code": "Code for the language used on the device's OS, ISO 639-1 standard", "lang_pack": "Platform identifier (i.e. android, tdesktop, etc).", "lang_code": "Either an ISO 639-1 language code or a language pack name obtained from a language pack link.", "proxy": "Info about an MTProto proxy", "params": "Additional initConnection parameters.
    For now, only the tz_offset field is supported, for specifying the timezone offset in seconds.", "query": "The query itself" }, "throws": [{ "code": 400, "name": "CONNECTION_LAYER_INVALID", "comment": "Layer invalid." }], "available": "both" }, "invokeWithLayer": { "comment": "Invoke the specified query using the specified API layer", "arguments": { "layer": "The layer to use", "query": "The query" }, "throws": [{ "code": 400, "name": "AUTH_BYTES_INVALID", "comment": "The provided authorization is invalid." }, { "code": 400, "name": "CDN_METHOD_INVALID", "comment": "You can't call this method in a CDN DC." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "CONNECTION_API_ID_INVALID", "comment": "The provided API id is invalid." }, { "code": 406, "name": "INVITE_HASH_EXPIRED", "comment": "The invite link has expired." }], "available": "both" }, "invokeWithMessagesRange": { "comment": "Invoke with the given message range", "arguments": { "range": "Message range", "query": "Query" }, "available": "both" }, "invokeWithTakeout": { "comment": "Invoke a method within a takeout session, see here » for more info.", "arguments": { "takeout_id": "Takeout session ID »", "query": "Query" }, "available": "both" }, "invokeWithBusinessConnection": { "comment": "Invoke a method using a Telegram Business Bot connection, see here » for more info, including a list of the methods that can be wrapped in this constructor.\n\nMake sure to always send queries wrapped in a invokeWithBusinessConnection to the datacenter ID, specified in the dc_id field of the {@link RawBotBusinessConnection} that is being used.", "arguments": { "connection_id": "Business connection ID.", "query": "The actual query." }, "available": "both" }, "invokeWithGooglePlayIntegrity": { "comment": "Official clients only, invoke with Google Play Integrity token.", "arguments": { "nonce": "Nonce.", "token": "Token.", "query": "Query." }, "available": "both" }, "invokeWithApnsSecret": { "comment": "Official clients only, invoke with Apple push verification.", "arguments": { "nonce": "Nonce.", "secret": "Secret.", "query": "Query." }, "available": "both" }, "auth.signUp": { "comment": "Registers a validated phone number in the system.", "arguments": { "flags": "Flags, see TL conditional fields", "no_joined_notifications": "If set, users on Telegram that have already added phone_number to their contacts will not receive signup notifications about this user.", "phone_number": "Phone number in the international format", "phone_code_hash": "SMS-message ID", "first_name": "New user first name", "last_name": "New user last name" }, "throws": [{ "code": 400, "name": "FIRSTNAME_INVALID", "comment": "The first name is invalid." }, { "code": 400, "name": "LASTNAME_INVALID", "comment": "The last name is invalid." }, { "code": 400, "name": "PHONE_CODE_EMPTY", "comment": "phone_code is missing." }, { "code": 400, "name": "PHONE_CODE_EXPIRED", "comment": "The phone code you provided has expired." }, { "code": 400, "name": "PHONE_CODE_INVALID", "comment": "The provided phone code is invalid." }, { "code": 400, "name": "PHONE_NUMBER_FLOOD", "comment": "You asked for the code too many times." }, { "code": 406, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }, { "code": 400, "name": "PHONE_NUMBER_OCCUPIED", "comment": "The phone number is already in use." }], "available": "user" }, "auth.logOut": { "comment": "Logs out the user.", "available": "both", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "auth.signIn": { "comment": "Signs in a user with a validated phone number.", "arguments": { "flags": "Flags, see TL conditional fields", "phone_number": "Phone number in the international format", "phone_code_hash": "SMS-message ID, obtained from {@link auth.RawSendCodeRequest}", "phone_code": "Valid numerical code from the SMS-message", "email_verification": "Email verification code or token" }, "throws": [{ "code": 500, "name": "AUTH_RESTART", "comment": "Restart the authorization process." }, { "code": 400, "name": "PHONE_CODE_EMPTY", "comment": "phone_code is missing." }, { "code": 400, "name": "PHONE_CODE_EXPIRED", "comment": "The phone code you provided has expired." }, { "code": 400, "name": "PHONE_CODE_INVALID", "comment": "The provided phone code is invalid." }, { "code": 406, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }, { "code": 400, "name": "PHONE_NUMBER_UNOCCUPIED", "comment": "The phone number is not yet being used." }, { "code": 500, "name": "SIGN_IN_FAILED", "comment": "Failure while signing in." }, { "code": 406, "name": "UPDATE_APP_TO_LOGIN", "comment": "Please update to the latest version of MadelineProto to login." }], "available": "user" }, "auth.resetAuthorizations": { "comment": "Terminates all user's authorized sessions except for the current one.\n\nAfter calling this method it is necessary to reregister the current device using the method {@link account.RawRegisterDeviceRequest}", "throws": [{ "code": 406, "name": "FRESH_RESET_AUTHORISATION_FORBIDDEN", "comment": "You can't logout other sessions if less than 24 hours have passed since you logged on the current session." }], "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "auth.exportAuthorization": { "comment": "Returns data for copying authorization to another data-center.", "arguments": { "dc_id": "Number of a target data-center" }, "throws": [{ "code": 400, "name": "DC_ID_INVALID", "comment": "The provided DC ID is invalid." }], "available": "both" }, "auth.bindTempAuthKey": { "comment": "Binds a temporary authorization key temp_auth_key_id to the permanent authorization key perm_auth_key_id. Each permanent key may only be bound to one temporary key at a time, binding a new temporary key overwrites the previous one.\n\nFor more information, see Perfect Forward Secrecy.", "arguments": { "perm_auth_key_id": "Permanent auth_key_id to bind to", "nonce": "Random long from Binding message contents", "expires_at": "UNIX timestamp in seconds to invalidate temporary key, see Binding message contents", "encrypted_message": "See Generating encrypted_message" }, "throws": [{ "code": 400, "name": "ENCRYPTED_MESSAGE_INVALID", "comment": "Encrypted message invalid." }, { "code": 400, "name": "TEMP_AUTH_KEY_ALREADY_BOUND", "comment": "The passed temporary key is already bound to another perm_auth_key_id." }, { "code": 400, "name": "TEMP_AUTH_KEY_EMPTY", "comment": "No temporary auth key provided." }], "available": "both" }, "auth.importBotAuthorization": { "comment": "Login as a bot", "arguments": { "flags": "Reserved for future use", "api_id": "Application identifier (see. App configuration)", "api_hash": "Application identifier hash (see. App configuration)", "bot_auth_token": "Bot token (see bots)" }, "throws": [{ "code": 400, "name": "ACCESS_TOKEN_EXPIRED", "comment": "Access token expired." }, { "code": 400, "name": "ACCESS_TOKEN_INVALID", "comment": "Access token invalid." }, { "code": 400, "name": "API_ID_INVALID", "comment": "API ID invalid." }, { "code": 400, "name": "API_ID_PUBLISHED_FLOOD", "comment": "This API id was published somewhere, you can't use it now." }], "available": "both" }, "auth.requestPasswordRecovery": { "comment": "Request recovery code of a 2FA password, only for accounts with a recovery email configured.", "throws": [{ "code": 400, "name": "PASSWORD_EMPTY", "comment": "The provided password is empty." }, { "code": 400, "name": "PASSWORD_RECOVERY_NA", "comment": "No email was set, can't recover password via email." }], "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "auth.sendCode": { "comment": "Send the verification code for login", "arguments": { "phone_number": "Phone number in international format", "api_id": "Application identifier (see App configuration)", "api_hash": "Application secret hash (see App configuration)", "settings": "Settings for the code type to send" }, "throws": [{ "code": 400, "name": "API_ID_INVALID", "comment": "API ID invalid." }, { "code": 400, "name": "API_ID_PUBLISHED_FLOOD", "comment": "This API id was published somewhere, you can't use it now." }, { "code": 500, "name": "AUTH_RESTART", "comment": "Restart the authorization process." }, { "code": 400, "name": "PHONE_NUMBER_APP_SIGNUP_FORBIDDEN", "comment": "You can't sign up using this app." }, { "code": 400, "name": "PHONE_NUMBER_BANNED", "comment": "The provided phone number is banned from telegram." }, { "code": 400, "name": "PHONE_NUMBER_FLOOD", "comment": "You asked for the code too many times." }, { "code": 406, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }, { "code": 406, "name": "PHONE_PASSWORD_FLOOD", "comment": "You have tried logging in too many times." }, { "code": 400, "name": "PHONE_PASSWORD_PROTECTED", "comment": "This phone is password protected." }, { "code": 400, "name": "SMS_CODE_CREATE_FAILED", "comment": "An error occurred while creating the SMS code." }, { "code": 406, "name": "UPDATE_APP_TO_LOGIN", "comment": "Please update to the latest version of MadelineProto to login." }], "available": "user" }, "auth.checkPassword": { "comment": "Try logging to an account protected by a 2FA password.", "arguments": { "password": "The account's password (see SRP)" }, "throws": [{ "code": 400, "name": "PASSWORD_HASH_INVALID", "comment": "The provided password hash is invalid." }, { "code": 400, "name": "SRP_ID_INVALID", "comment": "Invalid SRP ID provided." }, { "code": 400, "name": "SRP_PASSWORD_CHANGED", "comment": "Password has changed." }], "available": "user" }, "auth.resendCode": { "comment": "Resend the login code via another medium, the phone code type is determined by the return value of the previous auth.sendCode/auth.resendCode: see login for more info.", "arguments": { "flags": "Flags, see TL conditional fields", "phone_number": "The phone number", "phone_code_hash": "The phone code hash obtained from {@link auth.RawSendCodeRequest}", "reason": "Official clients only, used if the device integrity verification failed, and no secret could be obtained to invoke {@link auth.RawRequestFirebaseSmsRequest}: in this case, the device integrity verification failure reason must be passed here." }, "throws": [{ "code": 400, "name": "PHONE_CODE_EMPTY", "comment": "phone_code is missing." }, { "code": 400, "name": "PHONE_CODE_EXPIRED", "comment": "The phone code you provided has expired." }, { "code": 400, "name": "PHONE_CODE_HASH_EMPTY", "comment": "phone_code_hash is missing." }, { "code": 406, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }, { "code": 406, "name": "SEND_CODE_UNAVAILABLE", "comment": "Returned when all available options for this type of number were already used (e.g. flash-call, then SMS, then this error might be returned to trigger a second resend)." }], "available": "user" }, "auth.importAuthorization": { "comment": "Logs in a user using a key transmitted from their native data-center.", "arguments": { "id": "User ID", "bytes": "Authorization key" }, "throws": [{ "code": 400, "name": "AUTH_BYTES_INVALID", "comment": "The provided authorization is invalid." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "both" }, "auth.dropTempAuthKeys": { "comment": "Delete all temporary authorization keys except for the ones specified", "arguments": { "except_auth_keys": "The auth keys that shouldn't be dropped." }, "available": "both" }, "auth.cancelCode": { "comment": "Cancel the login verification code", "arguments": { "phone_number": "Phone number", "phone_code_hash": "Phone code hash from {@link auth.RawSendCodeRequest}" }, "throws": [{ "code": 400, "name": "PHONE_CODE_EXPIRED", "comment": "The phone code you provided has expired." }, { "code": 406, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }], "available": "user" }, "auth.exportLoginToken": { "comment": "Generate a login token, for login via QR code.
    \nThe generated login token should be encoded using base64url, then shown as a tg://login?token=base64encodedtoken deep link » in the QR code.\n\nFor more info, see login via QR code.", "arguments": { "api_id": "Application identifier (see. App configuration)", "api_hash": "Application identifier hash (see. App configuration)", "except_ids": "List of already logged-in user IDs, to prevent logging in twice with the same user" }, "throws": [{ "code": 400, "name": "API_ID_INVALID", "comment": "API ID invalid." }, { "code": 400, "name": "API_ID_PUBLISHED_FLOOD", "comment": "This API id was published somewhere, you can't use it now." }], "available": "user" }, "auth.importLoginToken": { "comment": "Login using a redirected login token, generated in case of DC mismatch during QR code login.\n\nFor more info, see login via QR code.", "arguments": { "token": "Login token" }, "throws": [{ "code": 400, "name": "AUTH_TOKEN_ALREADY_ACCEPTED", "comment": "The specified auth token was already accepted." }, { "code": 400, "name": "AUTH_TOKEN_EXPIRED", "comment": "The authorization token has expired." }, { "code": 400, "name": "AUTH_TOKEN_INVALID", "comment": "The specified auth token is invalid." }, { "code": 400, "name": "AUTH_TOKEN_INVALIDX", "comment": "The specified auth token is invalid." }], "available": "user" }, "auth.recoverPassword": { "comment": "Reset the 2FA password using the recovery code sent using {@link auth.RawRequestPasswordRecoveryRequest}.", "arguments": { "flags": "Flags, see TL conditional fields", "code": "Code received via email", "new_settings": "New password" }, "throws": [{ "code": 400, "name": "CODE_EMPTY", "comment": "The provided code is empty." }, { "code": 400, "name": "NEW_SETTINGS_INVALID", "comment": "The new password settings are invalid." }], "available": "user" }, "auth.acceptLoginToken": { "comment": "Accept QR code login token, logging in the app that generated it.\n\nReturns info about the new session.\n\nFor more info, see login via QR code.", "arguments": { "token": "Login token embedded in QR code, for more info, see login via QR code." }, "throws": [{ "code": 400, "name": "AUTH_TOKEN_ALREADY_ACCEPTED", "comment": "The specified auth token was already accepted." }, { "code": 400, "name": "AUTH_TOKEN_EXCEPTION", "comment": "An error occurred while importing the auth token." }, { "code": 400, "name": "AUTH_TOKEN_EXPIRED", "comment": "The authorization token has expired." }, { "code": 400, "name": "AUTH_TOKEN_INVALIDX", "comment": "The specified auth token is invalid." }], "available": "user" }, "auth.checkRecoveryPassword": { "comment": "Check if the 2FA recovery code sent using {@link auth.RawRequestPasswordRecoveryRequest} is valid, before passing it to {@link auth.RawRecoverPasswordRequest}.", "arguments": { "code": "Code received via email" }, "throws": [{ "code": 400, "name": "CODE_EMPTY", "comment": "The provided code is empty." }, { "code": 400, "name": "PASSWORD_RECOVERY_EXPIRED", "comment": "The recovery code has expired." }], "available": "user" }, "auth.resetLoginEmail": { "comment": "Reset the login email ».", "arguments": { "phone_number": "Phone number of the account", "phone_code_hash": "Phone code hash, obtained as described in the documentation »" }, "throws": [{ "code": 400, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }, { "code": 400, "name": "TASK_ALREADY_EXISTS", "comment": "An email reset was already requested." }], "available": "user" }, "auth.requestFirebaseSms": { "comment": "Request an SMS code via Firebase.", "arguments": { "flags": "Flags, see TL conditional fields", "phone_number": "Phone number", "phone_code_hash": "Phone code hash returned by {@link auth.RawSendCodeRequest}", "safety_net_token": "On Android, a JWS object obtained as described in the auth documentation »", "play_integrity_token": "On Android, an object obtained as described in the auth documentation »", "ios_push_secret": "Secret token received via an apple push notification" }, "throws": [{ "code": 400, "name": "PHONE_CODE_EMPTY", "comment": "phone_code is missing." }, { "code": 400, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }], "available": "user" }, "auth.importWebTokenAuthorization": { "comment": "Login by importing an authorization token", "arguments": { "api_id": "API ID", "api_hash": "API hash", "web_auth_token": "The authorization token" }, "throws": [{ "code": 400, "name": "API_ID_INVALID", "comment": "API ID invalid." }], "available": "user" }, "account.updateNotifySettings": { "comment": "Edits notification settings from a given user/group, from all users/all groups.", "arguments": { "peer": "Notification source", "settings": "Notification settings" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "SETTINGS_INVALID", "comment": "Invalid settings were provided." }], "available": "user" }, "account.registerDevice": { "comment": "Register device to receive PUSH notifications", "arguments": { "flags": "Flags, see TL conditional fields", "no_muted": "Avoid receiving (silent and invisible background) notifications. Useful to save battery.", "token_type": "Device token type, see PUSH updates for the possible values.", "token": "Device token, see PUSH updates for the possible values.", "app_sandbox": "If true is transmitted, a sandbox-certificate will be used during transmission.", "secret": "For FCM and APNS VoIP, optional encryption key used to encrypt push notifications", "other_uids": "List of user identifiers of other users currently using the client" }, "throws": [{ "code": 400, "name": "TOKEN_EMPTY", "comment": "The specified token is empty." }, { "code": 400, "name": "TOKEN_INVALID", "comment": "The provided token is invalid." }, { "code": 400, "name": "TOKEN_TYPE_INVALID", "comment": "The specified token type is invalid." }, { "code": 400, "name": "WEBPUSH_AUTH_INVALID", "comment": "The specified web push authentication secret is invalid." }, { "code": 400, "name": "WEBPUSH_KEY_INVALID", "comment": "The specified web push elliptic curve Diffie-Hellman public key is invalid." }, { "code": 400, "name": "WEBPUSH_TOKEN_INVALID", "comment": "The specified web push token is invalid." }], "available": "user" }, "auth.reportMissingCode": { "comment": "Official apps only, reports that the SMS authentication code wasn't delivered.", "arguments": { "phone_number": "Phone number where we were supposed to receive the code", "phone_code_hash": "The phone code hash obtained from {@link auth.RawSendCodeRequest}", "mnc": "MNC of the current network operator." }, "throws": [{ "code": 400, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }], "available": "user" }, "account.unregisterDevice": { "comment": "Deletes a device by its token, stops sending PUSH-notifications to it.", "arguments": { "token_type": "Device token type, see PUSH updates for the possible values.", "token": "Device token, see PUSH updates for the possible values.", "other_uids": "List of user identifiers of other users currently using the client" }, "throws": [{ "code": 400, "name": "TOKEN_INVALID", "comment": "The provided token is invalid." }], "available": "user" }, "account.updateProfile": { "comment": "Updates user profile.", "arguments": { "flags": "Flags, see TL conditional fields", "first_name": "New user first name", "last_name": "New user last name", "about": "New bio" }, "throws": [{ "code": 400, "name": "ABOUT_TOO_LONG", "comment": "About string too long." }, { "code": 400, "name": "FIRSTNAME_INVALID", "comment": "The first name is invalid." }], "available": "user" }, "account.resetNotifySettings": { "comment": "Resets all notification settings from users and groups.", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.updateStatus": { "comment": "Updates online user status.", "arguments": { "offline": "If true is transmitted, user status will change to {@link RawUserStatusOffline}." }, "available": "user" }, "account.getWallPapers": { "comment": "Returns a list of available wallpapers.", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "account.reportPeer": { "comment": "Report a peer for violation of telegram's Terms of Service", "arguments": { "peer": "The peer to report", "reason": "The reason why this peer is being reported", "message": "Comment for report moderation" }, "throws": [{ "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "account.getNotifySettings": { "comment": "Gets current notification settings for a given user/group, from all users/all groups.", "arguments": { "peer": "Notification source" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "account.checkUsername": { "comment": "Validates a username and checks availability.", "arguments": { "username": "username
    Accepted characters: A-z (case-insensitive), 0-9 and underscores.
    Length: 5-32 characters." }, "throws": [{ "code": 400, "name": "USERNAME_INVALID", "comment": "The provided username is not valid." }, { "code": 400, "name": "USERNAME_OCCUPIED", "comment": "The provided username is already occupied." }, { "code": 400, "name": "USERNAME_PURCHASE_AVAILABLE", "comment": "The specified username can be purchased on https://fragment.com." }], "available": "user" }, "account.getPrivacy": { "comment": "Get privacy settings of current account", "arguments": { "key": "Peer category whose privacy settings should be fetched" }, "throws": [{ "code": 400, "name": "PRIVACY_KEY_INVALID", "comment": "The privacy key is invalid." }], "available": "user" }, "account.updateUsername": { "comment": "Changes username for the current user.", "arguments": { "username": "username or empty string if username is to be removed
    Accepted characters: a-z (case-insensitive), 0-9 and underscores.
    Length: 5-32 characters." }, "throws": [{ "code": 400, "name": "USERNAME_INVALID", "comment": "The provided username is not valid." }, { "code": 400, "name": "USERNAME_NOT_MODIFIED", "comment": "The username was not modified." }, { "code": 400, "name": "USERNAME_OCCUPIED", "comment": "The provided username is already occupied." }, { "code": 400, "name": "USERNAME_PURCHASE_AVAILABLE", "comment": "The specified username can be purchased on https://fragment.com." }], "available": "user" }, "account.sendChangePhoneCode": { "comment": "Verify a new phone number to associate to the current account", "arguments": { "phone_number": "New phone number", "settings": "Phone code settings" }, "throws": [{ "code": 406, "name": "FRESH_CHANGE_PHONE_FORBIDDEN", "comment": "You can't change phone number right after logging in, please wait at least 24 hours." }, { "code": 400, "name": "PHONE_NUMBER_BANNED", "comment": "The provided phone number is banned from telegram." }, { "code": 406, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }, { "code": 400, "name": "PHONE_NUMBER_OCCUPIED", "comment": "The phone number is already in use." }], "available": "user" }, "account.setAccountTTL": { "comment": "Set account self-destruction period", "arguments": { "ttl": "Time to live in days" }, "throws": [{ "code": 400, "name": "TTL_DAYS_INVALID", "comment": "The provided TTL is invalid." }], "available": "user" }, "account.getAccountTTL": { "comment": "Get days to live of account", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.setPrivacy": { "comment": "Change privacy settings of current account", "arguments": { "key": "New privacy rule", "rules": "Peers to which the privacy rule will apply." }, "throws": [{ "code": 400, "name": "PRIVACY_KEY_INVALID", "comment": "The privacy key is invalid." }, { "code": 400, "name": "PRIVACY_TOO_LONG", "comment": "Too many privacy rules were specified, the current limit is 1000." }, { "code": 400, "name": "PRIVACY_VALUE_INVALID", "comment": "The specified privacy rule combination is invalid." }], "available": "user" }, "account.updateDeviceLocked": { "comment": "When client-side passcode lock feature is enabled, will not show message texts in incoming PUSH notifications.", "arguments": { "period": "Inactivity period after which to start hiding message texts in PUSH notifications." }, "available": "user" }, "account.changePhone": { "comment": "Change the phone number of the current account", "arguments": { "phone_number": "New phone number", "phone_code_hash": "Phone code hash received when calling {@link account.RawSendChangePhoneCodeRequest}", "phone_code": "Phone code received when calling {@link account.RawSendChangePhoneCodeRequest}" }, "throws": [{ "code": 400, "name": "PHONE_CODE_EMPTY", "comment": "phone_code is missing." }, { "code": 400, "name": "PHONE_CODE_EXPIRED", "comment": "The phone code you provided has expired." }, { "code": 406, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }, { "code": 400, "name": "PHONE_NUMBER_OCCUPIED", "comment": "The phone number is already in use." }], "available": "user" }, "account.getAuthorizations": { "comment": "Get logged-in sessions", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.resetAuthorization": { "comment": "Log out an active authorized session by its hash", "arguments": { "hash": "Session hash" }, "throws": [{ "code": 406, "name": "FRESH_RESET_AUTHORISATION_FORBIDDEN", "comment": "You can't logout other sessions if less than 24 hours have passed since you logged on the current session." }, { "code": 400, "name": "HASH_INVALID", "comment": "The provided hash is invalid." }], "available": "user" }, "account.deleteAccount": { "comment": "Delete the user's account from the telegram servers.\n\nCan also be used to delete the account of a user that provided the login code, but forgot the 2FA password and no recovery method is configured, see here » for more info on password recovery, and here » for more info on account deletion.", "arguments": { "flags": "Flags, see TL conditional fields", "reason": "Why is the account being deleted, can be empty", "password": "2FA password: this field can be omitted even for accounts with 2FA enabled: in this case account account deletion will be delayed by 7 days as specified in the docs »" }, "throws": [{ "code": 420, "name": "2FA_CONFIRM_WAIT_%d", "comment": "Since this account is active and protected by a 2FA password, we will delete it in 1 week for security purposes. You can cancel this process at any time, you'll be able to reset your account in %d seconds." }], "available": "user" }, "account.getPasswordSettings": { "comment": "Get private info associated to the password info (recovery email, telegram passport info & so on)", "arguments": { "password": "The password (see SRP)" }, "throws": [{ "code": 400, "name": "PASSWORD_HASH_INVALID", "comment": "The provided password hash is invalid." }], "available": "user" }, "account.updatePasswordSettings": { "comment": "Set a new 2FA password", "arguments": { "password": "The old password (see SRP)", "new_settings": "The new password (see SRP)" }, "throws": [{ "code": 400, "name": "EMAIL_INVALID", "comment": "The specified email is invalid." }, { "code": 400, "name": "EMAIL_UNCONFIRMED", "comment": "Email unconfirmed." }, { "code": 400, "name": "EMAIL_UNCONFIRMED_%d", "comment": "The provided email isn't confirmed, %d is the length of the verification code that was just sent to the email: use {@link account.RawVerifyEmailRequest} to enter the received verification code and enable the recovery email." }, { "code": 400, "name": "NEW_SALT_INVALID", "comment": "The new salt is invalid." }, { "code": 400, "name": "NEW_SETTINGS_EMPTY", "comment": "No password is set on the current account, and no new password was specified in new_settings." }, { "code": 400, "name": "NEW_SETTINGS_INVALID", "comment": "The new password settings are invalid." }, { "code": 400, "name": "PASSWORD_HASH_INVALID", "comment": "The provided password hash is invalid." }, { "code": 400, "name": "SRP_ID_INVALID", "comment": "Invalid SRP ID provided." }, { "code": 400, "name": "SRP_PASSWORD_CHANGED", "comment": "Password has changed." }], "available": "user" }, "account.getPassword": { "comment": "Obtain configuration for two-factor authorization with password", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.sendConfirmPhoneCode": { "comment": "Send confirmation code to cancel account deletion, for more info click here »", "arguments": { "hash": "The hash from the service notification, for more info click here »", "settings": "Phone code settings" }, "throws": [{ "code": 400, "name": "HASH_INVALID", "comment": "The provided hash is invalid." }], "available": "user" }, "account.confirmPhone": { "comment": "Confirm a phone number to cancel account deletion, for more info click here »", "arguments": { "phone_code_hash": "Phone code hash, for more info click here »", "phone_code": "SMS code, for more info click here »" }, "throws": [{ "code": 400, "name": "CODE_HASH_INVALID", "comment": "Code hash invalid." }, { "code": 400, "name": "PHONE_CODE_EMPTY", "comment": "phone_code is missing." }], "available": "user" }, "account.getTmpPassword": { "comment": "Get temporary payment password", "arguments": { "password": "SRP password parameters", "period": "Time during which the temporary password will be valid, in seconds; should be between 60 and 86400" }, "throws": [{ "code": 400, "name": "PASSWORD_HASH_INVALID", "comment": "The provided password hash is invalid." }, { "code": 400, "name": "TMP_PASSWORD_DISABLED", "comment": "The temporary password is disabled." }], "available": "user" }, "account.getWebAuthorizations": { "comment": "Get web login widget authorizations", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.resetWebAuthorizations": { "comment": "Reset all active web telegram login sessions", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.getAllSecureValues": { "comment": "Get all saved Telegram Passport documents, for more info see the passport docs »", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.resetWebAuthorization": { "comment": "Log out an active web telegram login session", "arguments": { "hash": "{@link RawWebAuthorization} hash" }, "throws": [{ "code": 400, "name": "HASH_INVALID", "comment": "The provided hash is invalid." }], "available": "user" }, "account.saveSecureValue": { "comment": "Securely save Telegram Passport document, for more info see the passport docs »", "arguments": { "value": "Secure value, for more info see the passport docs »", "secure_secret_id": "Passport secret hash, for more info see the passport docs »" }, "throws": [{ "code": 400, "name": "PASSWORD_REQUIRED", "comment": "A 2FA password must be configured to use Telegram Passport." }, { "code": 400, "name": "SECURE_SECRET_REQUIRED", "comment": "A secure secret is required." }], "available": "user" }, "account.getSecureValue": { "comment": "Get saved Telegram Passport document, for more info see the passport docs »", "arguments": { "types": "Requested value types" }, "available": "user" }, "account.getAuthorizationForm": { "comment": "Returns a Telegram Passport authorization form for sharing data with a service", "arguments": { "bot_id": "User identifier of the service's bot", "scope": "Telegram Passport element types requested by the service", "public_key": "Service's public key" }, "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }, { "code": 400, "name": "PUBLIC_KEY_REQUIRED", "comment": "A public key is required." }], "available": "user" }, "account.sendVerifyPhoneCode": { "comment": "Send the verification phone code for telegram passport.", "arguments": { "phone_number": "The phone number to verify", "settings": "Phone code settings" }, "throws": [{ "code": 400, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }], "available": "user" }, "account.acceptAuthorization": { "comment": "Sends a Telegram Passport authorization form, effectively sharing data with the service", "arguments": { "bot_id": "Bot ID", "scope": "Telegram Passport element types requested by the service", "public_key": "Service's public key", "value_hashes": "Types of values sent and their hashes", "credentials": "Encrypted values" }, "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }, { "code": 400, "name": "PUBLIC_KEY_REQUIRED", "comment": "A public key is required." }], "available": "user" }, "account.verifyEmail": { "comment": "Verify an email address.", "arguments": { "purpose": "Verification purpose", "verification": "Email verification code or token" }, "throws": [{ "code": 400, "name": "EMAIL_INVALID", "comment": "The specified email is invalid." }, { "code": 400, "name": "EMAIL_NOT_ALLOWED", "comment": "The specified email cannot be used to complete the operation." }, { "code": 400, "name": "EMAIL_VERIFY_EXPIRED", "comment": "The verification email has expired." }, { "code": 400, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }], "available": "user" }, "account.sendVerifyEmailCode": { "comment": "Send an email verification code.", "arguments": { "purpose": "Verification purpose.", "email": "The email where to send the code." }, "throws": [{ "code": 400, "name": "EMAIL_INVALID", "comment": "The specified email is invalid." }, { "code": 400, "name": "EMAIL_NOT_ALLOWED", "comment": "The specified email cannot be used to complete the operation." }, { "code": 400, "name": "EMAIL_NOT_SETUP", "comment": "In order to change the login email with emailVerifyPurposeLoginChange, an existing login email must already be set using emailVerifyPurposeLoginSetup." }, { "code": 400, "name": "PHONE_HASH_EXPIRED", "comment": "An invalid or expired phone_code_hash was provided." }, { "code": 400, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }], "available": "user" }, "account.deleteSecureValue": { "comment": "Delete stored Telegram Passport documents, for more info see the passport docs »", "arguments": { "types": "Document types to delete" }, "available": "user" }, "account.confirmPasswordEmail": { "comment": "Verify an email to use as 2FA recovery method.", "arguments": { "code": "The phone code that was received after setting a recovery email" }, "throws": [{ "code": 400, "name": "CODE_INVALID", "comment": "Code invalid." }, { "code": 400, "name": "EMAIL_HASH_EXPIRED", "comment": "Email hash expired." }], "available": "user" }, "account.finishTakeoutSession": { "comment": "Terminate a takeout session, see here » for more info.", "arguments": { "flags": "Flags, see TL conditional fields", "success": "Data exported successfully" }, "throws": [{ "code": 403, "name": "TAKEOUT_REQUIRED", "comment": "A takeout session needs to be initialized first, see here » for more info." }], "available": "user" }, "account.resendPasswordEmail": { "comment": "Resend the code to verify an email to use as 2FA recovery method.", "throws": [{ "code": 400, "name": "EMAIL_HASH_EXPIRED", "comment": "Email hash expired." }], "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.initTakeoutSession": { "comment": "Initialize a takeout session, see here » for more info.", "arguments": { "flags": "Flags, see TL conditional fields", "contacts": "Whether to export contacts", "message_users": "Whether to export messages in private chats", "message_chats": "Whether to export messages in basic groups", "message_megagroups": "Whether to export messages in supergroups", "message_channels": "Whether to export messages in channels", "files": "Whether to export files", "file_max_size": "Maximum size of files to export" }, "throws": [{ "code": 420, "name": "TAKEOUT_INIT_DELAY_%d", "comment": "Sorry, for security reasons, you will be able to begin downloading your data in %d seconds. We have notified all your devices about the export request to make sure it's authorized and to give you time to react if it's not." }], "available": "user" }, "account.cancelPasswordEmail": { "comment": "Cancel the code that was sent to verify an email to use as 2FA recovery method.", "throws": [{ "code": 400, "name": "EMAIL_HASH_EXPIRED", "comment": "Email hash expired." }], "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.verifyPhone": { "comment": "Verify a phone number for telegram passport.", "arguments": { "phone_number": "Phone number", "phone_code_hash": "Phone code hash received from the call to {@link account.RawSendVerifyPhoneCodeRequest}", "phone_code": "Code received after the call to {@link account.RawSendVerifyPhoneCodeRequest}" }, "throws": [{ "code": 400, "name": "PHONE_CODE_EMPTY", "comment": "phone_code is missing." }, { "code": 400, "name": "PHONE_CODE_EXPIRED", "comment": "The phone code you provided has expired." }, { "code": 400, "name": "PHONE_NUMBER_INVALID", "comment": "The phone number is invalid." }], "available": "user" }, "account.saveWallPaper": { "comment": "Install/uninstall wallpaper", "arguments": { "wallpaper": "Wallpaper to install or uninstall", "unsave": "Uninstall wallpaper?", "settings": "Wallpaper settings" }, "throws": [{ "code": 400, "name": "WALLPAPER_INVALID", "comment": "The specified wallpaper is invalid." }], "available": "user" }, "account.getWallPaper": { "comment": "Get info about a certain wallpaper", "arguments": { "wallpaper": "The wallpaper to get info about" }, "throws": [{ "code": 400, "name": "WALLPAPER_INVALID", "comment": "The specified wallpaper is invalid." }], "available": "user" }, "account.setContactSignUpNotification": { "comment": "Toggle contact sign up notifications", "arguments": { "silent": "Whether to disable contact sign up notifications" }, "available": "user" }, "account.getNotifyExceptions": { "comment": "Returns list of chats with non-default notification settings", "arguments": { "flags": "Flags, see TL conditional fields", "compare_sound": "If set, chats with non-default sound will be returned", "compare_stories": "If set, chats with non-default notification settings for stories will be returned", "peer": "If specified, only chats of the specified category will be returned" }, "available": "user" }, "account.uploadWallPaper": { "comment": "Create and upload a new wallpaper", "arguments": { "flags": "Flags, see TL conditional fields", "for_chat": "Set this flag when uploading wallpapers to be passed to {@link messages.RawSetChatWallPaperRequest}.", "file": "The JPG/PNG wallpaper", "mime_type": "MIME type of uploaded wallpaper", "settings": "Wallpaper settings" }, "throws": [{ "code": 400, "name": "WALLPAPER_FILE_INVALID", "comment": "The specified wallpaper file is invalid." }, { "code": 400, "name": "WALLPAPER_MIME_INVALID", "comment": "The specified wallpaper MIME type is invalid." }], "available": "user" }, "account.installWallPaper": { "comment": "Install wallpaper", "arguments": { "wallpaper": "Wallpaper to install", "settings": "Wallpaper settings" }, "throws": [{ "code": 400, "name": "WALLPAPER_INVALID", "comment": "The specified wallpaper is invalid." }], "available": "user" }, "account.getContactSignUpNotification": { "comment": "Whether the user will receive notifications when contacts sign up", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.saveAutoDownloadSettings": { "comment": "Change media autodownload settings", "arguments": { "flags": "Flags, see TL conditional fields", "low": "Whether to save media in the low data usage preset", "high": "Whether to save media in the high data usage preset", "settings": "Media autodownload settings" }, "available": "user" }, "account.getAutoDownloadSettings": { "comment": "Get media autodownload settings", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.resetWallPapers": { "comment": "Delete all installed wallpapers, reverting to the default wallpaper set.", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.createTheme": { "comment": "Create a theme", "arguments": { "flags": "Flags, see TL conditional fields", "slug": "Unique theme ID used to generate theme deep links, can be empty to autogenerate a random ID.", "title": "Theme name", "document": "Theme file", "settings": "Theme settings, multiple values can be provided for the different base themes (day/night mode, etc)." }, "throws": [{ "code": 400, "name": "THEME_MIME_INVALID", "comment": "The theme's MIME type is invalid." }, { "code": 400, "name": "THEME_TITLE_INVALID", "comment": "The specified theme title is invalid." }], "available": "user" }, "account.uploadTheme": { "comment": "Upload theme", "arguments": { "flags": "Flags, see TL conditional fields", "file": "Previously uploaded theme file with platform-specific colors for UI components, can be left unset when creating themes that only modify the wallpaper or accent colors.", "thumb": "Thumbnail", "file_name": "File name", "mime_type": "MIME type, must be application/x-tgtheme-{format}, where format depends on the client" }, "throws": [{ "code": 400, "name": "THEME_FILE_INVALID", "comment": "Invalid theme file provided." }, { "code": 400, "name": "THEME_MIME_INVALID", "comment": "The theme's MIME type is invalid." }], "available": "user" }, "account.updateTheme": { "comment": "Update theme", "arguments": { "flags": "Flags, see TL conditional fields", "format": "Theme format, a string that identifies the theming engines supported by the client", "theme": "Theme to update", "slug": "Unique theme ID", "title": "Theme name", "document": "Theme file", "settings": "Theme settings" }, "throws": [{ "code": 400, "name": "THEME_INVALID", "comment": "Invalid theme provided." }], "available": "user" }, "account.installTheme": { "comment": "Install a theme", "arguments": { "flags": "Flags, see TL conditional fields", "dark": "Whether to install the dark version", "theme": "Theme to install", "format": "Theme format, a string that identifies the theming engines supported by the client", "base_theme": "Indicates a basic theme provided by all clients" }, "available": "user" }, "account.getThemes": { "comment": "Get installed themes", "arguments": { "format": "Theme format, a string that identifies the theming engines supported by the client", "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "account.setContentSettings": { "comment": "Set sensitive content settings (for viewing or hiding NSFW content)", "arguments": { "flags": "Flags, see TL conditional fields", "sensitive_enabled": "Enable NSFW content" }, "throws": [{ "code": 403, "name": "SENSITIVE_CHANGE_FORBIDDEN", "comment": "You can't change your sensitive content settings." }], "available": "user" }, "account.getTheme": { "comment": "Get theme information", "arguments": { "format": "Theme format, a string that identifies the theming engines supported by the client", "theme": "Theme" }, "throws": [{ "code": 400, "name": "THEME_FORMAT_INVALID", "comment": "Invalid theme format provided." }, { "code": 400, "name": "THEME_INVALID", "comment": "Invalid theme provided." }], "available": "user" }, "account.getMultiWallPapers": { "comment": "Get info about multiple wallpapers", "arguments": { "wallpapers": "Wallpapers to fetch info about" }, "throws": [{ "code": 400, "name": "WALLPAPER_INVALID", "comment": "The specified wallpaper is invalid." }], "available": "user" }, "account.getContentSettings": { "comment": "Get sensitive content settings", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.setGlobalPrivacySettings": { "comment": "Set global privacy settings", "arguments": { "settings": "Global privacy settings" }, "throws": [{ "code": 400, "name": "AUTOARCHIVE_NOT_AVAILABLE", "comment": "The autoarchive setting is not available at this time: please check the value of the autoarchive_setting_available field in client config » before calling this method." }, { "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }], "available": "user" }, "account.getGlobalPrivacySettings": { "comment": "Get global privacy settings", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.saveTheme": { "comment": "Save a theme", "arguments": { "theme": "Theme to save", "unsave": "Unsave" }, "throws": [{ "code": 400, "name": "THEME_INVALID", "comment": "Invalid theme provided." }], "available": "user" }, "account.resetPassword": { "comment": "Initiate a 2FA password reset: can only be used if the user is already logged-in, see here for more info »", "throws": [{ "code": 400, "name": "PASSWORD_EMPTY", "comment": "The provided password is empty." }], "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.reportProfilePhoto": { "comment": "Report a profile photo of a dialog", "arguments": { "peer": "The dialog", "photo_id": "Dialog photo ID", "reason": "Report reason", "message": "Comment for report moderation" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "account.declinePasswordReset": { "comment": "Abort a pending 2FA password reset, see here for more info »", "throws": [{ "code": 400, "name": "RESET_REQUEST_MISSING", "comment": "No password reset is in progress." }], "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.getChatThemes": { "comment": "Get all available chat themes ».", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "account.setAuthorizationTTL": { "comment": "Set time-to-live of current session", "arguments": { "authorization_ttl_days": "Time-to-live of current session in days" }, "throws": [{ "code": 406, "name": "FRESH_RESET_AUTHORISATION_FORBIDDEN", "comment": "You can't logout other sessions if less than 24 hours have passed since you logged on the current session." }, { "code": 400, "name": "TTL_DAYS_INVALID", "comment": "The provided TTL is invalid." }], "available": "user" }, "account.changeAuthorizationSettings": { "comment": "Change settings related to a session.", "arguments": { "flags": "Flags, see TL conditional fields", "confirmed": "If set, confirms a newly logged in session ».", "hash": "Session ID from the {@link RawAuthorization} constructor, fetchable using {@link account.RawGetAuthorizationsRequest}", "encrypted_requests_disabled": "Whether to enable or disable receiving encrypted chats: if the flag is not set, the previous setting is not changed", "call_requests_disabled": "Whether to enable or disable receiving calls: if the flag is not set, the previous setting is not changed" }, "throws": [{ "code": 400, "name": "HASH_INVALID", "comment": "The provided hash is invalid." }], "available": "user" }, "account.getSavedRingtones": { "comment": "Fetch saved notification sounds", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "account.saveRingtone": { "comment": "Save or remove saved notification sound.\n\nIf the notification sound is already in MP3 format, {@link account.RawSavedRingtone} will be returned.
    \nOtherwise, it will be automatically converted and a {@link account.RawSavedRingtoneConverted} will be returned, containing a new {@link RawDocument} object that should be used to refer to the ringtone from now on (ie when deleting it using the unsave parameter, or when downloading it).", "arguments": { "id": "Notification sound uploaded using {@link account.RawUploadRingtoneRequest}", "unsave": "Whether to add or delete the notification sound" }, "throws": [{ "code": 400, "name": "RINGTONE_INVALID", "comment": "The specified ringtone is invalid." }], "available": "user" }, "account.uploadRingtone": { "comment": "Upload notification sound, use {@link account.RawSaveRingtoneRequest} to convert it and add it to the list of saved notification sounds.", "arguments": { "file": "Notification sound", "file_name": "File name", "mime_type": "MIME type of file" }, "throws": [{ "code": 400, "name": "RINGTONE_MIME_INVALID", "comment": "The MIME type for the ringtone is invalid." }], "available": "user" }, "account.updateEmojiStatus": { "comment": "Set an emoji status", "arguments": { "emoji_status": "Emoji status to set" }, "throws": [{ "code": 400, "name": "DOCUMENT_INVALID", "comment": "The specified document is invalid." }], "available": "user" }, "account.getDefaultEmojiStatuses": { "comment": "Get a list of default suggested emoji statuses", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "account.getRecentEmojiStatuses": { "comment": "Get recently used emoji statuses", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "account.reorderUsernames": { "comment": "Reorder usernames associated with the currently logged-in user.", "arguments": { "order": "The new order for active usernames. All active usernames must be specified." }, "throws": [{ "code": 400, "name": "ORDER_INVALID", "comment": "The specified username order is invalid." }, { "code": 400, "name": "USERNAME_NOT_MODIFIED", "comment": "The username was not modified." }], "available": "user" }, "account.getDefaultProfilePhotoEmojis": { "comment": "Get a set of suggested custom emoji stickers that can be used as profile picture", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "account.clearRecentEmojiStatuses": { "comment": "Clears list of recently used emoji statuses", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.getDefaultGroupPhotoEmojis": { "comment": "Get a set of suggested custom emoji stickers that can be used as group picture", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "account.getAutoSaveSettings": { "comment": "Get autosave settings", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.toggleUsername": { "comment": "Activate or deactivate a purchased fragment.com username associated to the currently logged-in user.", "arguments": { "username": "Username", "active": "Whether to activate or deactivate it" }, "throws": [{ "code": 400, "name": "USERNAMES_ACTIVE_TOO_MUCH", "comment": "The maximum number of active usernames was reached." }, { "code": 400, "name": "USERNAME_INVALID", "comment": "The provided username is not valid." }, { "code": 400, "name": "USERNAME_NOT_MODIFIED", "comment": "The username was not modified." }], "available": "user" }, "account.deleteAutoSaveExceptions": { "comment": "Clear all peer-specific autosave settings.", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.saveAutoSaveSettings": { "comment": "Modify autosave settings", "arguments": { "flags": "Flags, see TL conditional fields", "users": "Whether the new settings should affect all private chats", "chats": "Whether the new settings should affect all groups", "broadcasts": "Whether the new settings should affect all channels", "peer": "Whether the new settings should affect a specific peer", "settings": "The new autosave settings" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "account.invalidateSignInCodes": { "comment": "Invalidate the specified login codes, see here » for more info.", "arguments": { "codes": "The login codes to invalidate." }, "available": "user" }, "account.updateColor": { "comment": "Update the accent color and background custom emoji » of the current account.", "arguments": { "flags": "Flags, see TL conditional fields", "for_profile": "Whether to change the accent color emoji pattern of the profile page; otherwise, the accent color and emoji pattern of messages will be changed.", "color": "ID of the accent color palette » to use (not RGB24, see here » for more info).", "background_emoji_id": "Custom emoji ID used in the accent color pattern." }, "throws": [{ "code": 400, "name": "COLOR_INVALID", "comment": "The specified color palette ID was invalid." }, { "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }], "available": "user" }, "account.getChannelDefaultEmojiStatuses": { "comment": "Get a list of default suggested channel emoji statuses.", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "account.getDefaultBackgroundEmojis": { "comment": "Get a set of suggested custom emoji stickers that can be used in an accent color pattern.", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "account.updateBusinessWorkHours": { "comment": "Specify a set of Telegram Business opening hours.
    \nThis info will be contained in {@link RawUserFull}.business_work_hours.\n\nTo remove all opening hours, invoke the method without setting the business_work_hours field.\n\nNote that the opening hours specified by the user must be appropriately validated and transformed before invoking the method, as specified here ».", "arguments": { "flags": "Flags, see TL conditional fields", "business_work_hours": "Opening hours (optional, if not set removes all opening hours)." }, "throws": [{ "code": 400, "name": "BUSINESS_WORK_HOURS_EMPTY", "comment": "No work hours were specified." }, { "code": 400, "name": "BUSINESS_WORK_HOURS_PERIOD_INVALID", "comment": "The specified work hours are invalid, see here » for the exact requirements." }, { "code": 400, "name": "TIMEZONE_INVALID", "comment": "The specified timezone does not exist." }], "available": "user" }, "account.updateBusinessLocation": { "comment": "Businesses » may advertise their location using this method, see here » for more info.\n\nTo remove business location information invoke the method without setting any of the parameters.", "arguments": { "flags": "Flags, see TL conditional fields", "geo_point": "Optional, contains a set of geographical coordinates.", "address": "Mandatory when setting/updating the location, contains a textual description of the address (max 96 UTF-8 chars)." }, "available": "user" }, "account.getChannelRestrictedStatusEmojis": { "comment": "Returns fetch the full list of custom emoji IDs » that cannot be used in channel emoji statuses ».", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "account.updateBusinessGreetingMessage": { "comment": "Set a list of Telegram Business greeting messages.", "arguments": { "flags": "Flags, see TL conditional fields", "message": "Greeting message configuration and contents." }, "available": "user" }, "account.getConnectedBots": { "comment": "List all currently connected business bots »", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.updateBusinessAwayMessage": { "comment": "Set a list of Telegram Business away messages.", "arguments": { "flags": "Flags, see TL conditional fields", "message": "Away message configuration and contents." }, "available": "user" }, "account.getBotBusinessConnection": { "comment": "Bots may invoke this method to re-fetch the {@link RawUpdateBotBusinessConnect} constructor associated with a specific business connection_id, see here » for more info on connected business bots.
    \nThis is needed for example for freshly logged in bots that are receiving some {@link RawUpdateBotNewBusinessMessage}, etc. updates because some users have already connected to the bot before it could login.
    \nIn this case, the bot is receiving messages from the business connection, but it hasn't cached the associated {@link RawUpdateBotBusinessConnect} with info about the connection (can it reply to messages? etc.) yet, and cannot receive the old ones because they were sent when the bot wasn't logged into the session yet.
    \nThis method can be used to fetch info about a not-yet-cached business connection, and should not be invoked if the info is already cached or to fetch changes, as eventual changes will automatically be sent as new {@link RawUpdateBotBusinessConnect} updates to the bot using the usual update delivery methods ».", "arguments": { "connection_id": "Business connection ID »." }, "throws": [{ "code": 400, "name": "CONNECTION_ID_INVALID", "comment": "The specified connection ID is invalid." }], "available": "both" }, "account.toggleConnectedBotPaused": { "comment": "Pause or unpause a specific chat, temporarily disconnecting it from all business bots ».", "arguments": { "peer": "The chat to pause", "paused": "Whether to pause or unpause the chat" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "account.updateBirthday": { "comment": "Update our birthday, see here » for more info.", "arguments": { "flags": "Flags, see TL conditional fields", "birthday": "Birthday." }, "throws": [{ "code": 400, "name": "BIRTHDAY_INVALID", "comment": "An invalid age was specified, must be between 0 and 150 years." }], "available": "user" }, "account.disablePeerConnectedBot": { "comment": "Permanently disconnect a specific chat from all business bots » (equivalent to specifying it in recipients.exclude_users during initial configuration with {@link account.RawUpdateConnectedBotRequest}); to reconnect of a chat disconnected using this method the user must reconnect the entire bot by invoking {@link account.RawUpdateConnectedBotRequest}.", "arguments": { "peer": "The chat to disconnect" }, "throws": [{ "code": 400, "name": "BOT_ALREADY_DISABLED", "comment": "The connected business bot was already disabled for the specified peer." }, { "code": 400, "name": "BOT_NOT_CONNECTED_YET", "comment": "No business bot is connected to the currently logged in user." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "account.updateBusinessIntro": { "comment": "Set or remove the Telegram Business introduction ».", "arguments": { "flags": "Flags, see TL conditional fields", "intro": "Telegram Business introduction, to remove it call the method without setting this flag." }, "available": "user" }, "account.editBusinessChatLink": { "comment": "Edit a created business chat deep link ».", "arguments": { "slug": "Slug of the link, obtained as specified here ».", "link": "New link information." }, "throws": [{ "code": 400, "name": "CHATLINK_SLUG_EMPTY", "comment": "The specified slug is empty." }, { "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }], "available": "user" }, "account.getBusinessChatLinks": { "comment": "List all created business chat deep links ».", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.deleteBusinessChatLink": { "comment": "Delete a business chat deep link ».", "arguments": { "slug": "Slug of the link, obtained as specified here »." }, "throws": [{ "code": 400, "name": "CHATLINK_SLUG_EMPTY", "comment": "The specified slug is empty." }, { "code": 400, "name": "CHATLINK_SLUG_EXPIRED", "comment": "The specified business chat link has expired." }], "available": "user" }, "account.updatePersonalChannel": { "comment": "Associate (or remove) a personal channel », that will be listed on our personal profile page ».\n\nChanging it will emit an {@link RawUpdateUser} update.", "arguments": { "channel": "The channel, pass {@link RawInputChannelEmpty} to remove it." }, "available": "user" }, "account.updateConnectedBot": { "comment": "Connect a business bot » to the current account, or to change the current connection settings.", "arguments": { "flags": "Flags, see TL conditional fields", "can_reply": "Whether the bot can reply to messages it receives from us, on behalf of us using the business connection.", "deleted": "Whether to fully disconnect the bot from the current account.", "bot": "The bot to connect or disconnect", "recipients": "Configuration for the business connection" }, "throws": [{ "code": 400, "name": "BOT_BUSINESS_MISSING", "comment": "The specified bot is not a business bot (the {@link RawUser}.bot_business flag is not set)." }, { "code": 400, "name": "BUSINESS_RECIPIENTS_EMPTY", "comment": "You didn't set any flag in inputBusinessBotRecipients, thus the bot cannot work with any peer." }, { "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }], "available": "user" }, "users.getFullUser": { "comment": "Returns extended user info by ID.", "arguments": { "id": "User ID" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "USERNAME_OCCUPIED", "comment": "The provided username is already occupied." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "both" }, "account.setReactionsNotifySettings": { "comment": "Change the reaction notification settings ».", "arguments": { "settings": "New reaction notification settings." }, "available": "user" }, "account.getReactionsNotifySettings": { "comment": "Get the current reaction notification settings ».", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "account.toggleSponsoredMessages": { "comment": "Disable or re-enable Telegram ads for the current Premium account.\n\nUseful for business owners that may want to launch and view their own Telegram ads via the Telegram ad platform ».", "arguments": { "enabled": "Enable or disable ads." }, "available": "user" }, "users.setSecureValueErrors": { "comment": "Notify the user that the sent passport data contains some errors The user will not be able to re-submit their Passport data to you until the errors are fixed (the contents of the field for which you returned the error must change).\n\nUse this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.", "arguments": { "id": "The user", "errors": "Errors" }, "throws": [{ "code": 403, "name": "USER_BOT_INVALID", "comment": "User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "bot" }, "users.getUsers": { "comment": "Returns basic user info according to their identifiers.", "arguments": { "id": "List of user identifiers" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "FROM_MESSAGE_BOT_DISABLED", "comment": "Bots can't use fromMessage min constructors." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }], "available": "both" }, "contacts.getContactIDs": { "comment": "Get the telegram IDs of all contacts.
    \nReturns an array of Telegram user IDs for all contacts (0 if a contact does not have an associated Telegram account or have hidden their account using privacy settings).", "arguments": { "hash": "Hash used for caching, for more info click here" }, "available": "user" }, "users.getIsPremiumRequiredToContact": { "comment": "Check whether we can write to the specified user (this method can only be called by non-Premium users), see here » for more info on the full flow.", "arguments": { "id": "Users to fetch info about." }, "available": "user" }, "contacts.getStatuses": { "comment": "Use this method to obtain the online statuses of all contacts with an accessible Telegram account.", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "contacts.getContacts": { "comment": "Returns the current user's contact list.", "arguments": { "hash": "Hash used for caching, for more info click here.
    Note that the hash is computed using the usual algorithm, passing to the algorithm first the previously returned {@link contacts.RawContacts}.saved_count field, then max 100000 sorted user IDs from the contact list, including the ID of the currently logged in user if it is saved as a contact.
    Example: tdlib implementation." }, "available": "user" }, "contacts.deleteContacts": { "comment": "Deletes several contacts from the list.", "arguments": { "id": "User ID list" }, "available": "user" }, "contacts.deleteByPhones": { "comment": "Delete contacts by phone number", "arguments": { "phones": "Phone numbers" }, "available": "user" }, "contacts.importContacts": { "comment": "Imports contacts: saves a full list on the server, adds already registered contacts to the contact list, returns added contacts and their info.\n\nUse {@link contacts.RawAddContactRequest} to add Telegram contacts without actually using their phone number.", "arguments": { "contacts": "List of contacts to import" }, "available": "user" }, "contacts.unblock": { "comment": "Deletes a peer from a blocklist, see here » for more info.", "arguments": { "flags": "Flags, see TL conditional fields", "my_stories_from": "Whether the peer should be removed from the story blocklist; if not set, the peer will be removed from the main blocklist, see here » for more info.", "id": "Peer" }, "throws": [{ "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CONTACT_ID_INVALID", "comment": "The provided contact ID is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "account.createBusinessChatLink": { "comment": "Create a business chat deep link ».", "arguments": { "link": "Info about the link to create." }, "throws": [{ "code": 400, "name": "CHATLINKS_TOO_MUCH", "comment": "Too many business chat links were created, please delete some older links." }, { "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }], "available": "user" }, "contacts.getBlocked": { "comment": "Returns the list of blocked users.", "arguments": { "flags": "Flags, see TL conditional fields", "my_stories_from": "Whether to fetch the story blocklist; if not set, will fetch the main blocklist. See here » for differences between the two.", "offset": "The number of list elements to be skipped", "limit": "The number of list elements to be returned" }, "available": "user" }, "contacts.resolveUsername": { "comment": "Resolve a @username to get peer info", "arguments": { "username": "@username to resolve" }, "throws": [{ "code": 400, "name": "CONNECTION_LAYER_INVALID", "comment": "Layer invalid." }, { "code": 400, "name": "USERNAME_INVALID", "comment": "The provided username is not valid." }, { "code": 400, "name": "USERNAME_NOT_OCCUPIED", "comment": "The provided username is not occupied." }], "available": "both" }, "contacts.search": { "comment": "Returns users found by username substring.", "arguments": { "q": "Target substring", "limit": "Maximum number of users to be returned" }, "throws": [{ "code": 400, "name": "QUERY_TOO_SHORT", "comment": "The query string is too short." }, { "code": 400, "name": "SEARCH_QUERY_EMPTY", "comment": "The search query is empty." }], "available": "user" }, "contacts.resetSaved": { "comment": "Removes all contacts without an associated Telegram account.", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "contacts.resetTopPeerRating": { "comment": "Reset rating of top peer", "arguments": { "category": "Top peer category", "peer": "Peer whose rating should be reset" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "contacts.getSaved": { "comment": "Get all contacts, requires a takeout session, see here » for more info.", "throws": [{ "code": 400, "name": "TAKEOUT_INVALID", "comment": "The specified takeout ID is invalid." }, { "code": 403, "name": "TAKEOUT_REQUIRED", "comment": "A takeout session needs to be initialized first, see here » for more info." }], "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "contacts.toggleTopPeers": { "comment": "Enable/disable top peers", "arguments": { "enabled": "Enable/disable" }, "available": "user" }, "contacts.addContact": { "comment": "Add an existing telegram user as contact.\n\nUse {@link contacts.RawImportContactsRequest} to add contacts by phone number, without knowing their Telegram ID.", "arguments": { "flags": "Flags, see TL conditional fields", "add_phone_privacy_exception": "Allow the other user to see our phone number?", "id": "Telegram ID of the other user", "first_name": "First name", "last_name": "Last name", "phone": "User's phone number, may be omitted to simply add the user to the contact list, without a phone number." }, "throws": [{ "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CONTACT_ID_INVALID", "comment": "The provided contact ID is invalid." }, { "code": 400, "name": "CONTACT_NAME_EMPTY", "comment": "Contact name empty." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }], "available": "user" }, "contacts.getTopPeers": { "comment": "Get most used peers", "arguments": { "flags": "Flags, see TL conditional fields", "correspondents": "Users we've chatted most frequently with", "bots_pm": "Most used bots", "bots_inline": "Most used inline bots", "phone_calls": "Most frequently called users", "forward_users": "Users to which the users often forwards messages to", "forward_chats": "Chats to which the users often forwards messages to", "groups": "Often-opened groups and supergroups", "channels": "Most frequently visited channels", "bots_app": "Most frequently used Main Mini Bot Apps.", "offset": "Offset for pagination", "limit": "Maximum number of results to return, see pagination", "hash": "Hash used for caching, for more info click here" }, "throws": [{ "code": 400, "name": "TYPES_EMPTY", "comment": "No top peer type was provided." }], "available": "user" }, "contacts.acceptContact": { "comment": "If the add contact action bar is active, add that user as contact", "arguments": { "id": "The user to add as contact" }, "throws": [{ "code": 400, "name": "CONTACT_ADD_MISSING", "comment": "Contact to add is missing." }, { "code": 400, "name": "CONTACT_ID_INVALID", "comment": "The provided contact ID is invalid." }, { "code": 400, "name": "CONTACT_REQ_MISSING", "comment": "Missing contact request." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }], "available": "user" }, "account.resolveBusinessChatLink": { "comment": "Resolve a business chat deep link ».", "arguments": { "slug": "Slug of the link, obtained as specified here »." }, "throws": [{ "code": 400, "name": "CHATLINK_SLUG_EMPTY", "comment": "The specified slug is empty." }, { "code": 400, "name": "CHATLINK_SLUG_EXPIRED", "comment": "The specified business chat link has expired." }], "available": "user" }, "contacts.getLocated": { "comment": "Get users and geochats near you, see here » for more info.", "arguments": { "flags": "Flags, see TL conditional fields", "background": "While the geolocation of the current user is public, clients should update it in the background every half-an-hour or so, while setting this flag.
    Do this only if the new location is more than 1 KM away from the previous one, or if the previous location is unknown.", "geo_point": "Geolocation", "self_expires": "If set, the geolocation of the current user will be public for the specified number of seconds; pass 0x7fffffff to disable expiry, 0 to make the current geolocation private; if the flag isn't set, no changes will be applied." }, "throws": [{ "code": 406, "name": "BUSINESS_ADDRESS_ACTIVE", "comment": "The user is currently advertising a Business Location, the location may only be changed (or removed) using {@link account.RawUpdateBusinessLocationRequest}. ." }, { "code": 400, "name": "GEO_POINT_INVALID", "comment": "Invalid geoposition provided." }, { "code": 406, "name": "USERPIC_PRIVACY_REQUIRED", "comment": "You need to disable privacy settings for your profile picture in order to make your geolocation public." }, { "code": 406, "name": "USERPIC_UPLOAD_REQUIRED", "comment": "You must have a profile picture to publish your geolocation." }], "available": "user" }, "contacts.blockFromReplies": { "comment": "Stop getting notifications about discussion replies of a certain user in @replies", "arguments": { "flags": "Flags, see TL conditional fields", "delete_message": "Whether to delete the specified message as well", "delete_history": "Whether to delete all @replies messages from this user as well", "report_spam": "Whether to also report this user for spam", "msg_id": "ID of the message in the @replies chat" }, "throws": [{ "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }], "available": "user" }, "contacts.exportContactToken": { "comment": "Generates a temporary profile link for the currently logged-in user.", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "contacts.importContactToken": { "comment": "Obtain user info from a temporary profile link.", "arguments": { "token": "The token extracted from the temporary profile link." }, "throws": [{ "code": 400, "name": "IMPORT_TOKEN_INVALID", "comment": "The specified token is invalid." }], "available": "user" }, "contacts.resolvePhone": { "comment": "Resolve a phone number to get user info, if their privacy settings allow it.", "arguments": { "phone": "Phone number in international format, possibly obtained from a phone number deep link." }, "throws": [{ "code": 400, "name": "PHONE_NOT_OCCUPIED", "comment": "No user is associated to the specified phone number." }], "available": "user" }, "contacts.getBirthdays": { "comment": "Fetch all users with birthdays that fall within +1/-1 days, relative to the current day: this method should be invoked by clients every 6-8 hours, and if the result is non-empty, it should be used to appropriately update locally cached birthday information in {@link RawUser}.birthday.\n\nSee here » for more info.", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "contacts.setBlocked": { "comment": "Replace the contents of an entire blocklist, see here for more info ».", "arguments": { "flags": "Flags, see TL conditional fields", "my_stories_from": "Whether to edit the story blocklist; if not set, will edit the main blocklist. See here » for differences between the two.", "id": "Full content of the blocklist.", "limit": "Maximum number of results to return, see pagination" }, "available": "user" }, "messages.getDialogs": { "comment": "Returns the current user dialog list.", "arguments": { "flags": "Flags, see TL conditional fields", "exclude_pinned": "Exclude pinned dialogs", "folder_id": "Peer folder ID, for more info click here", "offset_date": "Offsets for pagination, for more info click here", "offset_id": "Offsets for pagination, for more info click here (top_message ID used for pagination)", "offset_peer": "Offset peer for pagination", "limit": "Number of list elements to be returned", "hash": "Hash used for caching, for more info click here" }, "throws": [{ "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "FOLDER_ID_INVALID", "comment": "Invalid folder ID." }, { "code": 400, "name": "OFFSET_PEER_ID_INVALID", "comment": "The provided offset peer is invalid." }], "available": "user" }, "messages.getHistory": { "comment": "Returns the conversation history with one interlocutor / within a chat", "arguments": { "peer": "Target peer", "offset_id": "Only return messages starting from the specified message ID", "offset_date": "Only return messages sent before the specified date", "add_offset": "Number of list elements to be skipped, negative values are also accepted.", "limit": "Number of results to return", "max_id": "If a positive value was transferred, the method will return only messages with IDs less than max_id", "min_id": "If a positive value was transferred, the method will return only messages with IDs more than min_id", "hash": "Result hash" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "TAKEOUT_INVALID", "comment": "The specified takeout ID is invalid." }], "available": "user" }, "contacts.editCloseFriends": { "comment": "Edit the close friends list, see here » for more info.", "arguments": { "id": "Full list of user IDs of close friends, see here for more info." }, "available": "user" }, "messages.search": { "comment": "Search for messages.", "arguments": { "flags": "Flags, see TL conditional fields", "peer": "User or chat, histories with which are searched, or {@link RawInputPeerEmpty} constructor to search in all private chats and normal groups (not channels) ». Use {@link messages.RawSearchGlobalRequest} to search globally in all chats, groups, supergroups and channels.", "q": "Text search request", "from_id": "Only return messages sent by the specified user ID", "saved_peer_id": "Search within the saved message dialog » with this ID.", "saved_reaction": "You may search for saved messages tagged » with one or more reactions using this flag.", "top_msg_id": "Thread ID", "filter": "Filter to return only specified message types", "min_date": "If a positive value was transferred, only messages with a sending date bigger than the transferred one will be returned", "max_date": "If a positive value was transferred, only messages with a sending date smaller than the transferred one will be returned", "offset_id": "Only return messages starting from the specified message ID", "add_offset": "Additional offset", "limit": "Number of results to return", "max_id": "Maximum message ID to return", "min_id": "Minimum message ID to return", "hash": "Hash" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "FROM_PEER_INVALID", "comment": "The specified from_id is invalid." }, { "code": 400, "name": "INPUT_FILTER_INVALID", "comment": "The specified filter is invalid." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "PEER_ID_NOT_SUPPORTED", "comment": "The provided peer ID is not supported." }, { "code": 400, "name": "SEARCH_QUERY_EMPTY", "comment": "The search query is empty." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "user" }, "messages.readHistory": { "comment": "Marks message history as read.", "arguments": { "peer": "Target user or group", "max_id": "If a positive value is passed, only messages with identifiers less or equal than the given one will be read" }, "throws": [{ "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.getMessages": { "comment": "Returns the list of messages by their IDs.", "arguments": { "id": "Message ID list" }, "available": "both" }, "messages.deleteHistory": { "comment": "Deletes communication history.", "arguments": { "flags": "Flags, see TL conditional fields", "just_clear": "Just clear history for the current user, without actually removing messages for every chat user", "revoke": "Whether to delete the message history for all chat participants", "peer": "User or chat, communication history of which will be deleted", "max_id": "Maximum ID of message to delete", "min_date": "Delete all messages newer than this UNIX timestamp", "max_date": "Delete all messages older than this UNIX timestamp" }, "throws": [{ "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_REVOKE_DATE_UNSUPPORTED", "comment": "min_date and max_date are not available for using with non-user peers." }, { "code": 400, "name": "MAX_DATE_INVALID", "comment": "The specified maximum date is invalid." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "MIN_DATE_INVALID", "comment": "The specified minimum date is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.deleteMessages": { "comment": "Deletes messages by their identifiers.", "arguments": { "flags": "Flags, see TL conditional fields", "revoke": "Whether to delete messages for all participants of the chat", "id": "Message ID list" }, "throws": [{ "code": 403, "name": "MESSAGE_DELETE_FORBIDDEN", "comment": "You can't delete one of the messages you tried to delete, most likely because it is a service message." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }], "available": "both" }, "contacts.block": { "comment": "Adds a peer to a blocklist, see here » for more info.", "arguments": { "flags": "Flags, see TL conditional fields", "my_stories_from": "Whether the peer should be added to the story blocklist; if not set, the peer will be added to the main blocklist, see here » for more info.", "id": "Peer" }, "throws": [{ "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CONTACT_ID_INVALID", "comment": "The provided contact ID is invalid." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.setTyping": { "comment": "Sends a current user typing event (see SendMessageAction for all event types) to a conversation partner or group.", "arguments": { "flags": "Flags, see TL conditional fields", "peer": "Target user or group", "top_msg_id": "Topic ID", "action": "Type of action" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 403, "name": "GROUPCALL_FORBIDDEN", "comment": "The group call has already ended." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }, { "code": 403, "name": "USER_IS_BLOCKED", "comment": "You were blocked by this user." }, { "code": 400, "name": "USER_IS_BOT", "comment": "Bots can't send messages to other bots." }], "available": "both" }, "messages.receivedMessages": { "comment": "Confirms receipt of messages by a client, cancels PUSH-notification sending.", "arguments": { "max_id": "Maximum message ID available in a client." }, "available": "user" }, "messages.sendMessage": { "comment": "Sends a message to a chat", "arguments": { "flags": "Flags, see TL conditional fields", "no_webpage": "Set this flag to disable generation of the webpage preview", "silent": "Send this message silently (no notifications for the receivers)", "background": "Send this message as background message", "clear_draft": "Clear the draft field", "noforwards": "Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled", "update_stickersets_order": "Whether to move used stickersets to top, see here for more info on this flag »", "invert_media": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.", "peer": "The destination where the message will be sent", "reply_to": "If set, indicates that the message should be sent in reply to the specified message or story.
    Also used to quote other messages.", "message": "The message", "random_id": "Unique client message ID required to prevent message resending", "reply_markup": "Reply markup for sending bot buttons", "entities": "Message entities for sending styled text", "schedule_date": "Scheduled message date for scheduled messages", "send_as": "Send this message as the specified peer", "quick_reply_shortcut": "Add the message to the specified quick reply shortcut », instead.", "effect": "Specifies a message effect » to use for the message." }, "throws": [{ "code": 400, "name": "ADMIN_RIGHTS_EMPTY", "comment": "The chatAdminRights constructor passed in keyboardButtonRequestPeer.peer_type.user_admin_rights has no rights set (i.e. flags is 0)." }, { "code": 400, "name": "BOT_DOMAIN_INVALID", "comment": "Bot domain invalid." }, { "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }, { "code": 400, "name": "BUSINESS_PEER_INVALID", "comment": "Messages can't be set to the specified peer through the current business connection." }, { "code": 400, "name": "BUTTON_DATA_INVALID", "comment": "The data of one or more of the buttons you provided is invalid." }, { "code": 400, "name": "BUTTON_TYPE_INVALID", "comment": "The type of one or more of the buttons you provided is invalid." }, { "code": 400, "name": "BUTTON_URL_INVALID", "comment": "Button URL invalid." }, { "code": 400, "name": "BUTTON_USER_INVALID", "comment": "The user_id passed to inputKeyboardButtonUserProfile is invalid!" }, { "code": 400, "name": "BUTTON_USER_PRIVACY_RESTRICTED", "comment": "The privacy setting of the user specified in a {@link RawInputKeyboardButtonUserProfile} button do not allow creating such a button." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_GUEST_SEND_FORBIDDEN", "comment": "You join the discussion group before commenting, see here » for more info." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_RESTRICTED", "comment": "You can't send messages in this chat, you were restricted." }, { "code": 403, "name": "CHAT_SEND_PLAIN_FORBIDDEN", "comment": "You can't send non-media (text) messages in this chat." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "DOCUMENT_INVALID", "comment": "The specified document is invalid." }, { "code": 400, "name": "ENCRYPTION_DECLINED", "comment": "The secret chat was declined." }, { "code": 400, "name": "ENTITIES_TOO_LONG", "comment": "You provided too many styled message entities." }, { "code": 400, "name": "ENTITY_BOUNDS_INVALID", "comment": "A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length." }, { "code": 400, "name": "ENTITY_MENTION_USER_INVALID", "comment": "You mentioned an invalid user." }, { "code": 400, "name": "FROM_MESSAGE_BOT_DISABLED", "comment": "Bots can't use fromMessage min constructors." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MESSAGE_EMPTY", "comment": "The provided message is empty." }, { "code": 400, "name": "MESSAGE_TOO_LONG", "comment": "The provided message is too long." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 500, "name": "MSG_WAIT_FAILED", "comment": "A waiting call returned an error." }, { "code": 406, "name": "PAYMENT_UNSUPPORTED", "comment": "A detailed description of the error will be received separately as described here »." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "PINNED_DIALOGS_TOO_MUCH", "comment": "Too many pinned dialogs." }, { "code": 400, "name": "POLL_OPTION_INVALID", "comment": "Invalid poll option provided." }, { "code": 406, "name": "PRIVACY_PREMIUM_REQUIRED", "comment": "You need a Telegram Premium subscription to send a message to this user." }, { "code": 400, "name": "QUICK_REPLIES_TOO_MUCH", "comment": "A maximum of appConfig.quick_replies_limit shortcuts may be created, the limit was reached." }, { "code": 400, "name": "QUOTE_TEXT_INVALID", "comment": "The specified reply_to.quote_text field is invalid." }, { "code": 500, "name": "RANDOM_ID_DUPLICATE", "comment": "You provided a random ID that was already used." }, { "code": 400, "name": "REPLY_MARKUP_INVALID", "comment": "The provided reply markup is invalid." }, { "code": 400, "name": "REPLY_MARKUP_TOO_LONG", "comment": "The specified reply_markup is too long." }, { "code": 400, "name": "REPLY_MESSAGES_TOO_MUCH", "comment": "Each shortcut can contain a maximum of appConfig.quick_reply_messages_limit messages, the limit was reached." }, { "code": 400, "name": "REPLY_MESSAGE_ID_INVALID", "comment": "The specified reply-to message ID is invalid." }, { "code": 400, "name": "REPLY_TO_INVALID", "comment": "The specified reply_to field is invalid." }, { "code": 400, "name": "REPLY_TO_USER_INVALID", "comment": "The replied-to user is invalid." }, { "code": 400, "name": "SCHEDULE_BOT_NOT_ALLOWED", "comment": "Bots cannot schedule messages." }, { "code": 400, "name": "SCHEDULE_DATE_TOO_LATE", "comment": "You can't schedule a message this far in the future." }, { "code": 400, "name": "SCHEDULE_STATUS_PRIVATE", "comment": "Can't schedule until user is online, if the user's last seen timestamp is hidden by their privacy settings." }, { "code": 400, "name": "SCHEDULE_TOO_MUCH", "comment": "There are too many scheduled messages." }, { "code": 400, "name": "SEND_AS_PEER_INVALID", "comment": "You can't send messages as the specified peer." }, { "code": 420, "name": "SLOWMODE_WAIT_%d", "comment": "Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat." }, { "code": 400, "name": "STORY_ID_INVALID", "comment": "The specified story ID is invalid." }, { "code": 406, "name": "TOPIC_CLOSED", "comment": "This topic was closed, you can't send messages to it anymore." }, { "code": 406, "name": "TOPIC_DELETED", "comment": "The specified topic was deleted." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }, { "code": 403, "name": "USER_IS_BLOCKED", "comment": "You were blocked by this user." }, { "code": 400, "name": "USER_IS_BOT", "comment": "Bots can't send messages to other bots." }, { "code": 400, "name": "WC_CONVERT_URL_INVALID", "comment": "WC convert URL invalid." }, { "code": 400, "name": "YOU_BLOCKED_USER", "comment": "You blocked this user." }], "available": "both" }, "messages.forwardMessages": { "comment": "Forwards messages by their IDs.", "arguments": { "flags": "Flags, see TL conditional fields", "silent": "Whether to send messages silently (no notification will be triggered on the destination clients)", "background": "Whether to send the message in background", "with_my_score": "When forwarding games, whether to include your score in the game", "drop_author": "Whether to forward messages without quoting the original author", "drop_media_captions": "Whether to strip captions from media", "noforwards": "Only for bots, disallows further re-forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled", "from_peer": "Source of messages", "id": "IDs of messages", "random_id": "Random ID to prevent resending of messages", "to_peer": "Destination peer", "top_msg_id": "Destination forum topic", "schedule_date": "Scheduled message date for scheduled messages", "send_as": "Forward the messages as the specified peer", "quick_reply_shortcut": "Add the messages to the specified quick reply shortcut », instead." }, "throws": [{ "code": 400, "name": "BROADCAST_PUBLIC_VOTERS_FORBIDDEN", "comment": "You can't forward polls with public voters." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 406, "name": "CHAT_FORWARDS_RESTRICTED", "comment": "You can't forward messages from a protected chat." }, { "code": 403, "name": "CHAT_GUEST_SEND_FORBIDDEN", "comment": "You join the discussion group before commenting, see here » for more info." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_RESTRICTED", "comment": "You can't send messages in this chat, you were restricted." }, { "code": 403, "name": "CHAT_SEND_AUDIOS_FORBIDDEN", "comment": "You can't send audio messages in this chat." }, { "code": 403, "name": "CHAT_SEND_DOCS_FORBIDDEN", "comment": "You can't send documents in this chat." }, { "code": 403, "name": "CHAT_SEND_GAME_FORBIDDEN", "comment": "You can't send a game to this chat." }, { "code": 403, "name": "CHAT_SEND_GIFS_FORBIDDEN", "comment": "You can't send gifs in this chat." }, { "code": 403, "name": "CHAT_SEND_MEDIA_FORBIDDEN", "comment": "You can't send media in this chat." }, { "code": 403, "name": "CHAT_SEND_PHOTOS_FORBIDDEN", "comment": "You can't send photos in this chat." }, { "code": 403, "name": "CHAT_SEND_PLAIN_FORBIDDEN", "comment": "You can't send non-media (text) messages in this chat." }, { "code": 403, "name": "CHAT_SEND_POLL_FORBIDDEN", "comment": "You can't send polls in this chat." }, { "code": 403, "name": "CHAT_SEND_STICKERS_FORBIDDEN", "comment": "You can't send stickers in this chat." }, { "code": 403, "name": "CHAT_SEND_VIDEOS_FORBIDDEN", "comment": "You can't send videos in this chat." }, { "code": 403, "name": "CHAT_SEND_VOICES_FORBIDDEN", "comment": "You can't send voice recordings in this chat." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "GROUPED_MEDIA_INVALID", "comment": "Invalid grouped media." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MEDIA_EMPTY", "comment": "The provided media object is invalid." }, { "code": 400, "name": "MESSAGE_IDS_EMPTY", "comment": "No message ids were provided." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 406, "name": "PAYMENT_UNSUPPORTED", "comment": "A detailed description of the error will be received separately as described here »." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }, { "code": 406, "name": "PRIVACY_PREMIUM_REQUIRED", "comment": "You need a Telegram Premium subscription to send a message to this user." }, { "code": 400, "name": "QUICK_REPLIES_TOO_MUCH", "comment": "A maximum of appConfig.quick_replies_limit shortcuts may be created, the limit was reached." }, { "code": 400, "name": "QUIZ_ANSWER_MISSING", "comment": "You can forward a quiz while hiding the original author only after choosing an option in the quiz." }, { "code": 500, "name": "RANDOM_ID_DUPLICATE", "comment": "You provided a random ID that was already used." }, { "code": 400, "name": "RANDOM_ID_INVALID", "comment": "A provided random ID is invalid." }, { "code": 400, "name": "REPLY_MESSAGES_TOO_MUCH", "comment": "Each shortcut can contain a maximum of appConfig.quick_reply_messages_limit messages, the limit was reached." }, { "code": 400, "name": "SCHEDULE_BOT_NOT_ALLOWED", "comment": "Bots cannot schedule messages." }, { "code": 400, "name": "SCHEDULE_DATE_TOO_LATE", "comment": "You can't schedule a message this far in the future." }, { "code": 400, "name": "SCHEDULE_TOO_MUCH", "comment": "There are too many scheduled messages." }, { "code": 400, "name": "SEND_AS_PEER_INVALID", "comment": "You can't send messages as the specified peer." }, { "code": 400, "name": "SLOWMODE_MULTI_MSGS_DISABLED", "comment": "Slowmode is enabled, you cannot forward multiple messages to this group." }, { "code": 420, "name": "SLOWMODE_WAIT_%d", "comment": "Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat." }, { "code": 406, "name": "TOPIC_CLOSED", "comment": "This topic was closed, you can't send messages to it anymore." }, { "code": 406, "name": "TOPIC_DELETED", "comment": "The specified topic was deleted." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }, { "code": 403, "name": "USER_IS_BLOCKED", "comment": "You were blocked by this user." }, { "code": 400, "name": "USER_IS_BOT", "comment": "Bots can't send messages to other bots." }, { "code": 403, "name": "VOICE_MESSAGES_FORBIDDEN", "comment": "This user's privacy settings forbid you from sending voice messages." }, { "code": 400, "name": "YOU_BLOCKED_USER", "comment": "You blocked this user." }], "available": "both" }, "messages.sendMedia": { "comment": "Send a media", "arguments": { "flags": "Flags, see TL conditional fields", "silent": "Send message silently (no notification should be triggered)", "background": "Send message in background", "clear_draft": "Clear the draft", "noforwards": "Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled", "update_stickersets_order": "Whether to move used stickersets to top, see here for more info on this flag »", "invert_media": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.", "peer": "Destination", "reply_to": "If set, indicates that the message should be sent in reply to the specified message or story.", "media": "Attached media", "message": "Caption", "random_id": "Random ID to avoid resending the same message", "reply_markup": "Reply markup for bot keyboards", "entities": "Message entities for styled text", "schedule_date": "Scheduled message date for scheduled messages", "send_as": "Send this message as the specified peer", "quick_reply_shortcut": "Add the message to the specified quick reply shortcut », instead.", "effect": "Specifies a message effect » to use for the message." }, "throws": [{ "code": 400, "name": "BOT_GAMES_DISABLED", "comment": "Games can't be sent to channels." }, { "code": 400, "name": "BOT_PAYMENTS_DISABLED", "comment": "Please enable bot payments in botfather before calling this method." }, { "code": 400, "name": "BROADCAST_PUBLIC_VOTERS_FORBIDDEN", "comment": "You can't forward polls with public voters." }, { "code": 400, "name": "BUTTON_DATA_INVALID", "comment": "The data of one or more of the buttons you provided is invalid." }, { "code": 400, "name": "BUTTON_POS_INVALID", "comment": "The position of one of the keyboard buttons is invalid (i.e. a Game or Pay button not in the first position, and so on...)." }, { "code": 400, "name": "BUTTON_TYPE_INVALID", "comment": "The type of one or more of the buttons you provided is invalid." }, { "code": 400, "name": "BUTTON_URL_INVALID", "comment": "Button URL invalid." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_FORWARDS_RESTRICTED", "comment": "You can't forward messages from a protected chat." }, { "code": 403, "name": "CHAT_GUEST_SEND_FORBIDDEN", "comment": "You join the discussion group before commenting, see here » for more info." }, { "code": 400, "name": "CHAT_RESTRICTED", "comment": "You can't send messages in this chat, you were restricted." }, { "code": 403, "name": "CHAT_SEND_AUDIOS_FORBIDDEN", "comment": "You can't send audio messages in this chat." }, { "code": 403, "name": "CHAT_SEND_DOCS_FORBIDDEN", "comment": "You can't send documents in this chat." }, { "code": 403, "name": "CHAT_SEND_GIFS_FORBIDDEN", "comment": "You can't send gifs in this chat." }, { "code": 403, "name": "CHAT_SEND_MEDIA_FORBIDDEN", "comment": "You can't send media in this chat." }, { "code": 403, "name": "CHAT_SEND_PHOTOS_FORBIDDEN", "comment": "You can't send photos in this chat." }, { "code": 403, "name": "CHAT_SEND_PLAIN_FORBIDDEN", "comment": "You can't send non-media (text) messages in this chat." }, { "code": 403, "name": "CHAT_SEND_POLL_FORBIDDEN", "comment": "You can't send polls in this chat." }, { "code": 403, "name": "CHAT_SEND_ROUNDVIDEOS_FORBIDDEN", "comment": "You can't send round videos to this chat." }, { "code": 403, "name": "CHAT_SEND_STICKERS_FORBIDDEN", "comment": "You can't send stickers in this chat." }, { "code": 403, "name": "CHAT_SEND_VIDEOS_FORBIDDEN", "comment": "You can't send videos in this chat." }, { "code": 403, "name": "CHAT_SEND_VOICES_FORBIDDEN", "comment": "You can't send voice recordings in this chat." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "CURRENCY_TOTAL_AMOUNT_INVALID", "comment": "The total amount of all prices is invalid." }, { "code": 400, "name": "DOCUMENT_INVALID", "comment": "The specified document is invalid." }, { "code": 400, "name": "EMOTICON_INVALID", "comment": "The specified emoji is invalid." }, { "code": 400, "name": "ENTITY_BOUNDS_INVALID", "comment": "A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length." }, { "code": 400, "name": "EXTERNAL_URL_INVALID", "comment": "External URL invalid." }, { "code": 400, "name": "FILE_PARTS_INVALID", "comment": "The number of file parts is invalid." }, { "code": 400, "name": "FILE_PART_LENGTH_INVALID", "comment": "The length of a file part is invalid." }, { "code": 400, "name": "FILE_REFERENCE_EMPTY", "comment": "An empty file reference was specified." }, { "code": 400, "name": "FILE_REFERENCE_EXPIRED", "comment": "File reference expired, it must be refetched as described in the documentation." }, { "code": 400, "name": "GAME_BOT_INVALID", "comment": "Bots can't send another bot's game." }, { "code": 400, "name": "IMAGE_PROCESS_FAILED", "comment": "Failure while processing image." }, { "code": 400, "name": "INPUT_FILE_INVALID", "comment": "The specified InputFile is invalid." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MD5_CHECKSUM_INVALID", "comment": "The MD5 checksums do not match." }, { "code": 400, "name": "MEDIA_CAPTION_TOO_LONG", "comment": "The caption is too long." }, { "code": 400, "name": "MEDIA_EMPTY", "comment": "The provided media object is invalid." }, { "code": 400, "name": "MEDIA_INVALID", "comment": "Media invalid." }, { "code": 400, "name": "MESSAGE_EMPTY", "comment": "The provided message is empty." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PAYMENT_PROVIDER_INVALID", "comment": "The specified payment provider is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "PHOTO_EXT_INVALID", "comment": "The extension of the photo is invalid." }, { "code": 400, "name": "PHOTO_INVALID_DIMENSIONS", "comment": "The photo dimensions are invalid." }, { "code": 400, "name": "PHOTO_SAVE_FILE_INVALID", "comment": "Internal issues, try again later." }, { "code": 400, "name": "POLL_ANSWERS_INVALID", "comment": "Invalid poll answers were provided." }, { "code": 400, "name": "POLL_ANSWER_INVALID", "comment": "One of the poll answers is not acceptable." }, { "code": 400, "name": "POLL_OPTION_DUPLICATE", "comment": "Duplicate poll options provided." }, { "code": 400, "name": "POLL_OPTION_INVALID", "comment": "Invalid poll option provided." }, { "code": 400, "name": "POLL_QUESTION_INVALID", "comment": "One of the poll questions is not acceptable." }, { "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }, { "code": 403, "name": "PRIVACY_PREMIUM_REQUIRED", "comment": "You need a Telegram Premium subscription to send a message to this user." }, { "code": 400, "name": "QUICK_REPLIES_TOO_MUCH", "comment": "A maximum of appConfig.quick_replies_limit shortcuts may be created, the limit was reached." }, { "code": 400, "name": "QUIZ_CORRECT_ANSWERS_EMPTY", "comment": "No correct quiz answer was specified." }, { "code": 400, "name": "QUIZ_CORRECT_ANSWERS_TOO_MUCH", "comment": "You specified too many correct answers in a quiz, quizzes can only have one right answer!" }, { "code": 400, "name": "QUIZ_CORRECT_ANSWER_INVALID", "comment": "An invalid value was provided to the correct_answers field." }, { "code": 400, "name": "QUIZ_MULTIPLE_INVALID", "comment": "Quizzes can't have the multiple_choice flag set!" }, { "code": 500, "name": "RANDOM_ID_DUPLICATE", "comment": "You provided a random ID that was already used." }, { "code": 400, "name": "REPLY_MARKUP_BUY_EMPTY", "comment": "Reply markup for buy button empty." }, { "code": 400, "name": "REPLY_MARKUP_GAME_EMPTY", "comment": "A game message is being edited, but the newly provided keyboard doesn't have a keyboardButtonGame button." }, { "code": 400, "name": "REPLY_MARKUP_INVALID", "comment": "The provided reply markup is invalid." }, { "code": 400, "name": "REPLY_MARKUP_TOO_LONG", "comment": "The specified reply_markup is too long." }, { "code": 400, "name": "REPLY_MESSAGES_TOO_MUCH", "comment": "Each shortcut can contain a maximum of appConfig.quick_reply_messages_limit messages, the limit was reached." }, { "code": 400, "name": "SCHEDULE_BOT_NOT_ALLOWED", "comment": "Bots cannot schedule messages." }, { "code": 400, "name": "SCHEDULE_DATE_TOO_LATE", "comment": "You can't schedule a message this far in the future." }, { "code": 400, "name": "SCHEDULE_TOO_MUCH", "comment": "There are too many scheduled messages." }, { "code": 400, "name": "SEND_AS_PEER_INVALID", "comment": "You can't send messages as the specified peer." }, { "code": 420, "name": "SLOWMODE_WAIT_%d", "comment": "Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat." }, { "code": 400, "name": "STORY_ID_INVALID", "comment": "The specified story ID is invalid." }, { "code": 406, "name": "TOPIC_CLOSED", "comment": "This topic was closed, you can't send messages to it anymore." }, { "code": 406, "name": "TOPIC_DELETED", "comment": "The specified topic was deleted." }, { "code": 400, "name": "TTL_MEDIA_INVALID", "comment": "Invalid media Time To Live was provided." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }, { "code": 403, "name": "USER_IS_BLOCKED", "comment": "You were blocked by this user." }, { "code": 400, "name": "USER_IS_BOT", "comment": "Bots can't send messages to other bots." }, { "code": 400, "name": "VIDEO_CONTENT_TYPE_INVALID", "comment": "The video's content type is invalid." }, { "code": 400, "name": "VOICE_MESSAGES_FORBIDDEN", "comment": "This user's privacy settings forbid you from sending voice messages." }, { "code": 400, "name": "WEBDOCUMENT_MIME_INVALID", "comment": "Invalid webdocument mime type provided." }, { "code": 400, "name": "WEBPAGE_CURL_FAILED", "comment": "Failure while fetching the webpage with cURL." }, { "code": 400, "name": "WEBPAGE_MEDIA_EMPTY", "comment": "Webpage media empty." }, { "code": 400, "name": "WEBPAGE_NOT_FOUND", "comment": "A preview for the specified webpage url could not be generated." }, { "code": 400, "name": "WEBPAGE_URL_INVALID", "comment": "The specified webpage url is invalid." }, { "code": 400, "name": "YOU_BLOCKED_USER", "comment": "You blocked this user." }], "available": "both" }, "messages.reportSpam": { "comment": "Report a new incoming chat for spam, if the {@link RawPeerSettings} of the chat allow us to do that", "arguments": { "peer": "Peer to report" }, "throws": [{ "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.getPeerSettings": { "comment": "Get peer settings", "arguments": { "peer": "The peer" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.getChats": { "comment": "Returns chat basic info on their IDs.", "arguments": { "id": "List of chat IDs" }, "throws": [{ "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "both" }, "messages.report": { "comment": "Report a message in a chat for violation of telegram's Terms of Service", "arguments": { "peer": "Peer", "id": "IDs of messages to report", "reason": "Why are these messages being reported", "message": "Comment for report moderation" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.getFullChat": { "comment": "Get full info about a basic group.", "arguments": { "chat_id": "Basic group ID." }, "throws": [{ "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "both" }, "messages.editChatTitle": { "comment": "Changes chat name and sends a service message on it.", "arguments": { "chat_id": "Chat ID", "title": "New chat name, different from the old one" }, "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "CHAT_TITLE_EMPTY", "comment": "No chat title provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "both" }, "messages.editChatPhoto": { "comment": "Changes chat photo and sends a service message on it", "arguments": { "chat_id": "Chat ID", "photo": "Photo to be set" }, "throws": [{ "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "IMAGE_PROCESS_FAILED", "comment": "Failure while processing image." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "PHOTO_CROP_SIZE_SMALL", "comment": "Photo is too small." }, { "code": 400, "name": "PHOTO_EXT_INVALID", "comment": "The extension of the photo is invalid." }, { "code": 400, "name": "PHOTO_INVALID", "comment": "Photo invalid." }], "available": "both" }, "messages.addChatUser": { "comment": "Adds a user to a chat and sends a service message on it.", "arguments": { "chat_id": "Chat ID", "user_id": "User ID to be added", "fwd_limit": "Number of last messages to be forwarded" }, "throws": [{ "code": 400, "name": "BOT_GROUPS_BLOCKED", "comment": "This bot can't be added to groups." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USERS_TOO_MUCH", "comment": "The maximum number of users has been exceeded (to create a chat, for example)." }, { "code": 400, "name": "USER_ALREADY_PARTICIPANT", "comment": "The user is already in the group." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }, { "code": 400, "name": "USER_IS_BLOCKED", "comment": "You were blocked by this user." }, { "code": 403, "name": "USER_NOT_MUTUAL_CONTACT", "comment": "The provided user is not a mutual contact." }, { "code": 403, "name": "USER_PRIVACY_RESTRICTED", "comment": "The user's privacy settings do not allow you to do this." }, { "code": 400, "name": "YOU_BLOCKED_USER", "comment": "You blocked this user." }], "available": "user" }, "messages.deleteChatUser": { "comment": "Deletes a user from a chat and sends a service message on it.", "arguments": { "flags": "Flags, see TL conditional fields", "revoke_history": "Remove the entire chat history of the specified user in this chat.", "chat_id": "Chat ID", "user_id": "User ID to be deleted" }, "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }, { "code": 400, "name": "USER_NOT_PARTICIPANT", "comment": "You're not a member of this supergroup/channel." }], "available": "both" }, "messages.getDhConfig": { "comment": "Returns configuration parameters for Diffie-Hellman key generation. Can also return a random sequence of bytes of required length.", "arguments": { "version": "Value of the version parameter from {@link messages.RawDhConfig}, available at the client", "random_length": "Length of the required random sequence" }, "throws": [{ "code": 400, "name": "RANDOM_LENGTH_INVALID", "comment": "Random length invalid." }], "available": "user" }, "messages.requestEncryption": { "comment": "Sends a request to start a secret chat to the user.", "arguments": { "user_id": "User ID", "random_id": "Unique client request ID required to prevent resending. This also doubles as the chat ID.", "g_a": "A = g ^ a mod p, see Wikipedia" }, "throws": [{ "code": 400, "name": "DH_G_A_INVALID", "comment": "g_a invalid." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "user" }, "messages.acceptEncryption": { "comment": "Confirms creation of a secret chat", "arguments": { "peer": "Secret chat ID", "g_b": "B = g ^ b mod p, see Wikipedia", "key_fingerprint": "64-bit fingerprint of the received key" }, "throws": [{ "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "ENCRYPTION_ALREADY_ACCEPTED", "comment": "Secret chat already accepted." }, { "code": 400, "name": "ENCRYPTION_ALREADY_DECLINED", "comment": "The secret chat was already declined." }], "available": "user" }, "messages.discardEncryption": { "comment": "Cancels a request for creation and/or delete info on secret chat.", "arguments": { "flags": "Flags, see TL conditional fields", "delete_history": "Whether to delete the entire chat history for the other user as well", "chat_id": "Secret chat ID" }, "throws": [{ "code": 400, "name": "CHAT_ID_EMPTY", "comment": "The provided chat ID is empty." }, { "code": 400, "name": "ENCRYPTION_ALREADY_ACCEPTED", "comment": "Secret chat already accepted." }, { "code": 400, "name": "ENCRYPTION_ALREADY_DECLINED", "comment": "The secret chat was already declined." }, { "code": 400, "name": "ENCRYPTION_ID_INVALID", "comment": "The provided secret chat ID is invalid." }], "available": "user" }, "messages.setEncryptedTyping": { "comment": "Send typing event by the current user to a secret chat.", "arguments": { "peer": "Secret chat ID", "typing": "Typing.
    Possible values:
    true, if the user started typing and more than 5 seconds have passed since the last request
    false, if the user stopped typing" }, "throws": [{ "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }], "available": "user" }, "messages.readEncryptedHistory": { "comment": "Marks message history within a secret chat as read.", "arguments": { "peer": "Secret chat ID", "max_date": "Maximum date value for received messages in history" }, "throws": [{ "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "MAX_DATE_INVALID", "comment": "The specified maximum date is invalid." }, { "code": 400, "name": "MSG_WAIT_FAILED", "comment": "A waiting call returned an error." }], "available": "user" }, "messages.sendEncrypted": { "comment": "Sends a text message to a secret chat.", "arguments": { "flags": "Flags, see TL conditional fields", "silent": "Send encrypted message without a notification", "peer": "Secret chat ID", "random_id": "Unique client message ID, necessary to avoid message resending", "data": "TL-serialization of DecryptedMessage type, encrypted with a key that was created during chat initialization" }, "throws": [{ "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "DATA_INVALID", "comment": "Encrypted data invalid." }, { "code": 400, "name": "DATA_TOO_LONG", "comment": "Data too long." }, { "code": 400, "name": "ENCRYPTION_DECLINED", "comment": "The secret chat was declined." }, { "code": 500, "name": "MSG_WAIT_FAILED", "comment": "A waiting call returned an error." }, { "code": 403, "name": "USER_IS_BLOCKED", "comment": "You were blocked by this user." }], "available": "user" }, "messages.sendEncryptedService": { "comment": "Sends a service message to a secret chat.", "arguments": { "peer": "Secret chat ID", "random_id": "Unique client message ID required to prevent message resending", "data": "TL-serialization of DecryptedMessage type, encrypted with a key generated during chat initialization" }, "throws": [{ "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "DATA_INVALID", "comment": "Encrypted data invalid." }, { "code": 400, "name": "ENCRYPTION_DECLINED", "comment": "The secret chat was declined." }, { "code": 400, "name": "ENCRYPTION_ID_INVALID", "comment": "The provided secret chat ID is invalid." }, { "code": 500, "name": "MSG_WAIT_FAILED", "comment": "A waiting call returned an error." }, { "code": 403, "name": "USER_DELETED", "comment": "You can't send this secret message because the other participant deleted their account." }, { "code": 403, "name": "USER_IS_BLOCKED", "comment": "You were blocked by this user." }], "available": "user" }, "messages.readMessageContents": { "comment": "Notifies the sender about the recipient having listened a voice message or watched a video.", "arguments": { "id": "Message ID list" }, "available": "user" }, "messages.reportEncryptedSpam": { "comment": "Report a secret chat for spam", "arguments": { "peer": "The secret chat to report" }, "throws": [{ "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }], "available": "user" }, "messages.getStickers": { "comment": "Get stickers by emoji", "arguments": { "emoticon": "The emoji", "hash": "Hash used for caching, for more info click here." }, "throws": [{ "code": 400, "name": "EMOTICON_EMPTY", "comment": "The emoji is empty." }], "available": "user" }, "messages.exportChatInvite": { "comment": "Export an invite link for a chat", "arguments": { "flags": "Flags, see TL conditional fields", "legacy_revoke_permanent": "Legacy flag, reproducing legacy behavior of this method: if set, revokes all previous links before creating a new one. Kept for bot API BC, should not be used by modern clients.", "request_needed": "Whether admin confirmation is required before admitting each separate user into the chat", "peer": "Chat", "expire_date": "Expiration date", "usage_limit": "Maximum number of users that can join using this link", "title": "Description of the invite link, visible only to administrators" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "EXPIRE_DATE_INVALID", "comment": "The specified expiration date is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USAGE_LIMIT_INVALID", "comment": "The specified usage limit is invalid." }], "available": "both" }, "messages.getWebPagePreview": { "comment": "Get preview of webpage", "arguments": { "flags": "Flags, see TL conditional fields", "message": "Message from which to extract the preview", "entities": "Message entities for styled text" }, "throws": [{ "code": 400, "name": "ENTITY_BOUNDS_INVALID", "comment": "A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length." }, { "code": 400, "name": "MESSAGE_EMPTY", "comment": "The provided message is empty." }], "available": "user" }, "messages.checkChatInvite": { "comment": "Check the validity of a chat invite link and get basic info about it", "arguments": { "hash": "Invite hash from chat invite deep link »." }, "throws": [{ "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "INVITE_HASH_EMPTY", "comment": "The invite hash is empty." }, { "code": 406, "name": "INVITE_HASH_EXPIRED", "comment": "The invite link has expired." }, { "code": 400, "name": "INVITE_HASH_INVALID", "comment": "The invite hash is invalid." }], "available": "user" }, "messages.getAllStickers": { "comment": "Get all installed stickers", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "messages.importChatInvite": { "comment": "Import a chat invite and join a private chat/supergroup/channel", "arguments": { "hash": "hash from a chat invite deep link" }, "throws": [{ "code": 400, "name": "CHANNELS_TOO_MUCH", "comment": "You have joined too many channels/supergroups." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_INVALID", "comment": "Invalid chat." }, { "code": 400, "name": "INVITE_HASH_EMPTY", "comment": "The invite hash is empty." }, { "code": 406, "name": "INVITE_HASH_EXPIRED", "comment": "The invite link has expired." }, { "code": 400, "name": "INVITE_HASH_INVALID", "comment": "The invite hash is invalid." }, { "code": 400, "name": "INVITE_REQUEST_SENT", "comment": "You have successfully requested to join this chat or channel." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USERS_TOO_MUCH", "comment": "The maximum number of users has been exceeded (to create a chat, for example)." }, { "code": 400, "name": "USER_ALREADY_PARTICIPANT", "comment": "The user is already in the group." }, { "code": 400, "name": "USER_CHANNELS_TOO_MUCH", "comment": "One of the users you tried to add is already in too many channels/supergroups." }], "available": "user" }, "messages.getStickerSet": { "comment": "Get info about a stickerset", "arguments": { "stickerset": "Stickerset", "hash": "Hash used for caching, for more info click here" }, "throws": [{ "code": 400, "name": "EMOTICON_STICKERPACK_MISSING", "comment": "inputStickerSetDice.emoji cannot be empty." }, { "code": 406, "name": "STICKERSET_INVALID", "comment": "The provided sticker set is invalid." }], "available": "both" }, "messages.uninstallStickerSet": { "comment": "Uninstall a stickerset", "arguments": { "stickerset": "The stickerset to uninstall" }, "throws": [{ "code": 406, "name": "STICKERSET_INVALID", "comment": "The provided sticker set is invalid." }], "available": "user" }, "messages.installStickerSet": { "comment": "Install a stickerset", "arguments": { "stickerset": "Stickerset to install", "archived": "Whether to archive stickerset" }, "throws": [{ "code": 406, "name": "STICKERSET_INVALID", "comment": "The provided sticker set is invalid." }], "available": "user" }, "messages.startBot": { "comment": "Start a conversation with a bot using a deep linking parameter", "arguments": { "bot": "The bot", "peer": "The chat where to start the bot, can be the bot's private chat or a group", "random_id": "Random ID to avoid resending the same message", "start_param": "Deep linking parameter" }, "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 500, "name": "RANDOM_ID_DUPLICATE", "comment": "You provided a random ID that was already used." }, { "code": 400, "name": "START_PARAM_EMPTY", "comment": "The start parameter is empty." }, { "code": 400, "name": "START_PARAM_INVALID", "comment": "Start parameter invalid." }, { "code": 400, "name": "START_PARAM_TOO_LONG", "comment": "Start parameter is too long." }], "available": "user" }, "messages.getMessagesViews": { "comment": "Get and increase the view counter of a message sent or forwarded from a channel", "arguments": { "peer": "Peer where the message was found", "id": "ID of message", "increment": "Whether to mark the message as viewed and increment the view counter" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.createChat": { "comment": "Creates a new chat.", "arguments": { "flags": "Flags, see TL conditional fields", "users": "List of user IDs to be invited", "title": "Chat name", "ttl_period": "Time-to-live of all messages that will be sent in the chat: once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. You can use {@link messages.RawSetDefaultHistoryTTLRequest} to edit this value later." }, "throws": [{ "code": 500, "name": "CHAT_ID_GENERATE_FAILED", "comment": "Failure while generating the chat ID." }, { "code": 400, "name": "CHAT_INVALID", "comment": "Invalid chat." }, { "code": 400, "name": "CHAT_TITLE_EMPTY", "comment": "No chat title provided." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "TTL_PERIOD_INVALID", "comment": "The specified TTL period is invalid." }, { "code": 400, "name": "USERS_TOO_FEW", "comment": "Not enough users (to create a chat, for example)." }, { "code": 406, "name": "USER_RESTRICTED", "comment": "You're spamreported, you can't create channels or chats." }], "available": "user" }, "messages.editChatAdmin": { "comment": "Make a user admin in a basic group.", "arguments": { "chat_id": "The ID of the group", "user_id": "The user to make admin", "is_admin": "Whether to make them admin" }, "throws": [{ "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }, { "code": 400, "name": "USER_NOT_PARTICIPANT", "comment": "You're not a member of this supergroup/channel." }], "available": "user" }, "messages.migrateChat": { "comment": "Turn a basic group into a supergroup", "arguments": { "chat_id": "Basic group to migrate" }, "throws": [{ "code": 400, "name": "CHANNELS_TOO_MUCH", "comment": "You have joined too many channels/supergroups." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 500, "name": "CHAT_INVALID", "comment": "Invalid chat." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.reorderStickerSets": { "comment": "Reorder installed stickersets", "arguments": { "flags": "Flags, see TL conditional fields", "masks": "Reorder mask stickersets", "emojis": "Reorder custom emoji stickersets", "order": "New stickerset order by stickerset IDs" }, "available": "user" }, "messages.sendEncryptedFile": { "comment": "Sends a message with a file attachment to a secret chat", "arguments": { "flags": "Flags, see TL conditional fields", "silent": "Whether to send the file without triggering a notification", "peer": "Secret chat ID", "random_id": "Unique client message ID necessary to prevent message resending", "data": "TL-serialization of DecryptedMessage type, encrypted with a key generated during chat initialization", "file": "File attachment for the secret chat" }, "throws": [{ "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "DATA_TOO_LONG", "comment": "Data too long." }, { "code": 400, "name": "ENCRYPTION_DECLINED", "comment": "The secret chat was declined." }, { "code": 400, "name": "FILE_EMTPY", "comment": "An empty file was provided." }, { "code": 400, "name": "MD5_CHECKSUM_INVALID", "comment": "The MD5 checksums do not match." }, { "code": 400, "name": "MSG_WAIT_FAILED", "comment": "A waiting call returned an error." }], "available": "user" }, "messages.searchGlobal": { "comment": "Search for messages and peers globally", "arguments": { "flags": "Flags, see TL conditional fields", "broadcasts_only": "If set, only returns results from channels (used in the global channel search tab »).", "folder_id": "Peer folder ID, for more info click here", "q": "Query", "filter": "Global search filter", "min_date": "If a positive value was specified, the method will return only messages with date bigger than min_date", "max_date": "If a positive value was transferred, the method will return only messages with date smaller than max_date", "offset_rate": "Initially 0, then set to the {@link messages.RawMessagesSlice}", "offset_peer": "Offsets for pagination, for more info click here", "offset_id": "Offsets for pagination, for more info click here", "limit": "Offsets for pagination, for more info click here" }, "throws": [{ "code": 400, "name": "FOLDER_ID_INVALID", "comment": "Invalid folder ID." }, { "code": 400, "name": "INPUT_FILTER_INVALID", "comment": "The specified filter is invalid." }, { "code": 400, "name": "SEARCH_QUERY_EMPTY", "comment": "The search query is empty." }], "available": "user" }, "messages.receivedQueue": { "comment": "Confirms receipt of messages in a secret chat by client, cancels push notifications.
    \nThe method returns a list of random_ids of messages for which push notifications were cancelled.", "arguments": { "max_qts": "Maximum qts value available at the client" }, "throws": [{ "code": 400, "name": "MAX_QTS_INVALID", "comment": "The specified max_qts is invalid." }, { "code": 500, "name": "MSG_WAIT_FAILED", "comment": "A waiting call returned an error." }], "available": "user" }, "messages.getSavedGifs": { "comment": "Get saved GIFs.", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "messages.getInlineBotResults": { "comment": "Query an inline bot", "arguments": { "flags": "Flags, see TL conditional fields", "bot": "The bot to query", "peer": "The currently opened chat", "geo_point": "The geolocation, if requested", "query": "The query", "offset": "The offset within the results, will be passed directly as-is to the bot." }, "throws": [{ "code": 400, "name": "BOT_INLINE_DISABLED", "comment": "This bot can't be used in inline mode." }, { "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }, { "code": 400, "name": "BOT_RESPONSE_TIMEOUT", "comment": "A timeout occurred while fetching data from the bot." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": -503, "name": "Timeout", "comment": "Timeout while fetching data." }], "available": "user" }, "messages.getDocumentByHash": { "comment": "Get a document by its SHA256 hash, mainly used for gifs", "arguments": { "sha256": "SHA256 of file", "size": "Size of the file in bytes", "mime_type": "Mime type" }, "throws": [{ "code": 400, "name": "SHA256_HASH_INVALID", "comment": "The provided SHA256 hash is invalid." }], "available": "both" }, "messages.setInlineBotResults": { "comment": "Answer an inline query, for bots only", "arguments": { "flags": "Flags, see TL conditional fields", "gallery": "Set this flag if the results are composed of media files", "private": "Set this flag if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query", "query_id": "Unique identifier for the answered query", "results": "Vector of results for the inline query", "cache_time": "The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.", "next_offset": "Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes.", "switch_pm": "If passed, clients will display a button on top of the remaining inline result list with the specified text, that switches the user to a private chat with the bot and sends the bot a start message with a certain parameter.", "switch_webview": "If passed, clients will display a button on top of the remaining inline result list with the specified text, that switches the user to the specified inline mode mini app." }, "throws": [{ "code": 400, "name": "ARTICLE_TITLE_EMPTY", "comment": "The title of the article is empty." }, { "code": 400, "name": "AUDIO_CONTENT_URL_EMPTY", "comment": "The remote URL specified in the content field is empty." }, { "code": 400, "name": "AUDIO_TITLE_EMPTY", "comment": "An empty audio title was provided." }, { "code": 400, "name": "BUTTON_DATA_INVALID", "comment": "The data of one or more of the buttons you provided is invalid." }, { "code": 400, "name": "BUTTON_TYPE_INVALID", "comment": "The type of one or more of the buttons you provided is invalid." }, { "code": 400, "name": "BUTTON_URL_INVALID", "comment": "Button URL invalid." }, { "code": 400, "name": "DOCUMENT_INVALID", "comment": "The specified document is invalid." }, { "code": 400, "name": "FILE_CONTENT_TYPE_INVALID", "comment": "File content-type is invalid." }, { "code": 400, "name": "FILE_TITLE_EMPTY", "comment": "An empty file title was specified." }, { "code": 400, "name": "GIF_CONTENT_TYPE_INVALID", "comment": "GIF content-type invalid." }, { "code": 400, "name": "MESSAGE_EMPTY", "comment": "The provided message is empty." }, { "code": 400, "name": "MESSAGE_TOO_LONG", "comment": "The provided message is too long." }, { "code": 400, "name": "NEXT_OFFSET_INVALID", "comment": "The specified offset is longer than 64 bytes." }, { "code": 400, "name": "PHOTO_CONTENT_TYPE_INVALID", "comment": "Photo mime-type invalid." }, { "code": 400, "name": "PHOTO_CONTENT_URL_EMPTY", "comment": "Photo URL invalid." }, { "code": 400, "name": "PHOTO_INVALID", "comment": "Photo invalid." }, { "code": 400, "name": "PHOTO_THUMB_URL_EMPTY", "comment": "Photo thumbnail URL is empty." }, { "code": 400, "name": "QUERY_ID_INVALID", "comment": "The query ID is invalid." }, { "code": 400, "name": "REPLY_MARKUP_INVALID", "comment": "The provided reply markup is invalid." }, { "code": 400, "name": "RESULTS_TOO_MUCH", "comment": "Too many results were provided." }, { "code": 400, "name": "RESULT_ID_DUPLICATE", "comment": "You provided a duplicate result ID." }, { "code": 400, "name": "RESULT_ID_INVALID", "comment": "One of the specified result IDs is invalid." }, { "code": 400, "name": "RESULT_TYPE_INVALID", "comment": "Result type invalid." }, { "code": 400, "name": "SEND_MESSAGE_MEDIA_INVALID", "comment": "Invalid media provided." }, { "code": 400, "name": "SEND_MESSAGE_TYPE_INVALID", "comment": "The message type is invalid." }, { "code": 400, "name": "START_PARAM_EMPTY", "comment": "The start parameter is empty." }, { "code": 400, "name": "START_PARAM_INVALID", "comment": "Start parameter invalid." }, { "code": 400, "name": "STICKER_DOCUMENT_INVALID", "comment": "The specified sticker document is invalid." }, { "code": 400, "name": "SWITCH_PM_TEXT_EMPTY", "comment": "The switch_pm.text field was empty." }, { "code": 400, "name": "SWITCH_WEBVIEW_URL_INVALID", "comment": "The URL specified in switch_webview.url is invalid!" }, { "code": 400, "name": "URL_INVALID", "comment": "Invalid URL provided." }, { "code": 403, "name": "USER_BOT_INVALID", "comment": "User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }, { "code": 400, "name": "VIDEO_TITLE_EMPTY", "comment": "The specified video title is empty." }, { "code": 400, "name": "WEBDOCUMENT_INVALID", "comment": "Invalid webdocument URL provided." }, { "code": 400, "name": "WEBDOCUMENT_MIME_INVALID", "comment": "Invalid webdocument mime type provided." }, { "code": 400, "name": "WEBDOCUMENT_SIZE_TOO_BIG", "comment": "Webdocument is too big!" }, { "code": 400, "name": "WEBDOCUMENT_URL_INVALID", "comment": "The specified webdocument URL is invalid." }], "available": "bot" }, "messages.getMessageEditData": { "comment": "Find out if a media message's caption can be edited", "arguments": { "peer": "Peer where the media was sent", "id": "ID of message" }, "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 403, "name": "MESSAGE_AUTHOR_REQUIRED", "comment": "Message author required." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.sendInlineBotResult": { "comment": "Send a result obtained using {@link messages.RawGetInlineBotResultsRequest}.", "arguments": { "flags": "Flags, see TL conditional fields", "silent": "Whether to send the message silently (no notification will be triggered on the other client)", "background": "Whether to send the message in background", "clear_draft": "Whether to clear the draft", "hide_via": "Whether to hide the via @botname in the resulting message (only for bot usernames encountered in the {@link RawConfig})", "peer": "Destination", "reply_to": "If set, indicates that the message should be sent in reply to the specified message or story.", "random_id": "Random ID to avoid resending the same query", "query_id": "Query ID from {@link messages.RawGetInlineBotResultsRequest}", "id": "Result ID from {@link messages.RawGetInlineBotResultsRequest}", "schedule_date": "Scheduled message date for scheduled messages", "send_as": "Send this message as the specified peer", "quick_reply_shortcut": "Add the message to the specified quick reply shortcut », instead." }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_GUEST_SEND_FORBIDDEN", "comment": "You join the discussion group before commenting, see here » for more info." }, { "code": 400, "name": "CHAT_RESTRICTED", "comment": "You can't send messages in this chat, you were restricted." }, { "code": 403, "name": "CHAT_SEND_AUDIOS_FORBIDDEN", "comment": "You can't send audio messages in this chat." }, { "code": 403, "name": "CHAT_SEND_GAME_FORBIDDEN", "comment": "You can't send a game to this chat." }, { "code": 403, "name": "CHAT_SEND_GIFS_FORBIDDEN", "comment": "You can't send gifs in this chat." }, { "code": 403, "name": "CHAT_SEND_INLINE_FORBIDDEN", "comment": "You can't send inline messages in this group." }, { "code": 403, "name": "CHAT_SEND_MEDIA_FORBIDDEN", "comment": "You can't send media in this chat." }, { "code": 403, "name": "CHAT_SEND_PHOTOS_FORBIDDEN", "comment": "You can't send photos in this chat." }, { "code": 403, "name": "CHAT_SEND_PLAIN_FORBIDDEN", "comment": "You can't send non-media (text) messages in this chat." }, { "code": 403, "name": "CHAT_SEND_STICKERS_FORBIDDEN", "comment": "You can't send stickers in this chat." }, { "code": 403, "name": "CHAT_SEND_VOICES_FORBIDDEN", "comment": "You can't send voice recordings in this chat." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "ENTITY_BOUNDS_INVALID", "comment": "A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length." }, { "code": 400, "name": "INLINE_RESULT_EXPIRED", "comment": "The inline query expired." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MEDIA_EMPTY", "comment": "The provided media object is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "QUERY_ID_EMPTY", "comment": "The query ID is empty." }, { "code": 400, "name": "QUICK_REPLIES_TOO_MUCH", "comment": "A maximum of appConfig.quick_replies_limit shortcuts may be created, the limit was reached." }, { "code": 500, "name": "RANDOM_ID_DUPLICATE", "comment": "You provided a random ID that was already used." }, { "code": 400, "name": "REPLY_MESSAGES_TOO_MUCH", "comment": "Each shortcut can contain a maximum of appConfig.quick_reply_messages_limit messages, the limit was reached." }, { "code": 400, "name": "RESULT_ID_EMPTY", "comment": "Result ID empty." }, { "code": 400, "name": "RESULT_ID_INVALID", "comment": "One of the specified result IDs is invalid." }, { "code": 400, "name": "SCHEDULE_DATE_TOO_LATE", "comment": "You can't schedule a message this far in the future." }, { "code": 400, "name": "SCHEDULE_TOO_MUCH", "comment": "There are too many scheduled messages." }, { "code": 500, "name": "SEND_MEDIA_INVALID", "comment": "The specified media is invalid." }, { "code": 420, "name": "SLOWMODE_WAIT_%d", "comment": "Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat." }, { "code": 400, "name": "TOPIC_DELETED", "comment": "The specified topic was deleted." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }, { "code": 400, "name": "VOICE_MESSAGES_FORBIDDEN", "comment": "This user's privacy settings forbid you from sending voice messages." }, { "code": 400, "name": "WEBPAGE_CURL_FAILED", "comment": "Failure while fetching the webpage with cURL." }, { "code": 400, "name": "WEBPAGE_MEDIA_EMPTY", "comment": "Webpage media empty." }, { "code": 400, "name": "YOU_BLOCKED_USER", "comment": "You blocked this user." }], "available": "user" }, "messages.editMessage": { "comment": "Edit message", "arguments": { "flags": "Flags, see TL conditional fields", "no_webpage": "Disable webpage preview", "invert_media": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.", "peer": "Where was the message sent", "id": "ID of the message to edit", "message": "New message", "media": "New attached media", "reply_markup": "Reply markup for inline keyboards", "entities": "Message entities for styled text", "schedule_date": "Scheduled message date for scheduled messages", "quick_reply_shortcut_id": "If specified, edits a quick reply shortcut message, instead »." }, "throws": [{ "code": 400, "name": "BOT_DOMAIN_INVALID", "comment": "Bot domain invalid." }, { "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }, { "code": 400, "name": "BUTTON_DATA_INVALID", "comment": "The data of one or more of the buttons you provided is invalid." }, { "code": 400, "name": "BUTTON_TYPE_INVALID", "comment": "The type of one or more of the buttons you provided is invalid." }, { "code": 400, "name": "BUTTON_URL_INVALID", "comment": "Button URL invalid." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_FORWARDS_RESTRICTED", "comment": "You can't forward messages from a protected chat." }, { "code": 403, "name": "CHAT_SEND_GIFS_FORBIDDEN", "comment": "You can't send gifs in this chat." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "DOCUMENT_INVALID", "comment": "The specified document is invalid." }, { "code": 400, "name": "ENTITIES_TOO_LONG", "comment": "You provided too many styled message entities." }, { "code": 400, "name": "ENTITY_BOUNDS_INVALID", "comment": "A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length." }, { "code": 400, "name": "FILE_PARTS_INVALID", "comment": "The number of file parts is invalid." }, { "code": 400, "name": "IMAGE_PROCESS_FAILED", "comment": "Failure while processing image." }, { "code": 403, "name": "INLINE_BOT_REQUIRED", "comment": "Only the inline bot can edit message." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MEDIA_CAPTION_TOO_LONG", "comment": "The caption is too long." }, { "code": 400, "name": "MEDIA_EMPTY", "comment": "The provided media object is invalid." }, { "code": 400, "name": "MEDIA_GROUPED_INVALID", "comment": "You tried to send media of different types in an album." }, { "code": 400, "name": "MEDIA_INVALID", "comment": "Media invalid." }, { "code": 400, "name": "MEDIA_NEW_INVALID", "comment": "The new media is invalid." }, { "code": 400, "name": "MEDIA_PREV_INVALID", "comment": "Previous media invalid." }, { "code": 400, "name": "MEDIA_TTL_INVALID", "comment": "The specified media TTL is invalid." }, { "code": 403, "name": "MESSAGE_AUTHOR_REQUIRED", "comment": "Message author required." }, { "code": 400, "name": "MESSAGE_EDIT_TIME_EXPIRED", "comment": "You can't edit this message anymore, too much time has passed since its creation." }, { "code": 400, "name": "MESSAGE_EMPTY", "comment": "The provided message is empty." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "MESSAGE_NOT_MODIFIED", "comment": "The provided message data is identical to the previous message data, the message wasn't modified." }, { "code": 400, "name": "MESSAGE_TOO_LONG", "comment": "The provided message is too long." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 500, "name": "MSG_WAIT_FAILED", "comment": "A waiting call returned an error." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "REPLY_MARKUP_INVALID", "comment": "The provided reply markup is invalid." }, { "code": 400, "name": "REPLY_MARKUP_TOO_LONG", "comment": "The specified reply_markup is too long." }, { "code": 400, "name": "SCHEDULE_DATE_INVALID", "comment": "Invalid schedule date provided." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }, { "code": 400, "name": "WEBPAGE_NOT_FOUND", "comment": "A preview for the specified webpage url could not be generated." }], "available": "both" }, "messages.editInlineBotMessage": { "comment": "Edit an inline bot message", "arguments": { "flags": "Flags, see TL conditional fields", "no_webpage": "Disable webpage preview", "invert_media": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.", "id": "Sent inline message ID", "message": "Message", "media": "Media", "reply_markup": "Reply markup for inline keyboards", "entities": "Message entities for styled text" }, "throws": [{ "code": 400, "name": "BUTTON_DATA_INVALID", "comment": "The data of one or more of the buttons you provided is invalid." }, { "code": 400, "name": "ENTITY_BOUNDS_INVALID", "comment": "A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "MESSAGE_NOT_MODIFIED", "comment": "The provided message data is identical to the previous message data, the message wasn't modified." }], "available": "both" }, "messages.getBotCallbackAnswer": { "comment": "Press an inline callback button and get a callback answer from the bot", "arguments": { "flags": "Flags, see TL conditional fields", "game": "Whether this is a \"play game\" button", "peer": "Where was the inline keyboard sent", "msg_id": "ID of the Message with the inline keyboard", "data": "Callback data", "password": "For buttons {@link RawKeyboardButtonCallback}, the SRP payload generated using SRP." }, "throws": [{ "code": 400, "name": "BOT_RESPONSE_TIMEOUT", "comment": "A timeout occurred while fetching data from the bot." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "DATA_INVALID", "comment": "Encrypted data invalid." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "PASSWORD_MISSING", "comment": "You must enable 2FA before executing this operation." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": -503, "name": "Timeout", "comment": "Timeout while fetching data." }], "available": "user" }, "messages.setBotCallbackAnswer": { "comment": "Set the callback answer to a user button press (bots only)", "arguments": { "flags": "Flags, see TL conditional fields", "alert": "Whether to show the message as a popup instead of a toast notification", "query_id": "Query ID", "message": "Popup to show", "url": "URL to open", "cache_time": "Cache validity" }, "throws": [{ "code": 400, "name": "MESSAGE_TOO_LONG", "comment": "The provided message is too long." }, { "code": 400, "name": "QUERY_ID_INVALID", "comment": "The query ID is invalid." }, { "code": 400, "name": "URL_INVALID", "comment": "Invalid URL provided." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, "messages.saveDraft": { "comment": "Save a message draft associated to a chat.", "arguments": { "flags": "Flags, see TL conditional fields", "no_webpage": "Disable generation of the webpage preview", "invert_media": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.", "reply_to": "If set, indicates that the message should be sent in reply to the specified message or story.", "peer": "Destination of the message that should be sent", "message": "The draft", "entities": "Message entities for styled text", "media": "Attached media", "effect": "Specifies a message effect » to use for the message." }, "throws": [{ "code": 400, "name": "ENTITY_BOUNDS_INVALID", "comment": "A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.getFeaturedStickers": { "comment": "Get featured stickers", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "messages.getPeerDialogs": { "comment": "Get dialog info of specified peers", "arguments": { "peers": "Peers" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.readFeaturedStickers": { "comment": "Mark new featured stickers as read", "arguments": { "id": "IDs of stickersets to mark as read" }, "available": "user" }, "messages.saveGif": { "comment": "Add GIF to saved gifs list", "arguments": { "id": "GIF to save", "unsave": "Whether to remove GIF from saved gifs list" }, "throws": [{ "code": 400, "name": "GIF_ID_INVALID", "comment": "The provided GIF ID is invalid." }], "available": "user" }, "messages.getRecentStickers": { "comment": "Get recent stickers", "arguments": { "flags": "Flags, see TL conditional fields", "attached": "Get stickers recently attached to photo or video files", "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "messages.getAllDrafts": { "comment": "Return all message drafts.
    \nReturns all the latest {@link RawUpdateDraftMessage} updates related to all chats with drafts.", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messages.saveRecentSticker": { "comment": "Add/remove sticker from recent stickers list", "arguments": { "flags": "Flags, see TL conditional fields", "attached": "Whether to add/remove stickers recently attached to photo or video files", "id": "Sticker", "unsave": "Whether to save or unsave the sticker" }, "throws": [{ "code": 400, "name": "STICKER_ID_INVALID", "comment": "The provided sticker ID is invalid." }], "available": "user" }, "messages.clearRecentStickers": { "comment": "Clear recent stickers", "arguments": { "flags": "Flags, see TL conditional fields", "attached": "Set this flag to clear the list of stickers recently attached to photo or video files" }, "available": "user" }, "messages.getArchivedStickers": { "comment": "Get all archived stickers", "arguments": { "flags": "Flags, see TL conditional fields", "masks": "Get mask stickers", "emojis": "Get custom emoji stickers", "offset_id": "Offsets for pagination, for more info click here", "limit": "Maximum number of results to return, see pagination" }, "available": "user" }, "messages.getMaskStickers": { "comment": "Get installed mask stickers", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "messages.setInlineGameScore": { "comment": "Use this method to set the score of the specified user in a game sent as an inline message (bots only).", "arguments": { "flags": "Flags, see TL conditional fields", "edit_message": "Set this flag if the game message should be automatically edited to include the current scoreboard", "force": "Set this flag if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters", "id": "ID of the inline message", "user_id": "User identifier", "score": "New score" }, "throws": [{ "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, "messages.getInlineGameHighScores": { "comment": "Get highscores of a game sent using an inline bot", "arguments": { "id": "ID of inline message", "user_id": "Get high scores of a certain user" }, "throws": [{ "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, "messages.getWebPage": { "comment": "Get instant view page", "arguments": { "url": "URL of IV page to fetch", "hash": "Hash used for caching, for more info click here.
    Note: the usual hash generation algorithm cannot be used in this case, please re-use the {@link RawWebPage}.hash field returned by a previous call to the method, or pass 0 if this is the first call or if the previous call did not return a {@link RawWebPage}." }, "throws": [{ "code": 400, "name": "WC_CONVERT_URL_INVALID", "comment": "WC convert URL invalid." }], "available": "user" }, "messages.getCommonChats": { "comment": "Get chats in common with a user", "arguments": { "user_id": "User ID", "max_id": "Maximum ID of chat to return (see pagination)", "limit": "Maximum number of results to return, see pagination" }, "throws": [{ "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "user" }, "messages.toggleDialogPin": { "comment": "Pin/unpin a dialog", "arguments": { "flags": "Flags, see TL conditional fields", "pinned": "Whether to pin or unpin the dialog", "peer": "The dialog to pin" }, "throws": [{ "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "PEER_HISTORY_EMPTY", "comment": "You can't pin an empty chat with a user." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "PINNED_DIALOGS_TOO_MUCH", "comment": "Too many pinned dialogs." }], "available": "user" }, "messages.reorderPinnedDialogs": { "comment": "Reorder pinned dialogs", "arguments": { "flags": "Flags, see TL conditional fields", "force": "If set, dialogs pinned server-side but not present in the order field will be unpinned.", "folder_id": "Peer folder ID, for more info click here", "order": "New dialog order" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.setBotShippingResults": { "comment": "If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the bot will receive an {@link RawUpdateBotShippingQuery} update. Use this method to reply to shipping queries.", "arguments": { "flags": "Flags, see TL conditional fields", "query_id": "Unique identifier for the query to be answered", "error": "Error message in human readable form that explains why it is impossible to complete the order (e.g. \"Sorry, delivery to your desired address is unavailable\"). Telegram will display this message to the user.", "shipping_options": "A vector of available shipping options." }, "throws": [{ "code": 400, "name": "QUERY_ID_INVALID", "comment": "The query ID is invalid." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, "messages.getPinnedDialogs": { "comment": "Get pinned dialogs", "arguments": { "folder_id": "Peer folder ID, for more info click here" }, "throws": [{ "code": 400, "name": "FOLDER_ID_INVALID", "comment": "Invalid folder ID." }], "available": "user" }, "messages.setBotPrecheckoutResults": { "comment": "Once the user has confirmed their payment and shipping details, the bot receives an {@link RawUpdateBotPrecheckoutQuery} update.
    \nUse this method to respond to such pre-checkout queries.
    \nNote: Telegram must receive an answer within 10 seconds after the pre-checkout query was sent.", "arguments": { "flags": "Flags, see TL conditional fields", "success": "Set this flag if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order, otherwise do not set it, and set the error field, instead", "query_id": "Unique identifier for the query to be answered", "error": "Required if the success isn't set. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. \"Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!\"). Telegram will display this message to the user." }, "throws": [{ "code": 400, "name": "ERROR_TEXT_EMPTY", "comment": "The provided error message is empty." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, "messages.getFavedStickers": { "comment": "Get faved stickers", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "messages.uploadMedia": { "comment": "Upload a file and associate it to a chat (without actually sending it to the chat)", "arguments": { "flags": "Flags, see TL conditional fields", "business_connection_id": "Whether the media will be used only in the specified business connection », and not directly by the bot.", "peer": "The chat, can be {@link RawInputPeerEmpty} for bots and {@link RawInputPeerSelf} for users.", "media": "File uploaded in chunks as described in files »" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_RESTRICTED", "comment": "You can't send messages in this chat, you were restricted." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "FILE_PARTS_INVALID", "comment": "The number of file parts is invalid." }, { "code": 400, "name": "FILE_PART_LENGTH_INVALID", "comment": "The length of a file part is invalid." }, { "code": 400, "name": "IMAGE_PROCESS_FAILED", "comment": "Failure while processing image." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MEDIA_INVALID", "comment": "Media invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "PHOTO_EXT_INVALID", "comment": "The extension of the photo is invalid." }, { "code": 400, "name": "PHOTO_INVALID_DIMENSIONS", "comment": "The photo dimensions are invalid." }, { "code": 400, "name": "PHOTO_SAVE_FILE_INVALID", "comment": "Internal issues, try again later." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }, { "code": 400, "name": "WEBPAGE_CURL_FAILED", "comment": "Failure while fetching the webpage with cURL." }], "available": "both" }, "messages.faveSticker": { "comment": "Mark or unmark a sticker as favorite", "arguments": { "id": "Sticker in question", "unfave": "Whether to add or remove a sticker from favorites" }, "throws": [{ "code": 400, "name": "STICKER_ID_INVALID", "comment": "The provided sticker ID is invalid." }], "available": "user" }, "messages.sendScreenshotNotification": { "comment": "Notify the other user in a private chat that a screenshot of the chat was taken", "arguments": { "peer": "Other user", "reply_to": "Indicates the message that was screenshotted (the specified message ID can also be 0 to avoid indicating any specific message).", "random_id": "Random ID to avoid message resending" }, "throws": [{ "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "REPLY_MESSAGE_ID_INVALID", "comment": "The specified reply-to message ID is invalid." }, { "code": 400, "name": "STORY_ID_INVALID", "comment": "The specified story ID is invalid." }, { "code": 400, "name": "YOU_BLOCKED_USER", "comment": "You blocked this user." }], "available": "user" }, "messages.readMentions": { "comment": "Mark mentions as read", "arguments": { "flags": "Flags, see TL conditional fields", "peer": "Dialog", "top_msg_id": "Mark as read only mentions within the specified forum topic" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.getRecentLocations": { "comment": "Get live location history of a certain user", "arguments": { "peer": "User", "limit": "Maximum number of results to return, see pagination", "hash": "Hash used for caching, for more info click here" }, "available": "user" }, "messages.sendMultiMedia": { "comment": "Send an album or grouped media", "arguments": { "flags": "Flags, see TL conditional fields", "silent": "Whether to send the album silently (no notification triggered)", "background": "Send in background?", "clear_draft": "Whether to clear drafts", "noforwards": "Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled", "update_stickersets_order": "Whether to move used stickersets to top, see here for more info on this flag »", "invert_media": "If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.", "peer": "The destination chat", "reply_to": "If set, indicates that the message should be sent in reply to the specified message or story.", "multi_media": "The medias to send: note that they must be separately uploaded using {@link messages.RawUploadMediaRequest} first, using raw inputMediaUploaded* constructors is not supported.", "schedule_date": "Scheduled message date for scheduled messages", "send_as": "Send this message as the specified peer", "quick_reply_shortcut": "Add the message to the specified quick reply shortcut », instead.", "effect": "Specifies a message effect » to use for the message." }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_FORWARDS_RESTRICTED", "comment": "You can't forward messages from a protected chat." }, { "code": 403, "name": "CHAT_SEND_MEDIA_FORBIDDEN", "comment": "You can't send media in this chat." }, { "code": 403, "name": "CHAT_SEND_PHOTOS_FORBIDDEN", "comment": "You can't send photos in this chat." }, { "code": 403, "name": "CHAT_SEND_VIDEOS_FORBIDDEN", "comment": "You can't send videos in this chat." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "ENTITY_BOUNDS_INVALID", "comment": "A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length." }, { "code": 400, "name": "FILE_REFERENCE_%d_EXPIRED", "comment": "The file reference of the media file at index %d in the passed media array expired, it must be refreshed." }, { "code": 400, "name": "FILE_REFERENCE_%d_INVALID", "comment": "The file reference of the media file at index %d in the passed media array is invalid." }, { "code": 400, "name": "MEDIA_CAPTION_TOO_LONG", "comment": "The caption is too long." }, { "code": 400, "name": "MEDIA_EMPTY", "comment": "The provided media object is invalid." }, { "code": 400, "name": "MEDIA_INVALID", "comment": "Media invalid." }, { "code": 400, "name": "MULTI_MEDIA_TOO_LONG", "comment": "Too many media files for album." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "QUICK_REPLIES_TOO_MUCH", "comment": "A maximum of appConfig.quick_replies_limit shortcuts may be created, the limit was reached." }, { "code": 500, "name": "RANDOM_ID_DUPLICATE", "comment": "You provided a random ID that was already used." }, { "code": 400, "name": "RANDOM_ID_EMPTY", "comment": "Random ID empty." }, { "code": 400, "name": "REPLY_MESSAGES_TOO_MUCH", "comment": "Each shortcut can contain a maximum of appConfig.quick_reply_messages_limit messages, the limit was reached." }, { "code": 400, "name": "SCHEDULE_DATE_TOO_LATE", "comment": "You can't schedule a message this far in the future." }, { "code": 400, "name": "SCHEDULE_TOO_MUCH", "comment": "There are too many scheduled messages." }, { "code": 400, "name": "SEND_AS_PEER_INVALID", "comment": "You can't send messages as the specified peer." }, { "code": 420, "name": "SLOWMODE_WAIT_%d", "comment": "Slowmode is enabled in this chat: wait %d seconds before sending another message to this chat." }, { "code": 400, "name": "TOPIC_CLOSED", "comment": "This topic was closed, you can't send messages to it anymore." }, { "code": 400, "name": "TOPIC_DELETED", "comment": "The specified topic was deleted." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }], "available": "both" }, "messages.getGameHighScores": { "comment": "Get highscores of a game", "arguments": { "peer": "Where was the game sent", "id": "ID of message with game media attachment", "user_id": "Get high scores made by a certain user" }, "throws": [{ "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, "messages.uploadEncryptedFile": { "comment": "Upload encrypted file and associate it to a secret chat", "arguments": { "peer": "The secret chat to associate the file to", "file": "The file" }, "throws": [{ "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }], "available": "user" }, "messages.markDialogUnread": { "comment": "Manually mark dialog as unread", "arguments": { "flags": "Flags, see TL conditional fields", "unread": "Mark as unread/read", "peer": "Dialog" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.getSplitRanges": { "comment": "Get message ranges for saving the user's chat history", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messages.setGameScore": { "comment": "Use this method to set the score of the specified user in a game sent as a normal message (bots only).", "arguments": { "flags": "Flags, see TL conditional fields", "edit_message": "Set this flag if the game message should be automatically edited to include the current scoreboard", "force": "Set this flag if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters", "peer": "Unique identifier of target chat", "id": "Identifier of the sent message", "user_id": "User identifier", "score": "New score" }, "throws": [{ "code": 400, "name": "BOT_SCORE_NOT_MODIFIED", "comment": "The score wasn't modified." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "SCORE_INVALID", "comment": "The specified game score is invalid." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, "messages.getAttachedStickers": { "comment": "Get stickers attached to a photo or video", "arguments": { "media": "Stickered media" }, "throws": [{ "code": 400, "name": "MEDIA_EMPTY", "comment": "The provided media object is invalid." }], "available": "user" }, "messages.searchStickerSets": { "comment": "Search for stickersets", "arguments": { "flags": "Flags, see TL conditional fields", "exclude_featured": "Exclude featured stickersets from results", "q": "Query string", "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "messages.clearAllDrafts": { "comment": "Clear all drafts.", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messages.updatePinnedMessage": { "comment": "Pin a message", "arguments": { "flags": "Flags, see TL conditional fields", "silent": "Pin the message silently, without triggering a notification", "unpin": "Whether the message should unpinned or pinned", "pm_oneside": "Whether the message should only be pinned on the local side of a one-to-one chat", "peer": "The peer where to pin the message", "id": "The message to pin or unpin" }, "throws": [{ "code": 400, "name": "BOT_ONESIDE_NOT_AVAIL", "comment": "Bots can't pin messages in PM just for themselves." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "PIN_RESTRICTED", "comment": "You can't pin messages." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }], "available": "both" }, "messages.getPollResults": { "comment": "Get poll results", "arguments": { "peer": "Peer where the poll was found", "msg_id": "Message ID of poll message" }, "throws": [{ "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.sendVote": { "comment": "Vote in a {@link RawPoll}\n\nStarting from layer 159, the vote will be sent from the peer specified using {@link messages.RawSaveDefaultSendAsRequest}.", "arguments": { "peer": "The chat where the poll was sent", "msg_id": "The message ID of the poll", "options": "The options that were chosen" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "MESSAGE_POLL_CLOSED", "comment": "Poll closed." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "OPTIONS_TOO_MUCH", "comment": "Too many options provided." }, { "code": 400, "name": "OPTION_INVALID", "comment": "Invalid option selected." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "REVOTE_NOT_ALLOWED", "comment": "You cannot change your vote." }], "available": "user" }, "messages.editChatAbout": { "comment": "Edit the description of a group/supergroup/channel.", "arguments": { "peer": "The group/supergroup/channel.", "about": "The new description" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ABOUT_NOT_MODIFIED", "comment": "About text has not changed." }, { "code": 400, "name": "CHAT_ABOUT_TOO_LONG", "comment": "Chat about too long." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "both" }, "messages.getEmojiKeywords": { "comment": "Get localized emoji keywords ».", "arguments": { "lang_code": "Language code" }, "available": "user" }, "messages.getEmojiKeywordsDifference": { "comment": "Get changed emoji keywords ».", "arguments": { "lang_code": "Language code", "from_version": "Previous stored emoji keyword list version" }, "available": "user" }, "messages.getEmojiKeywordsLanguages": { "comment": "Obtain a list of related languages that must be used when fetching emoji keyword lists ».\n\nUsually the method will return the passed language codes (if localized) + en + some language codes for similar languages (if applicable).", "arguments": { "lang_codes": "The user's language codes" }, "available": "user" }, "messages.getUnreadMentions": { "comment": "Get unread messages where we were mentioned", "arguments": { "flags": "Flags, see TL conditional fields", "peer": "Peer where to look for mentions", "top_msg_id": "If set, considers only messages within the specified forum topic", "offset_id": "Offsets for pagination, for more info click here", "add_offset": "Offsets for pagination, for more info click here", "limit": "Maximum number of results to return, see pagination", "max_id": "Maximum message ID to return, see pagination", "min_id": "Minimum message ID to return, see pagination" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.requestUrlAuth": { "comment": "Get more info about a Seamless Telegram Login authorization request, for more info click here »", "arguments": { "flags": "Flags, see TL conditional fields", "peer": "Peer where the message is located", "msg_id": "The message", "button_id": "The ID of the button with the authorization request", "url": "URL used for link URL authorization, click here for more info »" }, "available": "user" }, "messages.hidePeerSettingsBar": { "comment": "Should be called after the user hides the report spam/add as contact bar of a new chat, effectively prevents the user from executing the actions specified in the action bar ».", "arguments": { "peer": "Peer" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.acceptUrlAuth": { "comment": "Use this to accept a Seamless Telegram Login authorization request, for more info click here »", "arguments": { "flags": "Flags, see TL conditional fields", "write_allowed": "Set this flag to allow the bot to send messages to you (if requested)", "peer": "The location of the message", "msg_id": "Message ID of the message with the login button", "button_id": "ID of the login button", "url": "URL used for link URL authorization, click here for more info »" }, "available": "user" }, "messages.sendScheduledMessages": { "comment": "Send scheduled messages right away", "arguments": { "peer": "Peer", "id": "Scheduled message IDs" }, "throws": [{ "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 500, "name": "RANDOM_ID_DUPLICATE", "comment": "You provided a random ID that was already used." }], "available": "user" }, "messages.deleteScheduledMessages": { "comment": "Delete scheduled messages", "arguments": { "peer": "Peer", "id": "Scheduled message IDs" }, "throws": [{ "code": 403, "name": "MESSAGE_DELETE_FORBIDDEN", "comment": "You can't delete one of the messages you tried to delete, most likely because it is a service message." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.getScheduledHistory": { "comment": "Get scheduled messages", "arguments": { "peer": "Peer", "hash": "Hash used for caching, for more info click here.
    To generate the hash, populate the ids array with the id, date and edit_date (in this order) of the previously returned messages (in order, i.e. ids = [id1, date1, edit_date1, id2, date2, edit_date2, ...])." }, "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.getDialogUnreadMarks": { "comment": "Get dialogs manually marked as unread", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messages.getPollVotes": { "comment": "Get poll results for non-anonymous polls", "arguments": { "flags": "Flags, see TL conditional fields", "peer": "Chat where the poll was sent", "id": "Message ID", "option": "Get only results for the specified poll option", "offset": "Offset for results, taken from the next_offset field of {@link messages.RawVotesList}, initially an empty string.
    Note: if no more results are available, the method call will return an empty next_offset; thus, avoid providing the next_offset returned in {@link messages.RawVotesList} if it is empty, to avoid an infinite loop.", "limit": "Number of results to return" }, "throws": [{ "code": 403, "name": "BROADCAST_FORBIDDEN", "comment": "Channel poll voters and reactions cannot be fetched to prevent deanonymization." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 403, "name": "POLL_VOTE_REQUIRED", "comment": "Cast a vote in the poll before calling this method." }], "available": "user" }, "messages.getSuggestedDialogFilters": { "comment": "Get suggested folders", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messages.toggleStickerSets": { "comment": "Apply changes to multiple stickersets", "arguments": { "flags": "Flags, see TL conditional fields", "uninstall": "Uninstall the specified stickersets", "archive": "Archive the specified stickersets", "unarchive": "Unarchive the specified stickersets", "stickersets": "Stickersets to act upon" }, "available": "user" }, "messages.updateDialogFilter": { "comment": "Update folder", "arguments": { "flags": "Flags, see TL conditional fields", "id": "Folder ID", "filter": "Folder info" }, "throws": [{ "code": 400, "name": "CHATLIST_EXCLUDE_INVALID", "comment": "The specified exclude_peers are invalid." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "FILTER_ID_INVALID", "comment": "The specified filter ID is invalid." }, { "code": 400, "name": "FILTER_INCLUDE_EMPTY", "comment": "The include_peers vector of the filter is empty." }, { "code": 400, "name": "FILTER_TITLE_EMPTY", "comment": "The title field of the filter is empty." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.getDialogFilters": { "comment": "Get folders", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messages.updateDialogFiltersOrder": { "comment": "Reorder folders", "arguments": { "order": "New folder order" }, "available": "user" }, "messages.editChatDefaultBannedRights": { "comment": "Edit the default banned rights of a channel/supergroup/group.", "arguments": { "peer": "The peer", "banned_rights": "The new global rights" }, "throws": [{ "code": 400, "name": "BANNED_RIGHTS_INVALID", "comment": "You provided some invalid flags in the banned rights." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "UNTIL_DATE_INVALID", "comment": "Invalid until date provided." }], "available": "both" }, "messages.getReplies": { "comment": "Get messages in a reply thread", "arguments": { "peer": "Peer", "msg_id": "Message ID", "offset_id": "Offsets for pagination, for more info click here", "offset_date": "Offsets for pagination, for more info click here", "add_offset": "Offsets for pagination, for more info click here", "limit": "Maximum number of results to return, see pagination", "max_id": "If a positive value was transferred, the method will return only messages with ID smaller than max_id", "min_id": "If a positive value was transferred, the method will return only messages with ID bigger than min_id", "hash": "Hash used for caching, for more info click here" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "TOPIC_ID_INVALID", "comment": "The specified topic ID is invalid." }], "available": "user" }, "messages.getOnlines": { "comment": "Get count of online users in a chat", "arguments": { "peer": "The chat" }, "throws": [{ "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.getDiscussionMessage": { "comment": "Get discussion message from the associated discussion group of a channel to show it on top of the comment section, without actually joining the group", "arguments": { "peer": "Channel ID", "msg_id": "Message ID" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "TOPIC_ID_INVALID", "comment": "The specified topic ID is invalid." }], "available": "user" }, "messages.getOldFeaturedStickers": { "comment": "Method for fetching previously featured stickers", "arguments": { "offset": "Offset", "limit": "Maximum number of results to return, see pagination", "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "messages.readDiscussion": { "comment": "Mark a thread as read", "arguments": { "peer": "Group ID", "msg_id": "ID of message that started the thread", "read_max_id": "ID up to which thread messages were read" }, "throws": [{ "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.unpinAllMessages": { "comment": "Unpin all pinned messages", "arguments": { "flags": "Flags, see TL conditional fields", "peer": "Chat where to unpin", "top_msg_id": "Forum topic where to unpin" }, "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "both" }, "messages.deleteChat": { "comment": "Delete a chat", "arguments": { "chat_id": "Chat ID" }, "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.deletePhoneCallHistory": { "comment": "Delete the entire phone call history.", "arguments": { "flags": "Flags, see TL conditional fields", "revoke": "Whether to remove phone call history for participants as well" }, "available": "user" }, "messages.initHistoryImport": { "comment": "Import chat history from a foreign chat app into a specific Telegram chat, click here for more info about imported chats ».", "arguments": { "peer": "The Telegram chat where the history should be imported.", "file": "File with messages to import.", "media_count": "Number of media files associated with the chat that will be uploaded using {@link messages.RawUploadImportedMediaRequest}." }, "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "IMPORT_FILE_INVALID", "comment": "The specified chat export file is invalid." }, { "code": 400, "name": "IMPORT_FORMAT_DATE_INVALID", "comment": "The date specified in the import file is invalid." }, { "code": 400, "name": "IMPORT_FORMAT_UNRECOGNIZED", "comment": "The specified chat export file was exported from an unsupported chat app." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 406, "name": "PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_%dMIN", "comment": "Import for this chat is already in progress, wait %d minutes before starting a new one." }], "available": "user" }, "messages.getEmojiURL": { "comment": "Returns an HTTP URL which can be used to automatically log in into translation platform and suggest new emoji keywords ». The URL will be valid for 30 seconds after generation.", "arguments": { "lang_code": "Language code for which the emoji keywords will be suggested" }, "available": "user" }, "messages.getExportedChatInvite": { "comment": "Get info about a chat invite", "arguments": { "peer": "Chat", "link": "Invite link" }, "throws": [{ "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "INVITE_HASH_EXPIRED", "comment": "The invite link has expired." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.getExportedChatInvites": { "comment": "Get info about the chat invites of a specific chat", "arguments": { "flags": "Flags, see TL conditional fields", "revoked": "Whether to fetch revoked chat invites", "peer": "Chat", "admin_id": "Whether to only fetch chat invites from this admin", "offset_date": "Offsets for pagination, for more info click here", "offset_link": "Offsets for pagination, for more info click here", "limit": "Maximum number of results to return, see pagination" }, "throws": [{ "code": 400, "name": "ADMIN_ID_INVALID", "comment": "The specified admin ID is invalid." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.startHistoryImport": { "comment": "Complete the history import process, importing all messages into the chat.
    \nTo be called only after initializing the import with {@link messages.RawInitHistoryImportRequest} and uploading all files using {@link messages.RawUploadImportedMediaRequest}.", "arguments": { "peer": "The Telegram chat where the messages should be imported, click here for more info »", "import_id": "Identifier of a history import session, returned by {@link messages.RawInitHistoryImportRequest}." }, "throws": [{ "code": 400, "name": "IMPORT_ID_INVALID", "comment": "The specified import ID is invalid." }], "available": "user" }, "messages.deleteRevokedExportedChatInvites": { "comment": "Delete all revoked chat invites", "arguments": { "peer": "Chat", "admin_id": "ID of the admin that originally generated the revoked chat invites" }, "throws": [{ "code": 400, "name": "ADMIN_ID_INVALID", "comment": "The specified admin ID is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.getScheduledMessages": { "comment": "Get scheduled messages", "arguments": { "peer": "Peer", "id": "IDs of scheduled messages" }, "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.editExportedChatInvite": { "comment": "Edit an exported chat invite", "arguments": { "flags": "Flags, see TL conditional fields", "revoked": "Whether to revoke the chat invite", "peer": "Chat", "link": "Invite link", "expire_date": "New expiration date", "usage_limit": "Maximum number of users that can join using this link", "request_needed": "Whether admin confirmation is required before admitting each separate user into the chat", "title": "Description of the invite link, visible only to administrators" }, "throws": [{ "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_INVITE_PERMANENT", "comment": "You can't set an expiration date on permanent invite links." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 403, "name": "EDIT_BOT_INVITE_FORBIDDEN", "comment": "Normal users can't edit invites that were created by bots." }, { "code": 400, "name": "INVITE_HASH_EXPIRED", "comment": "The invite link has expired." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USAGE_LIMIT_INVALID", "comment": "The specified usage limit is invalid." }], "available": "both" }, "messages.deleteExportedChatInvite": { "comment": "Delete a chat invite", "arguments": { "peer": "Peer", "link": "Invite link" }, "throws": [{ "code": 400, "name": "INVITE_HASH_EXPIRED", "comment": "The invite link has expired." }, { "code": 400, "name": "INVITE_REVOKED_MISSING", "comment": "The specified invite link was already revoked or is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.getAdminsWithInvites": { "comment": "Get info about chat invites generated by admins.", "arguments": { "peer": "Chat" }, "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.getChatInviteImporters": { "comment": "Get info about the users that joined the chat using a specific chat invite", "arguments": { "flags": "Flags, see TL conditional fields", "requested": "If set, only returns info about users with pending join requests »", "peer": "Chat", "link": "Invite link", "q": "Search for a user in the pending join requests » list: only available when the requested flag is set, cannot be used together with a specific link.", "offset_date": "Offsets for pagination, for more info click here", "offset_user": "User ID for pagination: if set, offset_date must also be set.", "limit": "Maximum number of results to return, see pagination" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "INVITE_HASH_EXPIRED", "comment": "The invite link has expired." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "SEARCH_WITH_LINK_NOT_SUPPORTED", "comment": "You cannot provide a search query and an invite link at the same time." }], "available": "user" }, "messages.checkHistoryImportPeer": { "comment": "Check whether chat history exported from another chat app can be imported into a specific Telegram chat, click here for more info ».\n\nIf the check succeeds, and no RPC errors are returned, a messages.CheckedHistoryImportPeer constructor will be returned, with a confirmation text to be shown to the user, before actually initializing the import.", "arguments": { "peer": "The chat where we want to import history »." }, "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USER_NOT_MUTUAL_CONTACT", "comment": "The provided user is not a mutual contact." }], "available": "user" }, "messages.setHistoryTTL": { "comment": "Set maximum Time-To-Live of all messages in the specified chat", "arguments": { "peer": "The dialog", "period": "Automatically delete all messages sent in the chat after this many seconds" }, "throws": [{ "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "TTL_PERIOD_INVALID", "comment": "The specified TTL period is invalid." }], "available": "user" }, "messages.setChatTheme": { "comment": "Change the chat theme of a certain chat", "arguments": { "peer": "Private chat where to change theme", "emoticon": "Emoji, identifying a specific chat theme; a list of chat themes can be fetched using {@link account.RawGetChatThemesRequest}" }, "throws": [{ "code": 400, "name": "EMOJI_INVALID", "comment": "The specified theme emoji is valid." }, { "code": 400, "name": "EMOJI_NOT_MODIFIED", "comment": "The theme wasn't changed." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.getMessageReadParticipants": { "comment": "Get which users read a specific message: only available for groups and supergroups with less than chat_read_mark_size_threshold members, read receipts will be stored for chat_read_mark_expire_period seconds after the message was sent, see client configuration for more info ».", "arguments": { "peer": "Dialog", "msg_id": "Message ID" }, "throws": [{ "code": 400, "name": "CHAT_TOO_BIG", "comment": "This method is not available for groups with more than chat_read_mark_size_threshold members, see client configuration »." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "MSG_TOO_OLD", "comment": "chat_read_mark_expire_period seconds have passed since the message was sent, read receipts were deleted." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.getSearchResultsCalendar": { "comment": "Returns information about the next messages of the specified type in the chat split by days.\n\nReturns the results in reverse chronological order.
    \nCan return partial results for the last returned day.", "arguments": { "flags": "Flags, see TL conditional fields", "peer": "Peer where to search", "saved_peer_id": "Search within the saved message dialog » with this ID.", "filter": "Message filter, {@link RawInputMessagesFilterEmpty}, {@link RawInputMessagesFilterMyMentions} filters are not supported by this method.", "offset_id": "Offsets for pagination, for more info click here", "offset_date": "Offsets for pagination, for more info click here" }, "throws": [{ "code": 400, "name": "FILTER_NOT_SUPPORTED", "comment": "The specified filter cannot be used in this context." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.saveDefaultSendAs": { "comment": "Change the default peer that should be used when sending messages, reactions, poll votes to a specific group", "arguments": { "peer": "Group", "send_as": "The default peer that should be used when sending messages to the group" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "SEND_AS_PEER_INVALID", "comment": "You can't send messages as the specified peer." }], "available": "user" }, "messages.hideChatJoinRequest": { "comment": "Dismiss or approve a chat join request related to a specific chat or channel.", "arguments": { "flags": "Flags, see TL conditional fields", "approved": "Whether to dismiss or approve the chat join request »", "peer": "The chat or channel", "user_id": "The user whose join request » should be dismissed or approved" }, "throws": [{ "code": 400, "name": "CHANNELS_TOO_MUCH", "comment": "You have joined too many channels/supergroups." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "HIDE_REQUESTER_MISSING", "comment": "The join request was missing or was already handled." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USER_ALREADY_PARTICIPANT", "comment": "The user is already in the group." }, { "code": 403, "name": "USER_CHANNELS_TOO_MUCH", "comment": "One of the users you tried to add is already in too many channels/supergroups." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "both" }, "messages.checkHistoryImport": { "comment": "Obtains information about a chat export file, generated by a foreign chat app, click here for more info about imported chats ».", "arguments": { "import_head": "Beginning of the message file; up to 100 lines." }, "throws": [{ "code": 400, "name": "IMPORT_FORMAT_UNRECOGNIZED", "comment": "The specified chat export file was exported from an unsupported chat app." }], "available": "user" }, "messages.sendReaction": { "comment": "React to message.\n\nStarting from layer 159, the reaction will be sent from the peer specified using {@link messages.RawSaveDefaultSendAsRequest}.", "arguments": { "flags": "Flags, see TL conditional fields", "big": "Whether a bigger and longer reaction should be shown", "add_to_recent": "Whether to add this reaction to the recent reactions list ».", "peer": "Peer", "msg_id": "Message ID to react to", "reaction": "A list of reactions" }, "throws": [{ "code": 403, "name": "ANONYMOUS_REACTIONS_DISABLED", "comment": "Sorry, anonymous administrators cannot leave reactions or participate in polls." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "CUSTOM_REACTIONS_TOO_MANY", "comment": "Too many custom reactions were specified." }, { "code": 400, "name": "DOCUMENT_INVALID", "comment": "The specified document is invalid." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "MESSAGE_NOT_MODIFIED", "comment": "The provided message data is identical to the previous message data, the message wasn't modified." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }, { "code": 400, "name": "REACTIONS_TOO_MANY", "comment": "The message already has exactly reactions_uniq_max reaction emojis, you can't react with a new emoji, see the docs for more info »." }, { "code": 400, "name": "REACTION_EMPTY", "comment": "Empty reaction provided." }, { "code": 400, "name": "REACTION_INVALID", "comment": "The specified reaction is invalid." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }], "available": "user" }, "messages.hideAllChatJoinRequests": { "comment": "Dismiss or approve all join requests related to a specific chat or channel.", "arguments": { "flags": "Flags, see TL conditional fields", "approved": "Whether to dismiss or approve all chat join requests »", "peer": "The chat or channel", "link": "Only dismiss or approve join requests » initiated using this invite link" }, "throws": [{ "code": 400, "name": "CHANNELS_TOO_MUCH", "comment": "You have joined too many channels/supergroups." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "HIDE_REQUESTER_MISSING", "comment": "The join request was missing or was already handled." }, { "code": 400, "name": "INVITE_HASH_EXPIRED", "comment": "The invite link has expired." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USER_CHANNELS_TOO_MUCH", "comment": "One of the users you tried to add is already in too many channels/supergroups." }], "available": "user" }, "messages.getMessagesReactions": { "comment": "Get message reactions »", "arguments": { "peer": "Peer", "id": "Message IDs" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }], "available": "user" }, "messages.setChatAvailableReactions": { "comment": "Change the set of message reactions » that can be used in a certain group, supergroup or channel", "arguments": { "flags": "Flags, see TL conditional fields", "peer": "Group where to apply changes", "available_reactions": "Allowed reaction emojis", "reactions_limit": "This flag may be used to impose a custom limit of unique reactions (i.e. a customizable version of appConfig.reactions_uniq_max); this field and the other info set by the method will then be available to users in {@link RawChannelFull} and {@link RawChatFull}." }, "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.getAvailableReactions": { "comment": "Obtain available message reactions »", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "messages.uploadImportedMedia": { "comment": "Upload a media file associated with an imported chat, click here for more info ».", "arguments": { "peer": "The Telegram chat where the media will be imported", "import_id": "Identifier of a history import session, returned by {@link messages.RawInitHistoryImportRequest}", "file_name": "File name", "media": "Media metadata" }, "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "IMPORT_ID_INVALID", "comment": "The specified import ID is invalid." }], "available": "user" }, "messages.toggleNoForwards": { "comment": "Enable or disable content protection on a channel or chat", "arguments": { "peer": "The chat or channel", "enabled": "Enable or disable content protection" }, "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.getSearchResultsPositions": { "comment": "Returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation.\n\nReturns the results in reverse chronological order (i.e., in order of decreasing message_id).", "arguments": { "flags": "Flags, see TL conditional fields", "peer": "Peer where to search", "saved_peer_id": "Search within the saved message dialog » with this ID.", "filter": "Message filter, {@link RawInputMessagesFilterEmpty}, {@link RawInputMessagesFilterMyMentions} filters are not supported by this method.", "offset_id": "Offsets for pagination, for more info click here", "limit": "Maximum number of results to return, see pagination" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.setDefaultReaction": { "comment": "Change default emoji reaction to use in the quick reaction menu: the value is synced across devices and can be fetched using {@link help.RawGetConfigRequest}.", "arguments": { "reaction": "New emoji reaction" }, "throws": [{ "code": 400, "name": "REACTION_INVALID", "comment": "The specified reaction is invalid." }], "available": "user" }, "messages.translateText": { "comment": "Translate a given text.\n\nStyled text entities will only be preserved for Telegram Premium users.", "arguments": { "flags": "Flags, see TL conditional fields", "peer": "If the text is a chat message, the peer ID", "id": "A list of message IDs to translate", "text": "A list of styled messages to translate", "to_lang": "Two-letter ISO 639-1 language code of the language to which the message is translated" }, "throws": [{ "code": 400, "name": "INPUT_TEXT_EMPTY", "comment": "The specified text is empty." }, { "code": 400, "name": "INPUT_TEXT_TOO_LONG", "comment": "The specified text is too long." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "TO_LANG_INVALID", "comment": "The specified destination language is invalid." }, { "code": 400, "name": "TRANSLATE_REQ_QUOTA_EXCEEDED", "comment": "Translation is currently unavailable due to a temporary server-side lack of resources." }], "available": "user" }, "messages.getSearchCounters": { "comment": "Get the number of results that would be found by a {@link messages.RawSearchRequest} call with the same parameters", "arguments": { "flags": "Flags, see TL conditional fields", "peer": "Peer where to search", "saved_peer_id": "Search within the saved message dialog » with this ID.", "top_msg_id": "If set, consider only messages within the specified forum topic", "filters": "Search filters" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.getUnreadReactions": { "comment": "Get unread reactions to messages you sent", "arguments": { "flags": "Flags, see TL conditional fields", "peer": "Peer", "top_msg_id": "If set, considers only reactions to messages within the specified forum topic", "offset_id": "Offsets for pagination, for more info click here", "add_offset": "Offsets for pagination, for more info click here", "limit": "Maximum number of results to return, see pagination", "max_id": "Only return reactions for messages up until this message ID", "min_id": "Only return reactions for messages starting from this message ID" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.getAttachMenuBots": { "comment": "Returns installed attachment menu bot mini apps »", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "messages.readReactions": { "comment": "Mark message reactions » as read", "arguments": { "flags": "Flags, see TL conditional fields", "peer": "Peer", "top_msg_id": "Mark as read only reactions to messages within the specified forum topic" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.getAttachMenuBot": { "comment": "Returns attachment menu entry for a bot mini app that can be launched from the attachment menu »", "arguments": { "bot": "Bot ID" }, "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }], "available": "user" }, "messages.requestWebView": { "comment": "Open a bot mini app, sending over user information after user confirmation.\n\nAfter calling this method, until the user closes the webview, {@link messages.RawProlongWebViewRequest} must be called every 60 seconds.", "arguments": { "flags": "Flags, see TL conditional fields", "from_bot_menu": "Whether the webview was opened by clicking on the bot's menu button ».", "silent": "Whether the inline message that will be sent by the bot on behalf of the user once the web app interaction is {@link messages.RawSendWebViewResultMessageRequest} should be sent silently (no notifications for the receivers).", "compact": "If set, requests to open the mini app in compact mode (as opposed to fullview mode). Must be set if the mode parameter of the attachment menu deep link is equal to compact.", "peer": "Dialog where the web app is being opened, and where the resulting message will be sent (see the docs for more info »).", "bot": "Bot that owns the web app", "url": "Web app URL", "start_param": "If the web app was opened from the attachment menu using a attachment menu deep link, start_param should contain the data from the startattach parameter.", "theme_params": "Theme parameters »", "platform": "Short name of the application; 0-64 English letters, digits, and underscores", "reply_to": "If set, indicates that the inline message that will be sent by the bot on behalf of the user once the web app interaction is {@link messages.RawSendWebViewResultMessageRequest} should be sent in reply to the specified message or story.", "send_as": "Open the web app as the specified peer, sending the resulting the message as the specified peer." }, "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }, { "code": 400, "name": "BOT_WEBVIEW_DISABLED", "comment": "A webview cannot be opened in the specified conditions: emitted for example if from_bot_menu or url are set and peer is not the chat with the bot." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 403, "name": "PRIVACY_PREMIUM_REQUIRED", "comment": "You need a Telegram Premium subscription to send a message to this user." }, { "code": 400, "name": "SEND_AS_PEER_INVALID", "comment": "You can't send messages as the specified peer." }, { "code": 400, "name": "YOU_BLOCKED_USER", "comment": "You blocked this user." }], "available": "user" }, "messages.searchSentMedia": { "comment": "View and search recently sent media.
    \nThis method does not support pagination.", "arguments": { "q": "Optional search query", "filter": "Message filter", "limit": "Maximum number of results to return (max 100)." }, "throws": [{ "code": 400, "name": "FILTER_NOT_SUPPORTED", "comment": "The specified filter cannot be used in this context." }], "available": "user" }, "messages.sendWebViewResultMessage": { "comment": "Terminate webview interaction started with {@link messages.RawRequestWebViewRequest}, sending the specified message to the chat on behalf of the user.", "arguments": { "bot_query_id": "Webview interaction ID obtained from {@link messages.RawRequestWebViewRequest}", "result": "Message to send" }, "throws": [{ "code": 400, "name": "QUERY_ID_INVALID", "comment": "The query ID is invalid." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, "messages.prolongWebView": { "comment": "Indicate to the server (from the user side) that the user is still using a web app.\n\nIf the method returns a QUERY_ID_INVALID error, the webview must be closed.", "arguments": { "flags": "Flags, see TL conditional fields", "silent": "Whether the inline message that will be sent by the bot on behalf of the user once the web app interaction is {@link messages.RawSendWebViewResultMessageRequest} should be sent silently (no notifications for the receivers).", "peer": "Dialog where the web app was opened.", "bot": "Bot that owns the web app", "query_id": "Web app interaction ID obtained from {@link messages.RawRequestWebViewRequest}", "reply_to": "If set, indicates that the inline message that will be sent by the bot on behalf of the user once the web app interaction is {@link messages.RawSendWebViewResultMessageRequest} should be sent in reply to the specified message or story.", "send_as": "Open the web app as the specified peer" }, "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }], "available": "user" }, "messages.requestSimpleWebView": { "comment": "Open a bot mini app.", "arguments": { "flags": "Flags, see TL conditional fields", "from_switch_webview": "Whether the webapp was opened by clicking on the switch_webview button shown on top of the inline results list returned by {@link messages.RawGetInlineBotResultsRequest}.", "from_side_menu": "Set this flag if opening the Mini App from the installed side menu entry ».", "compact": "Deprecated.", "bot": "Bot that owns the mini app", "url": "Web app URL, if opening from a keyboard button or inline result", "start_param": "Deprecated.", "theme_params": "Theme parameters »", "platform": "Short name of the application; 0-64 English letters, digits, and underscores" }, "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }, { "code": 400, "name": "URL_INVALID", "comment": "Invalid URL provided." }], "available": "user" }, "messages.sendWebViewData": { "comment": "Used by the user to relay data from an opened reply keyboard bot mini app to the bot that owns it.", "arguments": { "bot": "Bot that owns the web app", "random_id": "Unique client message ID to prevent duplicate sending of the same event", "button_text": "Text of the {@link RawKeyboardButtonSimpleWebView} that was pressed to open the web app.", "data": "Data to relay to the bot, obtained from a web_app_data_send JS event." }, "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }], "available": "user" }, "messages.transcribeAudio": { "comment": "Transcribe voice message", "arguments": { "peer": "Peer ID where the voice message was sent", "msg_id": "Voice message ID" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }, { "code": 400, "name": "TRANSCRIPTION_FAILED", "comment": "Audio transcription failed." }], "available": "user" }, "messages.rateTranscribedAudio": { "comment": "Rate transcribed voice message", "arguments": { "peer": "Peer where the voice message was sent", "msg_id": "Message ID", "transcription_id": "Transcription ID", "good": "Whether the transcription was correct" }, "available": "user" }, "messages.getMessageReactionsList": { "comment": "Get message reaction list, along with the sender of each reaction.", "arguments": { "flags": "Flags, see TL conditional fields", "peer": "Peer", "id": "Message ID", "reaction": "Get only reactions of this type", "offset": "Offset for pagination (taken from the next_offset field of the returned messages.MessageReactionsList); empty in the first request.", "limit": "Maximum number of results to return, see pagination" }, "throws": [{ "code": 403, "name": "BROADCAST_FORBIDDEN", "comment": "Channel poll voters and reactions cannot be fetched to prevent deanonymization." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }], "available": "user" }, "messages.getCustomEmojiDocuments": { "comment": "Fetch custom emoji stickers ».\n\nReturns a list of {@link RawDocument} with the animated custom emoji in TGS format, and a {@link RawDocumentAttributeCustomEmoji} attribute with the original emoji and info about the emoji stickerset this custom emoji belongs to.", "arguments": { "document_id": "Custom emoji IDs from a {@link RawMessageEntityCustomEmoji}." }, "available": "both" }, "messages.reportReaction": { "comment": "Report a message reaction", "arguments": { "peer": "Peer where the message was sent", "id": "Message ID", "reaction_peer": "Peer that sent the reaction" }, "throws": [{ "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "user" }, "messages.getFeaturedEmojiStickers": { "comment": "Gets featured custom emoji stickersets.", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "messages.toggleBotInAttachMenu": { "comment": "Enable or disable web bot attachment menu »", "arguments": { "flags": "Flags, see TL conditional fields", "write_allowed": "Whether the user authorizes the bot to write messages to them, if requested by {@link RawAttachMenuBot}.request_write_access", "bot": "Bot ID", "enabled": "Toggle" }, "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }], "available": "user" }, "messages.getEmojiStickers": { "comment": "Gets the list of currently installed custom emoji stickersets.", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "messages.getTopReactions": { "comment": "Got popular message reactions", "arguments": { "limit": "Maximum number of results to return, see pagination", "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "messages.getRecentReactions": { "comment": "Get recently used message reactions", "arguments": { "limit": "Maximum number of results to return, see pagination", "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "messages.clearRecentReactions": { "comment": "Clear recently used message reactions", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messages.getDefaultHistoryTTL": { "comment": "Gets the default value of the Time-To-Live setting, applied to all new chats.", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messages.setDefaultHistoryTTL": { "comment": "Changes the default value of the Time-To-Live setting, applied to all new chats.", "arguments": { "period": "The new default Time-To-Live of all messages sent in new chats." }, "throws": [{ "code": 400, "name": "TTL_PERIOD_INVALID", "comment": "The specified TTL period is invalid." }], "available": "user" }, "messages.getEmojiGroups": { "comment": "Represents a list of emoji categories.", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "messages.getExtendedMedia": { "comment": "Fetch updated information about paid media, see here » for the full flow.\n\nThis method will return an array of {@link RawUpdateMessageExtendedMedia} updates, only for messages containing already bought paid media.
    \nNo information will be returned for messages containing not yet bought paid media.", "arguments": { "peer": "Peer with visible paid media messages.", "id": "IDs of currently visible messages containing paid media." }, "available": "user" }, "messages.sendBotRequestedPeer": { "comment": "Send one or more chosen peers, as requested by a {@link RawKeyboardButtonRequestPeer} button.", "arguments": { "peer": "The bot that sent the {@link RawKeyboardButtonRequestPeer} button.", "msg_id": "ID of the message that contained the reply keyboard with the {@link RawKeyboardButtonRequestPeer} button.", "button_id": "The button_id field from the {@link RawKeyboardButtonRequestPeer} constructor.", "requested_peers": "The chosen peers." }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.getEmojiProfilePhotoGroups": { "comment": "Represents a list of emoji categories, to be used when selecting custom emojis to set as profile picture.", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "messages.searchCustomEmoji": { "comment": "Look for custom emojis associated to a UTF8 emoji", "arguments": { "emoticon": "The emoji", "hash": "Hash used for caching, for more info click here." }, "throws": [{ "code": 400, "name": "EMOTICON_EMPTY", "comment": "The emoji is empty." }], "available": "user" }, "messages.togglePeerTranslations": { "comment": "Show or hide the real-time chat translation popup for a certain chat", "arguments": { "flags": "Flags, see TL conditional fields", "disabled": "Whether to disable or enable the real-time chat translation popup", "peer": "The peer" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.getEmojiStatusGroups": { "comment": "Represents a list of emoji categories, to be used when selecting custom emojis to set as custom emoji status.", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "messages.getBotApp": { "comment": "Obtain information about a direct link Mini App", "arguments": { "app": "Bot app information obtained from a Direct Mini App deep link ».", "hash": "Hash used for caching, for more info click here" }, "throws": [{ "code": 400, "name": "BOT_APP_BOT_INVALID", "comment": "The bot_id passed in the inputBotAppShortName constructor is invalid." }, { "code": 400, "name": "BOT_APP_INVALID", "comment": "The specified bot app is invalid." }, { "code": 400, "name": "BOT_APP_SHORTNAME_INVALID", "comment": "The specified bot app short name is invalid." }], "available": "user" }, "messages.requestAppWebView": { "comment": "Open a bot mini app from a direct Mini App deep link, sending over user information after user confirmation.\n\nAfter calling this method, until the user closes the webview, {@link messages.RawProlongWebViewRequest} must be called every 60 seconds.", "arguments": { "flags": "Flags, see TL conditional fields", "write_allowed": "Set this flag if the bot is asking permission to send messages to the user as specified in the direct Mini App deep link docs, and the user agreed.", "compact": "If set, requests to open the mini app in compact mode (as opposed to fullview mode). Must be set if the mode parameter of the direct Mini App deep link is equal to compact.", "peer": "If the client has clicked on the link in a Telegram chat, pass the chat's peer information; otherwise pass the bot's peer information, instead.", "app": "The app obtained by invoking {@link messages.RawGetBotAppRequest} as specified in the direct Mini App deep link docs.", "start_param": "If the startapp query string parameter is present in the direct Mini App deep link, pass it to start_param.", "theme_params": "Theme parameters »", "platform": "Short name of the application; 0-64 English letters, digits, and underscores" }, "throws": [{ "code": 400, "name": "BOT_APP_INVALID", "comment": "The specified bot app is invalid." }, { "code": 400, "name": "BOT_APP_SHORTNAME_INVALID", "comment": "The specified bot app short name is invalid." }], "available": "user" }, "messages.searchEmojiStickerSets": { "comment": "Search for custom emoji stickersets »", "arguments": { "flags": "Flags, see TL conditional fields", "exclude_featured": "Exclude featured stickersets from results", "q": "Query string", "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "messages.deleteSavedHistory": { "comment": "Deletes messages forwarded from a specific peer to saved messages ».", "arguments": { "flags": "Flags, see TL conditional fields", "peer": "Peer, whose messages will be deleted from saved messages »", "max_id": "Maximum ID of message to delete", "min_date": "Delete all messages newer than this UNIX timestamp", "max_date": "Delete all messages older than this UNIX timestamp" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.setChatWallPaper": { "comment": "Set a custom wallpaper » in a specific private chat with another user.", "arguments": { "flags": "Flags, see TL conditional fields", "for_both": "Only for Premium users, sets the specified wallpaper for both users of the chat, without requiring confirmation from the other user.", "revert": "If we don't like the new wallpaper the other user of the chat has chosen for us using the for_both flag, we can re-set our previous wallpaper just on our side using this flag.", "peer": "The private chat where the wallpaper will be set", "wallpaper": "The wallpaper », obtained as described in the wallpaper documentation »; must not be provided when installing a wallpaper obtained from a {@link RawMessageActionSetChatWallPaper} service message (id must be provided, instead).", "settings": "Wallpaper settings, obtained as described in the wallpaper documentation » or from {@link RawMessageActionSetChatWallPaper}.wallpaper.settings.", "id": "If the wallpaper was obtained from a {@link RawMessageActionSetChatWallPaper} service message, must contain the ID of that message." }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "WALLPAPER_INVALID", "comment": "The specified wallpaper is invalid." }, { "code": 400, "name": "WALLPAPER_NOT_FOUND", "comment": "The specified wallpaper could not be found." }], "available": "user" }, "messages.getPinnedSavedDialogs": { "comment": "Get pinned saved dialogs, see here » for more info.", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "messages.getSavedHistory": { "comment": "Returns saved messages » forwarded from a specific peer", "arguments": { "peer": "Target peer", "offset_id": "Only return messages starting from the specified message ID", "offset_date": "Only return messages sent before the specified date", "add_offset": "Number of list elements to be skipped, negative values are also accepted.", "limit": "Number of results to return", "max_id": "If a positive value was transferred, the method will return only messages with IDs less than max_id", "min_id": "If a positive value was transferred, the method will return only messages with IDs more than min_id", "hash": "Result hash" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.getSavedDialogs": { "comment": "Returns the current saved dialog list, see here » for more info.", "arguments": { "flags": "Flags, see TL conditional fields", "exclude_pinned": "Exclude pinned dialogs", "offset_date": "Offsets for pagination, for more info click here", "offset_id": "Offsets for pagination, for more info click here (top_message ID used for pagination)", "offset_peer": "Offset peer for pagination", "limit": "Number of list elements to be returned", "hash": "Hash used for caching, for more info click here" }, "available": "user" }, "messages.getSavedReactionTags": { "comment": "Fetch the full list of saved message tags created by the user.", "arguments": { "flags": "Flags, see TL conditional fields", "peer": "If set, returns tags only used in the specified saved message dialog.", "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "messages.reorderPinnedSavedDialogs": { "comment": "Reorder pinned saved message dialogs ».", "arguments": { "flags": "Flags, see TL conditional fields", "force": "If set, dialogs pinned server-side but not present in the order field will be unpinned.", "order": "New dialog order" }, "available": "user" }, "messages.toggleSavedDialogPin": { "comment": "Pin or unpin a saved message dialog ».", "arguments": { "flags": "Flags, see TL conditional fields", "pinned": "Whether to pin or unpin the dialog", "peer": "The dialog to pin" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.updateSavedReactionTag": { "comment": "Update the description of a saved message tag ».", "arguments": { "flags": "Flags, see TL conditional fields", "reaction": "Reaction associated to the tag", "title": "Tag description, max 12 UTF-8 characters; to remove the description call the method without setting this flag." }, "throws": [{ "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }, { "code": 400, "name": "REACTION_INVALID", "comment": "The specified reaction is invalid." }], "available": "user" }, "messages.getDefaultTagReactions": { "comment": "Fetch a default recommended list of saved message tag reactions.", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "messages.getQuickReplies": { "comment": "Fetch basic info about all existing quick reply shortcuts.", "arguments": { "hash": "Hash for pagination, generated as specified here » (not the usual algorithm used for hash generation.)" }, "available": "user" }, "messages.reorderQuickReplies": { "comment": "Reorder quick reply shortcuts.\n\nThis will emit an {@link RawUpdateQuickReplies} update to other logged-in sessions.", "arguments": { "order": "IDs of all created quick reply shortcuts, in the desired order." }, "throws": [{ "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }], "available": "user" }, "messages.getOutboxReadDate": { "comment": "Get the exact read date of one of our messages, sent to a private chat with another user.\n\nCan be only done for private outgoing messages not older than appConfig.pm_read_date_expire_period ».\n\nIf the peer's {@link RawUserFull}.read_dates_private flag is set, we will not be able to fetch the exact read date of messages we send to them, and a USER_PRIVACY_RESTRICTED RPC error will be emitted.
    \nThe exact read date of messages might still be unavailable for other reasons, see {@link RawGlobalPrivacySettings} for more info.
    \nTo set {@link RawUserFull}.read_dates_private for ourselves invoke {@link account.RawSetGlobalPrivacySettingsRequest}, setting the settings.hide_read_marks flag.", "arguments": { "peer": "The user to whom we sent the message.", "msg_id": "The message ID." }, "throws": [{ "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "MESSAGE_NOT_READ_YET", "comment": "The specified message wasn't read yet." }, { "code": 400, "name": "MESSAGE_TOO_OLD", "comment": "The message is too old, the requested information is not available." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 403, "name": "USER_PRIVACY_RESTRICTED", "comment": "The user's privacy settings do not allow you to do this." }, { "code": 403, "name": "YOUR_PRIVACY_RESTRICTED", "comment": "You cannot fetch the read date of this message because you have disallowed other users to do so for your messages; to fix, allow other users to see your exact last online date OR purchase a Telegram Premium subscription." }], "available": "user" }, "messages.editQuickReplyShortcut": { "comment": "Rename a quick reply shortcut.
    \nThis will emit an {@link RawUpdateQuickReplies} update to other logged-in sessions.", "arguments": { "shortcut_id": "Shortcut ID.", "shortcut": "New shortcut name." }, "throws": [{ "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }, { "code": 400, "name": "SHORTCUT_INVALID", "comment": "The specified shortcut is invalid." }], "available": "user" }, "messages.deleteQuickReplyShortcut": { "comment": "Completely delete a quick reply shortcut.
    \nThis will also emit an {@link RawUpdateDeleteQuickReply} update to other logged-in sessions (and no {@link RawUpdateDeleteQuickReplyMessages} updates, even if all the messages in the shortcuts are also deleted by this method).", "arguments": { "shortcut_id": "Shortcut ID" }, "throws": [{ "code": 400, "name": "SHORTCUT_INVALID", "comment": "The specified shortcut is invalid." }], "available": "user" }, "messages.checkQuickReplyShortcut": { "comment": "Before offering the user the choice to add a message to a quick reply shortcut, to make sure that none of the limits specified here » were reached.", "arguments": { "shortcut": "Shorcut name (not ID!)." }, "throws": [{ "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }], "available": "user" }, "messages.sendQuickReplyMessages": { "comment": "Send a quick reply shortcut ».", "arguments": { "peer": "The peer where to send the shortcut (users only, for now).", "shortcut_id": "The ID of the quick reply shortcut to send.", "id": "Specify a subset of messages from the shortcut to send; if empty, defaults to all of them.", "random_id": "Unique client IDs required to prevent message resending, one for each message we're sending, may be empty (but not recommended)." }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }], "available": "user" }, "messages.toggleDialogFilterTags": { "comment": "Enable or disable folder tags ».", "arguments": { "enabled": "Enable or disable folder tags." }, "throws": [{ "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }], "available": "user" }, "messages.getQuickReplyMessages": { "comment": "Fetch (a subset or all) messages in a quick reply shortcut ».", "arguments": { "flags": "Flags, see TL conditional fields", "shortcut_id": "Quick reply shortcut ID.", "id": "IDs of the messages to fetch, if empty fetches all of them.", "hash": "Hash used for caching, for more info click here" }, "throws": [{ "code": 400, "name": "SHORTCUT_INVALID", "comment": "The specified shortcut is invalid." }], "available": "user" }, "messages.getMyStickers": { "comment": "Fetch all stickersets » owned by the current user.", "arguments": { "offset_id": "Offsets for pagination, for more info click here", "limit": "Maximum number of results to return, see pagination" }, "available": "user" }, "messages.deleteQuickReplyMessages": { "comment": "Delete one or more messages from a quick reply shortcut. This will also emit an {@link RawUpdateDeleteQuickReplyMessages} update.", "arguments": { "shortcut_id": "Shortcut ID.", "id": "IDs of shortcut messages to delete." }, "throws": [{ "code": 400, "name": "SHORTCUT_INVALID", "comment": "The specified shortcut is invalid." }], "available": "user" }, "messages.getAvailableEffects": { "comment": "Fetch the full list of usable animated message effects ».", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "messages.getEmojiStickerGroups": { "comment": "Represents a list of emoji categories, to be used when choosing a sticker.", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "messages.deleteFactCheck": { "comment": "Delete a fact-check from a message.\n\nCan only be used by independent fact-checkers as specified by the appConfig.can_edit_factcheck configuration flag.", "arguments": { "peer": "Peer where the message was sent.", "msg_id": "Message ID" }, "throws": [{ "code": 403, "name": "CHAT_ACTION_FORBIDDEN", "comment": "You cannot execute this action." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.requestMainWebView": { "comment": "Open a Main Mini App.", "arguments": { "flags": "Flags, see TL conditional fields", "compact": "If set, requests to open the mini app in compact mode (as opposed to fullview mode). Must be set if the mode parameter of the Main Mini App link is equal to compact.", "peer": "Currently open chat, may be {@link RawInputPeerEmpty} if no chat is currently open.", "bot": "Bot that owns the main mini app.", "start_param": "Start parameter, if opening from a Main Mini App link ».", "theme_params": "Theme parameters »", "platform": "Short name of the application; 0-64 English letters, digits, and underscores" }, "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }], "available": "user" }, "messages.editFactCheck": { "comment": "Edit/create a fact-check on a message.\n\nCan only be used by independent fact-checkers as specified by the appConfig.can_edit_factcheck configuration flag.", "arguments": { "peer": "Peer where the message was sent", "msg_id": "Message ID", "text": "Fact-check (maximum UTF-8 length specified in appConfig.factcheck_length_limit)." }, "throws": [{ "code": 403, "name": "CHAT_ACTION_FORBIDDEN", "comment": "You cannot execute this action." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "messages.getFactCheck": { "comment": "Fetch one or more factchecks, see here » for the full flow.", "arguments": { "peer": "Peer where the messages were sent.", "msg_id": "Messages that have associated {@link RawFactCheck} constructors with the need_check flag set." }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "updates.getState": { "comment": "Returns a current state of updates.", "available": "both", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "updates.getDifference": { "comment": "Get new updates.", "arguments": { "flags": "Flags, see TL conditional fields", "pts": "PTS, see updates.", "pts_limit": "PTS limit", "pts_total_limit": "For fast updating: if provided and pts + pts_total_limit < remote pts, {@link updates.RawDifferenceTooLong} will be returned.
    Simply tells the server to not return the difference if it is bigger than pts_total_limit
    If the remote pts is too big (> ~4000000), this field will default to 1000000", "date": "date, see updates.", "qts": "QTS, see updates.", "qts_limit": "QTS limit" }, "throws": [{ "code": 400, "name": "CDN_METHOD_INVALID", "comment": "You can't call this method in a CDN DC." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "DATE_EMPTY", "comment": "Date empty." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PERSISTENT_TIMESTAMP_EMPTY", "comment": "Persistent timestamp empty." }, { "code": 400, "name": "PERSISTENT_TIMESTAMP_INVALID", "comment": "Persistent timestamp invalid." }, { "code": 500, "name": "RANDOM_ID_DUPLICATE", "comment": "You provided a random ID that was already used." }, { "code": 400, "name": "USERNAME_INVALID", "comment": "The provided username is not valid." }, { "code": 400, "name": "USER_NOT_PARTICIPANT", "comment": "You're not a member of this supergroup/channel." }], "available": "both" }, "photos.updateProfilePhoto": { "comment": "Installs a previously uploaded photo as a profile photo.", "arguments": { "flags": "Flags, see TL conditional fields", "fallback": "If set, the chosen profile photo will be shown to users that can't display your main profile photo due to your privacy settings.", "bot": "Can contain info of a bot we own, to change the profile photo of that bot, instead of the current user.", "id": "Input photo" }, "throws": [{ "code": 400, "name": "ALBUM_PHOTOS_TOO_MANY", "comment": "You have uploaded too many profile photos, delete some before retrying." }, { "code": 400, "name": "FILE_PARTS_INVALID", "comment": "The number of file parts is invalid." }, { "code": 400, "name": "IMAGE_PROCESS_FAILED", "comment": "Failure while processing image." }, { "code": 400, "name": "LOCATION_INVALID", "comment": "The provided location is invalid." }, { "code": 400, "name": "PHOTO_CROP_SIZE_SMALL", "comment": "Photo is too small." }, { "code": 400, "name": "PHOTO_EXT_INVALID", "comment": "The extension of the photo is invalid." }, { "code": 400, "name": "PHOTO_ID_INVALID", "comment": "Photo ID invalid." }], "available": "both" }, "updates.getChannelDifference": { "comment": "Returns the difference between the current state of updates of a certain channel and transmitted.", "arguments": { "flags": "Flags, see TL conditional fields", "force": "Set to true to skip some possibly unneeded updates and reduce server-side load", "channel": "The channel", "filter": "Messsage filter", "pts": "Persistent timestamp (see updates)", "limit": "How many updates to fetch, max 100000
    Ordinary (non-bot) users are supposed to pass 10-100" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHANNEL_PUBLIC_GROUP_NA", "comment": "channel/supergroup not available." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "FROM_MESSAGE_BOT_DISABLED", "comment": "Bots can't use fromMessage min constructors." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PERSISTENT_TIMESTAMP_EMPTY", "comment": "Persistent timestamp empty." }, { "code": 400, "name": "PERSISTENT_TIMESTAMP_INVALID", "comment": "Persistent timestamp invalid." }, { "code": 500, "name": "PERSISTENT_TIMESTAMP_OUTDATED", "comment": "Channel internal replication issues, try again later (treat this like an RPC_CALL_FAIL)." }, { "code": 400, "name": "PINNED_DIALOGS_TOO_MUCH", "comment": "Too many pinned dialogs." }, { "code": 400, "name": "RANGES_INVALID", "comment": "Invalid range provided." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }], "available": "both" }, "photos.uploadProfilePhoto": { "comment": "Updates current user profile photo.\n\nThe file, video and video_emoji_markup flags are mutually exclusive.", "arguments": { "flags": "Flags, see TL conditional fields", "fallback": "If set, the chosen profile photo will be shown to users that can't display your main profile photo due to your privacy settings.", "bot": "Can contain info of a bot we own, to change the profile photo of that bot, instead of the current user.", "file": "Profile photo", "video": "Animated profile picture video", "video_start_ts": "Floating point UNIX timestamp in seconds, indicating the frame of the video/sticker that should be used as static preview; can only be used if video or video_emoji_markup is set.", "video_emoji_markup": "Animated sticker profile picture, must contain either a {@link RawVideoSizeEmojiMarkup} or a {@link RawVideoSizeStickerMarkup} constructor." }, "throws": [{ "code": 400, "name": "ALBUM_PHOTOS_TOO_MANY", "comment": "You have uploaded too many profile photos, delete some before retrying." }, { "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }, { "code": 400, "name": "EMOJI_MARKUP_INVALID", "comment": "The specified video_emoji_markup was invalid." }, { "code": 400, "name": "FILE_PARTS_INVALID", "comment": "The number of file parts is invalid." }, { "code": 400, "name": "IMAGE_PROCESS_FAILED", "comment": "Failure while processing image." }, { "code": 400, "name": "PHOTO_CROP_FILE_MISSING", "comment": "Photo crop file missing." }, { "code": 400, "name": "PHOTO_CROP_SIZE_SMALL", "comment": "Photo is too small." }, { "code": 400, "name": "PHOTO_EXT_INVALID", "comment": "The extension of the photo is invalid." }, { "code": 400, "name": "PHOTO_FILE_MISSING", "comment": "Profile photo file missing." }, { "code": 400, "name": "PHOTO_INVALID", "comment": "Photo invalid." }, { "code": 400, "name": "STICKER_MIME_INVALID", "comment": "The specified sticker MIME type is invalid." }, { "code": 400, "name": "VIDEO_FILE_INVALID", "comment": "The specified video file is invalid." }], "available": "both" }, "photos.getUserPhotos": { "comment": "Returns the list of user photos.", "arguments": { "user_id": "User ID", "offset": "Number of list elements to be skipped", "max_id": "If a positive value was transferred, the method will return only photos with IDs less than the set one. This parameter is often useful when refetching file references », as in conjuction with limit=1 and offset=-1 the {@link RawPhoto} object with the id specified in max_id can be fetched.", "limit": "Number of list elements to be returned" }, "throws": [{ "code": 400, "name": "MAX_ID_INVALID", "comment": "The provided max ID is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "both" }, "photos.deletePhotos": { "comment": "Deletes profile photos. The method returns a list of successfully deleted photo IDs.", "arguments": { "id": "Input photos to delete" }, "available": "user" }, "photos.uploadContactProfilePhoto": { "comment": "Upload a custom profile picture for a contact, or suggest a new profile picture to a contact.\n\nThe file, video and video_emoji_markup flags are mutually exclusive.", "arguments": { "flags": "Flags, see TL conditional fields", "suggest": "If set, will send a {@link RawMessageActionSuggestProfilePhoto} service message to user_id, suggesting them to use the specified profile picture; otherwise, will set a personal profile picture for the user (only visible to the current user).", "save": "If set, removes a previously set personal profile picture (does not affect suggested profile pictures, to remove them simply deleted the {@link RawMessageActionSuggestProfilePhoto} service message with {@link messages.RawDeleteMessagesRequest}).", "user_id": "The contact", "file": "Profile photo", "video": "Animated profile picture video", "video_start_ts": "Floating point UNIX timestamp in seconds, indicating the frame of the video/sticker that should be used as static preview; can only be used if video or video_emoji_markup is set.", "video_emoji_markup": "Animated sticker profile picture, must contain either a {@link RawVideoSizeEmojiMarkup} or a {@link RawVideoSizeStickerMarkup} constructor." }, "throws": [{ "code": 400, "name": "CONTACT_MISSING", "comment": "The specified user is not a contact." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "user" }, "upload.saveFilePart": { "comment": "Saves a part of file for further sending to one of the methods.", "arguments": { "file_id": "Random file identifier created by the client", "file_part": "Numerical order of a part", "bytes": "Binary data, content of a part" }, "throws": [{ "code": 400, "name": "FILE_PART_EMPTY", "comment": "The provided file part is empty." }, { "code": 400, "name": "FILE_PART_INVALID", "comment": "The file part number is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }], "available": "both" }, "upload.getFile": { "comment": "Returns content of a whole file or its part.", "arguments": { "flags": "Flags, see TL conditional fields", "precise": "Disable some checks on limit and offset values, useful for example to stream videos by keyframes", "cdn_supported": "Whether the current client supports CDN downloads", "location": "File location", "offset": "Number of bytes to be skipped", "limit": "Number of bytes to be returned" }, "throws": [{ "code": 400, "name": "CDN_METHOD_INVALID", "comment": "You can't call this method in a CDN DC." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 406, "name": "FILEREF_UPGRADE_NEEDED", "comment": "The client has to be updated in order to support file references." }, { "code": 400, "name": "FILE_ID_INVALID", "comment": "The provided file id is invalid." }, { "code": 400, "name": "FILE_REFERENCE_EXPIRED", "comment": "File reference expired, it must be refetched as described in the documentation." }, { "code": 420, "name": "FLOOD_PREMIUM_WAIT_%d", "comment": "Please wait %d seconds before repeating the action, or purchase a Telegram Premium subscription to remove this rate limit." }, { "code": 400, "name": "LIMIT_INVALID", "comment": "The provided limit is invalid." }, { "code": 400, "name": "LOCATION_INVALID", "comment": "The provided location is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "OFFSET_INVALID", "comment": "The provided offset is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "both" }, "upload.saveBigFilePart": { "comment": "Saves a part of a large file (over 10 MB in size) to be later passed to one of the methods.", "arguments": { "file_id": "Random file id, created by the client", "file_part": "Part sequence number", "file_total_parts": "Total number of parts", "bytes": "Binary data, part contents" }, "throws": [{ "code": 400, "name": "FILE_PARTS_INVALID", "comment": "The number of file parts is invalid." }, { "code": 400, "name": "FILE_PART_EMPTY", "comment": "The provided file part is empty." }, { "code": 400, "name": "FILE_PART_INVALID", "comment": "The file part number is invalid." }, { "code": 400, "name": "FILE_PART_SIZE_CHANGED", "comment": "Provided file part size has changed." }, { "code": 400, "name": "FILE_PART_SIZE_INVALID", "comment": "The provided file part size is invalid." }, { "code": 400, "name": "FILE_PART_TOO_BIG", "comment": "The uploaded file part is too big." }], "available": "both" }, "upload.getWebFile": { "comment": "Returns content of a web file, by proxying the request through telegram, see the webfile docs for more info.\n\nNote: the query must be sent to the DC specified in the webfile_dc_id MTProto configuration field.", "arguments": { "location": "The file to download", "offset": "Number of bytes to be skipped", "limit": "Number of bytes to be returned" }, "throws": [{ "code": 400, "name": "DOCUMENT_INVALID", "comment": "The specified document is invalid." }, { "code": 400, "name": "LOCATION_INVALID", "comment": "The provided location is invalid." }], "available": "user" }, "upload.getCdnFile": { "comment": "Download a CDN file.", "arguments": { "file_token": "File token", "offset": "Offset of chunk to download", "limit": "Length of chunk to download" }, "throws": [{ "code": 400, "name": "FILE_TOKEN_INVALID", "comment": "The master DC did not accept the file_token (e.g., the token has expired). Continue downloading the file from the master DC using upload.getFile." }], "available": "user" }, "upload.reuploadCdnFile": { "comment": "Request a reupload of a certain file to a CDN DC.", "arguments": { "file_token": "File token", "request_token": "Request token" }, "throws": [{ "code": 400, "name": "CDN_METHOD_INVALID", "comment": "You can't call this method in a CDN DC." }, { "code": 500, "name": "CDN_UPLOAD_TIMEOUT", "comment": "A server-side timeout occurred while reuploading the file to the CDN DC." }, { "code": 400, "name": "FILE_TOKEN_INVALID", "comment": "The master DC did not accept the file_token (e.g., the token has expired). Continue downloading the file from the master DC using upload.getFile." }, { "code": 400, "name": "LOCATION_INVALID", "comment": "The provided location is invalid." }, { "code": 400, "name": "REQUEST_TOKEN_INVALID", "comment": "The master DC did not accept the request_token from the CDN DC. Continue downloading the file from the master DC using upload.getFile." }, { "code": 400, "name": "RSA_DECRYPT_FAILED", "comment": "Internal RSA decryption failed." }], "available": "both" }, "upload.getCdnFileHashes": { "comment": "Get SHA256 hashes for verifying downloaded CDN files", "arguments": { "file_token": "File", "offset": "Offset from which to start getting hashes" }, "throws": [{ "code": 400, "name": "CDN_METHOD_INVALID", "comment": "You can't call this method in a CDN DC." }, { "code": 400, "name": "FILE_TOKEN_INVALID", "comment": "The master DC did not accept the file_token (e.g., the token has expired). Continue downloading the file from the master DC using upload.getFile." }, { "code": 400, "name": "RSA_DECRYPT_FAILED", "comment": "Internal RSA decryption failed." }], "available": "both" }, "upload.getFileHashes": { "comment": "Get SHA256 hashes for verifying downloaded files", "arguments": { "location": "File", "offset": "Offset from which to get file hashes" }, "throws": [{ "code": 400, "name": "LOCATION_INVALID", "comment": "The provided location is invalid." }], "available": "both" }, "help.getNearestDc": { "comment": "Returns info on data center nearest to the user.", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "help.getAppUpdate": { "comment": "Returns information on update availability for the current application.", "arguments": { "source": "Source" }, "available": "user" }, "help.getConfig": { "comment": "Returns current configuration, including data center configuration.", "throws": [{ "code": 400, "name": "CONNECTION_API_ID_INVALID", "comment": "The provided API id is invalid." }, { "code": 400, "name": "CONNECTION_APP_VERSION_EMPTY", "comment": "App version is empty." }, { "code": 400, "name": "CONNECTION_LAYER_INVALID", "comment": "Layer invalid." }, { "code": 400, "name": "DATA_INVALID", "comment": "Encrypted data invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "USERNAME_INVALID", "comment": "The provided username is not valid." }, { "code": 403, "name": "USER_PRIVACY_RESTRICTED", "comment": "The user's privacy settings do not allow you to do this." }], "available": "both", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "help.getSupport": { "comment": "Returns the support user for the \"ask a question\" feature.", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "help.getInviteText": { "comment": "Returns localized text of a text message with an invitation.", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "help.getCdnConfig": { "comment": "Get configuration for CDN file downloads.", "available": "both", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "help.getTermsOfServiceUpdate": { "comment": "Look for updates of telegram's terms of service", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "help.getRecentMeUrls": { "comment": "Get recently used t.me links.\n\nWhen installing official applications from \"Download Telegram\" buttons present in t.me pages, a referral parameter is passed to applications after installation.
    \nIf, after downloading the application, the user creates a new account (instead of logging into an existing one), the referral parameter should be imported using this method, which returns the t.me pages the user recently opened, before installing Telegram.", "arguments": { "referer": "Referrer" }, "available": "user" }, "help.acceptTermsOfService": { "comment": "Accept the new terms of service", "arguments": { "id": "ID of terms of service" }, "throws": [{ "code": 400, "name": "DATA_JSON_INVALID", "comment": "The provided JSON data is invalid." }], "available": "user" }, "help.setBotUpdatesStatus": { "comment": "Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only", "arguments": { "pending_updates_count": "Number of pending updates", "message": "Error message, if present" }, "throws": [{ "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, "help.getDeepLinkInfo": { "comment": "Get info about an unsupported deep link, see here for more info ».", "arguments": { "path": "Path component of a tg: link" }, "available": "user" }, "help.saveAppLog": { "comment": "Saves logs of application on the server.", "arguments": { "events": "List of input events" }, "available": "user" }, "help.getAppConfig": { "comment": "Get app-specific configuration, see client configuration for more info on the result.", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "help.getPassportConfig": { "comment": "Get passport configuration", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "help.getPromoData": { "comment": "Get MTProxy/Public Service Announcement information", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "help.hidePromoData": { "comment": "Hide MTProxy/Public Service Announcement information", "arguments": { "peer": "Peer to hide" }, "available": "user" }, "help.getSupportName": { "comment": "Get localized name of the telegram support user", "throws": [{ "code": 403, "name": "USER_INVALID", "comment": "Invalid user provided." }], "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "help.getCountriesList": { "comment": "Get name, ISO code, localized name and phone codes/patterns of all available countries", "arguments": { "lang_code": "Language code of the current user", "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "help.editUserInfo": { "comment": "Internal use", "arguments": { "user_id": "User", "message": "Message", "entities": "Message entities for styled text" }, "throws": [{ "code": 400, "name": "ENTITY_BOUNDS_INVALID", "comment": "A specified entity offset or length is invalid, see here » for info on how to properly compute the entity offset/length." }, { "code": 403, "name": "USER_INVALID", "comment": "Invalid user provided." }], "available": "user" }, "help.getPeerColors": { "comment": "Get the set of accent color palettes » that can be used for message accents.", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "help.getUserInfo": { "comment": "Can only be used by TSF members to obtain internal information.", "arguments": { "user_id": "User ID" }, "throws": [{ "code": 403, "name": "USER_INVALID", "comment": "Invalid user provided." }], "available": "user" }, "help.dismissSuggestion": { "comment": "Dismiss a suggestion, see here for more info ».", "arguments": { "peer": "In the case of pending suggestions in {@link RawChannelFull}, the channel ID.", "suggestion": "Suggestion, see here for more info »." }, "available": "user" }, "help.getTimezonesList": { "comment": "Returns timezone information that may be used elsewhere in the API, such as to set Telegram Business opening hours ».", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "help.getPeerProfileColors": { "comment": "Get the set of accent color palettes » that can be used in profile page backgrounds.", "arguments": { "hash": "Hash used for caching, for more info click here." }, "available": "user" }, "help.getPremiumPromo": { "comment": "Get Telegram Premium promotion information", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "channels.deleteMessages": { "comment": "Delete messages in a channel/supergroup", "arguments": { "channel": "Channel/supergroup", "id": "IDs of messages to delete" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "MESSAGE_DELETE_FORBIDDEN", "comment": "You can't delete one of the messages you tried to delete, most likely because it is a service message." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }], "available": "both" }, "channels.readHistory": { "comment": "Mark channel/supergroup history as read", "arguments": { "channel": "Channel/supergroup", "max_id": "ID of message up to which messages should be marked as read" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }], "available": "user" }, "channels.reportSpam": { "comment": "Reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup", "arguments": { "channel": "Supergroup", "participant": "Participant whose messages should be reported", "id": "IDs of spam messages" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "user" }, "channels.getMessages": { "comment": "Get channel/supergroup messages", "arguments": { "channel": "Channel/supergroup", "id": "IDs of messages to get" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MESSAGE_IDS_EMPTY", "comment": "No message ids were provided." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }], "available": "both" }, "channels.getParticipants": { "comment": "Get the participants of a supergroup/channel", "arguments": { "channel": "Channel", "filter": "Which participant types to fetch", "offset": "Offset", "limit": "Limit", "hash": "Hash" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }], "available": "both" }, "channels.getParticipant": { "comment": "Get info about a channel/supergroup participant", "arguments": { "channel": "Channel/supergroup", "participant": "Participant to get info about" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PARTICIPANT_ID_INVALID", "comment": "The specified participant ID is invalid." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }, { "code": 400, "name": "USER_NOT_PARTICIPANT", "comment": "You're not a member of this supergroup/channel." }], "available": "both" }, "channels.getChannels": { "comment": "Get info about channels/supergroups", "arguments": { "id": "IDs of channels/supergroups to get info about" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }], "available": "both" }, "channels.getFullChannel": { "comment": "Get full info about a supergroup, gigagroup or channel", "arguments": { "channel": "The channel, supergroup or gigagroup to get info about" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHANNEL_PUBLIC_GROUP_NA", "comment": "channel/supergroup not available." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }], "available": "both" }, "channels.editTitle": { "comment": "Edit the name of a channel/supergroup", "arguments": { "channel": "Channel/supergroup", "title": "New name" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "CHAT_TITLE_EMPTY", "comment": "No chat title provided." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }], "available": "both" }, "channels.editAdmin": { "comment": "Modify the admin rights of a user in a supergroup/channel.", "arguments": { "channel": "The supergroup/channel.", "user_id": "The ID of the user whose admin rights should be modified", "admin_rights": "The admin rights", "rank": "Indicates the role (rank) of the admin in the group: just an arbitrary string" }, "throws": [{ "code": 400, "name": "ADMINS_TOO_MUCH", "comment": "There are too many admins." }, { "code": 400, "name": "ADMIN_RANK_EMOJI_NOT_ALLOWED", "comment": "An admin rank cannot contain emojis." }, { "code": 400, "name": "ADMIN_RANK_INVALID", "comment": "The specified admin rank is invalid." }, { "code": 400, "name": "BOTS_TOO_MUCH", "comment": "There are too many bots in this chat/channel." }, { "code": 400, "name": "BOT_CHANNELS_NA", "comment": "Bots can't edit admin privileges." }, { "code": 400, "name": "BOT_GROUPS_BLOCKED", "comment": "This bot can't be added to groups." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_INVITE_REQUIRED", "comment": "You do not have the rights to do this." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 406, "name": "FRESH_CHANGE_ADMINS_FORBIDDEN", "comment": "You were just elected admin, you can't add or modify other admins yet." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 403, "name": "RIGHT_FORBIDDEN", "comment": "Your admin rights do not allow you to do this." }, { "code": 400, "name": "USERS_TOO_MUCH", "comment": "The maximum number of users has been exceeded (to create a chat, for example)." }, { "code": 400, "name": "USER_BLOCKED", "comment": "User blocked." }, { "code": 403, "name": "USER_CHANNELS_TOO_MUCH", "comment": "One of the users you tried to add is already in too many channels/supergroups." }, { "code": 400, "name": "USER_CREATOR", "comment": "For channels.editAdmin: you've tried to edit the admin rights of the owner, but you're not the owner; for channels.leaveChannel: you can't leave this channel, because you're its creator." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }, { "code": 403, "name": "USER_NOT_MUTUAL_CONTACT", "comment": "The provided user is not a mutual contact." }, { "code": 403, "name": "USER_PRIVACY_RESTRICTED", "comment": "The user's privacy settings do not allow you to do this." }, { "code": 403, "name": "USER_RESTRICTED", "comment": "You're spamreported, you can't create channels or chats." }], "available": "both" }, "channels.checkUsername": { "comment": "Check if a username is free and can be assigned to a channel/supergroup", "arguments": { "channel": "The channel/supergroup that will assigned the specified username", "username": "The username to check" }, "throws": [{ "code": 400, "name": "CHANNELS_ADMIN_PUBLIC_TOO_MUCH", "comment": "You're admin of too many public channels, make some channels private to change the username of this channel." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USERNAME_INVALID", "comment": "The provided username is not valid." }, { "code": 400, "name": "USERNAME_OCCUPIED", "comment": "The provided username is already occupied." }, { "code": 400, "name": "USERNAME_PURCHASE_AVAILABLE", "comment": "The specified username can be purchased on https://fragment.com." }], "available": "user" }, "channels.inviteToChannel": { "comment": "Invite users to a channel/supergroup", "arguments": { "channel": "Channel/supergroup", "users": "Users to invite" }, "throws": [{ "code": 400, "name": "BOTS_TOO_MUCH", "comment": "There are too many bots in this chat/channel." }, { "code": 400, "name": "BOT_GROUPS_BLOCKED", "comment": "This bot can't be added to groups." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_INVALID", "comment": "Invalid chat." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "USERS_TOO_MUCH", "comment": "The maximum number of users has been exceeded (to create a chat, for example)." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }, { "code": 400, "name": "USER_BLOCKED", "comment": "User blocked." }, { "code": 400, "name": "USER_BOT", "comment": "Bots can only be admins in channels." }, { "code": 403, "name": "USER_CHANNELS_TOO_MUCH", "comment": "One of the users you tried to add is already in too many channels/supergroups." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }, { "code": 400, "name": "USER_KICKED", "comment": "This user was kicked from this supergroup/channel." }, { "code": 403, "name": "USER_NOT_MUTUAL_CONTACT", "comment": "The provided user is not a mutual contact." }, { "code": 403, "name": "USER_PRIVACY_RESTRICTED", "comment": "The user's privacy settings do not allow you to do this." }], "available": "user" }, "channels.editPhoto": { "comment": "Change the photo of a channel/supergroup", "arguments": { "channel": "Channel/supergroup whose photo should be edited", "photo": "New photo" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "FILE_PARTS_INVALID", "comment": "The number of file parts is invalid." }, { "code": 400, "name": "FILE_REFERENCE_INVALID", "comment": "The specified file reference is invalid." }, { "code": 400, "name": "IMAGE_PROCESS_FAILED", "comment": "Failure while processing image." }, { "code": 400, "name": "PHOTO_CROP_SIZE_SMALL", "comment": "Photo is too small." }, { "code": 400, "name": "PHOTO_EXT_INVALID", "comment": "The extension of the photo is invalid." }, { "code": 400, "name": "PHOTO_INVALID", "comment": "Photo invalid." }, { "code": 400, "name": "STICKER_MIME_INVALID", "comment": "The specified sticker MIME type is invalid." }], "available": "both" }, "channels.updateUsername": { "comment": "Change or remove the username of a supergroup/channel", "arguments": { "channel": "Channel", "username": "New username, pass an empty string to remove the username" }, "throws": [{ "code": 400, "name": "CHANNELS_ADMIN_PUBLIC_TOO_MUCH", "comment": "You're admin of too many public channels, make some channels private to change the username of this channel." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "USERNAME_INVALID", "comment": "The provided username is not valid." }, { "code": 400, "name": "USERNAME_NOT_MODIFIED", "comment": "The username was not modified." }, { "code": 400, "name": "USERNAME_OCCUPIED", "comment": "The provided username is already occupied." }, { "code": 400, "name": "USERNAME_PURCHASE_AVAILABLE", "comment": "The specified username can be purchased on https://fragment.com." }], "available": "user" }, "channels.joinChannel": { "comment": "Join a channel/supergroup", "arguments": { "channel": "Channel/supergroup to join" }, "throws": [{ "code": 400, "name": "CHANNELS_TOO_MUCH", "comment": "You have joined too many channels/supergroups." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_INVALID", "comment": "Invalid chat." }, { "code": 400, "name": "INVITE_HASH_EMPTY", "comment": "The invite hash is empty." }, { "code": 406, "name": "INVITE_HASH_EXPIRED", "comment": "The invite link has expired." }, { "code": 400, "name": "INVITE_HASH_INVALID", "comment": "The invite hash is invalid." }, { "code": 400, "name": "INVITE_REQUEST_SENT", "comment": "You have successfully requested to join this chat or channel." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USERS_TOO_MUCH", "comment": "The maximum number of users has been exceeded (to create a chat, for example)." }, { "code": 400, "name": "USER_ALREADY_PARTICIPANT", "comment": "The user is already in the group." }, { "code": 400, "name": "USER_CHANNELS_TOO_MUCH", "comment": "One of the users you tried to add is already in too many channels/supergroups." }], "available": "user" }, "channels.leaveChannel": { "comment": "Leave a channel/supergroup", "arguments": { "channel": "Channel/supergroup to leave" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHANNEL_PUBLIC_GROUP_NA", "comment": "channel/supergroup not available." }, { "code": 400, "name": "CHAT_INVALID", "comment": "Invalid chat." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "comment": "You're banned from sending messages in supergroups/channels." }, { "code": 400, "name": "USER_CREATOR", "comment": "For channels.editAdmin: you've tried to edit the admin rights of the owner, but you're not the owner; for channels.leaveChannel: you can't leave this channel, because you're its creator." }, { "code": 400, "name": "USER_NOT_PARTICIPANT", "comment": "You're not a member of this supergroup/channel." }], "available": "both" }, "channels.createChannel": { "comment": "Create a supergroup/channel.", "arguments": { "flags": "Flags, see TL conditional fields", "broadcast": "Whether to create a channel", "megagroup": "Whether to create a supergroup", "for_import": "Whether the supergroup is being created to import messages from a foreign chat service using {@link messages.RawInitHistoryImportRequest}", "forum": "Whether to create a forum", "title": "Channel title", "about": "Channel description", "geo_point": "Geogroup location, see here » for more info on geogroups.", "address": "Geogroup address, see here » for more info on geogroups.", "ttl_period": "Time-to-live of all messages that will be sent in the supergroup: once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. You can use {@link messages.RawSetDefaultHistoryTTLRequest} to edit this value later." }, "throws": [{ "code": 400, "name": "ADDRESS_INVALID", "comment": "The specified geopoint address is invalid." }, { "code": 400, "name": "CHANNELS_ADMIN_LOCATED_TOO_MUCH", "comment": "The user has reached the limit of public geogroups." }, { "code": 400, "name": "CHANNELS_TOO_MUCH", "comment": "You have joined too many channels/supergroups." }, { "code": 400, "name": "CHAT_ABOUT_TOO_LONG", "comment": "Chat about too long." }, { "code": 500, "name": "CHAT_INVALID", "comment": "Invalid chat." }, { "code": 400, "name": "CHAT_TITLE_EMPTY", "comment": "No chat title provided." }, { "code": 400, "name": "TTL_PERIOD_INVALID", "comment": "The specified TTL period is invalid." }, { "code": 406, "name": "USER_RESTRICTED", "comment": "You're spamreported, you can't create channels or chats." }], "available": "user" }, "channels.exportMessageLink": { "comment": "Get link and embed info of a message in a channel/supergroup", "arguments": { "flags": "Flags, see TL conditional fields", "grouped": "Whether to include other grouped media (for albums)", "thread": "Whether to also include a thread ID, if available, inside of the link", "channel": "Channel", "id": "Message ID" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }], "available": "user" }, "channels.deleteChannel": { "comment": "Delete a channel/supergroup", "arguments": { "channel": "Channel/supergroup to delete" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 406, "name": "CHANNEL_TOO_LARGE", "comment": "Channel is too large to be deleted; this error is issued when trying to delete channels with more than 1000 members (subject to change)." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }], "available": "user" }, "channels.toggleSignatures": { "comment": "Enable/disable message signatures in channels", "arguments": { "channel": "Channel", "enabled": "Value" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }], "available": "user" }, "channels.getAdminedPublicChannels": { "comment": "Get channels/supergroups/geogroups we're admin in. Usually called when the user exceeds the {@link RawConfig} for owned public channels/supergroups/geogroups, and the user is given the choice to remove one of their channels/supergroups/geogroups.", "arguments": { "flags": "Flags, see TL conditional fields", "by_location": "Get geogroups", "check_limit": "If set and the user has reached the limit of owned public channels/supergroups/geogroups, instead of returning the channel list one of the specified errors will be returned.
    Useful to check if a new public channel can indeed be created, even before asking the user to enter a channel username to use in {@link channels.RawCheckUsernameRequest}/{@link channels.RawUpdateUsernameRequest}.", "for_personal": "Set this flag to only fetch the full list of channels that may be passed to {@link account.RawUpdatePersonalChannelRequest} to display them on our profile page." }, "throws": [{ "code": 400, "name": "CHANNELS_ADMIN_LOCATED_TOO_MUCH", "comment": "The user has reached the limit of public geogroups." }, { "code": 400, "name": "CHANNELS_ADMIN_PUBLIC_TOO_MUCH", "comment": "You're admin of too many public channels, make some channels private to change the username of this channel." }], "available": "user" }, "channels.getAdminLog": { "comment": "Get the admin log of a channel/supergroup", "arguments": { "flags": "Flags, see TL conditional fields", "channel": "Channel", "q": "Search query, can be empty", "events_filter": "Event filter", "admins": "Only show events from these admins", "max_id": "Maximum ID of message to return (see pagination)", "min_id": "Minimum ID of message to return (see pagination)", "limit": "Maximum number of results to return, see pagination" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }], "available": "user" }, "channels.editBanned": { "comment": "Ban/unban/kick a user in a supergroup/channel.", "arguments": { "channel": "The supergroup/channel.", "participant": "Participant to ban", "banned_rights": "The banned rights" }, "throws": [{ "code": 406, "name": "BANNED_RIGHTS_INVALID", "comment": "You provided some invalid flags in the banned rights." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PARTICIPANT_ID_INVALID", "comment": "The specified participant ID is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USER_ADMIN_INVALID", "comment": "You're not an admin." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "both" }, "channels.readMessageContents": { "comment": "Mark channel/supergroup message contents as read", "arguments": { "channel": "Channel/supergroup", "id": "IDs of messages whose contents should be marked as read" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 406, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }], "available": "user" }, "channels.deleteHistory": { "comment": "Delete the history of a supergroup", "arguments": { "flags": "Flags, see TL conditional fields", "for_everyone": "Whether the history should be deleted for everyone", "channel": "Supergroup whose history must be deleted", "max_id": "ID of message up to which the history must be deleted" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PARICIPANT_MISSING", "comment": "The current user is not in the channel." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHANNEL_TOO_BIG", "comment": "This channel has too many participants (>1000) to be deleted." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }], "available": "user" }, "channels.setStickers": { "comment": "Associate a stickerset to the supergroup", "arguments": { "channel": "Supergroup", "stickerset": "The stickerset to associate" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "PARTICIPANTS_TOO_FEW", "comment": "Not enough participants." }, { "code": 406, "name": "STICKERSET_OWNER_ANONYMOUS", "comment": "Provided stickerset can't be installed as group stickerset to prevent admin deanonymization." }], "available": "both" }, "channels.togglePreHistoryHidden": { "comment": "Hide/unhide message history for new channel/supergroup users", "arguments": { "channel": "Channel/supergroup", "enabled": "Hide/unhide" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_LINK_EXISTS", "comment": "The chat is public, you can't hide the history to new users." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "FORUM_ENABLED", "comment": "You can't execute the specified action because the group is a forum, disable forum functionality to continue." }], "available": "user" }, "channels.getGroupsForDiscussion": { "comment": "Get all groups that can be used as discussion groups.\n\nReturned basic group chats must be first upgraded to supergroups before they can be set as a discussion group.
    \nTo set a returned supergroup as a discussion group, access to its old messages must be enabled using {@link channels.RawTogglePreHistoryHiddenRequest}, first.", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "channels.getLeftChannels": { "comment": "Get a list of channels/supergroups we left, requires a takeout session, see here » for more info.", "arguments": { "offset": "Offset for pagination" }, "throws": [{ "code": 403, "name": "TAKEOUT_REQUIRED", "comment": "A takeout session needs to be initialized first, see here » for more info." }], "available": "user" }, "channels.editLocation": { "comment": "Edit location of geo group, see here » for more info on geogroups.", "arguments": { "channel": "Geogroup", "geo_point": "New geolocation", "address": "Address string" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "MEGAGROUP_GEO_REQUIRED", "comment": "This method can only be invoked on a geogroup." }, { "code": 400, "name": "MEGAGROUP_REQUIRED", "comment": "You can only use this method on a supergroup." }], "available": "user" }, "channels.setDiscussionGroup": { "comment": "Associate a group to a channel as discussion group for that channel", "arguments": { "broadcast": "Channel", "group": "Discussion group to associate to the channel" }, "throws": [{ "code": 400, "name": "BROADCAST_ID_INVALID", "comment": "Broadcast ID invalid." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "LINK_NOT_MODIFIED", "comment": "Discussion link not modified." }, { "code": 400, "name": "MEGAGROUP_ID_INVALID", "comment": "Invalid supergroup ID." }, { "code": 400, "name": "MEGAGROUP_PREHISTORY_HIDDEN", "comment": "Group with hidden history for new members can't be set as discussion groups." }], "available": "user" }, "channels.getInactiveChannels": { "comment": "Get inactive channels and supergroups", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "channels.editCreator": { "comment": "Transfer channel ownership", "arguments": { "channel": "Channel", "user_id": "New channel owner", "password": "2FA password of account" }, "throws": [{ "code": 400, "name": "CHANNELS_ADMIN_PUBLIC_TOO_MUCH", "comment": "You're admin of too many public channels, make some channels private to change the username of this channel." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "PASSWORD_HASH_INVALID", "comment": "The provided password hash is invalid." }, { "code": 400, "name": "PASSWORD_MISSING", "comment": "You must enable 2FA before executing this operation." }, { "code": 400, "name": "PASSWORD_TOO_FRESH_%d", "comment": "The password was modified less than 24 hours ago, try again in %d seconds." }, { "code": 400, "name": "SESSION_TOO_FRESH_%d", "comment": "This session was created less than 24 hours ago, try again in %d seconds." }, { "code": 400, "name": "SRP_ID_INVALID", "comment": "Invalid SRP ID provided." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "user" }, "channels.convertToGigagroup": { "comment": "Convert a supergroup to a gigagroup, when requested by channel suggestions.", "arguments": { "channel": "The supergroup to convert" }, "throws": [{ "code": 400, "name": "CHANNEL_ID_INVALID", "comment": "The specified supergroup ID is invalid." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "FORUM_ENABLED", "comment": "You can't execute the specified action because the group is a forum, disable forum functionality to continue." }, { "code": 400, "name": "PARTICIPANTS_TOO_FEW", "comment": "Not enough participants." }], "available": "user" }, "channels.toggleSlowMode": { "comment": "Toggle supergroup slow mode: if enabled, users will only be able to send one message every seconds seconds", "arguments": { "channel": "The supergroup", "seconds": "Users will only be able to send one message every seconds seconds, 0 to disable the limitation" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "SECONDS_INVALID", "comment": "Invalid duration provided." }], "available": "user" }, "channels.viewSponsoredMessage": { "comment": "Mark a specific sponsored message as read", "arguments": { "channel": "Peer", "random_id": "Message ID" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }], "available": "user" }, "channels.getSponsoredMessages": { "comment": "Get a list of sponsored messages", "arguments": { "channel": "Peer" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }], "available": "user" }, "channels.deleteParticipantHistory": { "comment": "Delete all messages sent by a specific participant of a given supergroup", "arguments": { "channel": "Supergroup", "participant": "The participant whose messages should be deleted" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PARTICIPANT_ID_INVALID", "comment": "The specified participant ID is invalid." }], "available": "user" }, "channels.getSendAs": { "comment": "Obtains a list of peers that can be used to send messages in a specific group", "arguments": { "peer": "The group where we intend to send messages" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "channels.deactivateAllUsernames": { "comment": "Disable all purchased usernames of a supergroup or channel", "arguments": { "channel": "Supergroup or channel" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }], "available": "user" }, "channels.toggleForum": { "comment": "Enable or disable forum functionality in a supergroup.", "arguments": { "channel": "Supergroup ID", "enabled": "Enable or disable forum functionality" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_DISCUSSION_UNALLOWED", "comment": "You can't enable forum topics in a discussion group linked to a channel." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }], "available": "user" }, "channels.toggleJoinToSend": { "comment": "Set whether all users should join a discussion group in order to comment on a post »", "arguments": { "channel": "Discussion group", "enabled": "Toggle" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }], "available": "user" }, "channels.createForumTopic": { "comment": "Create a forum topic; requires manage_topics rights.", "arguments": { "flags": "Flags, see TL conditional fields", "channel": "The forum", "title": "Topic title (maximum UTF-8 length: 128)", "icon_color": "If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F.", "icon_emoji_id": "ID of the custom emoji used as topic icon. Telegram Premium users can use any custom emoji, other users can only use the custom emojis contained in the {@link RawInputStickerSetEmojiDefaultTopicIcons} emoji pack.", "random_id": "Unique client message ID to prevent duplicate sending of the same event", "send_as": "Create the topic as the specified peer" }, "throws": [{ "code": 400, "name": "CHANNEL_FORUM_MISSING", "comment": "This supergroup is not a forum." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "comment": "You can't write in this chat." }, { "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }, { "code": 400, "name": "TOPIC_TITLE_EMPTY", "comment": "The specified topic title is empty." }], "available": "both" }, "channels.toggleJoinRequest": { "comment": "Set whether all users should request admin approval to join the group ».", "arguments": { "channel": "Group", "enabled": "Toggle" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "CHAT_PUBLIC_REQUIRED", "comment": "You can only enable join requests in public groups." }], "available": "user" }, "channels.reorderUsernames": { "comment": "Reorder active usernames", "arguments": { "channel": "The supergroup or channel", "order": "The new order for active usernames. All active usernames must be specified." }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }], "available": "user" }, "channels.getForumTopicsByID": { "comment": "Get forum topics by their ID", "arguments": { "channel": "Forum", "topics": "Topic IDs" }, "throws": [{ "code": 400, "name": "CHANNEL_FORUM_MISSING", "comment": "This supergroup is not a forum." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "TOPICS_EMPTY", "comment": "You specified no topic IDs." }], "available": "user" }, "channels.editForumTopic": { "comment": "Edit forum topic; requires manage_topics rights.", "arguments": { "flags": "Flags, see TL conditional fields", "channel": "Supergroup", "topic_id": "Topic ID", "title": "If present, will update the topic title (maximum UTF-8 length: 128).", "icon_emoji_id": "If present, updates the custom emoji used as topic icon. Telegram Premium users can use any custom emoji, other users can only use the custom emojis contained in the {@link RawInputStickerSetEmojiDefaultTopicIcons} emoji pack. Pass 0 to switch to the fallback topic icon.", "closed": "If present, will update the open/closed status of the topic.", "hidden": "If present, will hide/unhide the topic (only valid for the \"General\" topic, id=1)." }, "throws": [{ "code": 400, "name": "CHANNEL_FORUM_MISSING", "comment": "This supergroup is not a forum." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "DOCUMENT_INVALID", "comment": "The specified document is invalid." }, { "code": 400, "name": "GENERAL_MODIFY_ICON_FORBIDDEN", "comment": "You can't modify the icon of the \"General\" topic." }, { "code": 400, "name": "TOPIC_CLOSE_SEPARATELY", "comment": "The close flag cannot be provided together with any of the other flags." }, { "code": 400, "name": "TOPIC_HIDE_SEPARATELY", "comment": "The hide flag cannot be provided together with any of the other flags." }, { "code": 400, "name": "TOPIC_ID_INVALID", "comment": "The specified topic ID is invalid." }, { "code": 400, "name": "TOPIC_NOT_MODIFIED", "comment": "The updated topic info is equal to the current topic info, nothing was changed." }], "available": "both" }, "channels.getForumTopics": { "comment": "Get topics of a forum", "arguments": { "flags": "Flags, see TL conditional fields", "channel": "Supergroup", "q": "Search query", "offset_date": "Offsets for pagination, for more info click here, date of the last message of the last found topic. Use 0 or any date in the future to get results from the last topic.", "offset_id": "Offsets for pagination, for more info click here, ID of the last message of the last found topic (or initially 0).", "offset_topic": "Offsets for pagination, for more info click here, ID of the last found topic (or initially 0).", "limit": "Maximum number of results to return, see pagination. For optimal performance, the number of returned topics is chosen by the server and can be smaller than the specified limit." }, "throws": [{ "code": 400, "name": "CHANNEL_FORUM_MISSING", "comment": "This supergroup is not a forum." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }], "available": "user" }, "channels.toggleUsername": { "comment": "Activate or deactivate a purchased fragment.com username associated to a supergroup or channel we own.", "arguments": { "channel": "Supergroup or channel", "username": "Username", "active": "Whether to activate or deactivate the username" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "USERNAMES_ACTIVE_TOO_MUCH", "comment": "The maximum number of active usernames was reached." }, { "code": 400, "name": "USERNAME_INVALID", "comment": "The provided username is not valid." }, { "code": 400, "name": "USERNAME_NOT_MODIFIED", "comment": "The username was not modified." }], "available": "user" }, "channels.updatePinnedForumTopic": { "comment": "Pin or unpin forum topics", "arguments": { "channel": "Supergroup ID", "topic_id": "Forum topic ID", "pinned": "Whether to pin or unpin the topic" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "TOPIC_ID_INVALID", "comment": "The specified topic ID is invalid." }], "available": "user" }, "channels.deleteTopicHistory": { "comment": "Delete message history of a forum topic", "arguments": { "channel": "Forum", "top_msg_id": "Topic ID" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "TOPIC_ID_INVALID", "comment": "The specified topic ID is invalid." }], "available": "both" }, "channels.reorderPinnedForumTopics": { "comment": "Reorder pinned forum topics", "arguments": { "flags": "Flags, see TL conditional fields", "force": "If not set, the order of only the topics present both server-side and in order will be changed (i.e. mentioning topics not pinned server-side in order will not pin them, and not mentioning topics pinned server-side will not unpin them).
    If set, the entire server-side pinned topic list will be replaced with order (i.e. mentioning topics not pinned server-side in order will pin them, and not mentioning topics pinned server-side will unpin them)", "channel": "Supergroup ID", "order": "Topic IDs »" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }], "available": "user" }, "channels.reportAntiSpamFalsePositive": { "comment": "Report a native antispam false positive", "arguments": { "channel": "Supergroup ID", "msg_id": "Message ID that was mistakenly deleted by the native antispam system, taken from the admin log" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }], "available": "user" }, "channels.toggleAntiSpam": { "comment": "Enable or disable the native antispam system.", "arguments": { "channel": "Supergroup ID. The specified supergroup must have at least telegram_antispam_group_size_min members to enable antispam functionality, as specified by the client configuration parameters.", "enabled": "Enable or disable the native antispam system." }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }], "available": "user" }, "channels.toggleParticipantsHidden": { "comment": "Hide or display the participants list in a supergroup.\n\nThe supergroup must have at least hidden_members_group_size_min participants in order to use this method, as specified by the client configuration parameters ».", "arguments": { "channel": "Supergroup ID", "enabled": "If true, will hide the participants list; otherwise will unhide it." }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "CHAT_NOT_MODIFIED", "comment": "No changes were made to chat information because the new information you passed is identical to the current information." }, { "code": 400, "name": "PARTICIPANTS_TOO_FEW", "comment": "Not enough participants." }], "available": "user" }, "channels.toggleViewForumAsMessages": { "comment": "Users may also choose to display messages from all topics of a forum as if they were sent to a normal group, using a \"View as messages\" setting in the local client: this setting only affects the current account, and is synced to other logged in sessions using this method.\n\nInvoking this method will update the value of the view_forum_as_messages flag of {@link RawChannelFull} or {@link RawDialog} and emit an {@link RawUpdateChannelViewForumAsMessages}.", "arguments": { "channel": "The forum", "enabled": "The new value of the view_forum_as_messages flag." }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }], "available": "user" }, "channels.updateColor": { "comment": "Update the accent color and background custom emoji » of a channel.", "arguments": { "flags": "Flags, see TL conditional fields", "for_profile": "Whether to change the accent color emoji pattern of the profile page; otherwise, the accent color and emoji pattern of messages will be changed.
    Channels can change both message and profile palettes; supergroups can only change the profile palette, of course after reaching the appropriate boost level.", "channel": "Channel whose accent color should be changed.", "color": "ID of the accent color palette » to use (not RGB24, see here » for more info); if not set, the default palette is used.", "background_emoji_id": "Custom emoji ID used in the accent color pattern." }, "throws": [{ "code": 400, "name": "BOOSTS_REQUIRED", "comment": "The specified channel must first be boosted by its users in order to perform this action." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }], "available": "user" }, "channels.getChannelRecommendations": { "comment": "Obtain a list of similarly themed public channels, selected based on similarities in their subscriber bases.", "arguments": { "flags": "Flags, see TL conditional fields", "channel": "The method will return channels related to the passed channel. If not set, the method will returns channels related to channels the user has joined." }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }], "available": "user" }, "channels.setBoostsToUnblockRestrictions": { "comment": "Admins with {@link RawChatAdminRights} may allow users that apply a certain number of booosts » to the group to bypass {@link channels.RawToggleSlowModeRequest} and other » supergroup restrictions, see here » for more info.", "arguments": { "channel": "The supergroup.", "boosts": "The number of required boosts (1-8, 0 to disable)." }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }], "available": "user" }, "channels.setEmojiStickers": { "comment": "Set a custom emoji stickerset for supergroups. Only usable after reaching at least the boost level » specified in the group_emoji_stickers_level_min » config parameter.", "arguments": { "channel": "The supergroup", "stickerset": "The custom emoji stickerset to associate to the supergroup" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }], "available": "user" }, "channels.reportSponsoredMessage": { "comment": "Report a sponsored message », see here » for more info on the full flow.", "arguments": { "channel": "The channel where the sponsored message can be seen.", "random_id": "ID of the sponsored message.", "option": "Chosen report option, initially an empty string, see here » for more info on the full flow." }, "throws": [{ "code": 400, "name": "AD_EXPIRED", "comment": "The ad has expired (too old or not found)." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }], "available": "user" }, "bots.answerWebhookJSONQuery": { "comment": "Answers a custom query; for bots only", "arguments": { "query_id": "Identifier of a custom query", "data": "JSON-serialized answer to the query" }, "throws": [{ "code": 400, "name": "DATA_JSON_INVALID", "comment": "The provided JSON data is invalid." }, { "code": 400, "name": "QUERY_ID_INVALID", "comment": "The query ID is invalid." }, { "code": 403, "name": "USER_BOT_INVALID", "comment": "User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, "channels.searchPosts": { "comment": "Globally search for posts from public channels » (including those we aren't a member of) containing a specific hashtag.", "arguments": { "hashtag": "The hashtag to search, without the # character.", "offset_rate": "Initially 0, then set to the {@link messages.RawMessagesSlice}", "offset_peer": "Offsets for pagination, for more info click here", "offset_id": "Offsets for pagination, for more info click here", "limit": "Maximum number of results to return, see pagination" }, "available": "user" }, "bots.resetBotCommands": { "comment": "Clear bot commands for the specified bot scope and language code", "arguments": { "scope": "Command scope", "lang_code": "Language code" }, "throws": [{ "code": 400, "name": "LANG_CODE_INVALID", "comment": "The specified language code is invalid." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, "bots.sendCustomRequest": { "comment": "Sends a custom request; for bots only", "arguments": { "custom_method": "The method name", "params": "JSON-serialized method parameters" }, "throws": [{ "code": 400, "name": "DATA_JSON_INVALID", "comment": "The provided JSON data is invalid." }, { "code": 400, "name": "METHOD_INVALID", "comment": "The specified method is invalid." }, { "code": 403, "name": "USER_BOT_INVALID", "comment": "User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, "bots.getBotCommands": { "comment": "Obtain a list of bot commands for the specified bot scope and language code", "arguments": { "scope": "Command scope", "lang_code": "Language code" }, "throws": [{ "code": 400, "name": "USER_BOT_INVALID", "comment": "User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, "bots.setBotCommands": { "comment": "Set bot command list", "arguments": { "scope": "Command scope", "lang_code": "Language code", "commands": "Bot commands" }, "throws": [{ "code": 400, "name": "BOT_COMMAND_DESCRIPTION_INVALID", "comment": "The specified command description is invalid." }, { "code": 400, "name": "BOT_COMMAND_INVALID", "comment": "The specified command is invalid." }, { "code": 400, "name": "LANG_CODE_INVALID", "comment": "The specified language code is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "bot" }, "channels.restrictSponsoredMessages": { "comment": "Disable ads on the specified channel, for all users.\n\nAvailable only after reaching at least the boost level » specified in the channel_restrict_sponsored_level_min » config parameter.", "arguments": { "channel": "The channel.", "restricted": "Whether to disable or re-enable ads." }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }], "available": "user" }, "bots.setBotMenuButton": { "comment": "Sets the menu button action » for a given user or for all users", "arguments": { "user_id": "User ID", "button": "Bot menu button action" }, "throws": [{ "code": 400, "name": "BUTTON_TEXT_INVALID", "comment": "The specified button text is invalid." }, { "code": 400, "name": "BUTTON_URL_INVALID", "comment": "Button URL invalid." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, "channels.clickSponsoredMessage": { "comment": "Informs the server that the user has either:", "arguments": { "channel": "Channel where the sponsored message was posted", "random_id": "Message ID" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }], "available": "user" }, "bots.setBotGroupDefaultAdminRights": { "comment": "Set the default suggested admin rights for bots being added as admins to groups, see here for more info on how to handle them ».", "arguments": { "admin_rights": "Admin rights" }, "throws": [{ "code": 400, "name": "RIGHTS_NOT_MODIFIED", "comment": "The new admin rights are equal to the old rights, no change was made." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, "bots.getBotMenuButton": { "comment": "Gets the menu button action for a given user or for all users, previously set using {@link bots.RawSetBotMenuButtonRequest}; users can see this information in the {@link RawBotInfo} constructor.", "arguments": { "user_id": "User ID or empty for the default menu button." }, "throws": [{ "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, "channels.updateEmojiStatus": { "comment": "Set an emoji status for a channel or supergroup.", "arguments": { "channel": "The channel/supergroup, must have at least channel_emoji_status_level_min/group_emoji_status_level_min boosts.", "emoji_status": "Emoji status to set" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }], "available": "user" }, "bots.setBotInfo": { "comment": "Set localized name, about text and description of a bot (or of the current account, if called by a bot).", "arguments": { "flags": "Flags, see TL conditional fields", "bot": "If called by a user, must contain the peer of a bot we own.", "lang_code": "Language code, if left empty update the fallback about text and description", "name": "New bot name", "about": "New about text", "description": "New description" }, "throws": [{ "code": 400, "name": "USER_BOT_INVALID", "comment": "User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts." }], "available": "both" }, "bots.setBotBroadcastDefaultAdminRights": { "comment": "Set the default suggested admin rights for bots being added as admins to channels, see here for more info on how to handle them ».", "arguments": { "admin_rights": "Admin rights" }, "throws": [{ "code": 400, "name": "RIGHTS_NOT_MODIFIED", "comment": "The new admin rights are equal to the old rights, no change was made." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }], "available": "bot" }, "bots.getBotInfo": { "comment": "Get localized name, about text and description of a bot (or of the current account, if called by a bot).", "arguments": { "flags": "Flags, see TL conditional fields", "bot": "If called by a user, must contain the peer of a bot we own.", "lang_code": "Language code, if left empty this method will return the fallback about text and description." }, "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }, { "code": 400, "name": "LANG_CODE_INVALID", "comment": "The specified language code is invalid." }, { "code": 400, "name": "USER_BOT_INVALID", "comment": "User accounts must provide the bot method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts." }], "available": "both" }, "bots.toggleUsername": { "comment": "Activate or deactivate a purchased fragment.com username associated to a bot we own.", "arguments": { "bot": "The bot", "username": "Username", "active": "Whether to activate or deactivate it" }, "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }, { "code": 400, "name": "USERNAME_NOT_MODIFIED", "comment": "The username was not modified." }], "available": "user" }, "bots.reorderUsernames": { "comment": "Reorder usernames associated to a bot we own.", "arguments": { "bot": "The bot", "order": "The new order for active usernames. All active usernames must be specified." }, "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }, { "code": 400, "name": "USERNAME_NOT_MODIFIED", "comment": "The username was not modified." }], "available": "user" }, "bots.canSendMessage": { "comment": "Check whether the specified bot can send us messages", "arguments": { "bot": "The bot" }, "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }], "available": "user" }, "bots.getPopularAppBots": { "comment": "Fetch popular Main Mini Apps, to be used in the apps tab of global search ».", "arguments": { "offset": "Offset for pagination, initially an empty string, then re-use the next_offset returned by the previous query.", "limit": "Maximum number of results to return, see pagination" }, "available": "user" }, "bots.allowSendMessage": { "comment": "Allow the specified bot to send us messages", "arguments": { "bot": "The bot" }, "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }], "available": "user" }, "bots.addPreviewMedia": { "comment": "Add a main mini app preview, see here » for more info.\n\nOnly owners of bots with a configured Main Mini App can use this method, see see here » for more info on how to check if you can invoke this method.", "arguments": { "bot": "The bot that owns the Main Mini App.", "lang_code": "ISO 639-1 language code, indicating the localization of the preview to add.", "media": "The photo/video preview, uploaded using {@link messages.RawUploadMediaRequest}." }, "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }], "available": "user" }, "bots.editPreviewMedia": { "comment": "Edit a main mini app preview, see here » for more info.\n\nOnly owners of bots with a configured Main Mini App can use this method, see see here » for more info on how to check if you can invoke this method.", "arguments": { "bot": "The bot that owns the Main Mini App.", "lang_code": "ISO 639-1 language code, indicating the localization of the preview to edit.", "media": "The photo/video preview to replace, previously fetched as specified here ».", "new_media": "The new photo/video preview, uploaded using {@link messages.RawUploadMediaRequest}." }, "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }], "available": "user" }, "bots.invokeWebViewCustomMethod": { "comment": "Send a custom request from a mini bot app, triggered by a web_app_invoke_custom_method event ».\n\nThe response should be sent using a custom_method_invoked event, see here » for more info on the flow.", "arguments": { "bot": "Identifier of the bot associated to the mini bot app", "custom_method": "Identifier of the custom method to invoke", "params": "Method parameters" }, "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }, { "code": 400, "name": "DATA_JSON_INVALID", "comment": "The provided JSON data is invalid." }], "available": "user" }, "bots.reorderPreviewMedias": { "comment": "Reorder a main mini app previews, see here » for more info.\n\nOnly owners of bots with a configured Main Mini App can use this method, see see here » for more info on how to check if you can invoke this method.", "arguments": { "bot": "The bot that owns the Main Mini App.", "lang_code": "ISO 639-1 language code, indicating the localization of the previews to reorder.", "order": "New order of the previews." }, "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }], "available": "user" }, "bots.getPreviewMedias": { "comment": "Fetch main mini app previews, see here » for more info.", "arguments": { "bot": "The bot that owns the Main Mini App." }, "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }], "available": "user" }, "bots.deletePreviewMedia": { "comment": "Delete a main mini app preview, see here » for more info.\n\nOnly owners of bots with a configured Main Mini App can use this method, see see here » for more info on how to check if you can invoke this method.", "arguments": { "bot": "The bot that owns the Main Mini App.", "lang_code": "ISO 639-1 language code, indicating the localization of the preview to delete.", "media": "The photo/video preview to delete, previously fetched as specified here »." }, "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }], "available": "user" }, "payments.getPaymentForm": { "comment": "Get a payment form", "arguments": { "flags": "Flags, see TL conditional fields", "invoice": "Invoice", "theme_params": "A JSON object with the following keys, containing color theme information (integers, RGB24) to pass to the payment provider, to apply in eventual verification pages:
    bg_color - Background color
    text_color - Text color
    hint_color - Hint text color
    link_color - Link color
    button_color - Button color
    button_text_color - Button text color" }, "throws": [{ "code": 400, "name": "BOOST_PEER_INVALID", "comment": "The specified boost_peer is invalid." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "SLUG_INVALID", "comment": "The specified invoice slug is invalid." }, { "code": 400, "name": "UNTIL_DATE_INVALID", "comment": "Invalid until date provided." }], "available": "user" }, "payments.validateRequestedInfo": { "comment": "Submit requested order information for validation", "arguments": { "flags": "Flags, see TL conditional fields", "save": "Save order information to re-use it for future orders", "invoice": "Invoice", "info": "Requested order information" }, "throws": [{ "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "payments.sendPaymentForm": { "comment": "Send compiled payment form", "arguments": { "flags": "Flags, see TL conditional fields", "form_id": "Form ID", "invoice": "Invoice", "requested_info_id": "ID of saved and validated {@link payments.RawValidatedRequestedInfo}", "shipping_option_id": "Chosen shipping option ID", "credentials": "Payment credentials", "tip_amount": "Tip, in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies)." }, "throws": [{ "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "payments.clearSavedInfo": { "comment": "Clear saved payment information", "arguments": { "flags": "Flags, see TL conditional fields", "credentials": "Remove saved payment credentials", "info": "Clear the last order settings saved by the user" }, "available": "user" }, "payments.getBankCardData": { "comment": "Get info about a credit card", "arguments": { "number": "Credit card number" }, "throws": [{ "code": 400, "name": "BANK_CARD_NUMBER_INVALID", "comment": "The specified card number is invalid." }], "available": "user" }, "payments.getPaymentReceipt": { "comment": "Get payment receipt", "arguments": { "peer": "The peer where the payment receipt was sent", "msg_id": "Message ID of receipt" }, "throws": [{ "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }], "available": "user" }, "payments.exportInvoice": { "comment": "Generate an invoice deep link", "arguments": { "invoice_media": "Invoice" }, "throws": [{ "code": 400, "name": "CURRENCY_TOTAL_AMOUNT_INVALID", "comment": "The total amount of all prices is invalid." }, { "code": 400, "name": "INVOICE_PAYLOAD_INVALID", "comment": "The specified invoice payload is invalid." }, { "code": 400, "name": "MEDIA_INVALID", "comment": "Media invalid." }, { "code": 400, "name": "PAYMENT_PROVIDER_INVALID", "comment": "The specified payment provider is invalid." }], "available": "both" }, "payments.getSavedInfo": { "comment": "Get saved payment information", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "payments.assignAppStoreTransaction": { "comment": "Informs server about a purchase made through the App Store: for official applications only.", "arguments": { "receipt": "Receipt", "purpose": "Payment purpose" }, "throws": [{ "code": 400, "name": "RECEIPT_EMPTY", "comment": "The specified receipt is empty." }], "available": "user" }, "payments.assignPlayMarketTransaction": { "comment": "Informs server about a purchase made through the Play Store: for official applications only.", "arguments": { "receipt": "Receipt", "purpose": "Payment purpose" }, "throws": [{ "code": 400, "name": "DATA_JSON_INVALID", "comment": "The provided JSON data is invalid." }], "available": "user" }, "payments.canPurchasePremium": { "comment": "Checks whether Telegram Premium purchase is possible. Must be called before in-store Premium purchase, official apps only.", "arguments": { "purpose": "Payment purpose" }, "throws": [{ "code": 406, "name": "PREMIUM_CURRENTLY_UNAVAILABLE", "comment": "You cannot currently purchase a Premium subscription." }], "available": "user" }, "bots.getPreviewInfo": { "comment": "Bot owners only, fetch main mini app preview information, see here » for more info.\n\nNote: technically non-owners may also invoke this method, but it will always behave exactly as {@link bots.RawGetPreviewMediasRequest}, returning only previews for the current language and an empty lang_codes array, regardless of the passed lang_code, so please only use {@link bots.RawGetPreviewMediasRequest} if you're not the owner of the bot.", "arguments": { "bot": "The bot that owns the Main Mini App.", "lang_code": "Fetch previews for the specified ISO 639-1 language code." }, "throws": [{ "code": 400, "name": "BOT_INVALID", "comment": "This is not a valid bot." }], "available": "user" }, "payments.getPremiumGiftCodeOptions": { "comment": "Obtain a list of Telegram Premium giveaway/gift code » options.", "arguments": { "flags": "Flags, see TL conditional fields", "boost_peer": "The channel that will start the giveaway" }, "available": "user" }, "payments.applyGiftCode": { "comment": "Apply a Telegram Premium giftcode »", "arguments": { "slug": "The code to apply" }, "throws": [{ "code": 400, "name": "GIFT_SLUG_EXPIRED", "comment": "The specified gift slug has expired." }, { "code": 400, "name": "GIFT_SLUG_INVALID", "comment": "The specified slug is invalid." }, { "code": 420, "name": "PREMIUM_SUB_ACTIVE_UNTIL_%d", "comment": "You already have a premium subscription active until unixtime %d ." }], "available": "user" }, "payments.getGiveawayInfo": { "comment": "Obtain information about a Telegram Premium giveaway ».", "arguments": { "peer": "The peer where the giveaway was posted.", "msg_id": "Message ID of the {@link RawMessageActionGiveawayLaunch} service message" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "payments.getStarsStatus": { "comment": "Get the current Telegram Stars balance of the current account (with peer={@link RawInputPeerSelf}), or the stars balance of the bot specified in peer.", "arguments": { "peer": "Peer of which to get the balance." }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "payments.sendStarsForm": { "comment": "Make a payment using Telegram Stars, see here » for more info.", "arguments": { "flags": "Flags, see TL conditional fields", "form_id": "Payment form ID", "invoice": "Invoice" }, "throws": [{ "code": 400, "name": "BALANCE_TOO_LOW", "comment": "The transaction cannot be completed because the current Telegram Stars balance is too low." }, { "code": 400, "name": "FORM_EXPIRED", "comment": "The form was generated more than 10 minutes ago and has expired, please re-generate it using {@link payments.RawGetPaymentFormRequest} and pass the new form_id." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "payments.getStarsTopupOptions": { "comment": "Obtain a list of Telegram Stars topup options » as {@link RawStarsTopupOption} constructors.", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "payments.getStarsRevenueWithdrawalUrl": { "comment": "Withdraw funds from a channel or bot's star balance ».", "arguments": { "peer": "Channel or bot from which to withdraw funds.", "stars": "Amount of stars to withdraw.", "password": "2FA password, see here » for more info." }, "throws": [{ "code": 400, "name": "PASSWORD_HASH_INVALID", "comment": "The provided password hash is invalid." }, { "code": 400, "name": "PASSWORD_MISSING", "comment": "You must enable 2FA before executing this operation." }, { "code": 400, "name": "PASSWORD_TOO_FRESH_%d", "comment": "The password was modified less than 24 hours ago, try again in %d seconds." }], "available": "user" }, "payments.getStarsRevenueStats": { "comment": "Get Telegram Star revenue statistics ».", "arguments": { "flags": "Flags, see TL conditional fields", "dark": "Whether to enable dark theme for graph colors", "peer": "Get statistics for the specified bot, channel or ourselves ({@link RawInputPeerSelf})." }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "payments.launchPrepaidGiveaway": { "comment": "Launch a prepaid giveaway ».", "arguments": { "peer": "The peer where to launch the giveaway.", "giveaway_id": "The prepaid giveaway ID.", "purpose": "Giveway parameters" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "payments.getStarsTransactions": { "comment": "Fetch Telegram Stars transactions.\n\nThe inbound and outbound flags are mutually exclusive: if none of the two are set, both incoming and outgoing transactions are fetched.", "arguments": { "flags": "Flags, see TL conditional fields", "inbound": "If set, fetches only incoming transactions.", "outbound": "If set, fetches only outgoing transactions.", "ascending": "Return transactions in ascending order by date (instead of descending order by date).", "peer": "Fetch the transaction history of the peer ({@link RawInputPeerSelf} or a bot we own).", "offset": "Offset for pagination, obtained from the returned next_offset, initially an empty string ».", "limit": "Maximum number of results to return, see pagination" }, "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "both" }, "payments.getStarsTransactionsByID": { "comment": "Obtain info about Telegram Star transactions » using specific transaction IDs.", "arguments": { "peer": "Channel or bot.", "id": "Transaction IDs." }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "payments.getStarsRevenueAdsAccountUrl": { "comment": "Returns a URL for a Telegram Ad platform account that can be used to set up advertisements for channel/bot in peer, paid using the Telegram Stars owned by the specified peer, see here » for more info.", "arguments": { "peer": "Channel or bot that owns the stars." }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "payments.getStarsGiftOptions": { "comment": "Obtain a list of Telegram Stars gift options » as {@link RawStarsGiftOption} constructors.", "arguments": { "flags": "Flags, see TL conditional fields", "user_id": "Receiver of the gift (optional)." }, "available": "user" }, "stickers.removeStickerFromSet": { "comment": "Remove a sticker from the set where it belongs. The sticker set must have been created by the current user/bot.", "arguments": { "sticker": "The sticker to remove" }, "throws": [{ "code": 400, "name": "STICKER_INVALID", "comment": "The provided sticker is invalid." }], "available": "both" }, "stickers.createStickerSet": { "comment": "Create a stickerset.", "arguments": { "flags": "Flags, see TL conditional fields", "masks": "Whether this is a mask stickerset", "emojis": "Whether this is a custom emoji stickerset.", "text_color": "Whether the color of TGS custom emojis contained in this set should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context. For custom emoji stickersets only.", "user_id": "Stickerset owner", "title": "Stickerset name, 1-64 chars", "short_name": "Short name of sticker set, to be used in sticker deep links ». Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and, if called by a bot, must end in \"_by_\". is case insensitive. 1-64 characters.", "thumb": "Thumbnail", "stickers": "Stickers", "software": "Used when importing stickers using the sticker import SDKs, specifies the name of the software that created the stickers" }, "throws": [{ "code": 400, "name": "PACK_SHORT_NAME_INVALID", "comment": "Short pack name invalid." }, { "code": 400, "name": "PACK_SHORT_NAME_OCCUPIED", "comment": "A stickerpack with this name already exists." }, { "code": 400, "name": "PACK_TITLE_INVALID", "comment": "The stickerpack title is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "STICKERS_EMPTY", "comment": "No sticker provided." }, { "code": 400, "name": "STICKER_EMOJI_INVALID", "comment": "Sticker emoji invalid." }, { "code": 400, "name": "STICKER_FILE_INVALID", "comment": "Sticker file invalid." }, { "code": 400, "name": "STICKER_GIF_DIMENSIONS", "comment": "The specified video sticker has invalid dimensions." }, { "code": 400, "name": "STICKER_PNG_DIMENSIONS", "comment": "Sticker png dimensions invalid." }, { "code": 400, "name": "STICKER_PNG_NOPNG", "comment": "One of the specified stickers is not a valid PNG file." }, { "code": 400, "name": "STICKER_TGS_NODOC", "comment": "You must send the animated sticker as a document." }, { "code": 400, "name": "STICKER_TGS_NOTGS", "comment": "Invalid TGS sticker provided." }, { "code": 400, "name": "STICKER_THUMB_PNG_NOPNG", "comment": "Incorrect stickerset thumb file provided, PNG / WEBP expected." }, { "code": 400, "name": "STICKER_THUMB_TGS_NOTGS", "comment": "Incorrect stickerset TGS thumb file provided." }, { "code": 400, "name": "STICKER_VIDEO_BIG", "comment": "The specified video sticker is too big." }, { "code": 400, "name": "STICKER_VIDEO_NODOC", "comment": "You must send the video sticker as a document." }, { "code": 400, "name": "STICKER_VIDEO_NOWEBM", "comment": "The specified video sticker is not in webm format." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "both" }, "payments.refundStarsCharge": { "comment": "Refund a Telegram Stars transaction, see here » for more info.", "arguments": { "user_id": "User to refund.", "charge_id": "Transaction ID." }, "throws": [{ "code": 400, "name": "CHARGE_ALREADY_REFUNDED", "comment": "The transaction was already refunded." }, { "code": 400, "name": "USER_BOT_REQUIRED", "comment": "This method can only be called by a bot." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "bot" }, "payments.checkGiftCode": { "comment": "Obtain information about a Telegram Premium giftcode »", "arguments": { "slug": "The giftcode to check" }, "throws": [{ "code": 400, "name": "GIFT_SLUG_EXPIRED", "comment": "The specified gift slug has expired." }, { "code": 400, "name": "GIFT_SLUG_INVALID", "comment": "The specified slug is invalid." }], "available": "user" }, "stickers.addStickerToSet": { "comment": "Add a sticker to a stickerset. The sticker set must have been created by the current user/bot.", "arguments": { "stickerset": "The stickerset", "sticker": "The sticker" }, "throws": [{ "code": 400, "name": "STICKERPACK_STICKERS_TOO_MUCH", "comment": "There are too many stickers in this stickerpack, you can't add any more." }, { "code": 406, "name": "STICKERSET_INVALID", "comment": "The provided sticker set is invalid." }, { "code": 400, "name": "STICKERS_TOO_MUCH", "comment": "There are too many stickers in this stickerpack, you can't add any more." }, { "code": 400, "name": "STICKER_PNG_NOPNG", "comment": "One of the specified stickers is not a valid PNG file." }, { "code": 400, "name": "STICKER_TGS_NOTGS", "comment": "Invalid TGS sticker provided." }], "available": "both" }, "stickers.changeStickerPosition": { "comment": "Changes the absolute position of a sticker in the set to which it belongs. The sticker set must have been created by the current user/bot.", "arguments": { "sticker": "The sticker", "position": "The new position of the sticker, zero-based" }, "throws": [{ "code": 400, "name": "STICKER_INVALID", "comment": "The provided sticker is invalid." }], "available": "both" }, "stickers.setStickerSetThumb": { "comment": "Set stickerset thumbnail", "arguments": { "flags": "Flags, see TL conditional fields", "stickerset": "Stickerset", "thumb": "Thumbnail (only for normal stickersets, not custom emoji stickersets).", "thumb_document_id": "Only for custom emoji stickersets, ID of a custom emoji present in the set to use as thumbnail; pass 0 to fallback to the first custom emoji of the set." }, "throws": [{ "code": 400, "name": "STICKERSET_INVALID", "comment": "The provided sticker set is invalid." }, { "code": 400, "name": "STICKER_THUMB_PNG_NOPNG", "comment": "Incorrect stickerset thumb file provided, PNG / WEBP expected." }, { "code": 400, "name": "STICKER_THUMB_TGS_NOTGS", "comment": "Incorrect stickerset TGS thumb file provided." }], "available": "both" }, "stickers.checkShortName": { "comment": "Check whether the given short name is available", "arguments": { "short_name": "Short name" }, "throws": [{ "code": 400, "name": "SHORT_NAME_INVALID", "comment": "The specified short name is invalid." }, { "code": 400, "name": "SHORT_NAME_OCCUPIED", "comment": "The specified short name is already in use." }], "available": "user" }, "stickers.deleteStickerSet": { "comment": "Deletes a stickerset we created.", "arguments": { "stickerset": "Stickerset to delete" }, "throws": [{ "code": 400, "name": "STICKERSET_INVALID", "comment": "The provided sticker set is invalid." }], "available": "both" }, "stickers.suggestShortName": { "comment": "Suggests a short name for a given stickerpack name", "arguments": { "title": "Sticker pack name" }, "throws": [{ "code": 400, "name": "TITLE_INVALID", "comment": "The specified stickerpack title is invalid." }], "available": "user" }, "stickers.changeSticker": { "comment": "Update the keywords, emojis or mask coordinates of a sticker.", "arguments": { "flags": "Flags, see TL conditional fields", "sticker": "The sticker", "emoji": "If set, updates the emoji list associated to the sticker", "mask_coords": "If set, updates the mask coordinates", "keywords": "If set, updates the sticker keywords (separated by commas). Can't be provided for mask stickers." }, "throws": [{ "code": 400, "name": "STICKER_INVALID", "comment": "The provided sticker is invalid." }], "available": "both" }, "stickers.renameStickerSet": { "comment": "Renames a stickerset.", "arguments": { "stickerset": "Stickerset to rename", "title": "New stickerset title" }, "throws": [{ "code": 400, "name": "STICKERSET_INVALID", "comment": "The provided sticker set is invalid." }], "available": "both" }, "phone.receivedCall": { "comment": "Optional: notify the server that the user is currently busy in a call: this will automatically refuse all incoming phone calls until the current phone call is ended.", "arguments": { "peer": "The phone call we're currently in" }, "throws": [{ "code": 400, "name": "CALL_ALREADY_DECLINED", "comment": "The call was already declined." }, { "code": 400, "name": "CALL_PEER_INVALID", "comment": "The provided call peer object is invalid." }], "available": "user" }, "phone.requestCall": { "comment": "Start a telegram phone call", "arguments": { "flags": "Flags, see TL conditional fields", "video": "Whether to start a video call", "user_id": "Destination of the phone call", "random_id": "Random ID to avoid resending the same object", "g_a_hash": "Parameter for E2E encryption key exchange »", "protocol": "Phone call settings" }, "throws": [{ "code": 400, "name": "CALL_PROTOCOL_FLAGS_INVALID", "comment": "Call protocol flags invalid." }, { "code": 400, "name": "INPUT_USER_DEACTIVATED", "comment": "The specified user was deleted." }, { "code": 400, "name": "PARTICIPANT_VERSION_OUTDATED", "comment": "The other participant does not use an up to date telegram client with support for calls." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }, { "code": 403, "name": "USER_IS_BLOCKED", "comment": "You were blocked by this user." }, { "code": 403, "name": "USER_PRIVACY_RESTRICTED", "comment": "The user's privacy settings do not allow you to do this." }], "available": "user" }, "stickers.replaceSticker": { "comment": "Replace a sticker in a stickerset ».", "arguments": { "sticker": "Old sticker document.", "new_sticker": "New sticker." }, "throws": [{ "code": 400, "name": "STICKER_INVALID", "comment": "The provided sticker is invalid." }], "available": "both" }, "phone.acceptCall": { "comment": "Accept incoming call", "arguments": { "peer": "The call to accept", "g_b": "Parameter for E2E encryption key exchange »", "protocol": "Phone call settings" }, "throws": [{ "code": 400, "name": "CALL_ALREADY_ACCEPTED", "comment": "The call was already accepted." }, { "code": 400, "name": "CALL_ALREADY_DECLINED", "comment": "The call was already declined." }, { "code": 500, "name": "CALL_OCCUPY_FAILED", "comment": "The call failed because the user is already making another call." }, { "code": 400, "name": "CALL_PEER_INVALID", "comment": "The provided call peer object is invalid." }, { "code": 406, "name": "CALL_PROTOCOL_COMPAT_LAYER_INVALID", "comment": "The other side of the call does not support any of the VoIP protocols supported by the local client, as specified by the protocol.layer and protocol.library_versions fields." }, { "code": 400, "name": "CALL_PROTOCOL_FLAGS_INVALID", "comment": "Call protocol flags invalid." }], "available": "user" }, "phone.confirmCall": { "comment": "Complete phone call E2E encryption key exchange »", "arguments": { "peer": "The phone call", "g_a": "Parameter for E2E encryption key exchange »", "key_fingerprint": "Key fingerprint", "protocol": "Phone call settings" }, "throws": [{ "code": 400, "name": "CALL_ALREADY_DECLINED", "comment": "The call was already declined." }, { "code": 400, "name": "CALL_PEER_INVALID", "comment": "The provided call peer object is invalid." }], "available": "user" }, "phone.setCallRating": { "comment": "Rate a call, returns info about the rating message sent to the official VoIP bot.", "arguments": { "flags": "Flags, see TL conditional fields", "user_initiative": "Whether the user decided on their own initiative to rate the call", "peer": "The call to rate", "rating": "Rating in 1-5 stars", "comment": "An additional comment" }, "throws": [{ "code": 400, "name": "CALL_PEER_INVALID", "comment": "The provided call peer object is invalid." }], "available": "user" }, "phone.getCallConfig": { "comment": "Get phone call configuration to be passed to libtgvoip's shared config", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "phone.saveCallDebug": { "comment": "Send phone call debug data to server", "arguments": { "peer": "Phone call", "debug": "Debug statistics obtained from libtgvoip" }, "throws": [{ "code": 400, "name": "CALL_PEER_INVALID", "comment": "The provided call peer object is invalid." }, { "code": 400, "name": "DATA_JSON_INVALID", "comment": "The provided JSON data is invalid." }], "available": "user" }, "phone.sendSignalingData": { "comment": "Send VoIP signaling data", "arguments": { "peer": "Phone call", "data": "Signaling payload" }, "throws": [{ "code": 400, "name": "CALL_PEER_INVALID", "comment": "The provided call peer object is invalid." }], "available": "user" }, "phone.leaveGroupCall": { "comment": "Leave a group call", "arguments": { "call": "The group call", "source": "Your source ID" }, "throws": [{ "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }], "available": "user" }, "phone.joinGroupCall": { "comment": "Join a group call", "arguments": { "flags": "Flags, see TL conditional fields", "muted": "If set, the user will be muted by default upon joining.", "video_stopped": "If set, the user's video will be disabled by default upon joining.", "call": "The group call", "join_as": "Join the group call, presenting yourself as the specified user/channel", "invite_hash": "The invitation hash from the invite link », if provided allows speaking in a livestream or muted group chat.", "params": "WebRTC parameters" }, "throws": [{ "code": 400, "name": "DATA_JSON_INVALID", "comment": "The provided JSON data is invalid." }, { "code": 403, "name": "GROUPCALL_FORBIDDEN", "comment": "The group call has already ended." }, { "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }, { "code": 400, "name": "GROUPCALL_SSRC_DUPLICATE_MUCH", "comment": "The app needs to retry joining the group call with a new SSRC value." }, { "code": 400, "name": "JOIN_AS_PEER_INVALID", "comment": "The specified peer cannot be used to join a group call." }], "available": "user" }, "phone.createGroupCall": { "comment": "Create a group call or livestream", "arguments": { "flags": "Flags, see TL conditional fields", "rtmp_stream": "Whether RTMP stream support should be enabled: only the group/supergroup/channel owner can use this flag.", "peer": "Associate the group call or livestream to the provided group/supergroup/channel", "random_id": "Unique client message ID required to prevent creation of duplicate group calls", "title": "Call title", "schedule_date": "For scheduled group call or livestreams, the absolute date when the group call will start" }, "throws": [{ "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "CREATE_CALL_FAILED", "comment": "An error occurred while creating the call." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "SCHEDULE_DATE_INVALID", "comment": "Invalid schedule date provided." }], "available": "user" }, "phone.discardGroupCall": { "comment": "Terminate a group call", "arguments": { "call": "The group call to terminate" }, "throws": [{ "code": 400, "name": "GROUPCALL_ALREADY_DISCARDED", "comment": "The group call was already discarded." }, { "code": 403, "name": "GROUPCALL_FORBIDDEN", "comment": "The group call has already ended." }, { "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }], "available": "user" }, "phone.toggleGroupCallSettings": { "comment": "Change group call settings", "arguments": { "flags": "Flags, see TL conditional fields", "reset_invite_hash": "Invalidate existing invite links", "call": "Group call", "join_muted": "Whether all users will that join this group call are muted by default upon joining the group call" }, "throws": [{ "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }, { "code": 400, "name": "GROUPCALL_NOT_MODIFIED", "comment": "Group call settings weren't modified." }], "available": "user" }, "phone.inviteToGroupCall": { "comment": "Invite a set of users to a group call.", "arguments": { "call": "The group call", "users": "The users to invite." }, "throws": [{ "code": 403, "name": "GROUPCALL_FORBIDDEN", "comment": "The group call has already ended." }, { "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }, { "code": 400, "name": "INVITE_FORBIDDEN_WITH_JOINAS", "comment": "If the user has anonymously joined a group call as a channel, they can't invite other users to the group call because that would cause deanonymization, because the invite would be sent using the original user ID, not the anonymized channel ID." }, { "code": 400, "name": "USER_ALREADY_INVITED", "comment": "You have already invited this user." }, { "code": 403, "name": "USER_NOT_PARTICIPANT", "comment": "You're not a member of this supergroup/channel." }], "available": "user" }, "phone.getGroupCall": { "comment": "Get info about a group call", "arguments": { "call": "The group call", "limit": "Maximum number of results to return, see pagination" }, "throws": [{ "code": 403, "name": "GROUPCALL_FORBIDDEN", "comment": "The group call has already ended." }, { "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }], "available": "user" }, "phone.getGroupParticipants": { "comment": "Get group call participants", "arguments": { "call": "Group call", "ids": "If specified, will fetch group participant info about the specified peers", "sources": "If specified, will fetch group participant info about the specified WebRTC source IDs", "offset": "Offset for results, taken from the next_offset field of {@link phone.RawGroupParticipants}, initially an empty string.
    Note: if no more results are available, the method call will return an empty next_offset; thus, avoid providing the next_offset returned in {@link phone.RawGroupParticipants} if it is empty, to avoid an infinite loop.", "limit": "Maximum number of results to return, see pagination" }, "throws": [{ "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }], "available": "user" }, "phone.checkGroupCall": { "comment": "Check whether the group call Server Forwarding Unit is currently receiving the streams with the specified WebRTC source IDs.
    \nReturns an intersection of the source IDs specified in sources, and the source IDs currently being forwarded by the SFU.", "arguments": { "call": "Group call", "sources": "Source IDs" }, "throws": [{ "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }, { "code": 400, "name": "GROUPCALL_JOIN_MISSING", "comment": "You haven't joined this group call." }], "available": "user" }, "phone.discardCall": { "comment": "Refuse or end running call", "arguments": { "flags": "Flags, see TL conditional fields", "video": "Whether this is a video call", "peer": "The phone call", "duration": "Call duration", "reason": "Why was the call discarded", "connection_id": "Preferred libtgvoip relay ID" }, "throws": [{ "code": 400, "name": "CALL_ALREADY_ACCEPTED", "comment": "The call was already accepted." }, { "code": 500, "name": "CALL_OCCUPY_FAILED", "comment": "The call failed because the user is already making another call." }, { "code": 400, "name": "CALL_PEER_INVALID", "comment": "The provided call peer object is invalid." }], "available": "user" }, "phone.toggleGroupCallRecord": { "comment": "Start or stop recording a group call: the recorded audio and video streams will be automatically sent to Saved messages (the chat with ourselves).", "arguments": { "flags": "Flags, see TL conditional fields", "start": "Whether to start or stop recording", "video": "Whether to also record video streams", "call": "The group call or livestream", "title": "Recording title", "video_portrait": "If video stream recording is enabled, whether to record in portrait or landscape mode" }, "throws": [{ "code": 403, "name": "GROUPCALL_FORBIDDEN", "comment": "The group call has already ended." }, { "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }, { "code": 400, "name": "GROUPCALL_NOT_MODIFIED", "comment": "Group call settings weren't modified." }], "available": "user" }, "phone.editGroupCallTitle": { "comment": "Edit the title of a group call or livestream", "arguments": { "call": "Group call", "title": "New title" }, "throws": [{ "code": 403, "name": "GROUPCALL_FORBIDDEN", "comment": "The group call has already ended." }, { "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }], "available": "user" }, "phone.editGroupCallParticipant": { "comment": "Edit information about a given group call participant\n\nNote: flags.N?Bool parameters can have three possible values:", "arguments": { "flags": "Flags, see TL conditional fields", "call": "The group call", "participant": "The group call participant (can also be the user itself)", "muted": "Whether to mute or unmute the specified participant", "volume": "New volume", "raise_hand": "Raise or lower hand", "video_stopped": "Start or stop the video stream", "video_paused": "Pause or resume the video stream", "presentation_paused": "Pause or resume the screen sharing stream" }, "throws": [{ "code": 403, "name": "GROUPCALL_FORBIDDEN", "comment": "The group call has already ended." }, { "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }, { "code": 400, "name": "PARTICIPANT_JOIN_MISSING", "comment": "Trying to enable a presentation, when the user hasn't joined the Video Chat with {@link phone.RawJoinGroupCallRequest}." }, { "code": 400, "name": "RAISE_HAND_FORBIDDEN", "comment": "You cannot raise your hand." }, { "code": 400, "name": "USER_VOLUME_INVALID", "comment": "The specified user volume is invalid." }, { "code": 400, "name": "VIDEO_PAUSE_FORBIDDEN", "comment": "You cannot pause the video stream." }, { "code": 400, "name": "VIDEO_STOP_FORBIDDEN", "comment": "You cannot stop the video stream." }], "available": "user" }, "phone.getGroupCallJoinAs": { "comment": "Get a list of peers that can be used to join a group call, presenting yourself as a specific user/channel.", "arguments": { "peer": "The dialog whose group call or livestream we're trying to join" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "phone.exportGroupCallInvite": { "comment": "Get an invite link for a group call or livestream", "arguments": { "flags": "Flags, see TL conditional fields", "can_self_unmute": "For livestreams or muted group chats, if set, users that join using this link will be able to speak without explicitly requesting permission by (for example by raising their hand).", "call": "The group call" }, "throws": [{ "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }, { "code": 403, "name": "PUBLIC_CHANNEL_MISSING", "comment": "You can only export group call invite links for public chats or channels." }], "available": "user" }, "phone.toggleGroupCallStartSubscription": { "comment": "Subscribe or unsubscribe to a scheduled group call", "arguments": { "call": "Scheduled group call", "subscribed": "Enable or disable subscription" }, "throws": [{ "code": 403, "name": "GROUPCALL_ALREADY_STARTED", "comment": "The groupcall has already started, you can join directly using {@link phone.RawJoinGroupCallRequest}." }, { "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }], "available": "user" }, "phone.startScheduledGroupCall": { "comment": "Start a scheduled group call.", "arguments": { "call": "The scheduled group call" }, "throws": [{ "code": 403, "name": "GROUPCALL_ALREADY_STARTED", "comment": "The groupcall has already started, you can join directly using {@link phone.RawJoinGroupCallRequest}." }, { "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }], "available": "user" }, "phone.joinGroupCallPresentation": { "comment": "Start screen sharing in a call", "arguments": { "call": "The group call", "params": "WebRTC parameters" }, "throws": [{ "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }, { "code": 403, "name": "PARTICIPANT_JOIN_MISSING", "comment": "Trying to enable a presentation, when the user hasn't joined the Video Chat with {@link phone.RawJoinGroupCallRequest}." }], "available": "user" }, "phone.saveDefaultGroupCallJoinAs": { "comment": "Set the default peer that will be used to join a group call in a specific dialog.", "arguments": { "peer": "The dialog", "join_as": "The default peer that will be used to join group calls in this dialog, presenting yourself as a specific user/channel." }, "throws": [{ "code": 400, "name": "JOIN_AS_PEER_INVALID", "comment": "The specified peer cannot be used to join a group call." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "phone.leaveGroupCallPresentation": { "comment": "Stop screen sharing in a group call", "arguments": { "call": "The group call" }, "throws": [{ "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }], "available": "user" }, "phone.saveCallLog": { "comment": "Save phone call debug information", "arguments": { "peer": "Phone call", "file": "Logs" }, "throws": [{ "code": 400, "name": "CALL_PEER_INVALID", "comment": "The provided call peer object is invalid." }], "available": "user" }, "langpack.getLangPack": { "comment": "Get localization pack strings", "arguments": { "lang_pack": "Platform identifier (i.e. android, tdesktop, etc).", "lang_code": "Either an ISO 639-1 language code or a language pack name obtained from a language pack link." }, "throws": [{ "code": 400, "name": "LANGUAGE_INVALID", "comment": "The specified lang_code is invalid." }, { "code": 400, "name": "LANG_CODE_NOT_SUPPORTED", "comment": "The specified language code is not supported." }, { "code": 400, "name": "LANG_PACK_INVALID", "comment": "The provided language pack is invalid." }], "available": "user" }, "phone.getGroupCallStreamRtmpUrl": { "comment": "Get RTMP URL and stream key for RTMP livestreams. Can be used even before creating the actual RTMP livestream with {@link phone.RawCreateGroupCallRequest} (the rtmp_stream flag must be set).", "arguments": { "peer": "Peer to livestream into", "revoke": "Whether to revoke the previous stream key or simply return the existing one" }, "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "phone.getGroupCallStreamChannels": { "comment": "Get info about RTMP streams in a group call or livestream.
    \nThis method should be invoked to the same group/channel-related DC used for downloading livestream chunks.
    \nAs usual, the media DC is preferred, if available.", "arguments": { "call": "Group call or livestream" }, "throws": [{ "code": 400, "name": "GROUPCALL_INVALID", "comment": "The specified group call is invalid." }, { "code": 400, "name": "GROUPCALL_JOIN_MISSING", "comment": "You haven't joined this group call." }], "available": "user" }, "langpack.getLanguages": { "comment": "Get information about all languages in a localization pack", "arguments": { "lang_pack": "Platform identifier (i.e. android, tdesktop, etc)." }, "throws": [{ "code": 400, "name": "LANG_PACK_INVALID", "comment": "The provided language pack is invalid." }], "available": "user" }, "langpack.getDifference": { "comment": "Get new strings in language pack", "arguments": { "lang_pack": "Platform identifier (i.e. android, tdesktop, etc).", "lang_code": "Either an ISO 639-1 language code or a language pack name obtained from a language pack link.", "from_version": "Previous localization pack version" }, "throws": [{ "code": 400, "name": "LANG_PACK_INVALID", "comment": "The provided language pack is invalid." }], "available": "user" }, "langpack.getStrings": { "comment": "Get strings from a language pack", "arguments": { "lang_pack": "Platform identifier (i.e. android, tdesktop, etc).", "lang_code": "Either an ISO 639-1 language code or a language pack name obtained from a language pack link.", "keys": "Strings to get" }, "throws": [{ "code": 400, "name": "LANG_CODE_NOT_SUPPORTED", "comment": "The specified language code is not supported." }, { "code": 400, "name": "LANG_PACK_INVALID", "comment": "The provided language pack is invalid." }], "available": "user" }, "folders.editPeerFolders": { "comment": "Edit peers in peer folder", "arguments": { "folder_peers": "New peer list" }, "throws": [{ "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "CHAT_ID_INVALID", "comment": "The provided chat id is invalid." }, { "code": 400, "name": "FOLDER_ID_INVALID", "comment": "Invalid folder ID." }], "available": "user" }, "stats.getMegagroupStats": { "comment": "Get supergroup statistics", "arguments": { "flags": "Flags, see TL conditional fields", "dark": "Whether to enable dark theme for graph colors", "channel": "Supergroup ID" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "MEGAGROUP_REQUIRED", "comment": "You can only use this method on a supergroup." }], "available": "user" }, "stats.loadAsyncGraph": { "comment": "Load channel statistics graph asynchronously", "arguments": { "flags": "Flags, see TL conditional fields", "token": "Graph token from {@link RawStatsGraphAsync} constructor", "x": "Zoom value, if required" }, "throws": [{ "code": 400, "name": "GRAPH_EXPIRED_RELOAD", "comment": "This graph has expired, please obtain a new graph token." }, { "code": 400, "name": "GRAPH_INVALID_RELOAD", "comment": "Invalid graph token provided, please reload the stats and provide the updated token." }, { "code": 400, "name": "GRAPH_OUTDATED_RELOAD", "comment": "The graph is outdated, please get a new async token using stats.getBroadcastStats." }], "available": "user" }, "langpack.getLanguage": { "comment": "Get information about a language in a localization pack", "arguments": { "lang_pack": "Platform identifier (i.e. android, tdesktop, etc).", "lang_code": "Either an ISO 639-1 language code or a language pack name obtained from a language pack link." }, "throws": [{ "code": 400, "name": "LANG_CODE_NOT_SUPPORTED", "comment": "The specified language code is not supported." }, { "code": 400, "name": "LANG_PACK_INVALID", "comment": "The provided language pack is invalid." }], "available": "user" }, "stats.getMessagePublicForwards": { "comment": "Obtains a list of messages, indicating to which other public channels was a channel message forwarded.
    \nWill return a list of {@link RawMessage} with peer_id equal to the public channel to which this message was forwarded.", "arguments": { "channel": "Source channel", "msg_id": "Source message ID", "offset": "Offset for pagination, empty string on first call, then use the next_offset field of the returned constructor (if present, otherwise no more results are available).", "limit": "Maximum number of results to return, see pagination" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "stats.getBroadcastStats": { "comment": "Get channel statistics", "arguments": { "flags": "Flags, see TL conditional fields", "dark": "Whether to enable dark theme for graph colors", "channel": "The channel" }, "throws": [{ "code": 400, "name": "BROADCAST_REQUIRED", "comment": "This method can only be called on a channel, please use stats.getMegagroupStats for supergroups." }, { "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 403, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }], "available": "user" }, "stats.getMessageStats": { "comment": "Get message statistics", "arguments": { "flags": "Flags, see TL conditional fields", "dark": "Whether to enable dark theme for graph colors", "channel": "Channel ID", "msg_id": "Message ID" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "MESSAGE_ID_INVALID", "comment": "The provided message id is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "stats.getStoryPublicForwards": { "comment": "Obtain forwards of a story as a message to public chats and reposts by public channels.", "arguments": { "peer": "Peer where the story was originally posted", "id": "Story ID", "offset": "Offset for pagination, from {@link stats.RawPublicForwards}.next_offset.", "limit": "Maximum number of results to return, see pagination" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "stats.getBroadcastRevenueWithdrawalUrl": { "comment": "Withdraw funds from a channel's ad revenue balance ».", "arguments": { "channel": "The channel", "password": "2FA password, see here » for more info." }, "throws": [{ "code": 400, "name": "PASSWORD_HASH_INVALID", "comment": "The provided password hash is invalid." }, { "code": 400, "name": "PASSWORD_MISSING", "comment": "You must enable 2FA before executing this operation." }, { "code": 400, "name": "PASSWORD_TOO_FRESH_%d", "comment": "The password was modified less than 24 hours ago, try again in %d seconds." }], "available": "user" }, "stats.getStoryStats": { "comment": "Get statistics for a certain story.", "arguments": { "flags": "Flags, see TL conditional fields", "dark": "Whether to enable the dark theme for graph colors", "peer": "The peer that posted the story", "id": "Story ID" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "chatlists.exportChatlistInvite": { "comment": "Export a folder », creating a chat folder deep link ».", "arguments": { "chatlist": "The folder to export", "title": "An optional name for the link", "peers": "The list of channels, group and supergroups to share with the link. Basic groups will automatically be converted to supergroups when invoking the method." }, "throws": [{ "code": 400, "name": "FILTER_ID_INVALID", "comment": "The specified filter ID is invalid." }, { "code": 400, "name": "FILTER_NOT_SUPPORTED", "comment": "The specified filter cannot be used in this context." }, { "code": 400, "name": "INVITES_TOO_MUCH", "comment": "The maximum number of per-folder invites specified by the chatlist_invites_limit_default/chatlist_invites_limit_premium client configuration parameters » was reached." }, { "code": 400, "name": "PEERS_LIST_EMPTY", "comment": "The specified list of peers is empty." }], "available": "user" }, "stats.getBroadcastRevenueStats": { "comment": "Get channel ad revenue statistics ».", "arguments": { "flags": "Flags, see TL conditional fields", "dark": "Whether to enable dark theme for graph colors", "channel": "The channel" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }], "available": "user" }, "stats.getBroadcastRevenueTransactions": { "comment": "Fetch channel ad revenue transaction history ».", "arguments": { "channel": "The channel", "offset": "Offset for pagination", "limit": "Maximum number of results to return, see pagination" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }], "available": "user" }, "chatlists.deleteExportedInvite": { "comment": "Delete a previously created chat folder deep link ».", "arguments": { "chatlist": "The related folder", "slug": "slug obtained from the chat folder deep link »." }, "throws": [{ "code": 400, "name": "FILTER_ID_INVALID", "comment": "The specified filter ID is invalid." }, { "code": 400, "name": "FILTER_NOT_SUPPORTED", "comment": "The specified filter cannot be used in this context." }], "available": "user" }, "chatlists.getExportedInvites": { "comment": "List all chat folder deep links » associated to a folder", "arguments": { "chatlist": "The folder" }, "throws": [{ "code": 400, "name": "FILTER_ID_INVALID", "comment": "The specified filter ID is invalid." }], "available": "user" }, "chatlists.editExportedInvite": { "comment": "Edit a chat folder deep link ».", "arguments": { "flags": "Flags, see TL conditional fields", "chatlist": "Folder ID", "slug": "slug obtained from the chat folder deep link ».", "title": "If set, sets a new name for the link", "peers": "If set, changes the list of peers shared with the link" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "FILTER_ID_INVALID", "comment": "The specified filter ID is invalid." }, { "code": 400, "name": "FILTER_NOT_SUPPORTED", "comment": "The specified filter cannot be used in this context." }, { "code": 400, "name": "INVITE_SLUG_EMPTY", "comment": "The specified invite slug is empty." }, { "code": 400, "name": "INVITE_SLUG_EXPIRED", "comment": "The specified chat folder link has expired." }, { "code": 400, "name": "PEERS_LIST_EMPTY", "comment": "The specified list of peers is empty." }], "available": "user" }, "chatlists.getLeaveChatlistSuggestions": { "comment": "Returns identifiers of pinned or always included chats from a chat folder imported using a chat folder deep link », which are suggested to be left when the chat folder is deleted.", "arguments": { "chatlist": "Folder ID" }, "throws": [{ "code": 400, "name": "FILTER_ID_INVALID", "comment": "The specified filter ID is invalid." }, { "code": 400, "name": "FILTER_NOT_SUPPORTED", "comment": "The specified filter cannot be used in this context." }], "available": "user" }, "chatlists.getChatlistUpdates": { "comment": "Fetch new chats associated with an imported chat folder deep link ». Must be invoked at most every chatlist_update_period seconds (as per the related client configuration parameter »).", "arguments": { "chatlist": "The folder" }, "throws": [{ "code": 400, "name": "FILTER_ID_INVALID", "comment": "The specified filter ID is invalid." }, { "code": 400, "name": "FILTER_NOT_SUPPORTED", "comment": "The specified filter cannot be used in this context." }, { "code": 400, "name": "INPUT_CHATLIST_INVALID", "comment": "The specified folder is invalid." }], "available": "user" }, "chatlists.hideChatlistUpdates": { "comment": "Dismiss new pending peers recently added to a chat folder deep link ».", "arguments": { "chatlist": "The folder" }, "throws": [{ "code": 400, "name": "FILTER_ID_INVALID", "comment": "The specified filter ID is invalid." }, { "code": 400, "name": "FILTER_NOT_SUPPORTED", "comment": "The specified filter cannot be used in this context." }], "available": "user" }, "chatlists.joinChatlistUpdates": { "comment": "Join channels and supergroups recently added to a chat folder deep link ».", "arguments": { "chatlist": "The folder", "peers": "List of new chats to join, fetched using {@link chatlists.RawGetChatlistUpdatesRequest} and filtered as specified in the documentation »." }, "throws": [{ "code": 400, "name": "FILTER_ID_INVALID", "comment": "The specified filter ID is invalid." }, { "code": 400, "name": "FILTER_INCLUDE_EMPTY", "comment": "The include_peers vector of the filter is empty." }], "available": "user" }, "chatlists.joinChatlistInvite": { "comment": "Import a chat folder deep link », joining some or all the chats in the folder.", "arguments": { "slug": "slug obtained from a chat folder deep link ».", "peers": "List of new chats to join, fetched using {@link chatlists.RawCheckChatlistInviteRequest} and filtered as specified in the documentation »." }, "throws": [{ "code": 400, "name": "FILTER_INCLUDE_EMPTY", "comment": "The include_peers vector of the filter is empty." }, { "code": 400, "name": "INVITE_SLUG_EMPTY", "comment": "The specified invite slug is empty." }, { "code": 400, "name": "INVITE_SLUG_EXPIRED", "comment": "The specified chat folder link has expired." }], "available": "user" }, "stories.canSendStory": { "comment": "Check whether we can post stories as the specified peer.", "arguments": { "peer": "The peer from which we wish to post stories." }, "throws": [{ "code": 400, "name": "BOOSTS_REQUIRED", "comment": "The specified channel must first be boosted by its users in order to perform this action." }, { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }, { "code": 400, "name": "STORIES_TOO_MUCH", "comment": "You have hit the maximum active stories limit as specified by the story_expiring_limit_* client configuration parameters: you should buy a Premium subscription, delete an active story, or wait for the oldest story to expire." }, { "code": 400, "name": "STORY_SEND_FLOOD_MONTHLY_%d", "comment": "You've hit the monthly story limit as specified by the stories_sent_monthly_limit_* client configuration parameters: wait for the specified number of seconds before posting a new story." }, { "code": 400, "name": "STORY_SEND_FLOOD_WEEKLY_%d", "comment": "You've hit the weekly story limit as specified by the stories_sent_weekly_limit_* client configuration parameters: wait for the specified number of seconds before posting a new story." }], "available": "user" }, "stories.sendStory": { "comment": "Uploads a Telegram Story.", "arguments": { "flags": "Flags, see TL conditional fields", "pinned": "Whether to add the story to the profile automatically upon expiration. If not set, the story will only be added to the archive, see here » for more info.", "noforwards": "If set, disables forwards, screenshots, and downloads.", "fwd_modified": "Set this flag when reposting stories with fwd_from_id+fwd_from_id, if the media was modified before reposting.", "peer": "The peer to send the story as.", "media": "The story media.", "media_areas": "Media areas associated to the story, see here » for more info.", "caption": "Story caption.", "entities": "Message entities for styled text, if allowed by the stories_entities client configuration parameter ».", "privacy_rules": "Privacy rules for the story, indicating who can or can't view the story.", "random_id": "Unique client message ID required to prevent message resending.", "period": "Period after which the story is moved to archive (and to the profile if pinned is set), in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 for Telegram Premium users, and 86400 otherwise.", "fwd_from_id": "If set, indicates that this story is a repost of story with ID fwd_from_story posted by the peer in fwd_from_id.", "fwd_from_story": "If set, indicates that this story is a repost of story with ID fwd_from_story posted by the peer in fwd_from_id." }, "throws": [{ "code": 400, "name": "BOOSTS_REQUIRED", "comment": "The specified channel must first be boosted by its users in order to perform this action." }, { "code": 400, "name": "IMAGE_PROCESS_FAILED", "comment": "Failure while processing image." }, { "code": 400, "name": "MEDIA_EMPTY", "comment": "The provided media object is invalid." }, { "code": 400, "name": "MEDIA_FILE_INVALID", "comment": "The specified media file is invalid." }, { "code": 400, "name": "MEDIA_TYPE_INVALID", "comment": "The specified media type cannot be used in stories." }, { "code": 400, "name": "MEDIA_VIDEO_STORY_MISSING", "comment": "A non-story video cannot be repubblished as a story (emitted when trying to resend a non-story video as a story using inputDocument)." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }, { "code": 400, "name": "STORIES_TOO_MUCH", "comment": "You have hit the maximum active stories limit as specified by the story_expiring_limit_* client configuration parameters: you should buy a Premium subscription, delete an active story, or wait for the oldest story to expire." }, { "code": 400, "name": "STORY_PERIOD_INVALID", "comment": "The specified story period is invalid for this account." }, { "code": 400, "name": "VENUE_ID_INVALID", "comment": "The specified venue ID is invalid." }], "available": "user" }, "stories.editStory": { "comment": "Edit an uploaded story", "arguments": { "flags": "Flags, see TL conditional fields", "peer": "Peer where the story was posted.", "id": "ID of story to edit.", "media": "If specified, replaces the story media.", "media_areas": "Media areas associated to the story, see here » for more info.", "caption": "If specified, replaces the story caption.", "entities": "Message entities for styled text in the caption, if allowed by the stories_entities client configuration parameter ».", "privacy_rules": "If specified, alters the privacy settings » of the story, changing who can or can't view the story." }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "STORY_NOT_MODIFIED", "comment": "The new story information you passed is equal to the previous story information, thus it wasn't modified." }], "available": "user" }, "stories.deleteStories": { "comment": "Deletes some posted stories.", "arguments": { "peer": "Channel/user from where to delete stories.", "id": "IDs of stories to delete." }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "STORY_ID_EMPTY", "comment": "You specified no story IDs." }], "available": "user" }, "chatlists.leaveChatlist": { "comment": "Delete a folder imported using a chat folder deep link »", "arguments": { "chatlist": "Folder ID", "peers": "Also leave the specified channels and groups" }, "throws": [{ "code": 400, "name": "FILTER_ID_INVALID", "comment": "The specified filter ID is invalid." }], "available": "user" }, "stories.getAllStories": { "comment": "Fetch the List of active (or active and hidden) stories, see here » for more info on watching stories.", "arguments": { "flags": "Flags, see TL conditional fields", "next": "If next and state are both set, uses the passed state to paginate to the next results; if neither state nor next are set, fetches the initial page; if state is set and next is not set, check for changes in the active/hidden peerset, see here » for more info on the full flow.", "hidden": "If set, fetches the hidden active story list, otherwise fetches the active story list, see here » for more info on the full flow.", "state": "If next and state are both set, uses the passed state to paginate to the next results; if neither state nor next are set, fetches the initial page; if state is set and next is not set, check for changes in the active/hidden peerset, see here » for more info on the full flow." }, "available": "user" }, "stories.togglePinned": { "comment": "Pin or unpin one or more stories", "arguments": { "peer": "Peer where to pin or unpin stories", "id": "IDs of stories to pin or unpin", "pinned": "Whether to pin or unpin the stories" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "stories.getPinnedStories": { "comment": "Fetch the stories pinned on a peer's profile.", "arguments": { "peer": "Peer whose pinned stories should be fetched", "offset_id": "Offsets for pagination, for more info click here", "limit": "Maximum number of results to return, see pagination" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "USER_ID_INVALID", "comment": "The provided user ID is invalid." }], "available": "user" }, "stories.getStoriesArchive": { "comment": "Fetch the story archive » of a peer we control.", "arguments": { "peer": "Peer whose archived stories should be fetched", "offset_id": "Offsets for pagination, for more info click here", "limit": "Maximum number of results to return, see pagination" }, "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "stories.toggleAllStoriesHidden": { "comment": "Hide the active stories of a specific peer, preventing them from being displayed on the action bar on the homescreen.", "arguments": { "hidden": "Whether to hide or unhide all active stories of the peer" }, "available": "user" }, "stories.readStories": { "comment": "Mark all stories up to a certain ID as read, for a given peer; will emit an {@link RawUpdateReadStories} update to all logged-in sessions.", "arguments": { "peer": "The peer whose stories should be marked as read.", "max_id": "Mark all stories up to and including this ID as read" }, "throws": [{ "code": 400, "name": "MAX_ID_INVALID", "comment": "The provided max ID is invalid." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "STORIES_NEVER_CREATED", "comment": "This peer hasn't ever posted any stories." }], "available": "user" }, "stories.getStoriesByID": { "comment": "Obtain full info about a set of stories by their IDs.", "arguments": { "peer": "Peer where the stories were posted", "id": "Story IDs" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "STORIES_NEVER_CREATED", "comment": "This peer hasn't ever posted any stories." }, { "code": 400, "name": "STORY_ID_EMPTY", "comment": "You specified no story IDs." }], "available": "user" }, "stories.incrementStoryViews": { "comment": "Increment the view counter of one or more stories.", "arguments": { "peer": "Peer where the stories were posted.", "id": "IDs of the stories (maximum 200 at a time)." }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "STORY_ID_EMPTY", "comment": "You specified no story IDs." }], "available": "user" }, "stories.getStoryViewsList": { "comment": "Obtain the list of users that have viewed a specific story we posted", "arguments": { "flags": "Flags, see TL conditional fields", "just_contacts": "Whether to only fetch view reaction/views made by our contacts", "reactions_first": "Whether to return {@link RawStoryView} info about users that reacted to the story (i.e. if set, the server will first sort results by view date as usual, and then also additionally sort the list by putting {@link RawStoryView}s with an associated reaction first in the list). Ignored if forwards_first is set.", "forwards_first": "If set, returns forwards and reposts first, then reactions, then other views; otherwise returns interactions sorted just by interaction date.", "peer": "Peer where the story was posted", "q": "Search for specific peers", "id": "Story ID", "offset": "Offset for pagination, obtained from {@link stories.RawStoryViewsList}.next_offset", "limit": "Maximum number of results to return, see pagination" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "STORY_ID_INVALID", "comment": "The specified story ID is invalid." }], "available": "user" }, "stories.exportStoryLink": { "comment": "Generate a story deep link for a specific story", "arguments": { "peer": "Peer where the story was posted", "id": "Story ID" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "STORY_ID_EMPTY", "comment": "You specified no story IDs." }, { "code": 400, "name": "USER_PUBLIC_MISSING", "comment": "Cannot generate a link to stories posted by a peer without a username." }], "available": "user" }, "stories.report": { "comment": "Report a story.", "arguments": { "peer": "The peer that uploaded the story.", "id": "IDs of the stories to report.", "reason": "Why are these storeis being reported.", "message": "Comment for report moderation" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "stories.activateStealthMode": { "comment": "Activates stories stealth mode, see here » for more info.\n\nWill return an {@link RawUpdateStoriesStealthMode}.", "arguments": { "flags": "Flags, see TL conditional fields", "past": "Whether to erase views from any stories opened in the past stories_stealth_past_period seconds », as specified by the client configuration.", "future": "Whether to hide future story views for the next stories_stealth_future_period seconds », as specified by the client configuration." }, "throws": [{ "code": 400, "name": "PREMIUM_ACCOUNT_REQUIRED", "comment": "A premium account is required to execute this action." }], "available": "user" }, "chatlists.checkChatlistInvite": { "comment": "Obtain information about a chat folder deep link ».", "arguments": { "slug": "slug obtained from the chat folder deep link »" }, "throws": [{ "code": 400, "name": "INVITE_SLUG_EMPTY", "comment": "The specified invite slug is empty." }, { "code": 400, "name": "INVITE_SLUG_EXPIRED", "comment": "The specified chat folder link has expired." }], "available": "user" }, "stories.getStoriesViews": { "comment": "Obtain info about the view count, forward count, reactions and recent viewers of one or more stories.", "arguments": { "peer": "Peer whose stories should be fetched", "id": "Story IDs" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "STORY_ID_EMPTY", "comment": "You specified no story IDs." }], "available": "user" }, "stories.sendReaction": { "comment": "React to a story.", "arguments": { "flags": "Flags, see TL conditional fields", "add_to_recent": "Whether to add this reaction to the recent reactions list ».", "peer": "The peer that sent the story", "story_id": "ID of the story to react to", "reaction": "Reaction" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "REACTION_INVALID", "comment": "The specified reaction is invalid." }, { "code": 400, "name": "STORY_ID_EMPTY", "comment": "You specified no story IDs." }, { "code": 400, "name": "STORY_ID_INVALID", "comment": "The specified story ID is invalid." }], "available": "user" }, "stories.getPeerStories": { "comment": "Fetch the full active story list of a specific peer.", "arguments": { "peer": "Peer whose stories should be fetched" }, "throws": [{ "code": 400, "name": "CHANNEL_INVALID", "comment": "The provided channel is invalid." }, { "code": 400, "name": "CHANNEL_PRIVATE", "comment": "You haven't joined this channel/supergroup." }, { "code": 400, "name": "MSG_ID_INVALID", "comment": "Invalid message ID provided." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "stories.getPeerMaxIDs": { "comment": "Get the IDs of the maximum read stories for a set of peers.", "arguments": { "id": "Peers" }, "available": "user" }, "stories.getAllReadPeerStories": { "comment": "Obtain the latest read story ID for all peers when first logging in, returned as a list of {@link RawUpdateReadStories} updates, see here » for more info.", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "stories.getStoryReactionsList": { "comment": "Get the reaction and interaction list of a story posted to a channel, along with the sender of each reaction.\n\nCan only be used by channel admins.", "arguments": { "flags": "Flags, see TL conditional fields", "forwards_first": "If set, returns forwards and reposts first, then reactions, then other views; otherwise returns interactions sorted just by interaction date.", "peer": "Channel", "id": "Story ID", "reaction": "Get only reactions of this type", "offset": "Offset for pagination (taken from the next_offset field of the returned stories.StoryReactionsList); empty in the first request.", "limit": "Maximum number of results to return, see pagination" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "stories.searchPosts": { "comment": "Globally search for stories using a hashtag or a location media area, see here » for more info on the full flow.\n\nEither hashtag or area must be set when invoking the method.", "arguments": { "flags": "Flags, see TL conditional fields", "hashtag": "Hashtag (without the #)", "area": "A {@link RawMediaAreaGeoPoint} or a {@link RawMediaAreaVenue}.
    Note {@link RawMediaAreaGeoPoint} areas may be searched only if they have an associated address.", "offset": "Offset for pagination: initially an empty string, then the next_offset from the previously returned {@link stories.RawFoundStories}.", "limit": "Maximum number of results to return, see pagination" }, "throws": [{ "code": 400, "name": "HASHTAG_INVALID", "comment": "The specified hashtag is invalid." }], "available": "user" }, "stories.togglePeerStoriesHidden": { "comment": "Hide the active stories of a user, preventing them from being displayed on the action bar on the homescreen, see here » for more info.", "arguments": { "peer": "Peer whose stories should be (un)hidden.", "hidden": "Whether to hide or unhide stories." }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "stories.togglePinnedToTop": { "comment": "Pin some stories to the top of the profile, see here » for more info.", "arguments": { "peer": "Peer where to pin stories.", "id": "IDs of the stories to pin (max stories_pinned_to_top_count_max)." }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "STORY_ID_INVALID", "comment": "The specified story ID is invalid." }], "available": "user" }, "stories.getChatsToSend": { "comment": "Obtain a list of channels where the user can post stories", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "premium.applyBoost": { "comment": "Apply one or more boosts » to a peer.", "arguments": { "flags": "Flags, see TL conditional fields", "slots": "Which boost slots to assign to this peer.", "peer": "The peer to boost." }, "throws": [{ "code": 400, "name": "BOOSTS_EMPTY", "comment": "No boost slots were specified." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }, { "code": 400, "name": "SLOTS_EMPTY", "comment": "The specified slot list is empty." }], "available": "user" }, "premium.getMyBoosts": { "comment": "Obtain which peers are we currently boosting, and how many boost slots we have left.", "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "premium.getBoostsList": { "comment": "Obtains info about the boosts that were applied to a certain channel or supergroup (admins only)", "arguments": { "flags": "Flags, see TL conditional fields", "gifts": "Whether to return only info about boosts received from gift codes and giveaways created by the channel/supergroup »", "peer": "The channel/supergroup", "offset": "Offset for pagination, obtained from {@link premium.RawBoostsList}.next_offset", "limit": "Maximum number of results to return, see pagination" }, "throws": [{ "code": 400, "name": "CHAT_ADMIN_REQUIRED", "comment": "You must be an admin in this chat to do this." }, { "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "premium.getBoostsStatus": { "comment": "Gets the current number of boosts of a channel/supergroup.", "arguments": { "peer": "The peer." }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "user" }, "premium.getUserBoosts": { "comment": "Returns the lists of boost that were applied to a channel/supergroup by a specific user (admins only)", "arguments": { "peer": "The channel/supergroup", "user_id": "The user" }, "throws": [{ "code": 400, "name": "PEER_ID_INVALID", "comment": "The provided peer id is invalid." }], "available": "both" }, "smsjobs.isEligibleToJoin": { "comment": "Check if we can process SMS jobs (official clients only).", "throws": [{ "code": 403, "name": "NOT_ELIGIBLE", "comment": "The current user is not eligible to join the Peer-to-Peer Login Program." }], "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "smsjobs.leave": { "comment": "Disable SMS jobs (official clients only).", "throws": [{ "code": 400, "name": "NOT_JOINED", "comment": "The current user hasn't joined the Peer-to-Peer Login Program." }], "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "smsjobs.updateSettings": { "comment": "Update SMS job settings (official clients only).", "arguments": { "flags": "Flags, see TL conditional fields", "allow_international": "Allow international numbers?" }, "throws": [{ "code": 400, "name": "NOT_JOINED", "comment": "The current user hasn't joined the Peer-to-Peer Login Program." }], "available": "user" }, "smsjobs.getStatus": { "comment": "Get SMS jobs status (official clients only).", "throws": [{ "code": 400, "name": "NOT_JOINED", "comment": "The current user hasn't joined the Peer-to-Peer Login Program." }], "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "smsjobs.join": { "comment": "Enable SMS jobs (official clients only).", "throws": [{ "code": 400, "name": "NOT_ELIGIBLE", "comment": "The current user is not eligible to join the Peer-to-Peer Login Program." }], "available": "user", "arguments": { "gigagroup": "Is this a broadcast group?" } }, "smsjobs.finishJob": { "comment": "Finish an SMS job (official clients only).", "arguments": { "flags": "Flags, see TL conditional fields", "job_id": "Job ID.", "error": "If failed, the error." }, "throws": [{ "code": 400, "name": "SMSJOB_ID_INVALID", "comment": "The specified job ID is invalid." }], "available": "user" }, "fragment.getCollectibleInfo": { "comment": "Fetch information about a fragment collectible, see here » for more info on the full flow.", "arguments": { "collectible": "Collectible to fetch info about." }, "throws": [{ "code": 400, "name": "COLLECTIBLE_INVALID", "comment": "The specified collectible is invalid." }, { "code": 400, "name": "COLLECTIBLE_NOT_FOUND", "comment": "The specified collectible could not be found." }], "available": "user" }, "smsjobs.getSmsJob": { "comment": "Get info about an SMS job (official clients only).", "arguments": { "job_id": "Job ID" }, "throws": [{ "code": 400, "name": "SMSJOB_ID_INVALID", "comment": "The specified job ID is invalid." }], "available": "user" } }, "unions": { "Error": "An object containing a query error.", "InputChatPhoto": "Defines a new group profile photo.", "Peer": "Identifier of a private chat, basic group, group or channel (see here » for more info).", "InputPhoto": "Defines a photo for further interaction.", "InputFileLocation": "Defines the location of a file for download.", "InputGeoPoint": "Defines a GeoPoint.", "InputPeer": "Peer", "InputContact": "Object defines a contact from the user's phone book.", "storage.FileType": "Object describes the file type.", "InputUser": "Defines a user for subsequent interaction.", "InputFile": "Defines a file uploaded by the client.", "InputMedia": "Defines media content of a message.", "UserProfilePhoto": "Object contains info on the user's profile photo.", "Chat": "Object defines a group.", "User": "Object defines a user.", "UserStatus": "User online status", "ChatParticipant": "Details of a group member.", "Message": "Object describing a message.", "ChatPhoto": "Object defines a group profile photo.", "MessageMedia": "Media", "ChatParticipants": "Object contains info on group members.", "PhotoSize": "Location of a certain size of a picture", "ChatFull": "Full info about a channel, supergroup, gigagroup or basic group.", "Dialog": "Chat info.", "Photo": "Object describes a photo.", "MessageAction": "Object describing actions connected to a service message.", "GeoPoint": "Object defines a GeoPoint.", "auth.SentCode": "Contains info on a confirmation code message sent via SMS, phone call or Telegram.", "auth.ExportedAuthorization": "Exported authorization", "auth.Authorization": "Object contains info on user authorization.", "InputPeerNotifySettings": "Notifications settings.", "InputNotifyPeer": "Object defines the set of users and/or groups that generate notifications.", "PeerNotifySettings": "Notification settings.", "PeerSettings": "List of actions that are possible when interacting with this user, to be shown as suggested actions in the chat bar", "ReportReason": "Report reason", "ImportedContact": "Object contains info on a successfully imported contact.", "UserFull": "Object contains extended user info.", "Contact": "A contact of the current user.", "ContactStatus": "Contact status: online / offline.", "contacts.Contacts": "Info on the current user's contact list.", "WallPaper": "Object contains info on a wallpaper.", "contacts.Blocked": "Info on users from the current user's black list.", "contacts.ImportedContacts": "Object contains info on successfully imported contacts.", "messages.Dialogs": "Object contains a list of chats with messages and auxiliary data.", "messages.Messages": "Object contains information on list of messages with auxiliary data.", "messages.Chats": "Object contains list of chats with auxiliary data.", "messages.ChatFull": "Full info about a channel, supergroup, gigagroup or basic group.", "MessagesFilter": "Object describes message filter.", "messages.AffectedHistory": "Object contains info on affected part of communication history with the user or in a chat.", "Update": "Object contains info on events occurred.", "updates.State": "Object contains info on state for further updates.", "updates.Difference": "Occurred changes.", "photos.Photos": "Object contains list of photos with auxiliary data.", "Updates": "Object which is perceived by the client without a call on its part when an event occurs.", "photos.Photo": "Photo with auxiliary data.", "upload.File": "Contains info on file.", "NearestDc": "Object contains info on nearest data center.", "help.InviteText": "Object contains info on the text of a message with an invitation.", "Config": "Object contains info on API configuring parameters.", "help.AppUpdate": "Contains info on app update availability.", "EncryptedChat": "Object contains info on an encrypted chat.", "InputEncryptedChat": "Object sets an encrypted chat ID.", "DcOption": "Information for connection to data center.", "EncryptedFile": "Seta an encrypted file.", "InputEncryptedFile": "Object sets encrypted file for attachment", "EncryptedMessage": "Object contains encrypted message.", "messages.SentEncryptedMessage": "Contains info on message sent to an encrypted chat.", "InputDocument": "Defines a document for subsequent interaction.", "Document": "A document.", "messages.DhConfig": "Contains Diffie-Hellman key generation protocol parameters.", "help.Support": "Info about the support user, relevant to the current user.", "contacts.Found": "Object contains info on users found by name substring and auxiliary data.", "NotifyPeer": "Object defines the set of users and/or groups that generate notifications.", "SendMessageAction": "User actions. Use this to provide users with detailed info about their chat partner's actions: typing or sending attachments of all kinds.", "InputPrivacyKey": "Privacy keys together with privacy rules » indicate what can or can't someone do and are specified by a PrivacyKey constructor, and its input counterpart InputPrivacyKey.\n\nSee the privacy documentation » for more info.", "PrivacyKey": "Privacy keys together with privacy rules » indicate what can or can't someone do and are specified by a PrivacyKey constructor, and its input counterpart InputPrivacyKey.\n\nSee the privacy documentation » for more info.", "account.PrivacyRules": "Privacy rules", "AccountDaysTTL": "Time-to-live of current account", "InputPrivacyRule": "Privacy rules indicate who can or can't do something and are specified by a PrivacyRule, and its input counterpart InputPrivacyRule.\n\nSee the privacy documentation » for more info.", "DocumentAttribute": "Various possible attributes of a document (used to define if it's a sticker, a GIF, a video, a mask sticker, an image, an audio, and so on)", "messages.Stickers": "Stickers", "messages.AllStickers": "All stickers", "StickerPack": "Stickerpack", "messages.AffectedMessages": "Messages affected by changes", "WebPage": "Instant View webpage preview", "PrivacyRule": "Privacy rules together with privacy keys indicate what can or can't someone do and are specified by a PrivacyRule constructor, and its input counterpart InputPrivacyRule.\n\nSee the privacy documentation » for more info.", "Authorization": "Represents a logged-in session", "account.Authorizations": "Logged-in sessions", "auth.PasswordRecovery": "Recovery info of a 2FA password, only for accounts with a recovery email configured.", "account.Password": "Configuration for two-factor authorization", "ChatInvite": "Chat invite", "ExportedChatInvite": "Exported chat invite", "ReceivedNotifyMessage": "Confirmation of message receipt", "account.PasswordInputSettings": "Constructor for setting up a new 2FA SRP password", "StickerSet": "Represents a stickerset (stickerpack)", "messages.StickerSet": "Stickerset", "account.PasswordSettings": "Private info associated to the password info (recovery email, telegram passport info & so on)", "InputStickerSet": "Represents a stickerset", "KeyboardButton": "Bot or inline keyboard buttons", "KeyboardButtonRow": "Bot or inline keyboard rows", "BotInfo": "Info about bots (available bot commands, etc)", "ReplyMarkup": "Reply markup for bot and inline keyboards", "InputChannel": "Represents a channel", "contacts.ResolvedPeer": "Peer returned after resolving a @username", "updates.ChannelDifference": "Contains the difference (new messages) between our local channel state and the remote state", "MessageRange": "Indicates a range of chat messages", "channels.ChannelParticipants": "Channel/supergroup participants", "ChannelMessagesFilter": "Filter for fetching only certain types of channel messages", "MessageEntity": "Message entities, representing styled text in a message", "ChannelParticipantsFilter": "Filter for fetching channel participants", "BotCommand": "Describes a bot command that can be used in a chat", "ChannelParticipant": "Channel participant", "channels.ChannelParticipant": "Channel participant", "help.TermsOfService": "Contains info about the latest telegram Terms Of Service.", "messages.SavedGifs": "Saved GIFs", "InputBotInlineResult": "Inline bot result", "InputBotInlineMessage": "Represents a sent inline message from the perspective of a bot", "BotInlineResult": "Results of an inline query", "BotInlineMessage": "Inline message", "ExportedMessageLink": "HTTP link and embed info of channel message", "messages.BotResults": "Result of a query to an inline bot", "MessageFwdHeader": "Info about a forwarded message", "auth.SentCodeType": "Type of the verification code that was sent", "auth.CodeType": "Type of verification code that will be sent next if you call the resendCode method", "messages.MessageEditData": "Message edit data for media", "InlineBotSwitchPM": "The bot requested the user to message them in private", "messages.BotCallbackAnswer": "Callback answer of bot", "messages.PeerDialogs": "List of dialogs", "TopPeerCategory": "Top peer category", "TopPeerCategoryPeers": "Top peers by top peer category", "TopPeer": "Top peer", "contacts.TopPeers": "Top peers", "InputBotInlineMessageID": "Represents a sent inline message from the perspective of a bot", "messages.FeaturedStickers": "Featured stickers", "DraftMessage": "Represents a message draft.", "StickerSetCovered": "Stickerset preview", "messages.ArchivedStickers": "Archived stickers", "MaskCoords": "Mask coordinates (if this is a mask sticker, attached to a photo)", "messages.StickerSetInstallResult": "Result of stickerset installation process", "InputStickeredMedia": "Represents a media with attached stickers", "messages.RecentStickers": "Recent stickers", "Game": "Indicates an already sent game", "InputGame": "A game to send", "messages.HighScores": "High scores (in games)", "HighScore": "Game high score", "DataJSON": "Represent a JSON-encoded object", "PhoneCallDiscardReason": "Why was the phone call discarded?", "RichText": "Rich text", "LabeledPrice": "Labeled pricetag", "Invoice": "Invoice", "PaymentRequestedInfo": "Requested payment info", "PageBlock": "Represents an instant view page element", "InputWebDocument": "Specifies a document that will have to be downloaded from the URL by the telegram servers", "PaymentSavedCredentials": "Saved payment credentials", "PostAddress": "Shipping address", "WebDocument": "Remote document", "upload.WebFile": "Remote file", "payments.PaymentForm": "Payment form", "InputWebFileLocation": "Location of remote file", "PaymentCharge": "Charged payment", "account.TmpPassword": "Temporary password", "payments.PaymentResult": "Payment result", "payments.ValidatedRequestedInfo": "Validated requested info", "payments.PaymentReceipt": "Payment receipt", "payments.SavedInfo": "Saved payment info", "InputPaymentCredentials": "Payment credentials", "InputStickerSetItem": "Sticker", "PhoneConnection": "Phone call connection", "PhoneCall": "Phone call", "InputPhoneCall": "Phone call", "PhoneCallProtocol": "Phone call protocol", "ShippingOption": "Shipping options", "upload.CdnFile": "Represents the download status of a CDN file", "phone.PhoneCall": "Phone call", "CdnConfig": "Configuration for CDN file downloads.", "LangPackLanguage": "Language pack language", "LangPackDifference": "Language pack changes", "LangPackString": "Language pack string", "ChannelAdminLogEvent": "An event in a channel admin log", "ChannelAdminLogEventAction": "Channel admin log event", "CdnPublicKey": "Public key to use only during handshakes to CDN DCs.", "channels.AdminLogResults": "Admin log events", "RecentMeUrl": "Recent t.me urls", "PopularContact": "Popular contact", "help.RecentMeUrls": "Recent t.me URLs", "ChannelAdminLogEventsFilter": "Filter for fetching events in the channel admin log", "account.WebAuthorizations": "Web authorizations", "InputMessage": "A message", "WebAuthorization": "Web authorization", "InputSingleMedia": "A single media in an album or grouped media sent with {@link messages.RawSendMultiMediaRequest}.", "InputDialogPeer": "Peer, or all peers in a certain folder", "DialogPeer": "Peer, or all peers in a folder", "messages.FoundStickerSets": "Found stickersets", "SecureFile": "Secure passport file, for more info see the passport docs »", "FileHash": "Hash of an uploaded file, to be checked for validity after download", "InputSecureFile": "Secure passport file, for more info see the passport docs »", "help.TermsOfServiceUpdate": "Update of Telegram's terms of service", "SecureData": "Secure passport data, for more info see the passport docs »", "SecurePlainData": "Plaintext verified passport data.", "SecureValue": "Secure Telegram Passport value", "SecureValueType": "Secure value type", "messages.FavedStickers": "Favorited stickers", "SecureValueHash": "Secure value hash", "InputSecureValue": "Secure value, for more info see the passport docs »", "SecureValueError": "Secure value error", "SecureCredentialsEncrypted": "Encrypted secure credentials", "InputClientProxy": "Info about an MTProxy used to connect.", "help.DeepLinkInfo": "Contains information about an unsupported deep link »", "account.SentEmailCode": "The email code that was sent", "account.AuthorizationForm": "Authorization form", "account.Takeout": "Takeout info", "SavedContact": "Saved contact", "SecureSecretSettings": "Telegram passport settings", "SecurePasswordKdfAlgo": "KDF algorithm to use for computing telegram passport hash", "PasswordKdfAlgo": "Key derivation function to use when generating the password hash for SRP two-factor authorization", "InputCheckPasswordSRP": "Constructors for checking the validity of a 2FA SRP password.\n\nSee here » for more info on the 2FA authentication flow for methods that require it, before and after login.", "SecureRequiredType": "Required secure file type", "help.PassportConfig": "Telegram passport configuration", "InputAppEvent": "Object contains info about an event that occurred in the application.", "PageTableCell": "Represents a table in an instant view table", "JSONValue": "JSON value", "PageTableRow": "Table row", "PageCaption": "Page caption", "PageListItem": "Item in block list", "JSONObjectValue": "JSON key: value pair", "PageRelatedArticle": "Related articles", "PageListOrderedItem": "Represents an instant view ordered list", "help.SupportName": "Get localized name for support user", "PollAnswer": "Indicates a possible answer to a poll.", "help.UserInfo": "User info", "Page": "Instant view page", "Poll": "Indicates a poll message", "PollResults": "Results of poll", "StatsURL": "URL with chat statistics", "PollAnswerVoters": "How users voted on a certain poll answer", "ChatOnlines": "Number of online users in a chat", "ChatAdminRights": "Represents the rights of an admin in a channel/supergroup.", "account.WallPapers": "Wallpapers", "WallPaperSettings": "Wallpaper rendering information.", "ChatBannedRights": "Represents the rights of a normal user in a supergroup/channel/chat.", "InputWallPaper": "Wallpaper", "AutoDownloadSettings": "Media autodownload settings", "CodeSettings": "Settings for the code type to send", "account.AutoDownloadSettings": "Media autodownload settings", "EmojiKeyword": "Emoji keyword", "EmojiKeywordsDifference": "New emoji keywords", "Folder": "A folder", "EmojiLanguage": "Emoji language", "EmojiURL": "Emoji URL", "InputFolderPeer": "Peer in a folder", "FolderPeer": "Peer associated to folder", "messages.SearchCounter": "Number of results that would be returned by a search", "ChannelLocation": "Geographical location of supergroup (geogroups)", "UrlAuthResult": "URL authorization result", "PeerLocated": "Geolocated peer", "RestrictionReason": "Restriction reason", "Theme": "Cloud theme", "InputTheme": "Cloud theme", "account.ContentSettings": "Sensitive content settings", "auth.LoginToken": "Login token (for QR code login)", "account.Themes": "Installed themes", "messages.InactiveChats": "Inactive chat list", "BaseTheme": "Basic theme settings", "InputThemeSettings": "Theme settings", "ThemeSettings": "Theme settings", "WebPageAttribute": "Webpage attributes", "BankCardOpenUrl": "Credit card info URL provided by the bank", "messages.VotesList": "How users voted in a poll", "payments.BankCardData": "Credit card info, provided by the card's bank(s)", "StatsDateRangeDays": "Channel statistics date range", "DialogFilterSuggested": "Suggested dialog filters (folder »)", "DialogFilter": "Dialog filter (folder »)", "StatsAbsValueAndPrev": "Channel statistics value pair", "StatsPercentValue": "Channel statistics percentage", "StatsGraph": "Channel statistics graph", "stats.BroadcastStats": "Channel statistics", "VideoSize": "Represents an animated video thumbnail", "help.PromoData": "Info about pinned MTProxy or Public Service Announcement peers.", "StatsGroupTopPoster": "Most active user in a supergroup", "stats.MegagroupStats": "Supergroup statistics", "StatsGroupTopInviter": "Most active inviter in a supergroup", "StatsGroupTopAdmin": "Most active admin in a supergroup", "GlobalPrivacySettings": "Global privacy settings", "help.Country": "Name, ISO code, localized name and phone codes/patterns of a specific country", "help.CountryCode": "Country code and phone number pattern of a specific country", "help.CountriesList": "Name, ISO code, localized name and phone codes/patterns of all available countries", "MessageViews": "View, forward counter + info about replies of a specific message", "messages.DiscussionMessage": "Info about a message thread", "MessageReplyHeader": "Reply information", "messages.MessageViews": "View, forward counter + info about replies", "MessageReplies": "Info about post comments (for channels) or message replies (for groups)", "stats.MessageStats": "Message statistics", "GroupCallParticipant": "Info about a group call participant", "PeerBlocked": "Info about a blocked user", "GroupCall": "A group call", "phone.GroupCall": "Contains info about a group call, and partial info about its participants.", "InlineQueryPeerType": "Inline query peer type.", "InputGroupCall": "Indicates a group call", "messages.HistoryImport": "Identifier of a history import session, click here for more info ».", "messages.HistoryImportParsed": "Contains information about a chat export file, generated by a foreign chat app.", "messages.AffectedFoundMessages": "Messages found and affected by changes", "ChatInviteImporter": "When and which user joined the chat using a chat invite", "messages.ExportedChatInvite": "Contains info about a chat invite, and eventually a pointer to the newest chat invite.", "messages.ChatInviteImporters": "List of users that imported a chat invitation link.", "messages.ChatAdminsWithInvites": "Info about chat invites generated by admins.", "ChatAdminWithInvites": "Info about chat invites generated by admins.", "messages.ExportedChatInvites": "Info about chat invites exported by a certain admin.", "phone.GroupParticipants": "Info about the participants of a group call or livestream", "phone.JoinAsPeers": "A list of peers that can be used to join a group call, presenting yourself as a specific user/channel.", "phone.ExportedGroupCallInvite": "An exported group call invitation.", "account.ResetPasswordResult": "Result of an {@link account.RawResetPasswordRequest} request.", "BotCommandScope": "Represents a scope where the bot commands, specified using {@link bots.RawSetBotCommandsRequest} will be valid.", "GroupCallParticipantVideoSourceGroup": "Describes a group of video synchronization source identifiers", "messages.CheckedHistoryImportPeer": "Contains a confirmation text to be shown to the user, upon importing chat history, click here for more info ».", "stickers.SuggestedShortName": "A suggested short name for the specified stickerpack", "SponsoredMessage": "A sponsored message", "GroupCallParticipantVideo": "Info about a video stream", "messages.SponsoredMessages": "A set of sponsored messages associated with a channel", "SearchResultsCalendarPeriod": "Information about found messages sent on a specific day, used to split the messages in {@link messages.RawSearchResultsCalendar} constructors by days.", "messages.SearchResultsCalendar": "Information about found messages sent on a specific day", "SearchResultsPosition": "Information about a message in a specific position", "channels.SendAsPeers": "A list of peers that can be used to send messages in a specific group", "messages.PeerSettings": "Peer settings", "users.UserFull": "Full user information, with attached context peers for reactions", "messages.SearchResultsPositions": "Information about sparse positions of messages", "auth.LoggedOut": "Future auth token » to be used on subsequent authorizations", "MessageReactions": "Message reactions »", "messages.AvailableReactions": "Animations and metadata associated with message reactions »", "AvailableReaction": "Animations associated with a message reaction", "messages.MessageReactionsList": "List of peers that reacted to a specific message", "ReactionCount": "Number of users that reacted with a certain emoji", "MessagePeerReaction": "How a certain peer reacted to the message", "phone.GroupCallStreamChannels": "Info about RTMP streams in a group call or livestream", "GroupCallStreamChannel": "Info about an RTMP stream in a group call or livestream", "AttachMenuBotIconColor": "Represents an attachment menu icon color for bot mini apps »", "phone.GroupCallStreamRtmpUrl": "RTMP URL and stream key to be used in streaming software", "AttachMenuBotIcon": "Represents an attachment menu icon for bot mini apps »", "AttachMenuBots": "Represents a list of bot mini apps that can be launched from the attachment menu »", "AttachMenuBot": "Represents a bot mini app that can be launched from the attachment menu »", "WebViewResult": "Contains the webview URL with appropriate theme and user info parameters added", "WebViewMessageSent": "Contains information about an inline message sent by a Web App on behalf of a user.", "BotMenuButton": "Indicates the action to execute when pressing the in-UI menu button for bots", "account.SavedRingtones": "Contains a list of saved notification sounds", "NotificationSound": "Represents a notification sound", "AttachMenuPeerType": "Indicates a supported peer type for a bot mini app attachment menu", "account.SavedRingtone": "Contains information about a saved notification sound", "AttachMenuBotsBot": "Represents a bot mini app that can be launched from the attachment menu »", "payments.ExportedInvoice": "Exported invoice", "InputInvoice": "An invoice", "messages.TranscribedAudio": "Transcribed text from a voice message", "InputStorePaymentPurpose": "Info about a Telegram Premium purchase", "PremiumGiftOption": "Telegram Premium gift option", "PaymentFormMethod": "Represents a payment method", "EmojiStatus": "Emoji status", "ChatReactions": "Available chat reactions", "messages.Reactions": "A set of message reactions", "help.PremiumPromo": "Telegram Premium promotion information", "EmailVerifyPurpose": "Email verification purpose", "PremiumSubscriptionOption": "Telegram Premium subscription option", "SendAsPeer": "Indicates a peer that can be used to send messages", "account.EmojiStatuses": "A list of emoji statuses", "EmailVerification": "Email verification code or token", "MessageExtendedMedia": "Paid media, see here » for more info.", "Reaction": "Message reaction", "account.EmailVerified": "Email verification status", "Username": "Contains information about a username", "StickerKeyword": "Keywords for a certain sticker", "ForumTopic": "Contains information about a forum topic", "messages.ForumTopics": "Contains information about multiple forum topics", "DefaultHistoryTTL": "Contains info about the default value of the Time-To-Live setting, applied to all new chats.", "ExportedContactToken": "Describes a temporary profile link.", "RequestPeerType": "Filtering criteria to use for the peer selection list shown to the user.", "messages.EmojiGroups": "Represents a list of emoji categories.", "EmojiGroup": "Represents an emoji category.", "TextWithEntities": "Styled text with message entities", "messages.TranslatedText": "Translated text with entities.", "EmojiList": "Represents a list of custom emojis.", "AutoSaveSettings": "Media autosave settings", "BotApp": "Contains information about a direct link Mini App.", "InputBotApp": "Used to fetch information about a direct link Mini App", "messages.BotApp": "Contains information about a direct link Mini App", "ReadParticipantDate": "Contains info about when a certain participant has read a message", "InlineBotWebView": "Specifies an inline mode mini app button, shown on top of the inline query results list.", "InputChatlist": "Represents a folder", "account.AutoSaveSettings": "Contains media autosave settings", "chatlists.ExportedInvites": "A list of exported chat folder deep links ».", "ExportedChatlistInvite": "An exported chat folder deep link ».", "chatlists.ChatlistInvite": "Info about a chat folder deep link ».", "help.AppConfig": "Contains various client configuration parameters", "bots.BotInfo": "Localized name, about text and description of a bot.", "chatlists.ChatlistUpdates": "Updated info about a chat folder deep link ».", "MessagePeerVote": "How a user voted in a poll", "chatlists.ExportedChatlistInvite": "Exported chat folder deep link ».", "StoryItem": "Represents a Telegram Story", "StoryView": "Story view date and reaction information", "StoryViews": "Aggregated view and reaction information of a story", "AutoSaveException": "Peer-specific autosave settings", "stories.StoryViewsList": "Reaction and view counters for a story", "stories.StoryViews": "Reaction and view counters for a list of stories", "stories.AllStories": "Full list of active (or active and hidden) stories.", "stories.Stories": "List of stories", "ExportedStoryLink": "Represents a story deep link", "InputReplyTo": "Contains info about a message or story to reply to.", "MediaAreaCoordinates": "Coordinates and size of a clicable rectangular area on top of a story.", "StoriesStealthMode": "Story stealth mode status", "PeerStories": "Stories associated to a peer", "MediaArea": "Represents a story media area »", "stories.PeerStories": "Active story list of a specific peer.", "messages.WebPage": "Contains an instant view webpage.", "payments.CheckedGiftCode": "Info about a Telegram Premium Giftcode.", "PremiumGiftCodeOption": "Giveaway option.", "PrepaidGiveaway": "Contains info about a prepaid giveaway ».", "Boost": "Info about one or more boosts applied by a specific user.", "premium.BoostsList": "List of boosts that were applied to a peer by multiple users.", "payments.GiveawayInfo": "Info about a Telegram Premium Giveaway.", "MyBoost": "Contains information about a single boost slot ».", "premium.MyBoosts": "A list of peers we are currently boosting, and how many boost slots we have left.", "premium.BoostsStatus": "Contains info about the current boost status of a peer.", "StoryFwdHeader": "Contains info about the original poster of a reposted story.", "PostInteractionCounters": "Interaction counters", "stats.StoryStats": "Contains statistics about a story.", "stats.PublicForwards": "Contains info about the forwards of a story as a message to public chats and reposts by public channels.", "PublicForward": "Contains info about the forwards of a story as a message to public chats and reposts by public channels.", "PeerColor": "Represents a color palette ».", "help.PeerColorOption": "Contains info about a color palette ».", "stories.StoryReactionsList": "List of peers that reacted to a specific story", "help.PeerColorSet": "Contains info about a color palette ».", "StoryReaction": "How a certain peer reacted to or interacted with a story", "SavedDialog": "Represents a saved message dialog ».", "messages.SavedReactionTags": "List of reaction tag » names assigned by the user.", "help.PeerColors": "Contains info about multiple color palettes ».", "SavedReactionTag": "Info about a saved message reaction tag ».", "BusinessWeeklyOpen": "A time interval, indicating the opening hours of a Telegram Business.", "BusinessWorkHours": "Specifies a set of Telegram Business opening hours.", "messages.SavedDialogs": "Represents some saved message dialogs ».", "smsjobs.EligibilityToJoin": "SMS jobs eligibility", "OutboxReadDate": "Exact read date of a private message we sent to another user.", "smsjobs.Status": "Status", "SmsJob": "Info about an SMS job.", "BusinessLocation": "Represents the location of a Telegram Business ».", "InputBusinessRecipients": "Specifies the chats that can receive Telegram Business away » and greeting » messages.\n\nIf exclude_selected is set, specifies all chats that cannot receive Telegram Business away » and greeting » messages.", "BusinessRecipients": "Specifies the chats that can receive Telegram Business away » and greeting » messages.", "InputBusinessAwayMessage": "Describes a Telegram Business away message, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user.", "InputBusinessGreetingMessage": "Describes a Telegram Business greeting, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period.", "BusinessGreetingMessage": "Describes a Telegram Business greeting, automatically sent to new users writing to us in private for the first time, or after a certain inactivity period.", "BusinessAwayMessageSchedule": "Specifies when should the Telegram Business away messages be sent.", "BusinessAwayMessage": "Describes a Telegram Business away message, automatically sent to users writing to us when we're offline, during closing hours, while we're on vacation, or in some other custom time period when we cannot immediately answer to the user.", "Timezone": "Timezone information.", "QuickReply": "A quick reply shortcut.", "messages.QuickReplies": "Info about quick reply shortcuts ».", "ConnectedBot": "Contains info about a connected business bot ».", "messages.DialogFilters": "Folder information", "Birthday": "Birthday information for a user.", "InputQuickReplyShortcut": "Represents a quick reply shortcut ».", "account.ConnectedBots": "Info about currently connected business bots.", "BotBusinessConnection": "Contains info about a bot business connection.", "help.TimezonesList": "Timezone information that may be used elsewhere in the API, such as to set Telegram Business opening hours ».", "InputBusinessIntro": "Telegram Business introduction ».", "BusinessIntro": "Telegram Business introduction ».", "messages.MyStickers": "The list of stickersets owned by the current account ».", "InputCollectible": "Represents a Fragment collectible ».", "BusinessBotRecipients": "Specifies the private chats that a connected business bot » may receive messages and interact with.", "InputBusinessBotRecipients": "Specifies the private chats that a connected business bot » may interact with.", "ContactBirthday": "Birthday information of a contact.", "MissingInvitee": "Info about why a specific user could not be invited ».", "contacts.ContactBirthdays": "Birthday information of our contacts.", "fragment.CollectibleInfo": "Info about a fragment collectible.", "InputBusinessChatLink": "Contains info about a business chat deep link » to be created by the current account.", "RequestedPeer": "Info about a peer, shared by a user with the currently logged in bot using {@link messages.RawSendBotRequestedPeerRequest}.", "account.ResolvedBusinessChatLinks": "Contains info about a single resolved business chat deep link ».", "BusinessChatLink": "Contains info about a business chat deep link » created by the current account.", "account.BusinessChatLinks": "Contains info about business chat deep links » created by the current account.", "SponsoredMessageReportOption": "A report option for a sponsored message ».", "messages.InvitedUsers": "Contains info about successfully or unsuccessfully invited » users.", "channels.SponsoredMessageReportResult": "Status of the method call used to report a sponsored message ».", "stats.BroadcastRevenueStats": "Channel revenue ad statistics, see here » for more info.", "stats.BroadcastRevenueWithdrawalUrl": "Contains the URL to use to withdraw channel ad revenue.", "BroadcastRevenueTransaction": "A channel ad revenue » transaction.", "ReactionsNotifySettings": "Reaction notification settings, see here » for more info.", "BroadcastRevenueBalances": "Channel ad revenue balance » information.", "ReactionNotificationsFrom": "Reaction notification settings", "messages.AvailableEffects": "Full list of usable animated message effects ».", "AvailableEffect": "Describes a message effect ».", "stats.BroadcastRevenueTransactions": "Channel ad revenue transactions ».", "FactCheck": "Represents a fact-check » created by an independent fact-checker.", "StarsTransactionPeer": "Source of an incoming Telegram Star transaction, or its recipient for outgoing Telegram Star transactions.", "payments.StarsStatus": "Info about the current Telegram Star balance and transaction history ».", "StarsTransaction": "Represents a Telegram Stars transaction ».", "StarsTopupOption": "Telegram Stars topup option.", "FoundStory": "A story found using global story search ».", "stories.FoundStories": "Stories found using global story search ».", "GeoPointAddress": "Address optionally associated to a {@link RawGeoPoint}.", "StarsRevenueStatus": "Describes Telegram Star revenue balances ».", "payments.StarsRevenueStats": "Star revenue statistics, see here » for more info.\n\nNote that all balances and currency amounts and graph values are in Stars.", "payments.StarsRevenueAdsAccountUrl": "Contains a URL leading to a page where the user will be able to place ads for the channel/bot, paying using Telegram Stars.", "InputStarsTransaction": "Used to fetch info about a Telegram Star transaction ».", "StarsGiftOption": "Telegram Stars gift option.", "payments.StarsRevenueWithdrawalUrl": "Contains the URL to use to withdraw Telegram Star revenue.", "bots.PopularAppBots": "Popular Main Mini Apps, to be used in the apps tab of global search ».", "BotPreviewMedia": "Represents a Main Mini App preview media, see here » for more info.", "bots.PreviewInfo": "Contains info about Main Mini App previews, see here » for more info.", "SimpleWebViewResult": "Contains the webview URL with appropriate theme parameters added", "AppWebViewResult": "Contains the link that must be used to open a direct link Mini App.", "SponsoredWebPage": "Represents a sponsored website." } } diff --git a/packages/tl/data/int53-overrides.json b/packages/tl/data/int53-overrides.json index 6b926ab8..5f0ea326 100644 --- a/packages/tl/data/int53-overrides.json +++ b/packages/tl/data/int53-overrides.json @@ -1,188 +1,188 @@ { - "What is this?": [ - "It is guaranteed that user/chat/channel ids fit in int53,", - "as well as file size (up to 4 gigs),", - "so we can safely replace `long` with `int53` for simpler usage from within JS.", - "Note: this is a non-exhaustive list", - "When contributing, please maintain alphabetical key ordering" - ], - "class": { - "attachMenuBot": ["bot_id"], - "autoDownloadSettings": ["video_size_max", "file_size_max"], - "botInfo": ["user_id"], - "boost": ["user_id"], - "botBusinessConnection": ["user_id"], - "businessRecipients": ["users"], - "businessBotRecipients": ["users", "exclude_users"], - "contactBirthday": ["contact_id"], - "channel": ["id"], - "channelAdminLogEvent": ["user_id"], - "channelAdminLogEventActionChangeLinkedChat": ["prev_value", "new_value"], - "channelAdminLogEventActionParticipantJoinByRequest": ["approved_by"], - "channelForbidden": ["id"], - "channelFull": ["id", "linked_chat_id"], - "channelParticipant": ["user_id"], - "channelParticipantAdmin": ["user_id", "inviter_id", "promoted_by"], - "channelParticipantBanned": ["kicked_by"], - "channelParticipantCreator": ["user_id"], - "channelParticipantSelf": ["user_id", "inviter_id"], - "chat": ["id"], - "chatAdminWithInvites": ["admin_id"], - "chatEmpty": ["id"], - "chatForbidden": ["id"], - "chatFull": ["id"], - "chatInviteExported": ["admin_id"], - "chatInviteImporter": ["user_id", "approved_by"], - "chatParticipant": ["user_id", "inviter_id"], - "chatParticipantAdmin": ["user_id", "inviter_id"], - "chatParticipantCreator": ["user_id"], - "chatParticipants": ["chat_id"], - "chatParticipantsForbidden": ["chat_id"], - "connectedBot": ["bot_id"], - "contact": ["user_id"], - "contactStatus": ["user_id"], - "document": ["size"], - "encryptedChat": ["admin_id", "participant_id"], - "encryptedChatRequested": ["admin_id", "participant_id"], - "encryptedChatWaiting": ["admin_id", "participant_id"], - "encryptedFile": ["size"], - "fileHash": ["offset"], - "highScore": ["user_id"], - "importedContact": ["user_id"], - "inputChannel": ["channel_id"], - "inputChannelFromMessage": ["channel_id"], - "inputPeerChannel": ["channel_id"], - "inputPeerChannelFromMessage": ["channel_id"], - "inputPeerChat": ["chat_id"], - "inputPeerUser": ["user_id"], - "inputPeerUserFromMessage": ["user_id"], - "inputPrivacyValueAllowChatParticipants": ["chats"], - "inputPrivacyValueDisallowChatParticipants": ["chats"], - "inputUser": ["user_id"], - "inputUserFromMessage": ["user_id"], - "keyboardButtonUserProfile": ["user_id"], - "mediaAreaChannelPost": ["channel_id"], - "message": ["via_bot_id", "via_business_bot_id"], - "messageActionChannelMigrateFrom": ["chat_id"], - "messageActionChatAddUser": ["users"], - "messageActionChatCreate": ["users"], - "messageActionChatDeleteUser": ["user_id"], - "messageActionChatJoinedByLink": ["inviter_id"], - "messageActionChatMigrateTo": ["channel_id"], - "messageActionInviteToGroupCall": ["users"], - "messageEntityMentionName": ["user_id"], - "messageMediaContact": ["user_id"], - "messageMediaGiveaway": ["channels"], - "messageReplies": ["channel_id"], - "messageUserVote": ["user_id"], - "messageUserVoteInputOption": ["user_id"], - "messageUserVoteMultiple": ["user_id"], - "missingInvitee": ["user_id"], - "payments.paymentForm": ["bot_id"], - "payments.paymentReceipt": ["bot_id"], - "payments.paymentFormStars": ["bot_id"], - "payments.paymentReceiptStars": ["bot_id"], - "peerChannel": ["channel_id"], - "peerChat": ["chat_id"], - "peerSettings": ["business_bot_id"], - "peerUser": ["user_id"], - "phoneCall": ["admin_id", "participant_id"], - "phoneCallAccepted": ["admin_id", "participant_id"], - "phoneCallRequested": ["admin_id", "participant_id"], - "phoneCallWaiting": ["admin_id", "participant_id"], - "privacyValueAllowChatParticipants": ["chats"], - "privacyValueAllowUsers": ["users"], - "privacyValueDisallowChatParticipants": ["chats"], - "privacyValueDisallowUsers": ["users"], - "readParticipantDate": ["user_id"], - "recentMeUrlChat": ["chat_id"], - "recentMeUrlUser": ["user_id"], - "requestedPeerChannel": ["channel_id"], - "requestedPeerChat": ["chat_id"], - "requestedPeerUser": ["user_id"], - "secureFile": ["size"], - "statsGroupTopAdmin": ["user_id"], - "statsGroupTopInviter": ["user_id"], - "statsGroupTopPoster": ["user_id"], - "storyView": ["user_id"], - "storyViews": ["recent_viewers"], - "updateBotCallbackQuery": ["user_id"], - "updateBusinessBotCallbackQuery": ["user_id"], - "updateBotCommands": ["bot_id"], - "updateBotInlineQuery": ["user_id"], - "updateBotInlineSend": ["user_id"], - "updateBotMenuButton": ["bot_id"], - "updateBotPrecheckoutQuery": ["user_id"], - "updateBotShippingQuery": ["user_id"], - "updateBotStopped": ["user_id"], - "updateBotChatInviteRequester": ["user_id"], - "updatePendingJoinRequests": ["recent_requesters"], - "updateChannel": ["channel_id"], - "updateChannelAvailableMessages": ["channel_id"], - "updateChannelMessageForwards": ["channel_id"], - "updateChannelMessageViews": ["channel_id"], - "updateChannelParticipant": ["channel_id", "actor_id", "user_id"], - "updateChannelPinnedTopic": ["channel_id"], - "updateChannelPinnedTopics": ["channel_id"], - "updateChannelReadMessagesContents": ["channel_id"], - "updateChannelTooLong": ["channel_id"], - "updateChannelUserTyping": ["channel_id"], - "updateChannelViewForumAsMessages": ["channel_id"], - "updateChannelWebPage": ["channel_id"], - "updateChat": ["chat_id"], - "updateChatParticipant": ["chat_id", "actor_id", "user_id"], - "updateChatParticipantAdd": ["chat_id", "user_id", "inviter_id"], - "updateChatParticipantAdmin": ["chat_id", "user_id"], - "updateChatParticipantDelete": ["chat_id", "user_id"], - "updateChatUserTyping": ["chat_id"], - "updateDeleteChannelMessages": ["channel_id"], - "updateGroupCall": ["chat_id"], - "updateGroupInvitePrivacyForbidden": ["user_id"], - "updateInlineBotCallbackQuery": ["user_id"], - "updatePinnedChannelMessages": ["channel_id"], - "updateReadChannelDiscussionInbox": ["channel_id", "broadcast_id"], - "updateReadChannelDiscussionOutbox": ["channel_id"], - "updateReadChannelInbox": ["channel_id"], - "updateReadChannelOutbox": ["channel_id"], - "updateShortChatMessage": ["from_id", "chat_id", "via_bot_id"], - "updateShortMessage": ["user_id", "via_bot_id"], - "updateUser": ["user_id"], - "updateUserEmojiStatus": ["user_id"], - "updateUserName": ["user_id"], - "updateUserPhone": ["user_id"], - "updateUserPhoto": ["user_id"], - "updateUserStatus": ["user_id"], - "updateUserTyping": ["user_id"], - "user": ["id"], - "userEmpty": ["id"], - "userFull": ["id", "personal_channel_id"], - "userStories": ["user_id"], - "webAuthorization": ["bot_id"], - "_": "Dummy line teehee~" - }, - "method": { - "account.acceptAuthorization": ["bot_id"], - "account.getAuthorizationForm": ["bot_id"], - "account.initTakeoutSession": ["file_max_size"], - "account.registerDevice": ["other_uids"], - "account.unregisterDevice": ["other_uids"], - "contacts.editCloseFriends": ["id"], - "messages.addChatUser": ["chat_id"], - "messages.deleteChat": ["chat_id"], - "messages.deleteChatUser": ["chat_id"], - "messages.editChatAdmin": ["chat_id"], - "messages.editChatPhoto": ["chat_id"], - "messages.editChatTitle": ["chat_id"], - "messages.getAllChats": ["except_ids"], - "messages.getChats": ["id"], - "messages.getCommonChats": ["max_id"], - "messages.getDocumentByHash": ["size"], - "messages.getFullChat": ["chat_id"], - "messages.migrateChat": ["chat_id"], - "upload.getCdnFile": ["offset"], - "upload.getCdnFileHashes": ["offset"], - "upload.getFile": ["offset"], - "upload.getFileHashes": ["offset"], - "_": "Dummy line teehee~" - } + "What is this?": [ + "It is guaranteed that user/chat/channel ids fit in int53,", + "as well as file size (up to 4 gigs),", + "so we can safely replace `long` with `int53` for simpler usage from within JS.", + "Note: this is a non-exhaustive list", + "When contributing, please maintain alphabetical key ordering" + ], + "class": { + "attachMenuBot": ["bot_id"], + "autoDownloadSettings": ["video_size_max", "file_size_max"], + "botInfo": ["user_id"], + "boost": ["user_id"], + "botBusinessConnection": ["user_id"], + "businessRecipients": ["users"], + "businessBotRecipients": ["users", "exclude_users"], + "contactBirthday": ["contact_id"], + "channel": ["id"], + "channelAdminLogEvent": ["user_id"], + "channelAdminLogEventActionChangeLinkedChat": ["prev_value", "new_value"], + "channelAdminLogEventActionParticipantJoinByRequest": ["approved_by"], + "channelForbidden": ["id"], + "channelFull": ["id", "linked_chat_id"], + "channelParticipant": ["user_id"], + "channelParticipantAdmin": ["user_id", "inviter_id", "promoted_by"], + "channelParticipantBanned": ["kicked_by"], + "channelParticipantCreator": ["user_id"], + "channelParticipantSelf": ["user_id", "inviter_id"], + "chat": ["id"], + "chatAdminWithInvites": ["admin_id"], + "chatEmpty": ["id"], + "chatForbidden": ["id"], + "chatFull": ["id"], + "chatInviteExported": ["admin_id"], + "chatInviteImporter": ["user_id", "approved_by"], + "chatParticipant": ["user_id", "inviter_id"], + "chatParticipantAdmin": ["user_id", "inviter_id"], + "chatParticipantCreator": ["user_id"], + "chatParticipants": ["chat_id"], + "chatParticipantsForbidden": ["chat_id"], + "connectedBot": ["bot_id"], + "contact": ["user_id"], + "contactStatus": ["user_id"], + "document": ["size"], + "encryptedChat": ["admin_id", "participant_id"], + "encryptedChatRequested": ["admin_id", "participant_id"], + "encryptedChatWaiting": ["admin_id", "participant_id"], + "encryptedFile": ["size"], + "fileHash": ["offset"], + "highScore": ["user_id"], + "importedContact": ["user_id"], + "inputChannel": ["channel_id"], + "inputChannelFromMessage": ["channel_id"], + "inputPeerChannel": ["channel_id"], + "inputPeerChannelFromMessage": ["channel_id"], + "inputPeerChat": ["chat_id"], + "inputPeerUser": ["user_id"], + "inputPeerUserFromMessage": ["user_id"], + "inputPrivacyValueAllowChatParticipants": ["chats"], + "inputPrivacyValueDisallowChatParticipants": ["chats"], + "inputUser": ["user_id"], + "inputUserFromMessage": ["user_id"], + "keyboardButtonUserProfile": ["user_id"], + "mediaAreaChannelPost": ["channel_id"], + "message": ["via_bot_id", "via_business_bot_id"], + "messageActionChannelMigrateFrom": ["chat_id"], + "messageActionChatAddUser": ["users"], + "messageActionChatCreate": ["users"], + "messageActionChatDeleteUser": ["user_id"], + "messageActionChatJoinedByLink": ["inviter_id"], + "messageActionChatMigrateTo": ["channel_id"], + "messageActionInviteToGroupCall": ["users"], + "messageEntityMentionName": ["user_id"], + "messageMediaContact": ["user_id"], + "messageMediaGiveaway": ["channels"], + "messageReplies": ["channel_id"], + "messageUserVote": ["user_id"], + "messageUserVoteInputOption": ["user_id"], + "messageUserVoteMultiple": ["user_id"], + "missingInvitee": ["user_id"], + "payments.paymentForm": ["bot_id"], + "payments.paymentReceipt": ["bot_id"], + "payments.paymentFormStars": ["bot_id"], + "payments.paymentReceiptStars": ["bot_id"], + "peerChannel": ["channel_id"], + "peerChat": ["chat_id"], + "peerSettings": ["business_bot_id"], + "peerUser": ["user_id"], + "phoneCall": ["admin_id", "participant_id"], + "phoneCallAccepted": ["admin_id", "participant_id"], + "phoneCallRequested": ["admin_id", "participant_id"], + "phoneCallWaiting": ["admin_id", "participant_id"], + "privacyValueAllowChatParticipants": ["chats"], + "privacyValueAllowUsers": ["users"], + "privacyValueDisallowChatParticipants": ["chats"], + "privacyValueDisallowUsers": ["users"], + "readParticipantDate": ["user_id"], + "recentMeUrlChat": ["chat_id"], + "recentMeUrlUser": ["user_id"], + "requestedPeerChannel": ["channel_id"], + "requestedPeerChat": ["chat_id"], + "requestedPeerUser": ["user_id"], + "secureFile": ["size"], + "statsGroupTopAdmin": ["user_id"], + "statsGroupTopInviter": ["user_id"], + "statsGroupTopPoster": ["user_id"], + "storyView": ["user_id"], + "storyViews": ["recent_viewers"], + "updateBotCallbackQuery": ["user_id"], + "updateBusinessBotCallbackQuery": ["user_id"], + "updateBotCommands": ["bot_id"], + "updateBotInlineQuery": ["user_id"], + "updateBotInlineSend": ["user_id"], + "updateBotMenuButton": ["bot_id"], + "updateBotPrecheckoutQuery": ["user_id"], + "updateBotShippingQuery": ["user_id"], + "updateBotStopped": ["user_id"], + "updateBotChatInviteRequester": ["user_id"], + "updatePendingJoinRequests": ["recent_requesters"], + "updateChannel": ["channel_id"], + "updateChannelAvailableMessages": ["channel_id"], + "updateChannelMessageForwards": ["channel_id"], + "updateChannelMessageViews": ["channel_id"], + "updateChannelParticipant": ["channel_id", "actor_id", "user_id"], + "updateChannelPinnedTopic": ["channel_id"], + "updateChannelPinnedTopics": ["channel_id"], + "updateChannelReadMessagesContents": ["channel_id"], + "updateChannelTooLong": ["channel_id"], + "updateChannelUserTyping": ["channel_id"], + "updateChannelViewForumAsMessages": ["channel_id"], + "updateChannelWebPage": ["channel_id"], + "updateChat": ["chat_id"], + "updateChatParticipant": ["chat_id", "actor_id", "user_id"], + "updateChatParticipantAdd": ["chat_id", "user_id", "inviter_id"], + "updateChatParticipantAdmin": ["chat_id", "user_id"], + "updateChatParticipantDelete": ["chat_id", "user_id"], + "updateChatUserTyping": ["chat_id"], + "updateDeleteChannelMessages": ["channel_id"], + "updateGroupCall": ["chat_id"], + "updateGroupInvitePrivacyForbidden": ["user_id"], + "updateInlineBotCallbackQuery": ["user_id"], + "updatePinnedChannelMessages": ["channel_id"], + "updateReadChannelDiscussionInbox": ["channel_id", "broadcast_id"], + "updateReadChannelDiscussionOutbox": ["channel_id"], + "updateReadChannelInbox": ["channel_id"], + "updateReadChannelOutbox": ["channel_id"], + "updateShortChatMessage": ["from_id", "chat_id", "via_bot_id"], + "updateShortMessage": ["user_id", "via_bot_id"], + "updateUser": ["user_id"], + "updateUserEmojiStatus": ["user_id"], + "updateUserName": ["user_id"], + "updateUserPhone": ["user_id"], + "updateUserPhoto": ["user_id"], + "updateUserStatus": ["user_id"], + "updateUserTyping": ["user_id"], + "user": ["id"], + "userEmpty": ["id"], + "userFull": ["id", "personal_channel_id"], + "userStories": ["user_id"], + "webAuthorization": ["bot_id"], + "_": "Dummy line teehee~" + }, + "method": { + "account.acceptAuthorization": ["bot_id"], + "account.getAuthorizationForm": ["bot_id"], + "account.initTakeoutSession": ["file_max_size"], + "account.registerDevice": ["other_uids"], + "account.unregisterDevice": ["other_uids"], + "contacts.editCloseFriends": ["id"], + "messages.addChatUser": ["chat_id"], + "messages.deleteChat": ["chat_id"], + "messages.deleteChatUser": ["chat_id"], + "messages.editChatAdmin": ["chat_id"], + "messages.editChatPhoto": ["chat_id"], + "messages.editChatTitle": ["chat_id"], + "messages.getAllChats": ["except_ids"], + "messages.getChats": ["id"], + "messages.getCommonChats": ["max_id"], + "messages.getDocumentByHash": ["size"], + "messages.getFullChat": ["chat_id"], + "messages.migrateChat": ["chat_id"], + "upload.getCdnFile": ["offset"], + "upload.getCdnFileHashes": ["offset"], + "upload.getFile": ["offset"], + "upload.getFileHashes": ["offset"], + "_": "Dummy line teehee~" + } } diff --git a/packages/tl/mtp-schema.json b/packages/tl/mtp-schema.json index 1a95644c..165661b3 100644 --- a/packages/tl/mtp-schema.json +++ b/packages/tl/mtp-schema.json @@ -1 +1 @@ -[{"kind":"class","name":"mt_resPQ","id":85337187,"type":"ResPQ","arguments":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"pq","type":"bytes"},{"name":"server_public_key_fingerprints","type":"long","typeModifiers":{"isVector":true}}]},{"kind":"class","name":"mt_p_q_inner_data_dc","id":2851430293,"type":"P_Q_inner_data","arguments":[{"name":"pq","type":"bytes"},{"name":"p","type":"bytes"},{"name":"q","type":"bytes"},{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"new_nonce","type":"int256"},{"name":"dc","type":"int"}]},{"kind":"class","name":"mt_p_q_inner_data_temp_dc","id":1459478408,"type":"P_Q_inner_data","arguments":[{"name":"pq","type":"bytes"},{"name":"p","type":"bytes"},{"name":"q","type":"bytes"},{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"new_nonce","type":"int256"},{"name":"dc","type":"int"},{"name":"expires_in","type":"int"}]},{"kind":"class","name":"mt_server_DH_params_ok","id":3504867164,"type":"Server_DH_Params","arguments":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"encrypted_answer","type":"bytes"}]},{"kind":"class","name":"mt_server_DH_inner_data","id":3045658042,"type":"Server_DH_inner_data","arguments":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"g","type":"int"},{"name":"dh_prime","type":"bytes"},{"name":"g_a","type":"bytes"},{"name":"server_time","type":"int"}]},{"kind":"class","name":"mt_client_DH_inner_data","id":1715713620,"type":"Client_DH_Inner_Data","arguments":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"retry_id","type":"long"},{"name":"g_b","type":"bytes"}]},{"kind":"class","name":"mt_dh_gen_ok","id":1003222836,"type":"Set_client_DH_params_answer","arguments":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"new_nonce_hash1","type":"int128"}]},{"kind":"class","name":"mt_dh_gen_retry","id":1188831161,"type":"Set_client_DH_params_answer","arguments":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"new_nonce_hash2","type":"int128"}]},{"kind":"class","name":"mt_dh_gen_fail","id":2795351554,"type":"Set_client_DH_params_answer","arguments":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"new_nonce_hash3","type":"int128"}]},{"kind":"class","name":"mt_bind_auth_key_inner","id":1973679973,"type":"BindAuthKeyInner","arguments":[{"name":"nonce","type":"long"},{"name":"temp_auth_key_id","type":"long"},{"name":"perm_auth_key_id","type":"long"},{"name":"temp_session_id","type":"long"},{"name":"expires_at","type":"int"}]},{"kind":"class","name":"mt_rpc_error","id":558156313,"type":"RpcError","arguments":[{"name":"error_code","type":"int"},{"name":"error_message","type":"string"}]},{"kind":"class","name":"mt_rpc_answer_unknown","id":1579864942,"type":"RpcDropAnswer","arguments":[]},{"kind":"class","name":"mt_rpc_answer_dropped_running","id":3447252358,"type":"RpcDropAnswer","arguments":[]},{"kind":"class","name":"mt_rpc_answer_dropped","id":2755319991,"type":"RpcDropAnswer","arguments":[{"name":"msg_id","type":"long"},{"name":"seq_no","type":"int"},{"name":"bytes","type":"int"}]},{"kind":"class","name":"mt_future_salt","id":155834844,"type":"FutureSalt","arguments":[{"name":"valid_since","type":"int"},{"name":"valid_until","type":"int"},{"name":"salt","type":"long"}]},{"kind":"class","name":"mt_future_salts","id":2924480661,"type":"FutureSalts","arguments":[{"name":"req_msg_id","type":"long"},{"name":"now","type":"int"},{"name":"salts","type":"mt_future_salt","typeModifiers":{"isBareVector":true,"isBareType":true,"constructorId":155834844}}]},{"kind":"class","name":"mt_pong","id":880243653,"type":"Pong","arguments":[{"name":"msg_id","type":"long"},{"name":"ping_id","type":"long"}]},{"kind":"class","name":"mt_destroy_session_ok","id":3793765884,"type":"DestroySessionRes","arguments":[{"name":"session_id","type":"long"}]},{"kind":"class","name":"mt_destroy_session_none","id":1658015945,"type":"DestroySessionRes","arguments":[{"name":"session_id","type":"long"}]},{"kind":"class","name":"mt_new_session_created","id":2663516424,"type":"NewSession","arguments":[{"name":"first_msg_id","type":"long"},{"name":"unique_id","type":"long"},{"name":"server_salt","type":"long"}]},{"kind":"class","name":"mt_msgs_ack","id":1658238041,"type":"MsgsAck","arguments":[{"name":"msg_ids","type":"long","typeModifiers":{"isVector":true}}]},{"kind":"class","name":"mt_bad_msg_notification","id":2817521681,"type":"BadMsgNotification","arguments":[{"name":"bad_msg_id","type":"long"},{"name":"bad_msg_seqno","type":"int"},{"name":"error_code","type":"int"}]},{"kind":"class","name":"mt_bad_server_salt","id":3987424379,"type":"BadMsgNotification","arguments":[{"name":"bad_msg_id","type":"long"},{"name":"bad_msg_seqno","type":"int"},{"name":"error_code","type":"int"},{"name":"new_server_salt","type":"long"}]},{"kind":"class","name":"mt_msg_resend_req","id":2105940488,"type":"MsgResendReq","arguments":[{"name":"msg_ids","type":"long","typeModifiers":{"isVector":true}}]},{"kind":"class","name":"mt_msgs_state_req","id":3664378706,"type":"MsgsStateReq","arguments":[{"name":"msg_ids","type":"long","typeModifiers":{"isVector":true}}]},{"kind":"class","name":"mt_msgs_state_info","id":81704317,"type":"MsgsStateInfo","arguments":[{"name":"req_msg_id","type":"long"},{"name":"info","type":"bytes"}]},{"kind":"class","name":"mt_msgs_all_info","id":2361446705,"type":"MsgsAllInfo","arguments":[{"name":"msg_ids","type":"long","typeModifiers":{"isVector":true}},{"name":"info","type":"bytes"}]},{"kind":"class","name":"mt_msg_detailed_info","id":661470918,"type":"MsgDetailedInfo","arguments":[{"name":"msg_id","type":"long"},{"name":"answer_msg_id","type":"long"},{"name":"bytes","type":"int"},{"name":"status","type":"int"}]},{"kind":"class","name":"mt_msg_new_detailed_info","id":2157819615,"type":"MsgDetailedInfo","arguments":[{"name":"answer_msg_id","type":"long"},{"name":"bytes","type":"int"},{"name":"status","type":"int"}]},{"kind":"class","name":"mt_destroy_auth_key_ok","id":4133544404,"type":"DestroyAuthKeyRes","arguments":[]},{"kind":"class","name":"mt_destroy_auth_key_none","id":178201177,"type":"DestroyAuthKeyRes","arguments":[]},{"kind":"class","name":"mt_destroy_auth_key_fail","id":3926956819,"type":"DestroyAuthKeyRes","arguments":[]},{"kind":"class","name":"mt_http_wait","id":2459514271,"type":"HttpWait","arguments":[{"name":"max_delay","type":"int"},{"name":"wait_after","type":"int"},{"name":"max_wait","type":"int"}]},{"kind":"class","name":"mt_req_pq_multi","id":3195965169,"type":"ResPQ","arguments":[{"name":"nonce","type":"int128"}]},{"kind":"class","name":"mt_req_DH_params","id":3608339646,"type":"Server_DH_Params","arguments":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"p","type":"bytes"},{"name":"q","type":"bytes"},{"name":"public_key_fingerprint","type":"long"},{"name":"encrypted_data","type":"bytes"}]},{"kind":"class","name":"mt_set_client_DH_params","id":4110704415,"type":"Set_client_DH_params_answer","arguments":[{"name":"nonce","type":"int128"},{"name":"server_nonce","type":"int128"},{"name":"encrypted_data","type":"bytes"}]},{"kind":"class","name":"mt_rpc_drop_answer","id":1491380032,"type":"RpcDropAnswer","arguments":[{"name":"req_msg_id","type":"long"}]},{"kind":"class","name":"mt_get_future_salts","id":3105996036,"type":"FutureSalts","arguments":[{"name":"num","type":"int"}]},{"kind":"class","name":"mt_ping","id":2059302892,"type":"Pong","arguments":[{"name":"ping_id","type":"long"}]},{"kind":"class","name":"mt_ping_delay_disconnect","id":4081220492,"type":"Pong","arguments":[{"name":"ping_id","type":"long"},{"name":"disconnect_delay","type":"int"}]},{"kind":"class","name":"mt_destroy_session","id":3880853798,"type":"DestroySessionRes","arguments":[{"name":"session_id","type":"long"}]},{"kind":"class","name":"mt_destroy_auth_key","id":3510849888,"type":"DestroyAuthKeyRes","arguments":[]}] +[{ "kind": "class", "name": "mt_resPQ", "id": 85337187, "type": "ResPQ", "arguments": [{ "name": "nonce", "type": "int128" }, { "name": "server_nonce", "type": "int128" }, { "name": "pq", "type": "bytes" }, { "name": "server_public_key_fingerprints", "type": "long", "typeModifiers": { "isVector": true } }] }, { "kind": "class", "name": "mt_p_q_inner_data_dc", "id": 2851430293, "type": "P_Q_inner_data", "arguments": [{ "name": "pq", "type": "bytes" }, { "name": "p", "type": "bytes" }, { "name": "q", "type": "bytes" }, { "name": "nonce", "type": "int128" }, { "name": "server_nonce", "type": "int128" }, { "name": "new_nonce", "type": "int256" }, { "name": "dc", "type": "int" }] }, { "kind": "class", "name": "mt_p_q_inner_data_temp_dc", "id": 1459478408, "type": "P_Q_inner_data", "arguments": [{ "name": "pq", "type": "bytes" }, { "name": "p", "type": "bytes" }, { "name": "q", "type": "bytes" }, { "name": "nonce", "type": "int128" }, { "name": "server_nonce", "type": "int128" }, { "name": "new_nonce", "type": "int256" }, { "name": "dc", "type": "int" }, { "name": "expires_in", "type": "int" }] }, { "kind": "class", "name": "mt_server_DH_params_ok", "id": 3504867164, "type": "Server_DH_Params", "arguments": [{ "name": "nonce", "type": "int128" }, { "name": "server_nonce", "type": "int128" }, { "name": "encrypted_answer", "type": "bytes" }] }, { "kind": "class", "name": "mt_server_DH_inner_data", "id": 3045658042, "type": "Server_DH_inner_data", "arguments": [{ "name": "nonce", "type": "int128" }, { "name": "server_nonce", "type": "int128" }, { "name": "g", "type": "int" }, { "name": "dh_prime", "type": "bytes" }, { "name": "g_a", "type": "bytes" }, { "name": "server_time", "type": "int" }] }, { "kind": "class", "name": "mt_client_DH_inner_data", "id": 1715713620, "type": "Client_DH_Inner_Data", "arguments": [{ "name": "nonce", "type": "int128" }, { "name": "server_nonce", "type": "int128" }, { "name": "retry_id", "type": "long" }, { "name": "g_b", "type": "bytes" }] }, { "kind": "class", "name": "mt_dh_gen_ok", "id": 1003222836, "type": "Set_client_DH_params_answer", "arguments": [{ "name": "nonce", "type": "int128" }, { "name": "server_nonce", "type": "int128" }, { "name": "new_nonce_hash1", "type": "int128" }] }, { "kind": "class", "name": "mt_dh_gen_retry", "id": 1188831161, "type": "Set_client_DH_params_answer", "arguments": [{ "name": "nonce", "type": "int128" }, { "name": "server_nonce", "type": "int128" }, { "name": "new_nonce_hash2", "type": "int128" }] }, { "kind": "class", "name": "mt_dh_gen_fail", "id": 2795351554, "type": "Set_client_DH_params_answer", "arguments": [{ "name": "nonce", "type": "int128" }, { "name": "server_nonce", "type": "int128" }, { "name": "new_nonce_hash3", "type": "int128" }] }, { "kind": "class", "name": "mt_bind_auth_key_inner", "id": 1973679973, "type": "BindAuthKeyInner", "arguments": [{ "name": "nonce", "type": "long" }, { "name": "temp_auth_key_id", "type": "long" }, { "name": "perm_auth_key_id", "type": "long" }, { "name": "temp_session_id", "type": "long" }, { "name": "expires_at", "type": "int" }] }, { "kind": "class", "name": "mt_rpc_error", "id": 558156313, "type": "RpcError", "arguments": [{ "name": "error_code", "type": "int" }, { "name": "error_message", "type": "string" }] }, { "kind": "class", "name": "mt_rpc_answer_unknown", "id": 1579864942, "type": "RpcDropAnswer", "arguments": [] }, { "kind": "class", "name": "mt_rpc_answer_dropped_running", "id": 3447252358, "type": "RpcDropAnswer", "arguments": [] }, { "kind": "class", "name": "mt_rpc_answer_dropped", "id": 2755319991, "type": "RpcDropAnswer", "arguments": [{ "name": "msg_id", "type": "long" }, { "name": "seq_no", "type": "int" }, { "name": "bytes", "type": "int" }] }, { "kind": "class", "name": "mt_future_salt", "id": 155834844, "type": "FutureSalt", "arguments": [{ "name": "valid_since", "type": "int" }, { "name": "valid_until", "type": "int" }, { "name": "salt", "type": "long" }] }, { "kind": "class", "name": "mt_future_salts", "id": 2924480661, "type": "FutureSalts", "arguments": [{ "name": "req_msg_id", "type": "long" }, { "name": "now", "type": "int" }, { "name": "salts", "type": "mt_future_salt", "typeModifiers": { "isBareVector": true, "isBareType": true, "constructorId": 155834844 } }] }, { "kind": "class", "name": "mt_pong", "id": 880243653, "type": "Pong", "arguments": [{ "name": "msg_id", "type": "long" }, { "name": "ping_id", "type": "long" }] }, { "kind": "class", "name": "mt_destroy_session_ok", "id": 3793765884, "type": "DestroySessionRes", "arguments": [{ "name": "session_id", "type": "long" }] }, { "kind": "class", "name": "mt_destroy_session_none", "id": 1658015945, "type": "DestroySessionRes", "arguments": [{ "name": "session_id", "type": "long" }] }, { "kind": "class", "name": "mt_new_session_created", "id": 2663516424, "type": "NewSession", "arguments": [{ "name": "first_msg_id", "type": "long" }, { "name": "unique_id", "type": "long" }, { "name": "server_salt", "type": "long" }] }, { "kind": "class", "name": "mt_msgs_ack", "id": 1658238041, "type": "MsgsAck", "arguments": [{ "name": "msg_ids", "type": "long", "typeModifiers": { "isVector": true } }] }, { "kind": "class", "name": "mt_bad_msg_notification", "id": 2817521681, "type": "BadMsgNotification", "arguments": [{ "name": "bad_msg_id", "type": "long" }, { "name": "bad_msg_seqno", "type": "int" }, { "name": "error_code", "type": "int" }] }, { "kind": "class", "name": "mt_bad_server_salt", "id": 3987424379, "type": "BadMsgNotification", "arguments": [{ "name": "bad_msg_id", "type": "long" }, { "name": "bad_msg_seqno", "type": "int" }, { "name": "error_code", "type": "int" }, { "name": "new_server_salt", "type": "long" }] }, { "kind": "class", "name": "mt_msg_resend_req", "id": 2105940488, "type": "MsgResendReq", "arguments": [{ "name": "msg_ids", "type": "long", "typeModifiers": { "isVector": true } }] }, { "kind": "class", "name": "mt_msgs_state_req", "id": 3664378706, "type": "MsgsStateReq", "arguments": [{ "name": "msg_ids", "type": "long", "typeModifiers": { "isVector": true } }] }, { "kind": "class", "name": "mt_msgs_state_info", "id": 81704317, "type": "MsgsStateInfo", "arguments": [{ "name": "req_msg_id", "type": "long" }, { "name": "info", "type": "bytes" }] }, { "kind": "class", "name": "mt_msgs_all_info", "id": 2361446705, "type": "MsgsAllInfo", "arguments": [{ "name": "msg_ids", "type": "long", "typeModifiers": { "isVector": true } }, { "name": "info", "type": "bytes" }] }, { "kind": "class", "name": "mt_msg_detailed_info", "id": 661470918, "type": "MsgDetailedInfo", "arguments": [{ "name": "msg_id", "type": "long" }, { "name": "answer_msg_id", "type": "long" }, { "name": "bytes", "type": "int" }, { "name": "status", "type": "int" }] }, { "kind": "class", "name": "mt_msg_new_detailed_info", "id": 2157819615, "type": "MsgDetailedInfo", "arguments": [{ "name": "answer_msg_id", "type": "long" }, { "name": "bytes", "type": "int" }, { "name": "status", "type": "int" }] }, { "kind": "class", "name": "mt_destroy_auth_key_ok", "id": 4133544404, "type": "DestroyAuthKeyRes", "arguments": [] }, { "kind": "class", "name": "mt_destroy_auth_key_none", "id": 178201177, "type": "DestroyAuthKeyRes", "arguments": [] }, { "kind": "class", "name": "mt_destroy_auth_key_fail", "id": 3926956819, "type": "DestroyAuthKeyRes", "arguments": [] }, { "kind": "class", "name": "mt_http_wait", "id": 2459514271, "type": "HttpWait", "arguments": [{ "name": "max_delay", "type": "int" }, { "name": "wait_after", "type": "int" }, { "name": "max_wait", "type": "int" }] }, { "kind": "class", "name": "mt_req_pq_multi", "id": 3195965169, "type": "ResPQ", "arguments": [{ "name": "nonce", "type": "int128" }] }, { "kind": "class", "name": "mt_req_DH_params", "id": 3608339646, "type": "Server_DH_Params", "arguments": [{ "name": "nonce", "type": "int128" }, { "name": "server_nonce", "type": "int128" }, { "name": "p", "type": "bytes" }, { "name": "q", "type": "bytes" }, { "name": "public_key_fingerprint", "type": "long" }, { "name": "encrypted_data", "type": "bytes" }] }, { "kind": "class", "name": "mt_set_client_DH_params", "id": 4110704415, "type": "Set_client_DH_params_answer", "arguments": [{ "name": "nonce", "type": "int128" }, { "name": "server_nonce", "type": "int128" }, { "name": "encrypted_data", "type": "bytes" }] }, { "kind": "class", "name": "mt_rpc_drop_answer", "id": 1491380032, "type": "RpcDropAnswer", "arguments": [{ "name": "req_msg_id", "type": "long" }] }, { "kind": "class", "name": "mt_get_future_salts", "id": 3105996036, "type": "FutureSalts", "arguments": [{ "name": "num", "type": "int" }] }, { "kind": "class", "name": "mt_ping", "id": 2059302892, "type": "Pong", "arguments": [{ "name": "ping_id", "type": "long" }] }, { "kind": "class", "name": "mt_ping_delay_disconnect", "id": 4081220492, "type": "Pong", "arguments": [{ "name": "ping_id", "type": "long" }, { "name": "disconnect_delay", "type": "int" }] }, { "kind": "class", "name": "mt_destroy_session", "id": 3880853798, "type": "DestroySessionRes", "arguments": [{ "name": "session_id", "type": "long" }] }, { "kind": "class", "name": "mt_destroy_auth_key", "id": 3510849888, "type": "DestroyAuthKeyRes", "arguments": [] }] diff --git a/packages/tl/package.json b/packages/tl/package.json index 5af08cb1..6f54179a 100644 --- a/packages/tl/package.json +++ b/packages/tl/package.json @@ -1,37 +1,37 @@ { - "name": "@mtcute/tl", - "version": "185.1.0", - "description": "TL schema used for mtcute", - "author": "alina sireneva ", - "license": "MIT", - "scripts": { - "test": "tsc --noEmit --esModuleInterop tests/types.ts", - "fetch-mtp": "node --loader ts-node/esm scripts/fetch-mtp.ts", - "fetch-api": "node --loader ts-node/esm scripts/fetch-api.ts", - "fetch-errors": "node --loader ts-node/esm scripts/fetch-errors.ts", - "docs-cli": "node --loader ts-node/esm scripts/documentation.ts", - "gen-code": "node --loader ts-node/esm scripts/gen-code.ts", - "gen-rsa": "node --loader ts-node/esm scripts/gen-rsa-keys.ts", - "fetch-and-gen": "pnpm run fetch-api && pnpm run gen-code", - "build": "pnpm run -w build-package tl" - }, - "dependencies": { - "long": "5.2.3" - }, - "devDependencies": { - "@mtcute/core": "workspace:^", - "@mtcute/node": "workspace:^", - "@mtcute/tl-utils": "workspace:^", - "@types/js-yaml": "^4.0.5", - "cheerio": "1.0.0-rc.12", - "csv-parse": "^5.5.0", - "eager-async-pool": "^1.0.0", - "js-yaml": "4.1.0" - }, - "typedoc": { - "entryPoint": "index.d.ts" - }, - "jsrOnlyFields": { - "exports": {} - } -} \ No newline at end of file + "name": "@mtcute/tl", + "version": "185.1.0", + "description": "TL schema used for mtcute", + "author": "alina sireneva ", + "license": "MIT", + "scripts": { + "test": "tsc --noEmit --esModuleInterop tests/types.ts", + "fetch-mtp": "tsx scripts/fetch-mtp.ts", + "fetch-api": "tsx scripts/fetch-api.ts", + "fetch-errors": "tsx scripts/fetch-errors.ts", + "docs-cli": "tsx scripts/documentation.ts", + "gen-code": "tsx scripts/gen-code.ts", + "gen-rsa": "tsx scripts/gen-rsa-keys.ts", + "fetch-and-gen": "pnpm run fetch-api && pnpm run gen-code", + "build": "pnpm run -w build-package tl" + }, + "dependencies": { + "long": "5.2.3" + }, + "devDependencies": { + "@mtcute/core": "workspace:^", + "@mtcute/node": "workspace:^", + "@mtcute/tl-utils": "workspace:^", + "@types/js-yaml": "^4.0.5", + "cheerio": "1.0.0-rc.12", + "csv-parse": "^5.5.0", + "eager-async-pool": "^1.0.0", + "js-yaml": "4.1.0" + }, + "typedoc": { + "entryPoint": "index.d.ts" + }, + "jsrOnlyFields": { + "exports": {} + } +} diff --git a/packages/tl/raw-errors.json b/packages/tl/raw-errors.json index 22cb8929..947ad9a4 100644 --- a/packages/tl/raw-errors.json +++ b/packages/tl/raw-errors.json @@ -1 +1 @@ -{"base":{"BAD_REQUEST":400,"UNAUTHORIZED":401,"FORBIDDEN":403,"NOT_FOUND":404,"FLOOD":420,"SEE_OTHER":303,"NOT_ACCEPTABLE":406,"INTERNAL":500},"errors":{"ABOUT_TOO_LONG":{"code":400,"name":"ABOUT_TOO_LONG","description":"About string too long."},"ACCESS_TOKEN_EXPIRED":{"code":400,"name":"ACCESS_TOKEN_EXPIRED","description":"Access token expired."},"ACCESS_TOKEN_INVALID":{"code":400,"name":"ACCESS_TOKEN_INVALID","description":"Access token invalid."},"ADMIN_ID_INVALID":{"code":400,"name":"ADMIN_ID_INVALID","description":"The specified admin ID is invalid."},"ADMIN_RANK_EMOJI_NOT_ALLOWED":{"code":400,"name":"ADMIN_RANK_EMOJI_NOT_ALLOWED","description":"An admin rank cannot contain emojis."},"ADMIN_RANK_INVALID":{"code":400,"name":"ADMIN_RANK_INVALID","description":"The specified admin rank is invalid."},"ADMINS_TOO_MUCH":{"code":400,"name":"ADMINS_TOO_MUCH","description":"There are too many admins."},"ALBUM_PHOTOS_TOO_MANY":{"code":400,"name":"ALBUM_PHOTOS_TOO_MANY","description":"You have uploaded too many profile photos, delete some before retrying."},"API_ID_INVALID":{"code":400,"name":"API_ID_INVALID","description":"API ID invalid."},"API_ID_PUBLISHED_FLOOD":{"code":400,"name":"API_ID_PUBLISHED_FLOOD","description":"This API id was published somewhere, you can't use it now."},"ARTICLE_TITLE_EMPTY":{"code":400,"name":"ARTICLE_TITLE_EMPTY","description":"The title of the article is empty."},"AUDIO_CONTENT_URL_EMPTY":{"code":400,"name":"AUDIO_CONTENT_URL_EMPTY","description":"The remote URL specified in the content field is empty."},"AUDIO_TITLE_EMPTY":{"code":400,"name":"AUDIO_TITLE_EMPTY","description":"An empty audio title was provided."},"AUTH_BYTES_INVALID":{"code":400,"name":"AUTH_BYTES_INVALID","description":"The provided authorization is invalid."},"AUTH_TOKEN_ALREADY_ACCEPTED":{"code":400,"name":"AUTH_TOKEN_ALREADY_ACCEPTED","description":"The specified auth token was already accepted."},"AUTH_TOKEN_EXCEPTION":{"code":400,"name":"AUTH_TOKEN_EXCEPTION","description":"An error occurred while importing the auth token."},"AUTH_TOKEN_EXPIRED":{"code":400,"name":"AUTH_TOKEN_EXPIRED","description":"The authorization token has expired."},"AUTH_TOKEN_INVALID":{"code":400,"name":"AUTH_TOKEN_INVALID","description":"The specified auth token is invalid."},"AUTH_TOKEN_INVALIDX":{"code":400,"name":"AUTH_TOKEN_INVALIDX","description":"The specified auth token is invalid."},"AUTOARCHIVE_NOT_AVAILABLE":{"code":400,"name":"AUTOARCHIVE_NOT_AVAILABLE","description":"The autoarchive setting is not available at this time: please check the value of the [autoarchive_setting_available field in client config »](https://core.telegram.org/api/config#client-configuration) before calling this method."},"BANK_CARD_NUMBER_INVALID":{"code":400,"name":"BANK_CARD_NUMBER_INVALID","description":"The specified card number is invalid."},"BANNED_RIGHTS_INVALID":{"code":400,"name":"BANNED_RIGHTS_INVALID","description":"You provided some invalid flags in the banned rights."},"BOT_APP_INVALID":{"code":400,"name":"BOT_APP_INVALID","description":"The specified bot app is invalid."},"BOT_CHANNELS_NA":{"code":400,"name":"BOT_CHANNELS_NA","description":"Bots can't edit admin privileges."},"BOT_COMMAND_DESCRIPTION_INVALID":{"code":400,"name":"BOT_COMMAND_DESCRIPTION_INVALID","description":"The specified command description is invalid."},"BOT_COMMAND_INVALID":{"code":400,"name":"BOT_COMMAND_INVALID","description":"The specified command is invalid."},"BOT_DOMAIN_INVALID":{"code":400,"name":"BOT_DOMAIN_INVALID","description":"Bot domain invalid."},"BOT_GROUPS_BLOCKED":{"code":400,"name":"BOT_GROUPS_BLOCKED","description":"This bot can't be added to groups."},"BOT_INLINE_DISABLED":{"code":400,"name":"BOT_INLINE_DISABLED","description":"This bot can't be used in inline mode."},"BOT_INVALID":{"code":400,"name":"BOT_INVALID","description":"This is not a valid bot."},"BOT_MISSING":{"code":400,"name":"BOT_MISSING","description":"Only bots can call this method, please use [@stickers](https://t.me/stickers) if you're a user."},"BOT_ONESIDE_NOT_AVAIL":{"code":400,"name":"BOT_ONESIDE_NOT_AVAIL","description":"Bots can't pin messages in PM just for themselves."},"BOT_PAYMENTS_DISABLED":{"code":400,"name":"BOT_PAYMENTS_DISABLED","description":"Please enable bot payments in botfather before calling this method."},"BOT_RESPONSE_TIMEOUT":{"code":400,"name":"BOT_RESPONSE_TIMEOUT","description":"A timeout occurred while fetching data from the bot."},"BOT_SCORE_NOT_MODIFIED":{"code":400,"name":"BOT_SCORE_NOT_MODIFIED","description":"The score wasn't modified."},"BOTS_TOO_MUCH":{"code":400,"name":"BOTS_TOO_MUCH","description":"There are too many bots in this chat/channel."},"BROADCAST_ID_INVALID":{"code":400,"name":"BROADCAST_ID_INVALID","description":"Broadcast ID invalid."},"BROADCAST_PUBLIC_VOTERS_FORBIDDEN":{"code":400,"name":"BROADCAST_PUBLIC_VOTERS_FORBIDDEN","description":"You can't forward polls with public voters."},"BROADCAST_REQUIRED":{"code":400,"name":"BROADCAST_REQUIRED","description":"This method can only be called on a channel, please use stats.getMegagroupStats for supergroups."},"BUTTON_DATA_INVALID":{"code":400,"name":"BUTTON_DATA_INVALID","description":"The data of one or more of the buttons you provided is invalid."},"BUTTON_TEXT_INVALID":{"code":400,"name":"BUTTON_TEXT_INVALID","description":"The specified button text is invalid."},"BUTTON_TYPE_INVALID":{"code":400,"name":"BUTTON_TYPE_INVALID","description":"The type of one or more of the buttons you provided is invalid."},"BUTTON_URL_INVALID":{"code":400,"name":"BUTTON_URL_INVALID","description":"Button URL invalid."},"BUTTON_USER_PRIVACY_RESTRICTED":{"code":400,"name":"BUTTON_USER_PRIVACY_RESTRICTED","description":"The privacy setting of the user specified in a [inputKeyboardButtonUserProfile](/constructor/inputKeyboardButtonUserProfile) button do not allow creating such a button."},"CALL_ALREADY_ACCEPTED":{"code":400,"name":"CALL_ALREADY_ACCEPTED","description":"The call was already accepted."},"CALL_ALREADY_DECLINED":{"code":400,"name":"CALL_ALREADY_DECLINED","description":"The call was already declined."},"CALL_OCCUPY_FAILED":{"code":400,"name":"CALL_OCCUPY_FAILED","description":"The call failed because the user is already making another call."},"CALL_PEER_INVALID":{"code":400,"name":"CALL_PEER_INVALID","description":"The provided call peer object is invalid."},"CALL_PROTOCOL_FLAGS_INVALID":{"code":400,"name":"CALL_PROTOCOL_FLAGS_INVALID","description":"Call protocol flags invalid."},"CDN_METHOD_INVALID":{"code":400,"name":"CDN_METHOD_INVALID","description":"You can't call this method in a CDN DC."},"CHANNEL_FORUM_MISSING":{"code":400,"name":"CHANNEL_FORUM_MISSING","description":"This supergroup is not a forum."},"CHANNEL_ID_INVALID":{"code":400,"name":"CHANNEL_ID_INVALID","description":"The specified supergroup ID is invalid."},"CHANNEL_INVALID":{"code":400,"name":"CHANNEL_INVALID","description":"The provided channel is invalid."},"CHANNEL_PARICIPANT_MISSING":{"code":400,"name":"CHANNEL_PARICIPANT_MISSING","description":"The current user is not in the channel."},"CHANNEL_PRIVATE":{"code":400,"name":"CHANNEL_PRIVATE","description":"You haven't joined this channel/supergroup."},"CHANNEL_TOO_BIG":{"code":400,"name":"CHANNEL_TOO_BIG","description":"This channel has too many participants (>1000) to be deleted."},"CHANNEL_TOO_LARGE":{"code":400,"name":"CHANNEL_TOO_LARGE","description":"Channel is too large to be deleted; this error is issued when trying to delete channels with more than 1000 members (subject to change)."},"CHANNELS_ADMIN_LOCATED_TOO_MUCH":{"code":400,"name":"CHANNELS_ADMIN_LOCATED_TOO_MUCH","description":"The user has reached the limit of public geogroups."},"CHANNELS_ADMIN_PUBLIC_TOO_MUCH":{"code":400,"name":"CHANNELS_ADMIN_PUBLIC_TOO_MUCH","description":"You're admin of too many public channels, make some channels private to change the username of this channel."},"CHANNELS_TOO_MUCH":{"code":400,"name":"CHANNELS_TOO_MUCH","description":"You have joined too many channels/supergroups."},"CHAT_ABOUT_NOT_MODIFIED":{"code":400,"name":"CHAT_ABOUT_NOT_MODIFIED","description":"About text has not changed."},"CHAT_ABOUT_TOO_LONG":{"code":400,"name":"CHAT_ABOUT_TOO_LONG","description":"Chat about too long."},"CHAT_ADMIN_REQUIRED":{"code":400,"name":"CHAT_ADMIN_REQUIRED","description":"You must be an admin in this chat to do this."},"CHAT_DISCUSSION_UNALLOWED":{"code":400,"name":"CHAT_DISCUSSION_UNALLOWED","description":"You can't enable forum topics in a discussion group linked to a channel."},"CHAT_FORWARDS_RESTRICTED":{"code":400,"name":"CHAT_FORWARDS_RESTRICTED","description":"You can't forward messages from a protected chat."},"CHAT_ID_EMPTY":{"code":400,"name":"CHAT_ID_EMPTY","description":"The provided chat ID is empty."},"CHAT_ID_INVALID":{"code":400,"name":"CHAT_ID_INVALID","description":"The provided chat id is invalid."},"CHAT_INVALID":{"code":400,"name":"CHAT_INVALID","description":"Invalid chat."},"CHAT_INVITE_PERMANENT":{"code":400,"name":"CHAT_INVITE_PERMANENT","description":"You can't set an expiration date on permanent invite links."},"CHAT_LINK_EXISTS":{"code":400,"name":"CHAT_LINK_EXISTS","description":"The chat is public, you can't hide the history to new users."},"CHAT_NOT_MODIFIED":{"code":400,"name":"CHAT_NOT_MODIFIED","description":"The pinned message wasn't modified."},"CHAT_PUBLIC_REQUIRED":{"code":400,"name":"CHAT_PUBLIC_REQUIRED","description":"You can only enable join requests in public groups."},"CHAT_RESTRICTED":{"code":400,"name":"CHAT_RESTRICTED","description":"You can't send messages in this chat, you were restricted."},"CHAT_REVOKE_DATE_UNSUPPORTED":{"code":400,"name":"CHAT_REVOKE_DATE_UNSUPPORTED","description":"`min_date` and `max_date` are not available for using with non-user peers."},"CHAT_SEND_INLINE_FORBIDDEN":{"code":400,"name":"CHAT_SEND_INLINE_FORBIDDEN","description":"You can't send inline messages in this group."},"CHAT_TITLE_EMPTY":{"code":400,"name":"CHAT_TITLE_EMPTY","description":"No chat title provided."},"CHAT_TOO_BIG":{"code":400,"name":"CHAT_TOO_BIG","description":"This method is not available for groups with more than `chat_read_mark_size_threshold` members, [see client configuration »](https://core.telegram.org/api/config#client-configuration)."},"CODE_EMPTY":{"code":400,"name":"CODE_EMPTY","description":"The provided code is empty."},"CODE_HASH_INVALID":{"code":400,"name":"CODE_HASH_INVALID","description":"Code hash invalid."},"CODE_INVALID":{"code":400,"name":"CODE_INVALID","description":"Code invalid."},"CONNECTION_API_ID_INVALID":{"code":400,"name":"CONNECTION_API_ID_INVALID","description":"The provided API id is invalid."},"CONNECTION_APP_VERSION_EMPTY":{"code":400,"name":"CONNECTION_APP_VERSION_EMPTY","description":"App version is empty."},"CONNECTION_LAYER_INVALID":{"code":400,"name":"CONNECTION_LAYER_INVALID","description":"Layer invalid."},"CONTACT_ADD_MISSING":{"code":400,"name":"CONTACT_ADD_MISSING","description":"Contact to add is missing."},"CONTACT_ID_INVALID":{"code":400,"name":"CONTACT_ID_INVALID","description":"The provided contact ID is invalid."},"CONTACT_NAME_EMPTY":{"code":400,"name":"CONTACT_NAME_EMPTY","description":"Contact name empty."},"CONTACT_REQ_MISSING":{"code":400,"name":"CONTACT_REQ_MISSING","description":"Missing contact request."},"CREATE_CALL_FAILED":{"code":400,"name":"CREATE_CALL_FAILED","description":"An error occurred while creating the call."},"CURRENCY_TOTAL_AMOUNT_INVALID":{"code":400,"name":"CURRENCY_TOTAL_AMOUNT_INVALID","description":"The total amount of all prices is invalid."},"DATA_INVALID":{"code":400,"name":"DATA_INVALID","description":"Encrypted data invalid."},"DATA_JSON_INVALID":{"code":400,"name":"DATA_JSON_INVALID","description":"The provided JSON data is invalid."},"DATA_TOO_LONG":{"code":400,"name":"DATA_TOO_LONG","description":"Data too long."},"DATE_EMPTY":{"code":400,"name":"DATE_EMPTY","description":"Date empty."},"DC_ID_INVALID":{"code":400,"name":"DC_ID_INVALID","description":"The provided DC ID is invalid."},"DH_G_A_INVALID":{"code":400,"name":"DH_G_A_INVALID","description":"g_a invalid."},"DOCUMENT_INVALID":{"code":400,"name":"DOCUMENT_INVALID","description":"The specified document is invalid."},"EMAIL_HASH_EXPIRED":{"code":400,"name":"EMAIL_HASH_EXPIRED","description":"Email hash expired."},"EMAIL_INVALID":{"code":400,"name":"EMAIL_INVALID","description":"The specified email is invalid."},"EMAIL_NOT_SETUP":{"code":400,"name":"EMAIL_NOT_SETUP","description":"In order to change the login email with emailVerifyPurposeLoginChange, an existing login email must already be set using emailVerifyPurposeLoginSetup."},"EMAIL_UNCONFIRMED":{"code":400,"name":"EMAIL_UNCONFIRMED","description":"Email unconfirmed."},"EMAIL_UNCONFIRMED_%d":{"code":400,"name":"EMAIL_UNCONFIRMED_%d","description":"Email unconfirmed, the length of the code must be %d","_paramNames":["code_length"]},"EMAIL_VERIFY_EXPIRED":{"code":400,"name":"EMAIL_VERIFY_EXPIRED","description":"The verification email has expired."},"EMOJI_INVALID":{"code":400,"name":"EMOJI_INVALID","description":"The specified theme emoji is valid."},"EMOJI_MARKUP_INVALID":{"code":400,"name":"EMOJI_MARKUP_INVALID","description":"The specified `video_emoji_markup` was invalid."},"EMOJI_NOT_MODIFIED":{"code":400,"name":"EMOJI_NOT_MODIFIED","description":"The theme wasn't changed."},"EMOTICON_EMPTY":{"code":400,"name":"EMOTICON_EMPTY","description":"The emoji is empty."},"EMOTICON_INVALID":{"code":400,"name":"EMOTICON_INVALID","description":"The specified emoji is invalid."},"EMOTICON_STICKERPACK_MISSING":{"code":400,"name":"EMOTICON_STICKERPACK_MISSING","description":"inputStickerSetDice.emoji cannot be empty."},"ENCRYPTED_MESSAGE_INVALID":{"code":400,"name":"ENCRYPTED_MESSAGE_INVALID","description":"Encrypted message invalid."},"ENCRYPTION_ALREADY_ACCEPTED":{"code":400,"name":"ENCRYPTION_ALREADY_ACCEPTED","description":"Secret chat already accepted."},"ENCRYPTION_ALREADY_DECLINED":{"code":400,"name":"ENCRYPTION_ALREADY_DECLINED","description":"The secret chat was already declined."},"ENCRYPTION_DECLINED":{"code":400,"name":"ENCRYPTION_DECLINED","description":"The secret chat was declined."},"ENCRYPTION_ID_INVALID":{"code":400,"name":"ENCRYPTION_ID_INVALID","description":"The provided secret chat ID is invalid."},"ENTITIES_TOO_LONG":{"code":400,"name":"ENTITIES_TOO_LONG","description":"You provided too many styled message entities."},"ENTITY_BOUNDS_INVALID":{"code":400,"name":"ENTITY_BOUNDS_INVALID","description":"A specified [entity offset or length](/api/entities#entity-length) is invalid, see [here »](/api/entities#entity-length) for info on how to properly compute the entity offset/length."},"ENTITY_MENTION_USER_INVALID":{"code":400,"name":"ENTITY_MENTION_USER_INVALID","description":"You mentioned an invalid user."},"ERROR_TEXT_EMPTY":{"code":400,"name":"ERROR_TEXT_EMPTY","description":"The provided error message is empty."},"EXPIRE_DATE_INVALID":{"code":400,"name":"EXPIRE_DATE_INVALID","description":"The specified expiration date is invalid."},"EXPORT_CARD_INVALID":{"code":400,"name":"EXPORT_CARD_INVALID","description":"Provided card is invalid."},"EXTERNAL_URL_INVALID":{"code":400,"name":"EXTERNAL_URL_INVALID","description":"External URL invalid."},"FILE_CONTENT_TYPE_INVALID":{"code":400,"name":"FILE_CONTENT_TYPE_INVALID","description":"File content-type is invalid."},"FILE_EMTPY":{"code":400,"name":"FILE_EMTPY","description":"An empty file was provided."},"FILE_ID_INVALID":{"code":400,"name":"FILE_ID_INVALID","description":"The provided file id is invalid."},"FILE_PART_EMPTY":{"code":400,"name":"FILE_PART_EMPTY","description":"The provided file part is empty."},"FILE_PART_INVALID":{"code":400,"name":"FILE_PART_INVALID","description":"The file part number is invalid."},"FILE_PART_LENGTH_INVALID":{"code":400,"name":"FILE_PART_LENGTH_INVALID","description":"The length of a file part is invalid."},"FILE_PART_SIZE_CHANGED":{"code":400,"name":"FILE_PART_SIZE_CHANGED","description":"Provided file part size has changed."},"FILE_PART_SIZE_INVALID":{"code":400,"name":"FILE_PART_SIZE_INVALID","description":"The provided file part size is invalid."},"FILE_PART_TOO_BIG":{"code":400,"name":"FILE_PART_TOO_BIG","description":"The uploaded file part is too big."},"FILE_PARTS_INVALID":{"code":400,"name":"FILE_PARTS_INVALID","description":"The number of file parts is invalid."},"FILE_REFERENCE_EMPTY":{"code":400,"name":"FILE_REFERENCE_EMPTY","description":"An empty [file reference](https://core.telegram.org/api/file_reference) was specified."},"FILE_REFERENCE_EXPIRED":{"code":400,"name":"FILE_REFERENCE_EXPIRED","description":"File reference expired, it must be refetched as described in [the documentation](https://core.telegram.org/api/file_reference)."},"FILE_REFERENCE_INVALID":{"code":400,"name":"FILE_REFERENCE_INVALID","description":"The specified [file reference](https://core.telegram.org/api/file_reference) is invalid."},"FILE_TITLE_EMPTY":{"code":400,"name":"FILE_TITLE_EMPTY","description":"An empty file title was specified."},"FILE_TOKEN_INVALID":{"code":400,"name":"FILE_TOKEN_INVALID","description":"The specified file token is invalid."},"FILTER_ID_INVALID":{"code":400,"name":"FILTER_ID_INVALID","description":"The specified filter ID is invalid."},"FILTER_INCLUDE_EMPTY":{"code":400,"name":"FILTER_INCLUDE_EMPTY","description":"The include_peers vector of the filter is empty."},"FILTER_NOT_SUPPORTED":{"code":400,"name":"FILTER_NOT_SUPPORTED","description":"The specified filter cannot be used in this context."},"FILTER_TITLE_EMPTY":{"code":400,"name":"FILTER_TITLE_EMPTY","description":"The title field of the filter is empty."},"FIRSTNAME_INVALID":{"code":400,"name":"FIRSTNAME_INVALID","description":"The first name is invalid."},"FOLDER_ID_EMPTY":{"code":400,"name":"FOLDER_ID_EMPTY","description":"An empty folder ID was specified."},"FOLDER_ID_INVALID":{"code":400,"name":"FOLDER_ID_INVALID","description":"Invalid folder ID."},"FRESH_CHANGE_ADMINS_FORBIDDEN":{"code":400,"name":"FRESH_CHANGE_ADMINS_FORBIDDEN","description":"You were just elected admin, you can't add or modify other admins yet."},"FROM_MESSAGE_BOT_DISABLED":{"code":400,"name":"FROM_MESSAGE_BOT_DISABLED","description":"Bots can't use fromMessage min constructors."},"FROM_PEER_INVALID":{"code":400,"name":"FROM_PEER_INVALID","description":"The specified from_id is invalid."},"GAME_BOT_INVALID":{"code":400,"name":"GAME_BOT_INVALID","description":"Bots can't send another bot's game."},"GEO_POINT_INVALID":{"code":400,"name":"GEO_POINT_INVALID","description":"Invalid geoposition provided."},"GIF_CONTENT_TYPE_INVALID":{"code":400,"name":"GIF_CONTENT_TYPE_INVALID","description":"GIF content-type invalid."},"GIF_ID_INVALID":{"code":400,"name":"GIF_ID_INVALID","description":"The provided GIF ID is invalid."},"GRAPH_EXPIRED_RELOAD":{"code":400,"name":"GRAPH_EXPIRED_RELOAD","description":"This graph has expired, please obtain a new graph token."},"GRAPH_INVALID_RELOAD":{"code":400,"name":"GRAPH_INVALID_RELOAD","description":"Invalid graph token provided, please reload the stats and provide the updated token."},"GRAPH_OUTDATED_RELOAD":{"code":400,"name":"GRAPH_OUTDATED_RELOAD","description":"The graph is outdated, please get a new async token using stats.getBroadcastStats."},"GROUPCALL_ALREADY_DISCARDED":{"code":400,"name":"GROUPCALL_ALREADY_DISCARDED","description":"The group call was already discarded."},"GROUPCALL_FORBIDDEN":{"code":400,"name":"GROUPCALL_FORBIDDEN","description":"The group call has already ended."},"GROUPCALL_INVALID":{"code":400,"name":"GROUPCALL_INVALID","description":"The specified group call is invalid."},"GROUPCALL_JOIN_MISSING":{"code":400,"name":"GROUPCALL_JOIN_MISSING","description":"You haven't joined this group call."},"GROUPCALL_NOT_MODIFIED":{"code":400,"name":"GROUPCALL_NOT_MODIFIED","description":"Group call settings weren't modified."},"GROUPCALL_SSRC_DUPLICATE_MUCH":{"code":400,"name":"GROUPCALL_SSRC_DUPLICATE_MUCH","description":"The app needs to retry joining the group call with a new SSRC value."},"GROUPED_MEDIA_INVALID":{"code":400,"name":"GROUPED_MEDIA_INVALID","description":"Invalid grouped media."},"HASH_INVALID":{"code":400,"name":"HASH_INVALID","description":"The provided hash is invalid."},"HIDE_REQUESTER_MISSING":{"code":400,"name":"HIDE_REQUESTER_MISSING","description":"The join request was missing or was already handled."},"IMAGE_PROCESS_FAILED":{"code":400,"name":"IMAGE_PROCESS_FAILED","description":"Failure while processing image."},"IMPORT_FILE_INVALID":{"code":400,"name":"IMPORT_FILE_INVALID","description":"The specified chat export file is invalid."},"IMPORT_FORMAT_UNRECOGNIZED":{"code":400,"name":"IMPORT_FORMAT_UNRECOGNIZED","description":"The specified chat export file was exported from an unsupported chat app."},"IMPORT_ID_INVALID":{"code":400,"name":"IMPORT_ID_INVALID","description":"The specified import ID is invalid."},"IMPORT_TOKEN_INVALID":{"code":400,"name":"IMPORT_TOKEN_INVALID","description":"The specified token is invalid."},"INLINE_RESULT_EXPIRED":{"code":400,"name":"INLINE_RESULT_EXPIRED","description":"The inline query expired."},"INPUT_FILTER_INVALID":{"code":400,"name":"INPUT_FILTER_INVALID","description":"The specified filter is invalid."},"INPUT_TEXT_EMPTY":{"code":400,"name":"INPUT_TEXT_EMPTY","description":"The specified text is empty."},"INPUT_USER_DEACTIVATED":{"code":400,"name":"INPUT_USER_DEACTIVATED","description":"The specified user was deleted."},"INVITE_FORBIDDEN_WITH_JOINAS":{"code":400,"name":"INVITE_FORBIDDEN_WITH_JOINAS","description":"If the user has anonymously joined a group call as a channel, they can't invite other users to the group call because that would cause deanonymization, because the invite would be sent using the original user ID, not the anonymized channel ID."},"INVITE_HASH_EMPTY":{"code":400,"name":"INVITE_HASH_EMPTY","description":"The invite hash is empty."},"INVITE_HASH_EXPIRED":{"code":400,"name":"INVITE_HASH_EXPIRED","description":"The invite link has expired."},"INVITE_HASH_INVALID":{"code":400,"name":"INVITE_HASH_INVALID","description":"The invite hash is invalid."},"INVITE_REQUEST_SENT":{"code":400,"name":"INVITE_REQUEST_SENT","description":"You have successfully requested to join this chat or channel."},"INVITE_REVOKED_MISSING":{"code":400,"name":"INVITE_REVOKED_MISSING","description":"The specified invite link was already revoked or is invalid."},"INVITE_SLUG_EMPTY":{"code":400,"name":"INVITE_SLUG_EMPTY","description":"The specified invite slug is empty."},"INVITES_TOO_MUCH":{"code":400,"name":"INVITES_TOO_MUCH","description":"The maximum number of per-folder invites specified by the `chatlist_invites_limit_default`/`chatlist_invites_limit_premium` [client configuration parameters »](/api/config#chatlist-invites-limit-default) was reached."},"INVOICE_PAYLOAD_INVALID":{"code":400,"name":"INVOICE_PAYLOAD_INVALID","description":"The specified invoice payload is invalid."},"JOIN_AS_PEER_INVALID":{"code":400,"name":"JOIN_AS_PEER_INVALID","description":"The specified peer cannot be used to join a group call."},"LANG_CODE_INVALID":{"code":400,"name":"LANG_CODE_INVALID","description":"The specified language code is invalid."},"LANG_CODE_NOT_SUPPORTED":{"code":400,"name":"LANG_CODE_NOT_SUPPORTED","description":"The specified language code is not supported."},"LANG_PACK_INVALID":{"code":400,"name":"LANG_PACK_INVALID","description":"The provided language pack is invalid."},"LASTNAME_INVALID":{"code":400,"name":"LASTNAME_INVALID","description":"The last name is invalid."},"LIMIT_INVALID":{"code":400,"name":"LIMIT_INVALID","description":"The provided limit is invalid."},"LINK_NOT_MODIFIED":{"code":400,"name":"LINK_NOT_MODIFIED","description":"Discussion link not modified."},"LOCATION_INVALID":{"code":400,"name":"LOCATION_INVALID","description":"The provided location is invalid."},"MAX_DATE_INVALID":{"code":400,"name":"MAX_DATE_INVALID","description":"The specified maximum date is invalid."},"MAX_ID_INVALID":{"code":400,"name":"MAX_ID_INVALID","description":"The provided max ID is invalid."},"MAX_QTS_INVALID":{"code":400,"name":"MAX_QTS_INVALID","description":"The specified max_qts is invalid."},"MD5_CHECKSUM_INVALID":{"code":400,"name":"MD5_CHECKSUM_INVALID","description":"The MD5 checksums do not match."},"MEDIA_CAPTION_TOO_LONG":{"code":400,"name":"MEDIA_CAPTION_TOO_LONG","description":"The caption is too long."},"MEDIA_EMPTY":{"code":400,"name":"MEDIA_EMPTY","description":"The provided media object is invalid."},"MEDIA_GROUPED_INVALID":{"code":400,"name":"MEDIA_GROUPED_INVALID","description":"You tried to send media of different types in an album."},"MEDIA_INVALID":{"code":400,"name":"MEDIA_INVALID","description":"Media invalid."},"MEDIA_NEW_INVALID":{"code":400,"name":"MEDIA_NEW_INVALID","description":"The new media is invalid."},"MEDIA_PREV_INVALID":{"code":400,"name":"MEDIA_PREV_INVALID","description":"Previous media invalid."},"MEGAGROUP_ID_INVALID":{"code":400,"name":"MEGAGROUP_ID_INVALID","description":"Invalid supergroup ID."},"MEGAGROUP_PREHISTORY_HIDDEN":{"code":400,"name":"MEGAGROUP_PREHISTORY_HIDDEN","description":"Group with hidden history for new members can't be set as discussion groups."},"MEGAGROUP_REQUIRED":{"code":400,"name":"MEGAGROUP_REQUIRED","description":"You can only use this method on a supergroup."},"MESSAGE_EDIT_TIME_EXPIRED":{"code":400,"name":"MESSAGE_EDIT_TIME_EXPIRED","description":"You can't edit this message anymore, too much time has passed since its creation."},"MESSAGE_EMPTY":{"code":400,"name":"MESSAGE_EMPTY","description":"The provided message is empty."},"MESSAGE_ID_INVALID":{"code":400,"name":"MESSAGE_ID_INVALID","description":"The provided message id is invalid."},"MESSAGE_IDS_EMPTY":{"code":400,"name":"MESSAGE_IDS_EMPTY","description":"No message ids were provided."},"MESSAGE_NOT_MODIFIED":{"code":400,"name":"MESSAGE_NOT_MODIFIED","description":"The provided message data is identical to the previous message data, the message wasn't modified."},"MESSAGE_POLL_CLOSED":{"code":400,"name":"MESSAGE_POLL_CLOSED","description":"Poll closed."},"MESSAGE_TOO_LONG":{"code":400,"name":"MESSAGE_TOO_LONG","description":"The provided message is too long."},"METHOD_INVALID":{"code":400,"name":"METHOD_INVALID","description":"The specified method is invalid."},"MIN_DATE_INVALID":{"code":400,"name":"MIN_DATE_INVALID","description":"The specified minimum date is invalid."},"MSG_ID_INVALID":{"code":400,"name":"MSG_ID_INVALID","description":"Invalid message ID provided."},"MSG_TOO_OLD":{"code":400,"name":"MSG_TOO_OLD","description":"[`chat_read_mark_expire_period` seconds](https://core.telegram.org/api/config#chat-read-mark-expire-period) have passed since the message was sent, read receipts were deleted."},"MSG_WAIT_FAILED":{"code":400,"name":"MSG_WAIT_FAILED","description":"A waiting call returned an error."},"MULTI_MEDIA_TOO_LONG":{"code":400,"name":"MULTI_MEDIA_TOO_LONG","description":"Too many media files for album."},"NEW_SALT_INVALID":{"code":400,"name":"NEW_SALT_INVALID","description":"The new salt is invalid."},"NEW_SETTINGS_EMPTY":{"code":400,"name":"NEW_SETTINGS_EMPTY","description":"No password is set on the current account, and no new password was specified in `new_settings`."},"NEW_SETTINGS_INVALID":{"code":400,"name":"NEW_SETTINGS_INVALID","description":"The new password settings are invalid."},"NEXT_OFFSET_INVALID":{"code":400,"name":"NEXT_OFFSET_INVALID","description":"The specified offset is longer than 64 bytes."},"OFFSET_INVALID":{"code":400,"name":"OFFSET_INVALID","description":"The provided offset is invalid."},"OFFSET_PEER_ID_INVALID":{"code":400,"name":"OFFSET_PEER_ID_INVALID","description":"The provided offset peer is invalid."},"OPTION_INVALID":{"code":400,"name":"OPTION_INVALID","description":"Invalid option selected."},"OPTIONS_TOO_MUCH":{"code":400,"name":"OPTIONS_TOO_MUCH","description":"Too many options provided."},"ORDER_INVALID":{"code":400,"name":"ORDER_INVALID","description":"The specified username order is invalid."},"PACK_SHORT_NAME_INVALID":{"code":400,"name":"PACK_SHORT_NAME_INVALID","description":"Short pack name invalid."},"PACK_SHORT_NAME_OCCUPIED":{"code":400,"name":"PACK_SHORT_NAME_OCCUPIED","description":"A stickerpack with this name already exists."},"PACK_TITLE_INVALID":{"code":400,"name":"PACK_TITLE_INVALID","description":"The stickerpack title is invalid."},"PARTICIPANT_ID_INVALID":{"code":400,"name":"PARTICIPANT_ID_INVALID","description":"The specified participant ID is invalid."},"PARTICIPANT_JOIN_MISSING":{"code":400,"name":"PARTICIPANT_JOIN_MISSING","description":"Trying to enable a presentation, when the user hasn't joined the Video Chat with [phone.joinGroupCall](https://core.telegram.org/method/phone.joinGroupCall)."},"PARTICIPANT_VERSION_OUTDATED":{"code":400,"name":"PARTICIPANT_VERSION_OUTDATED","description":"The other participant does not use an up to date telegram client with support for calls."},"PARTICIPANTS_TOO_FEW":{"code":400,"name":"PARTICIPANTS_TOO_FEW","description":"Not enough participants."},"PASSWORD_EMPTY":{"code":400,"name":"PASSWORD_EMPTY","description":"The provided password is empty."},"PASSWORD_HASH_INVALID":{"code":400,"name":"PASSWORD_HASH_INVALID","description":"The provided password hash is invalid."},"PASSWORD_MISSING":{"code":400,"name":"PASSWORD_MISSING","description":"You must enable 2FA in order to transfer ownership of a channel."},"PASSWORD_RECOVERY_EXPIRED":{"code":400,"name":"PASSWORD_RECOVERY_EXPIRED","description":"The recovery code has expired."},"PASSWORD_RECOVERY_NA":{"code":400,"name":"PASSWORD_RECOVERY_NA","description":"No email was set, can't recover password via email."},"PASSWORD_REQUIRED":{"code":400,"name":"PASSWORD_REQUIRED","description":"A [2FA password](https://core.telegram.org/api/srp) must be configured to use Telegram Passport."},"PASSWORD_TOO_FRESH_%d":{"code":400,"name":"PASSWORD_TOO_FRESH_%d","description":"The password was added too recently and %d seconds must pass before using the method","_paramNames":["seconds"]},"PAYMENT_PROVIDER_INVALID":{"code":400,"name":"PAYMENT_PROVIDER_INVALID","description":"The specified payment provider is invalid."},"PEER_HISTORY_EMPTY":{"code":400,"name":"PEER_HISTORY_EMPTY","description":"You can't pin an empty chat with a user."},"PEER_ID_INVALID":{"code":400,"name":"PEER_ID_INVALID","description":"The provided peer id is invalid."},"PEER_ID_NOT_SUPPORTED":{"code":400,"name":"PEER_ID_NOT_SUPPORTED","description":"The provided peer ID is not supported."},"PEERS_LIST_EMPTY":{"code":400,"name":"PEERS_LIST_EMPTY","description":"The specified list of peers is empty."},"PERSISTENT_TIMESTAMP_EMPTY":{"code":400,"name":"PERSISTENT_TIMESTAMP_EMPTY","description":"Persistent timestamp empty."},"PERSISTENT_TIMESTAMP_INVALID":{"code":400,"name":"PERSISTENT_TIMESTAMP_INVALID","description":"Persistent timestamp invalid."},"PHONE_CODE_EMPTY":{"code":400,"name":"PHONE_CODE_EMPTY","description":"phone_code is missing."},"PHONE_CODE_EXPIRED":{"code":400,"name":"PHONE_CODE_EXPIRED","description":"The phone code you provided has expired."},"PHONE_CODE_HASH_EMPTY":{"code":400,"name":"PHONE_CODE_HASH_EMPTY","description":"phone_code_hash is missing."},"PHONE_CODE_INVALID":{"code":400,"name":"PHONE_CODE_INVALID","description":"The provided phone code is invalid."},"PHONE_HASH_EXPIRED":{"code":400,"name":"PHONE_HASH_EXPIRED","description":"An invalid or expired `phone_code_hash` was provided."},"PHONE_NOT_OCCUPIED":{"code":400,"name":"PHONE_NOT_OCCUPIED","description":"No user is associated to the specified phone number."},"PHONE_NUMBER_APP_SIGNUP_FORBIDDEN":{"code":400,"name":"PHONE_NUMBER_APP_SIGNUP_FORBIDDEN","description":"You can't sign up using this app."},"PHONE_NUMBER_BANNED":{"code":400,"name":"PHONE_NUMBER_BANNED","description":"The provided phone number is banned from telegram."},"PHONE_NUMBER_FLOOD":{"code":400,"name":"PHONE_NUMBER_FLOOD","description":"You asked for the code too many times."},"PHONE_NUMBER_INVALID":{"code":400,"name":"PHONE_NUMBER_INVALID","description":"The phone number is invalid."},"PHONE_NUMBER_OCCUPIED":{"code":400,"name":"PHONE_NUMBER_OCCUPIED","description":"The phone number is already in use."},"PHONE_NUMBER_UNOCCUPIED":{"code":400,"name":"PHONE_NUMBER_UNOCCUPIED","description":"The phone number is not yet being used."},"PHONE_PASSWORD_PROTECTED":{"code":400,"name":"PHONE_PASSWORD_PROTECTED","description":"This phone is password protected."},"PHOTO_CONTENT_TYPE_INVALID":{"code":400,"name":"PHOTO_CONTENT_TYPE_INVALID","description":"Photo mime-type invalid."},"PHOTO_CONTENT_URL_EMPTY":{"code":400,"name":"PHOTO_CONTENT_URL_EMPTY","description":"Photo URL invalid."},"PHOTO_CROP_FILE_MISSING":{"code":400,"name":"PHOTO_CROP_FILE_MISSING","description":"Photo crop file missing."},"PHOTO_CROP_SIZE_SMALL":{"code":400,"name":"PHOTO_CROP_SIZE_SMALL","description":"Photo is too small."},"PHOTO_EXT_INVALID":{"code":400,"name":"PHOTO_EXT_INVALID","description":"The extension of the photo is invalid."},"PHOTO_FILE_MISSING":{"code":400,"name":"PHOTO_FILE_MISSING","description":"Profile photo file missing."},"PHOTO_ID_INVALID":{"code":400,"name":"PHOTO_ID_INVALID","description":"Photo ID invalid."},"PHOTO_INVALID":{"code":400,"name":"PHOTO_INVALID","description":"Photo invalid."},"PHOTO_INVALID_DIMENSIONS":{"code":400,"name":"PHOTO_INVALID_DIMENSIONS","description":"The photo dimensions are invalid."},"PHOTO_SAVE_FILE_INVALID":{"code":400,"name":"PHOTO_SAVE_FILE_INVALID","description":"Internal issues, try again later."},"PHOTO_THUMB_URL_EMPTY":{"code":400,"name":"PHOTO_THUMB_URL_EMPTY","description":"Photo thumbnail URL is empty."},"PIN_RESTRICTED":{"code":400,"name":"PIN_RESTRICTED","description":"You can't pin messages."},"PINNED_DIALOGS_TOO_MUCH":{"code":400,"name":"PINNED_DIALOGS_TOO_MUCH","description":"Too many pinned dialogs."},"POLL_ANSWER_INVALID":{"code":400,"name":"POLL_ANSWER_INVALID","description":"One of the poll answers is not acceptable."},"POLL_ANSWERS_INVALID":{"code":400,"name":"POLL_ANSWERS_INVALID","description":"Invalid poll answers were provided."},"POLL_OPTION_DUPLICATE":{"code":400,"name":"POLL_OPTION_DUPLICATE","description":"Duplicate poll options provided."},"POLL_OPTION_INVALID":{"code":400,"name":"POLL_OPTION_INVALID","description":"Invalid poll option provided."},"POLL_QUESTION_INVALID":{"code":400,"name":"POLL_QUESTION_INVALID","description":"One of the poll questions is not acceptable."},"PRIVACY_KEY_INVALID":{"code":400,"name":"PRIVACY_KEY_INVALID","description":"The privacy key is invalid."},"PRIVACY_TOO_LONG":{"code":400,"name":"PRIVACY_TOO_LONG","description":"Too many privacy rules were specified, the current limit is 1000."},"PRIVACY_VALUE_INVALID":{"code":400,"name":"PRIVACY_VALUE_INVALID","description":"The specified privacy rule combination is invalid."},"PUBLIC_KEY_REQUIRED":{"code":400,"name":"PUBLIC_KEY_REQUIRED","description":"A public key is required."},"QUERY_ID_EMPTY":{"code":400,"name":"QUERY_ID_EMPTY","description":"The query ID is empty."},"QUERY_ID_INVALID":{"code":400,"name":"QUERY_ID_INVALID","description":"The query ID is invalid."},"QUERY_TOO_SHORT":{"code":400,"name":"QUERY_TOO_SHORT","description":"The query string is too short."},"QUIZ_ANSWER_MISSING":{"code":400,"name":"QUIZ_ANSWER_MISSING","description":"You can forward a quiz while hiding the original author only after choosing an option in the quiz."},"QUIZ_CORRECT_ANSWER_INVALID":{"code":400,"name":"QUIZ_CORRECT_ANSWER_INVALID","description":"An invalid value was provided to the correct_answers field."},"QUIZ_CORRECT_ANSWERS_EMPTY":{"code":400,"name":"QUIZ_CORRECT_ANSWERS_EMPTY","description":"No correct quiz answer was specified."},"QUIZ_CORRECT_ANSWERS_TOO_MUCH":{"code":400,"name":"QUIZ_CORRECT_ANSWERS_TOO_MUCH","description":"You specified too many correct answers in a quiz, quizzes can only have one right answer!"},"QUIZ_MULTIPLE_INVALID":{"code":400,"name":"QUIZ_MULTIPLE_INVALID","description":"Quizzes can't have the multiple_choice flag set!"},"RANDOM_ID_EMPTY":{"code":400,"name":"RANDOM_ID_EMPTY","description":"Random ID empty."},"RANDOM_ID_INVALID":{"code":400,"name":"RANDOM_ID_INVALID","description":"A provided random ID is invalid."},"RANDOM_LENGTH_INVALID":{"code":400,"name":"RANDOM_LENGTH_INVALID","description":"Random length invalid."},"RANGES_INVALID":{"code":400,"name":"RANGES_INVALID","description":"Invalid range provided."},"REACTION_EMPTY":{"code":400,"name":"REACTION_EMPTY","description":"Empty reaction provided."},"REACTION_INVALID":{"code":400,"name":"REACTION_INVALID","description":"The specified reaction is invalid."},"REACTIONS_TOO_MANY":{"code":400,"name":"REACTIONS_TOO_MANY","description":"The message already has exactly `reactions_uniq_max` reaction emojis, you can't react with a new emoji, see [the docs for more info »](/api/config#client-configuration)."},"REPLY_MARKUP_BUY_EMPTY":{"code":400,"name":"REPLY_MARKUP_BUY_EMPTY","description":"Reply markup for buy button empty."},"REPLY_MARKUP_INVALID":{"code":400,"name":"REPLY_MARKUP_INVALID","description":"The provided reply markup is invalid."},"REPLY_MARKUP_TOO_LONG":{"code":400,"name":"REPLY_MARKUP_TOO_LONG","description":"The specified reply_markup is too long."},"RESET_REQUEST_MISSING":{"code":400,"name":"RESET_REQUEST_MISSING","description":"No password reset is in progress."},"RESULT_ID_DUPLICATE":{"code":400,"name":"RESULT_ID_DUPLICATE","description":"You provided a duplicate result ID."},"RESULT_ID_EMPTY":{"code":400,"name":"RESULT_ID_EMPTY","description":"Result ID empty."},"RESULT_ID_INVALID":{"code":400,"name":"RESULT_ID_INVALID","description":"One of the specified result IDs is invalid."},"RESULT_TYPE_INVALID":{"code":400,"name":"RESULT_TYPE_INVALID","description":"Result type invalid."},"RESULTS_TOO_MUCH":{"code":400,"name":"RESULTS_TOO_MUCH","description":"Too many results were provided."},"REVOTE_NOT_ALLOWED":{"code":400,"name":"REVOTE_NOT_ALLOWED","description":"You cannot change your vote."},"RIGHTS_NOT_MODIFIED":{"code":400,"name":"RIGHTS_NOT_MODIFIED","description":"The new admin rights are equal to the old rights, no change was made."},"RSA_DECRYPT_FAILED":{"code":400,"name":"RSA_DECRYPT_FAILED","description":"Internal RSA decryption failed."},"SCHEDULE_BOT_NOT_ALLOWED":{"code":400,"name":"SCHEDULE_BOT_NOT_ALLOWED","description":"Bots cannot schedule messages."},"SCHEDULE_DATE_INVALID":{"code":400,"name":"SCHEDULE_DATE_INVALID","description":"Invalid schedule date provided."},"SCHEDULE_DATE_TOO_LATE":{"code":400,"name":"SCHEDULE_DATE_TOO_LATE","description":"You can't schedule a message this far in the future."},"SCHEDULE_STATUS_PRIVATE":{"code":400,"name":"SCHEDULE_STATUS_PRIVATE","description":"Can't schedule until user is online, if the user's last seen timestamp is hidden by their privacy settings."},"SCHEDULE_TOO_MUCH":{"code":400,"name":"SCHEDULE_TOO_MUCH","description":"There are too many scheduled messages."},"SCORE_INVALID":{"code":400,"name":"SCORE_INVALID","description":"The specified game score is invalid."},"SEARCH_QUERY_EMPTY":{"code":400,"name":"SEARCH_QUERY_EMPTY","description":"The search query is empty."},"SEARCH_WITH_LINK_NOT_SUPPORTED":{"code":400,"name":"SEARCH_WITH_LINK_NOT_SUPPORTED","description":"You cannot provide a search query and an invite link at the same time."},"SECONDS_INVALID":{"code":400,"name":"SECONDS_INVALID","description":"Invalid duration provided."},"SEND_AS_PEER_INVALID":{"code":400,"name":"SEND_AS_PEER_INVALID","description":"You can't send messages as the specified peer."},"SEND_MESSAGE_MEDIA_INVALID":{"code":400,"name":"SEND_MESSAGE_MEDIA_INVALID","description":"Invalid media provided."},"SEND_MESSAGE_TYPE_INVALID":{"code":400,"name":"SEND_MESSAGE_TYPE_INVALID","description":"The message type is invalid."},"SESSION_TOO_FRESH_%d":{"code":400,"name":"SESSION_TOO_FRESH_%d","description":"The session logged in too recently and %d seconds must pass before calling the method","_paramNames":["seconds"]},"SETTINGS_INVALID":{"code":400,"name":"SETTINGS_INVALID","description":"Invalid settings were provided."},"SHA256_HASH_INVALID":{"code":400,"name":"SHA256_HASH_INVALID","description":"The provided SHA256 hash is invalid."},"SHORT_NAME_INVALID":{"code":400,"name":"SHORT_NAME_INVALID","description":"The specified short name is invalid."},"SHORT_NAME_OCCUPIED":{"code":400,"name":"SHORT_NAME_OCCUPIED","description":"The specified short name is already in use."},"SLOWMODE_MULTI_MSGS_DISABLED":{"code":400,"name":"SLOWMODE_MULTI_MSGS_DISABLED","description":"Slowmode is enabled, you cannot forward multiple messages to this group."},"SMS_CODE_CREATE_FAILED":{"code":400,"name":"SMS_CODE_CREATE_FAILED","description":"An error occurred while creating the SMS code."},"SRP_ID_INVALID":{"code":400,"name":"SRP_ID_INVALID","description":"Invalid SRP ID provided."},"SRP_PASSWORD_CHANGED":{"code":400,"name":"SRP_PASSWORD_CHANGED","description":"Password has changed."},"START_PARAM_EMPTY":{"code":400,"name":"START_PARAM_EMPTY","description":"The start parameter is empty."},"START_PARAM_INVALID":{"code":400,"name":"START_PARAM_INVALID","description":"Start parameter invalid."},"START_PARAM_TOO_LONG":{"code":400,"name":"START_PARAM_TOO_LONG","description":"Start parameter is too long."},"STICKER_DOCUMENT_INVALID":{"code":400,"name":"STICKER_DOCUMENT_INVALID","description":"The specified sticker document is invalid."},"STICKER_EMOJI_INVALID":{"code":400,"name":"STICKER_EMOJI_INVALID","description":"Sticker emoji invalid."},"STICKER_FILE_INVALID":{"code":400,"name":"STICKER_FILE_INVALID","description":"Sticker file invalid."},"STICKER_GIF_DIMENSIONS":{"code":400,"name":"STICKER_GIF_DIMENSIONS","description":"The specified video sticker has invalid dimensions."},"STICKER_ID_INVALID":{"code":400,"name":"STICKER_ID_INVALID","description":"The provided sticker ID is invalid."},"STICKER_INVALID":{"code":400,"name":"STICKER_INVALID","description":"The provided sticker is invalid."},"STICKER_MIME_INVALID":{"code":400,"name":"STICKER_MIME_INVALID","description":"The specified sticker MIME type is invalid."},"STICKER_PNG_DIMENSIONS":{"code":400,"name":"STICKER_PNG_DIMENSIONS","description":"Sticker png dimensions invalid."},"STICKER_PNG_NOPNG":{"code":400,"name":"STICKER_PNG_NOPNG","description":"One of the specified stickers is not a valid PNG file."},"STICKER_TGS_NODOC":{"code":400,"name":"STICKER_TGS_NODOC","description":"You must send the animated sticker as a document."},"STICKER_TGS_NOTGS":{"code":400,"name":"STICKER_TGS_NOTGS","description":"Invalid TGS sticker provided."},"STICKER_THUMB_PNG_NOPNG":{"code":400,"name":"STICKER_THUMB_PNG_NOPNG","description":"Incorrect stickerset thumb file provided, PNG / WEBP expected."},"STICKER_THUMB_TGS_NOTGS":{"code":400,"name":"STICKER_THUMB_TGS_NOTGS","description":"Incorrect stickerset TGS thumb file provided."},"STICKER_VIDEO_BIG":{"code":400,"name":"STICKER_VIDEO_BIG","description":"The specified video sticker is too big."},"STICKER_VIDEO_NODOC":{"code":400,"name":"STICKER_VIDEO_NODOC","description":"You must send the video sticker as a document."},"STICKER_VIDEO_NOWEBM":{"code":400,"name":"STICKER_VIDEO_NOWEBM","description":"The specified video sticker is not in webm format."},"STICKERPACK_STICKERS_TOO_MUCH":{"code":400,"name":"STICKERPACK_STICKERS_TOO_MUCH","description":"There are too many stickers in this stickerpack, you can't add any more."},"STICKERS_EMPTY":{"code":400,"name":"STICKERS_EMPTY","description":"No sticker provided."},"STICKERS_TOO_MUCH":{"code":400,"name":"STICKERS_TOO_MUCH","description":"There are too many stickers in this stickerpack, you can't add any more."},"STICKERSET_INVALID":{"code":400,"name":"STICKERSET_INVALID","description":"The provided sticker set is invalid."},"SWITCH_PM_TEXT_EMPTY":{"code":400,"name":"SWITCH_PM_TEXT_EMPTY","description":"The switch_pm.text field was empty."},"TAKEOUT_REQUIRED":{"code":400,"name":"TAKEOUT_REQUIRED","description":"A takeout session has to be initialized, first."},"TASK_ALREADY_EXISTS":{"code":400,"name":"TASK_ALREADY_EXISTS","description":"An email reset was already requested."},"TEMP_AUTH_KEY_ALREADY_BOUND":{"code":400,"name":"TEMP_AUTH_KEY_ALREADY_BOUND","description":"The passed temporary key is already bound to another **perm_auth_key_id**."},"TEMP_AUTH_KEY_EMPTY":{"code":400,"name":"TEMP_AUTH_KEY_EMPTY","description":"No temporary auth key provided."},"THEME_FILE_INVALID":{"code":400,"name":"THEME_FILE_INVALID","description":"Invalid theme file provided."},"THEME_FORMAT_INVALID":{"code":400,"name":"THEME_FORMAT_INVALID","description":"Invalid theme format provided."},"THEME_INVALID":{"code":400,"name":"THEME_INVALID","description":"Invalid theme provided."},"THEME_MIME_INVALID":{"code":400,"name":"THEME_MIME_INVALID","description":"The theme's MIME type is invalid."},"THEME_TITLE_INVALID":{"code":400,"name":"THEME_TITLE_INVALID","description":"The specified theme title is invalid."},"TITLE_INVALID":{"code":400,"name":"TITLE_INVALID","description":"The specified stickerpack title is invalid."},"TMP_PASSWORD_DISABLED":{"code":400,"name":"TMP_PASSWORD_DISABLED","description":"The temporary password is disabled."},"TO_LANG_INVALID":{"code":400,"name":"TO_LANG_INVALID","description":"The specified destination language is invalid."},"TOKEN_EMPTY":{"code":400,"name":"TOKEN_EMPTY","description":"The specified token is empty."},"TOKEN_INVALID":{"code":400,"name":"TOKEN_INVALID","description":"The provided token is invalid."},"TOKEN_TYPE_INVALID":{"code":400,"name":"TOKEN_TYPE_INVALID","description":"The specified token type is invalid."},"TOPIC_CLOSED":{"code":400,"name":"TOPIC_CLOSED","description":"This topic was closed, you can't send messages to it anymore."},"TOPIC_DELETED":{"code":400,"name":"TOPIC_DELETED","description":"The specified topic was deleted."},"TOPIC_ID_INVALID":{"code":400,"name":"TOPIC_ID_INVALID","description":"The specified topic ID is invalid."},"TOPIC_NOT_MODIFIED":{"code":400,"name":"TOPIC_NOT_MODIFIED","description":"The updated topic info is equal to the current topic info, nothing was changed."},"TRANSCRIPTION_FAILED":{"code":400,"name":"TRANSCRIPTION_FAILED","description":"Audio transcription failed."},"TTL_DAYS_INVALID":{"code":400,"name":"TTL_DAYS_INVALID","description":"The provided TTL is invalid."},"TTL_MEDIA_INVALID":{"code":400,"name":"TTL_MEDIA_INVALID","description":"Invalid media Time To Live was provided."},"TTL_PERIOD_INVALID":{"code":400,"name":"TTL_PERIOD_INVALID","description":"The specified TTL period is invalid."},"TYPES_EMPTY":{"code":400,"name":"TYPES_EMPTY","description":"No top peer type was provided."},"UNTIL_DATE_INVALID":{"code":400,"name":"UNTIL_DATE_INVALID","description":"Invalid until date provided."},"URL_INVALID":{"code":400,"name":"URL_INVALID","description":"Invalid URL provided."},"USAGE_LIMIT_INVALID":{"code":400,"name":"USAGE_LIMIT_INVALID","description":"The specified usage limit is invalid."},"USER_ADMIN_INVALID":{"code":400,"name":"USER_ADMIN_INVALID","description":"You're not an admin."},"USER_ALREADY_INVITED":{"code":400,"name":"USER_ALREADY_INVITED","description":"You have already invited this user."},"USER_ALREADY_PARTICIPANT":{"code":400,"name":"USER_ALREADY_PARTICIPANT","description":"The user is already in the group."},"USER_BANNED_IN_CHANNEL":{"code":400,"name":"USER_BANNED_IN_CHANNEL","description":"You're banned from sending messages in supergroups/channels."},"USER_BLOCKED":{"code":400,"name":"USER_BLOCKED","description":"User blocked."},"USER_BOT":{"code":400,"name":"USER_BOT","description":"Bots can only be admins in channels."},"USER_BOT_INVALID":{"code":400,"name":"USER_BOT_INVALID","description":"User accounts must provide the `bot` method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts."},"USER_BOT_REQUIRED":{"code":400,"name":"USER_BOT_REQUIRED","description":"This method can only be called by a bot."},"USER_CHANNELS_TOO_MUCH":{"code":400,"name":"USER_CHANNELS_TOO_MUCH","description":"One of the users you tried to add is already in too many channels/supergroups."},"USER_CREATOR":{"code":400,"name":"USER_CREATOR","description":"You can't leave this channel, because you're its creator."},"USER_ID_INVALID":{"code":400,"name":"USER_ID_INVALID","description":"The provided user ID is invalid."},"USER_INVALID":{"code":400,"name":"USER_INVALID","description":"Invalid user provided."},"USER_IS_BLOCKED":{"code":400,"name":"USER_IS_BLOCKED","description":"You were blocked by this user."},"USER_IS_BOT":{"code":400,"name":"USER_IS_BOT","description":"Bots can't send messages to other bots."},"USER_KICKED":{"code":400,"name":"USER_KICKED","description":"This user was kicked from this supergroup/channel."},"USER_NOT_MUTUAL_CONTACT":{"code":400,"name":"USER_NOT_MUTUAL_CONTACT","description":"The provided user is not a mutual contact."},"USER_NOT_PARTICIPANT":{"code":400,"name":"USER_NOT_PARTICIPANT","description":"You're not a member of this supergroup/channel."},"USER_VOLUME_INVALID":{"code":400,"name":"USER_VOLUME_INVALID","description":"The specified user volume is invalid."},"USERNAME_INVALID":{"code":400,"name":"USERNAME_INVALID","description":"The provided username is not valid."},"USERNAME_NOT_MODIFIED":{"code":400,"name":"USERNAME_NOT_MODIFIED","description":"The username was not modified."},"USERNAME_NOT_OCCUPIED":{"code":400,"name":"USERNAME_NOT_OCCUPIED","description":"The provided username is not occupied."},"USERNAME_OCCUPIED":{"code":400,"name":"USERNAME_OCCUPIED","description":"The provided username is already occupied."},"USERNAME_PURCHASE_AVAILABLE":{"code":400,"name":"USERNAME_PURCHASE_AVAILABLE","description":"The specified username can be purchased on https://fragment.com."},"USERNAMES_ACTIVE_TOO_MUCH":{"code":400,"name":"USERNAMES_ACTIVE_TOO_MUCH","description":"The maximum number of active usernames was reached."},"USERPIC_UPLOAD_REQUIRED":{"code":400,"name":"USERPIC_UPLOAD_REQUIRED","description":"You must have a profile picture to publish your geolocation."},"USERS_TOO_FEW":{"code":400,"name":"USERS_TOO_FEW","description":"Not enough users (to create a chat, for example)."},"USERS_TOO_MUCH":{"code":400,"name":"USERS_TOO_MUCH","description":"The maximum number of users has been exceeded (to create a chat, for example)."},"VIDEO_CONTENT_TYPE_INVALID":{"code":400,"name":"VIDEO_CONTENT_TYPE_INVALID","description":"The video's content type is invalid."},"VIDEO_FILE_INVALID":{"code":400,"name":"VIDEO_FILE_INVALID","description":"The specified video file is invalid."},"VIDEO_TITLE_EMPTY":{"code":400,"name":"VIDEO_TITLE_EMPTY","description":"The specified video title is empty."},"VOICE_MESSAGES_FORBIDDEN":{"code":400,"name":"VOICE_MESSAGES_FORBIDDEN","description":"This user's privacy settings forbid you from sending voice messages."},"WALLPAPER_FILE_INVALID":{"code":400,"name":"WALLPAPER_FILE_INVALID","description":"The specified wallpaper file is invalid."},"WALLPAPER_INVALID":{"code":400,"name":"WALLPAPER_INVALID","description":"The specified wallpaper is invalid."},"WALLPAPER_MIME_INVALID":{"code":400,"name":"WALLPAPER_MIME_INVALID","description":"The specified wallpaper MIME type is invalid."},"WC_CONVERT_URL_INVALID":{"code":400,"name":"WC_CONVERT_URL_INVALID","description":"WC convert URL invalid."},"WEBDOCUMENT_INVALID":{"code":400,"name":"WEBDOCUMENT_INVALID","description":"Invalid webdocument URL provided."},"WEBDOCUMENT_MIME_INVALID":{"code":400,"name":"WEBDOCUMENT_MIME_INVALID","description":"Invalid webdocument mime type provided."},"WEBDOCUMENT_SIZE_TOO_BIG":{"code":400,"name":"WEBDOCUMENT_SIZE_TOO_BIG","description":"Webdocument is too big!"},"WEBDOCUMENT_URL_INVALID":{"code":400,"name":"WEBDOCUMENT_URL_INVALID","description":"The specified webdocument URL is invalid."},"WEBPAGE_CURL_FAILED":{"code":400,"name":"WEBPAGE_CURL_FAILED","description":"Failure while fetching the webpage with cURL."},"WEBPAGE_MEDIA_EMPTY":{"code":400,"name":"WEBPAGE_MEDIA_EMPTY","description":"Webpage media empty."},"WEBPUSH_AUTH_INVALID":{"code":400,"name":"WEBPUSH_AUTH_INVALID","description":"The specified web push authentication secret is invalid."},"WEBPUSH_KEY_INVALID":{"code":400,"name":"WEBPUSH_KEY_INVALID","description":"The specified web push elliptic curve Diffie-Hellman public key is invalid."},"WEBPUSH_TOKEN_INVALID":{"code":400,"name":"WEBPUSH_TOKEN_INVALID","description":"The specified web push token is invalid."},"YOU_BLOCKED_USER":{"code":400,"name":"YOU_BLOCKED_USER","description":"You blocked this user."},"BROADCAST_FORBIDDEN":{"code":403,"name":"BROADCAST_FORBIDDEN","description":"Participants of polls in channels should stay anonymous."},"CHANNEL_PUBLIC_GROUP_NA":{"code":403,"name":"CHANNEL_PUBLIC_GROUP_NA","description":"channel/supergroup not available."},"CHAT_ADMIN_INVITE_REQUIRED":{"code":403,"name":"CHAT_ADMIN_INVITE_REQUIRED","description":"You do not have the rights to do this."},"CHAT_GUEST_SEND_FORBIDDEN":{"code":403,"name":"CHAT_GUEST_SEND_FORBIDDEN","description":"You join the discussion group before commenting, see [here »](/api/discussion#requiring-users-to-join-the-group) for more info."},"CHAT_SEND_AUDIOS_FORBIDDEN":{"code":403,"name":"CHAT_SEND_AUDIOS_FORBIDDEN","description":"You can't send audio messages in this chat."},"CHAT_SEND_DOCS_FORBIDDEN":{"code":403,"name":"CHAT_SEND_DOCS_FORBIDDEN","description":"You can't send documents in this chat."},"CHAT_SEND_GAME_FORBIDDEN":{"code":403,"name":"CHAT_SEND_GAME_FORBIDDEN","description":"You can't send a game to this chat."},"CHAT_SEND_GIFS_FORBIDDEN":{"code":403,"name":"CHAT_SEND_GIFS_FORBIDDEN","description":"You can't send gifs in this chat."},"CHAT_SEND_MEDIA_FORBIDDEN":{"code":403,"name":"CHAT_SEND_MEDIA_FORBIDDEN","description":"You can't send media in this chat."},"CHAT_SEND_PHOTOS_FORBIDDEN":{"code":403,"name":"CHAT_SEND_PHOTOS_FORBIDDEN","description":"You can't send photos in this chat."},"CHAT_SEND_PLAIN_FORBIDDEN":{"code":403,"name":"CHAT_SEND_PLAIN_FORBIDDEN","description":"You can't send non-media (text) messages in this chat."},"CHAT_SEND_POLL_FORBIDDEN":{"code":403,"name":"CHAT_SEND_POLL_FORBIDDEN","description":"You can't send polls in this chat."},"CHAT_SEND_STICKERS_FORBIDDEN":{"code":403,"name":"CHAT_SEND_STICKERS_FORBIDDEN","description":"You can't send stickers in this chat."},"CHAT_SEND_VIDEOS_FORBIDDEN":{"code":403,"name":"CHAT_SEND_VIDEOS_FORBIDDEN","description":"You can't send videos in this chat."},"CHAT_SEND_VOICES_FORBIDDEN":{"code":403,"name":"CHAT_SEND_VOICES_FORBIDDEN","description":"You can't send voice recordings in this chat."},"CHAT_WRITE_FORBIDDEN":{"code":403,"name":"CHAT_WRITE_FORBIDDEN","description":"You can't write in this chat."},"EDIT_BOT_INVITE_FORBIDDEN":{"code":403,"name":"EDIT_BOT_INVITE_FORBIDDEN","description":"Normal users can't edit invites that were created by bots."},"GROUPCALL_ALREADY_STARTED":{"code":403,"name":"GROUPCALL_ALREADY_STARTED","description":"The groupcall has already started, you can join directly using [phone.joinGroupCall](https://core.telegram.org/method/phone.joinGroupCall)."},"INLINE_BOT_REQUIRED":{"code":403,"name":"INLINE_BOT_REQUIRED","description":"Only the inline bot can edit message."},"MESSAGE_AUTHOR_REQUIRED":{"code":403,"name":"MESSAGE_AUTHOR_REQUIRED","description":"Message author required."},"MESSAGE_DELETE_FORBIDDEN":{"code":403,"name":"MESSAGE_DELETE_FORBIDDEN","description":"You can't delete one of the messages you tried to delete, most likely because it is a service message."},"POLL_VOTE_REQUIRED":{"code":403,"name":"POLL_VOTE_REQUIRED","description":"Cast a vote in the poll before calling this method."},"PREMIUM_ACCOUNT_REQUIRED":{"code":403,"name":"PREMIUM_ACCOUNT_REQUIRED","description":"A premium account is required to execute this action."},"PUBLIC_CHANNEL_MISSING":{"code":403,"name":"PUBLIC_CHANNEL_MISSING","description":"You can only export group call invite links for public chats or channels."},"RIGHT_FORBIDDEN":{"code":403,"name":"RIGHT_FORBIDDEN","description":"Your admin rights do not allow you to do this."},"SENSITIVE_CHANGE_FORBIDDEN":{"code":403,"name":"SENSITIVE_CHANGE_FORBIDDEN","description":"You can't change your sensitive content settings."},"USER_DELETED":{"code":403,"name":"USER_DELETED","description":"You can't send this secret message because the other participant deleted their account."},"USER_PRIVACY_RESTRICTED":{"code":403,"name":"USER_PRIVACY_RESTRICTED","description":"The user's privacy settings do not allow you to do this."},"USER_RESTRICTED":{"code":403,"name":"USER_RESTRICTED","description":"You're spamreported, you can't create channels or chats."},"FILEREF_UPGRADE_NEEDED":{"code":406,"name":"FILEREF_UPGRADE_NEEDED","description":"The client has to be updated in order to support [file references](https://core.telegram.org/api/file_reference)."},"FRESH_CHANGE_PHONE_FORBIDDEN":{"code":406,"name":"FRESH_CHANGE_PHONE_FORBIDDEN","description":"You can't change phone number right after logging in, please wait at least 24 hours."},"FRESH_RESET_AUTHORISATION_FORBIDDEN":{"code":406,"name":"FRESH_RESET_AUTHORISATION_FORBIDDEN","description":"You can't logout other sessions if less than 24 hours have passed since you logged on the current session."},"PAYMENT_UNSUPPORTED":{"code":406,"name":"PAYMENT_UNSUPPORTED","description":"A detailed description of the error will be received separately as described [here »](https://core.telegram.org/api/errors#406-not-acceptable)."},"PHONE_PASSWORD_FLOOD":{"code":406,"name":"PHONE_PASSWORD_FLOOD","description":"You have tried logging in too many times."},"PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_%dMIN":{"code":406,"name":"PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_%dMIN","description":"Similar to a flood wait, must wait %d minutes","_paramNames":["minutes"]},"SEND_CODE_UNAVAILABLE":{"code":406,"name":"SEND_CODE_UNAVAILABLE","description":"Returned when all available options for this type of number were already used (e.g. flash-call, then SMS, then this error might be returned to trigger a second resend)."},"STICKERSET_OWNER_ANONYMOUS":{"code":406,"name":"STICKERSET_OWNER_ANONYMOUS","description":"Provided stickerset can't be installed as group stickerset to prevent admin deanonymization."},"USERPIC_PRIVACY_REQUIRED":{"code":406,"name":"USERPIC_PRIVACY_REQUIRED","description":"You need to disable privacy settings for your profile picture in order to make your geolocation public."},"2FA_CONFIRM_WAIT_%d":{"code":420,"name":"2FA_CONFIRM_WAIT_%d","description":"The account is 2FA protected so it will be deleted in a week. Otherwise it can be reset in %d","_paramNames":["seconds"]},"SLOWMODE_WAIT_%d":{"code":420,"name":"SLOWMODE_WAIT_%d","description":"A wait of %d seconds is required before sending another message in this chat","_paramNames":["seconds"]},"TAKEOUT_INIT_DELAY_%d":{"code":420,"name":"TAKEOUT_INIT_DELAY_%d","description":"A wait of %d seconds is required before being able to initiate the takeout","_paramNames":["seconds"]},"AUTH_RESTART":{"code":500,"name":"AUTH_RESTART","description":"Restart the authorization process."},"CDN_UPLOAD_TIMEOUT":{"code":500,"name":"CDN_UPLOAD_TIMEOUT","description":"A server-side timeout occurred while reuploading the file to the CDN DC."},"CHAT_ID_GENERATE_FAILED":{"code":500,"name":"CHAT_ID_GENERATE_FAILED","description":"Failure while generating the chat ID."},"PERSISTENT_TIMESTAMP_OUTDATED":{"code":500,"name":"PERSISTENT_TIMESTAMP_OUTDATED","description":"Channel internal replication issues, try again later (treat this like an RPC_CALL_FAIL)."},"RANDOM_ID_DUPLICATE":{"code":500,"name":"RANDOM_ID_DUPLICATE","description":"You provided a random ID that was already used."},"SIGN_IN_FAILED":{"code":500,"name":"SIGN_IN_FAILED","description":"Failure while signing in."},"Invalid msg_resend_req query":{"code":-500,"name":"Invalid msg_resend_req query","description":"Invalid msg_resend_req query."},"Invalid msgs_ack query":{"code":-500,"name":"Invalid msgs_ack query","description":"Invalid msgs_ack query."},"Invalid msgs_state_req query":{"code":-500,"name":"Invalid msgs_state_req query","description":"Invalid msgs_state_req query."},"Timeout":{"code":-503,"name":"Timeout","description":"Timeout while fetching data."},"SESSION_PASSWORD_NEEDED":{"code":401,"name":"SESSION_PASSWORD_NEEDED","description":"2FA is enabled, use a password to login."},"FLOOD_WAIT_%d":{"code":420,"name":"FLOOD_WAIT_%d","description":"A wait of %d seconds is required","_paramNames":["seconds"]},"ACTIVE_USER_REQUIRED":{"code":401,"name":"ACTIVE_USER_REQUIRED","description":"The method is only available to already activated users"},"AUTH_KEY_DUPLICATED":{"code":406,"name":"AUTH_KEY_DUPLICATED","description":"The authorization key (session file) was used under two different IP addresses simultaneously, and can no longer be used. Use the same session exclusively, or use different sessions"},"AUTH_KEY_INVALID":{"code":401,"name":"AUTH_KEY_INVALID","description":"The key is invalid"},"AUTH_KEY_PERM_EMPTY":{"code":401,"name":"AUTH_KEY_PERM_EMPTY","description":"The method is unavailable for temporary authorization key, not bound to permanent"},"AUTH_KEY_UNREGISTERED":{"code":401,"name":"AUTH_KEY_UNREGISTERED","description":"The key is not registered in the system"},"AUTH_TOKEN_INVALID2":{"code":400,"name":"AUTH_TOKEN_INVALID2","description":"An invalid authorization token was provided"},"BASE_PORT_LOC_INVALID":{"code":400,"name":"BASE_PORT_LOC_INVALID","description":"Base port location invalid"},"BOT_GAMES_DISABLED":{"code":400,"name":"BOT_GAMES_DISABLED","description":"Bot games cannot be used in this type of chat"},"BOT_METHOD_INVALID":{"code":400,"name":"BOT_METHOD_INVALID","description":"The API access for bot users is restricted. The method you tried to invoke cannot be executed as a bot"},"BOT_POLLS_DISABLED":{"code":400,"name":"BOT_POLLS_DISABLED","description":"You cannot create polls under a bot account"},"BROADCAST_CALLS_DISABLED":{"code":400,"name":"BROADCAST_CALLS_DISABLED"},"CHANNEL_BANNED":{"code":400,"name":"CHANNEL_BANNED","description":"The channel is banned"},"CHAT_FORBIDDEN":{"code":403,"name":"CHAT_FORBIDDEN","description":"You cannot write in this chat"},"CHAT_GET_FAILED":{"code":500,"name":"CHAT_GET_FAILED"},"CHP_CALL_FAIL":{"code":500,"name":"CHP_CALL_FAIL","description":"The statistics cannot be retrieved at this time"},"CONNECTION_DEVICE_MODEL_EMPTY":{"code":400,"name":"CONNECTION_DEVICE_MODEL_EMPTY","description":"Device model empty"},"CONNECTION_LANG_PACK_INVALID":{"code":400,"name":"CONNECTION_LANG_PACK_INVALID","description":"The specified language pack is not valid. This is meant to be used by official applications only so far, leave it empty"},"CONNECTION_NOT_INITED":{"code":400,"name":"CONNECTION_NOT_INITED","description":"Connection not initialized"},"CONNECTION_SYSTEM_EMPTY":{"code":400,"name":"CONNECTION_SYSTEM_EMPTY","description":"Connection system empty"},"CONNECTION_SYSTEM_LANG_CODE_EMPTY":{"code":400,"name":"CONNECTION_SYSTEM_LANG_CODE_EMPTY","description":"The system language string was empty during connection"},"ENCRYPTION_OCCUPY_FAILED":{"code":500,"name":"ENCRYPTION_OCCUPY_FAILED","description":"TDLib developer claimed it is not an error while accepting secret chats and 500 is used instead of 420"},"EXPIRE_FORBIDDEN":{"code":400,"name":"EXPIRE_FORBIDDEN"},"FIELD_NAME_EMPTY":{"code":400,"name":"FIELD_NAME_EMPTY","description":"The field with the name FIELD_NAME is missing"},"FIELD_NAME_INVALID":{"code":400,"name":"FIELD_NAME_INVALID","description":"The field with the name FIELD_NAME is invalid"},"FILE_MIGRATE_%d":{"code":303,"name":"FILE_MIGRATE_%d","_paramNames":["new_dc"],"description":"The file to be accessed is currently stored in DC %d"},"FILE_PART_0_MISSING":{"code":400,"name":"FILE_PART_0_MISSING","description":"File part 0 missing"},"FILE_PART_%d_MISSING":{"code":400,"name":"FILE_PART_%d_MISSING","_paramNames":["which"],"description":"Part %d of the file is missing from storage"},"FLOOD_TEST_PHONE_WAIT_%d":{"code":420,"name":"FLOOD_TEST_PHONE_WAIT_%d","_paramNames":["seconds"],"description":"A wait of %d seconds is required in the test servers"},"GROUPCALL_ADD_PARTICIPANTS_FAILED":{"code":500,"name":"GROUPCALL_ADD_PARTICIPANTS_FAILED"},"GROUP_CALL_INVALID":{"code":400,"name":"GROUP_CALL_INVALID","description":"Group call invalid"},"HISTORY_GET_FAILED":{"code":500,"name":"HISTORY_GET_FAILED","description":"Fetching of history failed"},"INPUT_CONSTRUCTOR_INVALID":{"code":400,"name":"INPUT_CONSTRUCTOR_INVALID","description":"The provided constructor is invalid"},"INPUT_FETCH_ERROR":{"code":400,"name":"INPUT_FETCH_ERROR","description":"An error occurred while deserializing TL parameters"},"INPUT_FETCH_FAIL":{"code":400,"name":"INPUT_FETCH_FAIL","description":"Failed deserializing TL payload"},"INPUT_LAYER_INVALID":{"code":400,"name":"INPUT_LAYER_INVALID","description":"The provided layer is invalid"},"INPUT_METHOD_INVALID":{"code":400,"name":"INPUT_METHOD_INVALID","description":"The invoked method does not exist anymore or has never existed"},"INPUT_REQUEST_TOO_LONG":{"code":400,"name":"INPUT_REQUEST_TOO_LONG","description":"The input request was too long. This may be a bug in the library as it can occur when serializing more bytes than it should (like appending the vector constructor code at the end of a message)"},"INTERDC_%d_CALL_ERROR":{"code":500,"name":"INTERDC_%d_CALL_ERROR","_paramNames":["dc"],"description":"An error occurred while communicating with DC %d"},"INTERDC_%d_CALL_RICH_ERROR":{"code":500,"name":"INTERDC_%d_CALL_RICH_ERROR","_paramNames":["dc"],"description":"A rich error occurred while communicating with DC %d"},"MEDIA_TTL_INVALID":{"code":400,"name":"MEDIA_TTL_INVALID"},"MEMBER_NO_LOCATION":{"code":500,"name":"MEMBER_NO_LOCATION","description":"An internal failure occurred while fetching user info (couldn't find location)"},"MEMBER_OCCUPY_PRIMARY_LOC_FAILED":{"code":500,"name":"MEMBER_OCCUPY_PRIMARY_LOC_FAILED","description":"Occupation of primary member location failed"},"MSGID_DECREASE_RETRY":{"code":500,"name":"MSGID_DECREASE_RETRY","description":"The request should be retried with a lower message ID"},"MT_SEND_QUEUE_TOO_LONG":{"code":500,"name":"MT_SEND_QUEUE_TOO_LONG"},"NEED_CHAT_INVALID":{"code":500,"name":"NEED_CHAT_INVALID","description":"The provided chat is invalid"},"NEED_MEMBER_INVALID":{"code":500,"name":"NEED_MEMBER_INVALID","description":"The provided member is invalid or does not exist (for example a thumb size)"},"NETWORK_MIGRATE_%d":{"code":303,"name":"NETWORK_MIGRATE_%d","_paramNames":["new_dc"],"description":"The source IP address is associated with DC %d"},"NOT_ALLOWED":{"code":403,"name":"NOT_ALLOWED"},"PARTICIPANT_CALL_FAILED":{"code":500,"name":"PARTICIPANT_CALL_FAILED","description":"Failure while making call"},"PEER_FLOOD":{"code":400,"name":"PEER_FLOOD","description":"Too many requests"},"PHONE_MIGRATE_%d":{"code":303,"name":"PHONE_MIGRATE_%d","_paramNames":["new_dc"],"description":"The phone number a user is trying to use for authorization is associated with DC %d"},"POLL_UNSUPPORTED":{"code":400,"name":"POLL_UNSUPPORTED","description":"This layer does not support polls in the issued method"},"POSTPONED_TIMEOUT":{"code":500,"name":"POSTPONED_TIMEOUT","description":"The postponed call has timed out"},"PREMIUM_CURRENTLY_UNAVAILABLE":{"code":406,"name":"PREMIUM_CURRENTLY_UNAVAILABLE"},"PTS_CHANGE_EMPTY":{"code":500,"name":"PTS_CHANGE_EMPTY","description":"No PTS change"},"REFLECTOR_NOT_AVAILABLE":{"code":400,"name":"REFLECTOR_NOT_AVAILABLE","description":"Invalid call reflector server"},"REG_ID_GENERATE_FAILED":{"code":500,"name":"REG_ID_GENERATE_FAILED","description":"Failure while generating registration ID"},"REPLY_MARKUP_GAME_EMPTY":{"code":400,"name":"REPLY_MARKUP_GAME_EMPTY","description":"The provided reply markup for the game is empty"},"RPC_CALL_FAIL":{"code":500,"name":"RPC_CALL_FAIL","description":"Telegram is having internal issues, please try again later."},"RPC_MCGET_FAIL":{"code":500,"name":"RPC_MCGET_FAIL","description":"Telegram is having internal issues, please try again later."},"SESSION_EXPIRED":{"code":401,"name":"SESSION_EXPIRED","description":"The authorization has expired"},"SESSION_REVOKED":{"code":401,"name":"SESSION_REVOKED","description":"The authorization has been invalidated, because of the user terminating all sessions"},"SHORTNAME_OCCUPY_FAILED":{"code":400,"name":"SHORTNAME_OCCUPY_FAILED","description":"An error occurred when trying to register the short-name used for the sticker pack. Try a different name"},"STATS_MIGRATE_%d":{"code":303,"name":"STATS_MIGRATE_%d","_paramNames":["dc"],"description":"The channel statistics must be fetched from DC %d"},"STORAGE_CHECK_FAILED":{"code":500,"name":"STORAGE_CHECK_FAILED","description":"Server storage check failed"},"STORE_INVALID_SCALAR_TYPE":{"code":500,"name":"STORE_INVALID_SCALAR_TYPE"},"TAKEOUT_INVALID":{"code":400,"name":"TAKEOUT_INVALID","description":"The takeout session has been invalidated by another data export session"},"TMP_PASSWORD_INVALID":{"code":400,"name":"TMP_PASSWORD_INVALID","description":"Password auth needs to be regenerated"},"TYPE_CONSTRUCTOR_INVALID":{"code":400,"name":"TYPE_CONSTRUCTOR_INVALID","description":"The type constructor is invalid"},"Timedout":{"code":-503,"name":"Timedout","description":"Timeout while fetching data"},"UNKNOWN_ERROR":{"code":400,"name":"UNKNOWN_ERROR"},"UNKNOWN_METHOD":{"code":500,"name":"UNKNOWN_METHOD","description":"The method you tried to call cannot be called on non-CDN DCs"},"UPDATE_APP_TO_LOGIN":{"code":406,"name":"UPDATE_APP_TO_LOGIN"},"USER_DEACTIVATED":{"code":401,"name":"USER_DEACTIVATED","description":"The user has been deleted/deactivated"},"USER_DEACTIVATED_BAN":{"code":401,"name":"USER_DEACTIVATED_BAN","description":"The user has been deleted/deactivated"},"USER_MIGRATE_%d":{"code":303,"name":"USER_MIGRATE_%d","_paramNames":["new_dc"],"description":"The user whose identity is being used to execute queries is associated with DC %d"},"WORKER_BUSY_TOO_LONG_RETRY":{"code":500,"name":"WORKER_BUSY_TOO_LONG_RETRY","description":"Telegram workers are too busy to respond immediately"}},"throws":{"1817183516":["INVITE_HASH_EXPIRED"],"account.updateProfile":["ABOUT_TOO_LONG","FIRSTNAME_INVALID","CHAT_WRITE_FORBIDDEN"],"auth.importBotAuthorization":["ACCESS_TOKEN_EXPIRED","ACCESS_TOKEN_INVALID","API_ID_INVALID","API_ID_PUBLISHED_FLOOD"],"messages.deleteRevokedExportedChatInvites":["ADMIN_ID_INVALID","PEER_ID_INVALID"],"messages.getExportedChatInvites":["ADMIN_ID_INVALID","CHANNEL_INVALID","CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","PEER_ID_INVALID","CHAT_WRITE_FORBIDDEN"],"channels.editAdmin":["ADMIN_RANK_EMOJI_NOT_ALLOWED","ADMIN_RANK_INVALID","ADMINS_TOO_MUCH","BOT_CHANNELS_NA","BOT_GROUPS_BLOCKED","BOTS_TOO_MUCH","CHANNEL_INVALID","CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","FRESH_CHANGE_ADMINS_FORBIDDEN","INPUT_USER_DEACTIVATED","PEER_ID_INVALID","USER_BLOCKED","USER_CREATOR","USER_ID_INVALID","USER_NOT_MUTUAL_CONTACT","USERS_TOO_MUCH","CHAT_ADMIN_INVITE_REQUIRED","CHAT_WRITE_FORBIDDEN","RIGHT_FORBIDDEN","USER_CHANNELS_TOO_MUCH","USER_PRIVACY_RESTRICTED","USER_RESTRICTED"],"photos.updateProfilePhoto":["ALBUM_PHOTOS_TOO_MANY","FILE_PARTS_INVALID","IMAGE_PROCESS_FAILED","LOCATION_INVALID","PHOTO_CROP_SIZE_SMALL","PHOTO_EXT_INVALID","PHOTO_ID_INVALID"],"photos.uploadProfilePhoto":["ALBUM_PHOTOS_TOO_MANY","EMOJI_MARKUP_INVALID","FILE_PARTS_INVALID","IMAGE_PROCESS_FAILED","PHOTO_CROP_FILE_MISSING","PHOTO_CROP_SIZE_SMALL","PHOTO_EXT_INVALID","PHOTO_FILE_MISSING","PHOTO_INVALID","STICKER_MIME_INVALID","VIDEO_FILE_INVALID"],"auth.exportLoginToken":["API_ID_INVALID","API_ID_PUBLISHED_FLOOD"],"auth.importWebTokenAuthorization":["API_ID_INVALID"],"auth.sendCode":["API_ID_INVALID","API_ID_PUBLISHED_FLOOD","PHONE_NUMBER_APP_SIGNUP_FORBIDDEN","PHONE_NUMBER_BANNED","PHONE_NUMBER_FLOOD","PHONE_NUMBER_INVALID","PHONE_PASSWORD_PROTECTED","SMS_CODE_CREATE_FAILED","PHONE_PASSWORD_FLOOD","AUTH_RESTART"],"messages.setInlineBotResults":["ARTICLE_TITLE_EMPTY","AUDIO_CONTENT_URL_EMPTY","AUDIO_TITLE_EMPTY","BUTTON_DATA_INVALID","BUTTON_TYPE_INVALID","BUTTON_URL_INVALID","DOCUMENT_INVALID","FILE_CONTENT_TYPE_INVALID","FILE_TITLE_EMPTY","GIF_CONTENT_TYPE_INVALID","MESSAGE_EMPTY","MESSAGE_TOO_LONG","NEXT_OFFSET_INVALID","PHOTO_CONTENT_TYPE_INVALID","PHOTO_CONTENT_URL_EMPTY","PHOTO_INVALID","PHOTO_THUMB_URL_EMPTY","QUERY_ID_INVALID","REPLY_MARKUP_INVALID","RESULT_ID_DUPLICATE","RESULT_ID_INVALID","RESULT_TYPE_INVALID","RESULTS_TOO_MUCH","SEND_MESSAGE_MEDIA_INVALID","SEND_MESSAGE_TYPE_INVALID","START_PARAM_EMPTY","START_PARAM_INVALID","STICKER_DOCUMENT_INVALID","SWITCH_PM_TEXT_EMPTY","URL_INVALID","USER_BOT_INVALID","VIDEO_TITLE_EMPTY","WEBDOCUMENT_INVALID","WEBDOCUMENT_MIME_INVALID","WEBDOCUMENT_SIZE_TOO_BIG","WEBDOCUMENT_URL_INVALID"],"auth.importAuthorization":["AUTH_BYTES_INVALID","USER_ID_INVALID"],"invokeWithLayer":["AUTH_BYTES_INVALID","CDN_METHOD_INVALID","CONNECTION_API_ID_INVALID","INVITE_HASH_EXPIRED","CHAT_WRITE_FORBIDDEN"],"auth.acceptLoginToken":["AUTH_TOKEN_ALREADY_ACCEPTED","AUTH_TOKEN_EXCEPTION","AUTH_TOKEN_EXPIRED","AUTH_TOKEN_INVALIDX"],"auth.importLoginToken":["AUTH_TOKEN_ALREADY_ACCEPTED","AUTH_TOKEN_EXPIRED","AUTH_TOKEN_INVALID","AUTH_TOKEN_INVALIDX"],"account.setGlobalPrivacySettings":["AUTOARCHIVE_NOT_AVAILABLE"],"payments.getBankCardData":["BANK_CARD_NUMBER_INVALID"],"messages.editChatDefaultBannedRights":["BANNED_RIGHTS_INVALID","CHAT_ADMIN_REQUIRED","CHAT_NOT_MODIFIED","PEER_ID_INVALID","UNTIL_DATE_INVALID","CHAT_WRITE_FORBIDDEN"],"messages.getBotApp":["BOT_APP_INVALID"],"bots.setBotCommands":["BOT_COMMAND_DESCRIPTION_INVALID","BOT_COMMAND_INVALID","LANG_CODE_INVALID","PEER_ID_INVALID","USER_BOT_REQUIRED","USER_ID_INVALID"],"messages.editMessage":["BOT_DOMAIN_INVALID","BOT_INVALID","BUTTON_DATA_INVALID","BUTTON_TYPE_INVALID","BUTTON_URL_INVALID","CHANNEL_INVALID","CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","CHAT_FORWARDS_RESTRICTED","DOCUMENT_INVALID","ENTITIES_TOO_LONG","ENTITY_BOUNDS_INVALID","INPUT_USER_DEACTIVATED","MEDIA_CAPTION_TOO_LONG","MEDIA_EMPTY","MEDIA_GROUPED_INVALID","MEDIA_NEW_INVALID","MEDIA_PREV_INVALID","MESSAGE_EDIT_TIME_EXPIRED","MESSAGE_EMPTY","MESSAGE_ID_INVALID","MESSAGE_NOT_MODIFIED","MESSAGE_TOO_LONG","MSG_ID_INVALID","PEER_ID_INVALID","REPLY_MARKUP_INVALID","SCHEDULE_DATE_INVALID","USER_BANNED_IN_CHANNEL","CHAT_SEND_GIFS_FORBIDDEN","CHAT_WRITE_FORBIDDEN","INLINE_BOT_REQUIRED","MESSAGE_AUTHOR_REQUIRED"],"messages.sendMessage":["BOT_DOMAIN_INVALID","BOT_INVALID","BUTTON_DATA_INVALID","BUTTON_TYPE_INVALID","BUTTON_URL_INVALID","BUTTON_USER_PRIVACY_RESTRICTED","CHANNEL_INVALID","CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","CHAT_ID_INVALID","CHAT_RESTRICTED","ENCRYPTION_DECLINED","ENTITIES_TOO_LONG","ENTITY_BOUNDS_INVALID","ENTITY_MENTION_USER_INVALID","FROM_MESSAGE_BOT_DISABLED","INPUT_USER_DEACTIVATED","MESSAGE_EMPTY","MESSAGE_TOO_LONG","MSG_ID_INVALID","PEER_ID_INVALID","PINNED_DIALOGS_TOO_MUCH","POLL_OPTION_INVALID","REPLY_MARKUP_INVALID","REPLY_MARKUP_TOO_LONG","SCHEDULE_BOT_NOT_ALLOWED","SCHEDULE_DATE_TOO_LATE","SCHEDULE_STATUS_PRIVATE","SCHEDULE_TOO_MUCH","SEND_AS_PEER_INVALID","TOPIC_CLOSED","TOPIC_DELETED","USER_BANNED_IN_CHANNEL","USER_IS_BLOCKED","USER_IS_BOT","WC_CONVERT_URL_INVALID","YOU_BLOCKED_USER","CHAT_GUEST_SEND_FORBIDDEN","CHAT_SEND_PLAIN_FORBIDDEN","CHAT_WRITE_FORBIDDEN","PAYMENT_UNSUPPORTED","SLOWMODE_WAIT_%d","RANDOM_ID_DUPLICATE"],"channels.inviteToChannel":["BOT_GROUPS_BLOCKED","BOTS_TOO_MUCH","CHANNEL_INVALID","CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","CHAT_INVALID","INPUT_USER_DEACTIVATED","MSG_ID_INVALID","USER_BANNED_IN_CHANNEL","USER_BLOCKED","USER_BOT","USER_CHANNELS_TOO_MUCH","USER_ID_INVALID","USER_KICKED","USER_NOT_MUTUAL_CONTACT","USERS_TOO_MUCH","CHAT_WRITE_FORBIDDEN","USER_PRIVACY_RESTRICTED"],"messages.addChatUser":["BOT_GROUPS_BLOCKED","CHAT_ADMIN_REQUIRED","CHAT_ID_INVALID","INPUT_USER_DEACTIVATED","MSG_ID_INVALID","PEER_ID_INVALID","USER_ALREADY_PARTICIPANT","USER_ID_INVALID","USER_IS_BLOCKED","USER_NOT_MUTUAL_CONTACT","USERS_TOO_MUCH","YOU_BLOCKED_USER","CHAT_WRITE_FORBIDDEN","USER_PRIVACY_RESTRICTED"],"messages.getInlineBotResults":["BOT_INLINE_DISABLED","BOT_INVALID","BOT_RESPONSE_TIMEOUT","CHANNEL_INVALID","CHANNEL_PRIVATE","INPUT_USER_DEACTIVATED","MSG_ID_INVALID","Timeout"],"bots.reorderUsernames":["BOT_INVALID"],"bots.toggleUsername":["BOT_INVALID"],"messages.getAttachMenuBot":["BOT_INVALID"],"messages.startBot":["BOT_INVALID","CHAT_ADMIN_REQUIRED","INPUT_USER_DEACTIVATED","MSG_ID_INVALID","PEER_ID_INVALID","START_PARAM_EMPTY","START_PARAM_INVALID","START_PARAM_TOO_LONG","CHAT_WRITE_FORBIDDEN","RANDOM_ID_DUPLICATE"],"stickers.addStickerToSet":["BOT_MISSING","STICKER_PNG_NOPNG","STICKER_TGS_NOTGS","STICKERPACK_STICKERS_TOO_MUCH","STICKERS_TOO_MUCH","STICKERSET_INVALID"],"stickers.changeSticker":["BOT_MISSING","STICKER_INVALID"],"stickers.deleteStickerSet":["BOT_MISSING","STICKERSET_INVALID"],"stickers.removeStickerFromSet":["BOT_MISSING","STICKER_INVALID"],"messages.updatePinnedMessage":["BOT_ONESIDE_NOT_AVAIL","CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","CHAT_NOT_MODIFIED","MESSAGE_ID_INVALID","PEER_ID_INVALID","PIN_RESTRICTED","USER_BANNED_IN_CHANNEL","CHAT_WRITE_FORBIDDEN"],"messages.sendMedia":["BOT_PAYMENTS_DISABLED","BROADCAST_PUBLIC_VOTERS_FORBIDDEN","BUTTON_DATA_INVALID","BUTTON_TYPE_INVALID","BUTTON_URL_INVALID","CHANNEL_INVALID","CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","CHAT_FORWARDS_RESTRICTED","CHAT_RESTRICTED","CURRENCY_TOTAL_AMOUNT_INVALID","DOCUMENT_INVALID","EMOTICON_INVALID","ENTITY_BOUNDS_INVALID","EXTERNAL_URL_INVALID","FILE_PART_LENGTH_INVALID","FILE_PARTS_INVALID","FILE_REFERENCE_EMPTY","FILE_REFERENCE_EXPIRED","GAME_BOT_INVALID","IMAGE_PROCESS_FAILED","INPUT_USER_DEACTIVATED","MD5_CHECKSUM_INVALID","MEDIA_CAPTION_TOO_LONG","MEDIA_EMPTY","MEDIA_INVALID","MSG_ID_INVALID","PAYMENT_PROVIDER_INVALID","PEER_ID_INVALID","PHOTO_EXT_INVALID","PHOTO_INVALID_DIMENSIONS","PHOTO_SAVE_FILE_INVALID","POLL_ANSWER_INVALID","POLL_ANSWERS_INVALID","POLL_OPTION_DUPLICATE","POLL_OPTION_INVALID","POLL_QUESTION_INVALID","QUIZ_CORRECT_ANSWER_INVALID","QUIZ_CORRECT_ANSWERS_EMPTY","QUIZ_CORRECT_ANSWERS_TOO_MUCH","QUIZ_MULTIPLE_INVALID","REPLY_MARKUP_BUY_EMPTY","REPLY_MARKUP_INVALID","REPLY_MARKUP_TOO_LONG","SCHEDULE_BOT_NOT_ALLOWED","SCHEDULE_DATE_TOO_LATE","SCHEDULE_TOO_MUCH","SEND_AS_PEER_INVALID","TOPIC_CLOSED","TOPIC_DELETED","TTL_MEDIA_INVALID","USER_BANNED_IN_CHANNEL","USER_IS_BLOCKED","USER_IS_BOT","VIDEO_CONTENT_TYPE_INVALID","VOICE_MESSAGES_FORBIDDEN","WEBDOCUMENT_MIME_INVALID","WEBPAGE_CURL_FAILED","WEBPAGE_MEDIA_EMPTY","YOU_BLOCKED_USER","CHAT_GUEST_SEND_FORBIDDEN","CHAT_SEND_AUDIOS_FORBIDDEN","CHAT_SEND_DOCS_FORBIDDEN","CHAT_SEND_GIFS_FORBIDDEN","CHAT_SEND_MEDIA_FORBIDDEN","CHAT_SEND_PHOTOS_FORBIDDEN","CHAT_SEND_POLL_FORBIDDEN","CHAT_SEND_STICKERS_FORBIDDEN","CHAT_SEND_VIDEOS_FORBIDDEN","CHAT_SEND_VOICES_FORBIDDEN","CHAT_WRITE_FORBIDDEN","PREMIUM_ACCOUNT_REQUIRED","SLOWMODE_WAIT_%d","RANDOM_ID_DUPLICATE"],"messages.getBotCallbackAnswer":["BOT_RESPONSE_TIMEOUT","CHANNEL_INVALID","CHANNEL_PRIVATE","DATA_INVALID","MESSAGE_ID_INVALID","PEER_ID_INVALID","Timeout"],"messages.setGameScore":["BOT_SCORE_NOT_MODIFIED","MESSAGE_ID_INVALID","PEER_ID_INVALID","SCORE_INVALID","USER_BOT_REQUIRED"],"channels.setDiscussionGroup":["BROADCAST_ID_INVALID","CHANNEL_INVALID","CHAT_ADMIN_REQUIRED","LINK_NOT_MODIFIED","MEGAGROUP_ID_INVALID","MEGAGROUP_PREHISTORY_HIDDEN","CHAT_WRITE_FORBIDDEN"],"messages.forwardMessages":["BROADCAST_PUBLIC_VOTERS_FORBIDDEN","CHANNEL_INVALID","CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","CHAT_FORWARDS_RESTRICTED","CHAT_ID_INVALID","CHAT_RESTRICTED","GROUPED_MEDIA_INVALID","INPUT_USER_DEACTIVATED","MEDIA_EMPTY","MESSAGE_ID_INVALID","MESSAGE_IDS_EMPTY","MSG_ID_INVALID","PEER_ID_INVALID","QUIZ_ANSWER_MISSING","RANDOM_ID_INVALID","SCHEDULE_DATE_TOO_LATE","SCHEDULE_TOO_MUCH","SEND_AS_PEER_INVALID","SLOWMODE_MULTI_MSGS_DISABLED","TOPIC_CLOSED","TOPIC_DELETED","USER_BANNED_IN_CHANNEL","USER_IS_BLOCKED","USER_IS_BOT","YOU_BLOCKED_USER","CHAT_SEND_AUDIOS_FORBIDDEN","CHAT_SEND_GAME_FORBIDDEN","CHAT_SEND_GIFS_FORBIDDEN","CHAT_SEND_MEDIA_FORBIDDEN","CHAT_SEND_PHOTOS_FORBIDDEN","CHAT_SEND_PLAIN_FORBIDDEN","CHAT_SEND_POLL_FORBIDDEN","CHAT_SEND_STICKERS_FORBIDDEN","CHAT_SEND_VIDEOS_FORBIDDEN","CHAT_SEND_VOICES_FORBIDDEN","CHAT_WRITE_FORBIDDEN","SLOWMODE_WAIT_%d","RANDOM_ID_DUPLICATE"],"stats.getBroadcastStats":["BROADCAST_REQUIRED","CHANNEL_INVALID","CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED"],"messages.editInlineBotMessage":["BUTTON_DATA_INVALID","ENTITY_BOUNDS_INVALID","MESSAGE_ID_INVALID","MESSAGE_NOT_MODIFIED"],"bots.setBotMenuButton":["BUTTON_TEXT_INVALID","BUTTON_URL_INVALID"],"phone.acceptCall":["CALL_ALREADY_ACCEPTED","CALL_ALREADY_DECLINED","CALL_PEER_INVALID","CALL_PROTOCOL_FLAGS_INVALID","CALL_OCCUPY_FAILED"],"phone.discardCall":["CALL_ALREADY_ACCEPTED","CALL_OCCUPY_FAILED","CALL_PEER_INVALID"],"phone.confirmCall":["CALL_ALREADY_DECLINED","CALL_PEER_INVALID"],"phone.receivedCall":["CALL_ALREADY_DECLINED","CALL_PEER_INVALID"],"phone.saveCallDebug":["CALL_PEER_INVALID","DATA_JSON_INVALID"],"phone.setCallRating":["CALL_PEER_INVALID"],"phone.requestCall":["CALL_PROTOCOL_FLAGS_INVALID","INPUT_USER_DEACTIVATED","PARTICIPANT_VERSION_OUTDATED","USER_ID_INVALID","USER_IS_BLOCKED","USER_PRIVACY_RESTRICTED"],"updates.getDifference":["CDN_METHOD_INVALID","CHANNEL_INVALID","CHANNEL_PRIVATE","DATE_EMPTY","MSG_ID_INVALID","PERSISTENT_TIMESTAMP_EMPTY","PERSISTENT_TIMESTAMP_INVALID","USER_NOT_PARTICIPANT","USERNAME_INVALID","CHAT_WRITE_FORBIDDEN","RANDOM_ID_DUPLICATE"],"upload.getCdnFileHashes":["CDN_METHOD_INVALID","RSA_DECRYPT_FAILED"],"channels.getForumTopics":["CHANNEL_FORUM_MISSING","CHANNEL_INVALID"],"channels.convertToGigagroup":["CHANNEL_ID_INVALID","CHANNEL_INVALID","CHAT_ADMIN_REQUIRED","PARTICIPANTS_TOO_FEW","CHAT_WRITE_FORBIDDEN"],"account.updateNotifySettings":["CHANNEL_INVALID","CHANNEL_PRIVATE","MSG_ID_INVALID","PEER_ID_INVALID","SETTINGS_INVALID"],"channels.checkUsername":["CHANNEL_INVALID","CHANNEL_PRIVATE","CHANNELS_ADMIN_PUBLIC_TOO_MUCH","CHAT_ID_INVALID","USERNAME_INVALID","USERNAME_OCCUPIED","USERNAME_PURCHASE_AVAILABLE"],"channels.createForumTopic":["CHANNEL_INVALID"],"channels.deleteChannel":["CHANNEL_INVALID","CHANNEL_PRIVATE","CHANNEL_TOO_LARGE","CHAT_ADMIN_REQUIRED","CHAT_NOT_MODIFIED","CHAT_WRITE_FORBIDDEN"],"channels.deleteHistory":["CHANNEL_INVALID","CHANNEL_PARICIPANT_MISSING","CHANNEL_PRIVATE","CHANNEL_TOO_BIG","CHAT_ADMIN_REQUIRED"],"channels.deleteMessages":["CHANNEL_INVALID","CHANNEL_PRIVATE","MSG_ID_INVALID","MESSAGE_DELETE_FORBIDDEN"],"channels.deleteParticipantHistory":["CHANNEL_INVALID","CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","MSG_ID_INVALID","PARTICIPANT_ID_INVALID","CHAT_WRITE_FORBIDDEN"],"channels.deleteUserHistory":["CHANNEL_INVALID","CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","MSG_ID_INVALID","USER_ID_INVALID","CHAT_WRITE_FORBIDDEN"],"channels.editAbout":["CHANNEL_INVALID","CHAT_ABOUT_NOT_MODIFIED","CHAT_ABOUT_TOO_LONG","CHAT_ADMIN_REQUIRED"],"channels.editBanned":["CHANNEL_INVALID","CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","INPUT_USER_DEACTIVATED","MSG_ID_INVALID","PARTICIPANT_ID_INVALID","PEER_ID_INVALID","USER_ADMIN_INVALID","USER_ID_INVALID","CHAT_WRITE_FORBIDDEN"],"channels.editPhoto":["CHANNEL_INVALID","CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","CHAT_NOT_MODIFIED","FILE_PARTS_INVALID","FILE_REFERENCE_INVALID","PHOTO_CROP_SIZE_SMALL","PHOTO_EXT_INVALID","PHOTO_INVALID","CHAT_WRITE_FORBIDDEN"],"channels.editTitle":["CHANNEL_INVALID","CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","CHAT_NOT_MODIFIED","CHAT_TITLE_EMPTY","CHAT_WRITE_FORBIDDEN"],"channels.exportInvite":["CHANNEL_INVALID","CHAT_ADMIN_REQUIRED","INVITE_HASH_EXPIRED"],"channels.exportMessageLink":["CHANNEL_INVALID","CHANNEL_PRIVATE","MESSAGE_ID_INVALID","MSG_ID_INVALID"],"channels.getAdminLog":["CHANNEL_INVALID","CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","MSG_ID_INVALID","CHAT_WRITE_FORBIDDEN"],"channels.getChannels":["CHANNEL_INVALID","CHANNEL_PRIVATE","MSG_ID_INVALID","USER_BANNED_IN_CHANNEL"],"channels.getFullChannel":["CHANNEL_INVALID","CHANNEL_PRIVATE","CHAT_NOT_MODIFIED","MSG_ID_INVALID","CHANNEL_PUBLIC_GROUP_NA"],"channels.getMessages":["CHANNEL_INVALID","CHANNEL_PRIVATE","MESSAGE_IDS_EMPTY","MSG_ID_INVALID","USER_BANNED_IN_CHANNEL"],"channels.getParticipant":["CHANNEL_INVALID","CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","MSG_ID_INVALID","PARTICIPANT_ID_INVALID","USER_ID_INVALID","USER_NOT_PARTICIPANT"],"channels.getParticipants":["CHANNEL_INVALID","CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED"],"channels.getSponsoredMessages":["CHANNEL_INVALID","CHANNEL_PRIVATE","MSG_ID_INVALID"],"channels.joinChannel":["CHANNEL_INVALID","CHANNEL_PRIVATE","CHANNELS_TOO_MUCH","CHAT_INVALID","INVITE_HASH_EMPTY","INVITE_HASH_EXPIRED","INVITE_HASH_INVALID","INVITE_REQUEST_SENT","MSG_ID_INVALID","PEER_ID_INVALID","USER_ALREADY_PARTICIPANT","USER_CHANNELS_TOO_MUCH","USERS_TOO_MUCH"],"channels.leaveChannel":["CHANNEL_INVALID","CHANNEL_PRIVATE","MSG_ID_INVALID","USER_BANNED_IN_CHANNEL","USER_CREATOR","USER_NOT_PARTICIPANT","CHANNEL_PUBLIC_GROUP_NA"],"channels.readHistory":["CHANNEL_INVALID","CHANNEL_PRIVATE","MSG_ID_INVALID"],"channels.readMessageContents":["CHANNEL_INVALID","CHANNEL_PRIVATE","MSG_ID_INVALID"],"channels.reorderUsernames":["CHANNEL_INVALID"],"channels.reportSpam":["CHANNEL_INVALID","CHAT_ADMIN_REQUIRED","INPUT_USER_DEACTIVATED","USER_ID_INVALID"],"channels.setStickers":["CHANNEL_INVALID","PARTICIPANTS_TOO_FEW","STICKERSET_OWNER_ANONYMOUS"],"channels.toggleInvites":["CHANNEL_INVALID","CHAT_ADMIN_REQUIRED","CHAT_NOT_MODIFIED"],"channels.toggleJoinRequest":["CHANNEL_INVALID","CHAT_ID_INVALID","CHAT_NOT_MODIFIED","CHAT_PUBLIC_REQUIRED"],"channels.toggleJoinToSend":["CHANNEL_INVALID","CHAT_ADMIN_REQUIRED","CHAT_ID_INVALID"],"channels.togglePreHistoryHidden":["CHANNEL_INVALID","CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","CHAT_ID_INVALID","CHAT_LINK_EXISTS","CHAT_NOT_MODIFIED"],"channels.toggleSignatures":["CHANNEL_INVALID","CHAT_ADMIN_REQUIRED","CHAT_ID_INVALID","CHAT_NOT_MODIFIED"],"channels.toggleSlowMode":["CHANNEL_INVALID","CHAT_ADMIN_REQUIRED","CHAT_NOT_MODIFIED","SECONDS_INVALID"],"channels.updatePinnedMessage":["CHANNEL_INVALID","CHAT_ADMIN_REQUIRED","CHAT_ID_INVALID","CHAT_NOT_MODIFIED"],"channels.updateUsername":["CHANNEL_INVALID","CHANNEL_PRIVATE","CHANNELS_ADMIN_PUBLIC_TOO_MUCH","CHAT_ADMIN_REQUIRED","CHAT_NOT_MODIFIED","USERNAME_INVALID","USERNAME_NOT_MODIFIED","USERNAME_OCCUPIED","USERNAME_PURCHASE_AVAILABLE","CHAT_WRITE_FORBIDDEN"],"channels.viewSponsoredMessage":["CHANNEL_INVALID"],"messages.editChatAbout":["CHANNEL_INVALID","CHANNEL_PRIVATE","CHAT_ABOUT_NOT_MODIFIED","CHAT_ABOUT_TOO_LONG","CHAT_ADMIN_REQUIRED","CHAT_ID_INVALID","CHAT_NOT_MODIFIED","PEER_ID_INVALID","CHAT_WRITE_FORBIDDEN"],"messages.exportChatInvite":["CHANNEL_INVALID","CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","CHAT_ID_INVALID","EXPIRE_DATE_INVALID","PEER_ID_INVALID","USAGE_LIMIT_INVALID","CHAT_WRITE_FORBIDDEN"],"messages.getDiscussionMessage":["CHANNEL_INVALID","CHANNEL_PRIVATE","MSG_ID_INVALID","PEER_ID_INVALID","TOPIC_ID_INVALID"],"messages.getHistory":["CHANNEL_INVALID","CHANNEL_PRIVATE","CHAT_ID_INVALID","MSG_ID_INVALID","PEER_ID_INVALID"],"messages.getMessagesViews":["CHANNEL_INVALID","CHANNEL_PRIVATE","CHAT_ID_INVALID","MSG_ID_INVALID","PEER_ID_INVALID"],"messages.getPeerDialogs":["CHANNEL_INVALID","CHANNEL_PRIVATE","MSG_ID_INVALID","PEER_ID_INVALID"],"messages.getPeerSettings":["CHANNEL_INVALID","CHANNEL_PRIVATE","MSG_ID_INVALID","PEER_ID_INVALID"],"messages.getReplies":["CHANNEL_INVALID","CHANNEL_PRIVATE","MSG_ID_INVALID","PEER_ID_INVALID"],"messages.getUnreadMentions":["CHANNEL_INVALID","CHANNEL_PRIVATE","MSG_ID_INVALID","PEER_ID_INVALID"],"messages.importChatInvite":["CHANNEL_INVALID","CHANNEL_PRIVATE","CHANNELS_TOO_MUCH","CHAT_INVALID","INVITE_HASH_EMPTY","INVITE_HASH_EXPIRED","INVITE_HASH_INVALID","INVITE_REQUEST_SENT","MSG_ID_INVALID","PEER_ID_INVALID","USER_ALREADY_PARTICIPANT","USER_CHANNELS_TOO_MUCH","USERS_TOO_MUCH"],"messages.readMentions":["CHANNEL_INVALID","CHANNEL_PRIVATE","MSG_ID_INVALID","PEER_ID_INVALID"],"messages.search":["CHANNEL_INVALID","CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","CHAT_ID_INVALID","FROM_PEER_INVALID","INPUT_FILTER_INVALID","INPUT_USER_DEACTIVATED","MSG_ID_INVALID","PEER_ID_INVALID","PEER_ID_NOT_SUPPORTED","SEARCH_QUERY_EMPTY","USER_ID_INVALID"],"messages.sendInlineBotResult":["CHANNEL_INVALID","CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","CHAT_RESTRICTED","CHAT_SEND_INLINE_FORBIDDEN","ENTITY_BOUNDS_INVALID","INLINE_RESULT_EXPIRED","INPUT_USER_DEACTIVATED","MEDIA_EMPTY","MSG_ID_INVALID","PEER_ID_INVALID","QUERY_ID_EMPTY","RESULT_ID_EMPTY","SCHEDULE_DATE_TOO_LATE","SCHEDULE_TOO_MUCH","TOPIC_DELETED","USER_BANNED_IN_CHANNEL","VOICE_MESSAGES_FORBIDDEN","WEBPAGE_CURL_FAILED","WEBPAGE_MEDIA_EMPTY","YOU_BLOCKED_USER","CHAT_GUEST_SEND_FORBIDDEN","CHAT_SEND_AUDIOS_FORBIDDEN","CHAT_SEND_GAME_FORBIDDEN","CHAT_SEND_GIFS_FORBIDDEN","CHAT_SEND_MEDIA_FORBIDDEN","CHAT_SEND_PHOTOS_FORBIDDEN","CHAT_SEND_STICKERS_FORBIDDEN","CHAT_SEND_VOICES_FORBIDDEN","CHAT_WRITE_FORBIDDEN","SLOWMODE_WAIT_%d","RANDOM_ID_DUPLICATE"],"messages.sendReaction":["CHANNEL_INVALID","CHANNEL_PRIVATE","MESSAGE_ID_INVALID","MESSAGE_NOT_MODIFIED","MSG_ID_INVALID","PEER_ID_INVALID","REACTION_EMPTY","REACTION_INVALID","REACTIONS_TOO_MANY","USER_BANNED_IN_CHANNEL","CHAT_WRITE_FORBIDDEN","PREMIUM_ACCOUNT_REQUIRED"],"messages.sendVote":["CHANNEL_INVALID","CHANNEL_PRIVATE","MESSAGE_ID_INVALID","MESSAGE_POLL_CLOSED","MSG_ID_INVALID","OPTION_INVALID","OPTIONS_TOO_MUCH","PEER_ID_INVALID","REVOTE_NOT_ALLOWED"],"messages.setTyping":["CHANNEL_INVALID","CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","CHAT_ID_INVALID","INPUT_USER_DEACTIVATED","MSG_ID_INVALID","PEER_ID_INVALID","USER_BANNED_IN_CHANNEL","USER_IS_BLOCKED","USER_IS_BOT","CHAT_WRITE_FORBIDDEN","GROUPCALL_FORBIDDEN"],"messages.uploadMedia":["CHANNEL_INVALID","CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","CHAT_ID_INVALID","CHAT_RESTRICTED","FILE_PARTS_INVALID","IMAGE_PROCESS_FAILED","INPUT_USER_DEACTIVATED","MEDIA_INVALID","MSG_ID_INVALID","PEER_ID_INVALID","PHOTO_EXT_INVALID","PHOTO_INVALID_DIMENSIONS","PHOTO_SAVE_FILE_INVALID","USER_BANNED_IN_CHANNEL","WEBPAGE_CURL_FAILED","CHAT_WRITE_FORBIDDEN"],"msg_container":["CHANNEL_INVALID","MESSAGE_ID_INVALID","MSG_ID_INVALID"],"msg_resend_req":["CHANNEL_INVALID","Invalid msg_resend_req query","Invalid msgs_state_req query"],"msgs_state_req":["CHANNEL_INVALID","FILE_PART_EMPTY","MSG_ID_INVALID","USER_IS_BLOCKED","Invalid msgs_state_req query"],"stats.getMegagroupStats":["CHANNEL_INVALID","CHAT_ADMIN_REQUIRED","MEGAGROUP_REQUIRED"],"stats.getMessagePublicForwards":["CHANNEL_INVALID","CHAT_ADMIN_REQUIRED","MESSAGE_ID_INVALID","PEER_ID_INVALID"],"stats.getMessageStats":["CHANNEL_INVALID","CHAT_ADMIN_REQUIRED","MESSAGE_ID_INVALID","PEER_ID_INVALID"],"updates.getChannelDifference":["CHANNEL_INVALID","CHANNEL_PRIVATE","FROM_MESSAGE_BOT_DISABLED","MSG_ID_INVALID","PERSISTENT_TIMESTAMP_EMPTY","PERSISTENT_TIMESTAMP_INVALID","PINNED_DIALOGS_TOO_MUCH","RANGES_INVALID","USER_BANNED_IN_CHANNEL","CHANNEL_PUBLIC_GROUP_NA","CHAT_WRITE_FORBIDDEN","PERSISTENT_TIMESTAMP_OUTDATED"],"upload.getFile":["CHANNEL_INVALID","CHANNEL_PRIVATE","FILE_ID_INVALID","FILE_REFERENCE_EMPTY","FILE_REFERENCE_EXPIRED","FILE_REFERENCE_INVALID","LIMIT_INVALID","LOCATION_INVALID","MSG_ID_INVALID","OFFSET_INVALID","PEER_ID_INVALID","FILEREF_UPGRADE_NEEDED"],"users.getUsers":["CHANNEL_INVALID","CHANNEL_PRIVATE","FROM_MESSAGE_BOT_DISABLED","MSG_ID_INVALID","USER_BANNED_IN_CHANNEL"],"account.reportPeer":["CHANNEL_PRIVATE","PEER_ID_INVALID"],"channels.editCreator":["CHANNEL_PRIVATE","CHANNELS_ADMIN_PUBLIC_TOO_MUCH","CHAT_ADMIN_REQUIRED","PASSWORD_HASH_INVALID","PASSWORD_MISSING","PASSWORD_TOO_FRESH_%d","SESSION_TOO_FRESH_%d","SRP_ID_INVALID","USER_ID_INVALID","CHAT_WRITE_FORBIDDEN"],"channels.getSendAs":["CHANNEL_PRIVATE","CHAT_ID_INVALID","PEER_ID_INVALID"],"contacts.addContact":["CHANNEL_PRIVATE","CONTACT_ID_INVALID","CONTACT_NAME_EMPTY","MSG_ID_INVALID"],"contacts.unblock":["CHANNEL_PRIVATE","CONTACT_ID_INVALID","MSG_ID_INVALID","PEER_ID_INVALID"],"messages.deleteHistory":["CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","CHAT_ID_INVALID","CHAT_REVOKE_DATE_UNSUPPORTED","MAX_DATE_INVALID","MESSAGE_ID_INVALID","MIN_DATE_INVALID","MSG_ID_INVALID","PEER_ID_INVALID"],"messages.getChatInviteImporters":["CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","INVITE_HASH_EXPIRED","PEER_ID_INVALID","SEARCH_WITH_LINK_NOT_SUPPORTED","CHAT_WRITE_FORBIDDEN"],"messages.getExportedChatInvite":["CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","INVITE_HASH_EXPIRED","PEER_ID_INVALID","CHAT_WRITE_FORBIDDEN"],"messages.getMessagesReactions":["CHANNEL_PRIVATE"],"messages.getOnlines":["CHANNEL_PRIVATE","CHAT_ID_INVALID","PEER_ID_INVALID"],"messages.hideAllChatJoinRequests":["CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","HIDE_REQUESTER_MISSING","INVITE_HASH_EXPIRED","PEER_ID_INVALID","USER_CHANNELS_TOO_MUCH","CHAT_WRITE_FORBIDDEN"],"messages.readHistory":["CHANNEL_PRIVATE","CHAT_ID_INVALID","MSG_ID_INVALID","PEER_ID_INVALID"],"messages.report":["CHANNEL_PRIVATE","PEER_ID_INVALID"],"messages.reportSpam":["CHANNEL_PRIVATE","MSG_ID_INVALID","PEER_ID_INVALID"],"messages.sendMultiMedia":["CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","CHAT_FORWARDS_RESTRICTED","ENTITY_BOUNDS_INVALID","MEDIA_CAPTION_TOO_LONG","MEDIA_EMPTY","MEDIA_INVALID","MULTI_MEDIA_TOO_LONG","PEER_ID_INVALID","RANDOM_ID_EMPTY","SCHEDULE_DATE_TOO_LATE","SCHEDULE_TOO_MUCH","SEND_AS_PEER_INVALID","TOPIC_DELETED","USER_BANNED_IN_CHANNEL","CHAT_SEND_MEDIA_FORBIDDEN","CHAT_WRITE_FORBIDDEN","SLOWMODE_WAIT_%d","RANDOM_ID_DUPLICATE"],"messages.toggleDialogPin":["CHANNEL_PRIVATE","PEER_HISTORY_EMPTY","PEER_ID_INVALID","PINNED_DIALOGS_TOO_MUCH"],"phone.createGroupCall":["CHANNEL_PRIVATE","CHAT_ADMIN_REQUIRED","CREATE_CALL_FAILED","PEER_ID_INVALID","SCHEDULE_DATE_INVALID"],"users.getFullUser":["CHANNEL_PRIVATE","MSG_ID_INVALID","USER_ID_INVALID"],"channels.createChannel":["CHANNELS_ADMIN_LOCATED_TOO_MUCH","CHANNELS_TOO_MUCH","CHAT_ABOUT_TOO_LONG","CHAT_TITLE_EMPTY","USER_RESTRICTED"],"channels.getAdminedPublicChannels":["CHANNELS_ADMIN_LOCATED_TOO_MUCH","CHANNELS_ADMIN_PUBLIC_TOO_MUCH"],"messages.migrateChat":["CHANNELS_TOO_MUCH","CHAT_ADMIN_REQUIRED","CHAT_ID_INVALID","PEER_ID_INVALID"],"channels.editLocation":["CHAT_ADMIN_REQUIRED","CHAT_NOT_MODIFIED","MEGAGROUP_REQUIRED"],"messages.checkHistoryImportPeer":["CHAT_ADMIN_REQUIRED","PEER_ID_INVALID","USER_NOT_MUTUAL_CONTACT"],"messages.deleteChat":["CHAT_ADMIN_REQUIRED","CHAT_ID_INVALID","PEER_ID_INVALID"],"messages.deleteChatUser":["CHAT_ADMIN_REQUIRED","CHAT_ID_INVALID","PEER_ID_INVALID","USER_ID_INVALID","USER_NOT_PARTICIPANT"],"messages.editExportedChatInvite":["CHAT_ADMIN_REQUIRED","CHAT_INVITE_PERMANENT","INVITE_HASH_EXPIRED","PEER_ID_INVALID","CHAT_WRITE_FORBIDDEN","EDIT_BOT_INVITE_FORBIDDEN"],"messages.getAdminsWithInvites":["CHAT_ADMIN_REQUIRED","PEER_ID_INVALID","CHAT_WRITE_FORBIDDEN"],"messages.getMessageEditData":["CHAT_ADMIN_REQUIRED","MESSAGE_ID_INVALID","PEER_ID_INVALID","CHAT_WRITE_FORBIDDEN","MESSAGE_AUTHOR_REQUIRED"],"messages.getScheduledHistory":["CHAT_ADMIN_REQUIRED","PEER_ID_INVALID"],"messages.getScheduledMessages":["CHAT_ADMIN_REQUIRED","PEER_ID_INVALID"],"messages.hideChatJoinRequest":["CHAT_ADMIN_REQUIRED","HIDE_REQUESTER_MISSING","INPUT_USER_DEACTIVATED","PEER_ID_INVALID","USER_ALREADY_PARTICIPANT","USER_ID_INVALID","USER_CHANNELS_TOO_MUCH"],"messages.setChatAvailableReactions":["CHAT_ADMIN_REQUIRED","CHAT_NOT_MODIFIED","PEER_ID_INVALID"],"messages.unpinAllMessages":["CHAT_ADMIN_REQUIRED","CHAT_NOT_MODIFIED"],"phone.getGroupCallStreamRtmpUrl":["CHAT_ADMIN_REQUIRED"],"channels.toggleForum":["CHAT_DISCUSSION_UNALLOWED"],"messages.discardEncryption":["CHAT_ID_EMPTY","ENCRYPTION_ALREADY_DECLINED","ENCRYPTION_ID_INVALID"],"folders.editPeerFolders":["CHAT_ID_INVALID","FOLDER_ID_INVALID"],"messages.acceptEncryption":["CHAT_ID_INVALID","ENCRYPTION_ALREADY_ACCEPTED","ENCRYPTION_ALREADY_DECLINED"],"messages.editChatAdmin":["CHAT_ID_INVALID","PEER_ID_INVALID","USER_ID_INVALID","USER_NOT_PARTICIPANT"],"messages.editChatPhoto":["CHAT_ID_INVALID","CHAT_NOT_MODIFIED","PEER_ID_INVALID","PHOTO_CROP_SIZE_SMALL","PHOTO_EXT_INVALID","PHOTO_INVALID"],"messages.editChatTitle":["CHAT_ID_INVALID","CHAT_NOT_MODIFIED","CHAT_TITLE_EMPTY","PEER_ID_INVALID"],"messages.forwardMessage":["CHAT_ID_INVALID","MESSAGE_ID_INVALID","PEER_ID_INVALID","YOU_BLOCKED_USER"],"messages.getChats":["CHAT_ID_INVALID","PEER_ID_INVALID"],"messages.getFullChat":["CHAT_ID_INVALID","PEER_ID_INVALID"],"messages.reportEncryptedSpam":["CHAT_ID_INVALID"],"messages.sendEncrypted":["CHAT_ID_INVALID","DATA_INVALID","DATA_TOO_LONG","ENCRYPTION_DECLINED","MSG_WAIT_FAILED","USER_IS_BLOCKED"],"messages.setEncryptedTyping":["CHAT_ID_INVALID"],"messages.toggleChatAdmins":["CHAT_ID_INVALID","CHAT_NOT_MODIFIED"],"messages.updateDialogFilter":["CHAT_ID_INVALID","FILTER_ID_INVALID","FILTER_INCLUDE_EMPTY","FILTER_TITLE_EMPTY"],"messages.createChat":["CHAT_INVALID","CHAT_TITLE_EMPTY","INPUT_USER_DEACTIVATED","USERS_TOO_FEW","USER_RESTRICTED","CHAT_ID_GENERATE_FAILED"],"messages.setHistoryTTL":["CHAT_NOT_MODIFIED","TTL_PERIOD_INVALID"],"messages.toggleNoForwards":["CHAT_NOT_MODIFIED","PEER_ID_INVALID"],"messages.getMessageReadParticipants":["CHAT_TOO_BIG","MSG_ID_INVALID","MSG_TOO_OLD","PEER_ID_INVALID"],"messages.getMessagesReadParticipants":["CHAT_TOO_BIG","MESSAGE_ID_INVALID"],"auth.recoverPassword":["CODE_EMPTY","NEW_SETTINGS_INVALID"],"account.confirmPhone":["CODE_HASH_INVALID","PHONE_CODE_EMPTY"],"account.confirmPasswordEmail":["CODE_INVALID","EMAIL_HASH_EXPIRED"],"help.getConfig":["CONNECTION_API_ID_INVALID","CONNECTION_APP_VERSION_EMPTY","CONNECTION_LAYER_INVALID","DATA_INVALID","MSG_ID_INVALID","USERNAME_INVALID","USER_PRIVACY_RESTRICTED"],"contacts.resolveUsername":["CONNECTION_LAYER_INVALID","USERNAME_INVALID","USERNAME_NOT_OCCUPIED"],"initConnection":["CONNECTION_LAYER_INVALID"],"contacts.acceptContact":["CONTACT_ADD_MISSING","CONTACT_ID_INVALID","CONTACT_REQ_MISSING","MSG_ID_INVALID"],"contacts.block":["CONTACT_ID_INVALID","INPUT_USER_DEACTIVATED","MSG_ID_INVALID","PEER_ID_INVALID"],"contacts.deleteContact":["CONTACT_ID_INVALID"],"payments.exportInvoice":["CURRENCY_TOTAL_AMOUNT_INVALID","INVOICE_PAYLOAD_INVALID","MEDIA_INVALID","PAYMENT_PROVIDER_INVALID"],"messages.sendEncryptedService":["DATA_INVALID","ENCRYPTION_DECLINED","ENCRYPTION_ID_INVALID","MSG_WAIT_FAILED","USER_IS_BLOCKED","USER_DELETED"],"bots.answerWebhookJSONQuery":["DATA_JSON_INVALID","QUERY_ID_INVALID","USER_BOT_INVALID"],"bots.sendCustomRequest":["DATA_JSON_INVALID","METHOD_INVALID","USER_BOT_INVALID"],"help.acceptTermsOfService":["DATA_JSON_INVALID"],"phone.joinGroupCall":["DATA_JSON_INVALID","GROUPCALL_INVALID","GROUPCALL_SSRC_DUPLICATE_MUCH","JOIN_AS_PEER_INVALID","GROUPCALL_FORBIDDEN"],"messages.sendEncryptedFile":["DATA_TOO_LONG","ENCRYPTION_DECLINED","FILE_EMTPY","MD5_CHECKSUM_INVALID","MSG_WAIT_FAILED"],"auth.exportAuthorization":["DC_ID_INVALID"],"messages.requestEncryption":["DH_G_A_INVALID","INPUT_USER_DEACTIVATED","USER_ID_INVALID"],"upload.getWebFile":["DOCUMENT_INVALID","LOCATION_INVALID"],"account.cancelPasswordEmail":["EMAIL_HASH_EXPIRED"],"account.resendPasswordEmail":["EMAIL_HASH_EXPIRED"],"account.sendVerifyEmailCode":["EMAIL_INVALID","EMAIL_NOT_SETUP","PHONE_HASH_EXPIRED","PHONE_NUMBER_INVALID"],"account.updatePasswordSettings":["EMAIL_INVALID","EMAIL_UNCONFIRMED","EMAIL_UNCONFIRMED_%d","NEW_SALT_INVALID","NEW_SETTINGS_EMPTY","NEW_SETTINGS_INVALID","PASSWORD_HASH_INVALID","SRP_ID_INVALID","SRP_PASSWORD_CHANGED"],"account.verifyEmail":["EMAIL_INVALID","EMAIL_VERIFY_EXPIRED"],"messages.setChatTheme":["EMOJI_INVALID","EMOJI_NOT_MODIFIED","PEER_ID_INVALID"],"messages.getStickers":["EMOTICON_EMPTY"],"messages.searchCustomEmoji":["EMOTICON_EMPTY"],"messages.getStickerSet":["EMOTICON_STICKERPACK_MISSING","STICKERSET_INVALID"],"auth.bindTempAuthKey":["ENCRYPTED_MESSAGE_INVALID","TEMP_AUTH_KEY_ALREADY_BOUND","TEMP_AUTH_KEY_EMPTY"],"msgs_ack":["ENCRYPTED_MESSAGE_INVALID","USER_IS_BLOCKED","Invalid msgs_ack query"],"help.editUserInfo":["ENTITY_BOUNDS_INVALID","USER_INVALID"],"messages.getWebPagePreview":["ENTITY_BOUNDS_INVALID","MESSAGE_EMPTY"],"messages.saveDraft":["ENTITY_BOUNDS_INVALID","MSG_ID_INVALID","PEER_ID_INVALID"],"messages.setBotPrecheckoutResults":["ERROR_TEXT_EMPTY"],"contacts.importCard":["EXPORT_CARD_INVALID"],"upload.saveBigFilePart":["FILE_PART_EMPTY","FILE_PART_INVALID","FILE_PART_SIZE_CHANGED","FILE_PART_SIZE_INVALID","FILE_PART_TOO_BIG","FILE_PARTS_INVALID"],"upload.saveFilePart":["FILE_PART_EMPTY","FILE_PART_INVALID","MSG_ID_INVALID"],"upload.reuploadCdnFile":["FILE_TOKEN_INVALID","RSA_DECRYPT_FAILED","CDN_UPLOAD_TIMEOUT"],"chatlists.deleteExportedInvite":["FILTER_ID_INVALID"],"chatlists.editExportedInvite":["FILTER_ID_INVALID"],"chatlists.exportChatlistInvite":["FILTER_ID_INVALID","FILTER_NOT_SUPPORTED","INVITES_TOO_MUCH","PEERS_LIST_EMPTY"],"messages.getSearchResultsCalendar":["FILTER_NOT_SUPPORTED"],"messages.searchSentMedia":["FILTER_NOT_SUPPORTED"],"auth.signUp":["FIRSTNAME_INVALID","LASTNAME_INVALID","PHONE_CODE_EMPTY","PHONE_CODE_EXPIRED","PHONE_CODE_INVALID","PHONE_NUMBER_FLOOD","PHONE_NUMBER_INVALID","PHONE_NUMBER_OCCUPIED"],"folders.deleteFolder":["FOLDER_ID_EMPTY","FOLDER_ID_INVALID"],"messages.getDialogs":["FOLDER_ID_INVALID","OFFSET_PEER_ID_INVALID","CHAT_WRITE_FORBIDDEN"],"messages.getPinnedDialogs":["FOLDER_ID_INVALID"],"messages.searchGlobal":["FOLDER_ID_INVALID","SEARCH_QUERY_EMPTY"],"contacts.getLocated":["GEO_POINT_INVALID","USERPIC_UPLOAD_REQUIRED","USERPIC_PRIVACY_REQUIRED"],"messages.saveGif":["GIF_ID_INVALID"],"stats.loadAsyncGraph":["GRAPH_EXPIRED_RELOAD","GRAPH_INVALID_RELOAD","GRAPH_OUTDATED_RELOAD"],"phone.discardGroupCall":["GROUPCALL_ALREADY_DISCARDED","GROUPCALL_INVALID","GROUPCALL_FORBIDDEN"],"phone.discardGroupCallRequest":["GROUPCALL_ALREADY_DISCARDED"],"phone.editGroupCallParticipant":["GROUPCALL_FORBIDDEN","PARTICIPANT_JOIN_MISSING","USER_VOLUME_INVALID"],"phone.getGroupCall":["GROUPCALL_INVALID"],"phone.getGroupCallStreamChannels":["GROUPCALL_INVALID","GROUPCALL_JOIN_MISSING"],"phone.inviteToGroupCall":["GROUPCALL_INVALID","INVITE_FORBIDDEN_WITH_JOINAS","USER_ALREADY_INVITED","GROUPCALL_FORBIDDEN"],"phone.checkGroupCall":["GROUPCALL_JOIN_MISSING"],"phone.toggleGroupCallRecord":["GROUPCALL_NOT_MODIFIED","GROUPCALL_FORBIDDEN"],"phone.toggleGroupCallSettings":["GROUPCALL_NOT_MODIFIED"],"account.changeAuthorizationSettings":["HASH_INVALID"],"account.resetAuthorization":["HASH_INVALID","FRESH_RESET_AUTHORISATION_FORBIDDEN"],"account.resetWebAuthorization":["HASH_INVALID"],"account.sendConfirmPhoneCode":["HASH_INVALID"],"messages.initHistoryImport":["IMPORT_FILE_INVALID","IMPORT_FORMAT_UNRECOGNIZED","PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_%dMIN"],"messages.checkHistoryImport":["IMPORT_FORMAT_UNRECOGNIZED"],"messages.startHistoryImport":["IMPORT_ID_INVALID"],"contacts.importContactToken":["IMPORT_TOKEN_INVALID"],"messages.translateText":["INPUT_TEXT_EMPTY","MSG_ID_INVALID","PEER_ID_INVALID","TO_LANG_INVALID"],"messages.sendScreenshotNotification":["INPUT_USER_DEACTIVATED","PEER_ID_INVALID","YOU_BLOCKED_USER"],"messages.checkChatInvite":["INVITE_HASH_EMPTY","INVITE_HASH_EXPIRED","INVITE_HASH_INVALID","CHANNEL_PRIVATE"],"messages.deleteExportedChatInvite":["INVITE_HASH_EXPIRED","INVITE_REVOKED_MISSING","PEER_ID_INVALID"],"chatlists.checkChatlistInvite":["INVITE_SLUG_EMPTY"],"chatlists.joinChatlistInvite":["INVITE_SLUG_EMPTY"],"phone.saveDefaultGroupCallJoinAs":["JOIN_AS_PEER_INVALID"],"bots.getBotInfo":["LANG_CODE_INVALID","USER_BOT_INVALID"],"bots.resetBotCommands":["LANG_CODE_INVALID"],"langpack.getLangPack":["LANG_CODE_NOT_SUPPORTED","LANG_PACK_INVALID"],"langpack.getLanguage":["LANG_CODE_NOT_SUPPORTED","LANG_PACK_INVALID"],"langpack.getStrings":["LANG_CODE_NOT_SUPPORTED","LANG_PACK_INVALID"],"langpack.getDifference":["LANG_PACK_INVALID"],"langpack.getLanguages":["LANG_PACK_INVALID"],"upload.getFileHashes":["LOCATION_INVALID"],"photos.getUserPhotos":["MAX_ID_INVALID","MSG_ID_INVALID","USER_ID_INVALID"],"messages.receivedQueue":["MAX_QTS_INVALID","MSG_WAIT_FAILED"],"auth.sendInvites":["MESSAGE_EMPTY"],"messages.deleteMessages":["MESSAGE_ID_INVALID","MESSAGE_DELETE_FORBIDDEN"],"messages.getGameHighScores":["MESSAGE_ID_INVALID","PEER_ID_INVALID","USER_BOT_REQUIRED"],"messages.getInlineGameHighScores":["MESSAGE_ID_INVALID","USER_BOT_REQUIRED"],"messages.getPollResults":["MESSAGE_ID_INVALID","PEER_ID_INVALID"],"messages.sendScheduledMessages":["MESSAGE_ID_INVALID","PEER_ID_INVALID"],"messages.setInlineGameScore":["MESSAGE_ID_INVALID","USER_BOT_REQUIRED"],"payments.getPaymentForm":["MESSAGE_ID_INVALID"],"payments.getPaymentReceipt":["MESSAGE_ID_INVALID"],"payments.sendPaymentForm":["MESSAGE_ID_INVALID"],"payments.validateRequestedInfo":["MESSAGE_ID_INVALID"],"messages.setBotCallbackAnswer":["MESSAGE_TOO_LONG","QUERY_ID_INVALID","URL_INVALID","USER_BOT_REQUIRED"],"messages.searchGifs":["METHOD_INVALID","SEARCH_QUERY_EMPTY"],"messages.getCommonChats":["MSG_ID_INVALID","USER_ID_INVALID"],"messages.getMessageReactionsList":["MSG_ID_INVALID","BROADCAST_FORBIDDEN"],"messages.getPollVotes":["MSG_ID_INVALID","BROADCAST_FORBIDDEN","POLL_VOTE_REQUIRED"],"messages.readDiscussion":["MSG_ID_INVALID","PEER_ID_INVALID"],"messages.readEncryptedHistory":["MSG_WAIT_FAILED"],"account.reorderUsernames":["ORDER_INVALID"],"stickers.createStickerSet":["PACK_SHORT_NAME_INVALID","PACK_SHORT_NAME_OCCUPIED","PACK_TITLE_INVALID","PEER_ID_INVALID","STICKER_EMOJI_INVALID","STICKER_FILE_INVALID","STICKER_GIF_DIMENSIONS","STICKER_PNG_DIMENSIONS","STICKER_PNG_NOPNG","STICKER_TGS_NODOC","STICKER_TGS_NOTGS","STICKER_THUMB_PNG_NOPNG","STICKER_THUMB_TGS_NOTGS","STICKER_VIDEO_BIG","STICKER_VIDEO_NODOC","STICKER_VIDEO_NOWEBM","STICKERS_EMPTY","USER_ID_INVALID"],"phone.joinGroupCallPresentation":["PARTICIPANT_JOIN_MISSING"],"channels.toggleParticipantsHidden":["PARTICIPANTS_TOO_FEW"],"account.resetPassword":["PASSWORD_EMPTY"],"auth.requestPasswordRecovery":["PASSWORD_EMPTY","PASSWORD_RECOVERY_NA"],"account.getPasswordSettings":["PASSWORD_HASH_INVALID"],"account.getTmpPassword":["PASSWORD_HASH_INVALID","TMP_PASSWORD_DISABLED"],"auth.checkPassword":["PASSWORD_HASH_INVALID","SRP_ID_INVALID","SRP_PASSWORD_CHANGED"],"auth.checkRecoveryPassword":["PASSWORD_RECOVERY_EXPIRED"],"account.saveSecureValue":["PASSWORD_REQUIRED"],"account.getNotifySettings":["PEER_ID_INVALID"],"account.reportProfilePhoto":["PEER_ID_INVALID"],"account.saveAutoSaveSettings":["PEER_ID_INVALID"],"contacts.resetTopPeerRating":["PEER_ID_INVALID"],"messages.getSearchCounters":["PEER_ID_INVALID"],"messages.getStatsURL":["PEER_ID_INVALID"],"messages.hideReportSpam":["PEER_ID_INVALID"],"messages.markDialogUnread":["PEER_ID_INVALID"],"messages.readReactions":["PEER_ID_INVALID"],"messages.reorderPinnedDialogs":["PEER_ID_INVALID"],"messages.saveDefaultSendAs":["PEER_ID_INVALID","SEND_AS_PEER_INVALID"],"messages.setChatWallPaper":["PEER_ID_INVALID","WALLPAPER_INVALID"],"phone.getGroupCallJoinAs":["PEER_ID_INVALID"],"account.changePhone":["PHONE_CODE_EMPTY","PHONE_CODE_EXPIRED","PHONE_NUMBER_INVALID","PHONE_NUMBER_OCCUPIED"],"account.verifyPhone":["PHONE_CODE_EMPTY","PHONE_CODE_EXPIRED","PHONE_NUMBER_INVALID"],"auth.resendCode":["PHONE_CODE_EMPTY","PHONE_CODE_EXPIRED","PHONE_CODE_HASH_EMPTY","PHONE_NUMBER_INVALID","SEND_CODE_UNAVAILABLE"],"auth.signIn":["PHONE_CODE_EMPTY","PHONE_CODE_EXPIRED","PHONE_CODE_INVALID","PHONE_NUMBER_INVALID","PHONE_NUMBER_UNOCCUPIED","AUTH_RESTART","SIGN_IN_FAILED"],"auth.cancelCode":["PHONE_CODE_EXPIRED","PHONE_NUMBER_INVALID"],"contacts.resolvePhone":["PHONE_NOT_OCCUPIED"],"account.sendChangePhoneCode":["PHONE_NUMBER_BANNED","PHONE_NUMBER_INVALID","PHONE_NUMBER_OCCUPIED","FRESH_CHANGE_PHONE_FORBIDDEN"],"auth.checkPhone":["PHONE_NUMBER_BANNED","PHONE_NUMBER_INVALID"],"account.sendVerifyPhoneCode":["PHONE_NUMBER_INVALID"],"auth.requestFirebaseSms":["PHONE_NUMBER_INVALID"],"auth.resetLoginEmail":["PHONE_NUMBER_INVALID","TASK_ALREADY_EXISTS"],"account.getPrivacy":["PRIVACY_KEY_INVALID"],"account.setPrivacy":["PRIVACY_KEY_INVALID","PRIVACY_TOO_LONG","PRIVACY_VALUE_INVALID"],"account.getAuthorizationForm":["PUBLIC_KEY_REQUIRED"],"messages.sendWebViewResultMessage":["QUERY_ID_INVALID"],"messages.setBotShippingResults":["QUERY_ID_INVALID"],"contacts.search":["QUERY_TOO_SHORT","SEARCH_QUERY_EMPTY"],"messages.getDhConfig":["RANDOM_LENGTH_INVALID"],"messages.setDefaultReaction":["REACTION_INVALID"],"account.declinePasswordReset":["RESET_REQUEST_MISSING"],"bots.setBotBroadcastDefaultAdminRights":["RIGHTS_NOT_MODIFIED"],"bots.setBotGroupDefaultAdminRights":["RIGHTS_NOT_MODIFIED","USER_BOT_REQUIRED"],"messages.getDocumentByHash":["SHA256_HASH_INVALID"],"stickers.checkShortName":["SHORT_NAME_INVALID","SHORT_NAME_OCCUPIED"],"messages.faveSticker":["STICKER_ID_INVALID"],"messages.saveRecentSticker":["STICKER_ID_INVALID"],"stickers.changeStickerPosition":["STICKER_INVALID"],"stickers.setStickerSetThumb":["STICKER_THUMB_PNG_NOPNG","STICKER_THUMB_TGS_NOTGS","STICKERSET_INVALID"],"messages.installStickerSet":["STICKERSET_INVALID"],"messages.uninstallStickerSet":["STICKERSET_INVALID"],"stickers.renameStickerSet":["STICKERSET_INVALID"],"contacts.getSaved":["TAKEOUT_REQUIRED"],"account.uploadTheme":["THEME_FILE_INVALID"],"account.getTheme":["THEME_FORMAT_INVALID","THEME_INVALID"],"account.updateTheme":["THEME_INVALID"],"account.createTheme":["THEME_MIME_INVALID","THEME_TITLE_INVALID"],"stickers.suggestShortName":["TITLE_INVALID"],"account.registerDevice":["TOKEN_EMPTY","TOKEN_INVALID","TOKEN_TYPE_INVALID","WEBPUSH_AUTH_INVALID","WEBPUSH_KEY_INVALID","WEBPUSH_TOKEN_INVALID"],"account.unregisterDevice":["TOKEN_INVALID"],"channels.editForumTopic":["TOPIC_ID_INVALID","TOPIC_NOT_MODIFIED"],"messages.transcribeAudio":["TRANSCRIPTION_FAILED","PREMIUM_ACCOUNT_REQUIRED"],"account.setAccountTTL":["TTL_DAYS_INVALID"],"account.setAuthorizationTTL":["TTL_DAYS_INVALID","FRESH_RESET_AUTHORISATION_FORBIDDEN"],"contacts.getTopPeers":["TYPES_EMPTY"],"bots.getBotCommands":["USER_BOT_INVALID"],"bots.setBotInfo":["USER_BOT_INVALID"],"bots.getBotMenuButton":["USER_BOT_REQUIRED"],"users.setSecureValueErrors":["USER_BOT_REQUIRED","USER_ID_INVALID","USER_BOT_INVALID"],"photos.uploadContactProfilePhoto":["USER_ID_INVALID"],"help.getSupportName":["USER_INVALID"],"help.getUserInfo":["USER_INVALID"],"-130635115":["USER_NOT_PARTICIPANT"],"account.checkUsername":["USERNAME_INVALID","USERNAME_OCCUPIED","USERNAME_PURCHASE_AVAILABLE"],"account.toggleUsername":["USERNAME_INVALID","USERNAMES_ACTIVE_TOO_MUCH"],"account.updateUsername":["USERNAME_INVALID","USERNAME_NOT_MODIFIED","USERNAME_OCCUPIED","USERNAME_PURCHASE_AVAILABLE"],"channels.toggleUsername":["USERNAME_INVALID","USERNAMES_ACTIVE_TOO_MUCH"],"account.uploadWallPaper":["WALLPAPER_FILE_INVALID","WALLPAPER_MIME_INVALID"],"account.getMultiWallPapers":["WALLPAPER_INVALID"],"account.getWallPaper":["WALLPAPER_INVALID"],"account.installWallPaper":["WALLPAPER_INVALID"],"account.saveWallPaper":["WALLPAPER_INVALID"],"messages.getWebPage":["WC_CONVERT_URL_INVALID"],"account.updateStatus":["CHAT_WRITE_FORBIDDEN"],"phone.toggleGroupCallStartSubscription":["GROUPCALL_ALREADY_STARTED"],"phone.editGroupCallTitle":["GROUPCALL_FORBIDDEN"],"phone.exportGroupCallInvite":["PUBLIC_CHANNEL_MISSING"],"account.setContentSettings":["SENSITIVE_CHANGE_FORBIDDEN"],"account.finishTakeoutSession":["TAKEOUT_REQUIRED"],"channels.getLeftChannels":["TAKEOUT_REQUIRED"],"auth.resetAuthorizations":["FRESH_RESET_AUTHORISATION_FORBIDDEN"],"account.deleteAccount":["2FA_CONFIRM_WAIT_%d"],"account.initTakeoutSession":["TAKEOUT_INIT_DELAY_%d"],"req_pq_multi":["Invalid msgs_state_req query"]},"userOnly":{"account.acceptAuthorization":1,"account.cancelPasswordEmail":1,"account.changeAuthorizationSettings":1,"account.changePhone":1,"account.checkUsername":1,"account.clearRecentEmojiStatuses":1,"account.confirmPasswordEmail":1,"account.confirmPhone":1,"account.createTheme":1,"account.declinePasswordReset":1,"account.deleteAccount":1,"account.deleteAutoSaveExceptions":1,"account.deleteSecureValue":1,"account.finishTakeoutSession":1,"account.getAccountTTL":1,"account.getAllSecureValues":1,"account.getAuthorizationForm":1,"account.getAuthorizations":1,"account.getAutoDownloadSettings":1,"account.getAutoSaveSettings":1,"account.getChatThemes":1,"account.getContactSignUpNotification":1,"account.getContentSettings":1,"account.getDefaultEmojiStatuses":1,"account.getDefaultGroupPhotoEmojis":1,"account.getDefaultProfilePhotoEmojis":1,"account.getGlobalPrivacySettings":1,"account.getMultiWallPapers":1,"account.getNotifyExceptions":1,"account.getNotifySettings":1,"account.getPassword":1,"account.getPasswordSettings":1,"account.getPrivacy":1,"account.getRecentEmojiStatuses":1,"account.getSavedRingtones":1,"account.getSecureValue":1,"account.getTheme":1,"account.getThemes":1,"account.getTmpPassword":1,"account.getWallPaper":1,"account.getWallPapers":1,"account.getWebAuthorizations":1,"account.initTakeoutSession":1,"account.installTheme":1,"account.installWallPaper":1,"account.registerDevice":1,"account.reorderUsernames":1,"account.reportPeer":1,"account.reportProfilePhoto":1,"account.resendPasswordEmail":1,"account.resetAuthorization":1,"account.resetNotifySettings":1,"account.resetPassword":1,"account.resetWallPapers":1,"account.resetWebAuthorization":1,"account.resetWebAuthorizations":1,"account.saveAutoDownloadSettings":1,"account.saveRingtone":1,"account.saveSecureValue":1,"account.saveTheme":1,"account.saveWallPaper":1,"account.sendChangePhoneCode":1,"account.sendConfirmPhoneCode":1,"account.sendVerifyEmailCode":1,"account.sendVerifyPhoneCode":1,"account.setAccountTTL":1,"account.setAuthorizationTTL":1,"account.setContactSignUpNotification":1,"account.setContentSettings":1,"account.setGlobalPrivacySettings":1,"account.setPrivacy":1,"account.toggleUsername":1,"account.unregisterDevice":1,"account.updateDeviceLocked":1,"account.updateEmojiStatus":1,"account.updateNotifySettings":1,"account.updatePasswordSettings":1,"account.updateProfile":1,"account.updateStatus":1,"account.updateTheme":1,"account.updateUsername":1,"account.uploadRingtone":1,"account.uploadTheme":1,"account.uploadWallPaper":1,"account.verifyEmail":1,"account.verifyPhone":1,"auth.acceptLoginToken":1,"auth.cancelCode":1,"auth.checkPassword":1,"auth.checkRecoveryPassword":1,"auth.exportLoginToken":1,"auth.importLoginToken":1,"auth.importWebTokenAuthorization":1,"auth.recoverPassword":1,"auth.requestPasswordRecovery":1,"auth.resendCode":1,"auth.resetAuthorizations":1,"auth.resetLoginEmail":1,"auth.sendCode":1,"auth.signIn":1,"auth.signUp":1,"channels.checkUsername":1,"channels.convertToGigagroup":1,"channels.createChannel":1,"channels.deleteChannel":1,"channels.deleteHistory":1,"channels.deleteParticipantHistory":1,"channels.deleteUserHistory":1,"channels.editCreator":1,"channels.editLocation":1,"channels.exportMessageLink":1,"channels.getAdminedPublicChannels":1,"channels.getAdminLog":1,"channels.getGroupsForDiscussion":1,"channels.getInactiveChannels":1,"channels.getLeftChannels":1,"channels.getSendAs":1,"channels.getSponsoredMessages":1,"channels.inviteToChannel":1,"channels.joinChannel":1,"channels.readHistory":1,"channels.readMessageContents":1,"channels.reportSpam":1,"channels.setDiscussionGroup":1,"channels.toggleJoinRequest":1,"channels.toggleJoinToSend":1,"channels.togglePreHistoryHidden":1,"channels.toggleSignatures":1,"channels.toggleSlowMode":1,"channels.updateUsername":1,"channels.viewSponsoredMessage":1,"chatlists.exportChatlistInvite":1,"contacts.acceptContact":1,"contacts.addContact":1,"contacts.block":1,"contacts.blockFromReplies":1,"contacts.deleteByPhones":1,"contacts.deleteContacts":1,"contacts.getBlocked":1,"contacts.getContactIDs":1,"contacts.getContacts":1,"contacts.getLocated":1,"contacts.getSaved":1,"contacts.getStatuses":1,"contacts.getTopPeers":1,"contacts.importContacts":1,"contacts.resetSaved":1,"contacts.resetTopPeerRating":1,"contacts.resolvePhone":1,"contacts.search":1,"contacts.toggleTopPeers":1,"contacts.unblock":1,"folders.deleteFolder":1,"folders.editPeerFolders":1,"help.acceptTermsOfService":1,"help.dismissSuggestion":1,"help.editUserInfo":1,"help.getAppChangelog":1,"help.getAppConfig":1,"help.getAppUpdate":1,"help.getCountriesList":1,"help.getDeepLinkInfo":1,"help.getInviteText":1,"help.getNearestDc":1,"help.getPassportConfig":1,"help.getPremiumPromo":1,"help.getPromoData":1,"help.getProxyData":1,"help.getRecentMeUrls":1,"help.getSupport":1,"help.getSupportName":1,"help.getTermsOfServiceUpdate":1,"help.getUserInfo":1,"help.hidePromoData":1,"help.saveAppLog":1,"langpack.getDifference":1,"langpack.getLangPack":1,"langpack.getLanguage":1,"langpack.getLanguages":1,"langpack.getStrings":1,"messages.acceptEncryption":1,"messages.acceptUrlAuth":1,"messages.addChatUser":1,"messages.checkChatInvite":1,"messages.checkHistoryImport":1,"messages.checkHistoryImportPeer":1,"messages.clearAllDrafts":1,"messages.clearRecentReactions":1,"messages.clearRecentStickers":1,"messages.createChat":1,"messages.deleteChat":1,"messages.deleteExportedChatInvite":1,"messages.deleteHistory":1,"messages.deletePhoneCallHistory":1,"messages.deleteRevokedExportedChatInvites":1,"messages.deleteScheduledMessages":1,"messages.discardEncryption":1,"messages.editChatAdmin":1,"messages.faveSticker":1,"messages.getAdminsWithInvites":1,"messages.getAllChats":1,"messages.getAllDrafts":1,"messages.getAllStickers":1,"messages.getArchivedStickers":1,"messages.getAttachedStickers":1,"messages.getAttachMenuBot":1,"messages.getAttachMenuBots":1,"messages.getAvailableReactions":1,"messages.getBotCallbackAnswer":1,"messages.getChatInviteImporters":1,"messages.getCommonChats":1,"messages.getDhConfig":1,"messages.getDialogFilters":1,"messages.getDialogs":1,"messages.getDialogUnreadMarks":1,"messages.getDiscussionMessage":1,"messages.getEmojiKeywords":1,"messages.getEmojiKeywordsDifference":1,"messages.getEmojiKeywordsLanguages":1,"messages.getEmojiStickers":1,"messages.getEmojiURL":1,"messages.getExportedChatInvite":1,"messages.getExportedChatInvites":1,"messages.getExtendedMedia":1,"messages.getFavedStickers":1,"messages.getFeaturedEmojiStickers":1,"messages.getFeaturedStickers":1,"messages.getHistory":1,"messages.getInlineBotResults":1,"messages.getMaskStickers":1,"messages.getMessageEditData":1,"messages.getMessageReactionsList":1,"messages.getMessageReadParticipants":1,"messages.getMessagesReactions":1,"messages.getMessagesViews":1,"messages.getOldFeaturedStickers":1,"messages.getOnlines":1,"messages.getPeerDialogs":1,"messages.getPeerSettings":1,"messages.getPinnedDialogs":1,"messages.getPollResults":1,"messages.getPollVotes":1,"messages.getRecentLocations":1,"messages.getRecentReactions":1,"messages.getRecentStickers":1,"messages.getReplies":1,"messages.getSavedGifs":1,"messages.getScheduledHistory":1,"messages.getScheduledMessages":1,"messages.getSearchCounters":1,"messages.getSearchResultsCalendar":1,"messages.getSearchResultsPositions":1,"messages.getSplitRanges":1,"messages.getStatsURL":1,"messages.getStickers":1,"messages.getSuggestedDialogFilters":1,"messages.getTopReactions":1,"messages.getUnreadMentions":1,"messages.getUnreadReactions":1,"messages.getWebPage":1,"messages.getWebPagePreview":1,"messages.hideAllChatJoinRequests":1,"messages.hidePeerSettingsBar":1,"messages.importChatInvite":1,"messages.initHistoryImport":1,"messages.installStickerSet":1,"messages.markDialogUnread":1,"messages.migrateChat":1,"messages.prolongWebView":1,"messages.rateTranscribedAudio":1,"messages.readDiscussion":1,"messages.readEncryptedHistory":1,"messages.readFeaturedStickers":1,"messages.readHistory":1,"messages.readMentions":1,"messages.readMessageContents":1,"messages.readReactions":1,"messages.receivedMessages":1,"messages.receivedQueue":1,"messages.reorderPinnedDialogs":1,"messages.reorderStickerSets":1,"messages.report":1,"messages.reportEncryptedSpam":1,"messages.reportReaction":1,"messages.reportSpam":1,"messages.requestEncryption":1,"messages.requestSimpleWebView":1,"messages.requestUrlAuth":1,"messages.requestWebView":1,"messages.saveDefaultSendAs":1,"messages.saveDraft":1,"messages.saveGif":1,"messages.saveRecentSticker":1,"messages.search":1,"messages.searchGifs":1,"messages.searchGlobal":1,"messages.searchSentMedia":1,"messages.searchStickerSets":1,"messages.sendEncrypted":1,"messages.sendEncryptedFile":1,"messages.sendEncryptedService":1,"messages.sendInlineBotResult":1,"messages.sendReaction":1,"messages.sendScheduledMessages":1,"messages.sendScreenshotNotification":1,"messages.sendVote":1,"messages.sendWebViewData":1,"messages.setChatAvailableReactions":1,"messages.setChatTheme":1,"messages.setDefaultReaction":1,"messages.setEncryptedTyping":1,"messages.setHistoryTTL":1,"messages.startBot":1,"messages.startHistoryImport":1,"messages.toggleBotInAttachMenu":1,"messages.toggleDialogPin":1,"messages.toggleNoForwards":1,"messages.toggleStickerSets":1,"messages.transcribeAudio":1,"messages.translateText":1,"messages.uninstallStickerSet":1,"messages.updateDialogFilter":1,"messages.updateDialogFiltersOrder":1,"messages.uploadEncryptedFile":1,"messages.uploadImportedMedia":1,"msg_container":1,"msgs_ack":1,"payments.assignAppStoreTransaction":1,"payments.assignPlayMarketTransaction":1,"payments.canPurchasePremium":1,"payments.clearSavedInfo":1,"payments.getBankCardData":1,"payments.getPaymentForm":1,"payments.getPaymentReceipt":1,"payments.getSavedInfo":1,"payments.requestRecurringPayment":1,"payments.sendPaymentForm":1,"payments.validateRequestedInfo":1,"phone.acceptCall":1,"phone.checkGroupCall":1,"phone.confirmCall":1,"phone.createGroupCall":1,"phone.discardCall":1,"phone.discardGroupCall":1,"phone.editGroupCallParticipant":1,"phone.editGroupCallTitle":1,"phone.exportGroupCallInvite":1,"phone.getCallConfig":1,"phone.getGroupCall":1,"phone.getGroupCallJoinAs":1,"phone.getGroupCallStreamChannels":1,"phone.getGroupCallStreamRtmpUrl":1,"phone.getGroupParticipants":1,"phone.inviteToGroupCall":1,"phone.joinGroupCall":1,"phone.joinGroupCallPresentation":1,"phone.leaveGroupCall":1,"phone.leaveGroupCallPresentation":1,"phone.receivedCall":1,"phone.requestCall":1,"phone.saveCallDebug":1,"phone.saveCallLog":1,"phone.saveDefaultGroupCallJoinAs":1,"phone.sendSignalingData":1,"phone.setCallRating":1,"phone.startScheduledGroupCall":1,"phone.toggleGroupCallRecord":1,"phone.toggleGroupCallSettings":1,"phone.toggleGroupCallStartSubscription":1,"photos.deletePhotos":1,"stats.getBroadcastStats":1,"stats.getMegagroupStats":1,"stats.getMessagePublicForwards":1,"stats.getMessageStats":1,"stats.loadAsyncGraph":1,"stickers.checkShortName":1,"stickers.suggestShortName":1,"upload.getCdnFile":1,"upload.getWebFile":1},"botOnly":{"bots.answerWebhookJSONQuery":1,"bots.getBotCommands":1,"bots.sendCustomRequest":1,"messages.setInlineBotResults":1,"users.setSecureValueErrors":1,"bots.getBotMenuButton":1,"bots.setBotCommands":1,"bots.setBotGroupDefaultAdminRights":1,"messages.getGameHighScores":1,"messages.getInlineGameHighScores":1,"messages.setBotCallbackAnswer":1,"messages.setGameScore":1,"messages.setInlineGameScore":1}} \ No newline at end of file +{ "base": { "BAD_REQUEST": 400, "UNAUTHORIZED": 401, "FORBIDDEN": 403, "NOT_FOUND": 404, "FLOOD": 420, "SEE_OTHER": 303, "NOT_ACCEPTABLE": 406, "INTERNAL": 500 }, "errors": { "ABOUT_TOO_LONG": { "code": 400, "name": "ABOUT_TOO_LONG", "description": "About string too long." }, "ACCESS_TOKEN_EXPIRED": { "code": 400, "name": "ACCESS_TOKEN_EXPIRED", "description": "Access token expired." }, "ACCESS_TOKEN_INVALID": { "code": 400, "name": "ACCESS_TOKEN_INVALID", "description": "Access token invalid." }, "ADMIN_ID_INVALID": { "code": 400, "name": "ADMIN_ID_INVALID", "description": "The specified admin ID is invalid." }, "ADMIN_RANK_EMOJI_NOT_ALLOWED": { "code": 400, "name": "ADMIN_RANK_EMOJI_NOT_ALLOWED", "description": "An admin rank cannot contain emojis." }, "ADMIN_RANK_INVALID": { "code": 400, "name": "ADMIN_RANK_INVALID", "description": "The specified admin rank is invalid." }, "ADMINS_TOO_MUCH": { "code": 400, "name": "ADMINS_TOO_MUCH", "description": "There are too many admins." }, "ALBUM_PHOTOS_TOO_MANY": { "code": 400, "name": "ALBUM_PHOTOS_TOO_MANY", "description": "You have uploaded too many profile photos, delete some before retrying." }, "API_ID_INVALID": { "code": 400, "name": "API_ID_INVALID", "description": "API ID invalid." }, "API_ID_PUBLISHED_FLOOD": { "code": 400, "name": "API_ID_PUBLISHED_FLOOD", "description": "This API id was published somewhere, you can't use it now." }, "ARTICLE_TITLE_EMPTY": { "code": 400, "name": "ARTICLE_TITLE_EMPTY", "description": "The title of the article is empty." }, "AUDIO_CONTENT_URL_EMPTY": { "code": 400, "name": "AUDIO_CONTENT_URL_EMPTY", "description": "The remote URL specified in the content field is empty." }, "AUDIO_TITLE_EMPTY": { "code": 400, "name": "AUDIO_TITLE_EMPTY", "description": "An empty audio title was provided." }, "AUTH_BYTES_INVALID": { "code": 400, "name": "AUTH_BYTES_INVALID", "description": "The provided authorization is invalid." }, "AUTH_TOKEN_ALREADY_ACCEPTED": { "code": 400, "name": "AUTH_TOKEN_ALREADY_ACCEPTED", "description": "The specified auth token was already accepted." }, "AUTH_TOKEN_EXCEPTION": { "code": 400, "name": "AUTH_TOKEN_EXCEPTION", "description": "An error occurred while importing the auth token." }, "AUTH_TOKEN_EXPIRED": { "code": 400, "name": "AUTH_TOKEN_EXPIRED", "description": "The authorization token has expired." }, "AUTH_TOKEN_INVALID": { "code": 400, "name": "AUTH_TOKEN_INVALID", "description": "The specified auth token is invalid." }, "AUTH_TOKEN_INVALIDX": { "code": 400, "name": "AUTH_TOKEN_INVALIDX", "description": "The specified auth token is invalid." }, "AUTOARCHIVE_NOT_AVAILABLE": { "code": 400, "name": "AUTOARCHIVE_NOT_AVAILABLE", "description": "The autoarchive setting is not available at this time: please check the value of the [autoarchive_setting_available field in client config »](https://core.telegram.org/api/config#client-configuration) before calling this method." }, "BANK_CARD_NUMBER_INVALID": { "code": 400, "name": "BANK_CARD_NUMBER_INVALID", "description": "The specified card number is invalid." }, "BANNED_RIGHTS_INVALID": { "code": 400, "name": "BANNED_RIGHTS_INVALID", "description": "You provided some invalid flags in the banned rights." }, "BOT_APP_INVALID": { "code": 400, "name": "BOT_APP_INVALID", "description": "The specified bot app is invalid." }, "BOT_CHANNELS_NA": { "code": 400, "name": "BOT_CHANNELS_NA", "description": "Bots can't edit admin privileges." }, "BOT_COMMAND_DESCRIPTION_INVALID": { "code": 400, "name": "BOT_COMMAND_DESCRIPTION_INVALID", "description": "The specified command description is invalid." }, "BOT_COMMAND_INVALID": { "code": 400, "name": "BOT_COMMAND_INVALID", "description": "The specified command is invalid." }, "BOT_DOMAIN_INVALID": { "code": 400, "name": "BOT_DOMAIN_INVALID", "description": "Bot domain invalid." }, "BOT_GROUPS_BLOCKED": { "code": 400, "name": "BOT_GROUPS_BLOCKED", "description": "This bot can't be added to groups." }, "BOT_INLINE_DISABLED": { "code": 400, "name": "BOT_INLINE_DISABLED", "description": "This bot can't be used in inline mode." }, "BOT_INVALID": { "code": 400, "name": "BOT_INVALID", "description": "This is not a valid bot." }, "BOT_MISSING": { "code": 400, "name": "BOT_MISSING", "description": "Only bots can call this method, please use [@stickers](https://t.me/stickers) if you're a user." }, "BOT_ONESIDE_NOT_AVAIL": { "code": 400, "name": "BOT_ONESIDE_NOT_AVAIL", "description": "Bots can't pin messages in PM just for themselves." }, "BOT_PAYMENTS_DISABLED": { "code": 400, "name": "BOT_PAYMENTS_DISABLED", "description": "Please enable bot payments in botfather before calling this method." }, "BOT_RESPONSE_TIMEOUT": { "code": 400, "name": "BOT_RESPONSE_TIMEOUT", "description": "A timeout occurred while fetching data from the bot." }, "BOT_SCORE_NOT_MODIFIED": { "code": 400, "name": "BOT_SCORE_NOT_MODIFIED", "description": "The score wasn't modified." }, "BOTS_TOO_MUCH": { "code": 400, "name": "BOTS_TOO_MUCH", "description": "There are too many bots in this chat/channel." }, "BROADCAST_ID_INVALID": { "code": 400, "name": "BROADCAST_ID_INVALID", "description": "Broadcast ID invalid." }, "BROADCAST_PUBLIC_VOTERS_FORBIDDEN": { "code": 400, "name": "BROADCAST_PUBLIC_VOTERS_FORBIDDEN", "description": "You can't forward polls with public voters." }, "BROADCAST_REQUIRED": { "code": 400, "name": "BROADCAST_REQUIRED", "description": "This method can only be called on a channel, please use stats.getMegagroupStats for supergroups." }, "BUTTON_DATA_INVALID": { "code": 400, "name": "BUTTON_DATA_INVALID", "description": "The data of one or more of the buttons you provided is invalid." }, "BUTTON_TEXT_INVALID": { "code": 400, "name": "BUTTON_TEXT_INVALID", "description": "The specified button text is invalid." }, "BUTTON_TYPE_INVALID": { "code": 400, "name": "BUTTON_TYPE_INVALID", "description": "The type of one or more of the buttons you provided is invalid." }, "BUTTON_URL_INVALID": { "code": 400, "name": "BUTTON_URL_INVALID", "description": "Button URL invalid." }, "BUTTON_USER_PRIVACY_RESTRICTED": { "code": 400, "name": "BUTTON_USER_PRIVACY_RESTRICTED", "description": "The privacy setting of the user specified in a [inputKeyboardButtonUserProfile](/constructor/inputKeyboardButtonUserProfile) button do not allow creating such a button." }, "CALL_ALREADY_ACCEPTED": { "code": 400, "name": "CALL_ALREADY_ACCEPTED", "description": "The call was already accepted." }, "CALL_ALREADY_DECLINED": { "code": 400, "name": "CALL_ALREADY_DECLINED", "description": "The call was already declined." }, "CALL_OCCUPY_FAILED": { "code": 400, "name": "CALL_OCCUPY_FAILED", "description": "The call failed because the user is already making another call." }, "CALL_PEER_INVALID": { "code": 400, "name": "CALL_PEER_INVALID", "description": "The provided call peer object is invalid." }, "CALL_PROTOCOL_FLAGS_INVALID": { "code": 400, "name": "CALL_PROTOCOL_FLAGS_INVALID", "description": "Call protocol flags invalid." }, "CDN_METHOD_INVALID": { "code": 400, "name": "CDN_METHOD_INVALID", "description": "You can't call this method in a CDN DC." }, "CHANNEL_FORUM_MISSING": { "code": 400, "name": "CHANNEL_FORUM_MISSING", "description": "This supergroup is not a forum." }, "CHANNEL_ID_INVALID": { "code": 400, "name": "CHANNEL_ID_INVALID", "description": "The specified supergroup ID is invalid." }, "CHANNEL_INVALID": { "code": 400, "name": "CHANNEL_INVALID", "description": "The provided channel is invalid." }, "CHANNEL_PARICIPANT_MISSING": { "code": 400, "name": "CHANNEL_PARICIPANT_MISSING", "description": "The current user is not in the channel." }, "CHANNEL_PRIVATE": { "code": 400, "name": "CHANNEL_PRIVATE", "description": "You haven't joined this channel/supergroup." }, "CHANNEL_TOO_BIG": { "code": 400, "name": "CHANNEL_TOO_BIG", "description": "This channel has too many participants (>1000) to be deleted." }, "CHANNEL_TOO_LARGE": { "code": 400, "name": "CHANNEL_TOO_LARGE", "description": "Channel is too large to be deleted; this error is issued when trying to delete channels with more than 1000 members (subject to change)." }, "CHANNELS_ADMIN_LOCATED_TOO_MUCH": { "code": 400, "name": "CHANNELS_ADMIN_LOCATED_TOO_MUCH", "description": "The user has reached the limit of public geogroups." }, "CHANNELS_ADMIN_PUBLIC_TOO_MUCH": { "code": 400, "name": "CHANNELS_ADMIN_PUBLIC_TOO_MUCH", "description": "You're admin of too many public channels, make some channels private to change the username of this channel." }, "CHANNELS_TOO_MUCH": { "code": 400, "name": "CHANNELS_TOO_MUCH", "description": "You have joined too many channels/supergroups." }, "CHAT_ABOUT_NOT_MODIFIED": { "code": 400, "name": "CHAT_ABOUT_NOT_MODIFIED", "description": "About text has not changed." }, "CHAT_ABOUT_TOO_LONG": { "code": 400, "name": "CHAT_ABOUT_TOO_LONG", "description": "Chat about too long." }, "CHAT_ADMIN_REQUIRED": { "code": 400, "name": "CHAT_ADMIN_REQUIRED", "description": "You must be an admin in this chat to do this." }, "CHAT_DISCUSSION_UNALLOWED": { "code": 400, "name": "CHAT_DISCUSSION_UNALLOWED", "description": "You can't enable forum topics in a discussion group linked to a channel." }, "CHAT_FORWARDS_RESTRICTED": { "code": 400, "name": "CHAT_FORWARDS_RESTRICTED", "description": "You can't forward messages from a protected chat." }, "CHAT_ID_EMPTY": { "code": 400, "name": "CHAT_ID_EMPTY", "description": "The provided chat ID is empty." }, "CHAT_ID_INVALID": { "code": 400, "name": "CHAT_ID_INVALID", "description": "The provided chat id is invalid." }, "CHAT_INVALID": { "code": 400, "name": "CHAT_INVALID", "description": "Invalid chat." }, "CHAT_INVITE_PERMANENT": { "code": 400, "name": "CHAT_INVITE_PERMANENT", "description": "You can't set an expiration date on permanent invite links." }, "CHAT_LINK_EXISTS": { "code": 400, "name": "CHAT_LINK_EXISTS", "description": "The chat is public, you can't hide the history to new users." }, "CHAT_NOT_MODIFIED": { "code": 400, "name": "CHAT_NOT_MODIFIED", "description": "The pinned message wasn't modified." }, "CHAT_PUBLIC_REQUIRED": { "code": 400, "name": "CHAT_PUBLIC_REQUIRED", "description": "You can only enable join requests in public groups." }, "CHAT_RESTRICTED": { "code": 400, "name": "CHAT_RESTRICTED", "description": "You can't send messages in this chat, you were restricted." }, "CHAT_REVOKE_DATE_UNSUPPORTED": { "code": 400, "name": "CHAT_REVOKE_DATE_UNSUPPORTED", "description": "`min_date` and `max_date` are not available for using with non-user peers." }, "CHAT_SEND_INLINE_FORBIDDEN": { "code": 400, "name": "CHAT_SEND_INLINE_FORBIDDEN", "description": "You can't send inline messages in this group." }, "CHAT_TITLE_EMPTY": { "code": 400, "name": "CHAT_TITLE_EMPTY", "description": "No chat title provided." }, "CHAT_TOO_BIG": { "code": 400, "name": "CHAT_TOO_BIG", "description": "This method is not available for groups with more than `chat_read_mark_size_threshold` members, [see client configuration »](https://core.telegram.org/api/config#client-configuration)." }, "CODE_EMPTY": { "code": 400, "name": "CODE_EMPTY", "description": "The provided code is empty." }, "CODE_HASH_INVALID": { "code": 400, "name": "CODE_HASH_INVALID", "description": "Code hash invalid." }, "CODE_INVALID": { "code": 400, "name": "CODE_INVALID", "description": "Code invalid." }, "CONNECTION_API_ID_INVALID": { "code": 400, "name": "CONNECTION_API_ID_INVALID", "description": "The provided API id is invalid." }, "CONNECTION_APP_VERSION_EMPTY": { "code": 400, "name": "CONNECTION_APP_VERSION_EMPTY", "description": "App version is empty." }, "CONNECTION_LAYER_INVALID": { "code": 400, "name": "CONNECTION_LAYER_INVALID", "description": "Layer invalid." }, "CONTACT_ADD_MISSING": { "code": 400, "name": "CONTACT_ADD_MISSING", "description": "Contact to add is missing." }, "CONTACT_ID_INVALID": { "code": 400, "name": "CONTACT_ID_INVALID", "description": "The provided contact ID is invalid." }, "CONTACT_NAME_EMPTY": { "code": 400, "name": "CONTACT_NAME_EMPTY", "description": "Contact name empty." }, "CONTACT_REQ_MISSING": { "code": 400, "name": "CONTACT_REQ_MISSING", "description": "Missing contact request." }, "CREATE_CALL_FAILED": { "code": 400, "name": "CREATE_CALL_FAILED", "description": "An error occurred while creating the call." }, "CURRENCY_TOTAL_AMOUNT_INVALID": { "code": 400, "name": "CURRENCY_TOTAL_AMOUNT_INVALID", "description": "The total amount of all prices is invalid." }, "DATA_INVALID": { "code": 400, "name": "DATA_INVALID", "description": "Encrypted data invalid." }, "DATA_JSON_INVALID": { "code": 400, "name": "DATA_JSON_INVALID", "description": "The provided JSON data is invalid." }, "DATA_TOO_LONG": { "code": 400, "name": "DATA_TOO_LONG", "description": "Data too long." }, "DATE_EMPTY": { "code": 400, "name": "DATE_EMPTY", "description": "Date empty." }, "DC_ID_INVALID": { "code": 400, "name": "DC_ID_INVALID", "description": "The provided DC ID is invalid." }, "DH_G_A_INVALID": { "code": 400, "name": "DH_G_A_INVALID", "description": "g_a invalid." }, "DOCUMENT_INVALID": { "code": 400, "name": "DOCUMENT_INVALID", "description": "The specified document is invalid." }, "EMAIL_HASH_EXPIRED": { "code": 400, "name": "EMAIL_HASH_EXPIRED", "description": "Email hash expired." }, "EMAIL_INVALID": { "code": 400, "name": "EMAIL_INVALID", "description": "The specified email is invalid." }, "EMAIL_NOT_SETUP": { "code": 400, "name": "EMAIL_NOT_SETUP", "description": "In order to change the login email with emailVerifyPurposeLoginChange, an existing login email must already be set using emailVerifyPurposeLoginSetup." }, "EMAIL_UNCONFIRMED": { "code": 400, "name": "EMAIL_UNCONFIRMED", "description": "Email unconfirmed." }, "EMAIL_UNCONFIRMED_%d": { "code": 400, "name": "EMAIL_UNCONFIRMED_%d", "description": "Email unconfirmed, the length of the code must be %d", "_paramNames": ["code_length"] }, "EMAIL_VERIFY_EXPIRED": { "code": 400, "name": "EMAIL_VERIFY_EXPIRED", "description": "The verification email has expired." }, "EMOJI_INVALID": { "code": 400, "name": "EMOJI_INVALID", "description": "The specified theme emoji is valid." }, "EMOJI_MARKUP_INVALID": { "code": 400, "name": "EMOJI_MARKUP_INVALID", "description": "The specified `video_emoji_markup` was invalid." }, "EMOJI_NOT_MODIFIED": { "code": 400, "name": "EMOJI_NOT_MODIFIED", "description": "The theme wasn't changed." }, "EMOTICON_EMPTY": { "code": 400, "name": "EMOTICON_EMPTY", "description": "The emoji is empty." }, "EMOTICON_INVALID": { "code": 400, "name": "EMOTICON_INVALID", "description": "The specified emoji is invalid." }, "EMOTICON_STICKERPACK_MISSING": { "code": 400, "name": "EMOTICON_STICKERPACK_MISSING", "description": "inputStickerSetDice.emoji cannot be empty." }, "ENCRYPTED_MESSAGE_INVALID": { "code": 400, "name": "ENCRYPTED_MESSAGE_INVALID", "description": "Encrypted message invalid." }, "ENCRYPTION_ALREADY_ACCEPTED": { "code": 400, "name": "ENCRYPTION_ALREADY_ACCEPTED", "description": "Secret chat already accepted." }, "ENCRYPTION_ALREADY_DECLINED": { "code": 400, "name": "ENCRYPTION_ALREADY_DECLINED", "description": "The secret chat was already declined." }, "ENCRYPTION_DECLINED": { "code": 400, "name": "ENCRYPTION_DECLINED", "description": "The secret chat was declined." }, "ENCRYPTION_ID_INVALID": { "code": 400, "name": "ENCRYPTION_ID_INVALID", "description": "The provided secret chat ID is invalid." }, "ENTITIES_TOO_LONG": { "code": 400, "name": "ENTITIES_TOO_LONG", "description": "You provided too many styled message entities." }, "ENTITY_BOUNDS_INVALID": { "code": 400, "name": "ENTITY_BOUNDS_INVALID", "description": "A specified [entity offset or length](/api/entities#entity-length) is invalid, see [here »](/api/entities#entity-length) for info on how to properly compute the entity offset/length." }, "ENTITY_MENTION_USER_INVALID": { "code": 400, "name": "ENTITY_MENTION_USER_INVALID", "description": "You mentioned an invalid user." }, "ERROR_TEXT_EMPTY": { "code": 400, "name": "ERROR_TEXT_EMPTY", "description": "The provided error message is empty." }, "EXPIRE_DATE_INVALID": { "code": 400, "name": "EXPIRE_DATE_INVALID", "description": "The specified expiration date is invalid." }, "EXPORT_CARD_INVALID": { "code": 400, "name": "EXPORT_CARD_INVALID", "description": "Provided card is invalid." }, "EXTERNAL_URL_INVALID": { "code": 400, "name": "EXTERNAL_URL_INVALID", "description": "External URL invalid." }, "FILE_CONTENT_TYPE_INVALID": { "code": 400, "name": "FILE_CONTENT_TYPE_INVALID", "description": "File content-type is invalid." }, "FILE_EMTPY": { "code": 400, "name": "FILE_EMTPY", "description": "An empty file was provided." }, "FILE_ID_INVALID": { "code": 400, "name": "FILE_ID_INVALID", "description": "The provided file id is invalid." }, "FILE_PART_EMPTY": { "code": 400, "name": "FILE_PART_EMPTY", "description": "The provided file part is empty." }, "FILE_PART_INVALID": { "code": 400, "name": "FILE_PART_INVALID", "description": "The file part number is invalid." }, "FILE_PART_LENGTH_INVALID": { "code": 400, "name": "FILE_PART_LENGTH_INVALID", "description": "The length of a file part is invalid." }, "FILE_PART_SIZE_CHANGED": { "code": 400, "name": "FILE_PART_SIZE_CHANGED", "description": "Provided file part size has changed." }, "FILE_PART_SIZE_INVALID": { "code": 400, "name": "FILE_PART_SIZE_INVALID", "description": "The provided file part size is invalid." }, "FILE_PART_TOO_BIG": { "code": 400, "name": "FILE_PART_TOO_BIG", "description": "The uploaded file part is too big." }, "FILE_PARTS_INVALID": { "code": 400, "name": "FILE_PARTS_INVALID", "description": "The number of file parts is invalid." }, "FILE_REFERENCE_EMPTY": { "code": 400, "name": "FILE_REFERENCE_EMPTY", "description": "An empty [file reference](https://core.telegram.org/api/file_reference) was specified." }, "FILE_REFERENCE_EXPIRED": { "code": 400, "name": "FILE_REFERENCE_EXPIRED", "description": "File reference expired, it must be refetched as described in [the documentation](https://core.telegram.org/api/file_reference)." }, "FILE_REFERENCE_INVALID": { "code": 400, "name": "FILE_REFERENCE_INVALID", "description": "The specified [file reference](https://core.telegram.org/api/file_reference) is invalid." }, "FILE_TITLE_EMPTY": { "code": 400, "name": "FILE_TITLE_EMPTY", "description": "An empty file title was specified." }, "FILE_TOKEN_INVALID": { "code": 400, "name": "FILE_TOKEN_INVALID", "description": "The specified file token is invalid." }, "FILTER_ID_INVALID": { "code": 400, "name": "FILTER_ID_INVALID", "description": "The specified filter ID is invalid." }, "FILTER_INCLUDE_EMPTY": { "code": 400, "name": "FILTER_INCLUDE_EMPTY", "description": "The include_peers vector of the filter is empty." }, "FILTER_NOT_SUPPORTED": { "code": 400, "name": "FILTER_NOT_SUPPORTED", "description": "The specified filter cannot be used in this context." }, "FILTER_TITLE_EMPTY": { "code": 400, "name": "FILTER_TITLE_EMPTY", "description": "The title field of the filter is empty." }, "FIRSTNAME_INVALID": { "code": 400, "name": "FIRSTNAME_INVALID", "description": "The first name is invalid." }, "FOLDER_ID_EMPTY": { "code": 400, "name": "FOLDER_ID_EMPTY", "description": "An empty folder ID was specified." }, "FOLDER_ID_INVALID": { "code": 400, "name": "FOLDER_ID_INVALID", "description": "Invalid folder ID." }, "FRESH_CHANGE_ADMINS_FORBIDDEN": { "code": 400, "name": "FRESH_CHANGE_ADMINS_FORBIDDEN", "description": "You were just elected admin, you can't add or modify other admins yet." }, "FROM_MESSAGE_BOT_DISABLED": { "code": 400, "name": "FROM_MESSAGE_BOT_DISABLED", "description": "Bots can't use fromMessage min constructors." }, "FROM_PEER_INVALID": { "code": 400, "name": "FROM_PEER_INVALID", "description": "The specified from_id is invalid." }, "GAME_BOT_INVALID": { "code": 400, "name": "GAME_BOT_INVALID", "description": "Bots can't send another bot's game." }, "GEO_POINT_INVALID": { "code": 400, "name": "GEO_POINT_INVALID", "description": "Invalid geoposition provided." }, "GIF_CONTENT_TYPE_INVALID": { "code": 400, "name": "GIF_CONTENT_TYPE_INVALID", "description": "GIF content-type invalid." }, "GIF_ID_INVALID": { "code": 400, "name": "GIF_ID_INVALID", "description": "The provided GIF ID is invalid." }, "GRAPH_EXPIRED_RELOAD": { "code": 400, "name": "GRAPH_EXPIRED_RELOAD", "description": "This graph has expired, please obtain a new graph token." }, "GRAPH_INVALID_RELOAD": { "code": 400, "name": "GRAPH_INVALID_RELOAD", "description": "Invalid graph token provided, please reload the stats and provide the updated token." }, "GRAPH_OUTDATED_RELOAD": { "code": 400, "name": "GRAPH_OUTDATED_RELOAD", "description": "The graph is outdated, please get a new async token using stats.getBroadcastStats." }, "GROUPCALL_ALREADY_DISCARDED": { "code": 400, "name": "GROUPCALL_ALREADY_DISCARDED", "description": "The group call was already discarded." }, "GROUPCALL_FORBIDDEN": { "code": 400, "name": "GROUPCALL_FORBIDDEN", "description": "The group call has already ended." }, "GROUPCALL_INVALID": { "code": 400, "name": "GROUPCALL_INVALID", "description": "The specified group call is invalid." }, "GROUPCALL_JOIN_MISSING": { "code": 400, "name": "GROUPCALL_JOIN_MISSING", "description": "You haven't joined this group call." }, "GROUPCALL_NOT_MODIFIED": { "code": 400, "name": "GROUPCALL_NOT_MODIFIED", "description": "Group call settings weren't modified." }, "GROUPCALL_SSRC_DUPLICATE_MUCH": { "code": 400, "name": "GROUPCALL_SSRC_DUPLICATE_MUCH", "description": "The app needs to retry joining the group call with a new SSRC value." }, "GROUPED_MEDIA_INVALID": { "code": 400, "name": "GROUPED_MEDIA_INVALID", "description": "Invalid grouped media." }, "HASH_INVALID": { "code": 400, "name": "HASH_INVALID", "description": "The provided hash is invalid." }, "HIDE_REQUESTER_MISSING": { "code": 400, "name": "HIDE_REQUESTER_MISSING", "description": "The join request was missing or was already handled." }, "IMAGE_PROCESS_FAILED": { "code": 400, "name": "IMAGE_PROCESS_FAILED", "description": "Failure while processing image." }, "IMPORT_FILE_INVALID": { "code": 400, "name": "IMPORT_FILE_INVALID", "description": "The specified chat export file is invalid." }, "IMPORT_FORMAT_UNRECOGNIZED": { "code": 400, "name": "IMPORT_FORMAT_UNRECOGNIZED", "description": "The specified chat export file was exported from an unsupported chat app." }, "IMPORT_ID_INVALID": { "code": 400, "name": "IMPORT_ID_INVALID", "description": "The specified import ID is invalid." }, "IMPORT_TOKEN_INVALID": { "code": 400, "name": "IMPORT_TOKEN_INVALID", "description": "The specified token is invalid." }, "INLINE_RESULT_EXPIRED": { "code": 400, "name": "INLINE_RESULT_EXPIRED", "description": "The inline query expired." }, "INPUT_FILTER_INVALID": { "code": 400, "name": "INPUT_FILTER_INVALID", "description": "The specified filter is invalid." }, "INPUT_TEXT_EMPTY": { "code": 400, "name": "INPUT_TEXT_EMPTY", "description": "The specified text is empty." }, "INPUT_USER_DEACTIVATED": { "code": 400, "name": "INPUT_USER_DEACTIVATED", "description": "The specified user was deleted." }, "INVITE_FORBIDDEN_WITH_JOINAS": { "code": 400, "name": "INVITE_FORBIDDEN_WITH_JOINAS", "description": "If the user has anonymously joined a group call as a channel, they can't invite other users to the group call because that would cause deanonymization, because the invite would be sent using the original user ID, not the anonymized channel ID." }, "INVITE_HASH_EMPTY": { "code": 400, "name": "INVITE_HASH_EMPTY", "description": "The invite hash is empty." }, "INVITE_HASH_EXPIRED": { "code": 400, "name": "INVITE_HASH_EXPIRED", "description": "The invite link has expired." }, "INVITE_HASH_INVALID": { "code": 400, "name": "INVITE_HASH_INVALID", "description": "The invite hash is invalid." }, "INVITE_REQUEST_SENT": { "code": 400, "name": "INVITE_REQUEST_SENT", "description": "You have successfully requested to join this chat or channel." }, "INVITE_REVOKED_MISSING": { "code": 400, "name": "INVITE_REVOKED_MISSING", "description": "The specified invite link was already revoked or is invalid." }, "INVITE_SLUG_EMPTY": { "code": 400, "name": "INVITE_SLUG_EMPTY", "description": "The specified invite slug is empty." }, "INVITES_TOO_MUCH": { "code": 400, "name": "INVITES_TOO_MUCH", "description": "The maximum number of per-folder invites specified by the `chatlist_invites_limit_default`/`chatlist_invites_limit_premium` [client configuration parameters »](/api/config#chatlist-invites-limit-default) was reached." }, "INVOICE_PAYLOAD_INVALID": { "code": 400, "name": "INVOICE_PAYLOAD_INVALID", "description": "The specified invoice payload is invalid." }, "JOIN_AS_PEER_INVALID": { "code": 400, "name": "JOIN_AS_PEER_INVALID", "description": "The specified peer cannot be used to join a group call." }, "LANG_CODE_INVALID": { "code": 400, "name": "LANG_CODE_INVALID", "description": "The specified language code is invalid." }, "LANG_CODE_NOT_SUPPORTED": { "code": 400, "name": "LANG_CODE_NOT_SUPPORTED", "description": "The specified language code is not supported." }, "LANG_PACK_INVALID": { "code": 400, "name": "LANG_PACK_INVALID", "description": "The provided language pack is invalid." }, "LASTNAME_INVALID": { "code": 400, "name": "LASTNAME_INVALID", "description": "The last name is invalid." }, "LIMIT_INVALID": { "code": 400, "name": "LIMIT_INVALID", "description": "The provided limit is invalid." }, "LINK_NOT_MODIFIED": { "code": 400, "name": "LINK_NOT_MODIFIED", "description": "Discussion link not modified." }, "LOCATION_INVALID": { "code": 400, "name": "LOCATION_INVALID", "description": "The provided location is invalid." }, "MAX_DATE_INVALID": { "code": 400, "name": "MAX_DATE_INVALID", "description": "The specified maximum date is invalid." }, "MAX_ID_INVALID": { "code": 400, "name": "MAX_ID_INVALID", "description": "The provided max ID is invalid." }, "MAX_QTS_INVALID": { "code": 400, "name": "MAX_QTS_INVALID", "description": "The specified max_qts is invalid." }, "MD5_CHECKSUM_INVALID": { "code": 400, "name": "MD5_CHECKSUM_INVALID", "description": "The MD5 checksums do not match." }, "MEDIA_CAPTION_TOO_LONG": { "code": 400, "name": "MEDIA_CAPTION_TOO_LONG", "description": "The caption is too long." }, "MEDIA_EMPTY": { "code": 400, "name": "MEDIA_EMPTY", "description": "The provided media object is invalid." }, "MEDIA_GROUPED_INVALID": { "code": 400, "name": "MEDIA_GROUPED_INVALID", "description": "You tried to send media of different types in an album." }, "MEDIA_INVALID": { "code": 400, "name": "MEDIA_INVALID", "description": "Media invalid." }, "MEDIA_NEW_INVALID": { "code": 400, "name": "MEDIA_NEW_INVALID", "description": "The new media is invalid." }, "MEDIA_PREV_INVALID": { "code": 400, "name": "MEDIA_PREV_INVALID", "description": "Previous media invalid." }, "MEGAGROUP_ID_INVALID": { "code": 400, "name": "MEGAGROUP_ID_INVALID", "description": "Invalid supergroup ID." }, "MEGAGROUP_PREHISTORY_HIDDEN": { "code": 400, "name": "MEGAGROUP_PREHISTORY_HIDDEN", "description": "Group with hidden history for new members can't be set as discussion groups." }, "MEGAGROUP_REQUIRED": { "code": 400, "name": "MEGAGROUP_REQUIRED", "description": "You can only use this method on a supergroup." }, "MESSAGE_EDIT_TIME_EXPIRED": { "code": 400, "name": "MESSAGE_EDIT_TIME_EXPIRED", "description": "You can't edit this message anymore, too much time has passed since its creation." }, "MESSAGE_EMPTY": { "code": 400, "name": "MESSAGE_EMPTY", "description": "The provided message is empty." }, "MESSAGE_ID_INVALID": { "code": 400, "name": "MESSAGE_ID_INVALID", "description": "The provided message id is invalid." }, "MESSAGE_IDS_EMPTY": { "code": 400, "name": "MESSAGE_IDS_EMPTY", "description": "No message ids were provided." }, "MESSAGE_NOT_MODIFIED": { "code": 400, "name": "MESSAGE_NOT_MODIFIED", "description": "The provided message data is identical to the previous message data, the message wasn't modified." }, "MESSAGE_POLL_CLOSED": { "code": 400, "name": "MESSAGE_POLL_CLOSED", "description": "Poll closed." }, "MESSAGE_TOO_LONG": { "code": 400, "name": "MESSAGE_TOO_LONG", "description": "The provided message is too long." }, "METHOD_INVALID": { "code": 400, "name": "METHOD_INVALID", "description": "The specified method is invalid." }, "MIN_DATE_INVALID": { "code": 400, "name": "MIN_DATE_INVALID", "description": "The specified minimum date is invalid." }, "MSG_ID_INVALID": { "code": 400, "name": "MSG_ID_INVALID", "description": "Invalid message ID provided." }, "MSG_TOO_OLD": { "code": 400, "name": "MSG_TOO_OLD", "description": "[`chat_read_mark_expire_period` seconds](https://core.telegram.org/api/config#chat-read-mark-expire-period) have passed since the message was sent, read receipts were deleted." }, "MSG_WAIT_FAILED": { "code": 400, "name": "MSG_WAIT_FAILED", "description": "A waiting call returned an error." }, "MULTI_MEDIA_TOO_LONG": { "code": 400, "name": "MULTI_MEDIA_TOO_LONG", "description": "Too many media files for album." }, "NEW_SALT_INVALID": { "code": 400, "name": "NEW_SALT_INVALID", "description": "The new salt is invalid." }, "NEW_SETTINGS_EMPTY": { "code": 400, "name": "NEW_SETTINGS_EMPTY", "description": "No password is set on the current account, and no new password was specified in `new_settings`." }, "NEW_SETTINGS_INVALID": { "code": 400, "name": "NEW_SETTINGS_INVALID", "description": "The new password settings are invalid." }, "NEXT_OFFSET_INVALID": { "code": 400, "name": "NEXT_OFFSET_INVALID", "description": "The specified offset is longer than 64 bytes." }, "OFFSET_INVALID": { "code": 400, "name": "OFFSET_INVALID", "description": "The provided offset is invalid." }, "OFFSET_PEER_ID_INVALID": { "code": 400, "name": "OFFSET_PEER_ID_INVALID", "description": "The provided offset peer is invalid." }, "OPTION_INVALID": { "code": 400, "name": "OPTION_INVALID", "description": "Invalid option selected." }, "OPTIONS_TOO_MUCH": { "code": 400, "name": "OPTIONS_TOO_MUCH", "description": "Too many options provided." }, "ORDER_INVALID": { "code": 400, "name": "ORDER_INVALID", "description": "The specified username order is invalid." }, "PACK_SHORT_NAME_INVALID": { "code": 400, "name": "PACK_SHORT_NAME_INVALID", "description": "Short pack name invalid." }, "PACK_SHORT_NAME_OCCUPIED": { "code": 400, "name": "PACK_SHORT_NAME_OCCUPIED", "description": "A stickerpack with this name already exists." }, "PACK_TITLE_INVALID": { "code": 400, "name": "PACK_TITLE_INVALID", "description": "The stickerpack title is invalid." }, "PARTICIPANT_ID_INVALID": { "code": 400, "name": "PARTICIPANT_ID_INVALID", "description": "The specified participant ID is invalid." }, "PARTICIPANT_JOIN_MISSING": { "code": 400, "name": "PARTICIPANT_JOIN_MISSING", "description": "Trying to enable a presentation, when the user hasn't joined the Video Chat with [phone.joinGroupCall](https://core.telegram.org/method/phone.joinGroupCall)." }, "PARTICIPANT_VERSION_OUTDATED": { "code": 400, "name": "PARTICIPANT_VERSION_OUTDATED", "description": "The other participant does not use an up to date telegram client with support for calls." }, "PARTICIPANTS_TOO_FEW": { "code": 400, "name": "PARTICIPANTS_TOO_FEW", "description": "Not enough participants." }, "PASSWORD_EMPTY": { "code": 400, "name": "PASSWORD_EMPTY", "description": "The provided password is empty." }, "PASSWORD_HASH_INVALID": { "code": 400, "name": "PASSWORD_HASH_INVALID", "description": "The provided password hash is invalid." }, "PASSWORD_MISSING": { "code": 400, "name": "PASSWORD_MISSING", "description": "You must enable 2FA in order to transfer ownership of a channel." }, "PASSWORD_RECOVERY_EXPIRED": { "code": 400, "name": "PASSWORD_RECOVERY_EXPIRED", "description": "The recovery code has expired." }, "PASSWORD_RECOVERY_NA": { "code": 400, "name": "PASSWORD_RECOVERY_NA", "description": "No email was set, can't recover password via email." }, "PASSWORD_REQUIRED": { "code": 400, "name": "PASSWORD_REQUIRED", "description": "A [2FA password](https://core.telegram.org/api/srp) must be configured to use Telegram Passport." }, "PASSWORD_TOO_FRESH_%d": { "code": 400, "name": "PASSWORD_TOO_FRESH_%d", "description": "The password was added too recently and %d seconds must pass before using the method", "_paramNames": ["seconds"] }, "PAYMENT_PROVIDER_INVALID": { "code": 400, "name": "PAYMENT_PROVIDER_INVALID", "description": "The specified payment provider is invalid." }, "PEER_HISTORY_EMPTY": { "code": 400, "name": "PEER_HISTORY_EMPTY", "description": "You can't pin an empty chat with a user." }, "PEER_ID_INVALID": { "code": 400, "name": "PEER_ID_INVALID", "description": "The provided peer id is invalid." }, "PEER_ID_NOT_SUPPORTED": { "code": 400, "name": "PEER_ID_NOT_SUPPORTED", "description": "The provided peer ID is not supported." }, "PEERS_LIST_EMPTY": { "code": 400, "name": "PEERS_LIST_EMPTY", "description": "The specified list of peers is empty." }, "PERSISTENT_TIMESTAMP_EMPTY": { "code": 400, "name": "PERSISTENT_TIMESTAMP_EMPTY", "description": "Persistent timestamp empty." }, "PERSISTENT_TIMESTAMP_INVALID": { "code": 400, "name": "PERSISTENT_TIMESTAMP_INVALID", "description": "Persistent timestamp invalid." }, "PHONE_CODE_EMPTY": { "code": 400, "name": "PHONE_CODE_EMPTY", "description": "phone_code is missing." }, "PHONE_CODE_EXPIRED": { "code": 400, "name": "PHONE_CODE_EXPIRED", "description": "The phone code you provided has expired." }, "PHONE_CODE_HASH_EMPTY": { "code": 400, "name": "PHONE_CODE_HASH_EMPTY", "description": "phone_code_hash is missing." }, "PHONE_CODE_INVALID": { "code": 400, "name": "PHONE_CODE_INVALID", "description": "The provided phone code is invalid." }, "PHONE_HASH_EXPIRED": { "code": 400, "name": "PHONE_HASH_EXPIRED", "description": "An invalid or expired `phone_code_hash` was provided." }, "PHONE_NOT_OCCUPIED": { "code": 400, "name": "PHONE_NOT_OCCUPIED", "description": "No user is associated to the specified phone number." }, "PHONE_NUMBER_APP_SIGNUP_FORBIDDEN": { "code": 400, "name": "PHONE_NUMBER_APP_SIGNUP_FORBIDDEN", "description": "You can't sign up using this app." }, "PHONE_NUMBER_BANNED": { "code": 400, "name": "PHONE_NUMBER_BANNED", "description": "The provided phone number is banned from telegram." }, "PHONE_NUMBER_FLOOD": { "code": 400, "name": "PHONE_NUMBER_FLOOD", "description": "You asked for the code too many times." }, "PHONE_NUMBER_INVALID": { "code": 400, "name": "PHONE_NUMBER_INVALID", "description": "The phone number is invalid." }, "PHONE_NUMBER_OCCUPIED": { "code": 400, "name": "PHONE_NUMBER_OCCUPIED", "description": "The phone number is already in use." }, "PHONE_NUMBER_UNOCCUPIED": { "code": 400, "name": "PHONE_NUMBER_UNOCCUPIED", "description": "The phone number is not yet being used." }, "PHONE_PASSWORD_PROTECTED": { "code": 400, "name": "PHONE_PASSWORD_PROTECTED", "description": "This phone is password protected." }, "PHOTO_CONTENT_TYPE_INVALID": { "code": 400, "name": "PHOTO_CONTENT_TYPE_INVALID", "description": "Photo mime-type invalid." }, "PHOTO_CONTENT_URL_EMPTY": { "code": 400, "name": "PHOTO_CONTENT_URL_EMPTY", "description": "Photo URL invalid." }, "PHOTO_CROP_FILE_MISSING": { "code": 400, "name": "PHOTO_CROP_FILE_MISSING", "description": "Photo crop file missing." }, "PHOTO_CROP_SIZE_SMALL": { "code": 400, "name": "PHOTO_CROP_SIZE_SMALL", "description": "Photo is too small." }, "PHOTO_EXT_INVALID": { "code": 400, "name": "PHOTO_EXT_INVALID", "description": "The extension of the photo is invalid." }, "PHOTO_FILE_MISSING": { "code": 400, "name": "PHOTO_FILE_MISSING", "description": "Profile photo file missing." }, "PHOTO_ID_INVALID": { "code": 400, "name": "PHOTO_ID_INVALID", "description": "Photo ID invalid." }, "PHOTO_INVALID": { "code": 400, "name": "PHOTO_INVALID", "description": "Photo invalid." }, "PHOTO_INVALID_DIMENSIONS": { "code": 400, "name": "PHOTO_INVALID_DIMENSIONS", "description": "The photo dimensions are invalid." }, "PHOTO_SAVE_FILE_INVALID": { "code": 400, "name": "PHOTO_SAVE_FILE_INVALID", "description": "Internal issues, try again later." }, "PHOTO_THUMB_URL_EMPTY": { "code": 400, "name": "PHOTO_THUMB_URL_EMPTY", "description": "Photo thumbnail URL is empty." }, "PIN_RESTRICTED": { "code": 400, "name": "PIN_RESTRICTED", "description": "You can't pin messages." }, "PINNED_DIALOGS_TOO_MUCH": { "code": 400, "name": "PINNED_DIALOGS_TOO_MUCH", "description": "Too many pinned dialogs." }, "POLL_ANSWER_INVALID": { "code": 400, "name": "POLL_ANSWER_INVALID", "description": "One of the poll answers is not acceptable." }, "POLL_ANSWERS_INVALID": { "code": 400, "name": "POLL_ANSWERS_INVALID", "description": "Invalid poll answers were provided." }, "POLL_OPTION_DUPLICATE": { "code": 400, "name": "POLL_OPTION_DUPLICATE", "description": "Duplicate poll options provided." }, "POLL_OPTION_INVALID": { "code": 400, "name": "POLL_OPTION_INVALID", "description": "Invalid poll option provided." }, "POLL_QUESTION_INVALID": { "code": 400, "name": "POLL_QUESTION_INVALID", "description": "One of the poll questions is not acceptable." }, "PRIVACY_KEY_INVALID": { "code": 400, "name": "PRIVACY_KEY_INVALID", "description": "The privacy key is invalid." }, "PRIVACY_TOO_LONG": { "code": 400, "name": "PRIVACY_TOO_LONG", "description": "Too many privacy rules were specified, the current limit is 1000." }, "PRIVACY_VALUE_INVALID": { "code": 400, "name": "PRIVACY_VALUE_INVALID", "description": "The specified privacy rule combination is invalid." }, "PUBLIC_KEY_REQUIRED": { "code": 400, "name": "PUBLIC_KEY_REQUIRED", "description": "A public key is required." }, "QUERY_ID_EMPTY": { "code": 400, "name": "QUERY_ID_EMPTY", "description": "The query ID is empty." }, "QUERY_ID_INVALID": { "code": 400, "name": "QUERY_ID_INVALID", "description": "The query ID is invalid." }, "QUERY_TOO_SHORT": { "code": 400, "name": "QUERY_TOO_SHORT", "description": "The query string is too short." }, "QUIZ_ANSWER_MISSING": { "code": 400, "name": "QUIZ_ANSWER_MISSING", "description": "You can forward a quiz while hiding the original author only after choosing an option in the quiz." }, "QUIZ_CORRECT_ANSWER_INVALID": { "code": 400, "name": "QUIZ_CORRECT_ANSWER_INVALID", "description": "An invalid value was provided to the correct_answers field." }, "QUIZ_CORRECT_ANSWERS_EMPTY": { "code": 400, "name": "QUIZ_CORRECT_ANSWERS_EMPTY", "description": "No correct quiz answer was specified." }, "QUIZ_CORRECT_ANSWERS_TOO_MUCH": { "code": 400, "name": "QUIZ_CORRECT_ANSWERS_TOO_MUCH", "description": "You specified too many correct answers in a quiz, quizzes can only have one right answer!" }, "QUIZ_MULTIPLE_INVALID": { "code": 400, "name": "QUIZ_MULTIPLE_INVALID", "description": "Quizzes can't have the multiple_choice flag set!" }, "RANDOM_ID_EMPTY": { "code": 400, "name": "RANDOM_ID_EMPTY", "description": "Random ID empty." }, "RANDOM_ID_INVALID": { "code": 400, "name": "RANDOM_ID_INVALID", "description": "A provided random ID is invalid." }, "RANDOM_LENGTH_INVALID": { "code": 400, "name": "RANDOM_LENGTH_INVALID", "description": "Random length invalid." }, "RANGES_INVALID": { "code": 400, "name": "RANGES_INVALID", "description": "Invalid range provided." }, "REACTION_EMPTY": { "code": 400, "name": "REACTION_EMPTY", "description": "Empty reaction provided." }, "REACTION_INVALID": { "code": 400, "name": "REACTION_INVALID", "description": "The specified reaction is invalid." }, "REACTIONS_TOO_MANY": { "code": 400, "name": "REACTIONS_TOO_MANY", "description": "The message already has exactly `reactions_uniq_max` reaction emojis, you can't react with a new emoji, see [the docs for more info »](/api/config#client-configuration)." }, "REPLY_MARKUP_BUY_EMPTY": { "code": 400, "name": "REPLY_MARKUP_BUY_EMPTY", "description": "Reply markup for buy button empty." }, "REPLY_MARKUP_INVALID": { "code": 400, "name": "REPLY_MARKUP_INVALID", "description": "The provided reply markup is invalid." }, "REPLY_MARKUP_TOO_LONG": { "code": 400, "name": "REPLY_MARKUP_TOO_LONG", "description": "The specified reply_markup is too long." }, "RESET_REQUEST_MISSING": { "code": 400, "name": "RESET_REQUEST_MISSING", "description": "No password reset is in progress." }, "RESULT_ID_DUPLICATE": { "code": 400, "name": "RESULT_ID_DUPLICATE", "description": "You provided a duplicate result ID." }, "RESULT_ID_EMPTY": { "code": 400, "name": "RESULT_ID_EMPTY", "description": "Result ID empty." }, "RESULT_ID_INVALID": { "code": 400, "name": "RESULT_ID_INVALID", "description": "One of the specified result IDs is invalid." }, "RESULT_TYPE_INVALID": { "code": 400, "name": "RESULT_TYPE_INVALID", "description": "Result type invalid." }, "RESULTS_TOO_MUCH": { "code": 400, "name": "RESULTS_TOO_MUCH", "description": "Too many results were provided." }, "REVOTE_NOT_ALLOWED": { "code": 400, "name": "REVOTE_NOT_ALLOWED", "description": "You cannot change your vote." }, "RIGHTS_NOT_MODIFIED": { "code": 400, "name": "RIGHTS_NOT_MODIFIED", "description": "The new admin rights are equal to the old rights, no change was made." }, "RSA_DECRYPT_FAILED": { "code": 400, "name": "RSA_DECRYPT_FAILED", "description": "Internal RSA decryption failed." }, "SCHEDULE_BOT_NOT_ALLOWED": { "code": 400, "name": "SCHEDULE_BOT_NOT_ALLOWED", "description": "Bots cannot schedule messages." }, "SCHEDULE_DATE_INVALID": { "code": 400, "name": "SCHEDULE_DATE_INVALID", "description": "Invalid schedule date provided." }, "SCHEDULE_DATE_TOO_LATE": { "code": 400, "name": "SCHEDULE_DATE_TOO_LATE", "description": "You can't schedule a message this far in the future." }, "SCHEDULE_STATUS_PRIVATE": { "code": 400, "name": "SCHEDULE_STATUS_PRIVATE", "description": "Can't schedule until user is online, if the user's last seen timestamp is hidden by their privacy settings." }, "SCHEDULE_TOO_MUCH": { "code": 400, "name": "SCHEDULE_TOO_MUCH", "description": "There are too many scheduled messages." }, "SCORE_INVALID": { "code": 400, "name": "SCORE_INVALID", "description": "The specified game score is invalid." }, "SEARCH_QUERY_EMPTY": { "code": 400, "name": "SEARCH_QUERY_EMPTY", "description": "The search query is empty." }, "SEARCH_WITH_LINK_NOT_SUPPORTED": { "code": 400, "name": "SEARCH_WITH_LINK_NOT_SUPPORTED", "description": "You cannot provide a search query and an invite link at the same time." }, "SECONDS_INVALID": { "code": 400, "name": "SECONDS_INVALID", "description": "Invalid duration provided." }, "SEND_AS_PEER_INVALID": { "code": 400, "name": "SEND_AS_PEER_INVALID", "description": "You can't send messages as the specified peer." }, "SEND_MESSAGE_MEDIA_INVALID": { "code": 400, "name": "SEND_MESSAGE_MEDIA_INVALID", "description": "Invalid media provided." }, "SEND_MESSAGE_TYPE_INVALID": { "code": 400, "name": "SEND_MESSAGE_TYPE_INVALID", "description": "The message type is invalid." }, "SESSION_TOO_FRESH_%d": { "code": 400, "name": "SESSION_TOO_FRESH_%d", "description": "The session logged in too recently and %d seconds must pass before calling the method", "_paramNames": ["seconds"] }, "SETTINGS_INVALID": { "code": 400, "name": "SETTINGS_INVALID", "description": "Invalid settings were provided." }, "SHA256_HASH_INVALID": { "code": 400, "name": "SHA256_HASH_INVALID", "description": "The provided SHA256 hash is invalid." }, "SHORT_NAME_INVALID": { "code": 400, "name": "SHORT_NAME_INVALID", "description": "The specified short name is invalid." }, "SHORT_NAME_OCCUPIED": { "code": 400, "name": "SHORT_NAME_OCCUPIED", "description": "The specified short name is already in use." }, "SLOWMODE_MULTI_MSGS_DISABLED": { "code": 400, "name": "SLOWMODE_MULTI_MSGS_DISABLED", "description": "Slowmode is enabled, you cannot forward multiple messages to this group." }, "SMS_CODE_CREATE_FAILED": { "code": 400, "name": "SMS_CODE_CREATE_FAILED", "description": "An error occurred while creating the SMS code." }, "SRP_ID_INVALID": { "code": 400, "name": "SRP_ID_INVALID", "description": "Invalid SRP ID provided." }, "SRP_PASSWORD_CHANGED": { "code": 400, "name": "SRP_PASSWORD_CHANGED", "description": "Password has changed." }, "START_PARAM_EMPTY": { "code": 400, "name": "START_PARAM_EMPTY", "description": "The start parameter is empty." }, "START_PARAM_INVALID": { "code": 400, "name": "START_PARAM_INVALID", "description": "Start parameter invalid." }, "START_PARAM_TOO_LONG": { "code": 400, "name": "START_PARAM_TOO_LONG", "description": "Start parameter is too long." }, "STICKER_DOCUMENT_INVALID": { "code": 400, "name": "STICKER_DOCUMENT_INVALID", "description": "The specified sticker document is invalid." }, "STICKER_EMOJI_INVALID": { "code": 400, "name": "STICKER_EMOJI_INVALID", "description": "Sticker emoji invalid." }, "STICKER_FILE_INVALID": { "code": 400, "name": "STICKER_FILE_INVALID", "description": "Sticker file invalid." }, "STICKER_GIF_DIMENSIONS": { "code": 400, "name": "STICKER_GIF_DIMENSIONS", "description": "The specified video sticker has invalid dimensions." }, "STICKER_ID_INVALID": { "code": 400, "name": "STICKER_ID_INVALID", "description": "The provided sticker ID is invalid." }, "STICKER_INVALID": { "code": 400, "name": "STICKER_INVALID", "description": "The provided sticker is invalid." }, "STICKER_MIME_INVALID": { "code": 400, "name": "STICKER_MIME_INVALID", "description": "The specified sticker MIME type is invalid." }, "STICKER_PNG_DIMENSIONS": { "code": 400, "name": "STICKER_PNG_DIMENSIONS", "description": "Sticker png dimensions invalid." }, "STICKER_PNG_NOPNG": { "code": 400, "name": "STICKER_PNG_NOPNG", "description": "One of the specified stickers is not a valid PNG file." }, "STICKER_TGS_NODOC": { "code": 400, "name": "STICKER_TGS_NODOC", "description": "You must send the animated sticker as a document." }, "STICKER_TGS_NOTGS": { "code": 400, "name": "STICKER_TGS_NOTGS", "description": "Invalid TGS sticker provided." }, "STICKER_THUMB_PNG_NOPNG": { "code": 400, "name": "STICKER_THUMB_PNG_NOPNG", "description": "Incorrect stickerset thumb file provided, PNG / WEBP expected." }, "STICKER_THUMB_TGS_NOTGS": { "code": 400, "name": "STICKER_THUMB_TGS_NOTGS", "description": "Incorrect stickerset TGS thumb file provided." }, "STICKER_VIDEO_BIG": { "code": 400, "name": "STICKER_VIDEO_BIG", "description": "The specified video sticker is too big." }, "STICKER_VIDEO_NODOC": { "code": 400, "name": "STICKER_VIDEO_NODOC", "description": "You must send the video sticker as a document." }, "STICKER_VIDEO_NOWEBM": { "code": 400, "name": "STICKER_VIDEO_NOWEBM", "description": "The specified video sticker is not in webm format." }, "STICKERPACK_STICKERS_TOO_MUCH": { "code": 400, "name": "STICKERPACK_STICKERS_TOO_MUCH", "description": "There are too many stickers in this stickerpack, you can't add any more." }, "STICKERS_EMPTY": { "code": 400, "name": "STICKERS_EMPTY", "description": "No sticker provided." }, "STICKERS_TOO_MUCH": { "code": 400, "name": "STICKERS_TOO_MUCH", "description": "There are too many stickers in this stickerpack, you can't add any more." }, "STICKERSET_INVALID": { "code": 400, "name": "STICKERSET_INVALID", "description": "The provided sticker set is invalid." }, "SWITCH_PM_TEXT_EMPTY": { "code": 400, "name": "SWITCH_PM_TEXT_EMPTY", "description": "The switch_pm.text field was empty." }, "TAKEOUT_REQUIRED": { "code": 400, "name": "TAKEOUT_REQUIRED", "description": "A takeout session has to be initialized, first." }, "TASK_ALREADY_EXISTS": { "code": 400, "name": "TASK_ALREADY_EXISTS", "description": "An email reset was already requested." }, "TEMP_AUTH_KEY_ALREADY_BOUND": { "code": 400, "name": "TEMP_AUTH_KEY_ALREADY_BOUND", "description": "The passed temporary key is already bound to another **perm_auth_key_id**." }, "TEMP_AUTH_KEY_EMPTY": { "code": 400, "name": "TEMP_AUTH_KEY_EMPTY", "description": "No temporary auth key provided." }, "THEME_FILE_INVALID": { "code": 400, "name": "THEME_FILE_INVALID", "description": "Invalid theme file provided." }, "THEME_FORMAT_INVALID": { "code": 400, "name": "THEME_FORMAT_INVALID", "description": "Invalid theme format provided." }, "THEME_INVALID": { "code": 400, "name": "THEME_INVALID", "description": "Invalid theme provided." }, "THEME_MIME_INVALID": { "code": 400, "name": "THEME_MIME_INVALID", "description": "The theme's MIME type is invalid." }, "THEME_TITLE_INVALID": { "code": 400, "name": "THEME_TITLE_INVALID", "description": "The specified theme title is invalid." }, "TITLE_INVALID": { "code": 400, "name": "TITLE_INVALID", "description": "The specified stickerpack title is invalid." }, "TMP_PASSWORD_DISABLED": { "code": 400, "name": "TMP_PASSWORD_DISABLED", "description": "The temporary password is disabled." }, "TO_LANG_INVALID": { "code": 400, "name": "TO_LANG_INVALID", "description": "The specified destination language is invalid." }, "TOKEN_EMPTY": { "code": 400, "name": "TOKEN_EMPTY", "description": "The specified token is empty." }, "TOKEN_INVALID": { "code": 400, "name": "TOKEN_INVALID", "description": "The provided token is invalid." }, "TOKEN_TYPE_INVALID": { "code": 400, "name": "TOKEN_TYPE_INVALID", "description": "The specified token type is invalid." }, "TOPIC_CLOSED": { "code": 400, "name": "TOPIC_CLOSED", "description": "This topic was closed, you can't send messages to it anymore." }, "TOPIC_DELETED": { "code": 400, "name": "TOPIC_DELETED", "description": "The specified topic was deleted." }, "TOPIC_ID_INVALID": { "code": 400, "name": "TOPIC_ID_INVALID", "description": "The specified topic ID is invalid." }, "TOPIC_NOT_MODIFIED": { "code": 400, "name": "TOPIC_NOT_MODIFIED", "description": "The updated topic info is equal to the current topic info, nothing was changed." }, "TRANSCRIPTION_FAILED": { "code": 400, "name": "TRANSCRIPTION_FAILED", "description": "Audio transcription failed." }, "TTL_DAYS_INVALID": { "code": 400, "name": "TTL_DAYS_INVALID", "description": "The provided TTL is invalid." }, "TTL_MEDIA_INVALID": { "code": 400, "name": "TTL_MEDIA_INVALID", "description": "Invalid media Time To Live was provided." }, "TTL_PERIOD_INVALID": { "code": 400, "name": "TTL_PERIOD_INVALID", "description": "The specified TTL period is invalid." }, "TYPES_EMPTY": { "code": 400, "name": "TYPES_EMPTY", "description": "No top peer type was provided." }, "UNTIL_DATE_INVALID": { "code": 400, "name": "UNTIL_DATE_INVALID", "description": "Invalid until date provided." }, "URL_INVALID": { "code": 400, "name": "URL_INVALID", "description": "Invalid URL provided." }, "USAGE_LIMIT_INVALID": { "code": 400, "name": "USAGE_LIMIT_INVALID", "description": "The specified usage limit is invalid." }, "USER_ADMIN_INVALID": { "code": 400, "name": "USER_ADMIN_INVALID", "description": "You're not an admin." }, "USER_ALREADY_INVITED": { "code": 400, "name": "USER_ALREADY_INVITED", "description": "You have already invited this user." }, "USER_ALREADY_PARTICIPANT": { "code": 400, "name": "USER_ALREADY_PARTICIPANT", "description": "The user is already in the group." }, "USER_BANNED_IN_CHANNEL": { "code": 400, "name": "USER_BANNED_IN_CHANNEL", "description": "You're banned from sending messages in supergroups/channels." }, "USER_BLOCKED": { "code": 400, "name": "USER_BLOCKED", "description": "User blocked." }, "USER_BOT": { "code": 400, "name": "USER_BOT", "description": "Bots can only be admins in channels." }, "USER_BOT_INVALID": { "code": 400, "name": "USER_BOT_INVALID", "description": "User accounts must provide the `bot` method parameter when calling this method. If there is no such method parameter, this method can only be invoked by bot accounts." }, "USER_BOT_REQUIRED": { "code": 400, "name": "USER_BOT_REQUIRED", "description": "This method can only be called by a bot." }, "USER_CHANNELS_TOO_MUCH": { "code": 400, "name": "USER_CHANNELS_TOO_MUCH", "description": "One of the users you tried to add is already in too many channels/supergroups." }, "USER_CREATOR": { "code": 400, "name": "USER_CREATOR", "description": "You can't leave this channel, because you're its creator." }, "USER_ID_INVALID": { "code": 400, "name": "USER_ID_INVALID", "description": "The provided user ID is invalid." }, "USER_INVALID": { "code": 400, "name": "USER_INVALID", "description": "Invalid user provided." }, "USER_IS_BLOCKED": { "code": 400, "name": "USER_IS_BLOCKED", "description": "You were blocked by this user." }, "USER_IS_BOT": { "code": 400, "name": "USER_IS_BOT", "description": "Bots can't send messages to other bots." }, "USER_KICKED": { "code": 400, "name": "USER_KICKED", "description": "This user was kicked from this supergroup/channel." }, "USER_NOT_MUTUAL_CONTACT": { "code": 400, "name": "USER_NOT_MUTUAL_CONTACT", "description": "The provided user is not a mutual contact." }, "USER_NOT_PARTICIPANT": { "code": 400, "name": "USER_NOT_PARTICIPANT", "description": "You're not a member of this supergroup/channel." }, "USER_VOLUME_INVALID": { "code": 400, "name": "USER_VOLUME_INVALID", "description": "The specified user volume is invalid." }, "USERNAME_INVALID": { "code": 400, "name": "USERNAME_INVALID", "description": "The provided username is not valid." }, "USERNAME_NOT_MODIFIED": { "code": 400, "name": "USERNAME_NOT_MODIFIED", "description": "The username was not modified." }, "USERNAME_NOT_OCCUPIED": { "code": 400, "name": "USERNAME_NOT_OCCUPIED", "description": "The provided username is not occupied." }, "USERNAME_OCCUPIED": { "code": 400, "name": "USERNAME_OCCUPIED", "description": "The provided username is already occupied." }, "USERNAME_PURCHASE_AVAILABLE": { "code": 400, "name": "USERNAME_PURCHASE_AVAILABLE", "description": "The specified username can be purchased on https://fragment.com." }, "USERNAMES_ACTIVE_TOO_MUCH": { "code": 400, "name": "USERNAMES_ACTIVE_TOO_MUCH", "description": "The maximum number of active usernames was reached." }, "USERPIC_UPLOAD_REQUIRED": { "code": 400, "name": "USERPIC_UPLOAD_REQUIRED", "description": "You must have a profile picture to publish your geolocation." }, "USERS_TOO_FEW": { "code": 400, "name": "USERS_TOO_FEW", "description": "Not enough users (to create a chat, for example)." }, "USERS_TOO_MUCH": { "code": 400, "name": "USERS_TOO_MUCH", "description": "The maximum number of users has been exceeded (to create a chat, for example)." }, "VIDEO_CONTENT_TYPE_INVALID": { "code": 400, "name": "VIDEO_CONTENT_TYPE_INVALID", "description": "The video's content type is invalid." }, "VIDEO_FILE_INVALID": { "code": 400, "name": "VIDEO_FILE_INVALID", "description": "The specified video file is invalid." }, "VIDEO_TITLE_EMPTY": { "code": 400, "name": "VIDEO_TITLE_EMPTY", "description": "The specified video title is empty." }, "VOICE_MESSAGES_FORBIDDEN": { "code": 400, "name": "VOICE_MESSAGES_FORBIDDEN", "description": "This user's privacy settings forbid you from sending voice messages." }, "WALLPAPER_FILE_INVALID": { "code": 400, "name": "WALLPAPER_FILE_INVALID", "description": "The specified wallpaper file is invalid." }, "WALLPAPER_INVALID": { "code": 400, "name": "WALLPAPER_INVALID", "description": "The specified wallpaper is invalid." }, "WALLPAPER_MIME_INVALID": { "code": 400, "name": "WALLPAPER_MIME_INVALID", "description": "The specified wallpaper MIME type is invalid." }, "WC_CONVERT_URL_INVALID": { "code": 400, "name": "WC_CONVERT_URL_INVALID", "description": "WC convert URL invalid." }, "WEBDOCUMENT_INVALID": { "code": 400, "name": "WEBDOCUMENT_INVALID", "description": "Invalid webdocument URL provided." }, "WEBDOCUMENT_MIME_INVALID": { "code": 400, "name": "WEBDOCUMENT_MIME_INVALID", "description": "Invalid webdocument mime type provided." }, "WEBDOCUMENT_SIZE_TOO_BIG": { "code": 400, "name": "WEBDOCUMENT_SIZE_TOO_BIG", "description": "Webdocument is too big!" }, "WEBDOCUMENT_URL_INVALID": { "code": 400, "name": "WEBDOCUMENT_URL_INVALID", "description": "The specified webdocument URL is invalid." }, "WEBPAGE_CURL_FAILED": { "code": 400, "name": "WEBPAGE_CURL_FAILED", "description": "Failure while fetching the webpage with cURL." }, "WEBPAGE_MEDIA_EMPTY": { "code": 400, "name": "WEBPAGE_MEDIA_EMPTY", "description": "Webpage media empty." }, "WEBPUSH_AUTH_INVALID": { "code": 400, "name": "WEBPUSH_AUTH_INVALID", "description": "The specified web push authentication secret is invalid." }, "WEBPUSH_KEY_INVALID": { "code": 400, "name": "WEBPUSH_KEY_INVALID", "description": "The specified web push elliptic curve Diffie-Hellman public key is invalid." }, "WEBPUSH_TOKEN_INVALID": { "code": 400, "name": "WEBPUSH_TOKEN_INVALID", "description": "The specified web push token is invalid." }, "YOU_BLOCKED_USER": { "code": 400, "name": "YOU_BLOCKED_USER", "description": "You blocked this user." }, "BROADCAST_FORBIDDEN": { "code": 403, "name": "BROADCAST_FORBIDDEN", "description": "Participants of polls in channels should stay anonymous." }, "CHANNEL_PUBLIC_GROUP_NA": { "code": 403, "name": "CHANNEL_PUBLIC_GROUP_NA", "description": "channel/supergroup not available." }, "CHAT_ADMIN_INVITE_REQUIRED": { "code": 403, "name": "CHAT_ADMIN_INVITE_REQUIRED", "description": "You do not have the rights to do this." }, "CHAT_GUEST_SEND_FORBIDDEN": { "code": 403, "name": "CHAT_GUEST_SEND_FORBIDDEN", "description": "You join the discussion group before commenting, see [here »](/api/discussion#requiring-users-to-join-the-group) for more info." }, "CHAT_SEND_AUDIOS_FORBIDDEN": { "code": 403, "name": "CHAT_SEND_AUDIOS_FORBIDDEN", "description": "You can't send audio messages in this chat." }, "CHAT_SEND_DOCS_FORBIDDEN": { "code": 403, "name": "CHAT_SEND_DOCS_FORBIDDEN", "description": "You can't send documents in this chat." }, "CHAT_SEND_GAME_FORBIDDEN": { "code": 403, "name": "CHAT_SEND_GAME_FORBIDDEN", "description": "You can't send a game to this chat." }, "CHAT_SEND_GIFS_FORBIDDEN": { "code": 403, "name": "CHAT_SEND_GIFS_FORBIDDEN", "description": "You can't send gifs in this chat." }, "CHAT_SEND_MEDIA_FORBIDDEN": { "code": 403, "name": "CHAT_SEND_MEDIA_FORBIDDEN", "description": "You can't send media in this chat." }, "CHAT_SEND_PHOTOS_FORBIDDEN": { "code": 403, "name": "CHAT_SEND_PHOTOS_FORBIDDEN", "description": "You can't send photos in this chat." }, "CHAT_SEND_PLAIN_FORBIDDEN": { "code": 403, "name": "CHAT_SEND_PLAIN_FORBIDDEN", "description": "You can't send non-media (text) messages in this chat." }, "CHAT_SEND_POLL_FORBIDDEN": { "code": 403, "name": "CHAT_SEND_POLL_FORBIDDEN", "description": "You can't send polls in this chat." }, "CHAT_SEND_STICKERS_FORBIDDEN": { "code": 403, "name": "CHAT_SEND_STICKERS_FORBIDDEN", "description": "You can't send stickers in this chat." }, "CHAT_SEND_VIDEOS_FORBIDDEN": { "code": 403, "name": "CHAT_SEND_VIDEOS_FORBIDDEN", "description": "You can't send videos in this chat." }, "CHAT_SEND_VOICES_FORBIDDEN": { "code": 403, "name": "CHAT_SEND_VOICES_FORBIDDEN", "description": "You can't send voice recordings in this chat." }, "CHAT_WRITE_FORBIDDEN": { "code": 403, "name": "CHAT_WRITE_FORBIDDEN", "description": "You can't write in this chat." }, "EDIT_BOT_INVITE_FORBIDDEN": { "code": 403, "name": "EDIT_BOT_INVITE_FORBIDDEN", "description": "Normal users can't edit invites that were created by bots." }, "GROUPCALL_ALREADY_STARTED": { "code": 403, "name": "GROUPCALL_ALREADY_STARTED", "description": "The groupcall has already started, you can join directly using [phone.joinGroupCall](https://core.telegram.org/method/phone.joinGroupCall)." }, "INLINE_BOT_REQUIRED": { "code": 403, "name": "INLINE_BOT_REQUIRED", "description": "Only the inline bot can edit message." }, "MESSAGE_AUTHOR_REQUIRED": { "code": 403, "name": "MESSAGE_AUTHOR_REQUIRED", "description": "Message author required." }, "MESSAGE_DELETE_FORBIDDEN": { "code": 403, "name": "MESSAGE_DELETE_FORBIDDEN", "description": "You can't delete one of the messages you tried to delete, most likely because it is a service message." }, "POLL_VOTE_REQUIRED": { "code": 403, "name": "POLL_VOTE_REQUIRED", "description": "Cast a vote in the poll before calling this method." }, "PREMIUM_ACCOUNT_REQUIRED": { "code": 403, "name": "PREMIUM_ACCOUNT_REQUIRED", "description": "A premium account is required to execute this action." }, "PUBLIC_CHANNEL_MISSING": { "code": 403, "name": "PUBLIC_CHANNEL_MISSING", "description": "You can only export group call invite links for public chats or channels." }, "RIGHT_FORBIDDEN": { "code": 403, "name": "RIGHT_FORBIDDEN", "description": "Your admin rights do not allow you to do this." }, "SENSITIVE_CHANGE_FORBIDDEN": { "code": 403, "name": "SENSITIVE_CHANGE_FORBIDDEN", "description": "You can't change your sensitive content settings." }, "USER_DELETED": { "code": 403, "name": "USER_DELETED", "description": "You can't send this secret message because the other participant deleted their account." }, "USER_PRIVACY_RESTRICTED": { "code": 403, "name": "USER_PRIVACY_RESTRICTED", "description": "The user's privacy settings do not allow you to do this." }, "USER_RESTRICTED": { "code": 403, "name": "USER_RESTRICTED", "description": "You're spamreported, you can't create channels or chats." }, "FILEREF_UPGRADE_NEEDED": { "code": 406, "name": "FILEREF_UPGRADE_NEEDED", "description": "The client has to be updated in order to support [file references](https://core.telegram.org/api/file_reference)." }, "FRESH_CHANGE_PHONE_FORBIDDEN": { "code": 406, "name": "FRESH_CHANGE_PHONE_FORBIDDEN", "description": "You can't change phone number right after logging in, please wait at least 24 hours." }, "FRESH_RESET_AUTHORISATION_FORBIDDEN": { "code": 406, "name": "FRESH_RESET_AUTHORISATION_FORBIDDEN", "description": "You can't logout other sessions if less than 24 hours have passed since you logged on the current session." }, "PAYMENT_UNSUPPORTED": { "code": 406, "name": "PAYMENT_UNSUPPORTED", "description": "A detailed description of the error will be received separately as described [here »](https://core.telegram.org/api/errors#406-not-acceptable)." }, "PHONE_PASSWORD_FLOOD": { "code": 406, "name": "PHONE_PASSWORD_FLOOD", "description": "You have tried logging in too many times." }, "PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_%dMIN": { "code": 406, "name": "PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_%dMIN", "description": "Similar to a flood wait, must wait %d minutes", "_paramNames": ["minutes"] }, "SEND_CODE_UNAVAILABLE": { "code": 406, "name": "SEND_CODE_UNAVAILABLE", "description": "Returned when all available options for this type of number were already used (e.g. flash-call, then SMS, then this error might be returned to trigger a second resend)." }, "STICKERSET_OWNER_ANONYMOUS": { "code": 406, "name": "STICKERSET_OWNER_ANONYMOUS", "description": "Provided stickerset can't be installed as group stickerset to prevent admin deanonymization." }, "USERPIC_PRIVACY_REQUIRED": { "code": 406, "name": "USERPIC_PRIVACY_REQUIRED", "description": "You need to disable privacy settings for your profile picture in order to make your geolocation public." }, "2FA_CONFIRM_WAIT_%d": { "code": 420, "name": "2FA_CONFIRM_WAIT_%d", "description": "The account is 2FA protected so it will be deleted in a week. Otherwise it can be reset in %d", "_paramNames": ["seconds"] }, "SLOWMODE_WAIT_%d": { "code": 420, "name": "SLOWMODE_WAIT_%d", "description": "A wait of %d seconds is required before sending another message in this chat", "_paramNames": ["seconds"] }, "TAKEOUT_INIT_DELAY_%d": { "code": 420, "name": "TAKEOUT_INIT_DELAY_%d", "description": "A wait of %d seconds is required before being able to initiate the takeout", "_paramNames": ["seconds"] }, "AUTH_RESTART": { "code": 500, "name": "AUTH_RESTART", "description": "Restart the authorization process." }, "CDN_UPLOAD_TIMEOUT": { "code": 500, "name": "CDN_UPLOAD_TIMEOUT", "description": "A server-side timeout occurred while reuploading the file to the CDN DC." }, "CHAT_ID_GENERATE_FAILED": { "code": 500, "name": "CHAT_ID_GENERATE_FAILED", "description": "Failure while generating the chat ID." }, "PERSISTENT_TIMESTAMP_OUTDATED": { "code": 500, "name": "PERSISTENT_TIMESTAMP_OUTDATED", "description": "Channel internal replication issues, try again later (treat this like an RPC_CALL_FAIL)." }, "RANDOM_ID_DUPLICATE": { "code": 500, "name": "RANDOM_ID_DUPLICATE", "description": "You provided a random ID that was already used." }, "SIGN_IN_FAILED": { "code": 500, "name": "SIGN_IN_FAILED", "description": "Failure while signing in." }, "Invalid msg_resend_req query": { "code": -500, "name": "Invalid msg_resend_req query", "description": "Invalid msg_resend_req query." }, "Invalid msgs_ack query": { "code": -500, "name": "Invalid msgs_ack query", "description": "Invalid msgs_ack query." }, "Invalid msgs_state_req query": { "code": -500, "name": "Invalid msgs_state_req query", "description": "Invalid msgs_state_req query." }, "Timeout": { "code": -503, "name": "Timeout", "description": "Timeout while fetching data." }, "SESSION_PASSWORD_NEEDED": { "code": 401, "name": "SESSION_PASSWORD_NEEDED", "description": "2FA is enabled, use a password to login." }, "FLOOD_WAIT_%d": { "code": 420, "name": "FLOOD_WAIT_%d", "description": "A wait of %d seconds is required", "_paramNames": ["seconds"] }, "ACTIVE_USER_REQUIRED": { "code": 401, "name": "ACTIVE_USER_REQUIRED", "description": "The method is only available to already activated users" }, "AUTH_KEY_DUPLICATED": { "code": 406, "name": "AUTH_KEY_DUPLICATED", "description": "The authorization key (session file) was used under two different IP addresses simultaneously, and can no longer be used. Use the same session exclusively, or use different sessions" }, "AUTH_KEY_INVALID": { "code": 401, "name": "AUTH_KEY_INVALID", "description": "The key is invalid" }, "AUTH_KEY_PERM_EMPTY": { "code": 401, "name": "AUTH_KEY_PERM_EMPTY", "description": "The method is unavailable for temporary authorization key, not bound to permanent" }, "AUTH_KEY_UNREGISTERED": { "code": 401, "name": "AUTH_KEY_UNREGISTERED", "description": "The key is not registered in the system" }, "AUTH_TOKEN_INVALID2": { "code": 400, "name": "AUTH_TOKEN_INVALID2", "description": "An invalid authorization token was provided" }, "BASE_PORT_LOC_INVALID": { "code": 400, "name": "BASE_PORT_LOC_INVALID", "description": "Base port location invalid" }, "BOT_GAMES_DISABLED": { "code": 400, "name": "BOT_GAMES_DISABLED", "description": "Bot games cannot be used in this type of chat" }, "BOT_METHOD_INVALID": { "code": 400, "name": "BOT_METHOD_INVALID", "description": "The API access for bot users is restricted. The method you tried to invoke cannot be executed as a bot" }, "BOT_POLLS_DISABLED": { "code": 400, "name": "BOT_POLLS_DISABLED", "description": "You cannot create polls under a bot account" }, "BROADCAST_CALLS_DISABLED": { "code": 400, "name": "BROADCAST_CALLS_DISABLED" }, "CHANNEL_BANNED": { "code": 400, "name": "CHANNEL_BANNED", "description": "The channel is banned" }, "CHAT_FORBIDDEN": { "code": 403, "name": "CHAT_FORBIDDEN", "description": "You cannot write in this chat" }, "CHAT_GET_FAILED": { "code": 500, "name": "CHAT_GET_FAILED" }, "CHP_CALL_FAIL": { "code": 500, "name": "CHP_CALL_FAIL", "description": "The statistics cannot be retrieved at this time" }, "CONNECTION_DEVICE_MODEL_EMPTY": { "code": 400, "name": "CONNECTION_DEVICE_MODEL_EMPTY", "description": "Device model empty" }, "CONNECTION_LANG_PACK_INVALID": { "code": 400, "name": "CONNECTION_LANG_PACK_INVALID", "description": "The specified language pack is not valid. This is meant to be used by official applications only so far, leave it empty" }, "CONNECTION_NOT_INITED": { "code": 400, "name": "CONNECTION_NOT_INITED", "description": "Connection not initialized" }, "CONNECTION_SYSTEM_EMPTY": { "code": 400, "name": "CONNECTION_SYSTEM_EMPTY", "description": "Connection system empty" }, "CONNECTION_SYSTEM_LANG_CODE_EMPTY": { "code": 400, "name": "CONNECTION_SYSTEM_LANG_CODE_EMPTY", "description": "The system language string was empty during connection" }, "ENCRYPTION_OCCUPY_FAILED": { "code": 500, "name": "ENCRYPTION_OCCUPY_FAILED", "description": "TDLib developer claimed it is not an error while accepting secret chats and 500 is used instead of 420" }, "EXPIRE_FORBIDDEN": { "code": 400, "name": "EXPIRE_FORBIDDEN" }, "FIELD_NAME_EMPTY": { "code": 400, "name": "FIELD_NAME_EMPTY", "description": "The field with the name FIELD_NAME is missing" }, "FIELD_NAME_INVALID": { "code": 400, "name": "FIELD_NAME_INVALID", "description": "The field with the name FIELD_NAME is invalid" }, "FILE_MIGRATE_%d": { "code": 303, "name": "FILE_MIGRATE_%d", "_paramNames": ["new_dc"], "description": "The file to be accessed is currently stored in DC %d" }, "FILE_PART_0_MISSING": { "code": 400, "name": "FILE_PART_0_MISSING", "description": "File part 0 missing" }, "FILE_PART_%d_MISSING": { "code": 400, "name": "FILE_PART_%d_MISSING", "_paramNames": ["which"], "description": "Part %d of the file is missing from storage" }, "FLOOD_TEST_PHONE_WAIT_%d": { "code": 420, "name": "FLOOD_TEST_PHONE_WAIT_%d", "_paramNames": ["seconds"], "description": "A wait of %d seconds is required in the test servers" }, "GROUPCALL_ADD_PARTICIPANTS_FAILED": { "code": 500, "name": "GROUPCALL_ADD_PARTICIPANTS_FAILED" }, "GROUP_CALL_INVALID": { "code": 400, "name": "GROUP_CALL_INVALID", "description": "Group call invalid" }, "HISTORY_GET_FAILED": { "code": 500, "name": "HISTORY_GET_FAILED", "description": "Fetching of history failed" }, "INPUT_CONSTRUCTOR_INVALID": { "code": 400, "name": "INPUT_CONSTRUCTOR_INVALID", "description": "The provided constructor is invalid" }, "INPUT_FETCH_ERROR": { "code": 400, "name": "INPUT_FETCH_ERROR", "description": "An error occurred while deserializing TL parameters" }, "INPUT_FETCH_FAIL": { "code": 400, "name": "INPUT_FETCH_FAIL", "description": "Failed deserializing TL payload" }, "INPUT_LAYER_INVALID": { "code": 400, "name": "INPUT_LAYER_INVALID", "description": "The provided layer is invalid" }, "INPUT_METHOD_INVALID": { "code": 400, "name": "INPUT_METHOD_INVALID", "description": "The invoked method does not exist anymore or has never existed" }, "INPUT_REQUEST_TOO_LONG": { "code": 400, "name": "INPUT_REQUEST_TOO_LONG", "description": "The input request was too long. This may be a bug in the library as it can occur when serializing more bytes than it should (like appending the vector constructor code at the end of a message)" }, "INTERDC_%d_CALL_ERROR": { "code": 500, "name": "INTERDC_%d_CALL_ERROR", "_paramNames": ["dc"], "description": "An error occurred while communicating with DC %d" }, "INTERDC_%d_CALL_RICH_ERROR": { "code": 500, "name": "INTERDC_%d_CALL_RICH_ERROR", "_paramNames": ["dc"], "description": "A rich error occurred while communicating with DC %d" }, "MEDIA_TTL_INVALID": { "code": 400, "name": "MEDIA_TTL_INVALID" }, "MEMBER_NO_LOCATION": { "code": 500, "name": "MEMBER_NO_LOCATION", "description": "An internal failure occurred while fetching user info (couldn't find location)" }, "MEMBER_OCCUPY_PRIMARY_LOC_FAILED": { "code": 500, "name": "MEMBER_OCCUPY_PRIMARY_LOC_FAILED", "description": "Occupation of primary member location failed" }, "MSGID_DECREASE_RETRY": { "code": 500, "name": "MSGID_DECREASE_RETRY", "description": "The request should be retried with a lower message ID" }, "MT_SEND_QUEUE_TOO_LONG": { "code": 500, "name": "MT_SEND_QUEUE_TOO_LONG" }, "NEED_CHAT_INVALID": { "code": 500, "name": "NEED_CHAT_INVALID", "description": "The provided chat is invalid" }, "NEED_MEMBER_INVALID": { "code": 500, "name": "NEED_MEMBER_INVALID", "description": "The provided member is invalid or does not exist (for example a thumb size)" }, "NETWORK_MIGRATE_%d": { "code": 303, "name": "NETWORK_MIGRATE_%d", "_paramNames": ["new_dc"], "description": "The source IP address is associated with DC %d" }, "NOT_ALLOWED": { "code": 403, "name": "NOT_ALLOWED" }, "PARTICIPANT_CALL_FAILED": { "code": 500, "name": "PARTICIPANT_CALL_FAILED", "description": "Failure while making call" }, "PEER_FLOOD": { "code": 400, "name": "PEER_FLOOD", "description": "Too many requests" }, "PHONE_MIGRATE_%d": { "code": 303, "name": "PHONE_MIGRATE_%d", "_paramNames": ["new_dc"], "description": "The phone number a user is trying to use for authorization is associated with DC %d" }, "POLL_UNSUPPORTED": { "code": 400, "name": "POLL_UNSUPPORTED", "description": "This layer does not support polls in the issued method" }, "POSTPONED_TIMEOUT": { "code": 500, "name": "POSTPONED_TIMEOUT", "description": "The postponed call has timed out" }, "PREMIUM_CURRENTLY_UNAVAILABLE": { "code": 406, "name": "PREMIUM_CURRENTLY_UNAVAILABLE" }, "PTS_CHANGE_EMPTY": { "code": 500, "name": "PTS_CHANGE_EMPTY", "description": "No PTS change" }, "REFLECTOR_NOT_AVAILABLE": { "code": 400, "name": "REFLECTOR_NOT_AVAILABLE", "description": "Invalid call reflector server" }, "REG_ID_GENERATE_FAILED": { "code": 500, "name": "REG_ID_GENERATE_FAILED", "description": "Failure while generating registration ID" }, "REPLY_MARKUP_GAME_EMPTY": { "code": 400, "name": "REPLY_MARKUP_GAME_EMPTY", "description": "The provided reply markup for the game is empty" }, "RPC_CALL_FAIL": { "code": 500, "name": "RPC_CALL_FAIL", "description": "Telegram is having internal issues, please try again later." }, "RPC_MCGET_FAIL": { "code": 500, "name": "RPC_MCGET_FAIL", "description": "Telegram is having internal issues, please try again later." }, "SESSION_EXPIRED": { "code": 401, "name": "SESSION_EXPIRED", "description": "The authorization has expired" }, "SESSION_REVOKED": { "code": 401, "name": "SESSION_REVOKED", "description": "The authorization has been invalidated, because of the user terminating all sessions" }, "SHORTNAME_OCCUPY_FAILED": { "code": 400, "name": "SHORTNAME_OCCUPY_FAILED", "description": "An error occurred when trying to register the short-name used for the sticker pack. Try a different name" }, "STATS_MIGRATE_%d": { "code": 303, "name": "STATS_MIGRATE_%d", "_paramNames": ["dc"], "description": "The channel statistics must be fetched from DC %d" }, "STORAGE_CHECK_FAILED": { "code": 500, "name": "STORAGE_CHECK_FAILED", "description": "Server storage check failed" }, "STORE_INVALID_SCALAR_TYPE": { "code": 500, "name": "STORE_INVALID_SCALAR_TYPE" }, "TAKEOUT_INVALID": { "code": 400, "name": "TAKEOUT_INVALID", "description": "The takeout session has been invalidated by another data export session" }, "TMP_PASSWORD_INVALID": { "code": 400, "name": "TMP_PASSWORD_INVALID", "description": "Password auth needs to be regenerated" }, "TYPE_CONSTRUCTOR_INVALID": { "code": 400, "name": "TYPE_CONSTRUCTOR_INVALID", "description": "The type constructor is invalid" }, "Timedout": { "code": -503, "name": "Timedout", "description": "Timeout while fetching data" }, "UNKNOWN_ERROR": { "code": 400, "name": "UNKNOWN_ERROR" }, "UNKNOWN_METHOD": { "code": 500, "name": "UNKNOWN_METHOD", "description": "The method you tried to call cannot be called on non-CDN DCs" }, "UPDATE_APP_TO_LOGIN": { "code": 406, "name": "UPDATE_APP_TO_LOGIN" }, "USER_DEACTIVATED": { "code": 401, "name": "USER_DEACTIVATED", "description": "The user has been deleted/deactivated" }, "USER_DEACTIVATED_BAN": { "code": 401, "name": "USER_DEACTIVATED_BAN", "description": "The user has been deleted/deactivated" }, "USER_MIGRATE_%d": { "code": 303, "name": "USER_MIGRATE_%d", "_paramNames": ["new_dc"], "description": "The user whose identity is being used to execute queries is associated with DC %d" }, "WORKER_BUSY_TOO_LONG_RETRY": { "code": 500, "name": "WORKER_BUSY_TOO_LONG_RETRY", "description": "Telegram workers are too busy to respond immediately" } }, "throws": { "1817183516": ["INVITE_HASH_EXPIRED"], "account.updateProfile": ["ABOUT_TOO_LONG", "FIRSTNAME_INVALID", "CHAT_WRITE_FORBIDDEN"], "auth.importBotAuthorization": ["ACCESS_TOKEN_EXPIRED", "ACCESS_TOKEN_INVALID", "API_ID_INVALID", "API_ID_PUBLISHED_FLOOD"], "messages.deleteRevokedExportedChatInvites": ["ADMIN_ID_INVALID", "PEER_ID_INVALID"], "messages.getExportedChatInvites": ["ADMIN_ID_INVALID", "CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "PEER_ID_INVALID", "CHAT_WRITE_FORBIDDEN"], "channels.editAdmin": ["ADMIN_RANK_EMOJI_NOT_ALLOWED", "ADMIN_RANK_INVALID", "ADMINS_TOO_MUCH", "BOT_CHANNELS_NA", "BOT_GROUPS_BLOCKED", "BOTS_TOO_MUCH", "CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "FRESH_CHANGE_ADMINS_FORBIDDEN", "INPUT_USER_DEACTIVATED", "PEER_ID_INVALID", "USER_BLOCKED", "USER_CREATOR", "USER_ID_INVALID", "USER_NOT_MUTUAL_CONTACT", "USERS_TOO_MUCH", "CHAT_ADMIN_INVITE_REQUIRED", "CHAT_WRITE_FORBIDDEN", "RIGHT_FORBIDDEN", "USER_CHANNELS_TOO_MUCH", "USER_PRIVACY_RESTRICTED", "USER_RESTRICTED"], "photos.updateProfilePhoto": ["ALBUM_PHOTOS_TOO_MANY", "FILE_PARTS_INVALID", "IMAGE_PROCESS_FAILED", "LOCATION_INVALID", "PHOTO_CROP_SIZE_SMALL", "PHOTO_EXT_INVALID", "PHOTO_ID_INVALID"], "photos.uploadProfilePhoto": ["ALBUM_PHOTOS_TOO_MANY", "EMOJI_MARKUP_INVALID", "FILE_PARTS_INVALID", "IMAGE_PROCESS_FAILED", "PHOTO_CROP_FILE_MISSING", "PHOTO_CROP_SIZE_SMALL", "PHOTO_EXT_INVALID", "PHOTO_FILE_MISSING", "PHOTO_INVALID", "STICKER_MIME_INVALID", "VIDEO_FILE_INVALID"], "auth.exportLoginToken": ["API_ID_INVALID", "API_ID_PUBLISHED_FLOOD"], "auth.importWebTokenAuthorization": ["API_ID_INVALID"], "auth.sendCode": ["API_ID_INVALID", "API_ID_PUBLISHED_FLOOD", "PHONE_NUMBER_APP_SIGNUP_FORBIDDEN", "PHONE_NUMBER_BANNED", "PHONE_NUMBER_FLOOD", "PHONE_NUMBER_INVALID", "PHONE_PASSWORD_PROTECTED", "SMS_CODE_CREATE_FAILED", "PHONE_PASSWORD_FLOOD", "AUTH_RESTART"], "messages.setInlineBotResults": ["ARTICLE_TITLE_EMPTY", "AUDIO_CONTENT_URL_EMPTY", "AUDIO_TITLE_EMPTY", "BUTTON_DATA_INVALID", "BUTTON_TYPE_INVALID", "BUTTON_URL_INVALID", "DOCUMENT_INVALID", "FILE_CONTENT_TYPE_INVALID", "FILE_TITLE_EMPTY", "GIF_CONTENT_TYPE_INVALID", "MESSAGE_EMPTY", "MESSAGE_TOO_LONG", "NEXT_OFFSET_INVALID", "PHOTO_CONTENT_TYPE_INVALID", "PHOTO_CONTENT_URL_EMPTY", "PHOTO_INVALID", "PHOTO_THUMB_URL_EMPTY", "QUERY_ID_INVALID", "REPLY_MARKUP_INVALID", "RESULT_ID_DUPLICATE", "RESULT_ID_INVALID", "RESULT_TYPE_INVALID", "RESULTS_TOO_MUCH", "SEND_MESSAGE_MEDIA_INVALID", "SEND_MESSAGE_TYPE_INVALID", "START_PARAM_EMPTY", "START_PARAM_INVALID", "STICKER_DOCUMENT_INVALID", "SWITCH_PM_TEXT_EMPTY", "URL_INVALID", "USER_BOT_INVALID", "VIDEO_TITLE_EMPTY", "WEBDOCUMENT_INVALID", "WEBDOCUMENT_MIME_INVALID", "WEBDOCUMENT_SIZE_TOO_BIG", "WEBDOCUMENT_URL_INVALID"], "auth.importAuthorization": ["AUTH_BYTES_INVALID", "USER_ID_INVALID"], "invokeWithLayer": ["AUTH_BYTES_INVALID", "CDN_METHOD_INVALID", "CONNECTION_API_ID_INVALID", "INVITE_HASH_EXPIRED", "CHAT_WRITE_FORBIDDEN"], "auth.acceptLoginToken": ["AUTH_TOKEN_ALREADY_ACCEPTED", "AUTH_TOKEN_EXCEPTION", "AUTH_TOKEN_EXPIRED", "AUTH_TOKEN_INVALIDX"], "auth.importLoginToken": ["AUTH_TOKEN_ALREADY_ACCEPTED", "AUTH_TOKEN_EXPIRED", "AUTH_TOKEN_INVALID", "AUTH_TOKEN_INVALIDX"], "account.setGlobalPrivacySettings": ["AUTOARCHIVE_NOT_AVAILABLE"], "payments.getBankCardData": ["BANK_CARD_NUMBER_INVALID"], "messages.editChatDefaultBannedRights": ["BANNED_RIGHTS_INVALID", "CHAT_ADMIN_REQUIRED", "CHAT_NOT_MODIFIED", "PEER_ID_INVALID", "UNTIL_DATE_INVALID", "CHAT_WRITE_FORBIDDEN"], "messages.getBotApp": ["BOT_APP_INVALID"], "bots.setBotCommands": ["BOT_COMMAND_DESCRIPTION_INVALID", "BOT_COMMAND_INVALID", "LANG_CODE_INVALID", "PEER_ID_INVALID", "USER_BOT_REQUIRED", "USER_ID_INVALID"], "messages.editMessage": ["BOT_DOMAIN_INVALID", "BOT_INVALID", "BUTTON_DATA_INVALID", "BUTTON_TYPE_INVALID", "BUTTON_URL_INVALID", "CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "CHAT_FORWARDS_RESTRICTED", "DOCUMENT_INVALID", "ENTITIES_TOO_LONG", "ENTITY_BOUNDS_INVALID", "INPUT_USER_DEACTIVATED", "MEDIA_CAPTION_TOO_LONG", "MEDIA_EMPTY", "MEDIA_GROUPED_INVALID", "MEDIA_NEW_INVALID", "MEDIA_PREV_INVALID", "MESSAGE_EDIT_TIME_EXPIRED", "MESSAGE_EMPTY", "MESSAGE_ID_INVALID", "MESSAGE_NOT_MODIFIED", "MESSAGE_TOO_LONG", "MSG_ID_INVALID", "PEER_ID_INVALID", "REPLY_MARKUP_INVALID", "SCHEDULE_DATE_INVALID", "USER_BANNED_IN_CHANNEL", "CHAT_SEND_GIFS_FORBIDDEN", "CHAT_WRITE_FORBIDDEN", "INLINE_BOT_REQUIRED", "MESSAGE_AUTHOR_REQUIRED"], "messages.sendMessage": ["BOT_DOMAIN_INVALID", "BOT_INVALID", "BUTTON_DATA_INVALID", "BUTTON_TYPE_INVALID", "BUTTON_URL_INVALID", "BUTTON_USER_PRIVACY_RESTRICTED", "CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "CHAT_ID_INVALID", "CHAT_RESTRICTED", "ENCRYPTION_DECLINED", "ENTITIES_TOO_LONG", "ENTITY_BOUNDS_INVALID", "ENTITY_MENTION_USER_INVALID", "FROM_MESSAGE_BOT_DISABLED", "INPUT_USER_DEACTIVATED", "MESSAGE_EMPTY", "MESSAGE_TOO_LONG", "MSG_ID_INVALID", "PEER_ID_INVALID", "PINNED_DIALOGS_TOO_MUCH", "POLL_OPTION_INVALID", "REPLY_MARKUP_INVALID", "REPLY_MARKUP_TOO_LONG", "SCHEDULE_BOT_NOT_ALLOWED", "SCHEDULE_DATE_TOO_LATE", "SCHEDULE_STATUS_PRIVATE", "SCHEDULE_TOO_MUCH", "SEND_AS_PEER_INVALID", "TOPIC_CLOSED", "TOPIC_DELETED", "USER_BANNED_IN_CHANNEL", "USER_IS_BLOCKED", "USER_IS_BOT", "WC_CONVERT_URL_INVALID", "YOU_BLOCKED_USER", "CHAT_GUEST_SEND_FORBIDDEN", "CHAT_SEND_PLAIN_FORBIDDEN", "CHAT_WRITE_FORBIDDEN", "PAYMENT_UNSUPPORTED", "SLOWMODE_WAIT_%d", "RANDOM_ID_DUPLICATE"], "channels.inviteToChannel": ["BOT_GROUPS_BLOCKED", "BOTS_TOO_MUCH", "CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "CHAT_INVALID", "INPUT_USER_DEACTIVATED", "MSG_ID_INVALID", "USER_BANNED_IN_CHANNEL", "USER_BLOCKED", "USER_BOT", "USER_CHANNELS_TOO_MUCH", "USER_ID_INVALID", "USER_KICKED", "USER_NOT_MUTUAL_CONTACT", "USERS_TOO_MUCH", "CHAT_WRITE_FORBIDDEN", "USER_PRIVACY_RESTRICTED"], "messages.addChatUser": ["BOT_GROUPS_BLOCKED", "CHAT_ADMIN_REQUIRED", "CHAT_ID_INVALID", "INPUT_USER_DEACTIVATED", "MSG_ID_INVALID", "PEER_ID_INVALID", "USER_ALREADY_PARTICIPANT", "USER_ID_INVALID", "USER_IS_BLOCKED", "USER_NOT_MUTUAL_CONTACT", "USERS_TOO_MUCH", "YOU_BLOCKED_USER", "CHAT_WRITE_FORBIDDEN", "USER_PRIVACY_RESTRICTED"], "messages.getInlineBotResults": ["BOT_INLINE_DISABLED", "BOT_INVALID", "BOT_RESPONSE_TIMEOUT", "CHANNEL_INVALID", "CHANNEL_PRIVATE", "INPUT_USER_DEACTIVATED", "MSG_ID_INVALID", "Timeout"], "bots.reorderUsernames": ["BOT_INVALID"], "bots.toggleUsername": ["BOT_INVALID"], "messages.getAttachMenuBot": ["BOT_INVALID"], "messages.startBot": ["BOT_INVALID", "CHAT_ADMIN_REQUIRED", "INPUT_USER_DEACTIVATED", "MSG_ID_INVALID", "PEER_ID_INVALID", "START_PARAM_EMPTY", "START_PARAM_INVALID", "START_PARAM_TOO_LONG", "CHAT_WRITE_FORBIDDEN", "RANDOM_ID_DUPLICATE"], "stickers.addStickerToSet": ["BOT_MISSING", "STICKER_PNG_NOPNG", "STICKER_TGS_NOTGS", "STICKERPACK_STICKERS_TOO_MUCH", "STICKERS_TOO_MUCH", "STICKERSET_INVALID"], "stickers.changeSticker": ["BOT_MISSING", "STICKER_INVALID"], "stickers.deleteStickerSet": ["BOT_MISSING", "STICKERSET_INVALID"], "stickers.removeStickerFromSet": ["BOT_MISSING", "STICKER_INVALID"], "messages.updatePinnedMessage": ["BOT_ONESIDE_NOT_AVAIL", "CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "CHAT_NOT_MODIFIED", "MESSAGE_ID_INVALID", "PEER_ID_INVALID", "PIN_RESTRICTED", "USER_BANNED_IN_CHANNEL", "CHAT_WRITE_FORBIDDEN"], "messages.sendMedia": ["BOT_PAYMENTS_DISABLED", "BROADCAST_PUBLIC_VOTERS_FORBIDDEN", "BUTTON_DATA_INVALID", "BUTTON_TYPE_INVALID", "BUTTON_URL_INVALID", "CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "CHAT_FORWARDS_RESTRICTED", "CHAT_RESTRICTED", "CURRENCY_TOTAL_AMOUNT_INVALID", "DOCUMENT_INVALID", "EMOTICON_INVALID", "ENTITY_BOUNDS_INVALID", "EXTERNAL_URL_INVALID", "FILE_PART_LENGTH_INVALID", "FILE_PARTS_INVALID", "FILE_REFERENCE_EMPTY", "FILE_REFERENCE_EXPIRED", "GAME_BOT_INVALID", "IMAGE_PROCESS_FAILED", "INPUT_USER_DEACTIVATED", "MD5_CHECKSUM_INVALID", "MEDIA_CAPTION_TOO_LONG", "MEDIA_EMPTY", "MEDIA_INVALID", "MSG_ID_INVALID", "PAYMENT_PROVIDER_INVALID", "PEER_ID_INVALID", "PHOTO_EXT_INVALID", "PHOTO_INVALID_DIMENSIONS", "PHOTO_SAVE_FILE_INVALID", "POLL_ANSWER_INVALID", "POLL_ANSWERS_INVALID", "POLL_OPTION_DUPLICATE", "POLL_OPTION_INVALID", "POLL_QUESTION_INVALID", "QUIZ_CORRECT_ANSWER_INVALID", "QUIZ_CORRECT_ANSWERS_EMPTY", "QUIZ_CORRECT_ANSWERS_TOO_MUCH", "QUIZ_MULTIPLE_INVALID", "REPLY_MARKUP_BUY_EMPTY", "REPLY_MARKUP_INVALID", "REPLY_MARKUP_TOO_LONG", "SCHEDULE_BOT_NOT_ALLOWED", "SCHEDULE_DATE_TOO_LATE", "SCHEDULE_TOO_MUCH", "SEND_AS_PEER_INVALID", "TOPIC_CLOSED", "TOPIC_DELETED", "TTL_MEDIA_INVALID", "USER_BANNED_IN_CHANNEL", "USER_IS_BLOCKED", "USER_IS_BOT", "VIDEO_CONTENT_TYPE_INVALID", "VOICE_MESSAGES_FORBIDDEN", "WEBDOCUMENT_MIME_INVALID", "WEBPAGE_CURL_FAILED", "WEBPAGE_MEDIA_EMPTY", "YOU_BLOCKED_USER", "CHAT_GUEST_SEND_FORBIDDEN", "CHAT_SEND_AUDIOS_FORBIDDEN", "CHAT_SEND_DOCS_FORBIDDEN", "CHAT_SEND_GIFS_FORBIDDEN", "CHAT_SEND_MEDIA_FORBIDDEN", "CHAT_SEND_PHOTOS_FORBIDDEN", "CHAT_SEND_POLL_FORBIDDEN", "CHAT_SEND_STICKERS_FORBIDDEN", "CHAT_SEND_VIDEOS_FORBIDDEN", "CHAT_SEND_VOICES_FORBIDDEN", "CHAT_WRITE_FORBIDDEN", "PREMIUM_ACCOUNT_REQUIRED", "SLOWMODE_WAIT_%d", "RANDOM_ID_DUPLICATE"], "messages.getBotCallbackAnswer": ["BOT_RESPONSE_TIMEOUT", "CHANNEL_INVALID", "CHANNEL_PRIVATE", "DATA_INVALID", "MESSAGE_ID_INVALID", "PEER_ID_INVALID", "Timeout"], "messages.setGameScore": ["BOT_SCORE_NOT_MODIFIED", "MESSAGE_ID_INVALID", "PEER_ID_INVALID", "SCORE_INVALID", "USER_BOT_REQUIRED"], "channels.setDiscussionGroup": ["BROADCAST_ID_INVALID", "CHANNEL_INVALID", "CHAT_ADMIN_REQUIRED", "LINK_NOT_MODIFIED", "MEGAGROUP_ID_INVALID", "MEGAGROUP_PREHISTORY_HIDDEN", "CHAT_WRITE_FORBIDDEN"], "messages.forwardMessages": ["BROADCAST_PUBLIC_VOTERS_FORBIDDEN", "CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "CHAT_FORWARDS_RESTRICTED", "CHAT_ID_INVALID", "CHAT_RESTRICTED", "GROUPED_MEDIA_INVALID", "INPUT_USER_DEACTIVATED", "MEDIA_EMPTY", "MESSAGE_ID_INVALID", "MESSAGE_IDS_EMPTY", "MSG_ID_INVALID", "PEER_ID_INVALID", "QUIZ_ANSWER_MISSING", "RANDOM_ID_INVALID", "SCHEDULE_DATE_TOO_LATE", "SCHEDULE_TOO_MUCH", "SEND_AS_PEER_INVALID", "SLOWMODE_MULTI_MSGS_DISABLED", "TOPIC_CLOSED", "TOPIC_DELETED", "USER_BANNED_IN_CHANNEL", "USER_IS_BLOCKED", "USER_IS_BOT", "YOU_BLOCKED_USER", "CHAT_SEND_AUDIOS_FORBIDDEN", "CHAT_SEND_GAME_FORBIDDEN", "CHAT_SEND_GIFS_FORBIDDEN", "CHAT_SEND_MEDIA_FORBIDDEN", "CHAT_SEND_PHOTOS_FORBIDDEN", "CHAT_SEND_PLAIN_FORBIDDEN", "CHAT_SEND_POLL_FORBIDDEN", "CHAT_SEND_STICKERS_FORBIDDEN", "CHAT_SEND_VIDEOS_FORBIDDEN", "CHAT_SEND_VOICES_FORBIDDEN", "CHAT_WRITE_FORBIDDEN", "SLOWMODE_WAIT_%d", "RANDOM_ID_DUPLICATE"], "stats.getBroadcastStats": ["BROADCAST_REQUIRED", "CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED"], "messages.editInlineBotMessage": ["BUTTON_DATA_INVALID", "ENTITY_BOUNDS_INVALID", "MESSAGE_ID_INVALID", "MESSAGE_NOT_MODIFIED"], "bots.setBotMenuButton": ["BUTTON_TEXT_INVALID", "BUTTON_URL_INVALID"], "phone.acceptCall": ["CALL_ALREADY_ACCEPTED", "CALL_ALREADY_DECLINED", "CALL_PEER_INVALID", "CALL_PROTOCOL_FLAGS_INVALID", "CALL_OCCUPY_FAILED"], "phone.discardCall": ["CALL_ALREADY_ACCEPTED", "CALL_OCCUPY_FAILED", "CALL_PEER_INVALID"], "phone.confirmCall": ["CALL_ALREADY_DECLINED", "CALL_PEER_INVALID"], "phone.receivedCall": ["CALL_ALREADY_DECLINED", "CALL_PEER_INVALID"], "phone.saveCallDebug": ["CALL_PEER_INVALID", "DATA_JSON_INVALID"], "phone.setCallRating": ["CALL_PEER_INVALID"], "phone.requestCall": ["CALL_PROTOCOL_FLAGS_INVALID", "INPUT_USER_DEACTIVATED", "PARTICIPANT_VERSION_OUTDATED", "USER_ID_INVALID", "USER_IS_BLOCKED", "USER_PRIVACY_RESTRICTED"], "updates.getDifference": ["CDN_METHOD_INVALID", "CHANNEL_INVALID", "CHANNEL_PRIVATE", "DATE_EMPTY", "MSG_ID_INVALID", "PERSISTENT_TIMESTAMP_EMPTY", "PERSISTENT_TIMESTAMP_INVALID", "USER_NOT_PARTICIPANT", "USERNAME_INVALID", "CHAT_WRITE_FORBIDDEN", "RANDOM_ID_DUPLICATE"], "upload.getCdnFileHashes": ["CDN_METHOD_INVALID", "RSA_DECRYPT_FAILED"], "channels.getForumTopics": ["CHANNEL_FORUM_MISSING", "CHANNEL_INVALID"], "channels.convertToGigagroup": ["CHANNEL_ID_INVALID", "CHANNEL_INVALID", "CHAT_ADMIN_REQUIRED", "PARTICIPANTS_TOO_FEW", "CHAT_WRITE_FORBIDDEN"], "account.updateNotifySettings": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "MSG_ID_INVALID", "PEER_ID_INVALID", "SETTINGS_INVALID"], "channels.checkUsername": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHANNELS_ADMIN_PUBLIC_TOO_MUCH", "CHAT_ID_INVALID", "USERNAME_INVALID", "USERNAME_OCCUPIED", "USERNAME_PURCHASE_AVAILABLE"], "channels.createForumTopic": ["CHANNEL_INVALID"], "channels.deleteChannel": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHANNEL_TOO_LARGE", "CHAT_ADMIN_REQUIRED", "CHAT_NOT_MODIFIED", "CHAT_WRITE_FORBIDDEN"], "channels.deleteHistory": ["CHANNEL_INVALID", "CHANNEL_PARICIPANT_MISSING", "CHANNEL_PRIVATE", "CHANNEL_TOO_BIG", "CHAT_ADMIN_REQUIRED"], "channels.deleteMessages": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "MSG_ID_INVALID", "MESSAGE_DELETE_FORBIDDEN"], "channels.deleteParticipantHistory": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "MSG_ID_INVALID", "PARTICIPANT_ID_INVALID", "CHAT_WRITE_FORBIDDEN"], "channels.deleteUserHistory": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "MSG_ID_INVALID", "USER_ID_INVALID", "CHAT_WRITE_FORBIDDEN"], "channels.editAbout": ["CHANNEL_INVALID", "CHAT_ABOUT_NOT_MODIFIED", "CHAT_ABOUT_TOO_LONG", "CHAT_ADMIN_REQUIRED"], "channels.editBanned": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "INPUT_USER_DEACTIVATED", "MSG_ID_INVALID", "PARTICIPANT_ID_INVALID", "PEER_ID_INVALID", "USER_ADMIN_INVALID", "USER_ID_INVALID", "CHAT_WRITE_FORBIDDEN"], "channels.editPhoto": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "CHAT_NOT_MODIFIED", "FILE_PARTS_INVALID", "FILE_REFERENCE_INVALID", "PHOTO_CROP_SIZE_SMALL", "PHOTO_EXT_INVALID", "PHOTO_INVALID", "CHAT_WRITE_FORBIDDEN"], "channels.editTitle": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "CHAT_NOT_MODIFIED", "CHAT_TITLE_EMPTY", "CHAT_WRITE_FORBIDDEN"], "channels.exportInvite": ["CHANNEL_INVALID", "CHAT_ADMIN_REQUIRED", "INVITE_HASH_EXPIRED"], "channels.exportMessageLink": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "MESSAGE_ID_INVALID", "MSG_ID_INVALID"], "channels.getAdminLog": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "MSG_ID_INVALID", "CHAT_WRITE_FORBIDDEN"], "channels.getChannels": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "MSG_ID_INVALID", "USER_BANNED_IN_CHANNEL"], "channels.getFullChannel": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHAT_NOT_MODIFIED", "MSG_ID_INVALID", "CHANNEL_PUBLIC_GROUP_NA"], "channels.getMessages": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "MESSAGE_IDS_EMPTY", "MSG_ID_INVALID", "USER_BANNED_IN_CHANNEL"], "channels.getParticipant": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "MSG_ID_INVALID", "PARTICIPANT_ID_INVALID", "USER_ID_INVALID", "USER_NOT_PARTICIPANT"], "channels.getParticipants": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED"], "channels.getSponsoredMessages": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "MSG_ID_INVALID"], "channels.joinChannel": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHANNELS_TOO_MUCH", "CHAT_INVALID", "INVITE_HASH_EMPTY", "INVITE_HASH_EXPIRED", "INVITE_HASH_INVALID", "INVITE_REQUEST_SENT", "MSG_ID_INVALID", "PEER_ID_INVALID", "USER_ALREADY_PARTICIPANT", "USER_CHANNELS_TOO_MUCH", "USERS_TOO_MUCH"], "channels.leaveChannel": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "MSG_ID_INVALID", "USER_BANNED_IN_CHANNEL", "USER_CREATOR", "USER_NOT_PARTICIPANT", "CHANNEL_PUBLIC_GROUP_NA"], "channels.readHistory": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "MSG_ID_INVALID"], "channels.readMessageContents": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "MSG_ID_INVALID"], "channels.reorderUsernames": ["CHANNEL_INVALID"], "channels.reportSpam": ["CHANNEL_INVALID", "CHAT_ADMIN_REQUIRED", "INPUT_USER_DEACTIVATED", "USER_ID_INVALID"], "channels.setStickers": ["CHANNEL_INVALID", "PARTICIPANTS_TOO_FEW", "STICKERSET_OWNER_ANONYMOUS"], "channels.toggleInvites": ["CHANNEL_INVALID", "CHAT_ADMIN_REQUIRED", "CHAT_NOT_MODIFIED"], "channels.toggleJoinRequest": ["CHANNEL_INVALID", "CHAT_ID_INVALID", "CHAT_NOT_MODIFIED", "CHAT_PUBLIC_REQUIRED"], "channels.toggleJoinToSend": ["CHANNEL_INVALID", "CHAT_ADMIN_REQUIRED", "CHAT_ID_INVALID"], "channels.togglePreHistoryHidden": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "CHAT_ID_INVALID", "CHAT_LINK_EXISTS", "CHAT_NOT_MODIFIED"], "channels.toggleSignatures": ["CHANNEL_INVALID", "CHAT_ADMIN_REQUIRED", "CHAT_ID_INVALID", "CHAT_NOT_MODIFIED"], "channels.toggleSlowMode": ["CHANNEL_INVALID", "CHAT_ADMIN_REQUIRED", "CHAT_NOT_MODIFIED", "SECONDS_INVALID"], "channels.updatePinnedMessage": ["CHANNEL_INVALID", "CHAT_ADMIN_REQUIRED", "CHAT_ID_INVALID", "CHAT_NOT_MODIFIED"], "channels.updateUsername": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHANNELS_ADMIN_PUBLIC_TOO_MUCH", "CHAT_ADMIN_REQUIRED", "CHAT_NOT_MODIFIED", "USERNAME_INVALID", "USERNAME_NOT_MODIFIED", "USERNAME_OCCUPIED", "USERNAME_PURCHASE_AVAILABLE", "CHAT_WRITE_FORBIDDEN"], "channels.viewSponsoredMessage": ["CHANNEL_INVALID"], "messages.editChatAbout": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHAT_ABOUT_NOT_MODIFIED", "CHAT_ABOUT_TOO_LONG", "CHAT_ADMIN_REQUIRED", "CHAT_ID_INVALID", "CHAT_NOT_MODIFIED", "PEER_ID_INVALID", "CHAT_WRITE_FORBIDDEN"], "messages.exportChatInvite": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "CHAT_ID_INVALID", "EXPIRE_DATE_INVALID", "PEER_ID_INVALID", "USAGE_LIMIT_INVALID", "CHAT_WRITE_FORBIDDEN"], "messages.getDiscussionMessage": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "MSG_ID_INVALID", "PEER_ID_INVALID", "TOPIC_ID_INVALID"], "messages.getHistory": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHAT_ID_INVALID", "MSG_ID_INVALID", "PEER_ID_INVALID"], "messages.getMessagesViews": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHAT_ID_INVALID", "MSG_ID_INVALID", "PEER_ID_INVALID"], "messages.getPeerDialogs": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "MSG_ID_INVALID", "PEER_ID_INVALID"], "messages.getPeerSettings": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "MSG_ID_INVALID", "PEER_ID_INVALID"], "messages.getReplies": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "MSG_ID_INVALID", "PEER_ID_INVALID"], "messages.getUnreadMentions": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "MSG_ID_INVALID", "PEER_ID_INVALID"], "messages.importChatInvite": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHANNELS_TOO_MUCH", "CHAT_INVALID", "INVITE_HASH_EMPTY", "INVITE_HASH_EXPIRED", "INVITE_HASH_INVALID", "INVITE_REQUEST_SENT", "MSG_ID_INVALID", "PEER_ID_INVALID", "USER_ALREADY_PARTICIPANT", "USER_CHANNELS_TOO_MUCH", "USERS_TOO_MUCH"], "messages.readMentions": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "MSG_ID_INVALID", "PEER_ID_INVALID"], "messages.search": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "CHAT_ID_INVALID", "FROM_PEER_INVALID", "INPUT_FILTER_INVALID", "INPUT_USER_DEACTIVATED", "MSG_ID_INVALID", "PEER_ID_INVALID", "PEER_ID_NOT_SUPPORTED", "SEARCH_QUERY_EMPTY", "USER_ID_INVALID"], "messages.sendInlineBotResult": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "CHAT_RESTRICTED", "CHAT_SEND_INLINE_FORBIDDEN", "ENTITY_BOUNDS_INVALID", "INLINE_RESULT_EXPIRED", "INPUT_USER_DEACTIVATED", "MEDIA_EMPTY", "MSG_ID_INVALID", "PEER_ID_INVALID", "QUERY_ID_EMPTY", "RESULT_ID_EMPTY", "SCHEDULE_DATE_TOO_LATE", "SCHEDULE_TOO_MUCH", "TOPIC_DELETED", "USER_BANNED_IN_CHANNEL", "VOICE_MESSAGES_FORBIDDEN", "WEBPAGE_CURL_FAILED", "WEBPAGE_MEDIA_EMPTY", "YOU_BLOCKED_USER", "CHAT_GUEST_SEND_FORBIDDEN", "CHAT_SEND_AUDIOS_FORBIDDEN", "CHAT_SEND_GAME_FORBIDDEN", "CHAT_SEND_GIFS_FORBIDDEN", "CHAT_SEND_MEDIA_FORBIDDEN", "CHAT_SEND_PHOTOS_FORBIDDEN", "CHAT_SEND_STICKERS_FORBIDDEN", "CHAT_SEND_VOICES_FORBIDDEN", "CHAT_WRITE_FORBIDDEN", "SLOWMODE_WAIT_%d", "RANDOM_ID_DUPLICATE"], "messages.sendReaction": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "MESSAGE_ID_INVALID", "MESSAGE_NOT_MODIFIED", "MSG_ID_INVALID", "PEER_ID_INVALID", "REACTION_EMPTY", "REACTION_INVALID", "REACTIONS_TOO_MANY", "USER_BANNED_IN_CHANNEL", "CHAT_WRITE_FORBIDDEN", "PREMIUM_ACCOUNT_REQUIRED"], "messages.sendVote": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "MESSAGE_ID_INVALID", "MESSAGE_POLL_CLOSED", "MSG_ID_INVALID", "OPTION_INVALID", "OPTIONS_TOO_MUCH", "PEER_ID_INVALID", "REVOTE_NOT_ALLOWED"], "messages.setTyping": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "CHAT_ID_INVALID", "INPUT_USER_DEACTIVATED", "MSG_ID_INVALID", "PEER_ID_INVALID", "USER_BANNED_IN_CHANNEL", "USER_IS_BLOCKED", "USER_IS_BOT", "CHAT_WRITE_FORBIDDEN", "GROUPCALL_FORBIDDEN"], "messages.uploadMedia": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "CHAT_ID_INVALID", "CHAT_RESTRICTED", "FILE_PARTS_INVALID", "IMAGE_PROCESS_FAILED", "INPUT_USER_DEACTIVATED", "MEDIA_INVALID", "MSG_ID_INVALID", "PEER_ID_INVALID", "PHOTO_EXT_INVALID", "PHOTO_INVALID_DIMENSIONS", "PHOTO_SAVE_FILE_INVALID", "USER_BANNED_IN_CHANNEL", "WEBPAGE_CURL_FAILED", "CHAT_WRITE_FORBIDDEN"], "msg_container": ["CHANNEL_INVALID", "MESSAGE_ID_INVALID", "MSG_ID_INVALID"], "msg_resend_req": ["CHANNEL_INVALID", "Invalid msg_resend_req query", "Invalid msgs_state_req query"], "msgs_state_req": ["CHANNEL_INVALID", "FILE_PART_EMPTY", "MSG_ID_INVALID", "USER_IS_BLOCKED", "Invalid msgs_state_req query"], "stats.getMegagroupStats": ["CHANNEL_INVALID", "CHAT_ADMIN_REQUIRED", "MEGAGROUP_REQUIRED"], "stats.getMessagePublicForwards": ["CHANNEL_INVALID", "CHAT_ADMIN_REQUIRED", "MESSAGE_ID_INVALID", "PEER_ID_INVALID"], "stats.getMessageStats": ["CHANNEL_INVALID", "CHAT_ADMIN_REQUIRED", "MESSAGE_ID_INVALID", "PEER_ID_INVALID"], "updates.getChannelDifference": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "FROM_MESSAGE_BOT_DISABLED", "MSG_ID_INVALID", "PERSISTENT_TIMESTAMP_EMPTY", "PERSISTENT_TIMESTAMP_INVALID", "PINNED_DIALOGS_TOO_MUCH", "RANGES_INVALID", "USER_BANNED_IN_CHANNEL", "CHANNEL_PUBLIC_GROUP_NA", "CHAT_WRITE_FORBIDDEN", "PERSISTENT_TIMESTAMP_OUTDATED"], "upload.getFile": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "FILE_ID_INVALID", "FILE_REFERENCE_EMPTY", "FILE_REFERENCE_EXPIRED", "FILE_REFERENCE_INVALID", "LIMIT_INVALID", "LOCATION_INVALID", "MSG_ID_INVALID", "OFFSET_INVALID", "PEER_ID_INVALID", "FILEREF_UPGRADE_NEEDED"], "users.getUsers": ["CHANNEL_INVALID", "CHANNEL_PRIVATE", "FROM_MESSAGE_BOT_DISABLED", "MSG_ID_INVALID", "USER_BANNED_IN_CHANNEL"], "account.reportPeer": ["CHANNEL_PRIVATE", "PEER_ID_INVALID"], "channels.editCreator": ["CHANNEL_PRIVATE", "CHANNELS_ADMIN_PUBLIC_TOO_MUCH", "CHAT_ADMIN_REQUIRED", "PASSWORD_HASH_INVALID", "PASSWORD_MISSING", "PASSWORD_TOO_FRESH_%d", "SESSION_TOO_FRESH_%d", "SRP_ID_INVALID", "USER_ID_INVALID", "CHAT_WRITE_FORBIDDEN"], "channels.getSendAs": ["CHANNEL_PRIVATE", "CHAT_ID_INVALID", "PEER_ID_INVALID"], "contacts.addContact": ["CHANNEL_PRIVATE", "CONTACT_ID_INVALID", "CONTACT_NAME_EMPTY", "MSG_ID_INVALID"], "contacts.unblock": ["CHANNEL_PRIVATE", "CONTACT_ID_INVALID", "MSG_ID_INVALID", "PEER_ID_INVALID"], "messages.deleteHistory": ["CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "CHAT_ID_INVALID", "CHAT_REVOKE_DATE_UNSUPPORTED", "MAX_DATE_INVALID", "MESSAGE_ID_INVALID", "MIN_DATE_INVALID", "MSG_ID_INVALID", "PEER_ID_INVALID"], "messages.getChatInviteImporters": ["CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "INVITE_HASH_EXPIRED", "PEER_ID_INVALID", "SEARCH_WITH_LINK_NOT_SUPPORTED", "CHAT_WRITE_FORBIDDEN"], "messages.getExportedChatInvite": ["CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "INVITE_HASH_EXPIRED", "PEER_ID_INVALID", "CHAT_WRITE_FORBIDDEN"], "messages.getMessagesReactions": ["CHANNEL_PRIVATE"], "messages.getOnlines": ["CHANNEL_PRIVATE", "CHAT_ID_INVALID", "PEER_ID_INVALID"], "messages.hideAllChatJoinRequests": ["CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "HIDE_REQUESTER_MISSING", "INVITE_HASH_EXPIRED", "PEER_ID_INVALID", "USER_CHANNELS_TOO_MUCH", "CHAT_WRITE_FORBIDDEN"], "messages.readHistory": ["CHANNEL_PRIVATE", "CHAT_ID_INVALID", "MSG_ID_INVALID", "PEER_ID_INVALID"], "messages.report": ["CHANNEL_PRIVATE", "PEER_ID_INVALID"], "messages.reportSpam": ["CHANNEL_PRIVATE", "MSG_ID_INVALID", "PEER_ID_INVALID"], "messages.sendMultiMedia": ["CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "CHAT_FORWARDS_RESTRICTED", "ENTITY_BOUNDS_INVALID", "MEDIA_CAPTION_TOO_LONG", "MEDIA_EMPTY", "MEDIA_INVALID", "MULTI_MEDIA_TOO_LONG", "PEER_ID_INVALID", "RANDOM_ID_EMPTY", "SCHEDULE_DATE_TOO_LATE", "SCHEDULE_TOO_MUCH", "SEND_AS_PEER_INVALID", "TOPIC_DELETED", "USER_BANNED_IN_CHANNEL", "CHAT_SEND_MEDIA_FORBIDDEN", "CHAT_WRITE_FORBIDDEN", "SLOWMODE_WAIT_%d", "RANDOM_ID_DUPLICATE"], "messages.toggleDialogPin": ["CHANNEL_PRIVATE", "PEER_HISTORY_EMPTY", "PEER_ID_INVALID", "PINNED_DIALOGS_TOO_MUCH"], "phone.createGroupCall": ["CHANNEL_PRIVATE", "CHAT_ADMIN_REQUIRED", "CREATE_CALL_FAILED", "PEER_ID_INVALID", "SCHEDULE_DATE_INVALID"], "users.getFullUser": ["CHANNEL_PRIVATE", "MSG_ID_INVALID", "USER_ID_INVALID"], "channels.createChannel": ["CHANNELS_ADMIN_LOCATED_TOO_MUCH", "CHANNELS_TOO_MUCH", "CHAT_ABOUT_TOO_LONG", "CHAT_TITLE_EMPTY", "USER_RESTRICTED"], "channels.getAdminedPublicChannels": ["CHANNELS_ADMIN_LOCATED_TOO_MUCH", "CHANNELS_ADMIN_PUBLIC_TOO_MUCH"], "messages.migrateChat": ["CHANNELS_TOO_MUCH", "CHAT_ADMIN_REQUIRED", "CHAT_ID_INVALID", "PEER_ID_INVALID"], "channels.editLocation": ["CHAT_ADMIN_REQUIRED", "CHAT_NOT_MODIFIED", "MEGAGROUP_REQUIRED"], "messages.checkHistoryImportPeer": ["CHAT_ADMIN_REQUIRED", "PEER_ID_INVALID", "USER_NOT_MUTUAL_CONTACT"], "messages.deleteChat": ["CHAT_ADMIN_REQUIRED", "CHAT_ID_INVALID", "PEER_ID_INVALID"], "messages.deleteChatUser": ["CHAT_ADMIN_REQUIRED", "CHAT_ID_INVALID", "PEER_ID_INVALID", "USER_ID_INVALID", "USER_NOT_PARTICIPANT"], "messages.editExportedChatInvite": ["CHAT_ADMIN_REQUIRED", "CHAT_INVITE_PERMANENT", "INVITE_HASH_EXPIRED", "PEER_ID_INVALID", "CHAT_WRITE_FORBIDDEN", "EDIT_BOT_INVITE_FORBIDDEN"], "messages.getAdminsWithInvites": ["CHAT_ADMIN_REQUIRED", "PEER_ID_INVALID", "CHAT_WRITE_FORBIDDEN"], "messages.getMessageEditData": ["CHAT_ADMIN_REQUIRED", "MESSAGE_ID_INVALID", "PEER_ID_INVALID", "CHAT_WRITE_FORBIDDEN", "MESSAGE_AUTHOR_REQUIRED"], "messages.getScheduledHistory": ["CHAT_ADMIN_REQUIRED", "PEER_ID_INVALID"], "messages.getScheduledMessages": ["CHAT_ADMIN_REQUIRED", "PEER_ID_INVALID"], "messages.hideChatJoinRequest": ["CHAT_ADMIN_REQUIRED", "HIDE_REQUESTER_MISSING", "INPUT_USER_DEACTIVATED", "PEER_ID_INVALID", "USER_ALREADY_PARTICIPANT", "USER_ID_INVALID", "USER_CHANNELS_TOO_MUCH"], "messages.setChatAvailableReactions": ["CHAT_ADMIN_REQUIRED", "CHAT_NOT_MODIFIED", "PEER_ID_INVALID"], "messages.unpinAllMessages": ["CHAT_ADMIN_REQUIRED", "CHAT_NOT_MODIFIED"], "phone.getGroupCallStreamRtmpUrl": ["CHAT_ADMIN_REQUIRED"], "channels.toggleForum": ["CHAT_DISCUSSION_UNALLOWED"], "messages.discardEncryption": ["CHAT_ID_EMPTY", "ENCRYPTION_ALREADY_DECLINED", "ENCRYPTION_ID_INVALID"], "folders.editPeerFolders": ["CHAT_ID_INVALID", "FOLDER_ID_INVALID"], "messages.acceptEncryption": ["CHAT_ID_INVALID", "ENCRYPTION_ALREADY_ACCEPTED", "ENCRYPTION_ALREADY_DECLINED"], "messages.editChatAdmin": ["CHAT_ID_INVALID", "PEER_ID_INVALID", "USER_ID_INVALID", "USER_NOT_PARTICIPANT"], "messages.editChatPhoto": ["CHAT_ID_INVALID", "CHAT_NOT_MODIFIED", "PEER_ID_INVALID", "PHOTO_CROP_SIZE_SMALL", "PHOTO_EXT_INVALID", "PHOTO_INVALID"], "messages.editChatTitle": ["CHAT_ID_INVALID", "CHAT_NOT_MODIFIED", "CHAT_TITLE_EMPTY", "PEER_ID_INVALID"], "messages.forwardMessage": ["CHAT_ID_INVALID", "MESSAGE_ID_INVALID", "PEER_ID_INVALID", "YOU_BLOCKED_USER"], "messages.getChats": ["CHAT_ID_INVALID", "PEER_ID_INVALID"], "messages.getFullChat": ["CHAT_ID_INVALID", "PEER_ID_INVALID"], "messages.reportEncryptedSpam": ["CHAT_ID_INVALID"], "messages.sendEncrypted": ["CHAT_ID_INVALID", "DATA_INVALID", "DATA_TOO_LONG", "ENCRYPTION_DECLINED", "MSG_WAIT_FAILED", "USER_IS_BLOCKED"], "messages.setEncryptedTyping": ["CHAT_ID_INVALID"], "messages.toggleChatAdmins": ["CHAT_ID_INVALID", "CHAT_NOT_MODIFIED"], "messages.updateDialogFilter": ["CHAT_ID_INVALID", "FILTER_ID_INVALID", "FILTER_INCLUDE_EMPTY", "FILTER_TITLE_EMPTY"], "messages.createChat": ["CHAT_INVALID", "CHAT_TITLE_EMPTY", "INPUT_USER_DEACTIVATED", "USERS_TOO_FEW", "USER_RESTRICTED", "CHAT_ID_GENERATE_FAILED"], "messages.setHistoryTTL": ["CHAT_NOT_MODIFIED", "TTL_PERIOD_INVALID"], "messages.toggleNoForwards": ["CHAT_NOT_MODIFIED", "PEER_ID_INVALID"], "messages.getMessageReadParticipants": ["CHAT_TOO_BIG", "MSG_ID_INVALID", "MSG_TOO_OLD", "PEER_ID_INVALID"], "messages.getMessagesReadParticipants": ["CHAT_TOO_BIG", "MESSAGE_ID_INVALID"], "auth.recoverPassword": ["CODE_EMPTY", "NEW_SETTINGS_INVALID"], "account.confirmPhone": ["CODE_HASH_INVALID", "PHONE_CODE_EMPTY"], "account.confirmPasswordEmail": ["CODE_INVALID", "EMAIL_HASH_EXPIRED"], "help.getConfig": ["CONNECTION_API_ID_INVALID", "CONNECTION_APP_VERSION_EMPTY", "CONNECTION_LAYER_INVALID", "DATA_INVALID", "MSG_ID_INVALID", "USERNAME_INVALID", "USER_PRIVACY_RESTRICTED"], "contacts.resolveUsername": ["CONNECTION_LAYER_INVALID", "USERNAME_INVALID", "USERNAME_NOT_OCCUPIED"], "initConnection": ["CONNECTION_LAYER_INVALID"], "contacts.acceptContact": ["CONTACT_ADD_MISSING", "CONTACT_ID_INVALID", "CONTACT_REQ_MISSING", "MSG_ID_INVALID"], "contacts.block": ["CONTACT_ID_INVALID", "INPUT_USER_DEACTIVATED", "MSG_ID_INVALID", "PEER_ID_INVALID"], "contacts.deleteContact": ["CONTACT_ID_INVALID"], "payments.exportInvoice": ["CURRENCY_TOTAL_AMOUNT_INVALID", "INVOICE_PAYLOAD_INVALID", "MEDIA_INVALID", "PAYMENT_PROVIDER_INVALID"], "messages.sendEncryptedService": ["DATA_INVALID", "ENCRYPTION_DECLINED", "ENCRYPTION_ID_INVALID", "MSG_WAIT_FAILED", "USER_IS_BLOCKED", "USER_DELETED"], "bots.answerWebhookJSONQuery": ["DATA_JSON_INVALID", "QUERY_ID_INVALID", "USER_BOT_INVALID"], "bots.sendCustomRequest": ["DATA_JSON_INVALID", "METHOD_INVALID", "USER_BOT_INVALID"], "help.acceptTermsOfService": ["DATA_JSON_INVALID"], "phone.joinGroupCall": ["DATA_JSON_INVALID", "GROUPCALL_INVALID", "GROUPCALL_SSRC_DUPLICATE_MUCH", "JOIN_AS_PEER_INVALID", "GROUPCALL_FORBIDDEN"], "messages.sendEncryptedFile": ["DATA_TOO_LONG", "ENCRYPTION_DECLINED", "FILE_EMTPY", "MD5_CHECKSUM_INVALID", "MSG_WAIT_FAILED"], "auth.exportAuthorization": ["DC_ID_INVALID"], "messages.requestEncryption": ["DH_G_A_INVALID", "INPUT_USER_DEACTIVATED", "USER_ID_INVALID"], "upload.getWebFile": ["DOCUMENT_INVALID", "LOCATION_INVALID"], "account.cancelPasswordEmail": ["EMAIL_HASH_EXPIRED"], "account.resendPasswordEmail": ["EMAIL_HASH_EXPIRED"], "account.sendVerifyEmailCode": ["EMAIL_INVALID", "EMAIL_NOT_SETUP", "PHONE_HASH_EXPIRED", "PHONE_NUMBER_INVALID"], "account.updatePasswordSettings": ["EMAIL_INVALID", "EMAIL_UNCONFIRMED", "EMAIL_UNCONFIRMED_%d", "NEW_SALT_INVALID", "NEW_SETTINGS_EMPTY", "NEW_SETTINGS_INVALID", "PASSWORD_HASH_INVALID", "SRP_ID_INVALID", "SRP_PASSWORD_CHANGED"], "account.verifyEmail": ["EMAIL_INVALID", "EMAIL_VERIFY_EXPIRED"], "messages.setChatTheme": ["EMOJI_INVALID", "EMOJI_NOT_MODIFIED", "PEER_ID_INVALID"], "messages.getStickers": ["EMOTICON_EMPTY"], "messages.searchCustomEmoji": ["EMOTICON_EMPTY"], "messages.getStickerSet": ["EMOTICON_STICKERPACK_MISSING", "STICKERSET_INVALID"], "auth.bindTempAuthKey": ["ENCRYPTED_MESSAGE_INVALID", "TEMP_AUTH_KEY_ALREADY_BOUND", "TEMP_AUTH_KEY_EMPTY"], "msgs_ack": ["ENCRYPTED_MESSAGE_INVALID", "USER_IS_BLOCKED", "Invalid msgs_ack query"], "help.editUserInfo": ["ENTITY_BOUNDS_INVALID", "USER_INVALID"], "messages.getWebPagePreview": ["ENTITY_BOUNDS_INVALID", "MESSAGE_EMPTY"], "messages.saveDraft": ["ENTITY_BOUNDS_INVALID", "MSG_ID_INVALID", "PEER_ID_INVALID"], "messages.setBotPrecheckoutResults": ["ERROR_TEXT_EMPTY"], "contacts.importCard": ["EXPORT_CARD_INVALID"], "upload.saveBigFilePart": ["FILE_PART_EMPTY", "FILE_PART_INVALID", "FILE_PART_SIZE_CHANGED", "FILE_PART_SIZE_INVALID", "FILE_PART_TOO_BIG", "FILE_PARTS_INVALID"], "upload.saveFilePart": ["FILE_PART_EMPTY", "FILE_PART_INVALID", "MSG_ID_INVALID"], "upload.reuploadCdnFile": ["FILE_TOKEN_INVALID", "RSA_DECRYPT_FAILED", "CDN_UPLOAD_TIMEOUT"], "chatlists.deleteExportedInvite": ["FILTER_ID_INVALID"], "chatlists.editExportedInvite": ["FILTER_ID_INVALID"], "chatlists.exportChatlistInvite": ["FILTER_ID_INVALID", "FILTER_NOT_SUPPORTED", "INVITES_TOO_MUCH", "PEERS_LIST_EMPTY"], "messages.getSearchResultsCalendar": ["FILTER_NOT_SUPPORTED"], "messages.searchSentMedia": ["FILTER_NOT_SUPPORTED"], "auth.signUp": ["FIRSTNAME_INVALID", "LASTNAME_INVALID", "PHONE_CODE_EMPTY", "PHONE_CODE_EXPIRED", "PHONE_CODE_INVALID", "PHONE_NUMBER_FLOOD", "PHONE_NUMBER_INVALID", "PHONE_NUMBER_OCCUPIED"], "folders.deleteFolder": ["FOLDER_ID_EMPTY", "FOLDER_ID_INVALID"], "messages.getDialogs": ["FOLDER_ID_INVALID", "OFFSET_PEER_ID_INVALID", "CHAT_WRITE_FORBIDDEN"], "messages.getPinnedDialogs": ["FOLDER_ID_INVALID"], "messages.searchGlobal": ["FOLDER_ID_INVALID", "SEARCH_QUERY_EMPTY"], "contacts.getLocated": ["GEO_POINT_INVALID", "USERPIC_UPLOAD_REQUIRED", "USERPIC_PRIVACY_REQUIRED"], "messages.saveGif": ["GIF_ID_INVALID"], "stats.loadAsyncGraph": ["GRAPH_EXPIRED_RELOAD", "GRAPH_INVALID_RELOAD", "GRAPH_OUTDATED_RELOAD"], "phone.discardGroupCall": ["GROUPCALL_ALREADY_DISCARDED", "GROUPCALL_INVALID", "GROUPCALL_FORBIDDEN"], "phone.discardGroupCallRequest": ["GROUPCALL_ALREADY_DISCARDED"], "phone.editGroupCallParticipant": ["GROUPCALL_FORBIDDEN", "PARTICIPANT_JOIN_MISSING", "USER_VOLUME_INVALID"], "phone.getGroupCall": ["GROUPCALL_INVALID"], "phone.getGroupCallStreamChannels": ["GROUPCALL_INVALID", "GROUPCALL_JOIN_MISSING"], "phone.inviteToGroupCall": ["GROUPCALL_INVALID", "INVITE_FORBIDDEN_WITH_JOINAS", "USER_ALREADY_INVITED", "GROUPCALL_FORBIDDEN"], "phone.checkGroupCall": ["GROUPCALL_JOIN_MISSING"], "phone.toggleGroupCallRecord": ["GROUPCALL_NOT_MODIFIED", "GROUPCALL_FORBIDDEN"], "phone.toggleGroupCallSettings": ["GROUPCALL_NOT_MODIFIED"], "account.changeAuthorizationSettings": ["HASH_INVALID"], "account.resetAuthorization": ["HASH_INVALID", "FRESH_RESET_AUTHORISATION_FORBIDDEN"], "account.resetWebAuthorization": ["HASH_INVALID"], "account.sendConfirmPhoneCode": ["HASH_INVALID"], "messages.initHistoryImport": ["IMPORT_FILE_INVALID", "IMPORT_FORMAT_UNRECOGNIZED", "PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_%dMIN"], "messages.checkHistoryImport": ["IMPORT_FORMAT_UNRECOGNIZED"], "messages.startHistoryImport": ["IMPORT_ID_INVALID"], "contacts.importContactToken": ["IMPORT_TOKEN_INVALID"], "messages.translateText": ["INPUT_TEXT_EMPTY", "MSG_ID_INVALID", "PEER_ID_INVALID", "TO_LANG_INVALID"], "messages.sendScreenshotNotification": ["INPUT_USER_DEACTIVATED", "PEER_ID_INVALID", "YOU_BLOCKED_USER"], "messages.checkChatInvite": ["INVITE_HASH_EMPTY", "INVITE_HASH_EXPIRED", "INVITE_HASH_INVALID", "CHANNEL_PRIVATE"], "messages.deleteExportedChatInvite": ["INVITE_HASH_EXPIRED", "INVITE_REVOKED_MISSING", "PEER_ID_INVALID"], "chatlists.checkChatlistInvite": ["INVITE_SLUG_EMPTY"], "chatlists.joinChatlistInvite": ["INVITE_SLUG_EMPTY"], "phone.saveDefaultGroupCallJoinAs": ["JOIN_AS_PEER_INVALID"], "bots.getBotInfo": ["LANG_CODE_INVALID", "USER_BOT_INVALID"], "bots.resetBotCommands": ["LANG_CODE_INVALID"], "langpack.getLangPack": ["LANG_CODE_NOT_SUPPORTED", "LANG_PACK_INVALID"], "langpack.getLanguage": ["LANG_CODE_NOT_SUPPORTED", "LANG_PACK_INVALID"], "langpack.getStrings": ["LANG_CODE_NOT_SUPPORTED", "LANG_PACK_INVALID"], "langpack.getDifference": ["LANG_PACK_INVALID"], "langpack.getLanguages": ["LANG_PACK_INVALID"], "upload.getFileHashes": ["LOCATION_INVALID"], "photos.getUserPhotos": ["MAX_ID_INVALID", "MSG_ID_INVALID", "USER_ID_INVALID"], "messages.receivedQueue": ["MAX_QTS_INVALID", "MSG_WAIT_FAILED"], "auth.sendInvites": ["MESSAGE_EMPTY"], "messages.deleteMessages": ["MESSAGE_ID_INVALID", "MESSAGE_DELETE_FORBIDDEN"], "messages.getGameHighScores": ["MESSAGE_ID_INVALID", "PEER_ID_INVALID", "USER_BOT_REQUIRED"], "messages.getInlineGameHighScores": ["MESSAGE_ID_INVALID", "USER_BOT_REQUIRED"], "messages.getPollResults": ["MESSAGE_ID_INVALID", "PEER_ID_INVALID"], "messages.sendScheduledMessages": ["MESSAGE_ID_INVALID", "PEER_ID_INVALID"], "messages.setInlineGameScore": ["MESSAGE_ID_INVALID", "USER_BOT_REQUIRED"], "payments.getPaymentForm": ["MESSAGE_ID_INVALID"], "payments.getPaymentReceipt": ["MESSAGE_ID_INVALID"], "payments.sendPaymentForm": ["MESSAGE_ID_INVALID"], "payments.validateRequestedInfo": ["MESSAGE_ID_INVALID"], "messages.setBotCallbackAnswer": ["MESSAGE_TOO_LONG", "QUERY_ID_INVALID", "URL_INVALID", "USER_BOT_REQUIRED"], "messages.searchGifs": ["METHOD_INVALID", "SEARCH_QUERY_EMPTY"], "messages.getCommonChats": ["MSG_ID_INVALID", "USER_ID_INVALID"], "messages.getMessageReactionsList": ["MSG_ID_INVALID", "BROADCAST_FORBIDDEN"], "messages.getPollVotes": ["MSG_ID_INVALID", "BROADCAST_FORBIDDEN", "POLL_VOTE_REQUIRED"], "messages.readDiscussion": ["MSG_ID_INVALID", "PEER_ID_INVALID"], "messages.readEncryptedHistory": ["MSG_WAIT_FAILED"], "account.reorderUsernames": ["ORDER_INVALID"], "stickers.createStickerSet": ["PACK_SHORT_NAME_INVALID", "PACK_SHORT_NAME_OCCUPIED", "PACK_TITLE_INVALID", "PEER_ID_INVALID", "STICKER_EMOJI_INVALID", "STICKER_FILE_INVALID", "STICKER_GIF_DIMENSIONS", "STICKER_PNG_DIMENSIONS", "STICKER_PNG_NOPNG", "STICKER_TGS_NODOC", "STICKER_TGS_NOTGS", "STICKER_THUMB_PNG_NOPNG", "STICKER_THUMB_TGS_NOTGS", "STICKER_VIDEO_BIG", "STICKER_VIDEO_NODOC", "STICKER_VIDEO_NOWEBM", "STICKERS_EMPTY", "USER_ID_INVALID"], "phone.joinGroupCallPresentation": ["PARTICIPANT_JOIN_MISSING"], "channels.toggleParticipantsHidden": ["PARTICIPANTS_TOO_FEW"], "account.resetPassword": ["PASSWORD_EMPTY"], "auth.requestPasswordRecovery": ["PASSWORD_EMPTY", "PASSWORD_RECOVERY_NA"], "account.getPasswordSettings": ["PASSWORD_HASH_INVALID"], "account.getTmpPassword": ["PASSWORD_HASH_INVALID", "TMP_PASSWORD_DISABLED"], "auth.checkPassword": ["PASSWORD_HASH_INVALID", "SRP_ID_INVALID", "SRP_PASSWORD_CHANGED"], "auth.checkRecoveryPassword": ["PASSWORD_RECOVERY_EXPIRED"], "account.saveSecureValue": ["PASSWORD_REQUIRED"], "account.getNotifySettings": ["PEER_ID_INVALID"], "account.reportProfilePhoto": ["PEER_ID_INVALID"], "account.saveAutoSaveSettings": ["PEER_ID_INVALID"], "contacts.resetTopPeerRating": ["PEER_ID_INVALID"], "messages.getSearchCounters": ["PEER_ID_INVALID"], "messages.getStatsURL": ["PEER_ID_INVALID"], "messages.hideReportSpam": ["PEER_ID_INVALID"], "messages.markDialogUnread": ["PEER_ID_INVALID"], "messages.readReactions": ["PEER_ID_INVALID"], "messages.reorderPinnedDialogs": ["PEER_ID_INVALID"], "messages.saveDefaultSendAs": ["PEER_ID_INVALID", "SEND_AS_PEER_INVALID"], "messages.setChatWallPaper": ["PEER_ID_INVALID", "WALLPAPER_INVALID"], "phone.getGroupCallJoinAs": ["PEER_ID_INVALID"], "account.changePhone": ["PHONE_CODE_EMPTY", "PHONE_CODE_EXPIRED", "PHONE_NUMBER_INVALID", "PHONE_NUMBER_OCCUPIED"], "account.verifyPhone": ["PHONE_CODE_EMPTY", "PHONE_CODE_EXPIRED", "PHONE_NUMBER_INVALID"], "auth.resendCode": ["PHONE_CODE_EMPTY", "PHONE_CODE_EXPIRED", "PHONE_CODE_HASH_EMPTY", "PHONE_NUMBER_INVALID", "SEND_CODE_UNAVAILABLE"], "auth.signIn": ["PHONE_CODE_EMPTY", "PHONE_CODE_EXPIRED", "PHONE_CODE_INVALID", "PHONE_NUMBER_INVALID", "PHONE_NUMBER_UNOCCUPIED", "AUTH_RESTART", "SIGN_IN_FAILED"], "auth.cancelCode": ["PHONE_CODE_EXPIRED", "PHONE_NUMBER_INVALID"], "contacts.resolvePhone": ["PHONE_NOT_OCCUPIED"], "account.sendChangePhoneCode": ["PHONE_NUMBER_BANNED", "PHONE_NUMBER_INVALID", "PHONE_NUMBER_OCCUPIED", "FRESH_CHANGE_PHONE_FORBIDDEN"], "auth.checkPhone": ["PHONE_NUMBER_BANNED", "PHONE_NUMBER_INVALID"], "account.sendVerifyPhoneCode": ["PHONE_NUMBER_INVALID"], "auth.requestFirebaseSms": ["PHONE_NUMBER_INVALID"], "auth.resetLoginEmail": ["PHONE_NUMBER_INVALID", "TASK_ALREADY_EXISTS"], "account.getPrivacy": ["PRIVACY_KEY_INVALID"], "account.setPrivacy": ["PRIVACY_KEY_INVALID", "PRIVACY_TOO_LONG", "PRIVACY_VALUE_INVALID"], "account.getAuthorizationForm": ["PUBLIC_KEY_REQUIRED"], "messages.sendWebViewResultMessage": ["QUERY_ID_INVALID"], "messages.setBotShippingResults": ["QUERY_ID_INVALID"], "contacts.search": ["QUERY_TOO_SHORT", "SEARCH_QUERY_EMPTY"], "messages.getDhConfig": ["RANDOM_LENGTH_INVALID"], "messages.setDefaultReaction": ["REACTION_INVALID"], "account.declinePasswordReset": ["RESET_REQUEST_MISSING"], "bots.setBotBroadcastDefaultAdminRights": ["RIGHTS_NOT_MODIFIED"], "bots.setBotGroupDefaultAdminRights": ["RIGHTS_NOT_MODIFIED", "USER_BOT_REQUIRED"], "messages.getDocumentByHash": ["SHA256_HASH_INVALID"], "stickers.checkShortName": ["SHORT_NAME_INVALID", "SHORT_NAME_OCCUPIED"], "messages.faveSticker": ["STICKER_ID_INVALID"], "messages.saveRecentSticker": ["STICKER_ID_INVALID"], "stickers.changeStickerPosition": ["STICKER_INVALID"], "stickers.setStickerSetThumb": ["STICKER_THUMB_PNG_NOPNG", "STICKER_THUMB_TGS_NOTGS", "STICKERSET_INVALID"], "messages.installStickerSet": ["STICKERSET_INVALID"], "messages.uninstallStickerSet": ["STICKERSET_INVALID"], "stickers.renameStickerSet": ["STICKERSET_INVALID"], "contacts.getSaved": ["TAKEOUT_REQUIRED"], "account.uploadTheme": ["THEME_FILE_INVALID"], "account.getTheme": ["THEME_FORMAT_INVALID", "THEME_INVALID"], "account.updateTheme": ["THEME_INVALID"], "account.createTheme": ["THEME_MIME_INVALID", "THEME_TITLE_INVALID"], "stickers.suggestShortName": ["TITLE_INVALID"], "account.registerDevice": ["TOKEN_EMPTY", "TOKEN_INVALID", "TOKEN_TYPE_INVALID", "WEBPUSH_AUTH_INVALID", "WEBPUSH_KEY_INVALID", "WEBPUSH_TOKEN_INVALID"], "account.unregisterDevice": ["TOKEN_INVALID"], "channels.editForumTopic": ["TOPIC_ID_INVALID", "TOPIC_NOT_MODIFIED"], "messages.transcribeAudio": ["TRANSCRIPTION_FAILED", "PREMIUM_ACCOUNT_REQUIRED"], "account.setAccountTTL": ["TTL_DAYS_INVALID"], "account.setAuthorizationTTL": ["TTL_DAYS_INVALID", "FRESH_RESET_AUTHORISATION_FORBIDDEN"], "contacts.getTopPeers": ["TYPES_EMPTY"], "bots.getBotCommands": ["USER_BOT_INVALID"], "bots.setBotInfo": ["USER_BOT_INVALID"], "bots.getBotMenuButton": ["USER_BOT_REQUIRED"], "users.setSecureValueErrors": ["USER_BOT_REQUIRED", "USER_ID_INVALID", "USER_BOT_INVALID"], "photos.uploadContactProfilePhoto": ["USER_ID_INVALID"], "help.getSupportName": ["USER_INVALID"], "help.getUserInfo": ["USER_INVALID"], "-130635115": ["USER_NOT_PARTICIPANT"], "account.checkUsername": ["USERNAME_INVALID", "USERNAME_OCCUPIED", "USERNAME_PURCHASE_AVAILABLE"], "account.toggleUsername": ["USERNAME_INVALID", "USERNAMES_ACTIVE_TOO_MUCH"], "account.updateUsername": ["USERNAME_INVALID", "USERNAME_NOT_MODIFIED", "USERNAME_OCCUPIED", "USERNAME_PURCHASE_AVAILABLE"], "channels.toggleUsername": ["USERNAME_INVALID", "USERNAMES_ACTIVE_TOO_MUCH"], "account.uploadWallPaper": ["WALLPAPER_FILE_INVALID", "WALLPAPER_MIME_INVALID"], "account.getMultiWallPapers": ["WALLPAPER_INVALID"], "account.getWallPaper": ["WALLPAPER_INVALID"], "account.installWallPaper": ["WALLPAPER_INVALID"], "account.saveWallPaper": ["WALLPAPER_INVALID"], "messages.getWebPage": ["WC_CONVERT_URL_INVALID"], "account.updateStatus": ["CHAT_WRITE_FORBIDDEN"], "phone.toggleGroupCallStartSubscription": ["GROUPCALL_ALREADY_STARTED"], "phone.editGroupCallTitle": ["GROUPCALL_FORBIDDEN"], "phone.exportGroupCallInvite": ["PUBLIC_CHANNEL_MISSING"], "account.setContentSettings": ["SENSITIVE_CHANGE_FORBIDDEN"], "account.finishTakeoutSession": ["TAKEOUT_REQUIRED"], "channels.getLeftChannels": ["TAKEOUT_REQUIRED"], "auth.resetAuthorizations": ["FRESH_RESET_AUTHORISATION_FORBIDDEN"], "account.deleteAccount": ["2FA_CONFIRM_WAIT_%d"], "account.initTakeoutSession": ["TAKEOUT_INIT_DELAY_%d"], "req_pq_multi": ["Invalid msgs_state_req query"] }, "userOnly": { "account.acceptAuthorization": 1, "account.cancelPasswordEmail": 1, "account.changeAuthorizationSettings": 1, "account.changePhone": 1, "account.checkUsername": 1, "account.clearRecentEmojiStatuses": 1, "account.confirmPasswordEmail": 1, "account.confirmPhone": 1, "account.createTheme": 1, "account.declinePasswordReset": 1, "account.deleteAccount": 1, "account.deleteAutoSaveExceptions": 1, "account.deleteSecureValue": 1, "account.finishTakeoutSession": 1, "account.getAccountTTL": 1, "account.getAllSecureValues": 1, "account.getAuthorizationForm": 1, "account.getAuthorizations": 1, "account.getAutoDownloadSettings": 1, "account.getAutoSaveSettings": 1, "account.getChatThemes": 1, "account.getContactSignUpNotification": 1, "account.getContentSettings": 1, "account.getDefaultEmojiStatuses": 1, "account.getDefaultGroupPhotoEmojis": 1, "account.getDefaultProfilePhotoEmojis": 1, "account.getGlobalPrivacySettings": 1, "account.getMultiWallPapers": 1, "account.getNotifyExceptions": 1, "account.getNotifySettings": 1, "account.getPassword": 1, "account.getPasswordSettings": 1, "account.getPrivacy": 1, "account.getRecentEmojiStatuses": 1, "account.getSavedRingtones": 1, "account.getSecureValue": 1, "account.getTheme": 1, "account.getThemes": 1, "account.getTmpPassword": 1, "account.getWallPaper": 1, "account.getWallPapers": 1, "account.getWebAuthorizations": 1, "account.initTakeoutSession": 1, "account.installTheme": 1, "account.installWallPaper": 1, "account.registerDevice": 1, "account.reorderUsernames": 1, "account.reportPeer": 1, "account.reportProfilePhoto": 1, "account.resendPasswordEmail": 1, "account.resetAuthorization": 1, "account.resetNotifySettings": 1, "account.resetPassword": 1, "account.resetWallPapers": 1, "account.resetWebAuthorization": 1, "account.resetWebAuthorizations": 1, "account.saveAutoDownloadSettings": 1, "account.saveRingtone": 1, "account.saveSecureValue": 1, "account.saveTheme": 1, "account.saveWallPaper": 1, "account.sendChangePhoneCode": 1, "account.sendConfirmPhoneCode": 1, "account.sendVerifyEmailCode": 1, "account.sendVerifyPhoneCode": 1, "account.setAccountTTL": 1, "account.setAuthorizationTTL": 1, "account.setContactSignUpNotification": 1, "account.setContentSettings": 1, "account.setGlobalPrivacySettings": 1, "account.setPrivacy": 1, "account.toggleUsername": 1, "account.unregisterDevice": 1, "account.updateDeviceLocked": 1, "account.updateEmojiStatus": 1, "account.updateNotifySettings": 1, "account.updatePasswordSettings": 1, "account.updateProfile": 1, "account.updateStatus": 1, "account.updateTheme": 1, "account.updateUsername": 1, "account.uploadRingtone": 1, "account.uploadTheme": 1, "account.uploadWallPaper": 1, "account.verifyEmail": 1, "account.verifyPhone": 1, "auth.acceptLoginToken": 1, "auth.cancelCode": 1, "auth.checkPassword": 1, "auth.checkRecoveryPassword": 1, "auth.exportLoginToken": 1, "auth.importLoginToken": 1, "auth.importWebTokenAuthorization": 1, "auth.recoverPassword": 1, "auth.requestPasswordRecovery": 1, "auth.resendCode": 1, "auth.resetAuthorizations": 1, "auth.resetLoginEmail": 1, "auth.sendCode": 1, "auth.signIn": 1, "auth.signUp": 1, "channels.checkUsername": 1, "channels.convertToGigagroup": 1, "channels.createChannel": 1, "channels.deleteChannel": 1, "channels.deleteHistory": 1, "channels.deleteParticipantHistory": 1, "channels.deleteUserHistory": 1, "channels.editCreator": 1, "channels.editLocation": 1, "channels.exportMessageLink": 1, "channels.getAdminedPublicChannels": 1, "channels.getAdminLog": 1, "channels.getGroupsForDiscussion": 1, "channels.getInactiveChannels": 1, "channels.getLeftChannels": 1, "channels.getSendAs": 1, "channels.getSponsoredMessages": 1, "channels.inviteToChannel": 1, "channels.joinChannel": 1, "channels.readHistory": 1, "channels.readMessageContents": 1, "channels.reportSpam": 1, "channels.setDiscussionGroup": 1, "channels.toggleJoinRequest": 1, "channels.toggleJoinToSend": 1, "channels.togglePreHistoryHidden": 1, "channels.toggleSignatures": 1, "channels.toggleSlowMode": 1, "channels.updateUsername": 1, "channels.viewSponsoredMessage": 1, "chatlists.exportChatlistInvite": 1, "contacts.acceptContact": 1, "contacts.addContact": 1, "contacts.block": 1, "contacts.blockFromReplies": 1, "contacts.deleteByPhones": 1, "contacts.deleteContacts": 1, "contacts.getBlocked": 1, "contacts.getContactIDs": 1, "contacts.getContacts": 1, "contacts.getLocated": 1, "contacts.getSaved": 1, "contacts.getStatuses": 1, "contacts.getTopPeers": 1, "contacts.importContacts": 1, "contacts.resetSaved": 1, "contacts.resetTopPeerRating": 1, "contacts.resolvePhone": 1, "contacts.search": 1, "contacts.toggleTopPeers": 1, "contacts.unblock": 1, "folders.deleteFolder": 1, "folders.editPeerFolders": 1, "help.acceptTermsOfService": 1, "help.dismissSuggestion": 1, "help.editUserInfo": 1, "help.getAppChangelog": 1, "help.getAppConfig": 1, "help.getAppUpdate": 1, "help.getCountriesList": 1, "help.getDeepLinkInfo": 1, "help.getInviteText": 1, "help.getNearestDc": 1, "help.getPassportConfig": 1, "help.getPremiumPromo": 1, "help.getPromoData": 1, "help.getProxyData": 1, "help.getRecentMeUrls": 1, "help.getSupport": 1, "help.getSupportName": 1, "help.getTermsOfServiceUpdate": 1, "help.getUserInfo": 1, "help.hidePromoData": 1, "help.saveAppLog": 1, "langpack.getDifference": 1, "langpack.getLangPack": 1, "langpack.getLanguage": 1, "langpack.getLanguages": 1, "langpack.getStrings": 1, "messages.acceptEncryption": 1, "messages.acceptUrlAuth": 1, "messages.addChatUser": 1, "messages.checkChatInvite": 1, "messages.checkHistoryImport": 1, "messages.checkHistoryImportPeer": 1, "messages.clearAllDrafts": 1, "messages.clearRecentReactions": 1, "messages.clearRecentStickers": 1, "messages.createChat": 1, "messages.deleteChat": 1, "messages.deleteExportedChatInvite": 1, "messages.deleteHistory": 1, "messages.deletePhoneCallHistory": 1, "messages.deleteRevokedExportedChatInvites": 1, "messages.deleteScheduledMessages": 1, "messages.discardEncryption": 1, "messages.editChatAdmin": 1, "messages.faveSticker": 1, "messages.getAdminsWithInvites": 1, "messages.getAllChats": 1, "messages.getAllDrafts": 1, "messages.getAllStickers": 1, "messages.getArchivedStickers": 1, "messages.getAttachedStickers": 1, "messages.getAttachMenuBot": 1, "messages.getAttachMenuBots": 1, "messages.getAvailableReactions": 1, "messages.getBotCallbackAnswer": 1, "messages.getChatInviteImporters": 1, "messages.getCommonChats": 1, "messages.getDhConfig": 1, "messages.getDialogFilters": 1, "messages.getDialogs": 1, "messages.getDialogUnreadMarks": 1, "messages.getDiscussionMessage": 1, "messages.getEmojiKeywords": 1, "messages.getEmojiKeywordsDifference": 1, "messages.getEmojiKeywordsLanguages": 1, "messages.getEmojiStickers": 1, "messages.getEmojiURL": 1, "messages.getExportedChatInvite": 1, "messages.getExportedChatInvites": 1, "messages.getExtendedMedia": 1, "messages.getFavedStickers": 1, "messages.getFeaturedEmojiStickers": 1, "messages.getFeaturedStickers": 1, "messages.getHistory": 1, "messages.getInlineBotResults": 1, "messages.getMaskStickers": 1, "messages.getMessageEditData": 1, "messages.getMessageReactionsList": 1, "messages.getMessageReadParticipants": 1, "messages.getMessagesReactions": 1, "messages.getMessagesViews": 1, "messages.getOldFeaturedStickers": 1, "messages.getOnlines": 1, "messages.getPeerDialogs": 1, "messages.getPeerSettings": 1, "messages.getPinnedDialogs": 1, "messages.getPollResults": 1, "messages.getPollVotes": 1, "messages.getRecentLocations": 1, "messages.getRecentReactions": 1, "messages.getRecentStickers": 1, "messages.getReplies": 1, "messages.getSavedGifs": 1, "messages.getScheduledHistory": 1, "messages.getScheduledMessages": 1, "messages.getSearchCounters": 1, "messages.getSearchResultsCalendar": 1, "messages.getSearchResultsPositions": 1, "messages.getSplitRanges": 1, "messages.getStatsURL": 1, "messages.getStickers": 1, "messages.getSuggestedDialogFilters": 1, "messages.getTopReactions": 1, "messages.getUnreadMentions": 1, "messages.getUnreadReactions": 1, "messages.getWebPage": 1, "messages.getWebPagePreview": 1, "messages.hideAllChatJoinRequests": 1, "messages.hidePeerSettingsBar": 1, "messages.importChatInvite": 1, "messages.initHistoryImport": 1, "messages.installStickerSet": 1, "messages.markDialogUnread": 1, "messages.migrateChat": 1, "messages.prolongWebView": 1, "messages.rateTranscribedAudio": 1, "messages.readDiscussion": 1, "messages.readEncryptedHistory": 1, "messages.readFeaturedStickers": 1, "messages.readHistory": 1, "messages.readMentions": 1, "messages.readMessageContents": 1, "messages.readReactions": 1, "messages.receivedMessages": 1, "messages.receivedQueue": 1, "messages.reorderPinnedDialogs": 1, "messages.reorderStickerSets": 1, "messages.report": 1, "messages.reportEncryptedSpam": 1, "messages.reportReaction": 1, "messages.reportSpam": 1, "messages.requestEncryption": 1, "messages.requestSimpleWebView": 1, "messages.requestUrlAuth": 1, "messages.requestWebView": 1, "messages.saveDefaultSendAs": 1, "messages.saveDraft": 1, "messages.saveGif": 1, "messages.saveRecentSticker": 1, "messages.search": 1, "messages.searchGifs": 1, "messages.searchGlobal": 1, "messages.searchSentMedia": 1, "messages.searchStickerSets": 1, "messages.sendEncrypted": 1, "messages.sendEncryptedFile": 1, "messages.sendEncryptedService": 1, "messages.sendInlineBotResult": 1, "messages.sendReaction": 1, "messages.sendScheduledMessages": 1, "messages.sendScreenshotNotification": 1, "messages.sendVote": 1, "messages.sendWebViewData": 1, "messages.setChatAvailableReactions": 1, "messages.setChatTheme": 1, "messages.setDefaultReaction": 1, "messages.setEncryptedTyping": 1, "messages.setHistoryTTL": 1, "messages.startBot": 1, "messages.startHistoryImport": 1, "messages.toggleBotInAttachMenu": 1, "messages.toggleDialogPin": 1, "messages.toggleNoForwards": 1, "messages.toggleStickerSets": 1, "messages.transcribeAudio": 1, "messages.translateText": 1, "messages.uninstallStickerSet": 1, "messages.updateDialogFilter": 1, "messages.updateDialogFiltersOrder": 1, "messages.uploadEncryptedFile": 1, "messages.uploadImportedMedia": 1, "msg_container": 1, "msgs_ack": 1, "payments.assignAppStoreTransaction": 1, "payments.assignPlayMarketTransaction": 1, "payments.canPurchasePremium": 1, "payments.clearSavedInfo": 1, "payments.getBankCardData": 1, "payments.getPaymentForm": 1, "payments.getPaymentReceipt": 1, "payments.getSavedInfo": 1, "payments.requestRecurringPayment": 1, "payments.sendPaymentForm": 1, "payments.validateRequestedInfo": 1, "phone.acceptCall": 1, "phone.checkGroupCall": 1, "phone.confirmCall": 1, "phone.createGroupCall": 1, "phone.discardCall": 1, "phone.discardGroupCall": 1, "phone.editGroupCallParticipant": 1, "phone.editGroupCallTitle": 1, "phone.exportGroupCallInvite": 1, "phone.getCallConfig": 1, "phone.getGroupCall": 1, "phone.getGroupCallJoinAs": 1, "phone.getGroupCallStreamChannels": 1, "phone.getGroupCallStreamRtmpUrl": 1, "phone.getGroupParticipants": 1, "phone.inviteToGroupCall": 1, "phone.joinGroupCall": 1, "phone.joinGroupCallPresentation": 1, "phone.leaveGroupCall": 1, "phone.leaveGroupCallPresentation": 1, "phone.receivedCall": 1, "phone.requestCall": 1, "phone.saveCallDebug": 1, "phone.saveCallLog": 1, "phone.saveDefaultGroupCallJoinAs": 1, "phone.sendSignalingData": 1, "phone.setCallRating": 1, "phone.startScheduledGroupCall": 1, "phone.toggleGroupCallRecord": 1, "phone.toggleGroupCallSettings": 1, "phone.toggleGroupCallStartSubscription": 1, "photos.deletePhotos": 1, "stats.getBroadcastStats": 1, "stats.getMegagroupStats": 1, "stats.getMessagePublicForwards": 1, "stats.getMessageStats": 1, "stats.loadAsyncGraph": 1, "stickers.checkShortName": 1, "stickers.suggestShortName": 1, "upload.getCdnFile": 1, "upload.getWebFile": 1 }, "botOnly": { "bots.answerWebhookJSONQuery": 1, "bots.getBotCommands": 1, "bots.sendCustomRequest": 1, "messages.setInlineBotResults": 1, "users.setSecureValueErrors": 1, "bots.getBotMenuButton": 1, "bots.setBotCommands": 1, "bots.setBotGroupDefaultAdminRights": 1, "messages.getGameHighScores": 1, "messages.getInlineGameHighScores": 1, "messages.setBotCallbackAnswer": 1, "messages.setGameScore": 1, "messages.setInlineGameScore": 1 } } diff --git a/packages/tl/scripts/constants.ts b/packages/tl/scripts/constants.ts index ab32daff..66164b6b 100644 --- a/packages/tl/scripts/constants.ts +++ b/packages/tl/scripts/constants.ts @@ -1,24 +1,24 @@ -import { join } from 'path' -import * as url from 'url' +import { join } from 'node:path' +import * as url from 'node:url' -export const __dirname = url.fileURLToPath(new URL('.', import.meta.url)) +export const __dirname: string = url.fileURLToPath(new URL('.', import.meta.url)) -export const DOC_CACHE_FILE = join(__dirname, '../data/documentation.cache.json') -export const DESCRIPTIONS_YAML_FILE = join(__dirname, '../data/descriptions.yaml') -export const API_SCHEMA_JSON_FILE = join(__dirname, '../api-schema.json') -export const API_SCHEMA_DIFF_JSON_FILE = join(__dirname, '../diff.json') -export const MTP_SCHEMA_JSON_FILE = join(__dirname, '../mtp-schema.json') -export const ERRORS_JSON_FILE = join(__dirname, '../raw-errors.json') -export const APP_CONFIG_JSON_FILE = join(__dirname, '../app-config.json') +export const DOC_CACHE_FILE: string = join(__dirname, '../data/documentation.cache.json') +export const DESCRIPTIONS_YAML_FILE: string = join(__dirname, '../data/descriptions.yaml') +export const API_SCHEMA_JSON_FILE: string = join(__dirname, '../api-schema.json') +export const API_SCHEMA_DIFF_JSON_FILE: string = join(__dirname, '../diff.json') +export const MTP_SCHEMA_JSON_FILE: string = join(__dirname, '../mtp-schema.json') +export const ERRORS_JSON_FILE: string = join(__dirname, '../raw-errors.json') +export const APP_CONFIG_JSON_FILE: string = join(__dirname, '../app-config.json') export const CORE_DOMAIN = 'https://core.telegram.org' export const COREFORK_DOMAIN = 'https://corefork.telegram.org' export const BLOGFORK_DOMAIN = 'https://blogfork.telegram.org' -export const TDESKTOP_SCHEMA = - 'https://raw.githubusercontent.com/telegramdesktop/tdesktop/dev/Telegram/SourceFiles/mtproto/scheme/api.tl' -export const TDESKTOP_LAYER = - 'https://raw.githubusercontent.com/telegramdesktop/tdesktop/dev/Telegram/SourceFiles/mtproto/scheme/layer.tl' +export const TDESKTOP_SCHEMA + = 'https://raw.githubusercontent.com/telegramdesktop/tdesktop/dev/Telegram/SourceFiles/mtproto/scheme/api.tl' +export const TDESKTOP_LAYER + = 'https://raw.githubusercontent.com/telegramdesktop/tdesktop/dev/Telegram/SourceFiles/mtproto/scheme/layer.tl' export const TDLIB_SCHEMA = 'https://raw.githubusercontent.com/tdlib/td/master/td/generate/scheme/telegram_api.tl' export const WEBK_SCHEMA = 'https://raw.githubusercontent.com/morethanwords/tweb/master/src/scripts/in/schema.json' export const WEBA_SCHEMA = 'https://raw.githubusercontent.com/Ajaxy/telegram-tt/master/src/lib/gramjs/tl/static/api.tl' diff --git a/packages/tl/scripts/documentation.ts b/packages/tl/scripts/documentation.ts index 8c123baf..cbe09922 100644 --- a/packages/tl/scripts/documentation.ts +++ b/packages/tl/scripts/documentation.ts @@ -1,31 +1,34 @@ +import { readFile, writeFile } from 'node:fs/promises' +import { fileURLToPath } from 'node:url' +import { createInterface } from 'node:readline' + import * as cheerio from 'cheerio' import { asyncPoolCallback } from 'eager-async-pool' -import { readFile, writeFile } from 'fs/promises' import jsYaml from 'js-yaml' -import { fileURLToPath } from 'node:url' -import { createInterface } from 'readline' - -import { - camelToPascal, - jsComment, - PRIMITIVE_TO_TS, - snakeToCamel, - splitNameToNamespace, +import type { TlEntry, TlFullSchema, } from '@mtcute/tl-utils' +import { + PRIMITIVE_TO_TS, + camelToPascal, + jsComment, + snakeToCamel, + splitNameToNamespace, +} from '@mtcute/tl-utils' import { API_SCHEMA_JSON_FILE, APP_CONFIG_JSON_FILE, BLOGFORK_DOMAIN, - CORE_DOMAIN, COREFORK_DOMAIN, + CORE_DOMAIN, DESCRIPTIONS_YAML_FILE, DOC_CACHE_FILE, } from './constants.js' import { applyDescriptionsYamlFile } from './process-descriptions-yaml.js' -import { packTlSchema, TlPackedSchema, unpackTlSchema } from './schema.js' +import type { TlPackedSchema } from './schema.js' +import { packTlSchema, unpackTlSchema } from './schema.js' import { fetchRetry } from './utils.js' export interface CachedDocumentationEntry { @@ -68,12 +71,12 @@ function normalizeLinks(url: string, el: cheerio.Cheerio): void let q = camelToPascal(snakeToCamel(n)) if (type === 'method' || type === 'constructor') { - q = 'Raw' + q + (type === 'method' ? 'Request' : '') + q = `Raw${q}${type === 'method' ? 'Request' : ''}` } else { - q = 'Type' + q + q = `Type${q}` } - const fullName = ns ? ns + '.' + q : q + const fullName = ns ? `${ns}.${q}` : q it.replaceWith(`{@link ${fullName}}`) } @@ -94,7 +97,7 @@ function extractDescription($: cheerio.CheerioAPI) { .prevAll('p') .get() .reverse() - .map((el) => $(el).html()?.trim()) + .map(el => $(el).html()?.trim()) .filter(Boolean) .join('\n\n') .trim() @@ -103,7 +106,7 @@ function extractDescription($: cheerio.CheerioAPI) { function htmlAll($: cheerio.CheerioAPI, search: cheerio.Cheerio) { return search .get() - .map((el) => $(el).html() ?? '') + .map(el => $(el).html() ?? '') .join('') } @@ -125,7 +128,7 @@ async function chooseDomainForDocs(headers: Record): Promise<[nu throw new Error(`Failed to parse layer from ${domain}`) } - const actualLayer = parseInt(layerMatch[1]) + const actualLayer = Number.parseInt(layerMatch[1]) if (actualLayer > maxLayer) { maxLayer = actualLayer @@ -162,8 +165,8 @@ function lastParensGroup(text: string): string | undefined { async function fetchAppConfigDocumentation() { const headers = { 'User-Agent': - 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) ' + - 'Chrome/87.0.4280.88 Safari/537.36', + 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) ' + + 'Chrome/87.0.4280.88 Safari/537.36', } const [, domain] = await chooseDomainForDocs(headers) @@ -185,13 +188,13 @@ async function fetchAppConfigDocumentation() { if (value === null) return 'null' if (Array.isArray(value)) { - const types = new Set(value.map((v) => typeof v)) + const types = new Set(value.map(v => typeof v)) if (types.size === 1) { - return valueToTypescript(value[0]) + '[]' + return `${valueToTypescript(value[0])}[]` } - return `(${value.map((v) => valueToTypescript(v)).join(' | ')})[]` + return `(${value.map(v => valueToTypescript(v)).join(' | ')})[]` } if (typeof value === 'object') { @@ -202,11 +205,11 @@ async function fetchAppConfigDocumentation() { } return ( - '{\n' + + `{\n${ Object.entries(value) .map(([k, v]) => ` ${k}: ${valueToTypescript(v)}`) - .join('\n') + - '\n}' + .join('\n') + }\n}` ) } @@ -220,8 +223,8 @@ async function fetchAppConfigDocumentation() { return docsTypeToTypescript(field, m[1]) } - if ((m = type.match(/^(?:array of )(.+?)s?$/i))) { - return docsTypeToTypescript(field, m[1]) + '[]' + if ((m = type.match(/^array of (.+?)s?$/i))) { + return `${docsTypeToTypescript(field, m[1])}[]` } switch (type) { @@ -249,7 +252,7 @@ async function fetchAppConfigDocumentation() { if (type.includes('or')) { const options = type.slice(8).split(/, | or /) - return options.map((o) => (o[0] === '"' ? o : JSON.stringify(o))).join(' | ') + return options.map(o => (o[0] === '"' ? o : JSON.stringify(o))).join(' | ') } return 'string' @@ -301,13 +304,13 @@ async function fetchAppConfigDocumentation() { export async function fetchDocumentation( schema: TlFullSchema, layer: number, - silent = !process.stdout.isTTY, + silent: boolean = !process.stdout.isTTY, ): Promise { const headers = { - cookie: `stel_dev_layer=${layer}`, + 'cookie': `stel_dev_layer=${layer}`, 'User-Agent': - 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) ' + - 'Chrome/87.0.4280.88 Safari/537.36', + 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) ' + + 'Chrome/87.0.4280.88 Safari/537.36', } const [actualLayer, domain] = await chooseDomainForDocs(headers) @@ -330,7 +333,7 @@ export async function fetchDocumentation( prevSize = str.length while (str.length < oldPrevSize) str += ' ' - process.stdout.write('\r' + PROGRESS_CHARS[logPos] + ' ' + str) + process.stdout.write(`\r${PROGRESS_CHARS[logPos]} ${str}`) logPos = (logPos + 1) % PROGRESS_CHARS.length } @@ -381,7 +384,7 @@ export async function fetchDocumentation( const cols = el.find('td') if (!cols.length) return // - const code = parseInt($(cols[0]).text()) + const code = Number.parseInt($(cols[0]).text()) const name = $(cols[1]).text() const comment = $(cols[2]).text() @@ -392,8 +395,8 @@ export async function fetchDocumentation( }) const botsCanUse = Boolean($('#bots-can-use-this-method').length) - const onlyBotsCanUse = - botsCanUse && (Boolean(description.match(/[,;]( for)? bots only$/)) || userBotRequired) + const onlyBotsCanUse + = botsCanUse && (Boolean(description.match(/[,;]( for)? bots only$/)) || userBotRequired) if (onlyBotsCanUse) { retClass.available = 'bot' @@ -470,7 +473,7 @@ export async function fetchDocumentation( return ret } -export function applyDocumentation(schema: TlFullSchema, docs: CachedDocumentation) { +export function applyDocumentation(schema: TlFullSchema, docs: CachedDocumentation): void { for (let i = 0; i < 2; i++) { const kind = i === 0 ? 'classes' : 'methods' @@ -529,7 +532,7 @@ async function main() { input: process.stdin, output: process.stdout, }) - const input = (q: string): Promise => new Promise((res) => rl.question(q, res)) + const input = (q: string): Promise => new Promise(res => rl.question(q, res)) while (true) { console.log('Choose action:') @@ -539,9 +542,9 @@ async function main() { console.log('3. Apply documentation to schema') console.log('4. Fetch app config documentation') - const act = parseInt(await input('[0-4] > ')) + const act = Number.parseInt(await input('[0-4] > ')) - if (isNaN(act) || act < 0 || act > 4) { + if (Number.isNaN(act) || act < 0 || act > 4) { console.log('Invalid action') continue } diff --git a/packages/tl/scripts/fetch-api.ts b/packages/tl/scripts/fetch-api.ts index e27c32b6..180ded07 100644 --- a/packages/tl/scripts/fetch-api.ts +++ b/packages/tl/scripts/fetch-api.ts @@ -4,40 +4,43 @@ // // Conflicts merging is interactive, so we can't put this in CI -import * as cheerio from 'cheerio' -import { readFile, writeFile } from 'fs/promises' -import { join } from 'path' -import * as readline from 'readline' +import { readFile, writeFile } from 'node:fs/promises' +import { join } from 'node:path' +import * as readline from 'node:readline' +import * as cheerio from 'cheerio' import { hasPresentKey, isPresent } from '@mtcute/core/utils.js' +import type { + TlEntry, + TlFullSchema, +} from '@mtcute/tl-utils' import { generateTlSchemasDifference, mergeTlEntries, mergeTlSchemas, parseFullTlSchema, parseTlToEntries, - TlEntry, - TlFullSchema, writeTlEntryToString, } from '@mtcute/tl-utils' import { parseTlEntriesFromJson } from '@mtcute/tl-utils/json.js' import { - __dirname, API_SCHEMA_DIFF_JSON_FILE, API_SCHEMA_JSON_FILE, BLOGFORK_DOMAIN, - CORE_DOMAIN, COREFORK_DOMAIN, + CORE_DOMAIN, TDESKTOP_LAYER, TDESKTOP_SCHEMA, TDLIB_SCHEMA, WEBA_LAYER, WEBA_SCHEMA, WEBK_SCHEMA, + __dirname, } from './constants.js' import { applyDocumentation, fetchDocumentation, getCachedDocumentation } from './documentation.js' -import { packTlSchema, TlPackedSchema, unpackTlSchema } from './schema.js' +import type { TlPackedSchema } from './schema.js' +import { packTlSchema, unpackTlSchema } from './schema.js' import { fetchRetry } from './utils.js' const README_MD_FILE = join(__dirname, '../README.md') @@ -60,7 +63,7 @@ interface Schema { async function fetchTdlibSchema(): Promise { const schema = await fetchRetry(TDLIB_SCHEMA) const versionHtml = await fetch('https://raw.githubusercontent.com/tdlib/td/master/td/telegram/Version.h').then( - (i) => i.text(), + i => i.text(), ) const layer = versionHtml.match(/^constexpr int32 MTPROTO_LAYER = (\d+)/m) @@ -68,7 +71,7 @@ async function fetchTdlibSchema(): Promise { return { name: 'TDLib', - layer: parseInt(layer[1]), + layer: Number.parseInt(layer[1]), content: tlToFullSchema(schema), } } @@ -81,7 +84,7 @@ async function fetchTdesktopSchema(): Promise { return { name: 'TDesktop', - layer: parseInt(layer[1]), + layer: Number.parseInt(layer[1]), content: tlToFullSchema(schema), } } @@ -100,7 +103,7 @@ async function fetchCoreSchema(domain = CORE_DOMAIN, name = 'Core'): Promise { entries = entries.filter((it) => { if (it.kind === 'method') { // json schema doesn't provide info about generics, remove these - return !it.arguments.some((arg) => arg.type === '!X') && it.type !== 'X' + return !it.arguments.some(arg => arg.type === '!X') && it.type !== 'X' } return true @@ -138,13 +141,13 @@ async function fetchWebaSchema(): Promise { return { name: 'WebA', - layer: parseInt(version[1]), + layer: Number.parseInt(version[1]), content: tlToFullSchema(schema), } } function input(rl: readline.Interface, q: string): Promise { - return new Promise((resolve) => rl.question(q, resolve)) + return new Promise(resolve => rl.question(q, resolve)) } interface ConflictOption { @@ -167,7 +170,7 @@ async function updateReadme(currentLayer: number) { async function updatePackageVersion(rl: readline.Interface, currentLayer: number) { const packageJson = JSON.parse(await readFile(PACKAGE_JSON_FILE, 'utf8')) as { version: string } const version = packageJson.version - let [major, minor] = version.split('.').map((i) => parseInt(i)) + let [major, minor] = version.split('.').map(i => Number.parseInt(i)) if (major === currentLayer) { console.log('Current version: %s. Bump minor version?', version) @@ -202,7 +205,7 @@ async function overrideInt53(schema: TlFullSchema): Promise { if (!overrides) return overrides.forEach((argName) => { - const arg = entry.arguments.find((it) => it.name === argName) + const arg = entry.arguments.find(it => it.name === argName) if (!arg) { console.log(`[warn] Cannot override ${entry.name}#${argName}: argument does not exist`) @@ -232,7 +235,7 @@ async function main() { fetchCoreSchema(BLOGFORK_DOMAIN, 'Blogfork'), fetchWebkSchema(), fetchWebaSchema(), - readFile(join(__dirname, '../data/custom.tl'), 'utf8').then((tl) => ({ + readFile(join(__dirname, '../data/custom.tl'), 'utf8').then(tl => ({ name: 'Custom', layer: 0, // handled manually content: tlToFullSchema(tl), @@ -240,11 +243,11 @@ async function main() { ]) console.log('Available schemas:') - schemas.forEach((schema) => + schemas.forEach(schema => console.log(' - %s (layer %d): %d entries', schema.name, schema.layer, schema.content.entries.length), ) - const resultLayer = Math.max(...schemas.map((it) => it.layer)) + const resultLayer = Math.max(...schemas.map(it => it.layer)) console.log(`Final schema will be on layer ${resultLayer}. Merging...`) const rl = readline.createInterface({ @@ -253,7 +256,7 @@ async function main() { }) const resultSchema = await mergeTlSchemas( - schemas.map((it) => it.content), + schemas.map(it => it.content), async (_options) => { const options: ConflictOption[] = _options.map((it, idx) => ({ schema: schemas[idx], @@ -270,7 +273,7 @@ async function main() { chooseOptions = options } else { // first of all, prefer entries from the latest layer - let fromLastSchema = options.filter((opt) => opt.entry && opt.schema.layer === resultLayer) + let fromLastSchema = options.filter(opt => opt.entry && opt.schema.layer === resultLayer) // if there is only one schema on the latest layer, we can simply return it if (fromLastSchema.length === 1) return fromLastSchema[0].entry @@ -278,7 +281,7 @@ async function main() { // the conflict was earlier, and now this entry is removed altogether. // keep it just in case for now, as it may still be referenced somewhere if (fromLastSchema.length === 0) { - fromLastSchema = options.sort((a, b) => b.schema.layer - a.schema.layer).filter((opt) => opt.entry) + fromLastSchema = options.sort((a, b) => b.schema.layer - a.schema.layer).filter(opt => opt.entry) // only keep the latest item fromLastSchema = [fromLastSchema[0]] } @@ -286,12 +289,14 @@ async function main() { // there are multiple choices on the latest layer // if they are all the same, it's just conflict between layers, // and we can merge the ones from the latest layer - const mergedEntry = mergeTlEntries(fromLastSchema.map((opt) => opt.entry).filter(isPresent)) + const mergedEntry = mergeTlEntries(fromLastSchema.map(opt => opt.entry).filter(isPresent)) if (typeof mergedEntry === 'string') { // merge failed, so there is in fact some conflict chooseOptions = fromLastSchema mergeError = mergedEntry - } else return mergedEntry + } else { + return mergedEntry + } } const nonEmptyOptions = chooseOptions.filter(hasPresentKey('entry')) @@ -308,9 +313,9 @@ async function main() { }) while (true) { - const res = parseInt(await input(rl, `[0-${nonEmptyOptions.length}] > `)) + const res = Number.parseInt(await input(rl, `[0-${nonEmptyOptions.length}] > `)) - if (isNaN(res) || res < 0 || res > nonEmptyOptions.length) { + if (Number.isNaN(res) || res < 0 || res > nonEmptyOptions.length) { continue } diff --git a/packages/tl/scripts/fetch-errors.ts b/packages/tl/scripts/fetch-errors.ts index bbc30eb9..3a391958 100644 --- a/packages/tl/scripts/fetch-errors.ts +++ b/packages/tl/scripts/fetch-errors.ts @@ -1,13 +1,13 @@ -import { parse } from 'csv-parse/sync' -import { writeFile } from 'fs/promises' +import { writeFile } from 'node:fs/promises' -import { TlErrors } from '@mtcute/tl-utils' +import { parse } from 'csv-parse/sync' +import type { TlErrors } from '@mtcute/tl-utils' import { ERRORS_JSON_FILE } from './constants.js' const ERRORS_PAGE_TG = 'https://corefork.telegram.org/api/errors' -const ERRORS_PAGE_TELETHON = - 'https://raw.githubusercontent.com/LonamiWebs/Telethon/v1/telethon_generator/data/errors.csv' +const ERRORS_PAGE_TELETHON + = 'https://raw.githubusercontent.com/LonamiWebs/Telethon/v1/telethon_generator/data/errors.csv' const baseErrors = { BAD_REQUEST: 400, UNAUTHORIZED: 401, @@ -27,11 +27,11 @@ interface TelegramErrorsSpec { } async function fetchFromTelegram(errors: TlErrors) { - const page = await fetch(ERRORS_PAGE_TG).then((it) => it.text()) + const page = await fetch(ERRORS_PAGE_TG).then(it => it.text()) const jsonUrl = page.match(/can be found here »<\/a>/i)?.[1] if (!jsonUrl) throw new Error('Cannot find JSON URL') - const json = (await fetch(new URL(jsonUrl, ERRORS_PAGE_TG)).then((it) => it.json())) as TelegramErrorsSpec + const json = (await fetch(new URL(jsonUrl, ERRORS_PAGE_TG)).then(it => it.json())) as TelegramErrorsSpec // since nobody fucking guarantees that .descriptions // will have description for each described here (or vice versa), @@ -41,10 +41,10 @@ async function fetchFromTelegram(errors: TlErrors) { for (const name of Object.keys(json.errors[code])) { const thrownBy = json.errors[code][name] - const _code = parseInt(code) + const _code = Number.parseInt(code) - if (isNaN(_code)) { - throw new Error(`Invalid code: ${code}`) + if (Number.isNaN(_code)) { + throw new TypeError(`Invalid code: ${code}`) } if (!(name in errors.errors)) { @@ -142,10 +142,10 @@ async function fetchFromTelethon(errors: TlErrors) { if (name_ === 'TIMEOUT') continue let name = name_ - const code = parseInt(codes) + const code = Number.parseInt(codes) - if (isNaN(code)) { - throw new Error(`Invalid code: ${codes} (name: ${name})`) + if (Number.isNaN(code)) { + throw new TypeError(`Invalid code: ${codes} (name: ${name})`) } // telethon uses X for parameters instead of printf-like @@ -171,7 +171,7 @@ async function fetchFromTelethon(errors: TlErrors) { // names for better code insights // we also prefer description from telegram, if it's available and doesn't use placeholders if (description) { - const desc = description.replace(/{([a-z0-9_]+)}/gi, (_, name: string) => { + const desc = description.replace(/\{(\w+)\}/g, (_, name: string) => { if (!obj._paramNames) { obj._paramNames = [] } diff --git a/packages/tl/scripts/fetch-mtp.ts b/packages/tl/scripts/fetch-mtp.ts index 530a851e..3badea18 100644 --- a/packages/tl/scripts/fetch-mtp.ts +++ b/packages/tl/scripts/fetch-mtp.ts @@ -1,8 +1,8 @@ // Downloads latest MTProto .tl schema -import * as cheerio from 'cheerio' -import { writeFile } from 'fs/promises' +import { writeFile } from 'node:fs/promises' +import * as cheerio from 'cheerio' import { parseTlToEntries } from '@mtcute/tl-utils' import { CORE_DOMAIN, MTP_SCHEMA_JSON_FILE } from './constants.js' @@ -25,7 +25,7 @@ async function main() { // remove manually parsed types entries = entries.filter( - (it) => !['mt_msg_container', 'mt_message', 'mt_msg_copy', 'mt_gzip_packed', 'mt_rpc_result'].includes(it.name), + it => !['mt_msg_container', 'mt_message', 'mt_msg_copy', 'mt_gzip_packed', 'mt_rpc_result'].includes(it.name), ) // mtproto is handled internally, for simplicity we make them all classes diff --git a/packages/tl/scripts/gen-code.ts b/packages/tl/scripts/gen-code.ts index 2f8b175b..5c5daf1d 100644 --- a/packages/tl/scripts/gen-code.ts +++ b/packages/tl/scripts/gen-code.ts @@ -1,18 +1,21 @@ -import { readFile, writeFile } from 'fs/promises' -import { join } from 'path' +import { readFile, writeFile } from 'node:fs/promises' +import { join } from 'node:path' +import type { + TlEntry, + TlErrors, + TlFullSchema, +} from '@mtcute/tl-utils' import { generateReaderCodeForTlEntries, generateTypescriptDefinitionsForTlSchema, generateWriterCodeForTlEntries, parseFullTlSchema, - TlEntry, - TlErrors, - TlFullSchema, } from '@mtcute/tl-utils' -import { __dirname, API_SCHEMA_JSON_FILE, ERRORS_JSON_FILE, ESM_PRELUDE, MTP_SCHEMA_JSON_FILE } from './constants.js' -import { TlPackedSchema, unpackTlSchema } from './schema.js' +import { API_SCHEMA_JSON_FILE, ERRORS_JSON_FILE, ESM_PRELUDE, MTP_SCHEMA_JSON_FILE, __dirname } from './constants.js' +import type { TlPackedSchema } from './schema.js' +import { unpackTlSchema } from './schema.js' const OUT_TYPINGS_FILE = join(__dirname, '../index.d.ts') const OUT_TYPINGS_JS_FILE = join(__dirname, '../index.js') @@ -24,12 +27,13 @@ async function generateTypings(apiSchema: TlFullSchema, apiLayer: number, mtpSch const [apiTs, apiJs] = generateTypescriptDefinitionsForTlSchema(apiSchema, apiLayer, undefined, errors) const [mtpTs, mtpJs] = generateTypescriptDefinitionsForTlSchema(mtpSchema, 0, 'mtp') - await writeFile(OUT_TYPINGS_FILE, apiTs + '\n\n' + mtpTs.replace("import _Long from 'long';", '')) - await writeFile(OUT_TYPINGS_JS_FILE, ESM_PRELUDE + apiJs + '\n\n' + mtpJs) + await writeFile(OUT_TYPINGS_FILE, `${apiTs}\n\n${mtpTs.replace("import _Long from 'long';", '')}`) + await writeFile(OUT_TYPINGS_JS_FILE, `${ESM_PRELUDE + apiJs}\n\n${mtpJs}`) } -const removeInternalEntries = (entries: TlEntry[]) => - entries.filter((it) => !it.name.startsWith('mtcute.') || it.name === 'mtcute.customMethod') +function removeInternalEntries(entries: TlEntry[]) { + return entries.filter(it => !it.name.startsWith('mtcute.') || it.name === 'mtcute.customMethod') +} async function generateReaders(apiSchema: TlFullSchema, mtpSchema: TlFullSchema) { console.log('Generating readers...') @@ -71,7 +75,7 @@ async function generateWriters(apiSchema: TlFullSchema, mtpSchema: TlFullSchema) // for mtcute.customMethod we want to generate a writer that writes obj.bytes directly const newCode = code.replace( - /^('mtcute.customMethod':function\(w,v\){)w.uint\(2440218877\);w.bytes\(h\(v,'bytes'\)\)/m, + /^('mtcute.customMethod':function\(w,v\)\{)w.uint\(2440218877\);w.bytes\(h\(v,'bytes'\)\)/m, "$1w.raw(h(v,'bytes'))", ) diff --git a/packages/tl/scripts/gen-rsa-keys.ts b/packages/tl/scripts/gen-rsa-keys.ts index 461b4f21..766efbd7 100644 --- a/packages/tl/scripts/gen-rsa-keys.ts +++ b/packages/tl/scripts/gen-rsa-keys.ts @@ -1,13 +1,14 @@ -import { createReadStream } from 'fs' -import { writeFile } from 'fs/promises' -import { join } from 'path' -import readline from 'readline' +import { createReadStream } from 'node:fs' +import { writeFile } from 'node:fs/promises' +import { join } from 'node:path' +import readline from 'node:readline' import { parsePublicKey } from '@mtcute/core/utils.js' import { NodeCryptoProvider } from '@mtcute/node/utils.js' -import { TlPublicKey } from '../binary/rsa-keys.js' -import { __dirname, ESM_PRELUDE } from './constants.js' +import type { TlPublicKey } from '../binary/rsa-keys.js' + +import { ESM_PRELUDE, __dirname } from './constants.js' const IN_TXT_FILE = join(__dirname, '../data/rsa-keys.txt') const OUT_JS_FILE = join(__dirname, '../binary/rsa-keys.js') @@ -33,7 +34,7 @@ async function* parseInputFile(): AsyncIterableIterator { if (line[0] === '#') continue - current += line + '\n' + current += `${line}\n` if (line === '-----END RSA PUBLIC KEY-----') { yield { @@ -54,7 +55,7 @@ async function main() { obj[parsed.fingerprint] = parsed } - await writeFile(OUT_JS_FILE, ESM_PRELUDE + "exports.default=JSON.parse('" + JSON.stringify(obj) + "');") + await writeFile(OUT_JS_FILE, `${ESM_PRELUDE}exports.default=JSON.parse('${JSON.stringify(obj)}');`) } main().catch(console.error) diff --git a/packages/tl/scripts/package.json b/packages/tl/scripts/package.json index 089153bc..5ffd9800 100644 --- a/packages/tl/scripts/package.json +++ b/packages/tl/scripts/package.json @@ -1 +1 @@ -{"type":"module"} +{ "type": "module" } diff --git a/packages/tl/scripts/process-descriptions-yaml.ts b/packages/tl/scripts/process-descriptions-yaml.ts index 1ef03113..62721049 100644 --- a/packages/tl/scripts/process-descriptions-yaml.ts +++ b/packages/tl/scripts/process-descriptions-yaml.ts @@ -1,11 +1,11 @@ -import { CachedDocumentation, CachedDocumentationEntry } from './documentation.js' +import type { CachedDocumentation, CachedDocumentationEntry } from './documentation.js' type MaybeOverwrite = - | string - | { - text: string - overwrite: boolean - } + | string + | { + text: string + overwrite: boolean + } interface RegexRule { _cached?: RegExp @@ -48,7 +48,7 @@ function unwrapMaybe(what: MaybeOverwrite, has: boolean): string | undefined { return undefined } -export function applyDescriptionsYamlFile(input: CachedDocumentation, yaml: unknown) { +export function applyDescriptionsYamlFile(input: CachedDocumentation, yaml: unknown): CachedDocumentation { const { objects: byObjects, arguments: byArguments, regex: byRegex } = yaml as DescriptionsYaml // first create an index of all classes and methods @@ -65,7 +65,7 @@ export function applyDescriptionsYamlFile(input: CachedDocumentation, yaml: unkn // process byObjects for (const name in byObjects) { - const rules = byObjects[name]! + const rules = byObjects[name] const obj = objIndex[name] if (!obj) continue @@ -77,7 +77,7 @@ export function applyDescriptionsYamlFile(input: CachedDocumentation, yaml: unkn if (rules.arguments) { for (const arg in rules.arguments) { - const repl = unwrapMaybe(rules.arguments[arg]!, obj.arguments !== undefined && arg in obj.arguments) + const repl = unwrapMaybe(rules.arguments[arg], obj.arguments !== undefined && arg in obj.arguments) if (repl) { if (!obj.arguments) obj.arguments = {} @@ -89,12 +89,12 @@ export function applyDescriptionsYamlFile(input: CachedDocumentation, yaml: unkn // process byArguments for (const i in objIndex) { - const obj = objIndex[i]! + const obj = objIndex[i] for (const arg in byArguments) { if (obj.arguments && !(arg in obj.arguments)) continue - const repl = unwrapMaybe(byArguments[arg]!, Boolean(obj.arguments && arg in obj.arguments)) + const repl = unwrapMaybe(byArguments[arg], Boolean(obj.arguments && arg in obj.arguments)) if (repl) { if (!obj.arguments) obj.arguments = {} @@ -118,7 +118,7 @@ export function applyDescriptionsYamlFile(input: CachedDocumentation, yaml: unkn } for (const i in objIndex) { - const obj = objIndex[i]! + const obj = objIndex[i] byRegex.forEach((rule) => { obj.comment = applyRegex(obj.comment, rule) diff --git a/packages/tl/scripts/schema.ts b/packages/tl/scripts/schema.ts index 579505f1..2e46ec2c 100644 --- a/packages/tl/scripts/schema.ts +++ b/packages/tl/scripts/schema.ts @@ -1,4 +1,5 @@ -import { parseFullTlSchema, TlEntry, TlFullSchema } from '@mtcute/tl-utils' +import type { TlEntry, TlFullSchema } from '@mtcute/tl-utils' +import { parseFullTlSchema } from '@mtcute/tl-utils' // interface TlPackedUnion { // // name diff --git a/packages/tl/scripts/utils.ts b/packages/tl/scripts/utils.ts index 85be884c..a26770a1 100644 --- a/packages/tl/scripts/utils.ts +++ b/packages/tl/scripts/utils.ts @@ -1,7 +1,7 @@ export async function fetchRetry(url: string, params?: RequestInit, retries = 5): Promise { while (true) { try { - return await fetch(url, params).then((i) => i.text()) + return await fetch(url, params).then(i => i.text()) } catch (e) { if (!retries--) { throw e diff --git a/packages/tl/tsconfig.json b/packages/tl/tsconfig.json index 203c5363..176aee56 100644 --- a/packages/tl/tsconfig.json +++ b/packages/tl/tsconfig.json @@ -1,13 +1,13 @@ { - "extends": "../../tsconfig.json", - "include": [ - "./index.d.ts", - "./errors.d.ts", - "./raw-schema.d.ts", - "./binary/reader.d.ts", - "./binary/writer.d.ts", - "./binary/rsa-keys.d.ts", - "./scripts", - "./tests/types.ts" - ] + "extends": "../../tsconfig.json", + "include": [ + "./index.d.ts", + "./errors.d.ts", + "./raw-schema.d.ts", + "./binary/reader.d.ts", + "./binary/writer.d.ts", + "./binary/rsa-keys.d.ts", + "./scripts", + "./tests/types.ts" + ] } diff --git a/packages/wasm/README.md b/packages/wasm/README.md index da77ad69..17a23fd4 100644 --- a/packages/wasm/README.md +++ b/packages/wasm/README.md @@ -8,7 +8,7 @@ Highly optimized for size & speed WASM implementation of common algorithms used - **Super lightweight**: Only 47 KB raw, 24 KB gzipped - **Blazingly fast**: Up to 10x faster than pure JS implementations - **Ready to use**: Implements almost all algos used in MTProto: - - AES IGE + - AES IGE - Deflate (zlib compression + gunzip) - SHA-1, SHA-256 @@ -21,4 +21,4 @@ Highly optimized for size & speed WASM implementation of common algorithms used - SHA256 is based on [lekkit/sha256](https://github.com/LekKit/sha256) ## Benchmarks -See https://github.com/mtcute/benchmarks \ No newline at end of file +See https://github.com/mtcute/benchmarks diff --git a/packages/wasm/build.config.cjs b/packages/wasm/build.config.cjs index 9f85a6bc..b2a79b47 100644 --- a/packages/wasm/build.config.cjs +++ b/packages/wasm/build.config.cjs @@ -4,7 +4,7 @@ module.exports = ({ path: { join }, fs, outDir, packageDir, jsr, transformFile } fs.cpSync(join(packageDir, 'mtcute.wasm'), join(outDir, 'mtcute.wasm')) if (jsr) { - transformFile(join(outDir, 'index.ts'), (code) => code.replace("'../mtcute.wasm'", "'./mtcute.wasm'")) + transformFile(join(outDir, 'index.ts'), code => code.replace("'../mtcute.wasm'", "'./mtcute.wasm'")) } }, }) diff --git a/packages/wasm/package.json b/packages/wasm/package.json index fd96a9ee..225c1fb9 100644 --- a/packages/wasm/package.json +++ b/packages/wasm/package.json @@ -1,30 +1,30 @@ { - "name": "@mtcute/wasm", - "private": true, - "version": "0.16.0", - "description": "WASM implementation of common algorithms used in Telegram", - "author": "alina sireneva ", - "license": "MIT", - "type": "module", - "sideEffects": false, - "scripts": { - "docs": "typedoc", - "build": "pnpm run -w build-package wasm", - "build:wasm": "docker build --output=lib --target=binaries lib" - }, - "exports": { - ".": "./src/index.ts", - "./mtcute.wasm": "./mtcute.wasm" - }, - "exportsKeepPath": [ - "./mtcute.wasm" - ], - "devDependencies": { - "@mtcute/core": "workspace:^", - "@mtcute/web": "workspace:^", - "@mtcute/node": "workspace:^" - }, - "jsrOnlyFields": { - "exports": "./src/index.ts" - } + "name": "@mtcute/wasm", + "type": "module", + "version": "0.16.0", + "private": true, + "description": "WASM implementation of common algorithms used in Telegram", + "author": "alina sireneva ", + "license": "MIT", + "sideEffects": false, + "exports": { + ".": "./src/index.ts", + "./mtcute.wasm": "./mtcute.wasm" + }, + "scripts": { + "docs": "typedoc", + "build": "pnpm run -w build-package wasm", + "build:wasm": "docker build --output=lib --target=binaries lib" + }, + "exportsKeepPath": [ + "./mtcute.wasm" + ], + "devDependencies": { + "@mtcute/core": "workspace:^", + "@mtcute/node": "workspace:^", + "@mtcute/web": "workspace:^" + }, + "jsrOnlyFields": { + "exports": "./src/index.ts" + } } diff --git a/packages/wasm/src/index.ts b/packages/wasm/src/index.ts index 9949785b..aaf9b9f9 100644 --- a/packages/wasm/src/index.ts +++ b/packages/wasm/src/index.ts @@ -1,4 +1,4 @@ -import { MtcuteWasmModule, SyncInitInput } from './types.js' +import type { MtcuteWasmModule, SyncInitInput } from './types.js' export * from './types.js' @@ -171,7 +171,7 @@ export function ige256Decrypt(data: Uint8Array, key: Uint8Array, iv: Uint8Array) * * > **Note**: `freeCtr256` must be called on the returned context when it's no longer needed */ -export function createCtr256(key: Uint8Array, iv: Uint8Array) { +export function createCtr256(key: Uint8Array, iv: Uint8Array): number { getUint8Memory().set(key, sharedKeyPtr) getUint8Memory().set(iv, sharedIvPtr) @@ -181,7 +181,7 @@ export function createCtr256(key: Uint8Array, iv: Uint8Array) { /** * Release a context for AES-CTR-256 en/decryption */ -export function freeCtr256(ctx: number) { +export function freeCtr256(ctx: number): void { wasm.ctr256_free(ctx) } diff --git a/packages/wasm/tests/allocator.test.ts b/packages/wasm/tests/allocator.test.ts index 1a0cb70b..ee43634d 100644 --- a/packages/wasm/tests/allocator.test.ts +++ b/packages/wasm/tests/allocator.test.ts @@ -1,6 +1,7 @@ import { beforeAll, describe, expect, it } from 'vitest' import { __getWasm } from '../src/index.js' + import { initWasm } from './init.js' beforeAll(async () => { diff --git a/packages/wasm/tests/ctr.test.ts b/packages/wasm/tests/ctr.test.ts index 5fcb9db5..03bb98f4 100644 --- a/packages/wasm/tests/ctr.test.ts +++ b/packages/wasm/tests/ctr.test.ts @@ -1,8 +1,8 @@ import { beforeAll, describe, expect, it } from 'vitest' - import { getPlatform } from '@mtcute/core/platform.js' import { __getWasm, createCtr256, ctr256, freeCtr256 } from '../src/index.js' + import { initWasm } from './init.js' const p = getPlatform() diff --git a/packages/wasm/tests/gunzip.test.ts b/packages/wasm/tests/gunzip.test.ts index cd7d7d40..ded96562 100644 --- a/packages/wasm/tests/gunzip.test.ts +++ b/packages/wasm/tests/gunzip.test.ts @@ -1,9 +1,10 @@ import { gzipSync } from 'node:zlib' -import { beforeAll, describe, expect, it } from 'vitest' +import { beforeAll, describe, expect, it } from 'vitest' import { getPlatform } from '@mtcute/core/platform.js' import { __getWasm, gunzip } from '../src/index.js' + import { initWasm } from './init.js' beforeAll(async () => { diff --git a/packages/wasm/tests/hash.test.ts b/packages/wasm/tests/hash.test.ts index 7d0b5597..e7a62853 100644 --- a/packages/wasm/tests/hash.test.ts +++ b/packages/wasm/tests/hash.test.ts @@ -1,8 +1,8 @@ import { beforeAll, describe, expect, it } from 'vitest' - import { getPlatform } from '@mtcute/core/platform.js' import { __getWasm, sha1, sha256 } from '../src/index.js' + import { initWasm } from './init.js' beforeAll(async () => { diff --git a/packages/wasm/tests/ige.test.ts b/packages/wasm/tests/ige.test.ts index 6e568842..6bed3b82 100644 --- a/packages/wasm/tests/ige.test.ts +++ b/packages/wasm/tests/ige.test.ts @@ -1,9 +1,8 @@ -/* eslint-disable no-restricted-globals */ import { beforeAll, describe, expect, it } from 'vitest' - import { getPlatform } from '@mtcute/core/platform.js' import { __getWasm, ige256Decrypt, ige256Encrypt } from '../src/index.js' + import { initWasm } from './init.js' const p = getPlatform() diff --git a/packages/wasm/tests/init.ts b/packages/wasm/tests/init.ts index a6cbd1c7..c27e6c96 100644 --- a/packages/wasm/tests/init.ts +++ b/packages/wasm/tests/init.ts @@ -4,7 +4,7 @@ export async function initWasm() { const url = new URL('../mtcute.wasm', import.meta.url) if (import.meta.env.TEST_ENV === 'node') { - const fs = await import('fs/promises') + const fs = await import('node:fs/promises') const blob = await fs.readFile(url) initSync(blob) diff --git a/packages/wasm/tests/tsconfig.json b/packages/wasm/tests/tsconfig.json index 23b6b033..ba289afc 100644 --- a/packages/wasm/tests/tsconfig.json +++ b/packages/wasm/tests/tsconfig.json @@ -1,9 +1,9 @@ { - "extends": "../../../tsconfig.json", - "include": [ - "." - ], - "references": [ - { "path": "../" } - ] + "extends": "../../../tsconfig.json", + "references": [ + { "path": "../" } + ], + "include": [ + "." + ] } diff --git a/packages/wasm/tests/zlib.test.ts b/packages/wasm/tests/zlib.test.ts index b21ad206..7aeca117 100644 --- a/packages/wasm/tests/zlib.test.ts +++ b/packages/wasm/tests/zlib.test.ts @@ -1,9 +1,10 @@ import { inflateSync } from 'node:zlib' -import { beforeAll, describe, expect, it } from 'vitest' +import { beforeAll, describe, expect, it } from 'vitest' import { getPlatform } from '@mtcute/core/platform.js' import { __getWasm, deflateMaxSize } from '../src/index.js' + import { initWasm } from './init.js' beforeAll(async () => { @@ -28,7 +29,7 @@ describe('zlib deflate', () => { const res = deflateMaxSize(p.utf8Encode('hello world'), 100) expect(res).not.toBeNull() - expect(res!.slice(0, 2)).toEqual(new Uint8Array([0x78, 0x9c])) + expect(res!.slice(0, 2)).toEqual(new Uint8Array([0x78, 0x9C])) }) it('should return null if compressed data is larger than size', () => { diff --git a/packages/wasm/tsconfig.json b/packages/wasm/tsconfig.json index 6a3f7a53..77ca9f2d 100644 --- a/packages/wasm/tsconfig.json +++ b/packages/wasm/tsconfig.json @@ -1,10 +1,10 @@ { - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "./dist/esm", - "rootDir": "./src" - }, - "include": [ - "./src", - ] + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist/esm" + }, + "include": [ + "./src" + ] } diff --git a/packages/web/README.md b/packages/web/README.md index 51c4f10f..9f4c4fc1 100644 --- a/packages/web/README.md +++ b/packages/web/README.md @@ -31,6 +31,9 @@ You can also use this package with web workers to offload most of the heavy lift // worker.ts import { BaseTelegramClient, TelegramWorker } from '@mtcute/web' +// main.ts +import { TelegramClient, TelegramWorkerPort } from '@mtcute/web' + const client = new BaseTelegramClient({ apiId: 12345, apiHash: 'abcdef', @@ -39,13 +42,10 @@ const client = new BaseTelegramClient({ new TelegramWorker({ client }) -// main.ts -import { TelegramClient, TelegramWorkerPort } from '@mtcute/web' - const worker = new Worker(new URL('./worker.ts', import.meta.url), { type: 'module' }) // or SharedWorker const port = new TelegramWorkerPort({ worker }) const tg = new TelegramClient({ client: port }) const self = await tg.start() console.log(`✨ logged in as ${user.displayName}`) -``` \ No newline at end of file +``` diff --git a/packages/web/package.json b/packages/web/package.json index 4ffe251a..d787bd83 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -1,36 +1,36 @@ { - "name": "@mtcute/web", - "private": true, - "version": "0.16.6", - "description": "Meta-package for the web platform", - "author": "alina sireneva ", - "license": "MIT", - "type": "module", - "sideEffects": false, - "scripts": { - "docs": "typedoc", - "build": "pnpm run -w build-package web" - }, - "exports": { - ".": "./src/index.ts", - "./utils.js": "./src/utils.ts", - "./methods.js": "./src/methods.ts" - }, - "dependencies": { - "@mtcute/core": "workspace:^", - "@mtcute/wasm": "workspace:^", - "events": "3.2.0" - }, - "devDependencies": { - "@mtcute/test": "workspace:^" - }, - "denoJson": { - "compilerOptions": { - "lib": [ - "dom", - "dom.iterable", - "WebWorker" - ] - } + "name": "@mtcute/web", + "type": "module", + "version": "0.16.6", + "private": true, + "description": "Meta-package for the web platform", + "author": "alina sireneva ", + "license": "MIT", + "sideEffects": false, + "exports": { + ".": "./src/index.ts", + "./utils.js": "./src/utils.ts", + "./methods.js": "./src/methods.ts" + }, + "scripts": { + "docs": "typedoc", + "build": "pnpm run -w build-package web" + }, + "dependencies": { + "@mtcute/core": "workspace:^", + "@mtcute/wasm": "workspace:^", + "events": "3.2.0" + }, + "devDependencies": { + "@mtcute/test": "workspace:^" + }, + "denoJson": { + "compilerOptions": { + "lib": [ + "dom", + "dom.iterable", + "WebWorker" + ] } + } } diff --git a/packages/web/src/client.ts b/packages/web/src/client.ts index baf02413..35fbc18d 100644 --- a/packages/web/src/client.ts +++ b/packages/web/src/client.ts @@ -1,9 +1,11 @@ -import { ITelegramStorageProvider, PartialOnly } from '@mtcute/core' +import type { ITelegramStorageProvider, PartialOnly } from '@mtcute/core' +import type { + BaseTelegramClientOptions as BaseTelegramClientOptionsBase, + TelegramClientOptions, +} from '@mtcute/core/client.js' import { BaseTelegramClient as BaseTelegramClientBase, - BaseTelegramClientOptions as BaseTelegramClientOptionsBase, TelegramClient as TelegramClientBase, - TelegramClientOptions, } from '@mtcute/core/client.js' import { setPlatform } from '@mtcute/core/platform.js' @@ -44,9 +46,9 @@ export class BaseTelegramClient extends BaseTelegramClientBase { transport: () => new WebSocketTransport(), ...opts, storage: - typeof opts.storage === 'string' ? - new IdbStorage(opts.storage) : - opts.storage ?? new IdbStorage('client.session'), + typeof opts.storage === 'string' + ? new IdbStorage(opts.storage) + : opts.storage ?? new IdbStorage('client.session'), }) } } diff --git a/packages/web/src/common-internals-web/base64.ts b/packages/web/src/common-internals-web/base64.ts index 549dd652..4d8a8026 100644 --- a/packages/web/src/common-internals-web/base64.ts +++ b/packages/web/src/common-internals-web/base64.ts @@ -44,35 +44,35 @@ function toByteArray(b64: string, arr: Uint8Array) { let i for (i = 0; i < len; i += 4) { - tmp = - (revLookup[b64.charCodeAt(i)] << 18) | - (revLookup[b64.charCodeAt(i + 1)] << 12) | - (revLookup[b64.charCodeAt(i + 2)] << 6) | - revLookup[b64.charCodeAt(i + 3)] - arr[curByte++] = (tmp >> 16) & 0xff - arr[curByte++] = (tmp >> 8) & 0xff - arr[curByte++] = tmp & 0xff + tmp + = (revLookup[b64.charCodeAt(i)] << 18) + | (revLookup[b64.charCodeAt(i + 1)] << 12) + | (revLookup[b64.charCodeAt(i + 2)] << 6) + | revLookup[b64.charCodeAt(i + 3)] + arr[curByte++] = (tmp >> 16) & 0xFF + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF } if (placeHoldersLen === 2) { tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4) - arr[curByte++] = tmp & 0xff + arr[curByte++] = tmp & 0xFF } if (placeHoldersLen === 1) { - tmp = - (revLookup[b64.charCodeAt(i)] << 10) | - (revLookup[b64.charCodeAt(i + 1)] << 4) | - (revLookup[b64.charCodeAt(i + 2)] >> 2) - arr[curByte++] = (tmp >> 8) & 0xff - arr[curByte++] = tmp & 0xff + tmp + = (revLookup[b64.charCodeAt(i)] << 10) + | (revLookup[b64.charCodeAt(i + 1)] << 4) + | (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF } return arr } function tripletToBase64(num: number) { - return lookup[(num >> 18) & 0x3f] + lookup[(num >> 12) & 0x3f] + lookup[(num >> 6) & 0x3f] + lookup[num & 0x3f] + return lookup[(num >> 18) & 0x3F] + lookup[(num >> 12) & 0x3F] + lookup[(num >> 6) & 0x3F] + lookup[num & 0x3F] } function encodeChunk(uint8: Uint8Array, start: number, end: number) { @@ -80,7 +80,7 @@ function encodeChunk(uint8: Uint8Array, start: number, end: number) { const output = [] for (let i = start; i < end; i += 3) { - tmp = ((uint8[i] << 16) & 0xff0000) + ((uint8[i + 1] << 8) & 0xff00) + (uint8[i + 2] & 0xff) + tmp = ((uint8[i] << 16) & 0xFF0000) + ((uint8[i + 1] << 8) & 0xFF00) + (uint8[i + 2] & 0xFF) output.push(tripletToBase64(tmp)) } @@ -102,10 +102,10 @@ function fromByteArray(uint8: Uint8Array) { // pad the end with zeros, but make sure to not forget the extra bytes if (extraBytes === 1) { tmp = uint8[len - 1] - parts.push(lookup[tmp >> 2] + lookup[(tmp << 4) & 0x3f] + '==') + parts.push(`${lookup[tmp >> 2] + lookup[(tmp << 4) & 0x3F]}==`) } else if (extraBytes === 2) { tmp = (uint8[len - 2] << 8) + uint8[len - 1] - parts.push(lookup[tmp >> 10] + lookup[(tmp >> 4) & 0x3f] + lookup[(tmp << 2) & 0x3f] + '=') + parts.push(`${lookup[tmp >> 10] + lookup[(tmp >> 4) & 0x3F] + lookup[(tmp << 2) & 0x3F]}=`) } return parts.join('') diff --git a/packages/web/src/common-internals-web/hex.ts b/packages/web/src/common-internals-web/hex.ts index a80886a3..0c3e4a16 100644 --- a/packages/web/src/common-internals-web/hex.ts +++ b/packages/web/src/common-internals-web/hex.ts @@ -2,8 +2,7 @@ const hexSliceLookupTable = (function () { const alphabet = '0123456789abcdef' - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - const table: string[] = new Array(256) + const table: string[] = Array.from({ length: 256 }) for (let i = 0; i < 16; ++i) { const i16 = i * 16 @@ -17,16 +16,16 @@ const hexSliceLookupTable = (function () { })() const hexCharValueTable: Record = { - '0': 0, - '1': 1, - '2': 2, - '3': 3, - '4': 4, - '5': 5, - '6': 6, - '7': 7, - '8': 8, - '9': 9, + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9, a: 10, b: 11, c: 12, @@ -66,8 +65,6 @@ function hexDecodeInner(buf: Uint8Array, string: string): void { } buf[i] = (a << 4) | b } - - return } export function hexDecode(string: string): Uint8Array { diff --git a/packages/web/src/common-internals-web/readme.md b/packages/web/src/common-internals-web/readme.md index b03e8b77..11e55110 100644 --- a/packages/web/src/common-internals-web/readme.md +++ b/packages/web/src/common-internals-web/readme.md @@ -1,2 +1,2 @@ this folder is for common code across `@mtcute/web` and `@mtcute/deno`. -it is symlinked into `@mtcute/deno` \ No newline at end of file +it is symlinked into `@mtcute/deno` diff --git a/packages/web/src/common-internals-web/utf8.ts b/packages/web/src/common-internals-web/utf8.ts index 4f65e677..08294d5e 100644 --- a/packages/web/src/common-internals-web/utf8.ts +++ b/packages/web/src/common-internals-web/utf8.ts @@ -7,9 +7,9 @@ export function utf8ByteLength(str: string): number { for (let i = str.length - 1; i >= 0; i--) { const code = str.charCodeAt(i) - if (code > 0x7f && code <= 0x7ff) s++ - else if (code > 0x7ff && code <= 0xffff) s += 2 - if (code >= 0xdc00 && code <= 0xdfff) i-- //trail surrogate + if (code > 0x7F && code <= 0x7FF) s++ + else if (code > 0x7FF && code <= 0xFFFF) s += 2 + if (code >= 0xDC00 && code <= 0xDFFF) i-- // trail surrogate } return s diff --git a/packages/web/src/crypto.ts b/packages/web/src/crypto.ts index 31068077..9af8c242 100644 --- a/packages/web/src/crypto.ts +++ b/packages/web/src/crypto.ts @@ -1,4 +1,5 @@ -import { BaseCryptoProvider, IAesCtr, ICryptoProvider, IEncryptionScheme } from '@mtcute/core/utils.js' +import type { IAesCtr, ICryptoProvider, IEncryptionScheme } from '@mtcute/core/utils.js' +import { BaseCryptoProvider } from '@mtcute/core/utils.js' import { createCtr256, ctr256, @@ -12,7 +13,8 @@ import { sha256, } from '@mtcute/wasm' -import { loadWasmBinary, WasmInitInput } from './wasm.js' +import type { WasmInitInput } from './wasm.js' +import { loadWasmBinary } from './wasm.js' const ALGO_TO_SUBTLE: Record = { sha256: 'SHA-256', @@ -41,15 +43,15 @@ export class WebCryptoProvider extends BaseCryptoProvider implements ICryptoProv const ctx = createCtr256(key, iv) return { - process: (data) => ctr256(ctx, data), + process: data => ctr256(ctx, data), close: () => freeCtr256(ctx), } } createAesIge(key: Uint8Array, iv: Uint8Array): IEncryptionScheme { return { - encrypt: (data) => ige256Encrypt(data, key, iv), - decrypt: (data) => ige256Decrypt(data, key, iv), + encrypt: data => ige256Encrypt(data, key, iv), + decrypt: data => ige256Decrypt(data, key, iv), } } @@ -96,7 +98,7 @@ export class WebCryptoProvider extends BaseCryptoProvider implements ICryptoProv keyMaterial, (keylen || 64) * 8, ) - .then((result) => new Uint8Array(result)) + .then(result => new Uint8Array(result)) } async hmacSha256(data: Uint8Array, key: Uint8Array): Promise { diff --git a/packages/web/src/idb/driver.ts b/packages/web/src/idb/driver.ts index a35d7a1f..0885f7b8 100644 --- a/packages/web/src/idb/driver.ts +++ b/packages/web/src/idb/driver.ts @@ -134,7 +134,7 @@ export class IdbStorageDriver extends BaseStorageDriver { }) } - async _save() { + async _save(): Promise { if (this._pendingWritesOses.size === 0) return const writes = this._pendingWrites diff --git a/packages/web/src/idb/idb.test.ts b/packages/web/src/idb/idb.test.ts index a05ddde3..d9af7269 100644 --- a/packages/web/src/idb/idb.test.ts +++ b/packages/web/src/idb/idb.test.ts @@ -1,5 +1,4 @@ import { afterAll, beforeAll, describe } from 'vitest' - import { testAuthKeysRepository, testKeyValueRepository, @@ -11,7 +10,7 @@ import { IdbStorage } from './index.js' if (import.meta.env.TEST_ENV === 'browser') { describe('idb storage', () => { - const idbName = 'mtcute_test_' + Math.random().toString(36).slice(2) + const idbName = `mtcute_test_${Math.random().toString(36).slice(2)}` const storage = new IdbStorage(idbName) diff --git a/packages/web/src/idb/index.ts b/packages/web/src/idb/index.ts index cadcd054..ae266c45 100644 --- a/packages/web/src/idb/index.ts +++ b/packages/web/src/idb/index.ts @@ -1,4 +1,4 @@ -import { IMtStorageProvider } from '@mtcute/core' +import type { IMtStorageProvider } from '@mtcute/core' import { IdbStorageDriver } from './driver.js' import { IdbAuthKeysRepository } from './repository/auth-keys.js' @@ -15,11 +15,11 @@ export { IdbStorageDriver } from './driver.js' * recommended over local storage based one. */ export class IdbStorage implements IMtStorageProvider { - readonly driver - readonly kv - readonly authKeys - readonly peers - readonly refMessages + readonly driver: IdbStorageDriver + readonly kv: IdbKvRepository + readonly authKeys: IdbAuthKeysRepository + readonly peers: IdbPeersRepository + readonly refMessages: IdbRefMsgRepository constructor(readonly dbName: string) { this.driver = new IdbStorageDriver(this.dbName) diff --git a/packages/web/src/idb/repository/auth-keys.ts b/packages/web/src/idb/repository/auth-keys.ts index 842986be..4945a85d 100644 --- a/packages/web/src/idb/repository/auth-keys.ts +++ b/packages/web/src/idb/repository/auth-keys.ts @@ -1,6 +1,6 @@ -import { IAuthKeysRepository } from '@mtcute/core' +import type { IAuthKeysRepository } from '@mtcute/core' -import { IdbStorageDriver } from '../driver.js' +import type { IdbStorageDriver } from '../driver.js' import { reqToPromise, txToPromise } from '../utils.js' const TABLE_AUTH_KEYS = 'authKeys' diff --git a/packages/web/src/idb/repository/kv.ts b/packages/web/src/idb/repository/kv.ts index 64f4a79c..e6cd6359 100644 --- a/packages/web/src/idb/repository/kv.ts +++ b/packages/web/src/idb/repository/kv.ts @@ -1,6 +1,6 @@ -import { IKeyValueRepository } from '@mtcute/core' +import type { IKeyValueRepository } from '@mtcute/core' -import { IdbStorageDriver } from '../driver.js' +import type { IdbStorageDriver } from '../driver.js' import { reqToPromise } from '../utils.js' const KV_TABLE = 'kv' diff --git a/packages/web/src/idb/repository/peers.ts b/packages/web/src/idb/repository/peers.ts index fff96ba6..71294744 100644 --- a/packages/web/src/idb/repository/peers.ts +++ b/packages/web/src/idb/repository/peers.ts @@ -1,6 +1,6 @@ -import { IPeersRepository } from '@mtcute/core' +import type { IPeersRepository } from '@mtcute/core' -import { IdbStorageDriver } from '../driver.js' +import type { IdbStorageDriver } from '../driver.js' import { reqToPromise } from '../utils.js' const TABLE = 'peers' diff --git a/packages/web/src/idb/repository/ref-messages.ts b/packages/web/src/idb/repository/ref-messages.ts index 6bb039c9..2ba7382a 100644 --- a/packages/web/src/idb/repository/ref-messages.ts +++ b/packages/web/src/idb/repository/ref-messages.ts @@ -1,6 +1,6 @@ -import { IReferenceMessagesRepository } from '@mtcute/core' +import type { IReferenceMessagesRepository } from '@mtcute/core' -import { IdbStorageDriver } from '../driver.js' +import type { IdbStorageDriver } from '../driver.js' import { reqToPromise, txToPromise } from '../utils.js' const TABLE = 'messageRefs' diff --git a/packages/web/src/platform.ts b/packages/web/src/platform.ts index 84d388e7..baa3075f 100644 --- a/packages/web/src/platform.ts +++ b/packages/web/src/platform.ts @@ -1,4 +1,4 @@ -import { ICorePlatform } from '@mtcute/core/platform.js' +import type { ICorePlatform } from '@mtcute/core/platform.js' import { base64Decode, base64Encode } from './common-internals-web/base64.js' import { hexDecode, hexEncode } from './common-internals-web/hex.js' @@ -19,9 +19,9 @@ export class WebPlatform implements ICorePlatform { getDefaultLogLevel(): number | null { if (typeof localStorage !== 'undefined') { - const localLogLevel = parseInt(localStorage.MTCUTE_LOG_LEVEL as string) + const localLogLevel = Number.parseInt(localStorage.MTCUTE_LOG_LEVEL as string) - if (!isNaN(localLogLevel)) { + if (!Number.isNaN(localLogLevel)) { return localLogLevel } } @@ -29,7 +29,7 @@ export class WebPlatform implements ICorePlatform { return null } - onNetworkChanged(fn: (connected: boolean) => void) { + onNetworkChanged(fn: (connected: boolean) => void): () => void { if (!('onLine' in navigator)) return () => {} const onlineHandler = () => fn(navigator.onLine) diff --git a/packages/web/src/wasm.ts b/packages/web/src/wasm.ts index 1f9d6471..b42aebf6 100644 --- a/packages/web/src/wasm.ts +++ b/packages/web/src/wasm.ts @@ -8,9 +8,9 @@ export async function loadWasmBinary(input?: WasmInitInput): Promise { await vi.waitFor(() => expect(t.state()).toEqual(TransportState.Ready)) await t.close() - console.log('kek') expect(socket.close).toHaveBeenCalled() }) diff --git a/packages/web/src/websocket.ts b/packages/web/src/websocket.ts index a957cc8e..be33290a 100644 --- a/packages/web/src/websocket.ts +++ b/packages/web/src/websocket.ts @@ -1,32 +1,36 @@ -import EventEmitter from 'events' +import EventEmitter from 'node:events' -import { - IntermediatePacketCodec, +import type { IPacketCodec, ITelegramTransport, - MtcuteError, +} from '@mtcute/core' +import { + IntermediatePacketCodec, MtUnsupportedError, + MtcuteError, ObfuscatedPacketCodec, TransportState, } from '@mtcute/core' -import { +import type { BasicDcOption, ControllablePromise, - createControllablePromise, ICryptoProvider, Logger, } from '@mtcute/core/utils.js' +import { + createControllablePromise, +} from '@mtcute/core/utils.js' -export type WebSocketConstructor = { +export interface WebSocketConstructor { new (address: string, protocol?: string): WebSocket } const subdomainsMap: Record = { - '1': 'pluto', - '2': 'venus', - '3': 'aurora', - '4': 'vesta', - '5': 'flora', + 1: 'pluto', + 2: 'venus', + 3: 'aurora', + 4: 'vesta', + 5: 'flora', } /** @@ -105,8 +109,8 @@ export abstract class BaseWebSocketTransport extends EventEmitter implements ITe if (!this.packetCodecInitialized) { this._packetCodec.setup?.(this._crypto, this.log) - this._packetCodec.on('error', (err) => this.emit('error', err)) - this._packetCodec.on('packet', (buf) => this.emit('message', buf)) + this._packetCodec.on('error', err => this.emit('error', err)) + this._packetCodec.on('packet', buf => this.emit('message', buf)) this.packetCodecInitialized = true } @@ -122,9 +126,8 @@ export abstract class BaseWebSocketTransport extends EventEmitter implements ITe this._socket.binaryType = 'arraybuffer' - this._socket.addEventListener('message', (evt) => - this._packetCodec.feed(new Uint8Array(evt.data as ArrayBuffer)), - ) + this._socket.addEventListener('message', evt => + this._packetCodec.feed(new Uint8Array(evt.data as ArrayBuffer))) this._socket.addEventListener('open', this.handleConnect.bind(this)) this._socket.addEventListener('error', this.handleError.bind(this)) this._socket.addEventListener('close', this.handleClosed.bind(this)) @@ -172,7 +175,7 @@ export abstract class BaseWebSocketTransport extends EventEmitter implements ITe this._state = TransportState.Ready this.emit('ready') }) - .catch((err) => this.emit('error', err)) + .catch(err => this.emit('error', err)) } async send(bytes: Uint8Array): Promise { @@ -187,5 +190,5 @@ export abstract class BaseWebSocketTransport extends EventEmitter implements ITe } export class WebSocketTransport extends BaseWebSocketTransport { - _packetCodec = new ObfuscatedPacketCodec(new IntermediatePacketCodec()) + _packetCodec: ObfuscatedPacketCodec = new ObfuscatedPacketCodec(new IntermediatePacketCodec()) } diff --git a/packages/web/src/worker.ts b/packages/web/src/worker.ts index 5e38206f..40c527d3 100644 --- a/packages/web/src/worker.ts +++ b/packages/web/src/worker.ts @@ -1,16 +1,18 @@ import { setPlatform } from '@mtcute/core/platform.js' -import { +import type { ClientMessageHandler, RespondFn, SendFn, SomeWorker, - TelegramWorker as TelegramWorkerBase, TelegramWorkerOptions, - TelegramWorkerPort as TelegramWorkerPortBase, TelegramWorkerPortOptions, WorkerCustomMethods, WorkerMessageHandler, } from '@mtcute/core/worker.js' +import { + TelegramWorker as TelegramWorkerBase, + TelegramWorkerPort as TelegramWorkerPortBase, +} from '@mtcute/core/worker.js' import { WebPlatform } from './platform.js' @@ -78,7 +80,7 @@ export class TelegramWorker extends TelegramWorke return } - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + // eslint-disable-next-line ts/no-unsafe-argument handler(message.data, respond) }) port.start() @@ -90,7 +92,7 @@ export class TelegramWorker extends TelegramWorke if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) { const respond: RespondFn = self.postMessage.bind(self) - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + // eslint-disable-next-line ts/no-unsafe-argument self.addEventListener('message', (message: MessageEvent) => handler(message.data, respond)) return respond @@ -113,7 +115,7 @@ export class TelegramWorkerPort extends TelegramW const send: SendFn = worker.postMessage.bind(worker) const messageHandler = (ev: MessageEvent) => { - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + // eslint-disable-next-line ts/no-unsafe-argument handler(ev.data) } @@ -145,14 +147,13 @@ export class TelegramWorkerPort extends TelegramW return } - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + // eslint-disable-next-line ts/no-unsafe-argument handler(ev.data) } worker.port.addEventListener('message', messageHandler) worker.port.start() - // eslint-disable-next-line prefer-const let cancelBeforeExit: () => void const close = () => { diff --git a/packages/web/tsconfig.json b/packages/web/tsconfig.json index 919db0b1..3b5437ec 100644 --- a/packages/web/tsconfig.json +++ b/packages/web/tsconfig.json @@ -1,13 +1,13 @@ { - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "./dist/esm", - "rootDir": "./src" - }, - "include": [ - "./src", - ], - "references": [ - { "path": "../core" }, - ] + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./dist/esm" + }, + "references": [ + { "path": "../core" } + ], + "include": [ + "./src" + ] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cf34ad80..8fa5f2c5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,39 +8,36 @@ importers: .: devDependencies: + '@antfu/eslint-config': + specifier: 2.26.0 + version: 2.26.0(@typescript-eslint/utils@8.1.0(eslint@9.9.0)(typescript@5.5.4))(@vue/compiler-sfc@3.4.37)(eslint@9.9.0)(typescript@5.5.4)(vitest@2.0.5(@types/node@20.10.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5)) '@teidesu/slow-types-compiler': specifier: 1.1.0 - version: 1.1.0(typescript@5.4.3) + version: 1.1.0(typescript@5.5.4) '@types/deno': - specifier: npm:@teidesu/deno-types@1.43.1 - version: '@teidesu/deno-types@1.43.1' + specifier: npm:@teidesu/deno-types@1.45.5 + version: '@teidesu/deno-types@1.45.5' '@types/node': specifier: 20.10.0 version: 20.10.0 '@types/ws': specifier: 8.5.4 version: 8.5.4 - '@typescript-eslint/eslint-plugin': - specifier: 6.4.0 - version: 6.4.0(@typescript-eslint/parser@6.4.0(eslint@8.47.0)(typescript@5.4.3))(eslint@8.47.0)(typescript@5.4.3) - '@typescript-eslint/parser': - specifier: 6.4.0 - version: 6.4.0(eslint@8.47.0)(typescript@5.4.3) '@vitest/browser': - specifier: 1.4.0 - version: 1.4.0(playwright@1.42.1)(vitest@1.4.0) + specifier: 2.0.5 + version: 2.0.5(playwright@1.42.1)(typescript@5.5.4)(vitest@2.0.5) '@vitest/coverage-v8': - specifier: 1.4.0 - version: 1.4.0(vitest@1.4.0(@types/node@20.10.0)(@vitest/browser@1.4.0)(@vitest/ui@1.4.0)) + specifier: 2.0.5 + version: 2.0.5(vitest@2.0.5(@types/node@20.10.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5)) '@vitest/expect': - specifier: 1.4.0 - version: 1.4.0 + specifier: 2.0.5 + version: 2.0.5 '@vitest/spy': - specifier: 1.4.0 - version: 1.4.0 + specifier: 2.0.5 + version: 2.0.5 '@vitest/ui': - specifier: 1.4.0 - version: 1.4.0(vitest@1.4.0) + specifier: 2.0.5 + version: 2.0.5(vitest@2.0.5) chai: specifier: 5.1.0 version: 5.1.0 @@ -48,68 +45,47 @@ importers: specifier: 1.2.3 version: 1.2.3 dotenv-flow: - specifier: 3.2.0 - version: 3.2.0 + specifier: 4.1.0 + version: 4.1.0 dpdm: specifier: 3.14.0 version: 3.14.0 esbuild: - specifier: 0.18.20 - version: 0.18.20 + specifier: 0.23.0 + version: 0.23.0 eslint: - specifier: 8.47.0 - version: 8.47.0 - eslint-config-prettier: - specifier: 8.8.0 - version: 8.8.0(eslint@8.47.0) - eslint-import-resolver-typescript: - specifier: 3.6.0 - version: 3.6.0(@typescript-eslint/parser@6.4.0(eslint@8.47.0)(typescript@5.4.3))(eslint-plugin-import@2.28.0)(eslint@8.47.0) - eslint-plugin-ascii: - specifier: 1.0.0 - version: 1.0.0 - eslint-plugin-import: - specifier: 2.28.0 - version: 2.28.0(@typescript-eslint/parser@6.4.0(eslint@8.47.0)(typescript@5.4.3))(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0) - eslint-plugin-simple-import-sort: - specifier: 10.0.0 - version: 10.0.0(eslint@8.47.0) + specifier: 9.9.0 + version: 9.9.0 glob: - specifier: 10.2.6 - version: 10.2.6 + specifier: 11.0.0 + version: 11.0.0 playwright: specifier: 1.42.1 version: 1.42.1 - prettier: - specifier: 3.0.3 - version: 3.0.3 rimraf: - specifier: 5.0.1 - version: 5.0.1 + specifier: 6.0.1 + version: 6.0.1 semver: specifier: 7.5.1 version: 7.5.1 - ts-node: - specifier: 10.9.1 - version: 10.9.1(@types/node@20.10.0)(typescript@5.4.3) - tsconfig-paths: - specifier: 4.2.0 - version: 4.2.0 + tsx: + specifier: 4.17.0 + version: 4.17.0 typedoc: - specifier: 0.25.12 - version: 0.25.12(typescript@5.4.3) + specifier: 0.26.5 + version: 0.26.5(typescript@5.5.4) typescript: - specifier: 5.4.3 - version: 5.4.3 + specifier: 5.5.4 + version: 5.5.4 vite: specifier: 5.1.6 version: 5.1.6(@types/node@20.10.0) vite-plugin-node-polyfills: - specifier: 0.21.0 - version: 0.21.0(rollup@4.13.0)(vite@5.1.6(@types/node@20.10.0)) + specifier: 0.22.0 + version: 0.22.0(rollup@4.13.0)(vite@5.1.6(@types/node@20.10.0)) vitest: - specifier: 1.4.0 - version: 1.4.0(@types/node@20.10.0)(@vitest/browser@1.4.0)(@vitest/ui@1.4.0) + specifier: 2.0.5 + version: 2.0.5(@types/node@20.10.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5) packages/bun: dependencies: @@ -183,8 +159,8 @@ importers: specifier: 7.0.3 version: 7.0.3 glob: - specifier: 10.2.6 - version: 10.2.6 + specifier: 11.0.0 + version: 11.0.0 handlebars: specifier: 4.7.8 version: 4.7.8 @@ -363,8 +339,8 @@ importers: specifier: 5.2.3 version: 5.2.3 vitest: - specifier: ^1.4.0 - version: 1.4.0(@types/node@20.10.0)(@vitest/browser@1.4.0)(@vitest/ui@1.4.0) + specifier: '*' + version: 2.0.5(@types/node@20.10.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5) devDependencies: '@mtcute/tl-utils': specifier: workspace:^ @@ -454,29 +430,126 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} + '@antfu/eslint-config@2.26.0': + resolution: {integrity: sha512-eGYHHyXeajqaeNk+IAH8vGeIugcx21M2heJ/K/H72MuuDC8tCe0PlI0UkKHv63fMP1G5Em1KepOc/Aov/Erwaw==} + hasBin: true + peerDependencies: + '@eslint-react/eslint-plugin': ^1.5.8 + '@prettier/plugin-xml': ^3.4.1 + '@unocss/eslint-plugin': '>=0.50.0' + astro-eslint-parser: ^1.0.2 + eslint: '>=8.40.0' + eslint-plugin-astro: ^1.2.0 + eslint-plugin-format: '>=0.1.0' + eslint-plugin-react-hooks: ^4.6.0 + eslint-plugin-react-refresh: ^0.4.4 + eslint-plugin-solid: ^0.13.2 + eslint-plugin-svelte: '>=2.35.1' + prettier-plugin-astro: ^0.13.0 + prettier-plugin-slidev: ^1.0.5 + svelte-eslint-parser: '>=0.37.0' + peerDependenciesMeta: + '@eslint-react/eslint-plugin': + optional: true + '@prettier/plugin-xml': + optional: true + '@unocss/eslint-plugin': + optional: true + astro-eslint-parser: + optional: true + eslint-plugin-astro: + optional: true + eslint-plugin-format: + optional: true + eslint-plugin-react-hooks: + optional: true + eslint-plugin-react-refresh: + optional: true + eslint-plugin-solid: + optional: true + eslint-plugin-svelte: + optional: true + prettier-plugin-astro: + optional: true + prettier-plugin-slidev: + optional: true + svelte-eslint-parser: + optional: true + + '@antfu/install-pkg@0.3.5': + resolution: {integrity: sha512-HwIACY0IzrM7FGafMbWZOqEDBSfCwPcylu+GacaRcxJm4Yvvuh3Dy2vZwqdJAzXponc6aLO9FaH4l75pq8/ZSA==} + + '@antfu/utils@0.7.10': + resolution: {integrity: sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww==} + + '@babel/code-frame@7.24.7': + resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} + engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@7.23.4': resolution: {integrity: sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==} engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@7.24.8': + resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==} + engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.22.20': resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} engines: {node: '>=6.9.0'} - '@babel/parser@7.24.0': - resolution: {integrity: sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg==} + '@babel/helper-validator-identifier@7.24.7': + resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} + engines: {node: '>=6.9.0'} + + '@babel/highlight@7.24.7': + resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} + engines: {node: '>=6.9.0'} + + '@babel/parser@7.25.3': + resolution: {integrity: sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw==} engines: {node: '>=6.0.0'} hasBin: true + '@babel/runtime@7.25.0': + resolution: {integrity: sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw==} + engines: {node: '>=6.9.0'} + '@babel/types@7.24.0': resolution: {integrity: sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==} engines: {node: '>=6.9.0'} + '@babel/types@7.25.2': + resolution: {integrity: sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q==} + engines: {node: '>=6.9.0'} + '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} - '@cspotcode/source-map-support@0.8.1': - resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} - engines: {node: '>=12'} + '@bundled-es-modules/cookie@2.0.0': + resolution: {integrity: sha512-Or6YHg/kamKHpxULAdSqhGqnWFneIXu1NKvvfBBzKGwpVsYuFIQ5aBPHDnnoR3ghW1nvSkALd+EF9iMtY7Vjxw==} + + '@bundled-es-modules/statuses@1.0.1': + resolution: {integrity: sha512-yn7BklA5acgcBr+7w064fGV+SGIFySjCKpqjcWgBAIfrAkY+4GQTJJHQMeT3V/sgz23VTEVV8TtOmkvJAhFVfg==} + + '@bundled-es-modules/tough-cookie@0.1.6': + resolution: {integrity: sha512-dvMHbL464C0zI+Yqxbz6kZ5TOEp7GLW+pry/RWndAR8MJQAXZ2rPmIs8tziTZjeIyhSNZgZbCePtfSbdWqStJw==} + + '@clack/core@0.3.4': + resolution: {integrity: sha512-H4hxZDXgHtWTwV3RAVenqcC4VbJZNegbBjlPvzOzCouXtS2y3sDvlO3IsbrPNWuLWPPlYVYPghQdSF64683Ldw==} + + '@clack/prompts@0.7.0': + resolution: {integrity: sha512-0MhX9/B4iL6Re04jPrttDm+BsP8y6mS7byuv0BvXgdXhbV5PdlsHt55dvNsuBCPZ7xq1oTAOOuotR9NFbQyMSA==} + bundledDependencies: + - is-unicode-supported + + '@es-joy/jsdoccomment@0.43.1': + resolution: {integrity: sha512-I238eDtOolvCuvtxrnqtlBaw0BwdQuYqK7eA6XIonicMdOOOb75mqdIzkGDUbS04+1Di007rgm9snFRNeVrOog==} + engines: {node: '>=16'} + + '@es-joy/jsdoccomment@0.48.0': + resolution: {integrity: sha512-G6QUWIcC+KvSwXNsJyDTHvqUdNoAVJPPgkc3+Uk4WBKqZvoXhlvazOgm9aL0HwihJLQf0l+tOE2UFzXBqCqgDw==} + engines: {node: '>=16'} '@esbuild/aix-ppc64@0.19.12': resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} @@ -484,11 +557,11 @@ packages: cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.18.20': - resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] + '@esbuild/aix-ppc64@0.23.0': + resolution: {integrity: sha512-3sG8Zwa5fMcA9bgqB8AfWPQ+HFke6uD3h1s3RIwUNK8EG7a4buxvuFTs3j1IMs2NXAk9F30C/FF4vxRgQCcmoQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] '@esbuild/android-arm64@0.19.12': resolution: {integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==} @@ -496,10 +569,10 @@ packages: cpu: [arm64] os: [android] - '@esbuild/android-arm@0.18.20': - resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} - engines: {node: '>=12'} - cpu: [arm] + '@esbuild/android-arm64@0.23.0': + resolution: {integrity: sha512-EuHFUYkAVfU4qBdyivULuu03FhJO4IJN9PGuABGrFy4vUuzk91P2d+npxHcFdpUnfYKy0PuV+n6bKIpHOB3prQ==} + engines: {node: '>=18'} + cpu: [arm64] os: [android] '@esbuild/android-arm@0.19.12': @@ -508,10 +581,10 @@ packages: cpu: [arm] os: [android] - '@esbuild/android-x64@0.18.20': - resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} - engines: {node: '>=12'} - cpu: [x64] + '@esbuild/android-arm@0.23.0': + resolution: {integrity: sha512-+KuOHTKKyIKgEEqKbGTK8W7mPp+hKinbMBeEnNzjJGyFcWsfrXjSTNluJHCY1RqhxFurdD8uNXQDei7qDlR6+g==} + engines: {node: '>=18'} + cpu: [arm] os: [android] '@esbuild/android-x64@0.19.12': @@ -520,11 +593,11 @@ packages: cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.18.20': - resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] + '@esbuild/android-x64@0.23.0': + resolution: {integrity: sha512-WRrmKidLoKDl56LsbBMhzTTBxrsVwTKdNbKDalbEZr0tcsBgCLbEtoNthOW6PX942YiYq8HzEnb4yWQMLQuipQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] '@esbuild/darwin-arm64@0.19.12': resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==} @@ -532,10 +605,10 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.18.20': - resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} - engines: {node: '>=12'} - cpu: [x64] + '@esbuild/darwin-arm64@0.23.0': + resolution: {integrity: sha512-YLntie/IdS31H54Ogdn+v50NuoWF5BDkEUFpiOChVa9UnKpftgwzZRrI4J132ETIi+D8n6xh9IviFV3eXdxfow==} + engines: {node: '>=18'} + cpu: [arm64] os: [darwin] '@esbuild/darwin-x64@0.19.12': @@ -544,11 +617,11 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.18.20': - resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] + '@esbuild/darwin-x64@0.23.0': + resolution: {integrity: sha512-IMQ6eme4AfznElesHUPDZ+teuGwoRmVuuixu7sv92ZkdQcPbsNHzutd+rAfaBKo8YK3IrBEi9SLLKWJdEvJniQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] '@esbuild/freebsd-arm64@0.19.12': resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==} @@ -556,10 +629,10 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.18.20': - resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} - engines: {node: '>=12'} - cpu: [x64] + '@esbuild/freebsd-arm64@0.23.0': + resolution: {integrity: sha512-0muYWCng5vqaxobq6LB3YNtevDFSAZGlgtLoAc81PjUfiFz36n4KMpwhtAd4he8ToSI3TGyuhyx5xmiWNYZFyw==} + engines: {node: '>=18'} + cpu: [arm64] os: [freebsd] '@esbuild/freebsd-x64@0.19.12': @@ -568,11 +641,11 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.18.20': - resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] + '@esbuild/freebsd-x64@0.23.0': + resolution: {integrity: sha512-XKDVu8IsD0/q3foBzsXGt/KjD/yTKBCIwOHE1XwiXmrRwrX6Hbnd5Eqn/WvDekddK21tfszBSrE/WMaZh+1buQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] '@esbuild/linux-arm64@0.19.12': resolution: {integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==} @@ -580,10 +653,10 @@ packages: cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.18.20': - resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} - engines: {node: '>=12'} - cpu: [arm] + '@esbuild/linux-arm64@0.23.0': + resolution: {integrity: sha512-j1t5iG8jE7BhonbsEg5d9qOYcVZv/Rv6tghaXM/Ug9xahM0nX/H2gfu6X6z11QRTMT6+aywOMA8TDkhPo8aCGw==} + engines: {node: '>=18'} + cpu: [arm64] os: [linux] '@esbuild/linux-arm@0.19.12': @@ -592,10 +665,10 @@ packages: cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.18.20': - resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} - engines: {node: '>=12'} - cpu: [ia32] + '@esbuild/linux-arm@0.23.0': + resolution: {integrity: sha512-SEELSTEtOFu5LPykzA395Mc+54RMg1EUgXP+iw2SJ72+ooMwVsgfuwXo5Fn0wXNgWZsTVHwY2cg4Vi/bOD88qw==} + engines: {node: '>=18'} + cpu: [arm] os: [linux] '@esbuild/linux-ia32@0.19.12': @@ -604,10 +677,10 @@ packages: cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.18.20': - resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} - engines: {node: '>=12'} - cpu: [loong64] + '@esbuild/linux-ia32@0.23.0': + resolution: {integrity: sha512-P7O5Tkh2NbgIm2R6x1zGJJsnacDzTFcRWZyTTMgFdVit6E98LTxO+v8LCCLWRvPrjdzXHx9FEOA8oAZPyApWUA==} + engines: {node: '>=18'} + cpu: [ia32] os: [linux] '@esbuild/linux-loong64@0.19.12': @@ -616,10 +689,10 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.18.20': - resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} - engines: {node: '>=12'} - cpu: [mips64el] + '@esbuild/linux-loong64@0.23.0': + resolution: {integrity: sha512-InQwepswq6urikQiIC/kkx412fqUZudBO4SYKu0N+tGhXRWUqAx+Q+341tFV6QdBifpjYgUndV1hhMq3WeJi7A==} + engines: {node: '>=18'} + cpu: [loong64] os: [linux] '@esbuild/linux-mips64el@0.19.12': @@ -628,10 +701,10 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.18.20': - resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} - engines: {node: '>=12'} - cpu: [ppc64] + '@esbuild/linux-mips64el@0.23.0': + resolution: {integrity: sha512-J9rflLtqdYrxHv2FqXE2i1ELgNjT+JFURt/uDMoPQLcjWQA5wDKgQA4t/dTqGa88ZVECKaD0TctwsUfHbVoi4w==} + engines: {node: '>=18'} + cpu: [mips64el] os: [linux] '@esbuild/linux-ppc64@0.19.12': @@ -640,10 +713,10 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.18.20': - resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} - engines: {node: '>=12'} - cpu: [riscv64] + '@esbuild/linux-ppc64@0.23.0': + resolution: {integrity: sha512-cShCXtEOVc5GxU0fM+dsFD10qZ5UpcQ8AM22bYj0u/yaAykWnqXJDpd77ublcX6vdDsWLuweeuSNZk4yUxZwtw==} + engines: {node: '>=18'} + cpu: [ppc64] os: [linux] '@esbuild/linux-riscv64@0.19.12': @@ -652,10 +725,10 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.18.20': - resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} - engines: {node: '>=12'} - cpu: [s390x] + '@esbuild/linux-riscv64@0.23.0': + resolution: {integrity: sha512-HEtaN7Y5UB4tZPeQmgz/UhzoEyYftbMXrBCUjINGjh3uil+rB/QzzpMshz3cNUxqXN7Vr93zzVtpIDL99t9aRw==} + engines: {node: '>=18'} + cpu: [riscv64] os: [linux] '@esbuild/linux-s390x@0.19.12': @@ -664,10 +737,10 @@ packages: cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.18.20': - resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} - engines: {node: '>=12'} - cpu: [x64] + '@esbuild/linux-s390x@0.23.0': + resolution: {integrity: sha512-WDi3+NVAuyjg/Wxi+o5KPqRbZY0QhI9TjrEEm+8dmpY9Xir8+HE/HNx2JoLckhKbFopW0RdO2D72w8trZOV+Wg==} + engines: {node: '>=18'} + cpu: [s390x] os: [linux] '@esbuild/linux-x64@0.19.12': @@ -676,11 +749,11 @@ packages: cpu: [x64] os: [linux] - '@esbuild/netbsd-x64@0.18.20': - resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} - engines: {node: '>=12'} + '@esbuild/linux-x64@0.23.0': + resolution: {integrity: sha512-a3pMQhUEJkITgAw6e0bWA+F+vFtCciMjW/LPtoj99MhVt+Mfb6bbL9hu2wmTZgNd994qTAEw+U/r6k3qHWWaOQ==} + engines: {node: '>=18'} cpu: [x64] - os: [netbsd] + os: [linux] '@esbuild/netbsd-x64@0.19.12': resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==} @@ -688,10 +761,16 @@ packages: cpu: [x64] os: [netbsd] - '@esbuild/openbsd-x64@0.18.20': - resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} - engines: {node: '>=12'} + '@esbuild/netbsd-x64@0.23.0': + resolution: {integrity: sha512-cRK+YDem7lFTs2Q5nEv/HHc4LnrfBCbH5+JHu6wm2eP+d8OZNoSMYgPZJq78vqQ9g+9+nMuIsAO7skzphRXHyw==} + engines: {node: '>=18'} cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.23.0': + resolution: {integrity: sha512-suXjq53gERueVWu0OKxzWqk7NxiUWSUlrxoZK7usiF50C6ipColGR5qie2496iKGYNLhDZkPxBI3erbnYkU0rQ==} + engines: {node: '>=18'} + cpu: [arm64] os: [openbsd] '@esbuild/openbsd-x64@0.19.12': @@ -700,11 +779,11 @@ packages: cpu: [x64] os: [openbsd] - '@esbuild/sunos-x64@0.18.20': - resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} - engines: {node: '>=12'} + '@esbuild/openbsd-x64@0.23.0': + resolution: {integrity: sha512-6p3nHpby0DM/v15IFKMjAaayFhqnXV52aEmv1whZHX56pdkK+MEaLoQWj+H42ssFarP1PcomVhbsR4pkz09qBg==} + engines: {node: '>=18'} cpu: [x64] - os: [sunos] + os: [openbsd] '@esbuild/sunos-x64@0.19.12': resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==} @@ -712,11 +791,11 @@ packages: cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.18.20': - resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] + '@esbuild/sunos-x64@0.23.0': + resolution: {integrity: sha512-BFelBGfrBwk6LVrmFzCq1u1dZbG4zy/Kp93w2+y83Q5UGYF1d8sCzeLI9NXjKyujjBBniQa8R8PzLFAUrSM9OA==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] '@esbuild/win32-arm64@0.19.12': resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==} @@ -724,10 +803,10 @@ packages: cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.18.20': - resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} - engines: {node: '>=12'} - cpu: [ia32] + '@esbuild/win32-arm64@0.23.0': + resolution: {integrity: sha512-lY6AC8p4Cnb7xYHuIxQ6iYPe6MfO2CC43XXKo9nBXDb35krYt7KGhQnOkRGar5psxYkircpCqfbNDB4uJbS2jQ==} + engines: {node: '>=18'} + cpu: [arm64] os: [win32] '@esbuild/win32-ia32@0.19.12': @@ -736,10 +815,10 @@ packages: cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.18.20': - resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} - engines: {node: '>=12'} - cpu: [x64] + '@esbuild/win32-ia32@0.23.0': + resolution: {integrity: sha512-7L1bHlOTcO4ByvI7OXVI5pNN6HSu6pUQq9yodga8izeuB1KcT2UkHaH6118QJwopExPn0rMHIseCTx1CRo/uNA==} + engines: {node: '>=18'} + cpu: [ia32] os: [win32] '@esbuild/win32-x64@0.19.12': @@ -748,38 +827,67 @@ packages: cpu: [x64] os: [win32] + '@esbuild/win32-x64@0.23.0': + resolution: {integrity: sha512-Arm+WgUFLUATuoxCJcahGuk6Yj9Pzxd6l11Zb/2aAuv5kWWvvfhLFo2fni4uSK5vzlUdCGZ/BdV5tH8klj8p8g==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@eslint-community/eslint-plugin-eslint-comments@4.4.0': + resolution: {integrity: sha512-yljsWl5Qv3IkIRmJ38h3NrHXFCm4EUl55M8doGTF6hvzvFF8kRpextgSrg2dwHev9lzBZyafCr9RelGIyQm6fw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 + '@eslint-community/eslint-utils@4.4.0': resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/regexpp@4.5.1': - resolution: {integrity: sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==} + '@eslint-community/regexpp@4.11.0': + resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint-community/regexpp@4.6.2': - resolution: {integrity: sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + '@eslint/config-array@0.17.1': + resolution: {integrity: sha512-BlYOpej8AQ8Ev9xVqroV7a02JK3SkBAaN9GfMMH9W6Ch8FlQlkjGw4Ir7+FgYwfirivAf4t+GtzuAxqfukmISA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/eslintrc@2.1.2': - resolution: {integrity: sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/eslintrc@3.1.0': + resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@8.47.0': - resolution: {integrity: sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/js@9.9.0': + resolution: {integrity: sha512-hhetes6ZHP3BlXLxmd8K2SNgkhNSi+UcecbnwWKwpP7kyi/uC75DJ1lOOBO3xrC4jyojtGE3YxKZPHfk4yrgug==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@humanwhocodes/config-array@0.11.10': - resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==} - engines: {node: '>=10.10.0'} + '@eslint/object-schema@2.1.4': + resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/object-schema@1.2.1': - resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} + '@humanwhocodes/retry@0.3.0': + resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} + engines: {node: '>=18.18'} + + '@inquirer/confirm@3.1.22': + resolution: {integrity: sha512-gsAKIOWBm2Q87CDfs9fEo7wJT3fwWIJfnDGMn9Qy74gBnNFOACDNfhUzovubbJjWnKLGBln7/NcSmZwj5DuEXg==} + engines: {node: '>=18'} + + '@inquirer/core@9.0.10': + resolution: {integrity: sha512-TdESOKSVwf6+YWDz8GhS6nKscwzkIyakEzCLJ5Vh6O3Co2ClhCJ0A4MG909MUWfaWdpJm7DE45ii51/2Kat9tA==} + engines: {node: '>=18'} + + '@inquirer/figures@1.0.5': + resolution: {integrity: sha512-79hP/VWdZ2UVc9bFGJnoQ/lQMpL74mGgzSYX1xUqCVk7/v73vJCMw1VuyWN1jGkZ9B3z7THAbySqGbCNefcjfA==} + engines: {node: '>=18'} + + '@inquirer/type@1.5.2': + resolution: {integrity: sha512-w9qFkumYDCNyDZmNQjf/n6qQuvQ4dMC3BJesY4oF+yr0CxR5vxujflAVeIcS6U336uzi9GM0kAfZlLrZ9UTkpA==} + engines: {node: '>=18'} '@isaacs/cliui@8.0.2': resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} @@ -789,18 +897,10 @@ packages: resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} engines: {node: '>=8'} - '@jest/schemas@29.6.3': - resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - '@jridgewell/gen-mapping@0.3.5': resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} engines: {node: '>=6.0.0'} - '@jridgewell/resolve-uri@3.0.6': - resolution: {integrity: sha512-R7xHtBSNm+9SyvpJkdQl+qrM3Hm2fea3Ef197M3mUug+v+yR+Rhfbs7PBtcBUVnIWJ4JcAdjvij+c8hXS9p5aw==} - engines: {node: '>=6.0.0'} - '@jridgewell/resolve-uri@3.1.2': resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} engines: {node: '>=6.0.0'} @@ -809,17 +909,18 @@ packages: resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} engines: {node: '>=6.0.0'} - '@jridgewell/sourcemap-codec@1.4.11': - resolution: {integrity: sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==} - '@jridgewell/sourcemap-codec@1.4.15': resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} - '@jridgewell/trace-mapping@0.3.9': - resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + '@jsdevtools/ez-spawn@3.0.4': + resolution: {integrity: sha512-f5DRIOZf7wxogefH03RjMPMdBF7ADTWUMoOs9kaJo06EfwF+aFhMZMDZxHg/Xe12hptN9xoZjGso2fdjapBRIA==} + engines: {node: '>=10'} '@jsr/db__sqlite@0.11.1': resolution: {integrity: sha512-6IKyfi+TQan431kwOy3WrdzgKwITuDdSKfq6nkWINfNWknPQ+lQ6/R008bAUUz+AwW8e0prxi3IMMxzELUV8Lw==, tarball: https://npm.jsr.io/~/8/@jsr/db__sqlite/0.11.1.tgz} @@ -867,6 +968,10 @@ packages: resolution: {integrity: sha512-ccfcIDlogiXNq5KcbAwbaO7lMh3Tm1i3khMPYpxlK8hH/W53zN81KM9coerRLOnTGu3nfXIniAmQbRI9OxbC0w==} engines: {node: '>= 0.4'} + '@mswjs/interceptors@0.29.1': + resolution: {integrity: sha512-3rDakgJZ77+RiQUuSK69t1F0m8BQKA8Vh5DCS5V0DWvNY67zob2JhhQrhCO0AKLGINTRSFd1tBaHcJTkhefoSw==} + engines: {node: '>=18'} + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -879,10 +984,23 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} + '@open-draft/deferred-promise@2.2.0': + resolution: {integrity: sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==} + + '@open-draft/logger@0.3.0': + resolution: {integrity: sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ==} + + '@open-draft/until@2.1.0': + resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==} + '@pkgjs/parseargs@0.11.0': resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} + '@pkgr/core@0.1.1': + resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} + engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + '@polka/url@1.0.0-next.25': resolution: {integrity: sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==} @@ -969,11 +1087,40 @@ packages: cpu: [x64] os: [win32] - '@sinclair/typebox@0.27.8': - resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} + '@shikijs/core@1.12.1': + resolution: {integrity: sha512-biCz/mnkMktImI6hMfMX3H9kOeqsInxWEyCHbSlL8C/2TR1FqfmGxTLRNwYCKsyCyxWLbB8rEqXRVZuyxuLFmA==} - '@teidesu/deno-types@1.43.1': - resolution: {integrity: sha512-jzXpp07pu4035n3XJMkuBR1NAKquH0hA8dVwL7pMxoi8mWo7ki4uMz8KRpgGx78YYfyPuB91SKS5pnt2omKotQ==} + '@stylistic/eslint-plugin-js@2.6.4': + resolution: {integrity: sha512-kx1hS3xTvzxZLdr/DCU/dLBE++vcP97sHeEFX2QXhk1Ipa4K1rzPOLw1HCbf4mU3s+7kHP5eYpDe+QteEOFLug==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: '>=8.40.0' + + '@stylistic/eslint-plugin-jsx@2.6.4': + resolution: {integrity: sha512-bIvVhdtjmyu3S10V7QRIuawtCZSq9gRmzAX23ucjCOdSFzEwlq+di0IM0riBAvvQerrJL4SM6G3xgyPs8BSXIA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: '>=8.40.0' + + '@stylistic/eslint-plugin-plus@2.6.4': + resolution: {integrity: sha512-EuRvtxhf7Hv8OoMIePulP/6rBJIgPTu1l5GAm1780WcF1Cl8bOZXIn84Pdac5pNv6lVlzCOFm8MD3VE+2YROuA==} + peerDependencies: + eslint: '*' + + '@stylistic/eslint-plugin-ts@2.6.4': + resolution: {integrity: sha512-yxL8Hj6WkObw1jfiLpBzKy5yfxY6vwlwO4miq34ySErUjUecPV5jxfVbOe4q1QDPKemQGPq93v7sAQS5PzM8lA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: '>=8.40.0' + + '@stylistic/eslint-plugin@2.6.4': + resolution: {integrity: sha512-euUGnjzH8EOqEYTGk9dB2OBINp0FX1nuO7/k4fO82zNRBIKZgJoDwTLM4Ce+Om6W1Qmh1PrZjCr4jh4tMEXGPQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: '>=8.40.0' + + '@teidesu/deno-types@1.45.5': + resolution: {integrity: sha512-TDfzm5SfH1rEhWphkq8yDpW9VXzK2olrL8vyqk59epjZCwixBlwk4whAYdWuTnHLDw9U08RVIt+k7Z+xbKDZJw==} '@teidesu/slow-types-compiler@1.1.0': resolution: {integrity: sha512-+WUHSKh56B32Jk5aJgXf07E2EOkMX1yilvgKLKBCJPFAJZ4xeo1U5aDu3wwHX3lrFl7AiVGXUP+FfuHy8X43BA==} @@ -981,47 +1128,60 @@ packages: peerDependencies: typescript: ^5.0.0 + '@testing-library/dom@10.4.0': + resolution: {integrity: sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==} + engines: {node: '>=18'} + + '@testing-library/user-event@14.5.2': + resolution: {integrity: sha512-YAh82Wh4TIrxYLmfGcixwD18oIjyC1pFQC2Y01F2lzV2HTMiYrI0nze0FD0ocB//CKS/7jIUgae+adPqxK5yCQ==} + engines: {node: '>=12', npm: '>=6'} + peerDependencies: + '@testing-library/dom': '>=7.21.4' + '@ts-morph/common@0.23.0': resolution: {integrity: sha512-m7Lllj9n/S6sOkCkRftpM7L24uvmfXQFedlW/4hENcuJH1HHm9u5EgxZb9uVjQSCGrbBWBkOGgcTxNg36r6ywA==} - '@tsconfig/node10@1.0.8': - resolution: {integrity: sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==} - - '@tsconfig/node12@1.0.9': - resolution: {integrity: sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==} - - '@tsconfig/node14@1.0.1': - resolution: {integrity: sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==} - - '@tsconfig/node16@1.0.2': - resolution: {integrity: sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==} + '@types/aria-query@5.0.4': + resolution: {integrity: sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==} '@types/better-sqlite3@7.6.4': resolution: {integrity: sha512-dzrRZCYPXIXfSR1/surNbJ/grU3scTaygS0OMzjlGf71i9sc2fGyHPXXiXmEvNIoE0cGwsanEFMVJxPXmco9Eg==} + '@types/cookie@0.6.0': + resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} + '@types/cross-spawn@6.0.6': resolution: {integrity: sha512-fXRhhUkG4H3TQk5dBhQ7m/JDdSNHKwR2BBia62lhwEIq9xGiQKLxd6LymNhn47SjXhsUEPmxi+PKw2OkW4LLjA==} + '@types/eslint@8.56.11': + resolution: {integrity: sha512-sVBpJMf7UPo/wGecYOpk2aQya2VUGeHhe38WG7/mN5FufNSubf5VT9Uh9Uyp8/eLJpu1/tuhJ/qTo4mhSB4V4Q==} + + '@types/eslint@9.6.0': + resolution: {integrity: sha512-gi6WQJ7cHRgZxtkQEoyHMppPjq9Kxo5Tjn2prSKDSmZrCz8TZ3jSRCeTJm+WoM+oB0WG37bRqLzaaU3q7JypGg==} + '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} '@types/events@3.0.0': resolution: {integrity: sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==} + '@types/hast@3.0.4': + resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} + '@types/inquirer@9.0.6': resolution: {integrity: sha512-1Go1AAP/yOy3Pth5Xf1DC3nfZ03cJLCPx6E2YnSN/5I3w1jHBVH4170DkZ+JxfmA7c9kL9+bf9z3FRGa4kNAqg==} - '@types/istanbul-lib-coverage@2.0.6': - resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} - '@types/js-yaml@4.0.5': resolution: {integrity: sha512-FhpRzf927MNQdRZP0J5DLIdTXhjLYzeUTmLAu69mnVksLH9CJY3IuSeEgbKUki7GQZm0WqDkGzyxju2EZGD2wA==} '@types/json-schema@7.0.12': resolution: {integrity: sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==} - '@types/json5@0.0.29': - resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} + '@types/mdast@3.0.15': + resolution: {integrity: sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==} + + '@types/mute-stream@0.0.4': + resolution: {integrity: sha512-CPM9nzrCPPJHQNA9keH9CVkVI+WR5kMa+7XEs5jcGQ0VoAGnLv242w8lIVgwAEfmE4oufJRaTc9PNLQl0ioAow==} '@types/node@20.10.0': resolution: {integrity: sha512-D0WfRmU9TQ8I9PFx9Yc+EBHw+vSpIub4IDvQivcp26PtPrdMGAq5SDcpXEo/epqa/DXotVpekHiLNTg3iaKXBQ==} @@ -1029,85 +1189,129 @@ packages: '@types/node@20.11.30': resolution: {integrity: sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw==} + '@types/node@22.2.0': + resolution: {integrity: sha512-bm6EG6/pCpkxDf/0gDNDdtDILMOHgaQBVOJGdwsqClnxA3xL6jtMv76rLBc006RVMWbmaf0xbmom4Z/5o2nRkQ==} + + '@types/normalize-package-data@2.4.4': + resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} + '@types/openurl@1.0.3': resolution: {integrity: sha512-rdWpxNve8iUBizep3BwjGzcdfk2XeXeeFiMwIgLN6dAKxCusfFC6H9XVvfPeNObRFpSgqI+HVmoG7UOB9HEnBQ==} - '@types/semver@7.5.0': - resolution: {integrity: sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==} + '@types/statuses@2.0.5': + resolution: {integrity: sha512-jmIUGWrAiwu3dZpxntxieC+1n/5c3mjrImkmOSQ2NC5uP6cYO4aAZDdSmRcI5C1oiTmqlZGHC+/NmJrKogbP5A==} '@types/through@0.0.32': resolution: {integrity: sha512-7XsfXIsjdfJM2wFDRAtEWp3zb2aVPk5QeyZxGlVK57q4u26DczMHhJmlhr0Jqv0THwxam/L8REXkj8M2I/lcvw==} + '@types/tough-cookie@4.0.5': + resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==} + + '@types/unist@2.0.10': + resolution: {integrity: sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==} + + '@types/unist@3.0.2': + resolution: {integrity: sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==} + + '@types/wrap-ansi@3.0.0': + resolution: {integrity: sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==} + '@types/ws@8.5.10': resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==} '@types/ws@8.5.4': resolution: {integrity: sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==} - '@typescript-eslint/eslint-plugin@6.4.0': - resolution: {integrity: sha512-62o2Hmc7Gs3p8SLfbXcipjWAa6qk2wZGChXG2JbBtYpwSRmti/9KHLqfbLs9uDigOexG+3PaQ9G2g3201FWLKg==} - engines: {node: ^16.0.0 || >=18.0.0} + '@typescript-eslint/eslint-plugin@8.1.0': + resolution: {integrity: sha512-LlNBaHFCEBPHyD4pZXb35mzjGkuGKXU5eeCA1SxvHfiRES0E82dOounfVpL4DCqYvJEKab0bZIA0gCRpdLKkCw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha - eslint: ^7.0.0 || ^8.0.0 + '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true - '@typescript-eslint/parser@6.4.0': - resolution: {integrity: sha512-I1Ah1irl033uxjxO9Xql7+biL3YD7w9IU8zF+xlzD/YxY6a4b7DYA08PXUUCbm2sEljwJF6ERFy2kTGAGcNilg==} - engines: {node: ^16.0.0 || >=18.0.0} + '@typescript-eslint/parser@8.1.0': + resolution: {integrity: sha512-U7iTAtGgJk6DPX9wIWPPOlt1gO57097G06gIcl0N0EEnNw8RGD62c+2/DiP/zL7KrkqnnqF7gtFGR7YgzPllTA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^7.0.0 || ^8.0.0 + eslint: ^8.57.0 || ^9.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true - '@typescript-eslint/scope-manager@6.4.0': - resolution: {integrity: sha512-TUS7vaKkPWDVvl7GDNHFQMsMruD+zhkd3SdVW0d7b+7Zo+bd/hXJQ8nsiUZMi1jloWo6c9qt3B7Sqo+flC1nig==} - engines: {node: ^16.0.0 || >=18.0.0} + '@typescript-eslint/scope-manager@7.18.0': + resolution: {integrity: sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==} + engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/type-utils@6.4.0': - resolution: {integrity: sha512-TvqrUFFyGY0cX3WgDHcdl2/mMCWCDv/0thTtx/ODMY1QhEiyFtv/OlLaNIiYLwRpAxAtOLOY9SUf1H3Q3dlwAg==} - engines: {node: ^16.0.0 || >=18.0.0} - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true + '@typescript-eslint/scope-manager@8.1.0': + resolution: {integrity: sha512-DsuOZQji687sQUjm4N6c9xABJa7fjvfIdjqpSIIVOgaENf2jFXiM9hIBZOL3hb6DHK9Nvd2d7zZnoMLf9e0OtQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@6.4.0': - resolution: {integrity: sha512-+FV9kVFrS7w78YtzkIsNSoYsnOtrYVnKWSTVXoL1761CsCRv5wpDOINgsXpxD67YCLZtVQekDDyaxfjVWUJmmg==} - engines: {node: ^16.0.0 || >=18.0.0} - - '@typescript-eslint/typescript-estree@6.4.0': - resolution: {integrity: sha512-iDPJArf/K2sxvjOR6skeUCNgHR/tCQXBsa+ee1/clRKr3olZjZ/dSkXPZjG6YkPtnW6p5D1egeEPMCW6Gn4yLA==} - engines: {node: ^16.0.0 || >=18.0.0} + '@typescript-eslint/type-utils@8.1.0': + resolution: {integrity: sha512-oLYvTxljVvsMnldfl6jIKxTaU7ok7km0KDrwOt1RHYu6nxlhN3TIx8k5Q52L6wR33nOwDgM7VwW1fT1qMNfFIA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true - '@typescript-eslint/utils@6.4.0': - resolution: {integrity: sha512-BvvwryBQpECPGo8PwF/y/q+yacg8Hn/2XS+DqL/oRsOPK+RPt29h5Ui5dqOKHDlbXrAeHUTnyG3wZA0KTDxRZw==} - engines: {node: ^16.0.0 || >=18.0.0} + '@typescript-eslint/types@7.18.0': + resolution: {integrity: sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==} + engines: {node: ^18.18.0 || >=20.0.0} + + '@typescript-eslint/types@8.1.0': + resolution: {integrity: sha512-q2/Bxa0gMOu/2/AKALI0tCKbG2zppccnRIRCW6BaaTlRVaPKft4oVYPp7WOPpcnsgbr0qROAVCVKCvIQ0tbWog==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/typescript-estree@7.18.0': + resolution: {integrity: sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==} + engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: - eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true - '@typescript-eslint/visitor-keys@6.4.0': - resolution: {integrity: sha512-yJSfyT+uJm+JRDWYRYdCm2i+pmvXJSMtPR9Cq5/XQs4QIgNoLcoRtDdzsLbLsFM/c6um6ohQkg/MLxWvoIndJA==} - engines: {node: ^16.0.0 || >=18.0.0} + '@typescript-eslint/typescript-estree@8.1.0': + resolution: {integrity: sha512-NTHhmufocEkMiAord/g++gWKb0Fr34e9AExBRdqgWdVBaKoei2dIyYKD9Q0jBnvfbEA5zaf8plUFMUH6kQ0vGg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true - '@vitest/browser@1.4.0': - resolution: {integrity: sha512-kC44DzuqPZZrqe2P7SX2a3zHDAt919WtpkUMAxzv9eP5uPfVXtpk2Ipms2NXJGY5190aJc1uY+ambfJ3rwDJRA==} + '@typescript-eslint/utils@7.18.0': + resolution: {integrity: sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + + '@typescript-eslint/utils@8.1.0': + resolution: {integrity: sha512-ypRueFNKTIFwqPeJBfeIpxZ895PQhNyH4YID6js0UoBImWYoSjBsahUn9KMiJXh94uOjVBgHD9AmkyPsPnFwJA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + + '@typescript-eslint/visitor-keys@7.18.0': + resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==} + engines: {node: ^18.18.0 || >=20.0.0} + + '@typescript-eslint/visitor-keys@8.1.0': + resolution: {integrity: sha512-ba0lNI19awqZ5ZNKh6wCModMwoZs457StTebQ0q1NP58zSi2F6MOZRXwfKZy+jB78JNJ/WH8GSh2IQNzXX8Nag==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@vitest/browser@2.0.5': + resolution: {integrity: sha512-VbOYtu/6R3d7ASZREcrJmRY/sQuRFO9wMVsEDqfYbWiJRh2fDNi8CL1Csn7Ux31pOcPmmM5QvzFCMpiojvVh8g==} peerDependencies: playwright: '*' safaridriver: '*' - vitest: 1.4.0 + vitest: 2.0.5 webdriverio: '*' peerDependenciesMeta: playwright: @@ -1117,51 +1321,71 @@ packages: webdriverio: optional: true - '@vitest/coverage-v8@1.4.0': - resolution: {integrity: sha512-4hDGyH1SvKpgZnIByr9LhGgCEuF9DKM34IBLCC/fVfy24Z3+PZ+Ii9hsVBsHvY1umM1aGPEjceRkzxCfcQ10wg==} + '@vitest/coverage-v8@2.0.5': + resolution: {integrity: sha512-qeFcySCg5FLO2bHHSa0tAZAOnAUbp4L6/A5JDuj9+bt53JREl8hpLjLHEWF0e/gWc8INVpJaqA7+Ene2rclpZg==} peerDependencies: - vitest: 1.4.0 + vitest: 2.0.5 - '@vitest/expect@1.4.0': - resolution: {integrity: sha512-Jths0sWCJZ8BxjKe+p+eKsoqev1/T8lYcrjavEaz8auEJ4jAVY0GwW3JKmdVU4mmNPLPHixh4GNXP7GFtAiDHA==} - - '@vitest/runner@1.4.0': - resolution: {integrity: sha512-EDYVSmesqlQ4RD2VvWo3hQgTJ7ZrFQ2VSJdfiJiArkCerDAGeyF1i6dHkmySqk573jLp6d/cfqCN+7wUB5tLgg==} - - '@vitest/snapshot@1.4.0': - resolution: {integrity: sha512-saAFnt5pPIA5qDGxOHxJ/XxhMFKkUSBJmVt5VgDsAqPTX6JP326r5C/c9UuCMPoXNzuudTPsYDZCoJ5ilpqG2A==} - - '@vitest/spy@1.4.0': - resolution: {integrity: sha512-Ywau/Qs1DzM/8Uc+yA77CwSegizMlcgTJuYGAi0jujOteJOUf1ujunHThYo243KG9nAyWT3L9ifPYZ5+As/+6Q==} - - '@vitest/ui@1.4.0': - resolution: {integrity: sha512-XC6CMhN1gzYcGbpn6/Oanj4Au2EXwQEX6vpcOeLlZv8dy7g11Ukx8zwtYQbwxs9duK2s9j2o5rbQiCP5DPAcmw==} + '@vitest/eslint-plugin@1.0.3': + resolution: {integrity: sha512-7hTONh+lqN+TEimHy2aWVdHVqYohcxLGD4yYBwSVvhyiti/j9CqBNMQvOa6xLoVcEtaWAoCCDbYgvxwNqA4lsA==} peerDependencies: - vitest: 1.4.0 + '@typescript-eslint/utils': '>= 8.0' + eslint: '>= 8.57.0' + typescript: '>= 5.0.0' + vitest: '*' + peerDependenciesMeta: + '@typescript-eslint/utils': + optional: true + typescript: + optional: true + vitest: + optional: true - '@vitest/utils@1.4.0': - resolution: {integrity: sha512-mx3Yd1/6e2Vt/PUC98DcqTirtfxUyAZ32uK82r8rZzbtBeBo+nqgnjx/LvqQdWsrvNtm14VmurNgcf4nqY5gJg==} + '@vitest/expect@2.0.5': + resolution: {integrity: sha512-yHZtwuP7JZivj65Gxoi8upUN2OzHTi3zVfjwdpu2WrvCZPLwsJ2Ey5ILIPccoW23dd/zQBlJ4/dhi7DWNyXCpA==} + + '@vitest/pretty-format@2.0.5': + resolution: {integrity: sha512-h8k+1oWHfwTkyTkb9egzwNMfJAEx4veaPSnMeKbVSjp4euqGSbQlm5+6VHwTr7u4FJslVVsUG5nopCaAYdOmSQ==} + + '@vitest/runner@2.0.5': + resolution: {integrity: sha512-TfRfZa6Bkk9ky4tW0z20WKXFEwwvWhRY+84CnSEtq4+3ZvDlJyY32oNTJtM7AW9ihW90tX/1Q78cb6FjoAs+ig==} + + '@vitest/snapshot@2.0.5': + resolution: {integrity: sha512-SgCPUeDFLaM0mIUHfaArq8fD2WbaXG/zVXjRupthYfYGzc8ztbFbu6dUNOblBG7XLMR1kEhS/DNnfCZ2IhdDew==} + + '@vitest/spy@2.0.5': + resolution: {integrity: sha512-c/jdthAhvJdpfVuaexSrnawxZz6pywlTPe84LUB2m/4t3rl2fTo9NFGBG4oWgaD+FTgDDV8hJ/nibT7IfH3JfA==} + + '@vitest/ui@2.0.5': + resolution: {integrity: sha512-m+ZpVt/PVi/nbeRKEjdiYeoh0aOfI9zr3Ria9LO7V2PlMETtAXJS3uETEZkc8Be2oOl8mhd7Ew+5SRBXRYncNw==} + peerDependencies: + vitest: 2.0.5 + + '@vitest/utils@2.0.5': + resolution: {integrity: sha512-d8HKbqIcya+GR67mkZbrzhS5kKhtp8dQLcmRZLGTscGVg7yImT82cIrhtn2L8+VujWcy6KZweApgNmPsTAO/UQ==} + + '@vue/compiler-core@3.4.37': + resolution: {integrity: sha512-ZDDT/KiLKuCRXyzWecNzC5vTcubGz4LECAtfGPENpo0nrmqJHwuWtRLxk/Sb9RAKtR9iFflFycbkjkY+W/PZUQ==} + + '@vue/compiler-dom@3.4.37': + resolution: {integrity: sha512-rIiSmL3YrntvgYV84rekAtU/xfogMUJIclUMeIKEtVBFngOL3IeZHhsH3UaFEgB5iFGpj6IW+8YuM/2Up+vVag==} + + '@vue/compiler-sfc@3.4.37': + resolution: {integrity: sha512-vCfetdas40Wk9aK/WWf8XcVESffsbNkBQwS5t13Y/PcfqKfIwJX2gF+82th6dOpnpbptNMlMjAny80li7TaCIg==} + + '@vue/compiler-ssr@3.4.37': + resolution: {integrity: sha512-TyAgYBWrHlFrt4qpdACh8e9Ms6C/AZQ6A6xLJaWrCL8GCX5DxMzxyeFAEMfU/VFr4tylHm+a2NpfJpcd7+20XA==} + + '@vue/shared@3.4.37': + resolution: {integrity: sha512-nIh8P2fc3DflG8+5Uw8PT/1i17ccFn0xxN/5oE9RfV5SVnd7G0XEFRwakrnNFE/jlS95fpGXDVG5zDETS26nmg==} acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - acorn-walk@8.2.0: - resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} - engines: {node: '>=0.4.0'} - - acorn-walk@8.3.2: - resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} - engines: {node: '>=0.4.0'} - - acorn@8.10.0: - resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} - engines: {node: '>=0.4.0'} - hasBin: true - - acorn@8.11.3: - resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} + acorn@8.12.1: + resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} engines: {node: '>=0.4.0'} hasBin: true @@ -1180,8 +1404,9 @@ packages: resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} engines: {node: '>=12'} - ansi-sequence-parser@1.1.0: - resolution: {integrity: sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ==} + ansi-styles@3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} @@ -1195,8 +1420,9 @@ packages: resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} engines: {node: '>=12'} - arg@4.1.3: - resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} + are-docs-informative@0.0.2: + resolution: {integrity: sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==} + engines: {node: '>=14'} arg@5.0.2: resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} @@ -1204,38 +1430,19 @@ packages: argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - array-buffer-byte-length@1.0.0: - resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} - - array-includes@3.1.6: - resolution: {integrity: sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==} - engines: {node: '>= 0.4'} + aria-query@5.3.0: + resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==} array-union@2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} - array.prototype.findlastindex@1.2.2: - resolution: {integrity: sha512-tb5thFFlUcp7NdNF6/MpDk/1r/4awWG1FIz3YqDf+/zJSTezBb+/5WViH41obXULHVpDzoiCLpJ/ZO9YbJMsdw==} - engines: {node: '>= 0.4'} - - array.prototype.flat@1.3.1: - resolution: {integrity: sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==} - engines: {node: '>= 0.4'} - - array.prototype.flatmap@1.3.1: - resolution: {integrity: sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==} - engines: {node: '>= 0.4'} - asn1.js@4.10.1: resolution: {integrity: sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==} assert@2.1.0: resolution: {integrity: sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw==} - assertion-error@1.1.0: - resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} - assertion-error@2.0.1: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} @@ -1312,6 +1519,11 @@ packages: browserify-zlib@0.2.0: resolution: {integrity: sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==} + browserslist@4.23.3: + resolution: {integrity: sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} @@ -1321,6 +1533,10 @@ packages: buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + builtin-modules@3.3.0: + resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} + engines: {node: '>=6'} + builtin-status-codes@3.0.0: resolution: {integrity: sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==} @@ -1338,18 +1554,28 @@ packages: resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} engines: {node: '>= 0.4'} + call-me-maybe@1.0.2: + resolution: {integrity: sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==} + callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - chai@4.4.1: - resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==} - engines: {node: '>=4'} + caniuse-lite@1.0.30001651: + resolution: {integrity: sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg==} chai@5.1.0: resolution: {integrity: sha512-kDZ7MZyM6Q1DhR9jy7dalKohXQ2yrlXkk59CR52aRKxJrobmlBNqnFQxX9xOX8w+4mz8SYlKJa/7D7ddltFXCw==} engines: {node: '>=12'} + chai@5.1.1: + resolution: {integrity: sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==} + engines: {node: '>=12'} + + chalk@2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} + chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} @@ -1358,16 +1584,26 @@ packages: resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + character-entities-legacy@1.1.4: + resolution: {integrity: sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==} + + character-entities@1.2.4: + resolution: {integrity: sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==} + + character-reference-invalid@1.1.4: + resolution: {integrity: sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==} + chardet@0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} - check-error@1.0.3: - resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} - check-error@2.0.0: resolution: {integrity: sha512-tjLAOBHKVxtPoHe/SA7kNOMvhCRdCJ3vETdeY0RuAc9popf+hyaSV6ZEg9hr4cpWF7jmo/JSWEnLDrnijS9Tog==} engines: {node: '>= 16'} + check-error@2.1.1: + resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} + engines: {node: '>= 16'} + cheerio-select@2.1.0: resolution: {integrity: sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==} @@ -1378,12 +1614,20 @@ packages: chownr@1.1.4: resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} + ci-info@4.0.0: + resolution: {integrity: sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==} + engines: {node: '>=8'} + cipher-base@1.0.4: resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==} cjs-module-lexer@1.2.3: resolution: {integrity: sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==} + clean-regexp@1.0.0: + resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} + engines: {node: '>=4'} + cli-cursor@3.1.0: resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} engines: {node: '>=8'} @@ -1392,6 +1636,10 @@ packages: resolution: {integrity: sha512-jHgecW0pxkonBJdrKsqxgRX9AcG+u/5k0Q7WPDfi8AogLAdwxEkyYYNWwZ5GvVFoFx2uiY1eNcSK00fh+1+FyQ==} engines: {node: '>=6'} + cli-spinners@2.9.2: + resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} + engines: {node: '>=6'} + cli-width@4.1.0: resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} engines: {node: '>= 12'} @@ -1407,27 +1655,44 @@ packages: code-block-writer@13.0.1: resolution: {integrity: sha512-c5or4P6erEA69TxaxTNcHUNcIn+oyxSRTOWV+pSYF+z4epXqNvwvJ70XPGjPNgue83oAFAPBRQYwpAJ/Hpe/Sg==} + color-convert@1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} + color-name@1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} + comment-parser@1.4.1: + resolution: {integrity: sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==} + engines: {node: '>= 12.0.0'} + concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + confbox@0.1.7: + resolution: {integrity: sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==} + console-browserify@1.2.0: resolution: {integrity: sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==} constants-browserify@1.0.0: resolution: {integrity: sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==} - convert-source-map@2.0.0: - resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + cookie@0.5.0: + resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} + engines: {node: '>= 0.6'} + + core-js-compat@3.38.0: + resolution: {integrity: sha512-75LAicdLa4OJVwFxFbQR3NdnZjNgX6ILpVcVzcC4T2smerB5lELMrJQQQoWV6TiuC/vlaFqgU2tKQx9w5s0e0A==} core-util-is@1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} @@ -1463,6 +1728,11 @@ packages: resolution: {integrity: sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==} engines: {node: '>= 6'} + cssesc@3.0.0: + resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} + engines: {node: '>=4'} + hasBin: true + csv-parse@5.5.0: resolution: {integrity: sha512-RxruSK3M4XgzcD7Trm2wEN+SJ26ChIb903+IWxNOcB5q4jT2Cs+hFr6QP39J05EohshRFEvyzEBoZ/466S2sbw==} @@ -1474,8 +1744,8 @@ packages: supports-color: optional: true - debug@4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + debug@4.3.6: + resolution: {integrity: sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==} engines: {node: '>=6.0'} peerDependencies: supports-color: '*' @@ -1495,10 +1765,6 @@ packages: babel-plugin-macros: optional: true - deep-eql@4.1.3: - resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} - engines: {node: '>=6'} - deep-eql@5.0.1: resolution: {integrity: sha512-nwQCf6ne2gez3o1MxWifqkciwt0zhl0LO1/UwVu4uMBuPmflWM4oQ70XMqHqnBJA+nhzncaqL9HVL6KkHJ28lw==} engines: {node: '>=6'} @@ -1525,6 +1791,10 @@ packages: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} + dequal@2.0.3: + resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} + engines: {node: '>=6'} + des.js@1.1.0: resolution: {integrity: sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==} @@ -1532,14 +1802,6 @@ packages: resolution: {integrity: sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==} engines: {node: '>=8'} - diff-sequences@29.6.3: - resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - diff@4.0.2: - resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} - engines: {node: '>=0.3.1'} - diffie-hellman@5.0.3: resolution: {integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==} @@ -1547,14 +1809,13 @@ packages: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} - doctrine@2.1.0: - resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} - engines: {node: '>=0.10.0'} - doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} engines: {node: '>=6.0.0'} + dom-accessibility-api@0.5.16: + resolution: {integrity: sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==} + dom-serializer@1.4.1: resolution: {integrity: sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==} @@ -1582,13 +1843,13 @@ packages: domutils@3.1.0: resolution: {integrity: sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==} - dotenv-flow@3.2.0: - resolution: {integrity: sha512-GEB6RrR4AbqDJvNSFrYHqZ33IKKbzkvLYiD5eo4+9aFXr4Y4G+QaFrB/fNp0y6McWBmvaPn3ZNjIufnj8irCtg==} - engines: {node: '>= 8.0.0'} + dotenv-flow@4.1.0: + resolution: {integrity: sha512-0cwP9jpQBQfyHwvE0cRhraZMkdV45TQedA8AAUZMsFzvmLcQyc1HPv+oX0OOYwLFjIlvgVepQ+WuQHbqDaHJZg==} + engines: {node: '>= 12.0.0'} - dotenv@8.6.0: - resolution: {integrity: sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==} - engines: {node: '>=10'} + dotenv@16.4.5: + resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} + engines: {node: '>=12'} dpdm@3.14.0: resolution: {integrity: sha512-YJzsFSyEtj88q5eTELg3UWU7TVZkG1dpbF4JDQ3t1b07xuzXmdoGeSz9TKOke1mUuOpWlk4q+pBh+aHzD6GBTg==} @@ -1603,6 +1864,9 @@ packages: eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + electron-to-chromium@1.5.6: + resolution: {integrity: sha512-jwXWsM5RPf6j9dPYzaorcBSUg6AiqocPEyMpkchkvntaH9HGfOOMZwxMJjDY/XEs3T5dM7uyH1VhRMkqUU9qVw==} + elliptic@6.5.5: resolution: {integrity: sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw==} @@ -1615,8 +1879,8 @@ packages: end-of-stream@1.4.4: resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} - enhanced-resolve@5.14.1: - resolution: {integrity: sha512-Vklwq2vDKtl0y/vtwjSesgJ5MYS7Etuk5txS8VdKL4AOS1aUlD96zqIfsOSLQsdv3xgMRbtkWM8eG9XDfKUPow==} + enhanced-resolve@5.17.1: + resolution: {integrity: sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==} engines: {node: '>=10.13.0'} entities@2.2.0: @@ -1626,9 +1890,12 @@ packages: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} - es-abstract@1.21.2: - resolution: {integrity: sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==} - engines: {node: '>= 0.4'} + entities@5.0.0: + resolution: {integrity: sha512-BeJFvFRJddxobhvEdm5GqHzRV/X+ACeuw0/BuuxsCh1EUZcAIz8+kYmBp/LrQuloy6K1f3a0M7+IhmZ7QnkISA==} + engines: {node: '>=0.12'} + + error-ex@1.3.2: + resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} es-define-property@1.0.0: resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} @@ -1638,31 +1905,31 @@ packages: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} - es-set-tostringtag@2.0.1: - resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==} - engines: {node: '>= 0.4'} - - es-shim-unscopables@1.0.0: - resolution: {integrity: sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==} - - es-to-primitive@1.2.1: - resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} - engines: {node: '>= 0.4'} - - esbuild@0.18.20: - resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} - engines: {node: '>=12'} - hasBin: true + es-module-lexer@1.5.4: + resolution: {integrity: sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==} esbuild@0.19.12: resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==} engines: {node: '>=12'} hasBin: true + esbuild@0.23.0: + resolution: {integrity: sha512-1lvV17H2bMYda/WaFb2jLPeHU3zml2k4/yagNMG8Q/YtfMjCwEUZa2eXXMgZTVSL5q1n4H7sQ0X6CdJDqqeCFA==} + engines: {node: '>=18'} + hasBin: true + escalade@3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} engines: {node: '>=6'} + escalade@3.1.2: + resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} + engines: {node: '>=6'} + + escape-string-regexp@1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} @@ -1671,77 +1938,169 @@ packages: resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} engines: {node: '>=12'} - eslint-config-prettier@8.8.0: - resolution: {integrity: sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==} - hasBin: true + eslint-compat-utils@0.5.1: + resolution: {integrity: sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==} + engines: {node: '>=12'} peerDependencies: - eslint: '>=7.0.0' + eslint: '>=6.0.0' - eslint-import-resolver-node@0.3.7: - resolution: {integrity: sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==} + eslint-config-flat-gitignore@0.1.8: + resolution: {integrity: sha512-OEUbS2wzzYtUfshjOqzFo4Bl4lHykXUdM08TCnYNl7ki+niW4Q1R0j0FDFDr0vjVsI5ZFOz5LvluxOP+Ew+dYw==} - eslint-import-resolver-typescript@3.6.0: - resolution: {integrity: sha512-QTHR9ddNnn35RTxlaEnx2gCxqFlF2SEN0SE2d17SqwyM7YOSI2GHWRYp5BiRkObTUNYPupC/3Fq2a0PpT+EKpg==} + eslint-flat-config-utils@0.3.0: + resolution: {integrity: sha512-FaFQLUunAl6YK7aU/pT23DXYVWg/cEHbSfxwAxpCGT6Su8H9RfkmzKLh1G2bba46p6dTlQeA4VTiV5//0SeToQ==} + + eslint-import-resolver-node@0.3.9: + resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} + + eslint-merge-processors@0.1.0: + resolution: {integrity: sha512-IvRXXtEajLeyssvW4wJcZ2etxkR9mUf4zpNwgI+m/Uac9RfXHskuJefkHUcawVzePnd6xp24enp5jfgdHzjRdQ==} + peerDependencies: + eslint: '*' + + eslint-plugin-antfu@2.3.5: + resolution: {integrity: sha512-q3S9q7O176sd5VyPKksN1WGtB0l8W1jeWs61xWAmbM5JdZN8q9e0Vmm+tY/YOygHfn1eK9uE4/MGyZBebdtgLA==} + peerDependencies: + eslint: '*' + + eslint-plugin-command@0.2.3: + resolution: {integrity: sha512-1bBYNfjZg60N2ZpLV5ATYSYyueIJ+zl5yKrTs0UFDdnyu07dNSZ7Xplnc+Wb6SXTdc1sIaoIrnuyhvztcltX6A==} + peerDependencies: + eslint: '*' + + eslint-plugin-es-x@7.8.0: + resolution: {integrity: sha512-7Ds8+wAAoV3T+LAKeu39Y5BzXCrGKrcISfgKEqTS4BDN8SFEDQd0S43jiQ8vIa3wUKD07qitZdfzlenSi8/0qQ==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: - eslint: '*' - eslint-plugin-import: '*' + eslint: '>=8' - eslint-module-utils@2.8.0: - resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} - engines: {node: '>=4'} + eslint-plugin-import-x@3.1.0: + resolution: {integrity: sha512-/UbPA+bYY7nIxcjL3kpcDY3UNdoLHFhyBFzHox2M0ypcUoueTn6woZUUmzzi5et/dXChksasYYFeKE2wshOrhg==} + engines: {node: '>=16'} peerDependencies: - '@typescript-eslint/parser': '*' - eslint: '*' - eslint-import-resolver-node: '*' - eslint-import-resolver-typescript: '*' - eslint-import-resolver-webpack: '*' + eslint: ^8.56.0 || ^9.0.0-0 + + eslint-plugin-jsdoc@50.2.2: + resolution: {integrity: sha512-i0ZMWA199DG7sjxlzXn5AeYZxpRfMJjDPUl7lL9eJJX8TPRoIaxJU4ys/joP5faM5AXE1eqW/dslCj3uj4Nqpg==} + engines: {node: '>=18'} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 + + eslint-plugin-jsonc@2.16.0: + resolution: {integrity: sha512-Af/ZL5mgfb8FFNleH6KlO4/VdmDuTqmM+SPnWcdoWywTetv7kq+vQe99UyQb9XO3b0OWLVuTH7H0d/PXYCMdSg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '>=6.0.0' + + eslint-plugin-markdown@5.1.0: + resolution: {integrity: sha512-SJeyKko1K6GwI0AN6xeCDToXDkfKZfXcexA6B+O2Wr2btUS9GrC+YgwSyVli5DJnctUHjFXcQ2cqTaAmVoLi2A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: '>=8' + + eslint-plugin-n@17.10.2: + resolution: {integrity: sha512-e+s4eAf5NtJaxPhTNu3qMO0Iz40WANS93w9LQgYcvuljgvDmWi/a3rh+OrNyMHeng6aOWGJO0rCg5lH4zi8yTw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: '>=8.23.0' + + eslint-plugin-no-only-tests@3.3.0: + resolution: {integrity: sha512-brcKcxGnISN2CcVhXJ/kEQlNa0MEfGRtwKtWA16SkqXHKitaKIMrfemJKLKX1YqDU5C/5JY3PvZXd5jEW04e0Q==} + engines: {node: '>=5.0.0'} + + eslint-plugin-perfectionist@3.2.0: + resolution: {integrity: sha512-cX1aztMbSfRWPKJH8CD+gadrbkS+RNH1OGWuNGws8J6rHzYYhawxWTU/yzMYjq2IRJCpBCfhgfa7BHRXQYxLHA==} + engines: {node: ^18.0.0 || >=20.0.0} + peerDependencies: + astro-eslint-parser: ^1.0.2 + eslint: '>=8.0.0' + svelte: '>=3.0.0' + svelte-eslint-parser: ^0.41.0 + vue-eslint-parser: '>=9.0.0' peerDependenciesMeta: - '@typescript-eslint/parser': + astro-eslint-parser: optional: true - eslint: + svelte: optional: true - eslint-import-resolver-node: + svelte-eslint-parser: optional: true - eslint-import-resolver-typescript: - optional: true - eslint-import-resolver-webpack: + vue-eslint-parser: optional: true - eslint-plugin-ascii@1.0.0: - resolution: {integrity: sha512-NT2asS7tLkXMKBk0GuX6eDUZvb5DWTFDCt7R6a8tvWs5P0my2ybxmCFy3Afxgdcam+wQRAn8JrldLmcK0H5Axg==} - - eslint-plugin-import@2.28.0: - resolution: {integrity: sha512-B8s/n+ZluN7sxj9eUf7/pRFERX0r5bnFA2dCaLHy2ZeaQEAz0k+ZZkFWRFHJAqxfxQDx6KLv9LeIki7cFdwW+Q==} - engines: {node: '>=4'} + eslint-plugin-regexp@2.6.0: + resolution: {integrity: sha512-FCL851+kislsTEQEMioAlpDuK5+E5vs0hi1bF8cFlPlHcEjeRhuAzEsGikXRreE+0j4WhW2uO54MqTjXtYOi3A==} + engines: {node: ^18 || >=20} peerDependencies: - '@typescript-eslint/parser': '*' - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 + eslint: '>=8.44.0' + + eslint-plugin-toml@0.11.1: + resolution: {integrity: sha512-Y1WuMSzfZpeMIrmlP1nUh3kT8p96mThIq4NnHrYUhg10IKQgGfBZjAWnrg9fBqguiX4iFps/x/3Hb5TxBisfdw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '>=6.0.0' + + eslint-plugin-unicorn@55.0.0: + resolution: {integrity: sha512-n3AKiVpY2/uDcGrS3+QsYDkjPfaOrNrsfQxU9nt5nitd9KuvVXrfAvgCO9DYPSfap+Gqjw9EOrXIsBp5tlHZjA==} + engines: {node: '>=18.18'} + peerDependencies: + eslint: '>=8.56.0' + + eslint-plugin-unused-imports@4.1.3: + resolution: {integrity: sha512-lqrNZIZjFMUr7P06eoKtQLwyVRibvG7N+LtfKtObYGizAAGrcqLkc3tDx+iAik2z7q0j/XI3ihjupIqxhFabFA==} + peerDependencies: + '@typescript-eslint/eslint-plugin': ^8.0.0-0 || ^7.0.0 || ^6.0.0 || ^5.0.0 + eslint: ^9.0.0 || ^8.0.0 peerDependenciesMeta: - '@typescript-eslint/parser': + '@typescript-eslint/eslint-plugin': optional: true - eslint-plugin-simple-import-sort@10.0.0: - resolution: {integrity: sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw==} + eslint-plugin-vue@9.27.0: + resolution: {integrity: sha512-5Dw3yxEyuBSXTzT5/Ge1X5kIkRTQ3nvBn/VwPwInNiZBSJOO/timWMUaflONnFBzU6NhB68lxnCda7ULV5N7LA==} + engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: - eslint: '>=5.0.0' + eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 + + eslint-plugin-yml@1.14.0: + resolution: {integrity: sha512-ESUpgYPOcAYQO9czugcX5OqRvn/ydDVwGCPXY4YjPqc09rHaUVUA6IE6HLQys4rXk/S+qx3EwTd1wHCwam/OWQ==} + engines: {node: ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '>=6.0.0' + + eslint-processor-vue-blocks@0.1.2: + resolution: {integrity: sha512-PfpJ4uKHnqeL/fXUnzYkOax3aIenlwewXRX8jFinA1a2yCFnLgMuiH3xvCgvHHUlV2xJWQHbCTdiJWGwb3NqpQ==} + peerDependencies: + '@vue/compiler-sfc': ^3.3.0 + eslint: ^8.50.0 || ^9.0.0 eslint-scope@7.2.2: resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-visitor-keys@3.4.1: - resolution: {integrity: sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint-scope@8.0.2: + resolution: {integrity: sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint@8.47.0: - resolution: {integrity: sha512-spUQWrdPt+pRVP1TTJLmfRNJJHHZryFmptzcafwSvHsceV81djHOdnEeDmkdotZyLNjDhrOasNK8nikkoG1O8Q==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint-visitor-keys@4.0.0: + resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint@9.9.0: + resolution: {integrity: sha512-JfiKJrbx0506OEerjK2Y1QlldtBxkAlLxT5OEcRF8uaQ86noDe2k31Vw9rnSWv+MXZHj7OOUV/dA0AhdLFcyvA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true + + espree@10.1.0: + resolution: {integrity: sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} espree@9.6.1: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} @@ -1751,6 +2110,10 @@ packages: resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} engines: {node: '>=0.10'} + esquery@1.6.0: + resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} + engines: {node: '>=0.10'} + esrecurse@4.3.0: resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} engines: {node: '>=4.0'} @@ -1798,10 +2161,6 @@ packages: fast-fifo@1.3.2: resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==} - fast-glob@3.3.1: - resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} - engines: {node: '>=8.6.0'} - fast-glob@3.3.2: resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} @@ -1822,9 +2181,9 @@ packages: resolution: {integrity: sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==} engines: {node: '>=14'} - file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} file-uri-to-path@1.0.0: resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} @@ -1833,16 +2192,21 @@ packages: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} + find-up-simple@1.0.0: + resolution: {integrity: sha512-q7Us7kcjj2VMePAa02hDAF6d+MzsdsAWEwYyOpwUtlerRBkOEPBCRZrAV4XfcSN8fHAgaD0hP7miwoay6DCprw==} + engines: {node: '>=18'} + + find-up@4.1.0: + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} + find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} - flat-cache@3.0.4: - resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==} - engines: {node: ^10.12.0 || >=12.0.0} - - flatted@3.2.5: - resolution: {integrity: sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==} + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} flatted@3.3.1: resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} @@ -1861,9 +2225,6 @@ packages: resolution: {integrity: sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==} engines: {node: '>=14.14'} - fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - fsevents@2.3.2: resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -1880,13 +2241,6 @@ packages: function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} - function.prototype.name@1.1.5: - resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==} - engines: {node: '>= 0.4'} - - functions-have-names@1.2.3: - resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} - get-caller-file@2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} @@ -1905,12 +2259,8 @@ packages: resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} engines: {node: '>=16'} - get-symbol-description@1.0.0: - resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} - engines: {node: '>= 0.4'} - - get-tsconfig@4.6.0: - resolution: {integrity: sha512-lgbo68hHTQnFddybKbbs/RDRJnJT5YyGy2kQzVwbq+g67X73i+5MVTval34QxGkOe9X5Ujf1UYpCaphLyltjEg==} + get-tsconfig@4.7.6: + resolution: {integrity: sha512-ZAqrLlu18NbDdRaHq+AKXzAmqIUPswPWKUchfytdAjiRFnCe5ojG2bstg6mRiZabkKfCoL/e98pbBELIV/YCeA==} github-from-package@0.0.0: resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==} @@ -1923,31 +2273,26 @@ packages: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} - glob@10.2.6: - resolution: {integrity: sha512-U/rnDpXJGF414QQQZv5uVsabTVxMSwzS5CH0p3DRCIV6ownl4f7PzGnkGmvlum2wB+9RlJWJZ6ACU1INnBqiPA==} - engines: {node: '>=16 || 14 >=14.17'} + glob@10.4.5: + resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} hasBin: true - glob@10.3.10: - resolution: {integrity: sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==} - engines: {node: '>=16 || 14 >=14.17'} + glob@11.0.0: + resolution: {integrity: sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==} + engines: {node: 20 || >=22} hasBin: true - glob@10.3.12: - resolution: {integrity: sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg==} - engines: {node: '>=16 || 14 >=14.17'} - hasBin: true - - glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - - globals@13.20.0: - resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==} + globals@13.24.0: + resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} - globalthis@1.0.3: - resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} - engines: {node: '>= 0.4'} + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + + globals@15.9.0: + resolution: {integrity: sha512-SmSKyLLKFbSr6rptvP8izbyxJL4ILwqO9Jg23UA0sDlGlu58V59D1//I3vlc0KJphVdUR7vMjHIplYnzBxorQA==} + engines: {node: '>=18'} globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} @@ -1962,6 +2307,10 @@ packages: graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + graphql@16.9.0: + resolution: {integrity: sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==} + engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} + gunzip-maybe@1.4.2: resolution: {integrity: sha512-4haO1M4mLO91PW57BMsDFf75UmwoRX0GkdD+Faw+Lr+r/OZrOCS0pIBwOL1xCKQqnQzbNFGgK2V2CpBUPeFNTw==} hasBin: true @@ -1971,8 +2320,9 @@ packages: engines: {node: '>=0.4.7'} hasBin: true - has-bigints@1.0.2: - resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} + has-flag@3.0.0: + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} @@ -2015,9 +2365,15 @@ packages: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} + headers-polyfill@4.0.3: + resolution: {integrity: sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ==} + hmac-drbg@1.0.1: resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} + hosted-git-info@2.8.9: + resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} + html-escaper@2.0.2: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} @@ -2041,14 +2397,14 @@ packages: ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} - ignore@5.2.0: - resolution: {integrity: sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==} - engines: {node: '>= 4'} - ignore@5.2.4: resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} engines: {node: '>= 4'} + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} + import-fresh@3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} @@ -2057,8 +2413,9 @@ packages: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} - inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + indent-string@4.0.0: + resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} + engines: {node: '>=8'} inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -2070,41 +2427,36 @@ packages: resolution: {integrity: sha512-B2LafrnnhbRzCWfAdOXisUzL89Kg8cVJlYmhqoi3flSiV/TveO+nsXwgKr9h9PIo+J1hz7nBSk6gegRIMBBf7g==} engines: {node: '>=14.18.0'} - internal-slot@1.0.5: - resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==} - engines: {node: '>= 0.4'} - ip6@0.2.7: resolution: {integrity: sha512-zEzGsxn4Uw33TByv0DdX/RRh+VsGfEctOp7CvJq/b4JEjY9OvPB58dsMYiEwIVLsIWHZSJPn3XG8mP9Qv3TG3g==} hasBin: true + is-alphabetical@1.0.4: + resolution: {integrity: sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==} + + is-alphanumerical@1.0.4: + resolution: {integrity: sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==} + is-arguments@1.1.1: resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} engines: {node: '>= 0.4'} - is-array-buffer@3.0.2: - resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} + is-arrayish@0.2.1: + resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} - is-bigint@1.0.4: - resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} - - is-boolean-object@1.1.2: - resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} - engines: {node: '>= 0.4'} + is-builtin-module@3.2.1: + resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} + engines: {node: '>=6'} is-callable@1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} - is-core-module@2.12.1: - resolution: {integrity: sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==} - is-core-module@2.13.0: resolution: {integrity: sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==} - is-date-object@1.0.5: - resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} - engines: {node: '>= 0.4'} + is-decimal@1.0.4: + resolution: {integrity: sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==} is-deflate@1.0.0: resolution: {integrity: sha512-YDoFpuZWu1VRXlsnlYMzKyVRITXj7Ej/V9gXQ2/pAe7X1J7M/RNOqaIYi6qUn+B7nGyB9pDXrv02dsB58d2ZAQ==} @@ -2129,6 +2481,9 @@ packages: resolution: {integrity: sha512-rcfALRIb1YewtnksfRIHGcIY93QnK8BIQ/2c9yDYcG/Y6+vRoJuTWBmmSEbyLLYtXm7q35pHOHbZFQBaLrhlWQ==} engines: {node: '>=0.10.0'} + is-hexadecimal@1.0.4: + resolution: {integrity: sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==} + is-interactive@1.0.0: resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} engines: {node: '>=8'} @@ -2137,13 +2492,8 @@ packages: resolution: {integrity: sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==} engines: {node: '>= 0.4'} - is-negative-zero@2.0.2: - resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} - engines: {node: '>= 0.4'} - - is-number-object@1.0.7: - resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} - engines: {node: '>= 0.4'} + is-node-process@1.2.0: + resolution: {integrity: sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw==} is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} @@ -2153,25 +2503,10 @@ packages: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} engines: {node: '>=8'} - is-regex@1.1.4: - resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} - engines: {node: '>= 0.4'} - - is-shared-array-buffer@1.0.2: - resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} - is-stream@3.0.0: resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - is-string@1.0.7: - resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} - engines: {node: '>= 0.4'} - - is-symbol@1.0.4: - resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} - engines: {node: '>= 0.4'} - is-typed-array@1.1.10: resolution: {integrity: sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==} engines: {node: '>= 0.4'} @@ -2184,9 +2519,6 @@ packages: resolution: {integrity: sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==} engines: {node: '>=12'} - is-weakref@1.0.2: - resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} - isarray@1.0.0: resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} @@ -2205,54 +2537,85 @@ packages: resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} engines: {node: '>=10'} - istanbul-lib-source-maps@5.0.4: - resolution: {integrity: sha512-wHOoEsNJTVltaJp8eVkm8w+GVkVNHT2YDYo53YdzQEL2gWm1hBX5cGFR9hQJtuGLebidVX7et3+dmDZrmclduw==} + istanbul-lib-source-maps@5.0.6: + resolution: {integrity: sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==} engines: {node: '>=10'} istanbul-reports@3.1.7: resolution: {integrity: sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==} engines: {node: '>=8'} - jackspeak@2.3.6: - resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==} - engines: {node: '>=14'} + jackspeak@3.4.3: + resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} - js-tokens@8.0.3: - resolution: {integrity: sha512-UfJMcSJc+SEXEl9lH/VLHSZbThQyLpw1vLO1Lb+j4RWDvG3N2f7yj3PVQA3cmkTBNldJ9eFnM+xEXxHIXrYiJw==} + jackspeak@4.0.1: + resolution: {integrity: sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog==} + engines: {node: 20 || >=22} + + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} js-yaml@4.1.0: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true + jsdoc-type-pratt-parser@4.0.0: + resolution: {integrity: sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==} + engines: {node: '>=12.0.0'} + + jsdoc-type-pratt-parser@4.1.0: + resolution: {integrity: sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg==} + engines: {node: '>=12.0.0'} + + jsesc@0.5.0: + resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} + hasBin: true + + jsesc@3.0.2: + resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} + engines: {node: '>=6'} + hasBin: true + + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + + json-parse-even-better-errors@2.3.1: + resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - json5@1.0.2: - resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} - hasBin: true - - json5@2.2.3: - resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} - engines: {node: '>=6'} - hasBin: true - - jsonc-parser@3.2.0: - resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} + jsonc-eslint-parser@2.4.0: + resolution: {integrity: sha512-WYDyuc/uFcGp6YtM2H0uKmUwieOuzeE/5YocFJLnLfclZ4inf3mRn8ZVy1s7Hxji7Jxm6Ss8gqpexD/GlKoGgg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} + lines-and-columns@1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + + linkify-it@5.0.0: + resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} + local-pkg@0.5.0: resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==} engines: {node: '>=14'} + locate-path@5.0.0: + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} + locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} @@ -2270,49 +2633,61 @@ packages: long@5.2.3: resolution: {integrity: sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==} - loupe@2.3.7: - resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} - loupe@3.1.0: resolution: {integrity: sha512-qKl+FrLXUhFuHUoDJG7f8P8gEMHq9NFS0c6ghXG1J0rldmZFQZoNVv/vyirE9qwCIhWZDsvEFd1sbFu3GvRQFg==} + loupe@3.1.1: + resolution: {integrity: sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==} + lru-cache@10.2.2: resolution: {integrity: sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==} engines: {node: 14 || >=16.14} + lru-cache@11.0.0: + resolution: {integrity: sha512-Qv32eSV1RSCfhY3fpPE2GNZ8jgM9X7rdAfemLWqTUxwiyIC4jJ6Sy0fZ8H+oLWevO6i4/bizg7c8d8i6bxrzbA==} + engines: {node: 20 || >=22} + lru-cache@6.0.0: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} - lru-cache@9.1.2: - resolution: {integrity: sha512-ERJq3FOzJTxBbFjZ7iDs+NiK4VI9Wz+RdrrAB8dio1oV+YvdPzUEE4QNiT2VD51DkIbCYRUUzCRkssXCHqSnKQ==} - engines: {node: 14 || >=16.14} - lunr@2.3.9: resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} + lz-string@1.5.0: + resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} + hasBin: true + + magic-string@0.30.11: + resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} + magic-string@0.30.8: resolution: {integrity: sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==} engines: {node: '>=12'} - magicast@0.3.3: - resolution: {integrity: sha512-ZbrP1Qxnpoes8sz47AM0z08U+jW6TyRgZzcWy3Ma3vDhJttwMwAFDMMQFobwdBxByBD46JYmxRzeF7w2+wJEuw==} + magicast@0.3.4: + resolution: {integrity: sha512-TyDF/Pn36bBji9rWKHlZe+PZb6Mx5V8IHCSxk7X4aljM4e/vyDvZZYwHewdVaqiA0nb3ghfHU/6AUpDxWoER2Q==} make-dir@4.0.0: resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} engines: {node: '>=10'} - make-error@1.3.6: - resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} - - marked@4.3.0: - resolution: {integrity: sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==} - engines: {node: '>= 12'} + markdown-it@14.1.0: + resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} hasBin: true md5.js@1.3.5: resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} + mdast-util-from-markdown@0.8.5: + resolution: {integrity: sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==} + + mdast-util-to-string@2.0.0: + resolution: {integrity: sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==} + + mdurl@2.0.0: + resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} + merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} @@ -2320,6 +2695,9 @@ packages: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} + micromark@2.11.4: + resolution: {integrity: sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==} + micromatch@4.0.5: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} @@ -2340,32 +2718,32 @@ packages: resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} engines: {node: '>=10'} + min-indent@1.0.1: + resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} + engines: {node: '>=4'} + minimalistic-assert@1.0.1: resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} minimalistic-crypto-utils@1.0.1: resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} + minimatch@10.0.1: + resolution: {integrity: sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==} + engines: {node: 20 || >=22} + minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - minimatch@9.0.1: - resolution: {integrity: sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==} - engines: {node: '>=16 || 14 >=14.17'} - - minimatch@9.0.3: - resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} minimist@1.2.6: resolution: {integrity: sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==} - minipass@6.0.2: - resolution: {integrity: sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==} - engines: {node: '>=16 || 14 >=14.17'} - - minipass@7.0.4: - resolution: {integrity: sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==} + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} mkdirp-classic@0.5.3: @@ -2376,8 +2754,8 @@ packages: engines: {node: '>=10'} hasBin: true - mlly@1.6.1: - resolution: {integrity: sha512-vLgaHvaeunuOXHSmEbZ9izxPx3USsk8KCQ8iC+aTlp5sKRSoZvwhHh5L9VbKSaVC6sJDqbyohIS76E2VmHIPAA==} + mlly@1.7.1: + resolution: {integrity: sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA==} mrmime@2.0.0: resolution: {integrity: sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==} @@ -2389,6 +2767,16 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + msw@2.3.5: + resolution: {integrity: sha512-+GUI4gX5YC5Bv33epBrD+BGdmDvBg2XGruiWnI3GbIbRmMMBeZ5gs3mJ51OWSGHgJKztZ8AtZeYMMNMVrje2/Q==} + engines: {node: '>=18'} + hasBin: true + peerDependencies: + typescript: '>= 4.7.x' + peerDependenciesMeta: + typescript: + optional: true + mute-stream@1.0.0: resolution: {integrity: sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -2401,6 +2789,9 @@ packages: napi-build-utils@1.0.2: resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==} + natural-compare-lite@1.4.0: + resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} + natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} @@ -2415,10 +2806,16 @@ packages: resolution: {integrity: sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==} hasBin: true + node-releases@2.0.18: + resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==} + node-stdlib-browser@1.2.0: resolution: {integrity: sha512-VSjFxUhRhkyed8AtLwSCkMrJRfQ3e2lGtG3sP6FEgaLKBBbxM/dLfjRe1+iLhjvyLFW3tBQ8+c0pcOtXGbAZJg==} engines: {node: '>=10'} + normalize-package-data@2.5.0: + resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} + npm-run-path@5.3.0: resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -2426,8 +2823,8 @@ packages: nth-check@2.0.1: resolution: {integrity: sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w==} - object-inspect@1.12.3: - resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} + nth-check@2.1.1: + resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} object-inspect@1.13.1: resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} @@ -2444,17 +2841,6 @@ packages: resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==} engines: {node: '>= 0.4'} - object.fromentries@2.0.6: - resolution: {integrity: sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg==} - engines: {node: '>= 0.4'} - - object.groupby@1.0.0: - resolution: {integrity: sha512-70MWG6NfRH9GnbZOikuhPPYzpUpof9iW2J9E4dW7FXTqPNb6rllE6u39SKwwiNh8lCwX3DDb5OgcKGiEBrTTyw==} - - object.values@1.1.6: - resolution: {integrity: sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==} - engines: {node: '>= 0.4'} - once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} @@ -2484,18 +2870,32 @@ packages: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} engines: {node: '>=0.10.0'} + outvariant@1.4.3: + resolution: {integrity: sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==} + + p-limit@2.3.0: + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} + p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} - p-limit@5.0.0: - resolution: {integrity: sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==} - engines: {node: '>=18'} + p-locate@4.1.0: + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} p-locate@5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} + p-try@2.2.0: + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} + + package-json-from-dist@1.0.0: + resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==} + pako@0.2.9: resolution: {integrity: sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==} @@ -2510,6 +2910,21 @@ packages: resolution: {integrity: sha512-CTM5kuWR3sx9IFamcl5ErfPl6ea/N8IYwiJ+vpeB2g+1iknv7zBl5uPwbMbRVznRVbrNY6lGuDoE5b30grmbqg==} engines: {node: '>= 0.10'} + parse-entities@2.0.0: + resolution: {integrity: sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==} + + parse-gitignore@2.0.0: + resolution: {integrity: sha512-RmVuCHWsfu0QPNW+mraxh/xjQVw/lhUCUru8Zni3Ctq3AoMhpDTq0OVdKS6iesd6Kqb7viCV3isAL43dciOSog==} + engines: {node: '>=14'} + + parse-imports@2.1.1: + resolution: {integrity: sha512-TDT4HqzUiTMO1wJRwg/t/hYk8Wdp3iF/ToMIlAoVQfL1Xs/sTxq1dKWSMjMbQmIarfWKymOyly40+zmPHXMqCA==} + engines: {node: '>= 18'} + + parse-json@5.2.0: + resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} + engines: {node: '>=8'} + parse5-htmlparser2-tree-adapter@7.0.0: resolution: {integrity: sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==} @@ -2523,10 +2938,6 @@ packages: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} - path-is-absolute@1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} - path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -2538,13 +2949,16 @@ packages: path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - path-scurry@1.10.1: - resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} - engines: {node: '>=16 || 14 >=14.17'} + path-scurry@1.11.1: + resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} + engines: {node: '>=16 || 14 >=14.18'} - path-scurry@1.10.2: - resolution: {integrity: sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==} - engines: {node: '>=16 || 14 >=14.17'} + path-scurry@2.0.0: + resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==} + engines: {node: 20 || >=22} + + path-to-regexp@6.2.2: + resolution: {integrity: sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==} path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} @@ -2553,9 +2967,6 @@ packages: pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} - pathval@1.1.1: - resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} - pathval@2.0.0: resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} engines: {node: '>= 14.16'} @@ -2570,16 +2981,23 @@ packages: picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + picocolors@1.0.1: + resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} + picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} + picomatch@4.0.2: + resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} + engines: {node: '>=12'} + pkg-dir@5.0.0: resolution: {integrity: sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==} engines: {node: '>=10'} - pkg-types@1.0.3: - resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} + pkg-types@1.1.3: + resolution: {integrity: sha512-+JrgthZG6m3ckicaOB74TwQ+tBWsFl3qVQg7mN8ulwSOElJ7gBhKzj2VkCPnZ4NlF6kEquYU+RIYNVAvzd54UA==} playwright-core@1.42.1: resolution: {integrity: sha512-mxz6zclokgrke9p1vtdy/COWBH+eOZgYUVVU34C73M+4j4HLlQJHtfcqiqqxpP0o8HhMkflvfbquLX5dg6wlfA==} @@ -2591,10 +3009,22 @@ packages: engines: {node: '>=16'} hasBin: true + pluralize@8.0.0: + resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} + engines: {node: '>=4'} + + postcss-selector-parser@6.1.2: + resolution: {integrity: sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==} + engines: {node: '>=4'} + postcss@8.4.35: resolution: {integrity: sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==} engines: {node: ^10 || ^12 || >=14} + postcss@8.4.41: + resolution: {integrity: sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==} + engines: {node: ^10 || ^12 || >=14} + prebuild-install@7.1.1: resolution: {integrity: sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==} engines: {node: '>=10'} @@ -2604,14 +3034,9 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - prettier@3.0.3: - resolution: {integrity: sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==} - engines: {node: '>=14'} - hasBin: true - - pretty-format@29.7.0: - resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + pretty-format@27.5.1: + resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} printj@1.1.2: resolution: {integrity: sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ==} @@ -2625,6 +3050,9 @@ packages: resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} engines: {node: '>= 0.6.0'} + psl@1.9.0: + resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} + public-encrypt@4.0.3: resolution: {integrity: sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==} @@ -2637,6 +3065,10 @@ packages: pumpify@1.5.1: resolution: {integrity: sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==} + punycode.js@2.3.1: + resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} + engines: {node: '>=6'} + punycode@1.4.1: resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==} @@ -2652,6 +3084,9 @@ packages: resolution: {integrity: sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==} engines: {node: '>=0.4.x'} + querystringify@2.2.0: + resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} + queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -2668,8 +3103,16 @@ packages: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true - react-is@18.2.0: - resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} + react-is@17.0.2: + resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==} + + read-pkg-up@7.0.1: + resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} + engines: {node: '>=8'} + + read-pkg@5.2.0: + resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} + engines: {node: '>=8'} readable-stream@2.3.8: resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} @@ -2678,14 +3121,32 @@ packages: resolution: {integrity: sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==} engines: {node: '>= 6'} - regexp.prototype.flags@1.5.0: - resolution: {integrity: sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==} - engines: {node: '>= 0.4'} + refa@0.12.1: + resolution: {integrity: sha512-J8rn6v4DBb2nnFqkqwy6/NnTYMcgLA+sLr0iIO41qpv0n+ngb7ksag2tMRl0inb1bbO/esUwzW1vbJi7K0sI0g==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + regenerator-runtime@0.14.1: + resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} + + regexp-ast-analysis@0.7.1: + resolution: {integrity: sha512-sZuz1dYW/ZsfG17WSAG7eS85r5a0dDsvg+7BiiYR5o6lKCAtUrEwdmRmaGF6rwVj3LcmAeYkOWKEPlbPzN3Y3A==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + regexp-tree@0.1.27: + resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} + hasBin: true + + regjsparser@0.10.0: + resolution: {integrity: sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==} + hasBin: true require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} + requires-port@1.0.0: + resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} + resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -2705,13 +3166,9 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - hasBin: true - - rimraf@5.0.1: - resolution: {integrity: sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==} - engines: {node: '>=14'} + rimraf@6.0.1: + resolution: {integrity: sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==} + engines: {node: 20 || >=22} hasBin: true ripemd160@2.0.2: @@ -2738,14 +3195,15 @@ packages: safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - safe-regex-test@1.0.0: - resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} - safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - semver@6.3.1: - resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + scslre@0.3.0: + resolution: {integrity: sha512-3A6sD0WYP7+QrjbfNA2FN3FsOaGGFoekCVgTyypy53gPxhbkCIjtO6YWgdrfM+n/8sI8JeXZOIxsHjMTNxQ4nQ==} + engines: {node: ^14.0.0 || >=16.0.0} + + semver@5.7.2: + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true semver@7.5.1: @@ -2753,13 +3211,13 @@ packages: engines: {node: '>=10'} hasBin: true - semver@7.5.4: - resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} + semver@7.6.0: + resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} engines: {node: '>=10'} hasBin: true - semver@7.6.0: - resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} + semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} engines: {node: '>=10'} hasBin: true @@ -2782,11 +3240,8 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} - shiki@0.14.7: - resolution: {integrity: sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==} - - side-channel@1.0.4: - resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} + shiki@1.12.1: + resolution: {integrity: sha512-nwmjbHKnOYYAe1aaQyEBHvQymJgfm86ZSS7fT8OaPRr4sbAcBNz7PbfAikMEFSDQ6se2j2zobkXvVKcBOm0ysg==} side-channel@1.0.6: resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} @@ -2816,21 +3271,53 @@ packages: resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==} engines: {node: '>= 10'} + sisteransi@1.0.5: + resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} + slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} + slashes@3.0.12: + resolution: {integrity: sha512-Q9VME8WyGkc7pJf6QEkj3wE+2CnvZMI+XJhwdTPR8Z/kWQRXi7boAWLDibRPyHRTUTPx5FaU7MsyrjI3yLB4HA==} + source-map-js@1.0.2: resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} + source-map-js@1.2.0: + resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} + engines: {node: '>=0.10.0'} + source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} + spdx-correct@3.2.0: + resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} + + spdx-exceptions@2.5.0: + resolution: {integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==} + + spdx-expression-parse@3.0.1: + resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} + + spdx-expression-parse@4.0.0: + resolution: {integrity: sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==} + + spdx-license-ids@3.0.18: + resolution: {integrity: sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==} + + stable-hash@0.0.4: + resolution: {integrity: sha512-LjdcbuBeLcdETCrPn9i8AYAZ1eCtu4ECAWtP7UleOiZ9LzVxRzzUZEoZ8zB24nhkQnDWyET0I+3sWokSDS3E7g==} + stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + statuses@2.0.1: + resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} + engines: {node: '>= 0.8'} + std-env@3.7.0: resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==} @@ -2846,6 +3333,13 @@ packages: streamx@2.16.1: resolution: {integrity: sha512-m9QYj6WygWyWa3H1YY69amr4nVgy61xfjys7xO7kviL5rfIEc2naf+ewFiOA+aEJD7y0JO3h2GoiUv4TDwEGzQ==} + strict-event-emitter@0.5.1: + resolution: {integrity: sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==} + + string-argv@0.3.2: + resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} + engines: {node: '>=0.6.19'} + string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -2854,16 +3348,6 @@ packages: resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} engines: {node: '>=12'} - string.prototype.trim@1.2.7: - resolution: {integrity: sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==} - engines: {node: '>= 0.4'} - - string.prototype.trimend@1.0.6: - resolution: {integrity: sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==} - - string.prototype.trimstart@1.0.6: - resolution: {integrity: sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==} - string_decoder@1.1.1: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} @@ -2878,14 +3362,14 @@ packages: resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} engines: {node: '>=12'} - strip-bom@3.0.0: - resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} - engines: {node: '>=4'} - strip-final-newline@3.0.0: resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} engines: {node: '>=12'} + strip-indent@3.0.0: + resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} + engines: {node: '>=8'} + strip-json-comments@2.0.1: resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} engines: {node: '>=0.10.0'} @@ -2894,8 +3378,9 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} - strip-literal@2.0.0: - resolution: {integrity: sha512-f9vHgsCWBq2ugHAkGMiiYY+AYG0D/cbloKKg0nhaaaSNsujdGIpVXCNsrJpCKr5M0f4aI31mr13UjY6GAuXCKA==} + supports-color@5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} @@ -2905,6 +3390,14 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} + synckit@0.6.2: + resolution: {integrity: sha512-Vhf+bUa//YSTYKseDiiEuQmhGCoIF3CVBhunm3r/DQnYiGT4JssmnKQc44BIyOZRK2pKjXXAgbhfmbeoC9CJpA==} + engines: {node: '>=12.20'} + + synckit@0.9.1: + resolution: {integrity: sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==} + engines: {node: ^14.18.0 || >=16.0.0} + tapable@2.2.1: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} @@ -2919,9 +3412,9 @@ packages: tar-stream@3.1.7: resolution: {integrity: sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==} - test-exclude@6.0.0: - resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} - engines: {node: '>=8'} + test-exclude@7.0.1: + resolution: {integrity: sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==} + engines: {node: '>=18'} text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} @@ -2933,15 +3426,19 @@ packages: resolution: {integrity: sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==} engines: {node: '>=0.6.0'} - tinybench@2.6.0: - resolution: {integrity: sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA==} + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} - tinypool@0.8.2: - resolution: {integrity: sha512-SUszKYe5wgsxnNOVlBYO6IC+8VGWdVGZWAqUxp3UErNBtptZvWbwyUOyzNL59zigz2rCA92QiL3wvG+JDSdJdQ==} + tinypool@1.0.0: + resolution: {integrity: sha512-KIKExllK7jp3uvrNtvRBYBWBOAXSX8ZvoaD8T+7KB/QHIuoJW3Pmr60zucywjAlMb5TeXUkcs/MWeWLu0qvuAQ==} + engines: {node: ^18.0.0 || >=20.0.0} + + tinyrainbow@1.2.0: + resolution: {integrity: sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==} engines: {node: '>=14.0.0'} - tinyspy@2.2.1: - resolution: {integrity: sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==} + tinyspy@3.0.0: + resolution: {integrity: sha512-q5nmENpTHgiPVd1cJDDc9cVoYN5x4vCvwT3FMilvKPKneCBZAxn2YWQjDF0UMcE9k0Cay1gBiDfTMU0g+mPMQA==} engines: {node: '>=14.0.0'} tmp@0.0.33: @@ -2956,43 +3453,35 @@ packages: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} + toml-eslint-parser@0.10.0: + resolution: {integrity: sha512-khrZo4buq4qVmsGzS5yQjKe/WsFvV8fGfOjDQN0q4iy9FjRfPWRgTFrU8u1R2iu/SfWLhY9WnCi4Jhdrcbtg+g==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + totalist@3.0.1: resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} engines: {node: '>=6'} - ts-api-utils@1.0.1: - resolution: {integrity: sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==} - engines: {node: '>=16.13.0'} + tough-cookie@4.1.4: + resolution: {integrity: sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==} + engines: {node: '>=6'} + + ts-api-utils@1.3.0: + resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} + engines: {node: '>=16'} peerDependencies: typescript: '>=4.2.0' ts-morph@22.0.0: resolution: {integrity: sha512-M9MqFGZREyeb5fTl6gNHKZLqBQA0TjA1lea+CR48R8EBTDuWrNqW6ccC5QvjNR4s6wDumD3LTCjOFSp9iwlzaw==} - ts-node@10.9.1: - resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} - hasBin: true - peerDependencies: - '@swc/core': '>=1.2.50' - '@swc/wasm': '>=1.2.50' - '@types/node': '*' - typescript: '>=2.7' - peerDependenciesMeta: - '@swc/core': - optional: true - '@swc/wasm': - optional: true - - tsconfig-paths@3.14.2: - resolution: {integrity: sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==} - - tsconfig-paths@4.2.0: - resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==} - engines: {node: '>=6'} - tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + tsx@4.17.0: + resolution: {integrity: sha512-eN4mnDA5UMKDt4YZixo9tBioibaMBpoxBkD+rIPAjVmYERSG0/dWEY1CEFuV89CgASlKL499q8AhmkMnnjtOJg==} + engines: {node: '>=18.0.0'} + hasBin: true + tty-browserify@0.0.1: resolution: {integrity: sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==} @@ -3003,8 +3492,8 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} - type-detect@4.0.8: - resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} + type-detect@4.1.0: + resolution: {integrity: sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==} engines: {node: '>=4'} type-fest@0.20.2: @@ -3015,42 +3504,70 @@ packages: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} - typed-array-length@1.0.4: - resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} + type-fest@0.6.0: + resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} + engines: {node: '>=8'} - typedoc@0.25.12: - resolution: {integrity: sha512-F+qhkK2VoTweDXd1c42GS/By2DvI2uDF4/EpG424dTexSHdtCH52C6IcAvMA6jR3DzAWZjHpUOW+E02kyPNUNw==} - engines: {node: '>= 16'} + type-fest@0.8.1: + resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} + engines: {node: '>=8'} + + type-fest@4.24.0: + resolution: {integrity: sha512-spAaHzc6qre0TlZQQ2aA/nGMe+2Z/wyGk5Z+Ru2VUfdNwT6kWO6TjevOlpebsATEG1EIQ2sOiDszud3lO5mt/Q==} + engines: {node: '>=16'} + + typedoc@0.26.5: + resolution: {integrity: sha512-Vn9YKdjKtDZqSk+by7beZ+xzkkr8T8CYoiasqyt4TTRFy5+UHzL/mF/o4wGBjRF+rlWQHDb0t6xCpA3JNL5phg==} + engines: {node: '>= 18'} hasBin: true peerDependencies: - typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x + typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x - typescript@5.4.3: - resolution: {integrity: sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==} + typescript@5.5.4: + resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} engines: {node: '>=14.17'} hasBin: true - ufo@1.5.1: - resolution: {integrity: sha512-HGyF79+/qZ4soRvM+nHERR2pJ3VXDZ/8sL1uLahdgEDf580NkgiWOxLk33FetExqOWp352JZRsgXbG/4MaGOSg==} + uc.micro@2.1.0: + resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} + + ufo@1.5.4: + resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} uglify-js@3.17.4: resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==} engines: {node: '>=0.8.0'} hasBin: true - unbox-primitive@1.0.2: - resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} - undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + undici-types@6.13.0: + resolution: {integrity: sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==} + + unist-util-stringify-position@2.0.3: + resolution: {integrity: sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==} + + universalify@0.2.0: + resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} + engines: {node: '>= 4.0.0'} + universalify@2.0.0: resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} engines: {node: '>= 10.0.0'} + update-browserslist-db@1.1.0: + resolution: {integrity: sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + url-parse@1.5.10: + resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} + url@0.11.3: resolution: {integrity: sha512-6hxOLGfZASQK/cijlZnZJTq8OXAkt/3YGfQX45vvMYXpZoo8NdWZcY73K108Jf759lS1Bv/8wXnHDTSz17dSRw==} @@ -3060,20 +3577,16 @@ packages: util@0.12.5: resolution: {integrity: sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==} - v8-compile-cache-lib@3.0.1: - resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + validate-npm-package-license@3.0.4: + resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} - v8-to-istanbul@9.2.0: - resolution: {integrity: sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==} - engines: {node: '>=10.12.0'} - - vite-node@1.4.0: - resolution: {integrity: sha512-VZDAseqjrHgNd4Kh8icYHWzTKSCZMhia7GyHfhtzLW33fZlG9SwsB6CEhgyVOWkJfJ2pFLrp/Gj1FSfAiqH9Lw==} + vite-node@2.0.5: + resolution: {integrity: sha512-LdsW4pxj0Ot69FAoXZ1yTnA9bjGohr2yNBU7QKRxpz8ITSkhuDl6h3zS/tvgz4qrNjeRnvrWeXQ8ZF7Um4W00Q==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true - vite-plugin-node-polyfills@0.21.0: - resolution: {integrity: sha512-Sk4DiKnmxN8E0vhgEhzLudfJQfaT8k4/gJ25xvUPG54KjLJ6HAmDKbr4rzDD/QWEY+Lwg80KE85fGYBQihEPQA==} + vite-plugin-node-polyfills@0.22.0: + resolution: {integrity: sha512-F+G3LjiGbG8QpbH9bZ//GSBr9i1InSTkaulfUHFa9jkLqVGORFBoqc2A/Yu5Mmh1kNAbiAeKeK+6aaQUf3x0JA==} peerDependencies: vite: ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 @@ -3105,15 +3618,15 @@ packages: terser: optional: true - vitest@1.4.0: - resolution: {integrity: sha512-gujzn0g7fmwf83/WzrDTnncZt2UiXP41mHuFYFrdwaLRVQ6JYQEiME2IfEjU3vcFL3VKa75XhI3lFgn+hfVsQw==} + vitest@2.0.5: + resolution: {integrity: sha512-8GUxONfauuIdeSl5f9GTgVEpg5BTOlplET4WEDaeY2QBiN8wSm68vxN/tb5z405OwppfoCavnwXafiaYBC/xOA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@types/node': ^18.0.0 || >=20.0.0 - '@vitest/browser': 1.4.0 - '@vitest/ui': 1.4.0 + '@vitest/browser': 2.0.5 + '@vitest/ui': 2.0.5 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -3133,18 +3646,15 @@ packages: vm-browserify@1.1.2: resolution: {integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==} - vscode-oniguruma@1.7.0: - resolution: {integrity: sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==} - - vscode-textmate@8.0.0: - resolution: {integrity: sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==} + vue-eslint-parser@9.4.3: + resolution: {integrity: sha512-2rYRLWlIpaiN8xbPiDyXZXRgLGOtWxERV7ND5fFAv5qo1D2N9Fu9MNajBNc6o13lZ+24DAWCkQCvj4klgmcITg==} + engines: {node: ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '>=6.0.0' wcwidth@1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} - which-boxed-primitive@1.0.2: - resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} - which-typed-array@1.1.9: resolution: {integrity: sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==} engines: {node: '>= 0.4'} @@ -3154,8 +3664,8 @@ packages: engines: {node: '>= 8'} hasBin: true - why-is-node-running@2.2.2: - resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==} + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} engines: {node: '>=8'} hasBin: true @@ -3189,6 +3699,22 @@ packages: utf-8-validate: optional: true + ws@8.18.0: + resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + xml-name-validator@4.0.0: + resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} + engines: {node: '>=12'} + xtend@4.0.2: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'} @@ -3200,6 +3726,15 @@ packages: yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + yaml-eslint-parser@1.2.3: + resolution: {integrity: sha512-4wZWvE398hCP7O8n3nXKu/vdq1HcH01ixYlCREaJL5NUMwQ0g3MaGFUBNSlmBtKmhbtVG/Cm6lyYmSVTEVil8A==} + engines: {node: ^14.17.0 || >=16.0.0} + + yaml@2.5.0: + resolution: {integrity: sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==} + engines: {node: '>= 14'} + hasBin: true + yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} @@ -3208,17 +3743,13 @@ packages: resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'} - yn@3.1.1: - resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} - engines: {node: '>=6'} - yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} - yocto-queue@1.0.0: - resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} - engines: {node: '>=12.20'} + yoctocolors-cjs@2.1.2: + resolution: {integrity: sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==} + engines: {node: '>=18'} snapshots: @@ -3229,13 +3760,85 @@ snapshots: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 + '@antfu/eslint-config@2.26.0(@typescript-eslint/utils@8.1.0(eslint@9.9.0)(typescript@5.5.4))(@vue/compiler-sfc@3.4.37)(eslint@9.9.0)(typescript@5.5.4)(vitest@2.0.5(@types/node@20.10.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5))': + dependencies: + '@antfu/install-pkg': 0.3.5 + '@clack/prompts': 0.7.0 + '@eslint-community/eslint-plugin-eslint-comments': 4.4.0(eslint@9.9.0) + '@stylistic/eslint-plugin': 2.6.4(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/eslint-plugin': 8.1.0(@typescript-eslint/parser@8.1.0(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/parser': 8.1.0(eslint@9.9.0)(typescript@5.5.4) + '@vitest/eslint-plugin': 1.0.3(@typescript-eslint/utils@8.1.0(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4)(vitest@2.0.5(@types/node@20.10.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5)) + eslint: 9.9.0 + eslint-config-flat-gitignore: 0.1.8 + eslint-flat-config-utils: 0.3.0 + eslint-merge-processors: 0.1.0(eslint@9.9.0) + eslint-plugin-antfu: 2.3.5(eslint@9.9.0) + eslint-plugin-command: 0.2.3(eslint@9.9.0) + eslint-plugin-import-x: 3.1.0(eslint@9.9.0)(typescript@5.5.4) + eslint-plugin-jsdoc: 50.2.2(eslint@9.9.0) + eslint-plugin-jsonc: 2.16.0(eslint@9.9.0) + eslint-plugin-markdown: 5.1.0(eslint@9.9.0) + eslint-plugin-n: 17.10.2(eslint@9.9.0) + eslint-plugin-no-only-tests: 3.3.0 + eslint-plugin-perfectionist: 3.2.0(eslint@9.9.0)(typescript@5.5.4)(vue-eslint-parser@9.4.3(eslint@9.9.0)) + eslint-plugin-regexp: 2.6.0(eslint@9.9.0) + eslint-plugin-toml: 0.11.1(eslint@9.9.0) + eslint-plugin-unicorn: 55.0.0(eslint@9.9.0) + eslint-plugin-unused-imports: 4.1.3(@typescript-eslint/eslint-plugin@8.1.0(@typescript-eslint/parser@8.1.0(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0) + eslint-plugin-vue: 9.27.0(eslint@9.9.0) + eslint-plugin-yml: 1.14.0(eslint@9.9.0) + eslint-processor-vue-blocks: 0.1.2(@vue/compiler-sfc@3.4.37)(eslint@9.9.0) + globals: 15.9.0 + jsonc-eslint-parser: 2.4.0 + local-pkg: 0.5.0 + parse-gitignore: 2.0.0 + picocolors: 1.0.1 + toml-eslint-parser: 0.10.0 + vue-eslint-parser: 9.4.3(eslint@9.9.0) + yaml-eslint-parser: 1.2.3 + yargs: 17.7.2 + transitivePeerDependencies: + - '@typescript-eslint/utils' + - '@vue/compiler-sfc' + - supports-color + - svelte + - typescript + - vitest + + '@antfu/install-pkg@0.3.5': + dependencies: + '@jsdevtools/ez-spawn': 3.0.4 + + '@antfu/utils@0.7.10': {} + + '@babel/code-frame@7.24.7': + dependencies: + '@babel/highlight': 7.24.7 + picocolors: 1.0.0 + '@babel/helper-string-parser@7.23.4': {} + '@babel/helper-string-parser@7.24.8': {} + '@babel/helper-validator-identifier@7.22.20': {} - '@babel/parser@7.24.0': + '@babel/helper-validator-identifier@7.24.7': {} + + '@babel/highlight@7.24.7': dependencies: - '@babel/types': 7.24.0 + '@babel/helper-validator-identifier': 7.24.7 + chalk: 2.4.2 + js-tokens: 4.0.0 + picocolors: 1.0.0 + + '@babel/parser@7.25.3': + dependencies: + '@babel/types': 7.25.2 + + '@babel/runtime@7.25.0': + dependencies: + regenerator-runtime: 0.14.1 '@babel/types@7.24.0': dependencies: @@ -3243,163 +3846,222 @@ snapshots: '@babel/helper-validator-identifier': 7.22.20 to-fast-properties: 2.0.0 + '@babel/types@7.25.2': + dependencies: + '@babel/helper-string-parser': 7.24.8 + '@babel/helper-validator-identifier': 7.24.7 + to-fast-properties: 2.0.0 + '@bcoe/v8-coverage@0.2.3': {} - '@cspotcode/source-map-support@0.8.1': + '@bundled-es-modules/cookie@2.0.0': dependencies: - '@jridgewell/trace-mapping': 0.3.9 + cookie: 0.5.0 + + '@bundled-es-modules/statuses@1.0.1': + dependencies: + statuses: 2.0.1 + + '@bundled-es-modules/tough-cookie@0.1.6': + dependencies: + '@types/tough-cookie': 4.0.5 + tough-cookie: 4.1.4 + + '@clack/core@0.3.4': + dependencies: + picocolors: 1.0.1 + sisteransi: 1.0.5 + + '@clack/prompts@0.7.0': + dependencies: + '@clack/core': 0.3.4 + picocolors: 1.0.1 + sisteransi: 1.0.5 + + '@es-joy/jsdoccomment@0.43.1': + dependencies: + '@types/eslint': 8.56.11 + '@types/estree': 1.0.5 + '@typescript-eslint/types': 7.18.0 + comment-parser: 1.4.1 + esquery: 1.6.0 + jsdoc-type-pratt-parser: 4.0.0 + + '@es-joy/jsdoccomment@0.48.0': + dependencies: + comment-parser: 1.4.1 + esquery: 1.6.0 + jsdoc-type-pratt-parser: 4.1.0 '@esbuild/aix-ppc64@0.19.12': optional: true - '@esbuild/android-arm64@0.18.20': + '@esbuild/aix-ppc64@0.23.0': optional: true '@esbuild/android-arm64@0.19.12': optional: true - '@esbuild/android-arm@0.18.20': + '@esbuild/android-arm64@0.23.0': optional: true '@esbuild/android-arm@0.19.12': optional: true - '@esbuild/android-x64@0.18.20': + '@esbuild/android-arm@0.23.0': optional: true '@esbuild/android-x64@0.19.12': optional: true - '@esbuild/darwin-arm64@0.18.20': + '@esbuild/android-x64@0.23.0': optional: true '@esbuild/darwin-arm64@0.19.12': optional: true - '@esbuild/darwin-x64@0.18.20': + '@esbuild/darwin-arm64@0.23.0': optional: true '@esbuild/darwin-x64@0.19.12': optional: true - '@esbuild/freebsd-arm64@0.18.20': + '@esbuild/darwin-x64@0.23.0': optional: true '@esbuild/freebsd-arm64@0.19.12': optional: true - '@esbuild/freebsd-x64@0.18.20': + '@esbuild/freebsd-arm64@0.23.0': optional: true '@esbuild/freebsd-x64@0.19.12': optional: true - '@esbuild/linux-arm64@0.18.20': + '@esbuild/freebsd-x64@0.23.0': optional: true '@esbuild/linux-arm64@0.19.12': optional: true - '@esbuild/linux-arm@0.18.20': + '@esbuild/linux-arm64@0.23.0': optional: true '@esbuild/linux-arm@0.19.12': optional: true - '@esbuild/linux-ia32@0.18.20': + '@esbuild/linux-arm@0.23.0': optional: true '@esbuild/linux-ia32@0.19.12': optional: true - '@esbuild/linux-loong64@0.18.20': + '@esbuild/linux-ia32@0.23.0': optional: true '@esbuild/linux-loong64@0.19.12': optional: true - '@esbuild/linux-mips64el@0.18.20': + '@esbuild/linux-loong64@0.23.0': optional: true '@esbuild/linux-mips64el@0.19.12': optional: true - '@esbuild/linux-ppc64@0.18.20': + '@esbuild/linux-mips64el@0.23.0': optional: true '@esbuild/linux-ppc64@0.19.12': optional: true - '@esbuild/linux-riscv64@0.18.20': + '@esbuild/linux-ppc64@0.23.0': optional: true '@esbuild/linux-riscv64@0.19.12': optional: true - '@esbuild/linux-s390x@0.18.20': + '@esbuild/linux-riscv64@0.23.0': optional: true '@esbuild/linux-s390x@0.19.12': optional: true - '@esbuild/linux-x64@0.18.20': + '@esbuild/linux-s390x@0.23.0': optional: true '@esbuild/linux-x64@0.19.12': optional: true - '@esbuild/netbsd-x64@0.18.20': + '@esbuild/linux-x64@0.23.0': optional: true '@esbuild/netbsd-x64@0.19.12': optional: true - '@esbuild/openbsd-x64@0.18.20': + '@esbuild/netbsd-x64@0.23.0': + optional: true + + '@esbuild/openbsd-arm64@0.23.0': optional: true '@esbuild/openbsd-x64@0.19.12': optional: true - '@esbuild/sunos-x64@0.18.20': + '@esbuild/openbsd-x64@0.23.0': optional: true '@esbuild/sunos-x64@0.19.12': optional: true - '@esbuild/win32-arm64@0.18.20': + '@esbuild/sunos-x64@0.23.0': optional: true '@esbuild/win32-arm64@0.19.12': optional: true - '@esbuild/win32-ia32@0.18.20': + '@esbuild/win32-arm64@0.23.0': optional: true '@esbuild/win32-ia32@0.19.12': optional: true - '@esbuild/win32-x64@0.18.20': + '@esbuild/win32-ia32@0.23.0': optional: true '@esbuild/win32-x64@0.19.12': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@8.47.0)': + '@esbuild/win32-x64@0.23.0': + optional: true + + '@eslint-community/eslint-plugin-eslint-comments@4.4.0(eslint@9.9.0)': dependencies: - eslint: 8.47.0 + escape-string-regexp: 4.0.0 + eslint: 9.9.0 + ignore: 5.3.2 + + '@eslint-community/eslint-utils@4.4.0(eslint@9.9.0)': + dependencies: + eslint: 9.9.0 eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.5.1': {} + '@eslint-community/regexpp@4.11.0': {} - '@eslint-community/regexpp@4.6.2': {} + '@eslint/config-array@0.17.1': + dependencies: + '@eslint/object-schema': 2.1.4 + debug: 4.3.6 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color - '@eslint/eslintrc@2.1.2': + '@eslint/eslintrc@3.1.0': dependencies: ajv: 6.12.6 - debug: 4.3.4 - espree: 9.6.1 - globals: 13.20.0 - ignore: 5.2.0 + debug: 4.3.6 + espree: 10.1.0 + globals: 14.0.0 + ignore: 5.2.4 import-fresh: 3.3.0 js-yaml: 4.1.0 minimatch: 3.1.2 @@ -3407,19 +4069,40 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@8.47.0': {} + '@eslint/js@9.9.0': {} - '@humanwhocodes/config-array@0.11.10': - dependencies: - '@humanwhocodes/object-schema': 1.2.1 - debug: 4.3.4 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color + '@eslint/object-schema@2.1.4': {} '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/object-schema@1.2.1': {} + '@humanwhocodes/retry@0.3.0': {} + + '@inquirer/confirm@3.1.22': + dependencies: + '@inquirer/core': 9.0.10 + '@inquirer/type': 1.5.2 + + '@inquirer/core@9.0.10': + dependencies: + '@inquirer/figures': 1.0.5 + '@inquirer/type': 1.5.2 + '@types/mute-stream': 0.0.4 + '@types/node': 22.2.0 + '@types/wrap-ansi': 3.0.0 + ansi-escapes: 4.3.2 + cli-spinners: 2.9.2 + cli-width: 4.1.0 + mute-stream: 1.0.0 + signal-exit: 4.1.0 + strip-ansi: 6.0.1 + wrap-ansi: 6.2.0 + yoctocolors-cjs: 2.1.2 + + '@inquirer/figures@1.0.5': {} + + '@inquirer/type@1.5.2': + dependencies: + mute-stream: 1.0.0 '@isaacs/cliui@8.0.2': dependencies: @@ -3432,35 +4115,31 @@ snapshots: '@istanbuljs/schema@0.1.3': {} - '@jest/schemas@29.6.3': - dependencies: - '@sinclair/typebox': 0.27.8 - '@jridgewell/gen-mapping@0.3.5': dependencies: '@jridgewell/set-array': 1.2.1 '@jridgewell/sourcemap-codec': 1.4.15 '@jridgewell/trace-mapping': 0.3.25 - '@jridgewell/resolve-uri@3.0.6': {} - '@jridgewell/resolve-uri@3.1.2': {} '@jridgewell/set-array@1.2.1': {} - '@jridgewell/sourcemap-codec@1.4.11': {} - '@jridgewell/sourcemap-codec@1.4.15': {} + '@jridgewell/sourcemap-codec@1.5.0': {} + '@jridgewell/trace-mapping@0.3.25': dependencies: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.4.15 - '@jridgewell/trace-mapping@0.3.9': + '@jsdevtools/ez-spawn@3.0.4': dependencies: - '@jridgewell/resolve-uri': 3.0.6 - '@jridgewell/sourcemap-codec': 1.4.11 + call-me-maybe: 1.0.2 + cross-spawn: 7.0.3 + string-argv: 0.3.2 + type-detect: 4.1.0 '@jsr/db__sqlite@0.11.1': dependencies: @@ -3518,6 +4197,15 @@ snapshots: dependencies: call-bind: 1.0.2 + '@mswjs/interceptors@0.29.1': + dependencies: + '@open-draft/deferred-promise': 2.2.0 + '@open-draft/logger': 0.3.0 + '@open-draft/until': 2.1.0 + is-node-process: 1.2.0 + outvariant: 1.4.3 + strict-event-emitter: 0.5.1 + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -3530,9 +4218,20 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.13.0 + '@open-draft/deferred-promise@2.2.0': {} + + '@open-draft/logger@0.3.0': + dependencies: + is-node-process: 1.2.0 + outvariant: 1.4.3 + + '@open-draft/until@2.1.0': {} + '@pkgjs/parseargs@0.11.0': optional: true + '@pkgr/core@0.1.1': {} + '@polka/url@1.0.0-next.25': {} '@rollup/plugin-inject@5.0.5(rollup@4.13.0)': @@ -3590,63 +4289,139 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.13.0': optional: true - '@sinclair/typebox@0.27.8': {} + '@shikijs/core@1.12.1': + dependencies: + '@types/hast': 3.0.4 - '@teidesu/deno-types@1.43.1': {} + '@stylistic/eslint-plugin-js@2.6.4(eslint@9.9.0)': + dependencies: + '@types/eslint': 9.6.0 + acorn: 8.12.1 + eslint: 9.9.0 + eslint-visitor-keys: 4.0.0 + espree: 10.1.0 - '@teidesu/slow-types-compiler@1.1.0(typescript@5.4.3)': + '@stylistic/eslint-plugin-jsx@2.6.4(eslint@9.9.0)': + dependencies: + '@stylistic/eslint-plugin-js': 2.6.4(eslint@9.9.0) + '@types/eslint': 9.6.0 + eslint: 9.9.0 + eslint-visitor-keys: 4.0.0 + espree: 10.1.0 + estraverse: 5.3.0 + picomatch: 4.0.2 + + '@stylistic/eslint-plugin-plus@2.6.4(eslint@9.9.0)': + dependencies: + '@types/eslint': 9.6.0 + eslint: 9.9.0 + + '@stylistic/eslint-plugin-ts@2.6.4(eslint@9.9.0)(typescript@5.5.4)': + dependencies: + '@stylistic/eslint-plugin-js': 2.6.4(eslint@9.9.0) + '@types/eslint': 9.6.0 + '@typescript-eslint/utils': 8.1.0(eslint@9.9.0)(typescript@5.5.4) + eslint: 9.9.0 + transitivePeerDependencies: + - supports-color + - typescript + + '@stylistic/eslint-plugin@2.6.4(eslint@9.9.0)(typescript@5.5.4)': + dependencies: + '@stylistic/eslint-plugin-js': 2.6.4(eslint@9.9.0) + '@stylistic/eslint-plugin-jsx': 2.6.4(eslint@9.9.0) + '@stylistic/eslint-plugin-plus': 2.6.4(eslint@9.9.0) + '@stylistic/eslint-plugin-ts': 2.6.4(eslint@9.9.0)(typescript@5.5.4) + '@types/eslint': 9.6.0 + eslint: 9.9.0 + transitivePeerDependencies: + - supports-color + - typescript + + '@teidesu/deno-types@1.45.5': {} + + '@teidesu/slow-types-compiler@1.1.0(typescript@5.5.4)': dependencies: arg: 5.0.2 dedent: 1.5.3 eager-async-pool: 1.0.0 - glob: 10.3.12 + glob: 10.4.5 gunzip-maybe: 1.4.2 semver: 7.6.0 tar-stream: 3.1.7 ts-morph: 22.0.0 - typescript: 5.4.3 + typescript: 5.5.4 transitivePeerDependencies: - babel-plugin-macros + '@testing-library/dom@10.4.0': + dependencies: + '@babel/code-frame': 7.24.7 + '@babel/runtime': 7.25.0 + '@types/aria-query': 5.0.4 + aria-query: 5.3.0 + chalk: 4.1.2 + dom-accessibility-api: 0.5.16 + lz-string: 1.5.0 + pretty-format: 27.5.1 + + '@testing-library/user-event@14.5.2(@testing-library/dom@10.4.0)': + dependencies: + '@testing-library/dom': 10.4.0 + '@ts-morph/common@0.23.0': dependencies: fast-glob: 3.3.2 - minimatch: 9.0.3 + minimatch: 9.0.5 mkdirp: 3.0.1 path-browserify: 1.0.1 - '@tsconfig/node10@1.0.8': {} - - '@tsconfig/node12@1.0.9': {} - - '@tsconfig/node14@1.0.1': {} - - '@tsconfig/node16@1.0.2': {} + '@types/aria-query@5.0.4': {} '@types/better-sqlite3@7.6.4': dependencies: '@types/node': 20.10.0 + '@types/cookie@0.6.0': {} + '@types/cross-spawn@6.0.6': dependencies: '@types/node': 20.10.0 + '@types/eslint@8.56.11': + dependencies: + '@types/estree': 1.0.5 + '@types/json-schema': 7.0.12 + + '@types/eslint@9.6.0': + dependencies: + '@types/estree': 1.0.5 + '@types/json-schema': 7.0.12 + '@types/estree@1.0.5': {} '@types/events@3.0.0': {} + '@types/hast@3.0.4': + dependencies: + '@types/unist': 3.0.2 + '@types/inquirer@9.0.6': dependencies: '@types/through': 0.0.32 rxjs: 7.8.1 - '@types/istanbul-lib-coverage@2.0.6': {} - '@types/js-yaml@4.0.5': {} '@types/json-schema@7.0.12': {} - '@types/json5@0.0.29': {} + '@types/mdast@3.0.15': + dependencies: + '@types/unist': 2.0.10 + + '@types/mute-stream@0.0.4': + dependencies: + '@types/node': 20.10.0 '@types/node@20.10.0': dependencies: @@ -3656,16 +4431,30 @@ snapshots: dependencies: undici-types: 5.26.5 + '@types/node@22.2.0': + dependencies: + undici-types: 6.13.0 + + '@types/normalize-package-data@2.4.4': {} + '@types/openurl@1.0.3': dependencies: '@types/node': 20.10.0 - '@types/semver@7.5.0': {} + '@types/statuses@2.0.5': {} '@types/through@0.0.32': dependencies: '@types/node': 20.10.0 + '@types/tough-cookie@4.0.5': {} + + '@types/unist@2.0.10': {} + + '@types/unist@3.0.2': {} + + '@types/wrap-ansi@3.0.0': {} + '@types/ws@8.5.10': dependencies: '@types/node': 20.10.0 @@ -3674,171 +4463,249 @@ snapshots: dependencies: '@types/node': 20.10.0 - '@typescript-eslint/eslint-plugin@6.4.0(@typescript-eslint/parser@6.4.0(eslint@8.47.0)(typescript@5.4.3))(eslint@8.47.0)(typescript@5.4.3)': + '@typescript-eslint/eslint-plugin@8.1.0(@typescript-eslint/parser@8.1.0(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4)': dependencies: - '@eslint-community/regexpp': 4.5.1 - '@typescript-eslint/parser': 6.4.0(eslint@8.47.0)(typescript@5.4.3) - '@typescript-eslint/scope-manager': 6.4.0 - '@typescript-eslint/type-utils': 6.4.0(eslint@8.47.0)(typescript@5.4.3) - '@typescript-eslint/utils': 6.4.0(eslint@8.47.0)(typescript@5.4.3) - '@typescript-eslint/visitor-keys': 6.4.0 - debug: 4.3.4 - eslint: 8.47.0 + '@eslint-community/regexpp': 4.11.0 + '@typescript-eslint/parser': 8.1.0(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/scope-manager': 8.1.0 + '@typescript-eslint/type-utils': 8.1.0(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/utils': 8.1.0(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/visitor-keys': 8.1.0 + eslint: 9.9.0 graphemer: 1.4.0 - ignore: 5.2.4 + ignore: 5.3.2 natural-compare: 1.4.0 - semver: 7.5.4 - ts-api-utils: 1.0.1(typescript@5.4.3) + ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: - typescript: 5.4.3 + typescript: 5.5.4 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@6.4.0(eslint@8.47.0)(typescript@5.4.3)': + '@typescript-eslint/parser@8.1.0(eslint@9.9.0)(typescript@5.5.4)': dependencies: - '@typescript-eslint/scope-manager': 6.4.0 - '@typescript-eslint/types': 6.4.0 - '@typescript-eslint/typescript-estree': 6.4.0(typescript@5.4.3) - '@typescript-eslint/visitor-keys': 6.4.0 - debug: 4.3.4 - eslint: 8.47.0 + '@typescript-eslint/scope-manager': 8.1.0 + '@typescript-eslint/types': 8.1.0 + '@typescript-eslint/typescript-estree': 8.1.0(typescript@5.5.4) + '@typescript-eslint/visitor-keys': 8.1.0 + debug: 4.3.6 + eslint: 9.9.0 optionalDependencies: - typescript: 5.4.3 + typescript: 5.5.4 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@6.4.0': + '@typescript-eslint/scope-manager@7.18.0': dependencies: - '@typescript-eslint/types': 6.4.0 - '@typescript-eslint/visitor-keys': 6.4.0 + '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/visitor-keys': 7.18.0 - '@typescript-eslint/type-utils@6.4.0(eslint@8.47.0)(typescript@5.4.3)': + '@typescript-eslint/scope-manager@8.1.0': dependencies: - '@typescript-eslint/typescript-estree': 6.4.0(typescript@5.4.3) - '@typescript-eslint/utils': 6.4.0(eslint@8.47.0)(typescript@5.4.3) - debug: 4.3.4 - eslint: 8.47.0 - ts-api-utils: 1.0.1(typescript@5.4.3) + '@typescript-eslint/types': 8.1.0 + '@typescript-eslint/visitor-keys': 8.1.0 + + '@typescript-eslint/type-utils@8.1.0(eslint@9.9.0)(typescript@5.5.4)': + dependencies: + '@typescript-eslint/typescript-estree': 8.1.0(typescript@5.5.4) + '@typescript-eslint/utils': 8.1.0(eslint@9.9.0)(typescript@5.5.4) + debug: 4.3.6 + ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: - typescript: 5.4.3 + typescript: 5.5.4 transitivePeerDependencies: + - eslint - supports-color - '@typescript-eslint/types@6.4.0': {} + '@typescript-eslint/types@7.18.0': {} - '@typescript-eslint/typescript-estree@6.4.0(typescript@5.4.3)': + '@typescript-eslint/types@8.1.0': {} + + '@typescript-eslint/typescript-estree@7.18.0(typescript@5.5.4)': dependencies: - '@typescript-eslint/types': 6.4.0 - '@typescript-eslint/visitor-keys': 6.4.0 - debug: 4.3.4 + '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/visitor-keys': 7.18.0 + debug: 4.3.6 globby: 11.1.0 is-glob: 4.0.3 - semver: 7.6.0 - ts-api-utils: 1.0.1(typescript@5.4.3) + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: - typescript: 5.4.3 + typescript: 5.5.4 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@6.4.0(eslint@8.47.0)(typescript@5.4.3)': + '@typescript-eslint/typescript-estree@8.1.0(typescript@5.5.4)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.47.0) - '@types/json-schema': 7.0.12 - '@types/semver': 7.5.0 - '@typescript-eslint/scope-manager': 6.4.0 - '@typescript-eslint/types': 6.4.0 - '@typescript-eslint/typescript-estree': 6.4.0(typescript@5.4.3) - eslint: 8.47.0 - semver: 7.6.0 + '@typescript-eslint/types': 8.1.0 + '@typescript-eslint/visitor-keys': 8.1.0 + debug: 4.3.6 + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.3.0(typescript@5.5.4) + optionalDependencies: + typescript: 5.5.4 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@7.18.0(eslint@9.9.0)(typescript@5.5.4)': + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@typescript-eslint/scope-manager': 7.18.0 + '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.5.4) + eslint: 9.9.0 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/visitor-keys@6.4.0': + '@typescript-eslint/utils@8.1.0(eslint@9.9.0)(typescript@5.5.4)': dependencies: - '@typescript-eslint/types': 6.4.0 - eslint-visitor-keys: 3.4.1 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@typescript-eslint/scope-manager': 8.1.0 + '@typescript-eslint/types': 8.1.0 + '@typescript-eslint/typescript-estree': 8.1.0(typescript@5.5.4) + eslint: 9.9.0 + transitivePeerDependencies: + - supports-color + - typescript - '@vitest/browser@1.4.0(playwright@1.42.1)(vitest@1.4.0)': + '@typescript-eslint/visitor-keys@7.18.0': dependencies: - '@vitest/utils': 1.4.0 - magic-string: 0.30.8 + '@typescript-eslint/types': 7.18.0 + eslint-visitor-keys: 3.4.3 + + '@typescript-eslint/visitor-keys@8.1.0': + dependencies: + '@typescript-eslint/types': 8.1.0 + eslint-visitor-keys: 3.4.3 + + '@vitest/browser@2.0.5(playwright@1.42.1)(typescript@5.5.4)(vitest@2.0.5)': + dependencies: + '@testing-library/dom': 10.4.0 + '@testing-library/user-event': 14.5.2(@testing-library/dom@10.4.0) + '@vitest/utils': 2.0.5 + magic-string: 0.30.11 + msw: 2.3.5(typescript@5.5.4) sirv: 2.0.4 - vitest: 1.4.0(@types/node@20.10.0)(@vitest/browser@1.4.0)(@vitest/ui@1.4.0) + vitest: 2.0.5(@types/node@20.10.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5) + ws: 8.18.0 optionalDependencies: playwright: 1.42.1 + transitivePeerDependencies: + - bufferutil + - typescript + - utf-8-validate - '@vitest/coverage-v8@1.4.0(vitest@1.4.0(@types/node@20.10.0)(@vitest/browser@1.4.0)(@vitest/ui@1.4.0))': + '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@20.10.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 - debug: 4.3.4 + debug: 4.3.6 istanbul-lib-coverage: 3.2.2 istanbul-lib-report: 3.0.1 - istanbul-lib-source-maps: 5.0.4 + istanbul-lib-source-maps: 5.0.6 istanbul-reports: 3.1.7 - magic-string: 0.30.8 - magicast: 0.3.3 - picocolors: 1.0.0 + magic-string: 0.30.11 + magicast: 0.3.4 std-env: 3.7.0 - strip-literal: 2.0.0 - test-exclude: 6.0.0 - v8-to-istanbul: 9.2.0 - vitest: 1.4.0(@types/node@20.10.0)(@vitest/browser@1.4.0)(@vitest/ui@1.4.0) + test-exclude: 7.0.1 + tinyrainbow: 1.2.0 + vitest: 2.0.5(@types/node@20.10.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5) transitivePeerDependencies: - supports-color - '@vitest/expect@1.4.0': + '@vitest/eslint-plugin@1.0.3(@typescript-eslint/utils@8.1.0(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4)(vitest@2.0.5(@types/node@20.10.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5))': dependencies: - '@vitest/spy': 1.4.0 - '@vitest/utils': 1.4.0 - chai: 4.4.1 + eslint: 9.9.0 + optionalDependencies: + '@typescript-eslint/utils': 8.1.0(eslint@9.9.0)(typescript@5.5.4) + typescript: 5.5.4 + vitest: 2.0.5(@types/node@20.10.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5) - '@vitest/runner@1.4.0': + '@vitest/expect@2.0.5': dependencies: - '@vitest/utils': 1.4.0 - p-limit: 5.0.0 + '@vitest/spy': 2.0.5 + '@vitest/utils': 2.0.5 + chai: 5.1.1 + tinyrainbow: 1.2.0 + + '@vitest/pretty-format@2.0.5': + dependencies: + tinyrainbow: 1.2.0 + + '@vitest/runner@2.0.5': + dependencies: + '@vitest/utils': 2.0.5 pathe: 1.1.2 - '@vitest/snapshot@1.4.0': + '@vitest/snapshot@2.0.5': dependencies: - magic-string: 0.30.8 + '@vitest/pretty-format': 2.0.5 + magic-string: 0.30.11 pathe: 1.1.2 - pretty-format: 29.7.0 - '@vitest/spy@1.4.0': + '@vitest/spy@2.0.5': dependencies: - tinyspy: 2.2.1 + tinyspy: 3.0.0 - '@vitest/ui@1.4.0(vitest@1.4.0)': + '@vitest/ui@2.0.5(vitest@2.0.5)': dependencies: - '@vitest/utils': 1.4.0 + '@vitest/utils': 2.0.5 fast-glob: 3.3.2 fflate: 0.8.2 flatted: 3.3.1 pathe: 1.1.2 - picocolors: 1.0.0 sirv: 2.0.4 - vitest: 1.4.0(@types/node@20.10.0)(@vitest/browser@1.4.0)(@vitest/ui@1.4.0) + tinyrainbow: 1.2.0 + vitest: 2.0.5(@types/node@20.10.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5) - '@vitest/utils@1.4.0': + '@vitest/utils@2.0.5': dependencies: - diff-sequences: 29.6.3 + '@vitest/pretty-format': 2.0.5 estree-walker: 3.0.3 - loupe: 2.3.7 - pretty-format: 29.7.0 + loupe: 3.1.1 + tinyrainbow: 1.2.0 - acorn-jsx@5.3.2(acorn@8.10.0): + '@vue/compiler-core@3.4.37': dependencies: - acorn: 8.10.0 + '@babel/parser': 7.25.3 + '@vue/shared': 3.4.37 + entities: 5.0.0 + estree-walker: 2.0.2 + source-map-js: 1.2.0 - acorn-walk@8.2.0: {} + '@vue/compiler-dom@3.4.37': + dependencies: + '@vue/compiler-core': 3.4.37 + '@vue/shared': 3.4.37 - acorn-walk@8.3.2: {} + '@vue/compiler-sfc@3.4.37': + dependencies: + '@babel/parser': 7.25.3 + '@vue/compiler-core': 3.4.37 + '@vue/compiler-dom': 3.4.37 + '@vue/compiler-ssr': 3.4.37 + '@vue/shared': 3.4.37 + estree-walker: 2.0.2 + magic-string: 0.30.11 + postcss: 8.4.41 + source-map-js: 1.2.0 - acorn@8.10.0: {} + '@vue/compiler-ssr@3.4.37': + dependencies: + '@vue/compiler-dom': 3.4.37 + '@vue/shared': 3.4.37 - acorn@8.11.3: {} + '@vue/shared@3.4.37': {} + + acorn-jsx@5.3.2(acorn@8.12.1): + dependencies: + acorn: 8.12.1 + + acorn@8.12.1: {} ajv@6.12.6: dependencies: @@ -3855,7 +4722,9 @@ snapshots: ansi-regex@6.0.1: {} - ansi-sequence-parser@1.1.0: {} + ansi-styles@3.2.1: + dependencies: + color-convert: 1.9.3 ansi-styles@4.3.0: dependencies: @@ -3865,49 +4734,18 @@ snapshots: ansi-styles@6.2.1: {} - arg@4.1.3: {} + are-docs-informative@0.0.2: {} arg@5.0.2: {} argparse@2.0.1: {} - array-buffer-byte-length@1.0.0: + aria-query@5.3.0: dependencies: - call-bind: 1.0.2 - is-array-buffer: 3.0.2 - - array-includes@3.1.6: - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - get-intrinsic: 1.2.1 - is-string: 1.0.7 + dequal: 2.0.3 array-union@2.1.0: {} - array.prototype.findlastindex@1.2.2: - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - es-shim-unscopables: 1.0.0 - get-intrinsic: 1.2.1 - - array.prototype.flat@1.3.1: - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - es-shim-unscopables: 1.0.0 - - array.prototype.flatmap@1.3.1: - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - es-shim-unscopables: 1.0.0 - asn1.js@4.10.1: dependencies: bn.js: 4.12.0 @@ -3922,8 +4760,6 @@ snapshots: object.assign: 4.1.4 util: 0.12.5 - assertion-error@1.1.0: {} - assertion-error@2.0.1: {} available-typed-arrays@1.0.5: {} @@ -4025,6 +4861,13 @@ snapshots: dependencies: pako: 1.0.11 + browserslist@4.23.3: + dependencies: + caniuse-lite: 1.0.30001651 + electron-to-chromium: 1.5.6 + node-releases: 2.0.18 + update-browserslist-db: 1.1.0(browserslist@4.23.3) + buffer-from@1.1.2: {} buffer-xor@1.0.3: {} @@ -4034,6 +4877,8 @@ snapshots: base64-js: 1.5.1 ieee754: 1.2.1 + builtin-modules@3.3.0: {} + builtin-status-codes@3.0.0: {} bun-types@1.0.33: @@ -4056,17 +4901,11 @@ snapshots: get-intrinsic: 1.2.4 set-function-length: 1.2.2 + call-me-maybe@1.0.2: {} + callsites@3.1.0: {} - chai@4.4.1: - dependencies: - assertion-error: 1.1.0 - check-error: 1.0.3 - deep-eql: 4.1.3 - get-func-name: 2.0.2 - loupe: 2.3.7 - pathval: 1.1.1 - type-detect: 4.0.8 + caniuse-lite@1.0.30001651: {} chai@5.1.0: dependencies: @@ -4076,6 +4915,20 @@ snapshots: loupe: 3.1.0 pathval: 2.0.0 + chai@5.1.1: + dependencies: + assertion-error: 2.0.1 + check-error: 2.1.1 + deep-eql: 5.0.1 + loupe: 3.1.0 + pathval: 2.0.0 + + chalk@2.4.2: + dependencies: + ansi-styles: 3.2.1 + escape-string-regexp: 1.0.5 + supports-color: 5.5.0 + chalk@4.1.2: dependencies: ansi-styles: 4.3.0 @@ -4083,14 +4936,18 @@ snapshots: chalk@5.3.0: {} + character-entities-legacy@1.1.4: {} + + character-entities@1.2.4: {} + + character-reference-invalid@1.1.4: {} + chardet@0.7.0: {} - check-error@1.0.3: - dependencies: - get-func-name: 2.0.2 - check-error@2.0.0: {} + check-error@2.1.1: {} + cheerio-select@2.1.0: dependencies: boolbase: 1.0.0 @@ -4112,6 +4969,8 @@ snapshots: chownr@1.1.4: {} + ci-info@4.0.0: {} + cipher-base@1.0.4: dependencies: inherits: 2.0.4 @@ -4119,12 +4978,18 @@ snapshots: cjs-module-lexer@1.2.3: {} + clean-regexp@1.0.0: + dependencies: + escape-string-regexp: 1.0.5 + cli-cursor@3.1.0: dependencies: restore-cursor: 3.1.0 cli-spinners@2.9.1: {} + cli-spinners@2.9.2: {} + cli-width@4.1.0: {} cliui@8.0.1: @@ -4137,21 +5002,35 @@ snapshots: code-block-writer@13.0.1: {} + color-convert@1.9.3: + dependencies: + color-name: 1.1.3 + color-convert@2.0.1: dependencies: color-name: 1.1.4 + color-name@1.1.3: {} + color-name@1.1.4: {} colorette@2.0.20: {} + comment-parser@1.4.1: {} + concat-map@0.0.1: {} + confbox@0.1.7: {} + console-browserify@1.2.0: {} constants-browserify@1.0.0: {} - convert-source-map@2.0.0: {} + cookie@0.5.0: {} + + core-js-compat@3.38.0: + dependencies: + browserslist: 4.23.3 core-util-is@1.0.3: {} @@ -4214,13 +5093,15 @@ snapshots: css-what@6.1.0: {} + cssesc@3.0.0: {} + csv-parse@5.5.0: {} debug@3.2.7: dependencies: ms: 2.1.3 - debug@4.3.4: + debug@4.3.6: dependencies: ms: 2.1.2 @@ -4230,10 +5111,6 @@ snapshots: dedent@1.5.3: {} - deep-eql@4.1.3: - dependencies: - type-detect: 4.0.8 - deep-eql@5.0.1: {} deep-extend@0.6.0: {} @@ -4261,6 +5138,8 @@ snapshots: has-property-descriptors: 1.0.2 object-keys: 1.1.1 + dequal@2.0.3: {} + des.js@1.1.0: dependencies: inherits: 2.0.4 @@ -4268,10 +5147,6 @@ snapshots: detect-libc@2.0.1: {} - diff-sequences@29.6.3: {} - - diff@4.0.2: {} - diffie-hellman@5.0.3: dependencies: bn.js: 4.12.0 @@ -4282,14 +5157,12 @@ snapshots: dependencies: path-type: 4.0.0 - doctrine@2.1.0: - dependencies: - esutils: 2.0.3 - doctrine@3.0.0: dependencies: esutils: 2.0.3 + dom-accessibility-api@0.5.16: {} + dom-serializer@1.4.1: dependencies: domelementtype: 2.3.0 @@ -4326,20 +5199,20 @@ snapshots: domelementtype: 2.3.0 domhandler: 5.0.3 - dotenv-flow@3.2.0: + dotenv-flow@4.1.0: dependencies: - dotenv: 8.6.0 + dotenv: 16.4.5 - dotenv@8.6.0: {} + dotenv@16.4.5: {} dpdm@3.14.0: dependencies: chalk: 4.1.2 fs-extra: 11.1.1 - glob: 10.3.10 + glob: 10.4.5 ora: 5.4.1 tslib: 2.6.2 - typescript: 5.4.3 + typescript: 5.5.4 yargs: 17.7.2 duplexify@3.7.1: @@ -4353,6 +5226,8 @@ snapshots: eastasianwidth@0.2.0: {} + electron-to-chromium@1.5.6: {} + elliptic@6.5.5: dependencies: bn.js: 4.12.0 @@ -4371,7 +5246,7 @@ snapshots: dependencies: once: 1.4.0 - enhanced-resolve@5.14.1: + enhanced-resolve@5.17.1: dependencies: graceful-fs: 4.2.10 tapable: 2.2.1 @@ -4380,42 +5255,11 @@ snapshots: entities@4.5.0: {} - es-abstract@1.21.2: + entities@5.0.0: {} + + error-ex@1.3.2: dependencies: - array-buffer-byte-length: 1.0.0 - available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - es-set-tostringtag: 2.0.1 - es-to-primitive: 1.2.1 - function.prototype.name: 1.1.5 - get-intrinsic: 1.2.1 - get-symbol-description: 1.0.0 - globalthis: 1.0.3 - gopd: 1.0.1 - has: 1.0.3 - has-property-descriptors: 1.0.0 - has-proto: 1.0.1 - has-symbols: 1.0.3 - internal-slot: 1.0.5 - is-array-buffer: 3.0.2 - is-callable: 1.2.7 - is-negative-zero: 2.0.2 - is-regex: 1.1.4 - is-shared-array-buffer: 1.0.2 - is-string: 1.0.7 - is-typed-array: 1.1.10 - is-weakref: 1.0.2 - object-inspect: 1.12.3 - object-keys: 1.1.1 - object.assign: 4.1.4 - regexp.prototype.flags: 1.5.0 - safe-regex-test: 1.0.0 - string.prototype.trim: 1.2.7 - string.prototype.trimend: 1.0.6 - string.prototype.trimstart: 1.0.6 - typed-array-length: 1.0.4 - unbox-primitive: 1.0.2 - which-typed-array: 1.1.9 + is-arrayish: 0.2.1 es-define-property@1.0.0: dependencies: @@ -4423,46 +5267,7 @@ snapshots: es-errors@1.3.0: {} - es-set-tostringtag@2.0.1: - dependencies: - get-intrinsic: 1.2.1 - has: 1.0.3 - has-tostringtag: 1.0.0 - - es-shim-unscopables@1.0.0: - dependencies: - has: 1.0.3 - - es-to-primitive@1.2.1: - dependencies: - is-callable: 1.2.7 - is-date-object: 1.0.5 - is-symbol: 1.0.4 - - esbuild@0.18.20: - optionalDependencies: - '@esbuild/android-arm': 0.18.20 - '@esbuild/android-arm64': 0.18.20 - '@esbuild/android-x64': 0.18.20 - '@esbuild/darwin-arm64': 0.18.20 - '@esbuild/darwin-x64': 0.18.20 - '@esbuild/freebsd-arm64': 0.18.20 - '@esbuild/freebsd-x64': 0.18.20 - '@esbuild/linux-arm': 0.18.20 - '@esbuild/linux-arm64': 0.18.20 - '@esbuild/linux-ia32': 0.18.20 - '@esbuild/linux-loong64': 0.18.20 - '@esbuild/linux-mips64el': 0.18.20 - '@esbuild/linux-ppc64': 0.18.20 - '@esbuild/linux-riscv64': 0.18.20 - '@esbuild/linux-s390x': 0.18.20 - '@esbuild/linux-x64': 0.18.20 - '@esbuild/netbsd-x64': 0.18.20 - '@esbuild/openbsd-x64': 0.18.20 - '@esbuild/sunos-x64': 0.18.20 - '@esbuild/win32-arm64': 0.18.20 - '@esbuild/win32-ia32': 0.18.20 - '@esbuild/win32-x64': 0.18.20 + es-module-lexer@1.5.4: {} esbuild@0.19.12: optionalDependencies: @@ -4490,126 +5295,285 @@ snapshots: '@esbuild/win32-ia32': 0.19.12 '@esbuild/win32-x64': 0.19.12 + esbuild@0.23.0: + optionalDependencies: + '@esbuild/aix-ppc64': 0.23.0 + '@esbuild/android-arm': 0.23.0 + '@esbuild/android-arm64': 0.23.0 + '@esbuild/android-x64': 0.23.0 + '@esbuild/darwin-arm64': 0.23.0 + '@esbuild/darwin-x64': 0.23.0 + '@esbuild/freebsd-arm64': 0.23.0 + '@esbuild/freebsd-x64': 0.23.0 + '@esbuild/linux-arm': 0.23.0 + '@esbuild/linux-arm64': 0.23.0 + '@esbuild/linux-ia32': 0.23.0 + '@esbuild/linux-loong64': 0.23.0 + '@esbuild/linux-mips64el': 0.23.0 + '@esbuild/linux-ppc64': 0.23.0 + '@esbuild/linux-riscv64': 0.23.0 + '@esbuild/linux-s390x': 0.23.0 + '@esbuild/linux-x64': 0.23.0 + '@esbuild/netbsd-x64': 0.23.0 + '@esbuild/openbsd-arm64': 0.23.0 + '@esbuild/openbsd-x64': 0.23.0 + '@esbuild/sunos-x64': 0.23.0 + '@esbuild/win32-arm64': 0.23.0 + '@esbuild/win32-ia32': 0.23.0 + '@esbuild/win32-x64': 0.23.0 + escalade@3.1.1: {} + escalade@3.1.2: {} + + escape-string-regexp@1.0.5: {} + escape-string-regexp@4.0.0: {} escape-string-regexp@5.0.0: {} - eslint-config-prettier@8.8.0(eslint@8.47.0): + eslint-compat-utils@0.5.1(eslint@9.9.0): dependencies: - eslint: 8.47.0 + eslint: 9.9.0 + semver: 7.6.3 - eslint-import-resolver-node@0.3.7: + eslint-config-flat-gitignore@0.1.8: + dependencies: + find-up-simple: 1.0.0 + parse-gitignore: 2.0.0 + + eslint-flat-config-utils@0.3.0: + dependencies: + '@types/eslint': 9.6.0 + pathe: 1.1.2 + + eslint-import-resolver-node@0.3.9: dependencies: debug: 3.2.7 - is-core-module: 2.12.1 + is-core-module: 2.13.0 resolve: 1.22.4 transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.6.0(@typescript-eslint/parser@6.4.0(eslint@8.47.0)(typescript@5.4.3))(eslint-plugin-import@2.28.0)(eslint@8.47.0): + eslint-merge-processors@0.1.0(eslint@9.9.0): dependencies: - debug: 4.3.4 - enhanced-resolve: 5.14.1 - eslint: 8.47.0 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.4.0(eslint@8.47.0)(typescript@5.4.3))(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.6.0(@typescript-eslint/parser@6.4.0(eslint@8.47.0)(typescript@5.4.3))(eslint-plugin-import@2.28.0)(eslint@8.47.0))(eslint@8.47.0) - eslint-plugin-import: 2.28.0(@typescript-eslint/parser@6.4.0(eslint@8.47.0)(typescript@5.4.3))(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0) - fast-glob: 3.3.1 - get-tsconfig: 4.6.0 - is-core-module: 2.12.1 + eslint: 9.9.0 + + eslint-plugin-antfu@2.3.5(eslint@9.9.0): + dependencies: + '@antfu/utils': 0.7.10 + eslint: 9.9.0 + + eslint-plugin-command@0.2.3(eslint@9.9.0): + dependencies: + '@es-joy/jsdoccomment': 0.43.1 + eslint: 9.9.0 + + eslint-plugin-es-x@7.8.0(eslint@9.9.0): + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/regexpp': 4.11.0 + eslint: 9.9.0 + eslint-compat-utils: 0.5.1(eslint@9.9.0) + + eslint-plugin-import-x@3.1.0(eslint@9.9.0)(typescript@5.5.4): + dependencies: + '@typescript-eslint/utils': 7.18.0(eslint@9.9.0)(typescript@5.5.4) + debug: 4.3.6 + doctrine: 3.0.0 + eslint: 9.9.0 + eslint-import-resolver-node: 0.3.9 + get-tsconfig: 4.7.6 is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + stable-hash: 0.0.4 + tslib: 2.6.2 + transitivePeerDependencies: + - supports-color + - typescript + + eslint-plugin-jsdoc@50.2.2(eslint@9.9.0): + dependencies: + '@es-joy/jsdoccomment': 0.48.0 + are-docs-informative: 0.0.2 + comment-parser: 1.4.1 + debug: 4.3.6 + escape-string-regexp: 4.0.0 + eslint: 9.9.0 + espree: 10.1.0 + esquery: 1.6.0 + parse-imports: 2.1.1 + semver: 7.6.3 + spdx-expression-parse: 4.0.0 + synckit: 0.9.1 transitivePeerDependencies: - - '@typescript-eslint/parser' - - eslint-import-resolver-node - - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.8.0(@typescript-eslint/parser@6.4.0(eslint@8.47.0)(typescript@5.4.3))(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.6.0(@typescript-eslint/parser@6.4.0(eslint@8.47.0)(typescript@5.4.3))(eslint-plugin-import@2.28.0)(eslint@8.47.0))(eslint@8.47.0): + eslint-plugin-jsonc@2.16.0(eslint@9.9.0): dependencies: - debug: 3.2.7 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + eslint: 9.9.0 + eslint-compat-utils: 0.5.1(eslint@9.9.0) + espree: 9.6.1 + graphemer: 1.4.0 + jsonc-eslint-parser: 2.4.0 + natural-compare: 1.4.0 + synckit: 0.6.2 + + eslint-plugin-markdown@5.1.0(eslint@9.9.0): + dependencies: + eslint: 9.9.0 + mdast-util-from-markdown: 0.8.5 + transitivePeerDependencies: + - supports-color + + eslint-plugin-n@17.10.2(eslint@9.9.0): + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + enhanced-resolve: 5.17.1 + eslint: 9.9.0 + eslint-plugin-es-x: 7.8.0(eslint@9.9.0) + get-tsconfig: 4.7.6 + globals: 15.9.0 + ignore: 5.3.2 + minimatch: 9.0.5 + semver: 7.6.3 + + eslint-plugin-no-only-tests@3.3.0: {} + + eslint-plugin-perfectionist@3.2.0(eslint@9.9.0)(typescript@5.5.4)(vue-eslint-parser@9.4.3(eslint@9.9.0)): + dependencies: + '@typescript-eslint/types': 8.1.0 + '@typescript-eslint/utils': 8.1.0(eslint@9.9.0)(typescript@5.5.4) + eslint: 9.9.0 + minimatch: 10.0.1 + natural-compare-lite: 1.4.0 optionalDependencies: - '@typescript-eslint/parser': 6.4.0(eslint@8.47.0)(typescript@5.4.3) - eslint: 8.47.0 - eslint-import-resolver-node: 0.3.7 - eslint-import-resolver-typescript: 3.6.0(@typescript-eslint/parser@6.4.0(eslint@8.47.0)(typescript@5.4.3))(eslint-plugin-import@2.28.0)(eslint@8.47.0) + vue-eslint-parser: 9.4.3(eslint@9.9.0) + transitivePeerDependencies: + - supports-color + - typescript + + eslint-plugin-regexp@2.6.0(eslint@9.9.0): + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/regexpp': 4.11.0 + comment-parser: 1.4.1 + eslint: 9.9.0 + jsdoc-type-pratt-parser: 4.1.0 + refa: 0.12.1 + regexp-ast-analysis: 0.7.1 + scslre: 0.3.0 + + eslint-plugin-toml@0.11.1(eslint@9.9.0): + dependencies: + debug: 4.3.6 + eslint: 9.9.0 + eslint-compat-utils: 0.5.1(eslint@9.9.0) + lodash: 4.17.21 + toml-eslint-parser: 0.10.0 transitivePeerDependencies: - supports-color - eslint-plugin-ascii@1.0.0: {} - - eslint-plugin-import@2.28.0(@typescript-eslint/parser@6.4.0(eslint@8.47.0)(typescript@5.4.3))(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0): + eslint-plugin-unicorn@55.0.0(eslint@9.9.0): dependencies: - array-includes: 3.1.6 - array.prototype.findlastindex: 1.2.2 - array.prototype.flat: 1.3.1 - array.prototype.flatmap: 1.3.1 - debug: 3.2.7 - doctrine: 2.1.0 - eslint: 8.47.0 - eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.4.0(eslint@8.47.0)(typescript@5.4.3))(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.6.0(@typescript-eslint/parser@6.4.0(eslint@8.47.0)(typescript@5.4.3))(eslint-plugin-import@2.28.0)(eslint@8.47.0))(eslint@8.47.0) - has: 1.0.3 - is-core-module: 2.12.1 - is-glob: 4.0.3 - minimatch: 3.1.2 - object.fromentries: 2.0.6 - object.groupby: 1.0.0 - object.values: 1.1.6 - resolve: 1.22.4 - semver: 6.3.1 - tsconfig-paths: 3.14.2 + '@babel/helper-validator-identifier': 7.24.7 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + ci-info: 4.0.0 + clean-regexp: 1.0.0 + core-js-compat: 3.38.0 + eslint: 9.9.0 + esquery: 1.6.0 + globals: 15.9.0 + indent-string: 4.0.0 + is-builtin-module: 3.2.1 + jsesc: 3.0.2 + pluralize: 8.0.0 + read-pkg-up: 7.0.1 + regexp-tree: 0.1.27 + regjsparser: 0.10.0 + semver: 7.6.3 + strip-indent: 3.0.0 + + eslint-plugin-unused-imports@4.1.3(@typescript-eslint/eslint-plugin@8.1.0(@typescript-eslint/parser@8.1.0(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0): + dependencies: + eslint: 9.9.0 optionalDependencies: - '@typescript-eslint/parser': 6.4.0(eslint@8.47.0)(typescript@5.4.3) + '@typescript-eslint/eslint-plugin': 8.1.0(@typescript-eslint/parser@8.1.0(eslint@9.9.0)(typescript@5.5.4))(eslint@9.9.0)(typescript@5.5.4) + + eslint-plugin-vue@9.27.0(eslint@9.9.0): + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + eslint: 9.9.0 + globals: 13.24.0 + natural-compare: 1.4.0 + nth-check: 2.1.1 + postcss-selector-parser: 6.1.2 + semver: 7.6.3 + vue-eslint-parser: 9.4.3(eslint@9.9.0) + xml-name-validator: 4.0.0 transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - supports-color - eslint-plugin-simple-import-sort@10.0.0(eslint@8.47.0): + eslint-plugin-yml@1.14.0(eslint@9.9.0): dependencies: - eslint: 8.47.0 + debug: 4.3.6 + eslint: 9.9.0 + eslint-compat-utils: 0.5.1(eslint@9.9.0) + lodash: 4.17.21 + natural-compare: 1.4.0 + yaml-eslint-parser: 1.2.3 + transitivePeerDependencies: + - supports-color + + eslint-processor-vue-blocks@0.1.2(@vue/compiler-sfc@3.4.37)(eslint@9.9.0): + dependencies: + '@vue/compiler-sfc': 3.4.37 + eslint: 9.9.0 eslint-scope@7.2.2: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 - eslint-visitor-keys@3.4.1: {} + eslint-scope@8.0.2: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 eslint-visitor-keys@3.4.3: {} - eslint@8.47.0: + eslint-visitor-keys@4.0.0: {} + + eslint@9.9.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.47.0) - '@eslint-community/regexpp': 4.6.2 - '@eslint/eslintrc': 2.1.2 - '@eslint/js': 8.47.0 - '@humanwhocodes/config-array': 0.11.10 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) + '@eslint-community/regexpp': 4.11.0 + '@eslint/config-array': 0.17.1 + '@eslint/eslintrc': 3.1.0 + '@eslint/js': 9.9.0 '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.4 - doctrine: 3.0.0 + debug: 4.3.6 escape-string-regexp: 4.0.0 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 + eslint-scope: 8.0.2 + eslint-visitor-keys: 4.0.0 + espree: 10.1.0 esquery: 1.5.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 + file-entry-cache: 8.0.0 find-up: 5.0.0 glob-parent: 6.0.2 - globals: 13.20.0 - graphemer: 1.4.0 - ignore: 5.2.0 + ignore: 5.2.4 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 - js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 lodash.merge: 4.6.2 @@ -4621,16 +5585,26 @@ snapshots: transitivePeerDependencies: - supports-color + espree@10.1.0: + dependencies: + acorn: 8.12.1 + acorn-jsx: 5.3.2(acorn@8.12.1) + eslint-visitor-keys: 4.0.0 + espree@9.6.1: dependencies: - acorn: 8.10.0 - acorn-jsx: 5.3.2(acorn@8.10.0) + acorn: 8.12.1 + acorn-jsx: 5.3.2(acorn@8.12.1) eslint-visitor-keys: 3.4.3 esquery@1.5.0: dependencies: estraverse: 5.3.0 + esquery@1.6.0: + dependencies: + estraverse: 5.3.0 + esrecurse@4.3.0: dependencies: estraverse: 5.3.0 @@ -4678,14 +5652,6 @@ snapshots: fast-fifo@1.3.2: {} - fast-glob@3.3.1: - dependencies: - '@nodelib/fs.stat': 2.0.5 - '@nodelib/fs.walk': 1.2.8 - glob-parent: 5.1.2 - merge2: 1.4.1 - micromatch: 4.0.5 - fast-glob@3.3.2: dependencies: '@nodelib/fs.stat': 2.0.5 @@ -4709,9 +5675,9 @@ snapshots: escape-string-regexp: 5.0.0 is-unicode-supported: 1.3.0 - file-entry-cache@6.0.1: + file-entry-cache@8.0.0: dependencies: - flat-cache: 3.0.4 + flat-cache: 4.0.1 file-uri-to-path@1.0.0: {} @@ -4719,17 +5685,22 @@ snapshots: dependencies: to-regex-range: 5.0.1 + find-up-simple@1.0.0: {} + + find-up@4.1.0: + dependencies: + locate-path: 5.0.0 + path-exists: 4.0.0 + find-up@5.0.0: dependencies: locate-path: 6.0.0 path-exists: 4.0.0 - flat-cache@3.0.4: + flat-cache@4.0.1: dependencies: - flatted: 3.2.5 - rimraf: 3.0.2 - - flatted@3.2.5: {} + flatted: 3.3.1 + keyv: 4.5.4 flatted@3.3.1: {} @@ -4750,8 +5721,6 @@ snapshots: jsonfile: 6.1.0 universalify: 2.0.0 - fs.realpath@1.0.0: {} - fsevents@2.3.2: optional: true @@ -4762,15 +5731,6 @@ snapshots: function-bind@1.1.2: {} - function.prototype.name@1.1.5: - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - functions-have-names: 1.2.3 - - functions-have-names@1.2.3: {} - get-caller-file@2.0.5: {} get-func-name@2.0.2: {} @@ -4792,12 +5752,7 @@ snapshots: get-stream@8.0.1: {} - get-symbol-description@1.0.0: - dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 - - get-tsconfig@4.6.0: + get-tsconfig@4.7.6: dependencies: resolve-pkg-maps: 1.0.0 @@ -4811,53 +5766,38 @@ snapshots: dependencies: is-glob: 4.0.3 - glob@10.2.6: + glob@10.4.5: dependencies: foreground-child: 3.1.1 - jackspeak: 2.3.6 - minimatch: 9.0.1 - minipass: 6.0.2 - path-scurry: 1.10.1 + jackspeak: 3.4.3 + minimatch: 9.0.5 + minipass: 7.1.2 + package-json-from-dist: 1.0.0 + path-scurry: 1.11.1 - glob@10.3.10: + glob@11.0.0: dependencies: foreground-child: 3.1.1 - jackspeak: 2.3.6 - minimatch: 9.0.3 - minipass: 6.0.2 - path-scurry: 1.10.1 + jackspeak: 4.0.1 + minimatch: 10.0.1 + minipass: 7.1.2 + package-json-from-dist: 1.0.0 + path-scurry: 2.0.0 - glob@10.3.12: - dependencies: - foreground-child: 3.1.1 - jackspeak: 2.3.6 - minimatch: 9.0.3 - minipass: 7.0.4 - path-scurry: 1.10.2 - - glob@7.2.3: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - - globals@13.20.0: + globals@13.24.0: dependencies: type-fest: 0.20.2 - globalthis@1.0.3: - dependencies: - define-properties: 1.2.0 + globals@14.0.0: {} + + globals@15.9.0: {} globby@11.1.0: dependencies: array-union: 2.1.0 dir-glob: 3.0.1 fast-glob: 3.3.2 - ignore: 5.2.0 + ignore: 5.3.2 merge2: 1.4.1 slash: 3.0.0 @@ -4869,6 +5809,8 @@ snapshots: graphemer@1.4.0: {} + graphql@16.9.0: {} + gunzip-maybe@1.4.2: dependencies: browserify-zlib: 0.1.4 @@ -4887,7 +5829,7 @@ snapshots: optionalDependencies: uglify-js: 3.17.4 - has-bigints@1.0.2: {} + has-flag@3.0.0: {} has-flag@4.0.0: {} @@ -4931,12 +5873,16 @@ snapshots: dependencies: function-bind: 1.1.2 + headers-polyfill@4.0.3: {} + hmac-drbg@1.0.1: dependencies: hash.js: 1.1.7 minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 + hosted-git-info@2.8.9: {} + html-escaper@2.0.2: {} htmlparser2@6.1.0: @@ -4963,10 +5909,10 @@ snapshots: ieee754@1.2.1: {} - ignore@5.2.0: {} - ignore@5.2.4: {} + ignore@5.3.2: {} + import-fresh@3.3.0: dependencies: parent-module: 1.0.1 @@ -4974,10 +5920,7 @@ snapshots: imurmurhash@0.1.4: {} - inflight@1.0.6: - dependencies: - once: 1.4.0 - wrappy: 1.0.2 + indent-string@4.0.0: {} inherits@2.0.4: {} @@ -5001,47 +5944,33 @@ snapshots: strip-ansi: 6.0.1 wrap-ansi: 6.2.0 - internal-slot@1.0.5: - dependencies: - get-intrinsic: 1.2.1 - has: 1.0.3 - side-channel: 1.0.4 - ip6@0.2.7: {} + is-alphabetical@1.0.4: {} + + is-alphanumerical@1.0.4: + dependencies: + is-alphabetical: 1.0.4 + is-decimal: 1.0.4 + is-arguments@1.1.1: dependencies: call-bind: 1.0.7 has-tostringtag: 1.0.0 - is-array-buffer@3.0.2: - dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 - is-typed-array: 1.1.10 + is-arrayish@0.2.1: {} - is-bigint@1.0.4: + is-builtin-module@3.2.1: dependencies: - has-bigints: 1.0.2 - - is-boolean-object@1.1.2: - dependencies: - call-bind: 1.0.2 - has-tostringtag: 1.0.0 + builtin-modules: 3.3.0 is-callable@1.2.7: {} - is-core-module@2.12.1: - dependencies: - has: 1.0.3 - is-core-module@2.13.0: dependencies: has: 1.0.3 - is-date-object@1.0.5: - dependencies: - has-tostringtag: 1.0.0 + is-decimal@1.0.4: {} is-deflate@1.0.0: {} @@ -5059,6 +5988,8 @@ snapshots: is-gzip@1.0.0: {} + is-hexadecimal@1.0.4: {} + is-interactive@1.0.0: {} is-nan@1.3.2: @@ -5066,35 +5997,14 @@ snapshots: call-bind: 1.0.7 define-properties: 1.2.1 - is-negative-zero@2.0.2: {} - - is-number-object@1.0.7: - dependencies: - has-tostringtag: 1.0.0 + is-node-process@1.2.0: {} is-number@7.0.0: {} is-path-inside@3.0.3: {} - is-regex@1.1.4: - dependencies: - call-bind: 1.0.2 - has-tostringtag: 1.0.0 - - is-shared-array-buffer@1.0.2: - dependencies: - call-bind: 1.0.2 - is-stream@3.0.0: {} - is-string@1.0.7: - dependencies: - has-tostringtag: 1.0.0 - - is-symbol@1.0.4: - dependencies: - has-symbols: 1.0.3 - is-typed-array@1.1.10: dependencies: available-typed-arrays: 1.0.5 @@ -5107,10 +6017,6 @@ snapshots: is-unicode-supported@1.3.0: {} - is-weakref@1.0.2: - dependencies: - call-bind: 1.0.2 - isarray@1.0.0: {} isexe@2.0.0: {} @@ -5125,10 +6031,10 @@ snapshots: make-dir: 4.0.0 supports-color: 7.2.0 - istanbul-lib-source-maps@5.0.4: + istanbul-lib-source-maps@5.0.6: dependencies: '@jridgewell/trace-mapping': 0.3.25 - debug: 4.3.4 + debug: 4.3.6 istanbul-lib-coverage: 3.2.2 transitivePeerDependencies: - supports-color @@ -5138,29 +6044,46 @@ snapshots: html-escaper: 2.0.2 istanbul-lib-report: 3.0.1 - jackspeak@2.3.6: + jackspeak@3.4.3: dependencies: '@isaacs/cliui': 8.0.2 optionalDependencies: '@pkgjs/parseargs': 0.11.0 - js-tokens@8.0.3: {} + jackspeak@4.0.1: + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + + js-tokens@4.0.0: {} js-yaml@4.1.0: dependencies: argparse: 2.0.1 + jsdoc-type-pratt-parser@4.0.0: {} + + jsdoc-type-pratt-parser@4.1.0: {} + + jsesc@0.5.0: {} + + jsesc@3.0.2: {} + + json-buffer@3.0.1: {} + + json-parse-even-better-errors@2.3.1: {} + json-schema-traverse@0.4.1: {} json-stable-stringify-without-jsonify@1.0.1: {} - json5@1.0.2: + jsonc-eslint-parser@2.4.0: dependencies: - minimist: 1.2.6 - - json5@2.2.3: {} - - jsonc-parser@3.2.0: {} + acorn: 8.12.1 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + semver: 7.5.1 jsonfile@6.1.0: dependencies: @@ -5168,15 +6091,29 @@ snapshots: optionalDependencies: graceful-fs: 4.2.10 + keyv@4.5.4: + dependencies: + json-buffer: 3.0.1 + levn@0.4.1: dependencies: prelude-ls: 1.2.1 type-check: 0.4.0 + lines-and-columns@1.2.4: {} + + linkify-it@5.0.0: + dependencies: + uc.micro: 2.1.0 + local-pkg@0.5.0: dependencies: - mlly: 1.6.1 - pkg-types: 1.0.3 + mlly: 1.7.1 + pkg-types: 1.1.3 + + locate-path@5.0.0: + dependencies: + p-locate: 4.1.0 locate-path@6.0.0: dependencies: @@ -5193,41 +6130,52 @@ snapshots: long@5.2.3: {} - loupe@2.3.7: + loupe@3.1.0: dependencies: get-func-name: 2.0.2 - loupe@3.1.0: + loupe@3.1.1: dependencies: get-func-name: 2.0.2 lru-cache@10.2.2: {} + lru-cache@11.0.0: {} + lru-cache@6.0.0: dependencies: yallist: 4.0.0 - lru-cache@9.1.2: {} - lunr@2.3.9: {} + lz-string@1.5.0: {} + + magic-string@0.30.11: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.0 + magic-string@0.30.8: dependencies: '@jridgewell/sourcemap-codec': 1.4.15 - magicast@0.3.3: + magicast@0.3.4: dependencies: - '@babel/parser': 7.24.0 + '@babel/parser': 7.25.3 '@babel/types': 7.24.0 - source-map-js: 1.0.2 + source-map-js: 1.2.0 make-dir@4.0.0: dependencies: semver: 7.6.0 - make-error@1.3.6: {} - - marked@4.3.0: {} + markdown-it@14.1.0: + dependencies: + argparse: 2.0.1 + entities: 4.5.0 + linkify-it: 5.0.0 + mdurl: 2.0.0 + punycode.js: 2.3.1 + uc.micro: 2.1.0 md5.js@1.3.5: dependencies: @@ -5235,10 +6183,31 @@ snapshots: inherits: 2.0.4 safe-buffer: 5.2.1 + mdast-util-from-markdown@0.8.5: + dependencies: + '@types/mdast': 3.0.15 + mdast-util-to-string: 2.0.0 + micromark: 2.11.4 + parse-entities: 2.0.0 + unist-util-stringify-position: 2.0.3 + transitivePeerDependencies: + - supports-color + + mdast-util-to-string@2.0.0: {} + + mdurl@2.0.0: {} + merge-stream@2.0.0: {} merge2@1.4.1: {} + micromark@2.11.4: + dependencies: + debug: 4.3.6 + parse-entities: 2.0.0 + transitivePeerDependencies: + - supports-color + micromatch@4.0.5: dependencies: braces: 3.0.2 @@ -5255,38 +6224,38 @@ snapshots: mimic-response@3.1.0: {} + min-indent@1.0.1: {} + minimalistic-assert@1.0.1: {} minimalistic-crypto-utils@1.0.1: {} + minimatch@10.0.1: + dependencies: + brace-expansion: 2.0.1 + minimatch@3.1.2: dependencies: brace-expansion: 1.1.11 - minimatch@9.0.1: - dependencies: - brace-expansion: 2.0.1 - - minimatch@9.0.3: + minimatch@9.0.5: dependencies: brace-expansion: 2.0.1 minimist@1.2.6: {} - minipass@6.0.2: {} - - minipass@7.0.4: {} + minipass@7.1.2: {} mkdirp-classic@0.5.3: {} mkdirp@3.0.1: {} - mlly@1.6.1: + mlly@1.7.1: dependencies: - acorn: 8.11.3 + acorn: 8.12.1 pathe: 1.1.2 - pkg-types: 1.0.3 - ufo: 1.5.1 + pkg-types: 1.1.3 + ufo: 1.5.4 mrmime@2.0.0: {} @@ -5294,12 +6263,36 @@ snapshots: ms@2.1.3: {} + msw@2.3.5(typescript@5.5.4): + dependencies: + '@bundled-es-modules/cookie': 2.0.0 + '@bundled-es-modules/statuses': 1.0.1 + '@bundled-es-modules/tough-cookie': 0.1.6 + '@inquirer/confirm': 3.1.22 + '@mswjs/interceptors': 0.29.1 + '@open-draft/until': 2.1.0 + '@types/cookie': 0.6.0 + '@types/statuses': 2.0.5 + chalk: 4.1.2 + graphql: 16.9.0 + headers-polyfill: 4.0.3 + is-node-process: 1.2.0 + outvariant: 1.4.3 + path-to-regexp: 6.2.2 + strict-event-emitter: 0.5.1 + type-fest: 4.24.0 + yargs: 17.7.2 + optionalDependencies: + typescript: 5.5.4 + mute-stream@1.0.0: {} nanoid@3.3.7: {} napi-build-utils@1.0.2: {} + natural-compare-lite@1.4.0: {} + natural-compare@1.4.0: {} neo-async@2.6.2: {} @@ -5310,6 +6303,8 @@ snapshots: node-gyp-build@4.8.1: {} + node-releases@2.0.18: {} + node-stdlib-browser@1.2.0: dependencies: assert: 2.1.0 @@ -5340,6 +6335,13 @@ snapshots: util: 0.12.5 vm-browserify: 1.1.2 + normalize-package-data@2.5.0: + dependencies: + hosted-git-info: 2.8.9 + resolve: 1.22.4 + semver: 5.7.2 + validate-npm-package-license: 3.0.4 + npm-run-path@5.3.0: dependencies: path-key: 4.0.0 @@ -5348,7 +6350,9 @@ snapshots: dependencies: boolbase: 1.0.0 - object-inspect@1.12.3: {} + nth-check@2.1.1: + dependencies: + boolbase: 1.0.0 object-inspect@1.13.1: {} @@ -5366,25 +6370,6 @@ snapshots: has-symbols: 1.0.3 object-keys: 1.1.1 - object.fromentries@2.0.6: - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - - object.groupby@1.0.0: - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - get-intrinsic: 1.2.1 - - object.values@1.1.6: - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - once@1.4.0: dependencies: wrappy: 1.0.2 @@ -5424,18 +6409,28 @@ snapshots: os-tmpdir@1.0.2: {} + outvariant@1.4.3: {} + + p-limit@2.3.0: + dependencies: + p-try: 2.2.0 + p-limit@3.1.0: dependencies: yocto-queue: 0.1.0 - p-limit@5.0.0: + p-locate@4.1.0: dependencies: - yocto-queue: 1.0.0 + p-limit: 2.3.0 p-locate@5.0.0: dependencies: p-limit: 3.1.0 + p-try@2.2.0: {} + + package-json-from-dist@1.0.0: {} + pako@0.2.9: {} pako@1.0.11: {} @@ -5453,6 +6448,29 @@ snapshots: pbkdf2: 3.1.2 safe-buffer: 5.2.1 + parse-entities@2.0.0: + dependencies: + character-entities: 1.2.4 + character-entities-legacy: 1.1.4 + character-reference-invalid: 1.1.4 + is-alphanumerical: 1.0.4 + is-decimal: 1.0.4 + is-hexadecimal: 1.0.4 + + parse-gitignore@2.0.0: {} + + parse-imports@2.1.1: + dependencies: + es-module-lexer: 1.5.4 + slashes: 3.0.12 + + parse-json@5.2.0: + dependencies: + '@babel/code-frame': 7.24.7 + error-ex: 1.3.2 + json-parse-even-better-errors: 2.3.1 + lines-and-columns: 1.2.4 + parse5-htmlparser2-tree-adapter@7.0.0: dependencies: domhandler: 5.0.3 @@ -5466,30 +6484,28 @@ snapshots: path-exists@4.0.0: {} - path-is-absolute@1.0.1: {} - path-key@3.1.1: {} path-key@4.0.0: {} path-parse@1.0.7: {} - path-scurry@1.10.1: - dependencies: - lru-cache: 9.1.2 - minipass: 6.0.2 - - path-scurry@1.10.2: + path-scurry@1.11.1: dependencies: lru-cache: 10.2.2 - minipass: 7.0.4 + minipass: 7.1.2 + + path-scurry@2.0.0: + dependencies: + lru-cache: 11.0.0 + minipass: 7.1.2 + + path-to-regexp@6.2.2: {} path-type@4.0.0: {} pathe@1.1.2: {} - pathval@1.1.1: {} - pathval@2.0.0: {} pbkdf2@3.1.2: @@ -5508,16 +6524,20 @@ snapshots: picocolors@1.0.0: {} + picocolors@1.0.1: {} + picomatch@2.3.1: {} + picomatch@4.0.2: {} + pkg-dir@5.0.0: dependencies: find-up: 5.0.0 - pkg-types@1.0.3: + pkg-types@1.1.3: dependencies: - jsonc-parser: 3.2.0 - mlly: 1.6.1 + confbox: 0.1.7 + mlly: 1.7.1 pathe: 1.1.2 playwright-core@1.42.1: {} @@ -5528,12 +6548,25 @@ snapshots: optionalDependencies: fsevents: 2.3.2 + pluralize@8.0.0: {} + + postcss-selector-parser@6.1.2: + dependencies: + cssesc: 3.0.0 + util-deprecate: 1.0.2 + postcss@8.4.35: dependencies: nanoid: 3.3.7 picocolors: 1.0.0 source-map-js: 1.0.2 + postcss@8.4.41: + dependencies: + nanoid: 3.3.7 + picocolors: 1.0.1 + source-map-js: 1.2.0 + prebuild-install@7.1.1: dependencies: detect-libc: 2.0.1 @@ -5551,13 +6584,11 @@ snapshots: prelude-ls@1.2.1: {} - prettier@3.0.3: {} - - pretty-format@29.7.0: + pretty-format@27.5.1: dependencies: - '@jest/schemas': 29.6.3 + ansi-regex: 5.0.1 ansi-styles: 5.2.0 - react-is: 18.2.0 + react-is: 17.0.2 printj@1.1.2: {} @@ -5565,6 +6596,8 @@ snapshots: process@0.11.10: {} + psl@1.9.0: {} + public-encrypt@4.0.3: dependencies: bn.js: 4.12.0 @@ -5590,6 +6623,8 @@ snapshots: inherits: 2.0.4 pump: 2.0.1 + punycode.js@2.3.1: {} + punycode@1.4.1: {} punycode@2.1.1: {} @@ -5600,6 +6635,8 @@ snapshots: querystring-es3@0.2.1: {} + querystringify@2.2.0: {} + queue-microtask@1.2.3: {} queue-tick@1.0.1: {} @@ -5620,7 +6657,20 @@ snapshots: minimist: 1.2.6 strip-json-comments: 2.0.1 - react-is@18.2.0: {} + react-is@17.0.2: {} + + read-pkg-up@7.0.1: + dependencies: + find-up: 4.1.0 + read-pkg: 5.2.0 + type-fest: 0.8.1 + + read-pkg@5.2.0: + dependencies: + '@types/normalize-package-data': 2.4.4 + normalize-package-data: 2.5.0 + parse-json: 5.2.0 + type-fest: 0.6.0 readable-stream@2.3.8: dependencies: @@ -5638,14 +6688,27 @@ snapshots: string_decoder: 1.3.0 util-deprecate: 1.0.2 - regexp.prototype.flags@1.5.0: + refa@0.12.1: dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - functions-have-names: 1.2.3 + '@eslint-community/regexpp': 4.11.0 + + regenerator-runtime@0.14.1: {} + + regexp-ast-analysis@0.7.1: + dependencies: + '@eslint-community/regexpp': 4.11.0 + refa: 0.12.1 + + regexp-tree@0.1.27: {} + + regjsparser@0.10.0: + dependencies: + jsesc: 0.5.0 require-directory@2.1.1: {} + requires-port@1.0.0: {} + resolve-from@4.0.0: {} resolve-pkg-maps@1.0.0: {} @@ -5663,13 +6726,10 @@ snapshots: reusify@1.0.4: {} - rimraf@3.0.2: + rimraf@6.0.1: dependencies: - glob: 7.2.3 - - rimraf@5.0.1: - dependencies: - glob: 10.2.6 + glob: 11.0.0 + package-json-from-dist: 1.0.0 ripemd160@2.0.2: dependencies: @@ -5709,28 +6769,26 @@ snapshots: safe-buffer@5.2.1: {} - safe-regex-test@1.0.0: - dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 - is-regex: 1.1.4 - safer-buffer@2.1.2: {} - semver@6.3.1: {} + scslre@0.3.0: + dependencies: + '@eslint-community/regexpp': 4.11.0 + refa: 0.12.1 + regexp-ast-analysis: 0.7.1 + + semver@5.7.2: {} semver@7.5.1: dependencies: lru-cache: 6.0.0 - semver@7.5.4: - dependencies: - lru-cache: 6.0.0 - semver@7.6.0: dependencies: lru-cache: 6.0.0 + semver@7.6.3: {} + set-function-length@1.2.2: dependencies: define-data-property: 1.1.4 @@ -5753,18 +6811,10 @@ snapshots: shebang-regex@3.0.0: {} - shiki@0.14.7: + shiki@1.12.1: dependencies: - ansi-sequence-parser: 1.1.0 - jsonc-parser: 3.2.0 - vscode-oniguruma: 1.7.0 - vscode-textmate: 8.0.0 - - side-channel@1.0.4: - dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 - object-inspect: 1.12.3 + '@shikijs/core': 1.12.1 + '@types/hast': 3.0.4 side-channel@1.0.6: dependencies: @@ -5795,14 +6845,43 @@ snapshots: mrmime: 2.0.0 totalist: 3.0.1 + sisteransi@1.0.5: {} + slash@3.0.0: {} + slashes@3.0.12: {} + source-map-js@1.0.2: {} + source-map-js@1.2.0: {} + source-map@0.6.1: {} + spdx-correct@3.2.0: + dependencies: + spdx-expression-parse: 3.0.1 + spdx-license-ids: 3.0.18 + + spdx-exceptions@2.5.0: {} + + spdx-expression-parse@3.0.1: + dependencies: + spdx-exceptions: 2.5.0 + spdx-license-ids: 3.0.18 + + spdx-expression-parse@4.0.0: + dependencies: + spdx-exceptions: 2.5.0 + spdx-license-ids: 3.0.18 + + spdx-license-ids@3.0.18: {} + + stable-hash@0.0.4: {} + stackback@0.0.2: {} + statuses@2.0.1: {} + std-env@3.7.0: {} stream-browserify@3.0.0: @@ -5826,6 +6905,10 @@ snapshots: optionalDependencies: bare-events: 2.2.2 + strict-event-emitter@0.5.1: {} + + string-argv@0.3.2: {} + string-width@4.2.3: dependencies: emoji-regex: 8.0.0 @@ -5838,24 +6921,6 @@ snapshots: emoji-regex: 9.2.2 strip-ansi: 7.1.0 - string.prototype.trim@1.2.7: - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - - string.prototype.trimend@1.0.6: - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - - string.prototype.trimstart@1.0.6: - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - string_decoder@1.1.1: dependencies: safe-buffer: 5.1.2 @@ -5872,17 +6937,19 @@ snapshots: dependencies: ansi-regex: 6.0.1 - strip-bom@3.0.0: {} - strip-final-newline@3.0.0: {} + strip-indent@3.0.0: + dependencies: + min-indent: 1.0.1 + strip-json-comments@2.0.1: {} strip-json-comments@3.1.1: {} - strip-literal@2.0.0: + supports-color@5.5.0: dependencies: - js-tokens: 8.0.3 + has-flag: 3.0.0 supports-color@7.2.0: dependencies: @@ -5890,6 +6957,15 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} + synckit@0.6.2: + dependencies: + tslib: 2.6.2 + + synckit@0.9.1: + dependencies: + '@pkgr/core': 0.1.1 + tslib: 2.6.2 + tapable@2.2.1: {} tar-fs@2.1.1: @@ -5913,11 +6989,11 @@ snapshots: fast-fifo: 1.3.2 streamx: 2.16.1 - test-exclude@6.0.0: + test-exclude@7.0.1: dependencies: '@istanbuljs/schema': 0.1.3 - glob: 7.2.3 - minimatch: 3.1.2 + glob: 10.4.5 + minimatch: 9.0.5 text-table@0.2.0: {} @@ -5930,11 +7006,13 @@ snapshots: dependencies: setimmediate: 1.0.5 - tinybench@2.6.0: {} + tinybench@2.9.0: {} - tinypool@0.8.2: {} + tinypool@1.0.0: {} - tinyspy@2.2.1: {} + tinyrainbow@1.2.0: {} + + tinyspy@3.0.0: {} tmp@0.0.33: dependencies: @@ -5946,50 +7024,37 @@ snapshots: dependencies: is-number: 7.0.0 + toml-eslint-parser@0.10.0: + dependencies: + eslint-visitor-keys: 3.4.3 + totalist@3.0.1: {} - ts-api-utils@1.0.1(typescript@5.4.3): + tough-cookie@4.1.4: dependencies: - typescript: 5.4.3 + psl: 1.9.0 + punycode: 2.1.1 + universalify: 0.2.0 + url-parse: 1.5.10 + + ts-api-utils@1.3.0(typescript@5.5.4): + dependencies: + typescript: 5.5.4 ts-morph@22.0.0: dependencies: '@ts-morph/common': 0.23.0 code-block-writer: 13.0.1 - ts-node@10.9.1(@types/node@20.10.0)(typescript@5.4.3): - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.8 - '@tsconfig/node12': 1.0.9 - '@tsconfig/node14': 1.0.1 - '@tsconfig/node16': 1.0.2 - '@types/node': 20.10.0 - acorn: 8.10.0 - acorn-walk: 8.2.0 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 5.4.3 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - - tsconfig-paths@3.14.2: - dependencies: - '@types/json5': 0.0.29 - json5: 1.0.2 - minimist: 1.2.6 - strip-bom: 3.0.0 - - tsconfig-paths@4.2.0: - dependencies: - json5: 2.2.3 - minimist: 1.2.6 - strip-bom: 3.0.0 - tslib@2.6.2: {} + tsx@4.17.0: + dependencies: + esbuild: 0.23.0 + get-tsconfig: 4.7.6 + optionalDependencies: + fsevents: 2.3.3 + tty-browserify@0.0.1: {} tunnel-agent@0.6.0: @@ -6000,48 +7065,63 @@ snapshots: dependencies: prelude-ls: 1.2.1 - type-detect@4.0.8: {} + type-detect@4.1.0: {} type-fest@0.20.2: {} type-fest@0.21.3: {} - typed-array-length@1.0.4: - dependencies: - call-bind: 1.0.2 - for-each: 0.3.3 - is-typed-array: 1.1.10 + type-fest@0.6.0: {} - typedoc@0.25.12(typescript@5.4.3): + type-fest@0.8.1: {} + + type-fest@4.24.0: {} + + typedoc@0.26.5(typescript@5.5.4): dependencies: lunr: 2.3.9 - marked: 4.3.0 - minimatch: 9.0.3 - shiki: 0.14.7 - typescript: 5.4.3 + markdown-it: 14.1.0 + minimatch: 9.0.5 + shiki: 1.12.1 + typescript: 5.5.4 + yaml: 2.5.0 - typescript@5.4.3: {} + typescript@5.5.4: {} - ufo@1.5.1: {} + uc.micro@2.1.0: {} + + ufo@1.5.4: {} uglify-js@3.17.4: optional: true - unbox-primitive@1.0.2: - dependencies: - call-bind: 1.0.2 - has-bigints: 1.0.2 - has-symbols: 1.0.3 - which-boxed-primitive: 1.0.2 - undici-types@5.26.5: {} + undici-types@6.13.0: {} + + unist-util-stringify-position@2.0.3: + dependencies: + '@types/unist': 2.0.10 + + universalify@0.2.0: {} + universalify@2.0.0: {} + update-browserslist-db@1.1.0(browserslist@4.23.3): + dependencies: + browserslist: 4.23.3 + escalade: 3.1.2 + picocolors: 1.0.1 + uri-js@4.4.1: dependencies: punycode: 2.1.1 + url-parse@1.5.10: + dependencies: + querystringify: 2.2.0 + requires-port: 1.0.0 + url@0.11.3: dependencies: punycode: 1.4.1 @@ -6057,20 +7137,17 @@ snapshots: is-typed-array: 1.1.10 which-typed-array: 1.1.9 - v8-compile-cache-lib@3.0.1: {} - - v8-to-istanbul@9.2.0: + validate-npm-package-license@3.0.4: dependencies: - '@jridgewell/trace-mapping': 0.3.25 - '@types/istanbul-lib-coverage': 2.0.6 - convert-source-map: 2.0.0 + spdx-correct: 3.2.0 + spdx-expression-parse: 3.0.1 - vite-node@1.4.0(@types/node@20.10.0): + vite-node@2.0.5(@types/node@20.10.0): dependencies: cac: 6.7.14 - debug: 4.3.4 + debug: 4.3.6 pathe: 1.1.2 - picocolors: 1.0.0 + tinyrainbow: 1.2.0 vite: 5.1.6(@types/node@20.10.0) transitivePeerDependencies: - '@types/node' @@ -6082,7 +7159,7 @@ snapshots: - supports-color - terser - vite-plugin-node-polyfills@0.21.0(rollup@4.13.0)(vite@5.1.6(@types/node@20.10.0)): + vite-plugin-node-polyfills@0.22.0(rollup@4.13.0)(vite@5.1.6(@types/node@20.10.0)): dependencies: '@rollup/plugin-inject': 5.0.5(rollup@4.13.0) node-stdlib-browser: 1.2.0 @@ -6099,32 +7176,31 @@ snapshots: '@types/node': 20.10.0 fsevents: 2.3.3 - vitest@1.4.0(@types/node@20.10.0)(@vitest/browser@1.4.0)(@vitest/ui@1.4.0): + vitest@2.0.5(@types/node@20.10.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5): dependencies: - '@vitest/expect': 1.4.0 - '@vitest/runner': 1.4.0 - '@vitest/snapshot': 1.4.0 - '@vitest/spy': 1.4.0 - '@vitest/utils': 1.4.0 - acorn-walk: 8.3.2 - chai: 4.4.1 - debug: 4.3.4 + '@ampproject/remapping': 2.3.0 + '@vitest/expect': 2.0.5 + '@vitest/pretty-format': 2.0.5 + '@vitest/runner': 2.0.5 + '@vitest/snapshot': 2.0.5 + '@vitest/spy': 2.0.5 + '@vitest/utils': 2.0.5 + chai: 5.1.1 + debug: 4.3.6 execa: 8.0.1 - local-pkg: 0.5.0 - magic-string: 0.30.8 + magic-string: 0.30.11 pathe: 1.1.2 - picocolors: 1.0.0 std-env: 3.7.0 - strip-literal: 2.0.0 - tinybench: 2.6.0 - tinypool: 0.8.2 + tinybench: 2.9.0 + tinypool: 1.0.0 + tinyrainbow: 1.2.0 vite: 5.1.6(@types/node@20.10.0) - vite-node: 1.4.0(@types/node@20.10.0) - why-is-node-running: 2.2.2 + vite-node: 2.0.5(@types/node@20.10.0) + why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 20.10.0 - '@vitest/browser': 1.4.0(playwright@1.42.1)(vitest@1.4.0) - '@vitest/ui': 1.4.0(vitest@1.4.0) + '@vitest/browser': 2.0.5(playwright@1.42.1)(typescript@5.5.4)(vitest@2.0.5) + '@vitest/ui': 2.0.5(vitest@2.0.5) transitivePeerDependencies: - less - lightningcss @@ -6136,22 +7212,23 @@ snapshots: vm-browserify@1.1.2: {} - vscode-oniguruma@1.7.0: {} - - vscode-textmate@8.0.0: {} + vue-eslint-parser@9.4.3(eslint@9.9.0): + dependencies: + debug: 4.3.6 + eslint: 9.9.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + esquery: 1.6.0 + lodash: 4.17.21 + semver: 7.5.1 + transitivePeerDependencies: + - supports-color wcwidth@1.0.1: dependencies: defaults: 1.0.4 - which-boxed-primitive@1.0.2: - dependencies: - is-bigint: 1.0.4 - is-boolean-object: 1.1.2 - is-number-object: 1.0.7 - is-string: 1.0.7 - is-symbol: 1.0.4 - which-typed-array@1.1.9: dependencies: available-typed-arrays: 1.0.5 @@ -6165,7 +7242,7 @@ snapshots: dependencies: isexe: 2.0.0 - why-is-node-running@2.2.2: + why-is-node-running@2.3.0: dependencies: siginfo: 2.0.0 stackback: 0.0.2 @@ -6194,12 +7271,24 @@ snapshots: ws@8.13.0: {} + ws@8.18.0: {} + + xml-name-validator@4.0.0: {} + xtend@4.0.2: {} y18n@5.0.8: {} yallist@4.0.0: {} + yaml-eslint-parser@1.2.3: + dependencies: + eslint-visitor-keys: 3.4.3 + lodash: 4.17.21 + yaml: 2.5.0 + + yaml@2.5.0: {} + yargs-parser@21.1.1: {} yargs@17.7.2: @@ -6212,8 +7301,6 @@ snapshots: y18n: 5.0.8 yargs-parser: 21.1.1 - yn@3.1.1: {} - yocto-queue@0.1.0: {} - yocto-queue@1.0.0: {} + yoctocolors-cjs@2.1.2: {} diff --git a/scripts/build-package.js b/scripts/build-package.js index 72b7487f..15a8e80c 100644 --- a/scripts/build-package.js +++ b/scripts/build-package.js @@ -1,12 +1,15 @@ -/* eslint-disable no-inner-declarations */ -const cp = require('child_process') -const path = require('path') -const fs = require('fs') -const glob = require('glob') -const ts = require('typescript') -const stc = require('@teidesu/slow-types-compiler') -// @ts-ignore -const rootPackageJson = require('../package.json') +import * as cp from 'node:child_process' +import * as fs from 'node:fs' +import { createRequire } from 'node:module' +import * as path from 'node:path' + +import * as glob from 'glob' +import ts from 'typescript' +import * as stc from '@teidesu/slow-types-compiler' + +const __dirname = path.dirname(new URL(import.meta.url).pathname) + +const rootPackageJson = JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json'), 'utf-8')) if (process.argv.length < 3) { console.log('Usage: build-package.js ') @@ -30,6 +33,9 @@ function transformFile(file, transform) { if (res != null) fs.writeFileSync(file, res) } +// todo make them esm +const require = createRequire(import.meta.url) + const buildConfig = { buildTs: true, buildCjs: true, @@ -211,7 +217,7 @@ function buildPackageJson() { const value = pkgJson.exports[key] if (typeof value !== 'string') { - throw new Error('Conditional exports are not supported') + throw new TypeError('Conditional exports are not supported') } pkgJson.exports[key] = fixValue(value) @@ -358,7 +364,7 @@ if (buildConfig.buildTs && !IS_JSR) { let content = fs.readFileSync(f, 'utf8') let changed = false - if (content.indexOf('/// \n?/g, '') } @@ -393,7 +399,7 @@ if (buildConfig.buildTs && !IS_JSR) { changedTs = true imp.moduleSpecifier = { kind: ts.SyntaxKind.StringLiteral, - text: mod.slice(0, -3) + '.ts', + text: `${mod.slice(0, -3)}.ts`, } } } @@ -413,17 +419,17 @@ if (buildConfig.buildTs && !IS_JSR) { setImmediate: '(cb: (...args: any[]) => void, ...args: any[]) => number', clearImmediate: '(id: number) => void', Buffer: - '{ ' + - 'concat: (...args: any[]) => Uint8Array, ' + - 'from: (data: any, encoding?: string) => { toString(encoding?: string): string }, ' + - ' }', + '{ ' + + 'concat: (...args: any[]) => Uint8Array, ' + + 'from: (data: any, encoding?: string) => { toString(encoding?: string): string }, ' + + ' }', SharedWorker: ['type', 'never'], WorkerGlobalScope: - '{ ' + - ' new (): typeof WorkerGlobalScope, ' + - ' postMessage: (message: any, transfer?: Transferable[]) => void, ' + - ' addEventListener: (type: "message", listener: (ev: MessageEvent) => void) => void, ' + - ' }', + '{ ' + + ' new (): typeof WorkerGlobalScope, ' + + ' postMessage: (message: any, transfer?: Transferable[]) => void, ' + + ' addEventListener: (type: "message", listener: (ev: MessageEvent) => void) => void, ' + + ' }', process: '{ ' + 'hrtime: { bigint: () => bigint }, ' + '}', } @@ -436,9 +442,9 @@ if (buildConfig.buildTs && !IS_JSR) { const decl = isType ? decl_[1] : decl_ if (isType) { - fileContent = `declare type ${name} = ${decl};\n` + fileContent + fileContent = `declare type ${name} = ${decl};\n${fileContent}` } else { - fileContent = `declare const ${name}: ${decl};\n` + fileContent + fileContent = `declare const ${name}: ${decl};\n${fileContent}` } } } @@ -483,7 +489,7 @@ if (typeof globalThis !== 'undefined' && !globalThis._MTCUTE_CJS_DEPRECATION_WAR for (const entry of entrypoints) { if (!entry.endsWith('.js')) continue - transformFile(path.join(outDir, entry), (content) => `${CJS_DEPRECATION_WARNING}\n${content}`) + transformFile(path.join(outDir, entry), content => `${CJS_DEPRECATION_WARNING}\n${content}`) } } @@ -568,7 +574,7 @@ if (IS_JSR) { console.log('[i] Processing with slow-types-compiler...') const project = stc.createProject() stc.processPackage(project, denoJson) - const unsavedSourceFiles = project.getSourceFiles().filter((s) => !s.isSaved()) + const unsavedSourceFiles = project.getSourceFiles().filter(s => !s.isSaved()) if (unsavedSourceFiles.length > 0) { console.log('[v] Changed %d files', unsavedSourceFiles.length) @@ -608,7 +614,7 @@ if (IS_JSR) { try { fs.cpSync(path.join(packageDir, 'README.md'), path.join(outDir, 'README.md')) } catch (e) { - console.log('[!] Failed to copy README.md: ' + e.message) + console.log(`[!] Failed to copy README.md: ${e.message}`) } fs.cpSync(path.join(__dirname, '../LICENSE'), path.join(outDir, 'LICENSE')) @@ -617,12 +623,12 @@ if (!IS_JSR) { fs.writeFileSync(path.join(outDir, '.npmignore'), '*.tsbuildinfo\n') } -Promise.resolve(buildConfig.final()).then(() => { - if (IS_JSR && !process.env.CI) { - console.log('[i] Trying to publish with --dry-run') - exec('deno publish --dry-run --allow-dirty --quiet', { cwd: outDir }) - console.log('[v] All good!') - } else { - console.log('[v] Done!') - } -}) +await buildConfig.final() + +if (IS_JSR && !process.env.CI) { + console.log('[i] Trying to publish with --dry-run') + exec('deno publish --dry-run --allow-dirty --quiet', { cwd: outDir }) + console.log('[v] All good!') +} else { + console.log('[v] Done!') +} diff --git a/scripts/bump-version.js b/scripts/bump-version.js index 7b3ab98f..d0cd3344 100644 --- a/scripts/bump-version.js +++ b/scripts/bump-version.js @@ -1,14 +1,18 @@ -const fs = require('fs') -const path = require('path') -const semver = require('semver') +import { appendFileSync, readFileSync, readdirSync, writeFileSync } from 'node:fs' +import { EOL } from 'node:os' +import { dirname, join } from 'node:path' +import { fileURLToPath } from 'node:url' + +import { inc, rcompare } from 'semver' + +const __dirname = dirname(new URL(import.meta.url).pathname) function collectPackageJsons() { - return fs - .readdirSync(path.join(__dirname, '../packages')) - .filter((s) => !s.startsWith('.')) + return readdirSync(join(__dirname, '../packages')) + .filter(s => !s.startsWith('.')) .map((name) => { try { - return JSON.parse(fs.readFileSync(path.join(__dirname, '../packages', name, 'package.json'), 'utf-8')) + return JSON.parse(readFileSync(join(__dirname, '../packages', name, 'package.json'), 'utf-8')) } catch (e) { if (e.code !== 'ENOENT') throw e @@ -21,16 +25,16 @@ function collectPackageJsons() { function bumpVersions(packages, kind) { const pkgJsons = collectPackageJsons() const maxVersion = pkgJsons - .filter((it) => it.name !== '@mtcute/tl') - .map((it) => it.version) - .sort(semver.rcompare)[0] + .filter(it => it.name !== '@mtcute/tl') + .map(it => it.version) + .sort(rcompare)[0] - const nextVersion = semver.inc(maxVersion, kind) + const nextVersion = inc(maxVersion, kind) console.log('[i] Bumping versions to %s', nextVersion) for (const pkg of packages) { if (pkg === 'tl') continue // own versioning - const pkgJson = pkgJsons.find((it) => it.name === `@mtcute/${pkg}`) + const pkgJson = pkgJsons.find(it => it.name === `@mtcute/${pkg}`) if (!pkgJson) { console.error(`Package ${pkg} not found!`) @@ -38,20 +42,20 @@ function bumpVersions(packages, kind) { } pkgJson.version = nextVersion - fs.writeFileSync( - path.join(__dirname, '../packages', pkg, 'package.json'), - JSON.stringify(pkgJson, null, 4) + '\n', + writeFileSync( + join(__dirname, '../packages', pkg, 'package.json'), + `${JSON.stringify(pkgJson, null, 4)}\n`, ) } - const rootPkgJson = JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json'), 'utf-8')) + const rootPkgJson = JSON.parse(readFileSync(join(__dirname, '../package.json'), 'utf-8')) rootPkgJson.version = nextVersion - fs.writeFileSync(path.join(__dirname, '../package.json'), JSON.stringify(rootPkgJson, null, 4) + '\n') + writeFileSync(join(__dirname, '../package.json'), `${JSON.stringify(rootPkgJson, null, 4)}\n`) return nextVersion } -if (require.main === module) { +if (process.argv[1] === fileURLToPath(import.meta.url)) { const kind = process.argv[2] const packages = process.argv[3] @@ -75,8 +79,8 @@ if (require.main === module) { const ver = bumpVersions(packagesList, kind) if (process.env.GITHUB_OUTPUT) { - fs.appendFileSync(process.env.GITHUB_OUTPUT, `version=${ver}${require('os').EOL}`) + appendFileSync(process.env.GITHUB_OUTPUT, `version=${ver}${EOL}`) } } -module.exports = { bumpVersions } +export { bumpVersions } diff --git a/scripts/find-updated-packages.js b/scripts/find-updated-packages.js index f8a68552..447e4288 100644 --- a/scripts/find-updated-packages.js +++ b/scripts/find-updated-packages.js @@ -1,27 +1,32 @@ -const cp = require('child_process') -const fs = require('fs') -const path = require('path') -const { listPackages } = require('./publish') -const { getLatestTag, findChangedFilesSince } = require('./git-utils') +import { execSync } from 'node:child_process' +import { appendFileSync, existsSync } from 'node:fs' +import { EOL } from 'node:os' +import { dirname, join } from 'node:path' +import { fileURLToPath } from 'node:url' + +import { findChangedFilesSince, getLatestTag } from './git-utils.js' +import { listPackages } from './publish.js' getTsconfigFiles.cache = {} +const __dirname = dirname(new URL(import.meta.url).pathname) + function getTsconfigFiles(pkg) { - if (!fs.existsSync(path.join(__dirname, `../packages/${pkg}/tsconfig.json`))) { + if (!existsSync(join(__dirname, `../packages/${pkg}/tsconfig.json`))) { throw new Error(`[!] ${pkg} does not have a tsconfig.json`) } if (pkg in getTsconfigFiles.cache) return getTsconfigFiles.cache[pkg] console.log('[i] Getting tsconfig files for %s', pkg) - const res = cp.execSync('pnpm exec tsc --showConfig', { + const res = execSync('pnpm exec tsc --showConfig', { encoding: 'utf8', stdio: 'pipe', - cwd: path.join(__dirname, `../packages/${pkg}`), + cwd: join(__dirname, `../packages/${pkg}`), }) const json = JSON.parse(res) - return (getTsconfigFiles.cache[pkg] = json.files.map((it) => it.replace(/^\.\//, ''))) + return (getTsconfigFiles.cache[pkg] = json.files.map(it => it.replace(/^\.\//, ''))) } function isMeaningfulChange(pkg, path) { @@ -29,7 +34,7 @@ function isMeaningfulChange(pkg, path) { if (path.match(/\.(md|test(?:-utils)?\.ts)$/i)) return false - if (getTsconfigFiles(pkg).indexOf(path) > -1) { + if (getTsconfigFiles(pkg).includes(path)) { console.log('[i] %s: %s is in tsconfig', pkg, path) return true @@ -68,9 +73,9 @@ function findChangedPackagesSince(tag, until) { return Array.from(changedPackages) } -module.exports = { findChangedPackagesSince, getLatestTag } +export { findChangedPackagesSince, getLatestTag } -if (require.main === module && process.env.CI && process.env.GITHUB_OUTPUT) { +if (process.argv[1] === fileURLToPath(import.meta.url) && process.env.CI && process.env.GITHUB_OUTPUT) { const kind = process.argv[2] const input = process.argv[3] @@ -102,5 +107,5 @@ if (require.main === module && process.env.CI && process.env.GITHUB_OUTPUT) { } console.log('[i] Will publish:', res) - fs.appendFileSync(process.env.GITHUB_OUTPUT, `modified=${res.join(',')}${require('os').EOL}`) + appendFileSync(process.env.GITHUB_OUTPUT, `modified=${res.join(',')}${EOL}`) } diff --git a/scripts/gen-deps-graph.mjs b/scripts/gen-deps-graph.js similarity index 88% rename from scripts/gen-deps-graph.mjs rename to scripts/gen-deps-graph.js index 5072beec..b6e0a57a 100644 --- a/scripts/gen-deps-graph.mjs +++ b/scripts/gen-deps-graph.js @@ -1,5 +1,5 @@ -// node scripts/gen-deps-graph.mjs | dot -Tsvg > deps.svg -import { getPackageJsons } from './utils.mjs' +// node scripts/gen-deps-graph.js | dot -Tsvg > deps.svg +import { getPackageJsons } from './utils.js' const packageJsons = await getPackageJsons() diff --git a/scripts/generate-changelog.js b/scripts/generate-changelog.js index b301fbdf..04eacd46 100644 --- a/scripts/generate-changelog.js +++ b/scripts/generate-changelog.js @@ -1,5 +1,9 @@ -const fs = require('fs') -const { getLatestTag, getCommitsSince, parseConventionalCommit, findChangedFilesSince } = require('./git-utils') +import { randomUUID } from 'node:crypto' +import { appendFileSync } from 'node:fs' +import { EOL } from 'node:os' +import { fileURLToPath } from 'node:url' + +import { findChangedFilesSince, getCommitsSince, getLatestTag, parseConventionalCommit } from './git-utils.js' function generateChangelog(onlyPackages) { const byPackage = {} @@ -21,13 +25,13 @@ function generateChangelog(onlyPackages) { let line = `- ${commit.hash}: ${breaking ? '**❗ BREAKING** ' : ''}${commit.msg}` if (breaking && commit.description) { - line += - '\n' + - commit.description + line + += `\n${ + commit.description .trim() .split('\n') - .map((line) => ` ${line}`) - .join('\n') + .map(line => ` ${line}`) + .join('\n')}` } for (const file of changed) { @@ -52,7 +56,7 @@ function generateChangelog(onlyPackages) { return ret } -if (require.main === module) { +if (process.argv[1] === fileURLToPath(import.meta.url)) { let onlyPackages = null if (process.argv[2]) { @@ -62,8 +66,8 @@ if (require.main === module) { const res = generateChangelog(onlyPackages) if (process.env.CI && process.env.GITHUB_OUTPUT) { - const delim = `---${require('crypto').randomUUID()}---${require('os').EOL}` - fs.appendFileSync(process.env.GITHUB_OUTPUT, `changelog<<${delim}${res}${delim}`) + const delim = `---${randomUUID()}---${EOL}` + appendFileSync(process.env.GITHUB_OUTPUT, `changelog<<${delim}${res}${delim}`) } else { console.log(res) } diff --git a/scripts/git-utils.js b/scripts/git-utils.js index 2c2185ce..bc90be72 100644 --- a/scripts/git-utils.js +++ b/scripts/git-utils.js @@ -1,14 +1,14 @@ -const cp = require('child_process') +import { execSync } from 'node:child_process' function getLatestTag() { try { - const res = cp.execSync('git describe --abbrev=0 --tags', { encoding: 'utf8', stdio: 'pipe' }).trim() + const res = execSync('git describe --abbrev=0 --tags', { encoding: 'utf8', stdio: 'pipe' }).trim() return res } catch (e) { if (e.stderr.match(/^fatal: (No names found|No tags can describe)/i)) { // no tags found, let's just return the first commit - return cp.execSync('git rev-list --max-parents=0 HEAD', { encoding: 'utf8' }).trim() + return execSync('git rev-list --max-parents=0 HEAD', { encoding: 'utf8' }).trim() } throw e @@ -16,14 +16,13 @@ function getLatestTag() { } function findChangedFilesSince(tag, until = 'HEAD') { - return cp.execSync(`git diff --name-only ${tag} ${until}`, { encoding: 'utf8', stdio: 'pipe' }).trim().split('\n') + return execSync(`git diff --name-only ${tag} ${until}`, { encoding: 'utf8', stdio: 'pipe' }).trim().split('\n') } function getCommitsSince(tag, until = 'HEAD') { const delim = `---${Math.random().toString(36).slice(2)}---` - const lines = cp - .execSync(`git log --pretty="format:%H %s%n%b%n${delim}" ${tag}..${until}`, { encoding: 'utf8', stdio: 'pipe' }) + const lines = execSync(`git log --pretty="format:%H %s%n%b%n${delim}" ${tag}..${until}`, { encoding: 'utf8', stdio: 'pipe' }) .trim() .split('\n') @@ -50,11 +49,11 @@ function getCommitsSince(tag, until = 'HEAD') { } function getCurrentCommit() { - return cp.execSync('git rev-parse HEAD', { encoding: 'utf8', stdio: 'pipe' }).trim() + return execSync('git rev-parse HEAD', { encoding: 'utf8', stdio: 'pipe' }).trim() } function getCurrentBranch() { - return cp.execSync('git rev-parse --abbrev-ref HEAD', { encoding: 'utf8', stdio: 'pipe' }).trim() + return execSync('git rev-parse --abbrev-ref HEAD', { encoding: 'utf8', stdio: 'pipe' }).trim() } function parseConventionalCommit(msg) { @@ -67,11 +66,11 @@ function parseConventionalCommit(msg) { return { type, scope, breaking: Boolean(breaking), subject } } -module.exports = { - getLatestTag, +export { findChangedFilesSince, getCommitsSince, - parseConventionalCommit, - getCurrentCommit, getCurrentBranch, + getCurrentCommit, + getLatestTag, + parseConventionalCommit, } diff --git a/scripts/publish.js b/scripts/publish.js index ecdd7dd5..542fce8a 100644 --- a/scripts/publish.js +++ b/scripts/publish.js @@ -1,12 +1,19 @@ -const fs = require('fs') -const path = require('path') -const cp = require('child_process') -const stc = require('@teidesu/slow-types-compiler') +import * as cp from 'node:child_process' +import * as fs from 'node:fs' +import { createRequire } from 'node:module' +import * as path from 'node:path' +import { fileURLToPath } from 'node:url' + +import * as stc from '@teidesu/slow-types-compiler' const IS_JSR = process.env.JSR === '1' const MAIN_REGISTRY = IS_JSR ? 'https://jsr.io/' : 'https://registry.npmjs.org' let REGISTRY = process.env.REGISTRY || MAIN_REGISTRY -exports.REGISTRY = REGISTRY +const EXPORTED_REGISTRY = REGISTRY + +const __dirname = path.dirname(new URL(import.meta.url).pathname) +const require = createRequire(import.meta.url) + if (!REGISTRY.endsWith('/')) REGISTRY += '/' if (process.env.E2E && IS_JSR) { @@ -23,15 +30,15 @@ if (IS_JSR) { } const JSR_EXCEPTIONS = { - bun: 'never', + 'bun': 'never', 'create-bot': 'never', 'crypto-node': 'never', - deno: 'only', - node: 'never', + 'deno': 'only', + 'node': 'never', 'http-proxy': 'never', 'socks-proxy': 'never', - mtproxy: 'never', - test: 'never', + 'mtproxy': 'never', + 'test': 'never', } function fetchRetry(url, init, retry = 0) { @@ -43,20 +50,20 @@ function fetchRetry(url, init, retry = 0) { console.log('[i] Error fetching %s:', url) console.log(err) - return new Promise((resolve) => setTimeout(resolve, 1000)).then(() => fetchRetry(url, init, retry + 1)) + return new Promise(resolve => setTimeout(resolve, 1000)).then(() => fetchRetry(url, init, retry + 1)) }) } async function checkVersion(name, version) { - let registry = REGISTRY + const registry = REGISTRY const url = IS_JSR ? `${registry}@mtcute/${name}/${version}_meta.json` : `${registry}@mtcute/${name}/${version}` - return fetchRetry(url).then((r) => r.status === 200) + return fetchRetry(url).then(r => r.status === 200) } async function publishSinglePackage(name) { - let packageDir = path.join(__dirname, '../packages', name) + const packageDir = path.join(__dirname, '../packages', name) console.log('[i] Building %s', name) @@ -68,9 +75,9 @@ async function publishSinglePackage(name) { console.log('[i] Publishing %s', name) - const version = IS_JSR ? - require(path.join(packageDir, 'dist/jsr/deno.json')).version : - require(path.join(packageDir, 'dist/package.json')).version + const version = IS_JSR + ? require(path.join(packageDir, 'dist/jsr/deno.json')).version + : require(path.join(packageDir, 'dist/package.json')).version const exists = await checkVersion(name, version) @@ -137,8 +144,8 @@ function listPackages(all = false) { for (const pkg of packages) { const deps = require(`../packages/${pkg}/package.json`).dependencies || {} map[pkg] = Object.keys(deps) - .filter((d) => d.startsWith('@mtcute/')) - .map((d) => d.slice(8)) + .filter(d => d.startsWith('@mtcute/')) + .map(d => d.slice(8)) } packages = stc.determinePublishOrder(map) @@ -148,8 +155,6 @@ function listPackages(all = false) { return packages } -exports.listPackages = listPackages - async function main(arg = process.argv[2]) { if (!arg) { console.log('Usage: publish.js ') @@ -183,7 +188,7 @@ async function main(arg = process.argv[2]) { } } else { let pkgs = arg.split(',') - let filteredPkgs = [] + const filteredPkgs = [] const deps = {} // determine the order of packages to publish @@ -197,8 +202,8 @@ async function main(arg = process.argv[2]) { if (IS_JSR) { const pkgDeps = require(`../packages/${pkg}/package.json`).dependencies || {} deps[pkg] = Object.keys(pkgDeps) - .filter((d) => d.startsWith('@mtcute/')) - .map((d) => d.slice(8)) + .filter(d => d.startsWith('@mtcute/')) + .map(d => d.slice(8)) } } @@ -248,11 +253,8 @@ async function main(arg = process.argv[2]) { process.exit(0) // idk why but it sometimes hangs indefinitely } -exports.main = main +export { listPackages, main, EXPORTED_REGISTRY as REGISTRY } -if (require.main === module) { - main().catch((e) => { - console.error(e) - process.exit(1) - }) +if (process.argv[1] === fileURLToPath(import.meta.url)) { + await main() } diff --git a/scripts/remove-jsr-sourcefiles.mjs b/scripts/remove-jsr-sourcefiles.js similarity index 86% rename from scripts/remove-jsr-sourcefiles.mjs rename to scripts/remove-jsr-sourcefiles.js index 3ed84a26..f0cfde39 100644 --- a/scripts/remove-jsr-sourcefiles.mjs +++ b/scripts/remove-jsr-sourcefiles.js @@ -1,7 +1,8 @@ -import * as fs from 'fs' +import * as fs from 'node:fs' +import { join } from 'node:path' +import { fileURLToPath } from 'node:url' + import { globSync } from 'glob' -import { join } from 'path' -import { fileURLToPath } from 'url' // for whatever reason, jsr's npm compatibility jayer doesn't remove // original typescript source files, which results in type errors when diff --git a/scripts/utils.mjs b/scripts/utils.js similarity index 69% rename from scripts/utils.mjs rename to scripts/utils.js index a91ff53e..46e13cc2 100644 --- a/scripts/utils.mjs +++ b/scripts/utils.js @@ -1,6 +1,6 @@ -import { readdir, readFile } from 'fs/promises' -import { dirname, join } from 'path' -import { fileURLToPath } from 'url' +import { readFile, readdir } from 'node:fs/promises' +import { dirname, join } from 'node:path' +import { fileURLToPath } from 'node:url' export const rootDir = join(dirname(fileURLToPath(import.meta.url)), '../') @@ -20,9 +20,9 @@ export async function tryParsePackageJson(packageName) { export async function getPackageJsons(includeRoot = false) { const packages = (await readdir(join(rootDir, 'packages'))) - .filter((s) => !s.startsWith('.')) + .filter(s => !s.startsWith('.')) if (includeRoot) packages.push('$root') - return Promise.all(packages.map(tryParsePackageJson)).then((f) => f.filter(Boolean)) + return Promise.all(packages.map(tryParsePackageJson)).then(f => f.filter(Boolean)) } diff --git a/scripts/validate-deps-versions.mjs b/scripts/validate-deps-versions.js similarity index 92% rename from scripts/validate-deps-versions.mjs rename to scripts/validate-deps-versions.js index 0a54ae30..80347398 100644 --- a/scripts/validate-deps-versions.mjs +++ b/scripts/validate-deps-versions.js @@ -1,7 +1,8 @@ -import semver from 'semver' -import { fileURLToPath } from 'url' +import { fileURLToPath } from 'node:url' -import { getPackageJsons } from './utils.mjs' +import semver from 'semver' + +import { getPackageJsons } from './utils.js' export async function validateDepsVersions() { const packageJsons = await getPackageJsons(true) @@ -41,7 +42,7 @@ export async function validateDepsVersions() { if (errors.length > 0) { console.log('⚠️ Found external dependencies mismatch:') - errors.forEach((err) => console.log(err)) + errors.forEach(err => console.log(err)) process.exit(1) } diff --git a/tsconfig.json b/tsconfig.json index 7f150ec2..53f58936 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,43 +1,39 @@ { - "compilerOptions": { - "outDir": "./dist", - "module": "NodeNext", - "moduleResolution": "NodeNext", - "target": "es2022", - "allowJs": true, - "sourceMap": true, - "inlineSources": true, - "declaration": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "noImplicitAny": true, - "noImplicitThis": true, - "incremental": true, - "stripInternal": false, - "skipLibCheck": true, - "composite": true, - "types": [ - "node", - "deno/ns", - "vite/client" - ], - "lib": [ - "es2020", - "dom", - "dom.iterable", - "WebWorker", - ], - "resolveJsonModule": true, - "isolatedModules": true, - "useDefineForClassFields": true, - }, - "ts-node": { - "esm": true, - "experimentalSpecifierResolution": "node" - }, - "exclude": [ - "**/node_modules", - "**/__snapshots__", - ] + "compilerOptions": { + "incremental": true, + "composite": true, + "target": "es2022", + "lib": [ + "es2020", + "dom", + "dom.iterable", + "WebWorker" + ], + "useDefineForClassFields": true, + "module": "NodeNext", + "moduleResolution": "NodeNext", + "resolveJsonModule": true, + "types": [ + "node", + "deno/ns", + "vite/client" + ], + "strict": true, + "noImplicitAny": true, + "noImplicitThis": true, + "declaration": true, + "inlineSources": true, + "outDir": "./dist", + "sourceMap": true, + "stripInternal": false, + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "isolatedDeclarations": true, + "isolatedModules": true, + "skipLibCheck": true + }, + "exclude": [ + "**/node_modules", + "**/__snapshots__" + ] }