Release the quacken!
Because I can! I know, there is are much easier solution, but who cares?!
One of my friends (for real, not imaginary) uses a crappy® Huawei™ router. And this is a router without a router! You can't bind a static local IP address to the server, but he needs it to use Octoprint. So I created this abomination!
Create .env
and format it like this:
# Telegram API token.
TG_KEY="YOUR_BOT:TOKEN"
Don't forget to replace it with your real bot token!
Install packages:
sudo npm -g i pm2 && npm i
Compile TypeScript:
npx tsc
Spawn the demon!
pm2 start app.config.js
After starting the bot send him /start
and press Became admin!
button.
Yep, next step is a little bit manual
Copy your account entry from candidates.json
to admins.json
, Restart the bot. And voila you can ask the bot about his network configuration.
Send the bot /quack
command or press Quack!
button!
- Make shutdown sequence
- Redo logic of messages
- Create a service for managing multiple instances via telegram or discord bot.
- Add some more memes!
- Have fun!