How to connect a bot to PressCode?

Presscode is primarily a service that provides a whole set of tools for working with the Telegram channel. To use them, you need to ** create your own bot and connect it to PressCode.** Then it will have all the functions.

In simple words, you create a zero bot and connect it to PressCode. That's it, now your bot has all the PressCode tools. Just like one, two, three.

Let's get started?

# 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. Come up with and enter a name for your bot. It can be anything. Example: Test bot

  4. Come up with 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 [page](https://cabinet.presscode.app /) adding a new bot to the PressCode and insert the token into a special field.

# Make the bot the admin of the channel

  1. Select the channel where you plan to appoint a new bot as an admin.
  2. Click on "" in the upper right corner.
  3. Select "Channel Management", then "Administrators" and "Add Administrator".
  4. Enter the name ** of your new bot**, select it and click "Save".

If the warning "The user is not subscribed to the channel" appears, just click OK.

The domain is needed to work with the advanced functionality of the bot: survey forms, buttons for channel posts, subscription payment scenario, etc.

  1. Copy the cabinet.presscode.app link
  2. Go back to @BotFather (opens new window) and find the newly created bot using the /mybot command
  3. Select "Bot Setting", then "Domain", "Set domain"

  1. In the message input field, paste and send the copied link.

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

** Congratulations! You did it!**

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)