The bot that powers the SMDW_downloads Telegram channel
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Felix e8dead66e4
SonyDevWorld: Catch expanded p, div tags
8 months ago
.gitignore .gitignore: Add laststatus.txt 2 years ago Add MIT License 2 years ago README: Link to ansible role 2 years ago SonyDevWorld: Catch expanded p, div tags 8 months ago
sonydevworldbot.service .gitignore: Add laststatus.txt 2 years ago
sonydevworldbot.timer sonydevworldbot.timer: Fix run for every 10min 2 years ago

SonyDevWorld Telegram Bot

The bot that powers

Neither affiliated nor endorsed by Sony Mobile


You need to have python3 installed with the requests module.

Further, you need to supply token and channel id via environment variables:

  • SONYDEVWORLD_BOT_TOKEN: Bot token, get one from, e.g. 1234567890:ABCDb1o0-ASDKHKJ3oiavKJDSFKJHkjwebb
  • SONYDEVWORLD_BOT_CHANNEL: Channel id to post to, e.g. -1000000000000 for You can quickly obtain channel info from @getidsbot


export SONYDEVWORLD_BOT_TOKEN=<my-token>
export SONYDEVWORLD_BOT_CHANNEL=<my-channel-id>

It makes sense to run this bot maybe once an hour to avoid hammering the Sony Dev World API.

Set export DEBUG=true to run in debug mode, set export OFFLINE=True to run in offline mode after you've saved items.json.


For deploying, a simple systemd unit file with a timer is included.

After you've supplied your token inside the .service file and copied the unit and timer files into /etc/systemd/system/, you can run the service periodically via systemctl daemon-reload and then systemctl reenable --now sonydevworldbot.timer

For convenience, there is also an ansible role available.

Details does all the heavy lifting for you. It posts to the Telegram bot API at<token>/sendMessage

The last posted item's guid info is saved to laststatus.txt. It would look something like file-download-786918.


MIT, see