Introduction
This guide covers creating and deploying Telegram bots on Shard Cloud.Creating a Telegram Bot
1
Open BotFather
Open Telegram and search for @BotFather.
2
Create New Bot
Send
/newbot and follow the prompts to name your bot.3
Get Token
BotFather will provide your bot token. Save it securely.
Creating Your Bot
- Node.js (node-telegram-bot-api)
- Python (python-telegram-bot)
Deploying
1
Prepare Your Files
Ensure you have:
- Your bot code file
package.json(Node.js) orrequirements.txt(Python).shardcloud
2
Exclude Unnecessary Files
Remove:
node_modules/, __pycache__/, venv/3
Create ZIP Archive
Compress your project folder.
4
Upload to Shard Cloud
Go to Shard Cloud Dashboard and upload.
Testing
After deployment, open Telegram, find your bot, and send/ping. It should reply with “Pong!”.
Additional Resources
Troubleshooting
Bot not responding
Bot not responding
- Verify your bot token is correct
- Check that polling is enabled
- Review logs in the dashboard
Conflict error
Conflict error
Only one instance of your bot can use polling at a time. Stop other instances.