A Simple Discord User-Installable Bot Using discord.http
- Python 3.11 or higher
-
Create a Discord Bot:
- Visit https://discord.com/developers/docs/intro and create a new application.
- Under the "Bot" tab, generate a bot token and note its application ID.
- Under the "Installation" tab, enable "User Install" and "Guild Install"
-
Clone the Repository:
git clone https://github.com/ilyigna/user_bot.http.git
- Clone the Repository:
cd user_bot.http
pip install -Ur requirements.txt
- Set Up Environment Variables:
- Rename
.env.example
to.env
. - Fill in the following values:
TOKEN
: Your bot tokenAPPLICATION_ID
: Your application IDPUBLIC_KEY
: Your application public key
- Run the Bot:
python3 main.py
- Add the Bot a server/account:
Use the following URL, replacing YOUR_APPLICATION_ID with your application ID: https://discord.com/oauth2/authorize?client_id=YOUR_APPLICATION_ID
ngrok (Expose your local server to the internet for testing)
ruff (An extremely fast Python linter and code formatter, written in Rust)
PM2 (Node.js Production Process Manager with a built-in Load Balancer)
Docker (A collaborative project for the container ecosystem to assemble container-based systems)
discord.http Documentation: https://discordhttp.alexflipnote.dev Setting Up Interaction URLs: https://discord.com/developers/docs/quick-start/getting-started