This is a testing bot created to learn nextcord library, and test some new discord features.
Bot have database, which is creating on start (database.db
), and some cogs. You can use it for free, but bot created on russian language,
so you must replace 70-80% strokes in code. I wrote translate to english in comments for you, but for other languages you need to use translator 👀.
Project licensed under the MIT License. Check LICENSE file for details.
To start using bot first create application on Discord Developer Portal, select the name, picture and description for him. After that invite your application to your server and copy token. Where you have to past token I described in "Installation" paragraph.
- Bot have database (
database.db
) with moderation logs - Database creating on first bot start
- Roles by selecting option from list in special channel | roles.py
- You can add your custom roles to dropdown menu in config | config.py
To add your role write your role in
roles
object like:"role_custom_id": [role_id, "Role Description", "Label in list", "Emoji 👀"]
Example:roles = { "games": [1183105489207304202, 'Search friends and teammates for games', "Games", "🎮"] }
- Moderator applications created with modal windows | applications.py
- Moderation commands "Ban", "Kick", "Mute" are in user dropdown menu item "Apps" | app.py
- Moderation commands have logs in database, you can check it by commands
mute_logs
,kick_logs
,ban_logs
- Chat auto-moderation detecting bad words in chat and warning. Moderation roles from config will not get warns | banWords.py
- Warning system with table in database. After 3 warnings user getting 120 mins mute. You can call
warns_update
andwarn_user
in any cog, or main module | warnings.py - Bot have ticket system. After deleting ticket bot sending embed message with information and moving channel to "Closed tickets" category | tickets.py
- Ticket's transcription sending in channel and to user DM | tickets.py
- Bot showing server statistics by creating voice channels in category from config. | serverStats.py
- Bot have manual logging system | logs.py
- Logs saving into the log file in
/logs/
folder | logs.py
Mini navigation: Windows, Linux, Notes, Tips and etc.
Tip
- To open console in main directory find directory path at top and click on empty place, then write
cmd
and press enter. - To copy channel or guild id enable developer mode in settings, press right button on channel/guild/role/user/message and etc. and choose
Copy ID
Important
guild_id
- your server id.
Channels:apps_channel_id
- id of moderator applications channel. Bot will send embed message and button for modal window.apps_get_id
- id of channel where moderator applications sending after submitting.roles_channel_id
- id of channel where bot sending message embed and dropdown menu with roles.tickets_channel_id
- channel where sending embed message with button for create ticket.
Categories:tickets_category
- category, where creating tickets after pressing button.closed_tickets_category
- category, where closed tickets moving.stats_category
- category, where bot creating voice channel to show statistics.
Roles:roles
- roles for selecting from dropdown menu.moderation_roles
- roles, which not getting warns by automod.tickets_roles
- roles, which getting access to tickets.tech_moderator_role
- members with this role can get access to logs and statsUpdate.
Params:bot_logger_message
- message which writing in logs file on start
- Install Python from Official Site.
- Download bot's source code.
- Go to main directory and run commands:
pip install -r requirements.txt
echo TOKEN=*YOUR BOT TOKEN* > settings.env
- Open
config.py
and edit parameters for your server. - Run bot:
python main.py
- Install requirements:
sudo apt update & sudo apt upgrade
sudo apt install python3
sudo apt install python3-pip
apt install git
- Clone repository:
git clone https://github.com/mealet/nextcord-bot.git
- Install pip libraries:
cd nextcord-bot
pip3 install -r requirements.txt.
- Set your app token in environment:
echo TOKEN=*YOUR BOT TOKEN* > settings.env
-
Edit parameters for your server in
config.py
. -
Run main script:
python3 main.py
- Install docker and docker compose plugin.
- Clone repository and go to it's directory.
- Run docker:
systemctl start docker
On windows just start Docker Desktop
- Build image:
docker-compose build
- Start it in the daemon mode:
docker-compose up -d
- Check bot logs:
docker-compose logs
- Python - https://www.python.org/
- Nextcord Docs - https://docs.nextcord.dev/
- Sqlite3 Docs - https://docs.python.org/3/library/sqlite3.html
- Asyncio Docs - https://docs.python.org/3/library/asyncio.html
- Docker - https://www.docker.com/