Click here to join the Discord server for this project, let's connect!
Click here to join the Telegram channel for this project, in case Discord server goes down. Let's connect!
Feel free to contribute to this project or suggest more features to add. You can reach me on Discord @ozymandiasthegreat.
I changed the technology which the software depend on to a private framework I built on top of Zendriver. The reason I changed the framework is because Playwright and Selenium are easily detected by Reddit, unlike Zendriver that uses CDP to connect to Chrome.
I also added functionality so that you only need to provide the bot with plain usernames of users you want to DM, unlike the older version which required you to get a datapoint Reddit has on its backend.
There are three versions of the bot, Selenium, Playwright, and Zendriver. Zendriver version is tested as of the 22nd of April 2025. Zendriver version performs better than the rest.
0 - Have Python
and Pip
installed. This project was developed with Python 3.11.8
1 - Clone this repository running the command git clone https://github.com/hamzaaitbrik/RedditDMBot.git
or simply Download it.
2 - Install Pipenv
using the command pip install pipenv
.
3 - Run pipenv install
inside the project to install its dependencies.
1 - Add accounts to rdt/account.json
. Refer to rdt/README to see how to properly add accounts.
2 - Change what needs to be changed in rsrc/config.json
. Refer to rsrc/README to see how to change values to meet your needs.
3 - Add proxies to rsrc/proxies.json
to use the bot with proxies.
4 - Fill db/usernames.csv
with all the usernames you want to DM.
5 - Run RedditDMBot.py
.
RedditDMBot is a bot made for the purpouse of automating the process of sending messages to Reddit users
What the bot does:
0 - The bot checks whether you have a proxy in rsrc/config.json
, all actions will be made through the proxy if found. Refer to rsrc/README to better understand how to properly add a proxy.
1 - Logs into one of the Reddit account in accounts.json
.
2 - Navigates to chat page.
3 - Checks if the user already received a message.
4 - Sends a message to the user.
5 - Deletes the user from the list of users to DM and adds it to db/usernames_sent.csv
.
6 - Logs out of the account used to DM the user.
7 - Remove it from the list of available accounts and add it to a list of used accounts.
8 - Logs into another Reddit account that wasn't used.
9 - If there are no many available accounts, the bot reuses the used accounts until all users on your db/usernames.csv
received DMs.
Enjoy!