How to connect a bot to PressCode?

**Dress code is a service with a large set of tools for your bot. For example, feedback, auto-replies, bot scripts, mailing to users, etc.

To access all the features of the service, you need to create a bot and connect it to @Presscodebot (opens new window)

# Create a new bot

Follow the instructions:

  1. Open Telegram, go to the bot @BotFather (opens new window) and click “Run”

  2. Enter the command /newbot

  3. Create and enter a name for your bot. It can be anything. Example: Test bot

  4. Create and enter a unique bot username ending in "bot" or "_bot". (example: “presscodebot”, "hello_bot", “tgscoutbot” )

  5. Copy the unique API token of your new bot.

  1. Go to the @Presscodebot (opens new window) and click “Run”
  2. Send the copied token directly to it.

  1. The bot will send you a message "The bot (name) has been successfully connected to Presscode ✅". You can go to the settings of the section you need."
  2. Click "Personal Account (opens new window)" to get into the list of bot settings. Click the "Bot Constructor (opens new window)" or "Feedback (opens new window)" if you need to get into these settings sections.

The domain is needed to work with the advanced functionality of the bot. For example, for conducting surveys, accepting payments, etc. Domain binding will ensure that the bot works correctly for these functions.

  1. Copy the link cabinet.presscode.app

  2. Go to @BotFather (opens new window) and find your bot using the command /mybots

  3. Select "Bot Setting", then "Domain", "Set domain"

  4. In the message input field, insert cabinet.presscode.app and click "send".

5. The bot will send you a message that you have successfully connected the domain.

  1. The domain information will be automatically updated in your personal account. If this did not happen, in the "Bot Settings (opens new window)" click 🔄 to update the domain status. The error message will change to "Successful".

It is important to know

You can change the name of the bot (name) in the bot itself. To do this, go to the bot and click on "*****" in the upper right corner. Next, "Bot Management". Here you can set a new name, description and choose an avatar.

The rest of the bot settings are done via @BotFather (opens new window)

# Make the bot the admin of the channel

The bot that you have connected to the Presscode service can be used for professional hosting (opens new window) to Telegram channels. To do this, you need to make your bot the admin of any channel.

  1. Go to your Telegram channel, click the three dots "*****" in the upper-right corner
  2. Select "Channel Management", then "Administrators" and "Add Administrator".
  3. Enter the name ** of your bot** (connected to Presscode) in the search, select it and click "Save". If the warning "The user is not subscribed to the channel" appears, just click OK.

The bot will send a message about a successfully connected channel.:

Now your bot can use the Dress code tools for posting (opens new window)!