A kawaii-themed Discord bot featuring economy system, anime interactions, AI image generation, and administrative tools.
- Economy system with experience, levels, and currency
- Anime-themed interaction commands using waifu.it API
- AI image generation using Stable Diffusion
- Administrative tools for server management
- Detailed logging system
- MongoDB integration for data persistence
- Interactive games with rewards (TicTacToe)
- Hot reload for code changes (Debugging and Development)
- Create a new Discord bot and get the token
- Create a new MongoDB database and get the connection string
- Create a waifu.it account and get API token
- Set up Stable Diffusion API endpoint
- Copy
.env.example
to.env
and modify the values:DISCORD_TOKEN=<your discord bot token> MONGO_URI=<your mongodb connection string> DB_NAME=<your database name> WAIFU_IT_TOKEN=<your waifu.it api token> STABLE_DIFFUSION_URL=<your stable diffusion api url> (comma separated for multiple servers)
- Install dependencies
- Run the bot with
python main.py
orpython watch.py
for debugging and development
Folder/File | Description |
---|---|
cogs/ |
Bot command modules (economy, anime, admin, games, wfx) |
utils/ |
Utility classes (database, logger, helper) |
lib/ |
External library wrappers (stablediffusion, waifuit, tickengine) |
main.py |
Main bot initialization |
watch.py |
Hot reload for code changes (Debugging and Development) |
config.py |
Centralized configuration management |
profile
- View user level, exp and balanceleaderboard
- Server rankings by expdaily
- Claim daily rewards (exp or money)give
- Transfer money to other users
hug
- Send hugging anime GIFpat
- Send headpatting anime GIFkiss
- Send kissing anime GIFcry
- Send crying anime GIFneko
- Send random neko image
wfx generate
- Generate anime-style images (costs 100 money)- Quality options: low, medium, high
- Multiple aspect ratios: 1:1, 9:7, 7:9, etc.
- Customizable steps and CFG scale
wfx models
- Show available Stable Diffusion models
tictactoe [difficulty]
- Play TicTacToe against the computer- Difficulty options: easy, medium, hard
- Rewards for winning:
- Easy: 100 EXP, 50 Money
- Medium: 250 EXP, 125 Money
- Hard: 500 EXP, 250 Money
serverinfo
- Display detailed server informationsysinfo
- Show system resource usageban
- Ban a member from the serverunban
- Unban a user from the serverreload
- Reload specific cog (owner only)shell
- Execute shell commands (owner only)debug
- Evaluate Python code (owner only)addmoney
- Add money to a user or my self
Cogs help organize bot commands and listeners. Here's how to create a new cog:
-
Create a new file in the
cogs
folder (e.g.mycog.py
) -
Use this basic template:
import discord from discord.ext import commands from typing import Optional class MyCog(commands.Cog): """Description of your cog's purpose""" def __init__(self, bot: commands.Bot) -> None: self.bot = bot @commands.hybrid_command( name="mycommand", description="What this command does" ) async def my_command(self, ctx: commands.Context) -> None: """Command description""" await ctx.send("(◕‿◕✿) Hello!") async def setup(bot: commands.Bot) -> None: await bot.add_cog(MyCog(bot))
-
The cog will be automatically loaded by the bot on startup
-
Key components:
commands.Cog
- Base class for all cogs@commands.hybrid_command()
- Creates slash + text commands@commands.Cog.listener()
- For event listenersasync def setup()
- Required to load the cog- Type hints for better code clarity
-
Best practices:
- Keep related commands in the same cog
- Add docstrings to your commands and classes
- Handle errors appropriately
- Use type hints consistently
- Implement proper permission checks
This project is open-sourced under the Apache 2.0 License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a pull request.
- waifu.it for anime images
- Stable Diffusion Webui for AI image generation interface
- MongoDB for data storage
- Discord.py for Discord API integration
- Python for the programming language
If you have any questions or suggestions, please feel free to contact me: