thebrumby / HotWalletClaimer

Looking to optimize HOT earnings on Near Protocol, Wave on SUI, Vertus on TON, or 19 other supported Telegram mini-apps? This Python script monitors and claims rewards for your favorite Telegram crypto-based games. By simulating mouse movements and keystrokes in a real browser session, it avoids the need for direct API injection or token scraping.
MIT License
202 stars 48 forks source link

Telegram Bot doesn't send notifications #286

Closed BraveCanister closed 5 days ago

BraveCanister commented 1 week ago

I have a telegram bot set up for notifications on my PC and it works fine. However when I set up the claimer on VPS and provided the same API token, it doesn't seem to work. Do I have to set up a separate telegram bot with its unique API token to receive notifications from that other instance? Seems a bit counterintuitive to me.

thebrumby commented 1 week ago

Hi,

pm2 delete tg-bot

More on the need for separate bots!

The bot on each machine isn't just relaying information about the status of your claims; it's also listening for commands that let you manipulate the sessions within PM2. Using the same bot for multiple environments can lead to conflicts, especially when commands target a session that exists on one machine but not on the other. For example, a command to restart a session could mistakenly be executed on the wrong instance, leading to numerous errors and an unreliable experience.

Independent Environments

In your setup—where multiple environments (PC and VPS) operate independently—each environment should have its own bot. This means each bot needs a unique API token. Doing so ensures each instance manages notifications, handles updates consistently, and avoids conflicts.

Key Functions of the Bot

How to Set Up a New Bot

You can easily create a new bot by registering via @BotFather for your VPS instance. This will provide you with a new API token, allowing both bots to handle notifications and commands without interfering with one another.

Conclusion

While the idea of setting up separate bots might initially feel counterintuitive, it is ultimately about avoiding connectivity issues when trying to connect multiple bots to a single Telegram API key and maintaining clear boundaries between instances. This setup prevents confusion and keeps both your notification systems and command-handling processes stable for each environment. Setting up a new bot is straightforward, and the benefits of reliability and consistency make it well worth the effort.