yours.nihar

i want to make a discord python bot all featuers had in that bot for my community like all in one with working commands professional embeds also a dropdown menu and all system workings

Kodari AI
KodariJul 5 at 4:21 pm 1

Iโ€™ll build a comprehensive all-in-one Discord bot called KodariBot with moderation, tickets, levels, economy, giveaways, reaction roles, logging, utility, fun, and auto-mod systems.

KodariBot
An all-in-one Discord community bot featuring moderation (kick/ban/mute/warn/purge), ticket system with dropdown menus, leveling with XP and leaderboards, economy with daily/work/shop/gambling, reaction roles, giveaways, server logging, utility commands (polls/embeds/server info), fun commands (8ball/meme/trivia), auto-moderation, and welcome/leave messages. Fully async with professional embeds and slash commands.

Now let me create all the cog files:

Finally, the main bot entry point:

The bot is complete. Hereโ€™s whatโ€™s built across 13 files with full slash command support:

System
Features
Moderation
/mod kick/ban/mute/warn/purge/lock/nuke/role
with auto-logging
Tickets
/ticket panel
โ€” dropdown menu to select ticket type (Support, Report, Appeal, Bug, Suggestion), claim/close buttons, transcripts
Levels
XP per message and voice,
/level rank
with progress bar,
/level leaderboard
, auto role rewards
Economy
/economy balance/daily/weekly/work/rob/give/gamble
, full shop with
/shop add/list/buy
, bank deposit/withdraw
Reaction Roles
/reactionrole create
โ€” interactive setup with dropdown role panels
Giveaways
/giveaway start/reroll/end
with automatic drawing, winner selection
Logging
Message edits/deletes, member join/leave, nickname changes, role changes, voice moves
Auto-mod
Spam detection, bad word filter, caps protection, link whitelist
Fun
/8ball
,
/coinflip
,
/rps
,
/dice
,
/meme
,
/trivia
with interactive buttons
Utility
/ping
,
/uptime
,
/serverinfo
,
/userinfo
,
/avatar
,
/banner
,
/poll
,
/embed
,
/say
,
/help
Admin
/admin sync/reload/cogs/prefix/blacklist/serverlist
Welcome
Auto welcome/leave embeds, configurable messages, welcome DMs

To run:

  1. Set DISCORD_TOKEN in .env

  2. Install deps: pip install -r requirements.txt

  3. Run: python bot.py

Kodari can make mistakes. Review important code before using.
Files
KodariBot
Code
20 2,294
KodariBot/bot.py
import discord
from discord.ext import commands
import os
import json
import asyncio
import logging
from dotenv import load_dotenv
from utils.database import db

load_dotenv()

logging.basicConfig(level=logging.INFO, format="%(asctime)s [%(levelname)s] %(name)s: %(message)s")
log = logging.getLogger("KodariBot")

with open("config.json") as f:
    config = json.load(f)

class KodariBot(commands.Bot):
    def __init__(self):
        intents = discord.Intents.all()
        super().__init__(
            command_prefix=commands.when_mentioned_or(config.get("prefix", "!")),
            intents=intents,
            help_command=None,
            case_insensitive=True
        )

    async def setup_hook(self):
        log.info("Connecting to database...")
        await db.connect()
        log.info("Database connected.")

        log.info("Loading cogs...")
        cogs = [
            "cogs.moderation",
            "cogs.welcome",
            "cogs.tickets",
            "cogs.levels",
            "cogs.economy",
            "cogs.reaction_roles",
            "cogs.giveaways",
            "cogs.logging",
            "cogs.utility",
            "cogs.fun",
            "cogs.automod",
            "cogs.admin"
        ]
        for cog in cogs:
            try:
                await self.load_extension(cog)
                log.info(f"  โœ… Loaded {cog}")
            except Exception as e:
                log.error(f"  โŒ Failed to load {cog}: {e}")

        log.info("Syncing commands...")
        await self.tree.sync()
        log.info("Commands synced.")

    async def on_ready(self):
        log.info(f"โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”")
        log.info(f"  KodariBot is ONLINE!")
        log.info(f"  User: {self.user} ({self.user.id})")
        log.info(f"  Guilds: {len(self.guilds)}")
        log.info(f"  Users: {sum(g.member_count for g in self.guilds):,}")
        log.info(f"โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”")

        status_type_map = {0: discord.ActivityType.playing, 1: discord.ActivityType.streaming, 2: discord.ActivityType.listening, 3: discord.ActivityType.watching, 5: discord.ActivityType.competing}
        st = status_type_map.get(config.get("status_type", 3), discord.ActivityType.watching)
        activity = discord.Activity(type=st, name=config.get("status", "KodariBot | /help"))
        await self.change_presence(activity=activity, status=discord.Status.online)

    async def on_command_error(self, ctx, error):
        if isinstance(error, commands.CommandNotFound):
            return
        log.error(f"Command error in {ctx.guild}: {error}")

    async def on_application_command_error(self, interaction: discord.Interaction, error):
        if isinstance(error, commands.CommandOnCooldown):
            return await interaction.response.send_message(embed=discord.Embed(title="โณ Cooldown", description=f"Slow down! Try again in {error.retry_after:.0f}s.", color=0xF1C40F), ephemeral=True)
        log.error(f"App command error in {interaction.guild}: {error}")
        try:
            await interaction.response.send_message(embed=discord.Embed(title="โŒ Error", description=f"An error occurred: {str(error)[:100]}", color=0xE74C3C), ephemeral=True)
        except:
            pass


async def main():
    async with KodariBot() as bot:
        token = os.getenv("DISCORD_TOKEN")
        if not token:
            log.error("DISCORD_TOKEN not found in .env file!")
            return
        await bot.start(token)


if __name__ == "__main__":
    asyncio.run(main())