# `ExGram.Model.User`
[🔗](https://github.com/rockneurotiko/ex_gram/blob/0.64.0/lib/ex_gram.ex#L3223)

This object represents a Telegram user or bot.

Check the [documentation of this model on Telegram Bot API](https://core.telegram.org/bots/api#user)

- `id`: Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.
- `is_bot`: True, if this user is a bot
- `first_name`: User's or bot's first name
- `last_name (optional)`: Optional. User's or bot's last name
- `username (optional)`: Optional. User's or bot's username
- `language_code (optional)`: Optional. IETF language tag of the user's language
- `is_premium (optional)`: Optional. True, if this user is a Telegram Premium user
- `added_to_attachment_menu (optional)`: Optional. True, if this user added the bot to the attachment menu
- `can_join_groups (optional)`: Optional. True, if the bot can be invited to groups. Returned only in getMe.
- `can_read_all_group_messages (optional)`: Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.
- `supports_inline_queries (optional)`: Optional. True, if the bot supports inline queries. Returned only in getMe.
- `can_connect_to_business (optional)`: Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe.
- `has_main_web_app (optional)`: Optional. True, if the bot has a main Web App. Returned only in getMe.
- `has_topics_enabled (optional)`: Optional. True, if the bot has forum topic mode enabled in private chats. Returned only in getMe.
- `allows_users_to_create_topics (optional)`: Optional. True, if the bot allows users to create and delete topics in private chats. Returned only in getMe.

# `t`

```elixir
@type t() :: %ExGram.Model.User{
  added_to_attachment_menu: boolean() | nil,
  allows_users_to_create_topics: boolean() | nil,
  can_connect_to_business: boolean() | nil,
  can_join_groups: boolean() | nil,
  can_read_all_group_messages: boolean() | nil,
  first_name: String.t(),
  has_main_web_app: boolean() | nil,
  has_topics_enabled: boolean() | nil,
  id: integer(),
  is_bot: boolean(),
  is_premium: boolean() | nil,
  language_code: String.t() | nil,
  last_name: String.t() | nil,
  supports_inline_queries: boolean() | nil,
  username: String.t() | nil
}
```

# `decode_as`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
