# UserRating

> This object describes the rating of a user based on their Telegram Star spendings

**Category:** Telegram Bot API — Types (A-Z)  
**URL:** https://docs.botlify.cloud/userrating  
**Platform:** Botlify Cloud (https://botlify.cloud)  

---

This object describes the rating of a user based on their Telegram Star spendings.

## Fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| level | Integer | Always | Current level of the user, indicating their reliability when purchasing digital goods and services. A higher level suggests a more trustworthy customer; a negative level is likely reason for concern. |
| rating | Integer | Always | Numerical value of the user's rating; the higher the rating, the better |
| current_level_rating | Integer | Always | The rating value required to get the current level |
| next_level_rating | Integer | Optional | The rating value required to get to the next level; omitted if the maximum level was reached |

> [!TIP]
> **Botlify Cloud Runtime**
> Credentials are auto-injected in .env — always load them with getenv(): BOT_TOKEN, ADMIN_CHAT_ID, BOT_USERNAME. Main database: database.db (SQLite, WAL mode). Runtime errors: error.log. Quick test: send to $ADMIN_CHAT_ID. Full details: Runtime Reference.
