Skip to content

Axekinn/Basic-Bot-Discord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค– Simple Discord Bot

Discord Python License Version

A modern and versatile Discord bot with XP system, custom commands, moderation and much more!


๐Ÿ“‹ Table of Contents


โœจ Main Features

๐Ÿ† Experience and Level System

  • Automatic progression: Gain XP per message sent
  • Level system with 50+ tiers
  • Automatic roles by level
  • Interactive leaderboard with ranking
  • Admin commands to manage XP

๐ŸŽฎ Custom Commands

  • Intuitive command creator with interactive interface
  • Global and server commands
  • Advanced search and filtering system
  • Export commands to Markdown file
  • Complete management via modern interface

๐Ÿ”จ Advanced Moderation

  • Kick/Ban with reasons and durations
  • Temporary mute with automatic management
  • Warning system with history
  • Bulk message cleanup
  • Detailed moderation logs

๐ŸŽ‰ Giveaway System

  • Easy creation of contests
  • Automatic management of draws
  • Reaction system to participate
  • Automatic notifications of results

๐ŸŽฒ Fun Commands

  • Interactive Rock-Paper-Scissors
  • Coin Flip with buttons
  • Random fact generator
  • Jokes and entertainment

๐ŸŽต Temporary Voice Channels

  • Automatic creation of voice channels
  • Custom permission management
  • Automatic deletion when empty

๐Ÿ“Š Voting System

  • Interactive poll creation
  • Modification of existing votes
  • Real-time results

๐Ÿ” Information and Utilities

  • Detailed server information
  • Complete user profile
  • Bot information and statistics
  • Context menu for quick actions

๐Ÿš€ Quick Installation

๐Ÿ“‹ Prerequisites

๐Ÿ“ฆ Installation

  1. Clone the repository
git clone https://github.com/Axekinn/Simple-Bot-Discord.git
cd Simple-Bot-Discord
  1. Install dependencies
pip install -r requirements.txt
  1. Configure files
# Copy example files
cp .env.example .env
cp config.json.example config.json
cp commands.json.example commands.json
cp xp_data.json.example xp_data.json
cp giveaways.json.example giveaways.json
cp role_reactions.json.example role_reactions.json
  1. Configure the token
# Edit the .env file
TOKEN=YOUR_DISCORD_BOT_TOKEN
  1. Start the bot
python bot.py

โš™๏ธ Configuration

๐Ÿ”‘ .env File

TOKEN=YOUR_DISCORD_BOT_TOKEN

๐Ÿ“ config.json File

{
  "prefix": "!",
  "owner_id": "YOUR_DISCORD_ID",
  "description": "A simple and powerful Discord bot",
  "website": "https://your-website.com/",
  "discord_invite": "https://discord.gg/your-invite",
  "github": "https://github.com/your-username/your-repo"
}

๐Ÿ“š Modules and Commands

๐Ÿ† XP Module (Experience)

Command Description Permissions
/xp [member] Shows XP and level of a member Everyone
/leaderboard Server ranking by level Everyone
/resetxp <member> Resets a member's XP Administrator
/setwords <member> <words> Sets total word count Administrator
/recalculatelevels Recalculates all levels Administrator
/xpinfo Information about XP system Everyone
/milestones Shows all level milestones Everyone
/setlevelup [channel] Configures notification channel Administrator
/setlevelrole <level> <role> Assigns a role to a level Administrator
/updateallroles Updates all roles by level Administrator

๐ŸŽฏ Progression System

  • XP Gain: 1 XP per word written in a message
  • Cooldown: 1 minute between XP gains
  • Level Formula: level = floor(sqrt(total_words / 100))
  • Maximum levels: 50+ tiers available

๐Ÿ› ๏ธ Custom Commands Module

Command Description Permissions
/create_command Command creation interface Administrator
/commands [scope] [filter] Interactive command browser Everyone

๐ŸŽจ Advanced Features

  • Modern interface with buttons and selectors
  • Advanced search by name, description or content
  • Markdown export of commands
  • Category management (global/server)
  • Smart pagination system

๐Ÿ”จ Moderation Module

Command Description Permissions
/kick <user> [reason] Kicks a member Kick Members
/ban <user> [reason] Bans a member Ban Members
/unban <user> Unbans a member Ban Members
/timeout <user> <duration> Temporarily mutes Moderate Members
/untimeout <user> Removes timeout Moderate Members
/purge <number> Deletes messages Manage Messages
/warn <user> [reason] Warns a member Kick Members

โšก Features

  • Automatic security checks
  • Detailed action logs
  • Complete error handling
  • Built-in administrator protection

๐ŸŽ‰ Giveaways Module

Command Description Permissions
/giveaway <duration> <prize> Creates a new giveaway Manage Messages
/gend <message_id> Ends a giveaway Manage Messages
/greroll <message_id> Rerolls the draw Manage Messages

๐ŸŽ Features

  • Automatic draw management
  • Reaction interface ๐ŸŽ‰
  • Winner notifications
  • Persistent data storage

๐ŸŽฎ Fun Module

Command Description Permissions
/randomfact Random fact in English Everyone
/coinflip Interactive coin flip Everyone
/rps Rock-paper-scissors Everyone

๐ŸŽฏ Interactive Games

  • Discord button interface
  • Animations and reactions
  • Score system (coming soon)

๐Ÿ” Information Module

Command Description Permissions
/help List of available commands Everyone
/botinfo Detailed bot information Everyone
/serverinfo Server information Everyone
/whois <member> Detailed member profile Everyone
/ping Bot latency Everyone
/invite Bot invitation link Everyone

๐ŸŽต Voice Channel Module

Command Description Permissions
/voice setup <channel> Configures voice system Administrator

๐Ÿ”Š Features

  • Automatic creation of temporary channels
  • Custom permissions per user
  • Automatic deletion on disconnect

๐Ÿ“Š Voting Module

Command Description Permissions
/vote_create <question> Creates a poll Manage Messages
/vote_edit <message_id> Edits an existing vote Manage Messages

๐ŸŽญ Role Reaction Module

Configuration via role_reactions.json file

  • Automatic role assignment
  • Custom reaction interface
  • Multi-message management

๐ŸŽฏ Usage Guide

๐Ÿ† Setting Up XP System

  1. Initial configuration
/setlevelup #level-up
  1. Assign roles by level
/setlevelrole level:5 role:@Active Member
/setlevelrole level:10 role:@Contributor
/setlevelrole level:25 role:@Expert
  1. System verification
/milestones  # See all milestones
/xpinfo      # Detailed information

๐Ÿ› ๏ธ Creating Custom Commands

  1. Launch interface
/create_command
  1. Follow interactive wizard

    • Choose scope (global/server)
    • Define command name
    • Add description
    • Configure response
  2. Test and manage

/commands scope:server  # View server commands

๐Ÿ”จ Moderation Setup

  1. Recommended permissions

    • Kick Members
    • Ban Members
    • Manage Messages
    • Moderate Members
  2. Typical usage

/warn @user reason:Spam
/timeout @user duration:1h reason:Inappropriate behavior
/purge number:10

๐Ÿ”ง Advanced Configuration

๐Ÿ—„๏ธ Database

The bot uses SQLite to store:

  • XP Data: xp_data.json
  • Commands: commands.json
  • Giveaways: giveaways.json
  • Reactions: role_reactions.json

๐Ÿ“ File Structure

Simple-Bot-Discord/
โ”œโ”€โ”€ bot.py                 # Main file
โ”œโ”€โ”€ requirements.txt       # Python dependencies
โ”œโ”€โ”€ .env                  # Environment variables
โ”œโ”€โ”€ config.json           # Bot configuration
โ”œโ”€โ”€ commands.json         # Custom commands
โ”œโ”€โ”€ xp_data.json         # Experience data
โ”œโ”€โ”€ giveaways.json       # Giveaway data
โ”œโ”€โ”€ role_reactions.json  # Role/reaction configuration
โ”œโ”€โ”€ discord.log          # Bot logs
โ”œโ”€โ”€ database/            # SQLite database
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ database.db
โ”‚   โ””โ”€โ”€ schema.sql
โ””โ”€โ”€ cogs/                # Bot modules
    โ”œโ”€โ”€ xp.py           # Experience system
    โ”œโ”€โ”€ command_builder.py  # Custom commands
    โ”œโ”€โ”€ moderation.py   # Moderation
    โ”œโ”€โ”€ giveaway.py     # Giveaways
    โ”œโ”€โ”€ fun.py          # Fun commands
    โ”œโ”€โ”€ general.py      # General commands
    โ”œโ”€โ”€ voice_creator.py # Temporary voice channels
    โ”œโ”€โ”€ vote.py         # Voting system
    โ”œโ”€โ”€ whois.py        # User information
    โ”œโ”€โ”€ role_reaction.py # Role reactions
    โ””โ”€โ”€ owner.py        # Owner commands

๐Ÿ” Security

  • โœ… Secure token in .env
  • โœ… Sensitive files in .gitignore
  • โœ… Permission checks on all commands
  • โœ… Protection against infinite loops
  • โœ… Complete error handling

๐Ÿš€ Performance

  • Local SQLite database for speed
  • In-memory cache for frequent data
  • Asynchronous loading of modules
  • Discord API optimization

๐Ÿ”ง Customization

๐ŸŽจ Modify Colors

# In each cog, modify embed colors
embed = discord.Embed(color=0x3498db)  # Blue
embed = discord.Embed(color=0xe74c3c)  # Red
embed = discord.Embed(color=0x2ecc71)  # Green

๐Ÿ† Customize XP System

# In cogs/xp.py, line ~50
XP_PER_WORD = 1           # XP gained per word
XP_COOLDOWN = 60          # Cooldown in seconds
LEVEL_FORMULA = lambda w: math.floor(math.sqrt(w / 100))

๐ŸŽญ Add Commands

# Create a new file in cogs/
# Follow template in cogs/template.py

๐Ÿ›ก๏ธ Support and Troubleshooting

โ“ Common Issues

Bot offline?

  • Check token in .env
  • Check bot permissions
  • Check discord.log for errors

Commands not working?

  • Check bot permissions
  • Use / for slash commands
  • Check intents configuration

XP system inactive?

  • Check message_content permissions
  • Verify intents are enabled
  • Check logs for errors

๐Ÿ“ž Get Help


๐Ÿค Contributing

We warmly welcome contributions!

๐Ÿ“ How to Contribute

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'Add some AmazingFeature')
  4. Push to branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐ŸŽฏ What We're Looking For

  • ๐Ÿ› Bug fixes
  • โœจ New features
  • ๐Ÿ“š Documentation improvements
  • ๐ŸŽจ UI/UX enhancements
  • ๐Ÿ”ง Performance optimizations

๐Ÿ“‹ Guidelines

  • Follow existing code style
  • Test all new features
  • Document code with comments
  • Respect naming conventions

๐Ÿ† Contributors

A big thank you to all contributors who helped improve this bot!


๐Ÿ“Š Statistics

  • โญ Features: 50+ commands
  • ๐Ÿ”ง Modules: 12 cogs
  • ๐Ÿ† XP System: 50+ levels
  • ๐ŸŽฎ Built-in games: 3+
  • ๐Ÿ”จ Moderation tools: 8+

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ“ˆ Roadmap

๐Ÿš€ Version 7.0 (Next)

  • ๐ŸŽต Complete music player
  • ๐Ÿ“ˆ Web dashboard for configuration
  • ๐ŸŽฏ Mission system and rewards
  • ๐Ÿ”” Custom notifications
  • ๐Ÿ“Š Advanced server statistics

๐ŸŽฏ Version 7.1

  • ๐ŸŽฎ Multiplayer mini-games
  • ๐Ÿ’ฐ Virtual economy with shop
  • ๐ŸŽญ Automatic temporary roles
  • ๐Ÿ“ฑ Mobile companion app

๐Ÿ”ฎ Future Versions

  • ๐Ÿค– AI for automatic moderation
  • ๐ŸŒ Complete multi-language support
  • โ˜๏ธ Integrated cloud hosting
  • ๐Ÿ“Š Advanced analytics

๐Ÿ™ Acknowledgments

  • Discord.py - For the excellent library
  • Krypton - For the base template
  • Discord Community - For testing and feedback
  • Contributors - For their improvements

โญ If this bot helped you, feel free to give the project a star! โญ

GitHub stars GitHub forks


Made with โค๏ธ by Axekinn

About

No description, website, or topics provided.

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published