Documentation:
This is a Telegram bot written in Node.js that allows users to forward messages to a specific chat. The bot supports multiple commands for interacting with its features, including subscribing to a premium plan, checking the subscription status, testing the bot's speed, and more.
- Clone the repository:
git clone https://github.com/your_username/telegram-bot.git
cd telegram-bot- Install the required dependencies:
npm install-
Obtain your Telegram Bot API token:
a. Create a new bot on Telegram and get the token from the BotFather.
b. Replace
'YOUR_TOKEN'inmainBot.jswith your actual token. -
Replace
'FORWARD_CHAT_ID'inmainBot.jswith the chat ID of the chat where you want the forwarded messages to be sent.
To start the bot, run the following command:
node mainBot.jsOnce the bot is up and running, you can interact with it using the following commands:
/help: Show the help menu with a list of available commands and their descriptions./subscribe: Subscribe to the premium plan for increased message forwarding limits./unsubscribe: Unsubscribe from the premium plan./leavegroup: Make the bot leave the current group or chat./speedtest: Test the bot's speed by measuring its response time./menu: Show a menu with options to forward messages, check subscription status, and more.
Note: To forward a message, you need to use a specific prefix (e.g., /forward). Messages that do not start with the specified prefix will not be forwarded.
The bot offers two subscription plans:
-
Free Plan:
- Forwarding Limit: 3 messages per 24 hours.
- Cost: Free
-
Premium Plan:
- Forwarding Limit: 10 messages per 12 hours.
- Cost: $5 per month
To subscribe to the premium plan, use the /subscribe command. If you have subscribed, you can check your current plan and remaining forwards using the /subscriptionplan command.
Contributions are welcome! If you find any issues or have ideas for improvements, feel free to open an issue or submit a pull request.
This Telegram bot is open-source and distributed under the MIT License.
This bot is created and maintained by Your Name.