Placeholders
In the dynamic world of Telegram bots, creating a personalized and engaging experience for your users is key. One powerful tool in your customization arsenal is the use of placeholders. These nifty codes allow you to insert dynamic content into your messages, making interactions with your bot more tailored and user-friendly.
Basic Placeholders
Let's explore some fundamental placeholders that you can incorporate into your custom messages.
{DATE}: Inserts the current date and time, respecting the formatting and timezone set by the admin in the bot's settings menu.
{GROUP_NAME}: Name of the group where the message is sent (if applicable). This is only available in group chats.
{USER_FIRST_NAME}: Displays the first name of the user.
{USER_FULL_NAME}: A combination of the user's first name and last name.
{USER_LAST_NAME}: Shows the last name of the user (if available). Remember, last names are optional on Telegram.
{USER_LINK}: Similar to USER_FULL_NAME, but the name becomes a clickable link leading to the user's profile. Keep in mind that this feature depends on the user's privacy settings.
{USERNAME}: The username (@ handle) for the user, if any. Telegram usernames are optional.
{USER_ID}: Unique ID for the user's Telegram account.
Conditional Placeholders
Now, let's dive into conditional placeholders, allowing you to tailor messages based on specific criteria:
{IF:IS_MEMBER}member{ENDIF}: If true, the text inside the condition is displayed.
{IF:IS_MEMBER}member{ELSE}guest{ENDIF}: A more versatile condition. If the user is a member, the first text is shown; otherwise, the alternative text is displayed.
Available conditional placeholders:
IS_MEMBER: This condition checks if the user is a member.
IS_NEWCOMER: This condition checks if the user is a newcomer, meaning they have never had a membership before. If true, the user has never subscribed to your bot previously (including trials). If false, the user had previously been subscribed to your bot. This condition is global for all plans and all projects.
Visual Guide: Customizing Your Welcome
Putting It All Together
As you embark on your bot customization journey, remember that not all placeholders are available in every module. The bot conveniently provides a list of applicable placeholders when launching a specific module, streamlining your customization process.
Experiment with these placeholders to create engaging conversations tailored to your users' experiences. Personalization goes a long way in making your bot stand out, so let your creativity flow!
Happy bot building!
Last updated