Class User
This object represents a Telegram user or bot.
Inheritance
System.Object
User
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: TelegramBotApi.Types
Assembly: TelegramBotApi.dll
Syntax
[JsonObject(MemberSerialization = MemberSerialization.OptIn, ItemNullValueHandling = NullValueHandling.Ignore)]
public class User
Properties
| Improve this Doc View SourceFirstName
The first name of the user or bot
Declaration
[JsonProperty(PropertyName = "first_name", Required = Required.Always)]
public string FirstName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
FullName
First and last name (if any) concatenated using a space
Declaration
public string FullName { get; }
Property Value
Type | Description |
---|---|
System.String |
Id
Unique identifier for this user or bot
Declaration
[JsonProperty(PropertyName = "id", Required = Required.Always)]
public int Id { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
IsBot
Whether the user is a bot
Declaration
[JsonProperty(PropertyName = "is_bot")]
public bool IsBot { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
LanguageCode
IEFT tag of the users language, if any
Declaration
[JsonProperty(PropertyName = "language_code")]
public string LanguageCode { get; set; }
Property Value
Type | Description |
---|---|
System.String |
LastName
The last name of the user or bot, if any
Declaration
[JsonProperty(PropertyName = "last_name")]
public string LastName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Username
The username of the user or bot, if any. Without the preceding "@".
Declaration
[JsonProperty(PropertyName = "username")]
public string Username { get; set; }
Property Value
Type | Description |
---|---|
System.String |