A python Discord bot for running an internet speedtest on the machine running the bot using the Speedtest CLI. This bot is adapted from kkrypt0nn's bot template.
- Simple setup: point to Speedtest CLI, make bot and run
s/test
to run speedtest and report results - Control which users can run and on which channels (unauthorized users are presented with the results of the most recent speedtest)
- Pretty output using embeds
- Example output:
- Get Speedtest CLI.
- Install python 3
- Clone this repository using
git clone https://github.com/twilsonco/SpeedtestBot
- Setup your new bot on Discord:
- Sign up for a Discord developer account
- Go to the developer portal, click New Application, pick a name and click Create
- Note the
CLIENT ID
- Note the
- Click on Bot under SETTINGS and then click Add Bot
- Fill out information for the bot and uncheck the
PUBLIC BOT
toggle- Note the bot
TOKEN
- Note the bot
- Invite the bot to your server
- Go to
https://discordapp.com/api/oauth2/authorize?client_id=<client_id>&scope=bot&permissions=<permissions>
- replace
<client_id>
with theCLIENT ID
from above - replace
<permissions>
with the minimum permissions26624
(for send messages, manage messages, embed links) or administrator permissions8
to keep things simple
- replace
- Invite the bot to your server
- Go to
- Configure
bot.py
- Set discord options
TOKEN
to your bot secret token- Lists of
OWNERS
,BLACKLIST
and/orWHITELIST
users, andCHANNEL_IDS
on which the bot should listen for commands- get these ids by enabling developer mode in your Discord client and right-clicking on a user/channel
- Pick a
BOT_PREFIX
(default iss/
)
- Set Speedtest CLI information
SPEEDTEST_PATH
points to the Speedtest CLI executable
- Set discord options
- Run with
python3 /path/to/SpeedtestBot/bot.py
and enjoy!
- I think that's it...
- Tim Wilson
- kkrypt0nn
This project is licensed under the Apache License 2.0 - see the LICENSE.md file for details