This bot manages user IDs in the database, assigning roles automatically upon joining. It also scans the current members to verify if they are in the list. If found, the bot assigns them the role. This bot is especially useful for those intending to move their staff to another server. Simply add their user IDs in the database.
- Ensure you're logged into the Discord website: Discord
- Navigate to: Discord Developers Applications
- Click the "New Application" button on the top right.
- Name your application and then click "Create".
- Navigate to the "Bot" tab and click "Add Bot".
- If you wish your bot to be publicly invited by others, select the "Public Bot" checkbox.
- Copy the Token using the "Copy" button.
- Replace
TOKEN
inconfig.json
with the bot token you copied.
⚠️ WARNING: Do not share this Token with anyone. It acts as a password for your bot. Always keep it confidential. If your token is compromised, click "Regenerate" immediately.
- Click the "OAuth2" tab on the application page.
- Select the "bot" checkbox under "Scopes".
- Choose the permissions your bot requires. Necessary permissions can be found in "Needed permissions.txt". Granting "Administrator" permission gives the bot all permissions, use with caution.
- Use the generated link under "Scopes" to invite your bot to any server where you have the "Manage Server" permission.
- Install the latest version of Python from Python's Official Site. Ensure Python is added to
$PATH
. - Install the required modules. On Windows, navigate to the folder containing this document, press
Shift + Right click
anywhere in the folder, click "Open in PowerShell" and run the command:python -m pip install -r requirements.txt
- To run the bot, use:
python main.py
- Set up the VPS and establish an SSH connection.
- Transfer the bot's folder to the VPS using SFTP (e.g., FileZilla).
- Install necessary programs and libraries on the VPS.
- Use a supervisor like
supervisord
to manage bot execution. - Implement security measures like securing SSH, using keyfiles, etc.
- Devise a backup strategy to safeguard your data.
📌 Note: Hosting on a VPS requires in-depth knowledge and research. Always secure your VPS to prevent unauthorized access or data breaches.
The discord.py
community recommends the following VPS providers:
- Scaleway - Affordable VPSes based in Europe.
- DigitalOcean - Popular US-based VPS provider with global availability.
- OVH - Affordable VPSes with France and Canadian locations.
- Time4VPS - Based in Lithuania.
- Linode - Another option for affordable VPSes.
- Vultr - US-based, similar to DigitalOcean.
- GalaxyGate - Reliable and affordable, used by popular bots.
Choose a provider based on your bot's needs, like data storage, voice channel activity, and image/video manipulation.
⚠️ Caution: Avoid free hosting providers like Heroku for Discord bots. They often lead to performance and reliability issues.
If you have questions or encounter issues with your bot, please contact me.
- Mikael.