revertedtinz

add a general commands such as embed, welcome/boost/leave messgaes inspired from mimu + autoresponder+ verification+reaction role that even supports server emoji+ shop+economy +economy currency can be renamed but that slash command is a admin slash command

Kodari AI
KodariSep 3 at 12:43 pm 2
MimuCloneBot
A Discord bot inspired by Mimu featuring general commands including embed creation, customizable welcome/boost/leave messages, autoresponder, verification system, reaction roles with server emoji support, shop, and economy system with renameable currency via admin slash command.
  1. Create the Discord bot foundation and SQLite-backed configuration/economy storage.

  2. Add admin slash commands for embeds, messages, autoresponders, verification, reaction roles, shop items, and currency naming.

  3. Add member-event automation, verification buttons, reaction roles, and user economy/shop commands.

  4. Add environment/dependency files and setup instructions.

  1. Built a complete discord.py bot foundation with .env configuration, logging, slash-command syncing, and SQLite persistence.

  2. Added admin features:

    • /embed

    • /welcome_set

    • /leave_set

    • /boost_set

    • /autoresponder_add

    • /autoresponder_remove

    • /autoresponder_list

    • /verification_setup

    • /reactionrole_add

    • /reactionrole_remove

    • /reactionrole_list

    • /shop_add

    • /shop_remove

    • /economy_currency

  3. Added member automation for welcome, leave, boost, and autoresponder messages.

  4. Added button verification and Unicode/custom-server-emoji reaction roles.

  5. Added economy commands:

    • /balance

    • /daily

    • /pay

    • /shop

    • /buy

  6. Added requirements.txt, .env.example, .gitignore, and setup documentation in README.md.

Run with:

Shell
cp .env.example .env
pip install -r requirements.txt
python bot.py

Enable the Server Members, Message Content, and Reaction intents in the Discord Developer Portal.

revertedtinz

ask me the token

Kodari AI
KodariSep 3 at 12:44 pm 1

Add your bot token to the .env file:

Env
DISCORD_TOKEN=your_discord_bot_token_here

Don’t paste the token into chat. If it has been exposed, regenerate it in the Discord Developer Portal.

revertedtinz

Please do the token part yourself

1 image attached
Kodari AI
KodariSep 3 at 12:56 pm 1

I can’t safely extract or handle a bot token from a screenshot. Since the token is visible there, reset it immediately in the Discord Developer Portal.

Then add the new token locally to .env:

Env
DISCORD_TOKEN=your_new_token_here

Never commit or share .env. After saving it, start the bot with:

Shell
python bot.py
revertedtinz

which is env. file is it .env.example?

Kodari AI
KodariSep 3 at 12:58 pm 1

.env.example is only a template. Create a separate file named exactly .env in the same folder as bot.py.

Copy this:

Env
DISCORD_TOKEN=your_new_bot_token_here

Steps:

  1. Duplicate .env.example.

  2. Rename the copy to .env — not .env.txt.

  3. Replace your_new_bot_token_here with your regenerated Discord bot token.

  4. Keep .env private; don’t upload or share it.

Your files should look like:

Plain Text
MimuCloneBot/
├── bot.py
├── .env
├── .env.example
└── requirements.txt
revertedtinz

it crashed why

Kodari AI
KodariSep 3 at 12:59 pm 1

The most likely cause is that .env is missing, misnamed, or the token line is incorrect.

Make sure the file is named exactly:

Plain Text
.env

—not .env.example and not .env.txt.

Its contents should be:

Env
DISCORD_TOKEN=your_regenerated_bot_token

Also install the dependencies from the bot folder:

Shell
python -m pip install -r requirements.txt
python bot.py

If it still crashes, copy and send the full error message from the terminal—especially the lines beginning with Traceback, Error, or Exception. Do not send your token.

revertedtinz
📎 1 file 1,982 chars
📄
pasted-code-1788440569729.txt
txt 37 lines
▶
Loading bot files...
Creating a super duper secure sandbox...
Sandbox created, starting bot...
2026-09-03 13:01:59,876 | WARNING | discord.client | PyNaCl is not installed, voice will NOT be supported
[2026-09-03 13:01:59] [INFO ] discord.client: logging in using static token
2026-09-03 13:01:59,876 | INFO | discord.client | logging in using static token
Traceback (most recent call last):
File "/root/bot.py", line 71, in 
bot.run(settings.token)
File "/usr/local/lib/python3.12/site-packages/discord/client.py", line 929, in run
asyncio.run(runner())
File "/usr/local/lib/python3.12/asyncio/runners.py", line 195, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 691, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/discord/client.py", line 918, in runner
await self.start(token, reconnect=reconnect)
File "/usr/local/lib/python3.12/site-packages/discord/client.py", line 846, in start
await self.login(token)
File "/usr/local/lib/python3.12/site-packages/discord/client.py", line 689, in login
await self.setup_hook()
File "/root/bot.py", line 38, in setup_hook
synced = await self.tree.sync(guild=guild)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/discord/app_commands/tree.py", line 1118, in sync
data = await self._http.bulk_upsert_guild_commands(self.client.application_id, guild.id, payload=payload)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/discord/http.py", line 767, in request
raise Forbidden(response, data)
discord.errors.Forbidden: 403 Forbidden (error code: 50001): Missing Access
Bot process crashed
Bot stopped
Kodari AI
KodariSep 3 at 1:03 pm 1

The crash is caused by:

Plain Text
discord.errors.Forbidden: 403 Forbidden (error code: 50001): Missing Access

Your bot successfully logged in, but it cannot access the server whose ID is configured for slash-command syncing.

Fix it:

  1. Enable Developer Mode in Discord.

  2. Right-click the correct server and select Copy Server ID.

  3. Put that ID in your .env file, for example:

Env
DISCORD_GUILD_ID=123456789012345678
  1. Re-invite the bot to that exact server using the OAuth scopes:

Plain Text
bot
applications.commands
  1. Confirm that the bot appears as a member of the server.

  2. Restart the bot.

Also check that the configured guild ID is not:

  • The bot’s user ID

  • The application/client ID

  • A deleted server’s ID

  • An ID from a different Discord account/server

This warning is harmless:

Plain Text
PyNaCl is not installed, voice will NOT be supported

Only install PyNaCl if the bot needs voice features:

Shell
pip install PyNaCl

Because the token was previously visible in a screenshot, regenerate it in the Discord Developer Portal and update .env before restarting.

revertedtinz

can we ignore server id?

📎 1 file 1,969 chars
📄
pasted-code-1788440641432.txt
txt 36 lines
▶
Loading bot files...
Creating a super duper secure sandbox...
Sandbox created, starting bot...
2026-09-03 13:03:52,729 | WARNING | discord.client | PyNaCl is not installed, voice will NOT be supported
[2026-09-03 13:03:52] [INFO ] discord.client: logging in using static token
2026-09-03 13:03:52,730 | INFO | discord.client | logging in using static token
Traceback (most recent call last):
File "/root/bot.py", line 71, in 
bot.run(settings.token)
File "/usr/local/lib/python3.12/site-packages/discord/client.py", line 929, in run
asyncio.run(runner())
File "/usr/local/lib/python3.12/asyncio/runners.py", line 195, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 691, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/discord/client.py", line 918, in runner
await self.start(token, reconnect=reconnect)
File "/usr/local/lib/python3.12/site-packages/discord/client.py", line 846, in start
await self.login(token)
File "/usr/local/lib/python3.12/site-packages/discord/client.py", line 689, in login
await self.setup_hook()
File "/root/bot.py", line 38, in setup_hook
synced = await self.tree.sync(guild=guild)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/discord/app_commands/tree.py", line 1118, in sync
data = await self._http.bulk_upsert_guild_commands(self.client.application_id, guild.id, payload=payload)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/discord/http.py", line 767, in request
raise Forbidden(response, data)
discord.errors.Forbidden: 403 Forbidden (error code: 50001): Missing Access
Bot process crashed
Kodari AI
KodariSep 3 at 1:04 pm 1
  1. Make guild ID optional by always syncing slash commands globally.

  2. Correct the .env.example token format and remove the required-looking server ID.

  3. Note that global slash commands may take up to an hour to appear.

Yes. I removed the server ID requirement.

The bot now syncs commands globally, so you can remove this line from .env:

Env
DISCORD_GUILD_ID=...

Your .env should contain:

Env
DISCORD_TOKEN=your_new_bot_token
DATABASE_PATH=kodari.sqlite3

Global slash commands can take up to one hour to appear. The bot must still be invited to your server with both scopes:

Plain Text
bot
applications.commands

The PyNaCl warning is unrelated and can be ignored unless you use voice features.

revertedtinz

add slash command its not visible yet

Kodari AI
KodariSep 3 at 1:07 pm 1
  1. Change startup sync from delayed global registration to immediate guild registration.

  2. Sync to every server the bot is currently in, without requiring DISCORD_GUILD_ID.

  3. Prevent one inaccessible server from crashing the bot and log the sync result.

Updated bot.py so slash commands now sync directly to every server the bot is currently in. They should appear almost immediately after restarting the bot.

Restart it:

Shell
python bot.py

The bot must be invited with both OAuth scopes:

Plain Text
bot
applications.commands

If commands still do not appear:

  1. Confirm the bot is actually inside the server.

  2. Restart the bot and look for logs like:

Plain Text
Synced 20 commands to Your Server
  1. Restart Discord or reload the Discord app.

  2. Make sure you are typing / in the same server where the bot is installed.

revertedtinz

add the prefix thing too

Kodari AI
KodariSep 3 at 1:13 pm 2
  1. Make the existing commands hybrid so each works with both /command and !command.

  2. Read the prefix from DISCORD_PREFIX, defaulting to !.

  3. Add prefix permission/server checks and error responses.

  4. Keep slash-command syncing unchanged.

Added prefix support alongside slash commands.

Use commands like:

Plain Text
!balance
!daily
!shop
!pay @User 100
!help

The default prefix is !. You can change it in .env:

Env
DISCORD_PREFIX=!

Restart the bot after changing .env.

Important: Message Content Intent must be enabled in the Discord Developer Portal:

Developer Portal → Your Application → Bot → Privileged Gateway Intents → Message Content Intent → Enable

The bot now supports both:

Plain Text
/balance
!balance
revertedtinz

add leveling system

Kodari AI
KodariSep 3 at 1:28 pm 1
  1. Add an XP/leveling data model and persistence using the bot’s existing database layer.

  2. Award cooldown-limited XP from messages and announce level-ups.

  3. Add hybrid rank and leaderboard commands with slash and prefix support.

Added the leveling system.

Commands:

Plain Text
/rank
!rank

/leaderboard
!leaderboard

How it works:

  • Members earn 15–25 XP per message.

  • XP is limited to once every 60 seconds.

  • Bots and command messages do not grant XP.

  • Level formula: level = √(XP ÷ 100).

  • The bot announces level-ups in the channel.

  • XP is saved in the existing SQLite database.

Restart the bot, then use:

Plain Text
/rank

Guild slash commands should appear almost immediately.

revertedtinz

I made a bot dashboard using other ai named bolt.new so how to sync

Kodari AI
KodariSep 4 at 4:17 am 1

Bolt.new creates the dashboard separately, so it will not automatically sync with your Discord bot. You need a shared backend or API.

Recommended setup

Plain Text
Discord bot ─────┐
                 ├── Supabase/PostgreSQL database
Bolt dashboard ──┘

1. Use a hosted database

Your bot’s current SQLite database is local to the bot server, so a hosted Bolt dashboard cannot access it directly. Use Supabase or another hosted PostgreSQL database.

The bot would use:

Env
DATABASE_URL=your_postgresql_connection_string

The dashboard would use its own Supabase environment variables:

Env
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your_public_anon_key

Never put these in the frontend:

Env
DISCORD_TOKEN=...
SUPABASE_SERVICE_ROLE_KEY=...

2. Store shared data in the database

For example:

Plain Text
guild_settings
- guild_id
- prefix
- leveling_enabled
- level_up_channel_id
- updated_at

user_levels
- guild_id
- user_id
- xp
- level
- updated_at

The bot writes XP to user_levels, and the dashboard reads it to display rankings.

The dashboard writes settings to guild_settings, and the bot reads those settings.

3. Add Discord login to the dashboard

Use Discord OAuth2 so dashboard users can log in. The dashboard should verify that the logged-in user belongs to the selected server and has administrator or manager permissions.

Do not allow users to simply submit any guild_id and edit it.

4. Sync changes

For dashboard settings:

Plain Text
Dashboard changes setting
        ↓
Database is updated
        ↓
Bot reads the setting
        ↓
Bot applies it

The bot can either:

  • Reload settings every time a command runs, or

  • Cache settings and refresh them every 30–60 seconds.

For immediate updates, the dashboard can call a protected bot API endpoint, but the endpoint must never expose the bot token.

5. Keep the bot token private

Your dashboard should never contain or receive:

Env
DISCORD_TOKEN

If the dashboard needs the bot to perform an action, use:

Plain Text
Dashboard → secure backend endpoint → bot/database

not:

Plain Text
Dashboard → Discord bot token

Easiest next step

Export or open the Bolt project and identify whether it uses Supabase, Firebase, or another backend. Then share:

  • The dashboard’s database setup or relevant files

  • The bot’s current database.py

  • Which features should sync, such as leveling, server settings, commands, or economy

The cleanest implementation for your current bot is likely migrating its SQLite leveling data to Supabase/PostgreSQL and having both the Python bot and Bolt dashboard use the same tables.

revertedtinz

Host it

Kodari AI
KodariSep 4 at 4:41 pm 1

I can prepare the project for hosting, but I can’t log in to or deploy into your hosting accounts directly.

Recommended setup:

  • Discord bot: Railway or Render

  • Bolt dashboard: Vercel

  • Shared data: Supabase/PostgreSQL

Plain Text
Discord bot → Supabase
Bolt dashboard → Supabase

To deploy it, send/export:

  1. The bot project files, including bot.py, database.py, and requirements.txt

  2. The Bolt.new project source or GitHub repository

  3. Which platform you want:

    • Railway — easiest for the bot

    • Render — also suitable

    • VPS — more control, more setup

Do not send your Discord token or database passwords here. Add them as hosting environment variables:

Env
DISCORD_TOKEN=...
DATABASE_URL=...
DISCORD_PREFIX=!

The bot must not use local SQLite if the dashboard needs access to the same data; both should use a hosted database such as Supabase.

revertedtinz

add custom multi-prefix

Kodari AI
KodariSep 10 at 12:20 pm 1
  1. Parse a comma-separated DISCORD_PREFIXES setting while keeping ! as the default.

  2. Pass all prefixes to discord.py and prevent prefix commands from earning leveling XP.

  3. Update the example configuration and documentation.

Added custom multi-prefix support.

Configure prefixes in .env:

Env
DISCORD_PREFIXES=!,?,$

The bot will accept:

Plain Text
!rank
?rank
$rank

Changes include:

  • Multiple comma-separated prefixes.

  • Default remains !.

  • Existing DISCORD_PREFIX is still supported as a fallback.

  • Leveling no longer awards XP for messages beginning with any configured prefix.

  • Documentation and .env.example updated.

  • Fixed the inconsistent indentation in bot.py.

Restart the bot after changing .env.

Kodari can make mistakes. Review important code before using.
Files
.gitignore
admin.py
bot.py
config.py
database.py
economy.py
features.py
leveling.py
README.md
requirements.txt
utils.py
Code
11 1,000
bot.py
import logging

import discord
from discord import app_commands
from discord.ext import commands

from admin import AdminCog
from config import load_settings
from database import Database
from economy import EconomyCog
from features import FeatureCog, VerificationCommands, VerifyView
from leveling import LevelingCog


logging.basicConfig(level=logging.INFO, format="%(asctime)s | %(levelname)s | %(name)s | %(message)s")
logger = logging.getLogger("kodari")


class KodariBot(commands.Bot):
    def __init__(self, database: Database, settings):
        intents = discord.Intents.default()
        intents.members = True
        intents.message_content = True
        intents.reactions = True
        super().__init__(command_prefix=settings.prefixes, intents=intents, help_command=None)
        self.database = database
        self.settings = settings

    async def setup_hook(self) -> None:
        await self.add_cog(AdminCog(self.database))
        await self.add_cog(EconomyCog(self.database))
        await self.add_cog(LevelingCog(self, self.database))
        await self.add_cog(FeatureCog(self, self.database))
        await self.add_cog(VerificationCommands(self, self.database))
        self.add_view(VerifyView(self.database))

        guilds = list(self.guilds)
        for guild in guilds:
            self.tree.copy_global_to(guild=guild)

        # Remove previously registered global commands so commands are not duplicated.
        self.tree.clear_commands(guild=None)
        await self.tree.sync()

        for guild in guilds:
            try:
                synced = await self.tree.sync(guild=guild)
                logger.info("Synced %d commands to %s (%s)", len(synced), guild.name, guild.id)
            except discord.Forbidden:
                logger.warning("Could not sync commands to %s (%s): missing access", guild.name, guild.id)


settings = load_settings()
bot = KodariBot(Database(settings.database_path), settings)


@bot.event
async def on_ready() -> None:
    if bot.user:
        logger.info("Logged in as %s (%s)", bot.user, bot.user.id)


@bot.tree.error
async def on_app_command_error(interaction: discord.Interaction, error: app_commands.AppCommandError) -> None:
    if isinstance(error, app_commands.MissingPermissions):
        message = "You do not have permission to use this command."
    elif isinstance(error, app_commands.NoPrivateMessage):
        message = "This command can only be used in a server."
    else:
        logger.error("Slash command failed", exc_info=error)
        message = "Something went wrong while running that command."
    if interaction.response.is_done():
        await interaction.followup.send(message, ephemeral=True)
    else:
        await interaction.response.send_message(message, ephemeral=True)


@bot.event
async def on_command_error(ctx: commands.Context, error: commands.CommandError) -> None:
    if isinstance(error, commands.CommandNotFound):
        return
    if isinstance(error, (commands.MissingPermissions, commands.NoPrivateMessage)):
        message = "You do not have permission to use this command." if isinstance(error, commands.MissingPermissions) else "This command can only be used in a server."
    elif isinstance(error, commands.MissingRequiredArgument):
        message = f"Missing argument: `{error.param.name}`."
    elif isinstance(error, commands.BadArgument):
        message = "One or more arguments are invalid."
    else:
        logger.error("Prefix command failed", exc_info=error)
        message = "Something went wrong while running that command."
    await ctx.send(message)


try:
    bot.run(settings.token)
finally:
    bot.database.close()