{"id":23529421,"url":"https://github.com/miruchigawa/discord-bot","last_synced_at":"2025-07-21T12:04:31.496Z","repository":{"id":267529076,"uuid":"901037454","full_name":"miruchigawa/discord-bot","owner":"miruchigawa","description":"A kawaii-themed Discord bot featuring economy system, anime interactions, AI image generation, and administrative tools.","archived":false,"fork":false,"pushed_at":"2024-12-26T10:50:54.000Z","size":169,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-22T17:10:52.678Z","etag":null,"topics":["ai","anime","bot","discord","discord-bot","discord-py","image-processing","kawaii","python","python-project","python-projects","stable-diffusion","template-project"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miruchigawa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-09T23:33:17.000Z","updated_at":"2025-03-17T00:25:21.000Z","dependencies_parsed_at":"2024-12-10T22:17:59.449Z","dependency_job_id":"773e4196-e196-40cd-a936-59695718724e","html_url":"https://github.com/miruchigawa/discord-bot","commit_stats":null,"previous_names":["miruchigawa/discord-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/miruchigawa/discord-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miruchigawa%2Fdiscord-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miruchigawa%2Fdiscord-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miruchigawa%2Fdiscord-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miruchigawa%2Fdiscord-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miruchigawa","download_url":"https://codeload.github.com/miruchigawa/discord-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miruchigawa%2Fdiscord-bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266296812,"owners_count":23907014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","anime","bot","discord","discord-bot","discord-py","image-processing","kawaii","python","python-project","python-projects","stable-diffusion","template-project"],"created_at":"2024-12-25T21:10:26.979Z","updated_at":"2025-07-21T12:04:31.460Z","avatar_url":"https://github.com/miruchigawa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Discord Bot Template\nA kawaii-themed Discord bot featuring economy system, anime interactions, AI image generation, and administrative tools.\n\n## Features\n- Economy system with experience, levels, and currency\n- Anime-themed interaction commands using waifu.it API\n- AI image generation using Stable Diffusion\n- Administrative tools for server management\n- Detailed logging system\n- MongoDB integration for data persistence\n- Interactive games with rewards (TicTacToe)\n- Hot reload for code changes (Debugging and Development)\n\n## Setup\n1. Create a new Discord bot and get the token\n2. Create a new MongoDB database and get the connection string\n3. Create a waifu.it account and get API token\n4. Set up Stable Diffusion API endpoint\n5. Copy `.env.example` to `.env` and modify the values:\n   ```\n   DISCORD_TOKEN=\u003cyour discord bot token\u003e\n   MONGO_URI=\u003cyour mongodb connection string\u003e\n   DB_NAME=\u003cyour database name\u003e\n   WAIFU_IT_TOKEN=\u003cyour waifu.it api token\u003e\n   STABLE_DIFFUSION_URL=\u003cyour stable diffusion api url\u003e (comma separated for multiple servers)\n   ```\n6. Install dependencies\n7. Run the bot with `python main.py` or `python watch.py` for debugging and development\n\n## Project Structure\n| Folder/File | Description |\n| --- | --- |\n| `cogs/` | Bot command modules (economy, anime, admin, games, wfx) |\n| `utils/` | Utility classes (database, logger, helper) |\n| `lib/` | External library wrappers (stablediffusion, waifuit, tickengine) |\n| `main.py` | Main bot initialization |\n| `watch.py` | Hot reload for code changes (Debugging and Development) |\n| `config.py` | Centralized configuration management |\n\n## Available Commands\n\n### Economy Commands\n- `profile` - View user level, exp and balance\n- `leaderboard` - Server rankings by exp\n- `daily` - Claim daily rewards (exp or money)\n- `give` - Transfer money to other users\n\n### Anime Commands\n- `hug` - Send hugging anime GIF\n- `pat` - Send headpatting anime GIF\n- `kiss` - Send kissing anime GIF\n- `cry` - Send crying anime GIF\n- `neko` - Send random neko image\n\n### AI Image Generation Commands\n- `wfx generate` - Generate anime-style images (costs 100 money)\n  - Quality options: low, medium, high\n  - Multiple aspect ratios: 1:1, 9:7, 7:9, etc.\n  - Customizable steps and CFG scale\n- `wfx models` - Show available Stable Diffusion models\n\n### Games Commands\n- `tictactoe [difficulty]` - Play TicTacToe against the computer\n  - Difficulty options: easy, medium, hard\n  - Rewards for winning:\n    - Easy: 100 EXP, 50 Money\n    - Medium: 250 EXP, 125 Money\n    - Hard: 500 EXP, 250 Money\n\n### Admin Commands\n- `serverinfo` - Display detailed server information\n- `sysinfo` - Show system resource usage\n- `ban` - Ban a member from the server\n- `unban` - Unban a user from the server\n- `reload` - Reload specific cog (owner only)\n- `shell` - Execute shell commands (owner only)\n- `debug` - Evaluate Python code (owner only)\n- `addmoney` - Add money to a user or my self\n\n## Creating Cogs\nCogs help organize bot commands and listeners. Here's how to create a new cog:\n\n1. Create a new file in the `cogs` folder (e.g. `mycog.py`)\n\n2. Use this basic template:\n   ```python\n   import discord\n   from discord.ext import commands\n   from typing import Optional\n\n   class MyCog(commands.Cog):\n       \"\"\"Description of your cog's purpose\"\"\"\n       \n       def __init__(self, bot: commands.Bot) -\u003e None:\n           self.bot = bot\n           \n       @commands.hybrid_command(\n           name=\"mycommand\",\n           description=\"What this command does\"\n       )\n       async def my_command(self, ctx: commands.Context) -\u003e None:\n           \"\"\"Command description\"\"\"\n           await ctx.send(\"(◕‿◕✿) Hello!\")\n           \n   async def setup(bot: commands.Bot) -\u003e None:\n       await bot.add_cog(MyCog(bot))\n   ```\n\n3. The cog will be automatically loaded by the bot on startup\n\n4. Key components:\n   - `commands.Cog` - Base class for all cogs\n   - `@commands.hybrid_command()` - Creates slash + text commands\n   - `@commands.Cog.listener()` - For event listeners\n   - `async def setup()` - Required to load the cog\n   - Type hints for better code clarity\n\n5. Best practices:\n   - Keep related commands in the same cog\n   - Add docstrings to your commands and classes\n   - Handle errors appropriately\n   - Use type hints consistently\n   - Implement proper permission checks\n\n## License\nThis project is open-sourced under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details.\n\n## Contributing\nContributions are welcome! Please feel free to submit a pull request.\n\n## Credits\n- [waifu.it](https://waifu.it/) for anime images\n- [Stable Diffusion Webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui) for AI image generation interface\n- [MongoDB](https://www.mongodb.com/) for data storage\n- [Discord.py](https://discord.py.org/) for Discord API integration\n- [Python](https://www.python.org/) for the programming language\n\n## Contact\nIf you have any questions or suggestions, please feel free to contact me:\n\n- [Discord](https://discord.gg/HXAwkFPK5d)\n- [Twitter](https://x.com/miruchigawa)\n- [Email](mailto:miruchigawa@outlook.jp)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiruchigawa%2Fdiscord-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiruchigawa%2Fdiscord-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiruchigawa%2Fdiscord-bot/lists"}