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.
Changed the technology to Playwright for maximum efficiency.
There are two versions of the bot, Selenium and Playwright. Both versions of the bot are tested 14th of February, 2024; both are working. Playwright version performs better than Selenium.
This bot was developed on a Linux machine, it may need some modifications to work on a Windows machine. Mainly link structure.
Add a UI(User Interface). I haven't started working on this, I think the bot will remain a CLI-only tool for now.
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.
4 - Run playwright install Chromium
or python -m playwright install Chromium
to install Playwright dependencies(browser).
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 - Fill db/usernames.csv
with all the usernames you want to DM.
4 - 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!