ClientUser Class
extends BaseRepresents a Telegram user or bot.
Properties
addedToAttachmentMenu: boolean
canJoinGroups: boolean
canReadAllGroupMessages: boolean
client: Client
firstName: string
id: number
isBot: boolean
isPremium: boolean
languageCode: string
lastName: string
supportsInlineQueries: boolean
username: string
Methods
toJSON()
toString()
{ "id": 1231, "name": "ClientUser", "variant": "declaration", "kind": 128, "flags": {}, "comment": { "summary": [ { "kind": "text", "text": "Represents a Telegram user or bot." } ] }, "children": [ { "id": 1232, "name": "constructor", "variant": "declaration", "kind": 512, "flags": {}, "sources": [ { "fileName": "packages/tgkit/src/structures/ClientUser.ts", "line": 18, "character": 1 } ], "signatures": [ { "id": 1233, "name": "new ClientUser", "variant": "signature", "kind": 16384, "flags": {}, "sources": [ { "fileName": "packages/tgkit/src/structures/ClientUser.ts", "line": 18, "character": 1 } ], "parameters": [ { "id": 1234, "name": "client", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "reference", "target": 1, "name": "Client", "package": "tgkit", "qualifiedName": "default" } }, { "id": 1235, "name": "data", "variant": "param", "kind": 32768, "flags": {}, "type": { "type": "intrinsic", "name": "any" } } ], "type": { "type": "reference", "target": 1231, "name": "ClientUser", "package": "tgkit", "qualifiedName": "default" }, "overwrites": { "type": "reference", "target": 1890, "name": "default.constructor" } } ], "overwrites": { "type": "reference", "target": 1889, "name": "default.constructor" } }, { "id": 1246, "name": "addedToAttachmentMenu", "variant": "declaration", "kind": 1024, "flags": { "isOptional": true, "isInherited": true }, "comment": { "summary": [ { "kind": "text", "text": "*true*, if this user added the bot to the attachment menu" } ] }, "sources": [ { "fileName": "packages/tgkit/src/structures/User.ts", "line": 31, "character": 1 } ], "type": { "type": "intrinsic", "name": "boolean" }, "inheritedFrom": { "type": "reference", "target": 1900, "name": "default.addedToAttachmentMenu" } }, { "id": 1236, "name": "canJoinGroups", "variant": "declaration", "kind": 1024, "flags": {}, "comment": { "summary": [ { "kind": "text", "text": "*true*, if the bot can be invited to groups" } ] }, "sources": [ { "fileName": "packages/tgkit/src/structures/ClientUser.ts", "line": 6, "character": 1 } ], "type": { "type": "intrinsic", "name": "boolean" } }, { "id": 1237, "name": "canReadAllGroupMessages", "variant": "declaration", "kind": 1024, "flags": {}, "comment": { "summary": [ { "kind": "text", "text": "*true*, if privacy mode is disabled for the bot" } ], "blockTags": [ { "tag": "@see", "content": [ { "kind": "inline-tag", "tag": "@link", "text": "https://core.telegram.org/bots/api#privacy-mode", "target": "https://core.telegram.org/bots/api#privacy-mode" } ] } ] }, "sources": [ { "fileName": "packages/tgkit/src/structures/ClientUser.ts", "line": 12, "character": 1 } ], "type": { "type": "intrinsic", "name": "boolean" } }, { "id": 1253, "name": "client", "variant": "declaration", "kind": 1024, "flags": { "isInherited": true }, "sources": [ { "fileName": "packages/tgkit/src/structures/Base.ts", "line": 4, "character": 1 } ], "type": { "type": "reference", "target": 1, "name": "Client", "package": "tgkit", "qualifiedName": "default" }, "inheritedFrom": { "type": "reference", "target": 1907, "name": "default.client" } }, { "id": 1241, "name": "firstName", "variant": "declaration", "kind": 1024, "flags": { "isInherited": true }, "comment": { "summary": [ { "kind": "text", "text": "User's or bot's first name" } ] }, "sources": [ { "fileName": "packages/tgkit/src/structures/User.ts", "line": 13, "character": 1 } ], "type": { "type": "intrinsic", "name": "string" }, "inheritedFrom": { "type": "reference", "target": 1895, "name": "default.firstName" } }, { "id": 1239, "name": "id", "variant": "declaration", "kind": 1024, "flags": { "isInherited": true }, "comment": { "summary": [ { "kind": "text", "text": "Unique identifier for this user or bot" } ] }, "sources": [ { "fileName": "packages/tgkit/src/structures/User.ts", "line": 7, "character": 1 } ], "type": { "type": "intrinsic", "name": "number" }, "inheritedFrom": { "type": "reference", "target": 1893, "name": "default.id" } }, { "id": 1240, "name": "isBot", "variant": "declaration", "kind": 1024, "flags": { "isInherited": true }, "comment": { "summary": [ { "kind": "text", "text": "*true*, if this user is a bot" } ] }, "sources": [ { "fileName": "packages/tgkit/src/structures/User.ts", "line": 10, "character": 1 } ], "type": { "type": "intrinsic", "name": "boolean" }, "inheritedFrom": { "type": "reference", "target": 1894, "name": "default.isBot" } }, { "id": 1245, "name": "isPremium", "variant": "declaration", "kind": 1024, "flags": { "isOptional": true, "isInherited": true }, "comment": { "summary": [ { "kind": "text", "text": "*true*, if this user is a Telegram Premium user" } ] }, "sources": [ { "fileName": "packages/tgkit/src/structures/User.ts", "line": 28, "character": 1 } ], "type": { "type": "intrinsic", "name": "boolean" }, "inheritedFrom": { "type": "reference", "target": 1899, "name": "default.isPremium" } }, { "id": 1244, "name": "languageCode", "variant": "declaration", "kind": 1024, "flags": { "isOptional": true, "isInherited": true }, "comment": { "summary": [ { "kind": "text", "text": "IETF language tag of the user's language" } ], "blockTags": [ { "tag": "@see", "content": [ { "kind": "inline-tag", "tag": "@link", "text": "https://en.wikipedia.org/wiki/IETF_language_tag", "target": "https://en.wikipedia.org/wiki/IETF_language_tag" } ] } ] }, "sources": [ { "fileName": "packages/tgkit/src/structures/User.ts", "line": 25, "character": 1 } ], "type": { "type": "intrinsic", "name": "string" }, "inheritedFrom": { "type": "reference", "target": 1898, "name": "default.languageCode" } }, { "id": 1242, "name": "lastName", "variant": "declaration", "kind": 1024, "flags": { "isOptional": true, "isInherited": true }, "comment": { "summary": [ { "kind": "text", "text": "User's or bot's last name" } ] }, "sources": [ { "fileName": "packages/tgkit/src/structures/User.ts", "line": 16, "character": 1 } ], "type": { "type": "intrinsic", "name": "string" }, "inheritedFrom": { "type": "reference", "target": 1896, "name": "default.lastName" } }, { "id": 1238, "name": "supportsInlineQueries", "variant": "declaration", "kind": 1024, "flags": {}, "comment": { "summary": [ { "kind": "text", "text": "*true*, if the bot supports inline queries" } ] }, "sources": [ { "fileName": "packages/tgkit/src/structures/ClientUser.ts", "line": 15, "character": 1 } ], "type": { "type": "intrinsic", "name": "boolean" } }, { "id": 1243, "name": "username", "variant": "declaration", "kind": 1024, "flags": { "isOptional": true, "isInherited": true }, "comment": { "summary": [ { "kind": "text", "text": "User's or bot's username" } ] }, "sources": [ { "fileName": "packages/tgkit/src/structures/User.ts", "line": 19, "character": 1 } ], "type": { "type": "intrinsic", "name": "string" }, "inheritedFrom": { "type": "reference", "target": 1897, "name": "default.username" } }, { "id": 1249, "name": "toJSON", "variant": "declaration", "kind": 2048, "flags": { "isInherited": true }, "sources": [ { "fileName": "packages/tgkit/src/structures/User.ts", "line": 50, "character": 1 } ], "signatures": [ { "id": 1250, "name": "toJSON", "variant": "signature", "kind": 4096, "flags": { "isInherited": true }, "sources": [ { "fileName": "packages/tgkit/src/structures/User.ts", "line": 50, "character": 1 } ], "type": { "type": "reflection", "declaration": { "id": 1251, "name": "__type", "variant": "declaration", "kind": 65536, "flags": {}, "children": [ { "id": 1252, "name": "id", "variant": "declaration", "kind": 1024, "flags": {}, "sources": [ { "fileName": "packages/tgkit/src/structures/User.ts", "line": 52, "character": 3 } ], "type": { "type": "intrinsic", "name": "number" }, "defaultValue": "..." } ], "groups": [ { "title": "Properties", "children": [ 1252 ] } ], "sources": [ { "fileName": "packages/tgkit/src/structures/User.ts", "line": 51, "character": 9 } ] } }, "inheritedFrom": { "type": "reference", "target": 1904, "name": "default.toJSON" } } ], "inheritedFrom": { "type": "reference", "target": 1903, "name": "default.toJSON" } }, { "id": 1247, "name": "toString", "variant": "declaration", "kind": 2048, "flags": { "isInherited": true }, "sources": [ { "fileName": "packages/tgkit/src/structures/User.ts", "line": 46, "character": 1 } ], "signatures": [ { "id": 1248, "name": "toString", "variant": "signature", "kind": 4096, "flags": { "isInherited": true }, "comment": { "summary": [ { "kind": "text", "text": "Returns a string representation of an object." } ] }, "sources": [ { "fileName": "packages/tgkit/src/structures/User.ts", "line": 46, "character": 1 } ], "type": { "type": "intrinsic", "name": "string" }, "inheritedFrom": { "type": "reference", "target": 1902, "name": "default.toString" } } ], "inheritedFrom": { "type": "reference", "target": 1901, "name": "default.toString" } } ], "groups": [ { "title": "Constructors", "children": [ 1232 ] }, { "title": "Properties", "children": [ 1246, 1236, 1237, 1253, 1241, 1239, 1240, 1245, 1244, 1242, 1238, 1243 ] }, { "title": "Methods", "children": [ 1249, 1247 ] } ], "sources": [ { "fileName": "packages/tgkit/src/structures/ClientUser.ts", "line": 4, "character": 21 } ], "extendedTypes": [ { "type": "reference", "target": 1888, "name": "default", "package": "tgkit" } ] }