Skip to content

jomaabilal90-dotcom/sakura-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Sakura Avatar
Typing SVG

A cute, emotional anime girl Discord bot powered by Groq AI & Jikan API
Speaks 14+ languages, remembers your name, knows everything about anime

Add to Discord Report Bug Request Feature

GitHub Stars GitHub Forks GitHub Watchers Issues License Last Commit Repo Size

Node.js Discord.js Groq AI License Languages RAM Free


โœจ Highlights

๐ŸŒธ AI Anime Personality

Sakura is not just another chatbot โ€” she's an anime girl with real emotions. She gets happy, sad, angry, embarrassed, bored, excited, jealous, and playful. She remembers your name and genuinely misses you when you're gone.

๐ŸŒ 14+ Languages

Auto-detects and responds in your language natively โ€” Arabic, English, Japanese, Chinese, Russian, Hindi, Thai, Korean, French, Spanish, German, Turkish, Indonesian, Portuguese. Language purity guaranteed โ€” no mixing.

๐Ÿ” Anime Search

Search any anime directly from MyAnimeList with rich Discord embeds. Just mention Sakura and say the anime name. She'll also give you her personal opinion about it.

๐Ÿ”’ Privacy First

Zero tracking. Zero ads. No external databases by default. Conversation data stays in RAM and resets on restart. Optional Cloudflare D1 for persistence.


๐ŸŽฌ Demo

๐Ÿ‘ค User: @Sakura hello!
๐ŸŒธ Sakura: Hey! Nice to see you here. What's on your mind?

๐Ÿ‘ค User: @Sakura anime Attack on Titan
๐ŸŒธ Sakura: [Rich embed with anime info from MyAnimeList]
๐ŸŒธ Sakura: Attack on Titan is incredible! The way Isayama builds the mystery around the Titans is masterful.

๐Ÿ‘ค User: @Sakura ุฃูˆู‡ ุงู†ุง ุงุดุชู‚ุช ู„ูƒ
๐ŸŒธ Sakura: ูˆุฃู†ุง ุงุดุชู‚ุช ู„ูƒ ุฃูŠุถุง! ุฃูŠู† ูƒู†ุช ูƒู„ ู‡ุฐุง ุงู„ูˆู‚ุชุŸ

๐Ÿ‘ค User: @Sakura ใ‚ตใ‚ฏใƒฉใ€ใŠใฏใ‚ˆใ†๏ผ
๐ŸŒธ Sakura: ใŠใฏใ‚ˆใ†๏ผไปŠๆ—ฅใฏใฉใ‚“ใชไธ€ๆ—ฅใซใชใ‚Šใใ†๏ผŸ

๐Ÿš€ Quick Start

Prerequisites

Installation

# Clone the repository
git clone https://github.com/jomaabilal90-dotcom/sakura-bot.git
cd sakura-bot

# Install dependencies
npm install

# Create your .env file
cp .env.example .env
# Edit .env with your tokens

# Start the bot
node index.js

One-Click Deploy

Deploy to Discloud

Sakura is designed to run on Discloud โ€” free Discord bot hosting with 100MB RAM:

  1. Create a discloud.config file (already included)
  2. Upload via Discloud CLI or dashboard
  3. Set environment variables in Discloud dashboard
  4. Bot starts automatically and stays online 24/7

๐Ÿ“‹ Features

Feature Description
๐Ÿค– AI Chat Powered by Groq AI (Llama 3.3 70B) โ€” sub-second responses
๐ŸŒ 14+ Languages Auto-detects language, responds with language purity
๐Ÿ” Anime Search Search any anime via Jikan API with rich embeds
๐ŸŽ Anime GIFs Random cute anime GIF reactions
๐Ÿง  Memory System Remembers your name, language, and interaction count
๐Ÿ›ก๏ธ NSFW Protection 80+ patterns across 10+ languages
๐Ÿ’ฌ DM Support Chat privately in direct messages
๐Ÿ’ญ Spontaneous Messages Starts conversations on her own
โ™ป๏ธ Smart RAM Management Auto cleanup, stays under 100MB
โ˜๏ธ Cloudflare D1 Optional persistent storage
๐Ÿ‘ค User Profiles Greet returning users, miss regulars

๐ŸŽฎ Usage

Just mention Sakura or say her name:

@Sakura hello!              โ†’ Chat with her
@Sakura anime One Piece     โ†’ Search anime on MyAnimeList
@Sakura recommend me isekai โ†’ Get anime recommendations
@Sakura ู…ุฑุญุจุง               โ†’ She speaks Arabic
@Sakura ใ“ใ‚“ใซใกใฏ            โ†’ She speaks Japanese
@Sakura hola                โ†’ She speaks Spanish

Or send a DM โ€” she responds in your language automatically.

Supported Interactions

Action Example
Chat @Sakura how are you?
Anime search @Sakura anime Naruto
Recommendations @Sakura recommend a good isekai
Multi-language @Sakura ู…ุฑุญุจุง / @Sakura ใ“ใ‚“ใซใกใฏ
DM Send a direct message
Name mention Just say "Sakura" in any message

โš™๏ธ Configuration

Environment Variables

Variable Required Description
DISCORD_TOKEN โœ… Yes Your Discord bot token
GROQ_API_KEY โœ… Yes Your Groq API key (free at console.groq.com)
CF_ACCOUNT_ID โŒ No Cloudflare account ID (for D1 storage)
CF_API_TOKEN โŒ No Cloudflare API token
CF_D1_DATABASE_ID โŒ No Cloudflare D1 database ID

๐Ÿ—๏ธ Architecture

sakura-bot/
โ”œโ”€โ”€ index.js            # Main bot file โ€” all logic in one file
โ”œโ”€โ”€ package.json        # Dependencies & metadata
โ”œโ”€โ”€ .env.example        # Environment variable template
โ”œโ”€โ”€ .gitignore          # Git ignore rules
โ”œโ”€โ”€ discloud.config     # Discloud hosting configuration
โ”œโ”€โ”€ sakura-avatar.png   # Bot profile picture
โ”œโ”€โ”€ LICENSE             # MIT License
โ”œโ”€โ”€ README.md           # This file
โ”œโ”€โ”€ CONTRIBUTING.md     # Contribution guidelines
โ”œโ”€โ”€ CHANGELOG.md        # Version history
โ”œโ”€โ”€ CODE_OF_CONDUCT.md  # Community guidelines
โ”œโ”€โ”€ SECURITY.md         # Security policy
โ””โ”€โ”€ .github/
    โ”œโ”€โ”€ ISSUE_TEMPLATE/
    โ”‚   โ”œโ”€โ”€ bug_report.md
    โ”‚   โ”œโ”€โ”€ feature_request.md
    โ”‚   โ””โ”€โ”€ question.md
    โ”œโ”€โ”€ PULL_REQUEST_TEMPLATE.md
    โ””โ”€โ”€ workflows/
        โ””โ”€โ”€ ci.yml      # GitHub Actions CI

How It Works

  1. Language Detection โ€” Unicode character ranges + keyword patterns for 14 languages
  2. System Prompt โ€” Dynamic personality prompt based on user profile & language
  3. Groq AI โ€” Conversation history (16 messages) sent to Llama 3.3 70B
  4. Memory โ€” User profiles stored in RAM with optional D1 persistence
  5. NSFW Filter โ€” Pattern matching across 10+ languages before processing
  6. RAM Cleanup โ€” Periodic GC, history trimming, and user profile caps

๐ŸŒ Language Detection

Language Method
Arabic Unicode U+0600-U+08FF
Japanese Hiragana/Katakana U+3040-U+30FF
Chinese CJK Unified U+4E00-U+9FFF
Russian Cyrillic U+0400-U+04FF
Hindi Devanagari U+0900-U+097F
Thai Thai U+0E00-U+0E7F
Korean Hangul U+AC00-U+D7AF
French/Spanish/German Latin Extended + keyword analysis
Turkish/Indonesian/Portuguese Keyword pattern matching
English Default fallback

๐Ÿ”’ Privacy

Aspect Policy
Data storage RAM only (resets on restart)
D1 storage Optional โ€” only name, language, interaction count
Tracking None โ€” no analytics, no scripts
Ads None โ€” completely ad-free
Data selling Never โ€” no user data shared
Conversation logs RAM, max 16 messages, auto-cleaned

๐Ÿ—บ๏ธ Roadmap

  • Slash commands support
  • Manga search
  • User-set nicknames for Sakura
  • Per-server language preference
  • Anime recommendation quiz
  • Top.gg vote rewards
  • Web dashboard for admins
  • Music playback
  • Anime news feed

๐Ÿค Contributing

Contributions are what make the open source community amazing! Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/amazing-feature)
  3. Commit your Changes (git commit -m 'Add: amazing feature')
  4. Push to the Branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

See CONTRIBUTING.md for detailed guidelines.


๐Ÿ’ฌ FAQ

Is Sakura free to use?
Yes! Sakura uses free-tier APIs: Groq AI (14,400 requests/day) and Jikan API (unlimited). Hosting on Discloud is also free (100MB RAM). No credit card required for any service.
Does Sakura support my language?
Sakura auto-detects and responds in 14+ languages: Arabic, English, Japanese, Chinese, Russian, Hindi, Thai, Korean, French, Spanish, German, Turkish, Indonesian, and Portuguese. More languages can be added by extending the `detectLang()` function.
Can I self-host Sakura?
Absolutely! Clone the repo, add your tokens to `.env`, run `npm install`, and start with `node index.js`. You can also deploy to Discloud for free, or any Node.js hosting service.
How does Sakura remember me?
Sakura stores user profiles (name, language, interaction count) in RAM. Regular users get special greetings and warmer responses. With Cloudflare D1 configured, this data persists across restarts.
Is the NSFW filter effective?
Sakura uses 80+ patterns across 10+ languages including Arabic, English, Japanese, French, Spanish, Portuguese, German, Russian, Turkish, and general internet terms. It also refuses inappropriate topics at the AI level via system prompts.
Can I modify Sakura's personality?
Yes! The entire personality is defined in the `buildSystemPrompt()` function in `index.js`. You can change her traits, add new rules, or completely redesign her character.
Why no slash commands?
Sakura is designed to feel like a real person chatting in the server, not a command-based tool. Just mention her name and talk naturally. Slash commands are on the roadmap for specific features.

๐Ÿ› ๏ธ Tech Stack

Technology Purpose
Node.js v18+ Runtime
discord.js v14 Discord API
Groq SDK AI (Llama 3.3 70B)
Jikan API v4 Anime data (MyAnimeList)
GIPHY API Anime GIFs
Cloudflare D1 Optional persistence
Discloud Free hosting

๐Ÿ“„ License

Distributed under the MIT License. See LICENSE for more information.


๐Ÿ‘ค Author

Made with love by @bilal36i

Made with love Groq Discloud Jikan Discord.js

Add Sakura

Releases

No releases published

Packages

 
 
 

Contributors