Skip to content

AI-Powered Versatile Discord Bot - AI chat, Translator and more with a user-friendly and fully localized interface!

License

Notifications You must be signed in to change notification settings

SeoulSKY/SoruSora

Repository files navigation

SoruSora

AI-Powered Versatile Discord Bot - AI chat, Translator and more with a user-friendly and fully localized interface!

Feature Overview

/movie
/chat
/translator

Table of Contents

Why you should use SoruSora over the others?

  • Transparency through Open Source: SoruSora is not only entirely free but also open source, ensuring transparency in its operations. Users can monitor and verify that SoruSora maintains ethical practices without any hidden agendas.
  • Privacy-first Design: SoruSora is designed with privacy in mind. Any sensitive information is encrypted and stored securely, ensuring that user data is protected from unauthorized access.
  • Localized to All 29 Discord Languages: Everything including command names, descriptions, and instructions are automatically changed based on the current Discord language setting for each user. SoruSora is especially great if your server is international.
  • Intuitive User Interface: Designed with a focus on user experience, it features intuitive elements like slash commands, providing a more straightforward alternative to traditional message commands. Moreover, SoruSora fully utilizes widgets such as Listbox and Buttons, eliminating the need for excessive typing and adding reactions to a message.

Commands

About

Show the information about SoruSora

Arcaea

/arcaea linkplay

Create an embed to invite people to your Link Play.

Channel

/channel language

Set or remove the main language of the channels.

The translator will use the main language as the source language for all messages in the channels.

/channel translator

Set or remove a translator for channels.

For every message sent in the selected channels, SoruSora will translate the message into the selected languages and reply with the translations.

If the main language of the channels is not selected using /channel language, the language used in the message will be detected automatically.

It supports 43 languages, namely Albanian, Arabic, Azerbaijani, Bengali, Bulgarian, Catalan, Chinese (Simplified), Chinese (Traditional), Czech, Danish, Dutch, English, Esperanto, Estonian, Filipino, Finnish, French, German, Greek, Hebrew, Hindi, Hungarian, Indonesian, Irish, Italian, Japanese, Korean, Latvian, Lithuanian, Malay, Norwegian (Bokmal), Persian, Polish, Portuguese, Romanian, Russian, Slovak, Slovenian, Spanish, Swedish, Thai, Turkish and Ukrainian.

Chat

To chat with SoruSora, either mention her or reply to her.

/chat clear

Clear the chat history between you and SoruSora.

/chat token

Set the token that will be used to chat with SoruSora.

/chat tutorial

Teach you how to chat with SoruSora.

Dashboard

Display the dashboard that contains configurations and statistics.

Dice

Roll some dice. The result is a random number between 1 and 6 with equal probability.

Help

Teach you how to use SoruSora.

Ping

Check the response time of SoruSora.

Translator

Set or remove a translator that translate all of your messages to other languages.

It supports 43 languages, namely Albanian, Arabic, Azerbaijani, Bengali, Bulgarian, Catalan, Chinese (Simplified), Chinese (Traditional), Czech, Danish, Dutch, English, Esperanto, Estonian, Filipino, Finnish, French, German, Greek, Hebrew, Hindi, Hungarian, Indonesian, Irish, Italian, Japanese, Korean, Latvian, Lithuanian, Malay, Norwegian (Bokmal), Persian, Polish, Portuguese, Romanian, Russian, Slovak, Slovenian, Spanish, Swedish, Thai, Turkish and Ukrainian.

How to Set up and Run

Setting Environment Variables

Create .env file, copy and paste all contents from .env.example file, and fill the values for your development environment.

Description of each environment variable

Name Description
BOT_TOKEN Token for your own Discord bot
TEST_GUILD_ID (Optional) Find your test server id following the guide. If provided, the bot runs in development mode.
AI_TOKEN Token for Gemini API. You can create one here for free
ENCRYPTION_KEY Key for encrypting and decrypting the user token

Running with Docker (Recommended)

Run the following command:

# For Production
docker compose pull && docker compose up -d

# For Development
docker compose -f docker-compose-dev.yml up --build -d

Running without Docker

pyenv install 3.11.7
  • Setup and activate the virtual environment
pyenv virtualenv 3.11.7 sorusora
pyenv local sorusora
  • Install required Python packages
pyenv exec pip install -r requirements.txt
  • Install Node.js 21.6
nvm install 21.6
nvm use 21.6
  • Install required node packages
npm install
  • Build Protocol Buffer files
chmod +x ./build-protos.sh && ./build-protos.sh
  • Run main.py
pyenv exec python src/main.py
  • In a separate terminal, Run the node server
# For Development
npm run dev

# For Production
npm run build
npm start

Architecture

SoruSora is built with a microservices architecture, consisting of a Python and a Node.js backends. The two servers communicate with each other using gRPC, a high-performance, open-source universal RPC framework. Database is managed by MongoDB server. Each server runs in a separate Docker container, and they are orchestrated using Docker Compose.

Architecture

How to Contribute

Read CONTRIBUTING.md for details.

License

SoruSora is licensed under the MIT License.