A concise guide to configuring and running DiscordBotStudio bots with bot.py.
| Requirement | Reason |
|---|---|
| Python 3.8 or newer | bot.py is written for modern Python versions. |
| Discord Account (with developer mode enabled) | Needed to fetch IDs and tokens. |
| A text editor / IDE | For editing bot.py or messages_list. |
Tip Enable Developer Mode in Discord (Settings ▸ Advanced) to make copying IDs easier.
Run the helper script to collect everything in one go:
python3 bot.py --setallThis will prompt you for the values shown in the table below.
| Field | Where to find it | Steps |
|---|---|---|
| User Agent | Your web‑browser | Copy from your browser’s about page or any request header. "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) DiscordBotStudio/2.2.0 Chrome/91.0.4472.164 Electron/13.1.8 Safari/537.36" |
| User Token | Browser Dev Tools ▸ Network | 1. Open Discord in a browser and log in.2. Press F12 (or right‑click ▸ Inspect).3. Switch to Network tab.4. Send any message.5. Select the request and copy the value of the authorization header. |
| Channel URL | Browser address bar | Open the target channel and copy the full URL. |
| Channel ID | Right‑click channel ▸ Copy ID | Developer Mode must be enabled first. |
If you prefer editing directly, open config.json (created after --setall) and fill in the same values.
python3 bot.pyThe bot will connect with the stored credentials and begin posting the messages defined in messages_list.
messages_list (inside bot.py) is simply a Python list:
messages_list = [
"Hello world!",
"Here’s another line.",
# Add as many messages as you like
]Edit it as you wish—there’s no hard limit.
| Symptom | Possible Cause | Fix |
|---|---|---|
| HTTP 401: Unauthorized | Wrong or expired User Token. | Re‑capture the token via Dev Tools and update config.json. |
| `` | Missing channel permissions. | Make sure the account can post in that channel. |
| Bot exits immediately | Incorrect Channel ID/URL | Verify both values; they must refer to the same channel. |
© 2025 — Happy coding!