Telegram Bot Hosting
This is documentation of telegram bot hosting service offered on pikachuhosting.in
Bot Manager
Once you buy telegram bot hosting plan, go to client area of pikachuhosting.in > client area > telegram bot hosting > Login to bot panel
Add your bot
Get a token from @BotFather (send /newbot), then press Add bot and paste it.
Programme the bot
1
# bot.py: the main file of your bot2
import os3
import telebot4
5
bot = telebot.TeleBot(os.environ["BOT_TOKEN"])6
7
8
@bot.message_handler(commands=["start"])9
def start(message):10
bot.reply_to(message, "Hello!")11
12
13
bot.infinity_polling()1
# Mention the necessary packages that you need2
pyTelegramBotAPIPoints to be noted.
- The file name must be
bot.py - Your code must have
import osandimport telebotat top of the code - In the code, do not include bot token, use the line
bot = telebot.TeleBot(os.environ["BOT_TOKEN"]) - Must use
bot.infinity_polling()instead ofbot.polling() - Save your required package names in
requirements.txt
How to deploy
After matching the requirements above, click on Deploy, and check the Logs to see the status. If everything is fine your bot will be up!
Need help? Contact us