Skip to content

Latest commit

 

History

History
88 lines (65 loc) · 4.21 KB

README.md

File metadata and controls

88 lines (65 loc) · 4.21 KB

auto-mate

auto-mate is a discord-self-bot that messages your significant other as you, so that you can do other stuff without worrying too much about forgetting to message them.


It sends GIFS like this!

Contents

auto-mate
├── keep_alive.py
├── main.py
├── messages.py
├── requirements.txt
└── 

The bot sends a message once in the morning, once in the day and once at night. A new message is chosen randomly from messages.py. These messages can be easily changed to be more personal. main.py has the bot code that handles the scheduling and message sending.

To make the bot work, an authorisation token needs to be set up along with the user ID of the receiver. More details about this is under Setting up the bot.

A webserver can be created with repl.it so that the code can be run on the cloud instead of having a computer running it 24/7. More details about this is under Setting up repl.it.

Requirements

Python >= 3.10 must be installed with pip.

Clone the repo, if not done already and go inside the repo:

git clone https://github.com/sttaseen/discord-bot.git
cd discord-bot

Installing Dependencies

Install dependencies by running the following from the root of the repo:

pip install -r requirements.txt

Setting up the bot

Authorisation Token

The authorisation token is needed to send the message as you. This token is very sensitive so don't share it with anyone. The easiest way to get this is through discord on browser. After logging in on the browser, go to a server or a dm and press CTRL+SHIFT+I to go to Inspect Mode. Then, click on the Network tab as shown below:


Network Tab under Inspect

After that, send a message through discord. A new entry called messages will pop up. Click on it, scroll down to Request Headers and look for authorization. The value for it is the token that we need.


Authorization Token

Copy its value and set it as TOKEN inside main.py

Setting the user ID

Now, we need to set up the receiver for our messages. Turn on developer mode for discord by going to Settings > Advanced and then Developer Mode = On. Then, right-click on the user that you want to send the messages to, and a new menu-button, Copy ID will show up. After clicking it, paste it under USER_ID inside main.py.

Changing time zone

This is optional, but make sure to change the UTC value accordingly to the timezone you are in. Default is UTC+13.

Setting up repl.it

Uncomment the # keep_alive() in main.py and copy every .py files into a repl.it project. Then, use this video to set up the bot on a web server so that it runs 24/7 on the cloud.


Bot running on repl.it 24/7

Disclaimers

Self-bots are against Discord's Terms of Service. So use this code responsibly. Do not spam users or it might get you banned.

This code only sends three messages per day and is originally made to message someone I know. I am not liable for any harm or bans caused due to the misuse of this bot.