Skip to content

This is a Python3 implementation of a telegram bot that reports speedtest results

License

Notifications You must be signed in to change notification settings

philipptrenz/telegram-speedtest-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram speedtest bot

This Python bot reports speedtests to a Telegram channel.

Install dependencies

sudo apt install python3 python3-pip
sudo pip3 install python-telegram-bot speedtest-cli

Create config file

Create the file config.json in the root directory of this project, which has the following format:

{
    "telegram": {
        "token": "abc...",
        "channel": "@channel_xy"
    }
}

Create a Telegram bot

Write to the account @BotFather the message /newbot and follow the instructions. Enter the retreived token to the token property in config.json

Create a Telegram channel

Create a Telegram channel and add your created bot as an admin with the privileges to post messages. Then add the name of the created channel (with a leading @) to the channel property in config.json. Make shure your channel is public, otherwise it will not work.

Run the script

python3 . 

If you want to run the script repeatedly, you can create a cronjob for that.

About

This is a Python3 implementation of a telegram bot that reports speedtest results

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages