diff --git a/.gitignore b/.gitignore index 100b7b3..0f6ed48 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,10 @@ /venv/ -.idea +**.idea /.env **__pycache__ **.DS_Store -**.pytest_cache/ -/logs/ -/cache/ +**.pytest_cache +**logs/ +**cache/ service_account.json diff --git a/README.md b/README.md index a620fba..12f414c 100644 --- a/README.md +++ b/README.md @@ -38,22 +38,20 @@ Create `.env` file, copy and paste all contents from `.env.example` file, and fi | CAI_CHAR_ID | ID for the character in the Character AI. Follow the [guide](https://pycai.gitbook.io/welcome/api/values) to learn how to acquire it. | | CAI_TGT | ID for the target in the Character AI. Its value starts with `internal_id:`. Run `scripts/cai_tgt.py` to get it. | - ### Running with [Docker](https://www.docker.com) and [Docker Compose](https://docs.docker.com/compose/install/) (Recommended) Run the following command: -``` -docker-compose pull && docker-compose up +```bash +docker-compose pull && docker-compose up -d ``` Optionally, you can add `-d` flag to run the docker container in detached mode. - If you want to build the docker image by yourself and run it, use the following commands: -``` -docker-compose -f docker-compose-dev.yml up --build +```bash +docker-compose -f docker-compose-dev.yml up --build -d ``` ### Running without [Docker](https://www.docker.com) diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 47cca34..23a2116 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -2,13 +2,13 @@ version: "3" services: sorusora: - build: . + build: ./sorusora container_name: sorusora volumes: - - ./logs:/app/logs - - ./cache:/app/cache - - ./cache/algos_packages:${HOME}/.local/share/argos-translate/packages/ - - ./cache/algos_cache:${HOME}/.local/cache/argos-translate/ + - ./sorusora/logs:/app/logs + - ./sorusora/cache:/app/cache + - ./sorusora/cache/algos_packages:${HOME}/.local/share/argos-translate/packages/ + - ./sorusora/cache/algos_cache:${HOME}/.local/cache/argos-translate/ env_file: - .env diff --git a/docker-compose.yml b/docker-compose.yml index bce5e80..623afde 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,10 +5,10 @@ services: image: ghcr.io/seoulsky/sorusora:latest container_name: sorusora volumes: - - ./logs:/app/logs - - ./cache:/app/cache - - ./cache/algos_packages:${HOME}/.local/share/argos-translate/packages/ - - ./cache/algos_cache:${HOME}/.local/cache/argos-translate/ + - ./sorusora/logs:/app/logs + - ./sorusora/cache:/app/cache + - ./sorusora/cache/algos_packages:${HOME}/.local/share/argos-translate/packages/ + - ./sorusora/cache/algos_cache:${HOME}/.local/cache/argos-translate/ env_file: - .env diff --git a/.pylintrc b/sorusora/.pylintrc similarity index 100% rename from .pylintrc rename to sorusora/.pylintrc diff --git a/.python-version b/sorusora/.python-version similarity index 100% rename from .python-version rename to sorusora/.python-version diff --git a/Dockerfile b/sorusora/Dockerfile similarity index 100% rename from Dockerfile rename to sorusora/Dockerfile diff --git a/assets/arcaea_logo.png b/sorusora/assets/arcaea_logo.png similarity index 100% rename from assets/arcaea_logo.png rename to sorusora/assets/arcaea_logo.png diff --git a/assets/bad_apple.mp4 b/sorusora/assets/bad_apple.mp4 similarity index 100% rename from assets/bad_apple.mp4 rename to sorusora/assets/bad_apple.mp4 diff --git a/assets/ultra_bk.mp4 b/sorusora/assets/ultra_bk.mp4 similarity index 100% rename from assets/ultra_bk.mp4 rename to sorusora/assets/ultra_bk.mp4 diff --git a/commands/__init__.py b/sorusora/commands/__init__.py similarity index 100% rename from commands/__init__.py rename to sorusora/commands/__init__.py diff --git a/commands/about.py b/sorusora/commands/about.py similarity index 100% rename from commands/about.py rename to sorusora/commands/about.py diff --git a/commands/arcaea.py b/sorusora/commands/arcaea.py similarity index 100% rename from commands/arcaea.py rename to sorusora/commands/arcaea.py diff --git a/commands/chat.py b/sorusora/commands/chat.py similarity index 100% rename from commands/chat.py rename to sorusora/commands/chat.py diff --git a/commands/dice.py b/sorusora/commands/dice.py similarity index 100% rename from commands/dice.py rename to sorusora/commands/dice.py diff --git a/commands/help_.py b/sorusora/commands/help_.py similarity index 100% rename from commands/help_.py rename to sorusora/commands/help_.py diff --git a/commands/movie.py b/sorusora/commands/movie.py similarity index 99% rename from commands/movie.py rename to sorusora/commands/movie.py index 38b56d2..10d674b 100644 --- a/commands/movie.py +++ b/sorusora/commands/movie.py @@ -25,7 +25,7 @@ Path to the cache directory for desktop """ -MOBILE_CACHE_PATH = constants.CACHE_DIR / "movie" /"mobile" +MOBILE_CACHE_PATH = constants.CACHE_DIR / "movie" / "mobile" """ Path to the cache directory for mobile """ diff --git a/commands/ping.py b/sorusora/commands/ping.py similarity index 100% rename from commands/ping.py rename to sorusora/commands/ping.py diff --git a/commands/translator.py b/sorusora/commands/translator.py similarity index 100% rename from commands/translator.py rename to sorusora/commands/translator.py diff --git a/context_menus/__init__.py b/sorusora/context_menus/__init__.py similarity index 100% rename from context_menus/__init__.py rename to sorusora/context_menus/__init__.py diff --git a/context_menus/translate_message.py b/sorusora/context_menus/translate_message.py similarity index 100% rename from context_menus/translate_message.py rename to sorusora/context_menus/translate_message.py diff --git a/docs/about/en.md b/sorusora/docs/about/en.md similarity index 100% rename from docs/about/en.md rename to sorusora/docs/about/en.md diff --git a/docs/about/ko.md b/sorusora/docs/about/ko.md similarity index 100% rename from docs/about/ko.md rename to sorusora/docs/about/ko.md diff --git a/docs/help/about/en.md b/sorusora/docs/help/about/en.md similarity index 100% rename from docs/help/about/en.md rename to sorusora/docs/help/about/en.md diff --git a/docs/help/about/ko.md b/sorusora/docs/help/about/ko.md similarity index 100% rename from docs/help/about/ko.md rename to sorusora/docs/help/about/ko.md diff --git a/docs/help/arcaea/linkplay/en.md b/sorusora/docs/help/arcaea/linkplay/en.md similarity index 100% rename from docs/help/arcaea/linkplay/en.md rename to sorusora/docs/help/arcaea/linkplay/en.md diff --git a/docs/help/arcaea/linkplay/ko.md b/sorusora/docs/help/arcaea/linkplay/ko.md similarity index 100% rename from docs/help/arcaea/linkplay/ko.md rename to sorusora/docs/help/arcaea/linkplay/ko.md diff --git a/docs/help/chat/clear/en.md b/sorusora/docs/help/chat/clear/en.md similarity index 100% rename from docs/help/chat/clear/en.md rename to sorusora/docs/help/chat/clear/en.md diff --git a/docs/help/chat/clear/ko.md b/sorusora/docs/help/chat/clear/ko.md similarity index 100% rename from docs/help/chat/clear/ko.md rename to sorusora/docs/help/chat/clear/ko.md diff --git a/docs/help/chat/set_language/en.md b/sorusora/docs/help/chat/set_language/en.md similarity index 100% rename from docs/help/chat/set_language/en.md rename to sorusora/docs/help/chat/set_language/en.md diff --git a/docs/help/chat/set_language/ko.md b/sorusora/docs/help/chat/set_language/ko.md similarity index 100% rename from docs/help/chat/set_language/ko.md rename to sorusora/docs/help/chat/set_language/ko.md diff --git a/docs/help/dice/en.md b/sorusora/docs/help/dice/en.md similarity index 100% rename from docs/help/dice/en.md rename to sorusora/docs/help/dice/en.md diff --git a/docs/help/dice/ko.md b/sorusora/docs/help/dice/ko.md similarity index 100% rename from docs/help/dice/ko.md rename to sorusora/docs/help/dice/ko.md diff --git a/docs/help/ping/en.md b/sorusora/docs/help/ping/en.md similarity index 100% rename from docs/help/ping/en.md rename to sorusora/docs/help/ping/en.md diff --git a/docs/help/ping/ko.md b/sorusora/docs/help/ping/ko.md similarity index 100% rename from docs/help/ping/ko.md rename to sorusora/docs/help/ping/ko.md diff --git a/docs/help/translator/clear_channel_languages/en.md b/sorusora/docs/help/translator/clear_channel_languages/en.md similarity index 100% rename from docs/help/translator/clear_channel_languages/en.md rename to sorusora/docs/help/translator/clear_channel_languages/en.md diff --git a/docs/help/translator/clear_channel_languages/ko.md b/sorusora/docs/help/translator/clear_channel_languages/ko.md similarity index 100% rename from docs/help/translator/clear_channel_languages/ko.md rename to sorusora/docs/help/translator/clear_channel_languages/ko.md diff --git a/docs/help/translator/clear_languages/en.md b/sorusora/docs/help/translator/clear_languages/en.md similarity index 100% rename from docs/help/translator/clear_languages/en.md rename to sorusora/docs/help/translator/clear_languages/en.md diff --git a/docs/help/translator/clear_languages/ko.md b/sorusora/docs/help/translator/clear_languages/ko.md similarity index 100% rename from docs/help/translator/clear_languages/ko.md rename to sorusora/docs/help/translator/clear_languages/ko.md diff --git a/docs/help/translator/set_channel_languages/en.md b/sorusora/docs/help/translator/set_channel_languages/en.md similarity index 100% rename from docs/help/translator/set_channel_languages/en.md rename to sorusora/docs/help/translator/set_channel_languages/en.md diff --git a/docs/help/translator/set_channel_languages/ko.md b/sorusora/docs/help/translator/set_channel_languages/ko.md similarity index 100% rename from docs/help/translator/set_channel_languages/ko.md rename to sorusora/docs/help/translator/set_channel_languages/ko.md diff --git a/docs/help/translator/set_languages/en.md b/sorusora/docs/help/translator/set_languages/en.md similarity index 100% rename from docs/help/translator/set_languages/en.md rename to sorusora/docs/help/translator/set_languages/en.md diff --git a/docs/help/translator/set_languages/ko.md b/sorusora/docs/help/translator/set_languages/ko.md similarity index 100% rename from docs/help/translator/set_languages/ko.md rename to sorusora/docs/help/translator/set_languages/ko.md diff --git a/locales/en/commands/about.ftl b/sorusora/locales/en/commands/about.ftl similarity index 100% rename from locales/en/commands/about.ftl rename to sorusora/locales/en/commands/about.ftl diff --git a/locales/en/commands/arcaea.ftl b/sorusora/locales/en/commands/arcaea.ftl similarity index 100% rename from locales/en/commands/arcaea.ftl rename to sorusora/locales/en/commands/arcaea.ftl diff --git a/locales/en/commands/chat.ftl b/sorusora/locales/en/commands/chat.ftl similarity index 100% rename from locales/en/commands/chat.ftl rename to sorusora/locales/en/commands/chat.ftl diff --git a/locales/en/commands/dice.ftl b/sorusora/locales/en/commands/dice.ftl similarity index 100% rename from locales/en/commands/dice.ftl rename to sorusora/locales/en/commands/dice.ftl diff --git a/locales/en/commands/help.ftl b/sorusora/locales/en/commands/help.ftl similarity index 100% rename from locales/en/commands/help.ftl rename to sorusora/locales/en/commands/help.ftl diff --git a/locales/en/commands/movie.ftl b/sorusora/locales/en/commands/movie.ftl similarity index 100% rename from locales/en/commands/movie.ftl rename to sorusora/locales/en/commands/movie.ftl diff --git a/locales/en/commands/ping.ftl b/sorusora/locales/en/commands/ping.ftl similarity index 100% rename from locales/en/commands/ping.ftl rename to sorusora/locales/en/commands/ping.ftl diff --git a/locales/en/commands/translator.ftl b/sorusora/locales/en/commands/translator.ftl similarity index 100% rename from locales/en/commands/translator.ftl rename to sorusora/locales/en/commands/translator.ftl diff --git a/locales/en/context_menus/translate_message.ftl b/sorusora/locales/en/context_menus/translate_message.ftl similarity index 100% rename from locales/en/context_menus/translate_message.ftl rename to sorusora/locales/en/context_menus/translate_message.ftl diff --git a/locales/en/main.ftl b/sorusora/locales/en/main.ftl similarity index 100% rename from locales/en/main.ftl rename to sorusora/locales/en/main.ftl diff --git a/locales/en/utils/translator.ftl b/sorusora/locales/en/utils/translator.ftl similarity index 100% rename from locales/en/utils/translator.ftl rename to sorusora/locales/en/utils/translator.ftl diff --git a/locales/en/utils/ui.ftl b/sorusora/locales/en/utils/ui.ftl similarity index 100% rename from locales/en/utils/ui.ftl rename to sorusora/locales/en/utils/ui.ftl diff --git a/locales/ko/commands/about.ftl b/sorusora/locales/ko/commands/about.ftl similarity index 100% rename from locales/ko/commands/about.ftl rename to sorusora/locales/ko/commands/about.ftl diff --git a/locales/ko/commands/arcaea.ftl b/sorusora/locales/ko/commands/arcaea.ftl similarity index 100% rename from locales/ko/commands/arcaea.ftl rename to sorusora/locales/ko/commands/arcaea.ftl diff --git a/locales/ko/commands/chat.ftl b/sorusora/locales/ko/commands/chat.ftl similarity index 100% rename from locales/ko/commands/chat.ftl rename to sorusora/locales/ko/commands/chat.ftl diff --git a/locales/ko/commands/dice.ftl b/sorusora/locales/ko/commands/dice.ftl similarity index 100% rename from locales/ko/commands/dice.ftl rename to sorusora/locales/ko/commands/dice.ftl diff --git a/locales/ko/commands/help.ftl b/sorusora/locales/ko/commands/help.ftl similarity index 100% rename from locales/ko/commands/help.ftl rename to sorusora/locales/ko/commands/help.ftl diff --git a/locales/ko/commands/movie.ftl b/sorusora/locales/ko/commands/movie.ftl similarity index 100% rename from locales/ko/commands/movie.ftl rename to sorusora/locales/ko/commands/movie.ftl diff --git a/locales/ko/commands/ping.ftl b/sorusora/locales/ko/commands/ping.ftl similarity index 100% rename from locales/ko/commands/ping.ftl rename to sorusora/locales/ko/commands/ping.ftl diff --git a/locales/ko/commands/translator.ftl b/sorusora/locales/ko/commands/translator.ftl similarity index 100% rename from locales/ko/commands/translator.ftl rename to sorusora/locales/ko/commands/translator.ftl diff --git a/locales/ko/context_menus/translate_message.ftl b/sorusora/locales/ko/context_menus/translate_message.ftl similarity index 100% rename from locales/ko/context_menus/translate_message.ftl rename to sorusora/locales/ko/context_menus/translate_message.ftl diff --git a/locales/ko/main.ftl b/sorusora/locales/ko/main.ftl similarity index 100% rename from locales/ko/main.ftl rename to sorusora/locales/ko/main.ftl diff --git a/locales/ko/utils/translator.ftl b/sorusora/locales/ko/utils/translator.ftl similarity index 100% rename from locales/ko/utils/translator.ftl rename to sorusora/locales/ko/utils/translator.ftl diff --git a/locales/ko/utils/ui.ftl b/sorusora/locales/ko/utils/ui.ftl similarity index 100% rename from locales/ko/utils/ui.ftl rename to sorusora/locales/ko/utils/ui.ftl diff --git a/main.py b/sorusora/main.py similarity index 100% rename from main.py rename to sorusora/main.py diff --git a/mongo/__init__.py b/sorusora/mongo/__init__.py similarity index 100% rename from mongo/__init__.py rename to sorusora/mongo/__init__.py diff --git a/mongo/channel.py b/sorusora/mongo/channel.py similarity index 100% rename from mongo/channel.py rename to sorusora/mongo/channel.py diff --git a/mongo/user.py b/sorusora/mongo/user.py similarity index 100% rename from mongo/user.py rename to sorusora/mongo/user.py diff --git a/requirements.txt b/sorusora/requirements.txt similarity index 100% rename from requirements.txt rename to sorusora/requirements.txt diff --git a/scripts/cai_tgt.py b/sorusora/scripts/cai_tgt.py similarity index 100% rename from scripts/cai_tgt.py rename to sorusora/scripts/cai_tgt.py diff --git a/scripts/clear_commands.py b/sorusora/scripts/clear_commands.py similarity index 97% rename from scripts/clear_commands.py rename to sorusora/scripts/clear_commands.py index 7dca99c..43ec955 100644 --- a/scripts/clear_commands.py +++ b/sorusora/scripts/clear_commands.py @@ -31,7 +31,7 @@ async def setup_hook(self) -> None: if __name__ == "__main__": - load_dotenv() + assert load_dotenv() bot = TempBot(command_prefix="!", intents=discord.Intents.all()) bot.run(os.getenv("BOT_TOKEN")) diff --git a/scripts/v103.py b/sorusora/scripts/v103.py similarity index 100% rename from scripts/v103.py rename to sorusora/scripts/v103.py diff --git a/scripts/v110.py b/sorusora/scripts/v110.py similarity index 100% rename from scripts/v110.py rename to sorusora/scripts/v110.py diff --git a/tests/__init__.py b/sorusora/tests/__init__.py similarity index 100% rename from tests/__init__.py rename to sorusora/tests/__init__.py diff --git a/tests/conftest.py b/sorusora/tests/conftest.py similarity index 100% rename from tests/conftest.py rename to sorusora/tests/conftest.py diff --git a/tests/pytest.ini b/sorusora/tests/pytest.ini similarity index 100% rename from tests/pytest.ini rename to sorusora/tests/pytest.ini diff --git a/tests/test_mongo/__init__.py b/sorusora/tests/test_mongo/__init__.py similarity index 100% rename from tests/test_mongo/__init__.py rename to sorusora/tests/test_mongo/__init__.py diff --git a/tests/test_mongo/test_document.py b/sorusora/tests/test_mongo/test_document.py similarity index 100% rename from tests/test_mongo/test_document.py rename to sorusora/tests/test_mongo/test_document.py diff --git a/utils/__init__.py b/sorusora/utils/__init__.py similarity index 100% rename from utils/__init__.py rename to sorusora/utils/__init__.py diff --git a/utils/constants.py b/sorusora/utils/constants.py similarity index 100% rename from utils/constants.py rename to sorusora/utils/constants.py diff --git a/utils/templates.py b/sorusora/utils/templates.py similarity index 100% rename from utils/templates.py rename to sorusora/utils/templates.py diff --git a/utils/translator.py b/sorusora/utils/translator.py similarity index 100% rename from utils/translator.py rename to sorusora/utils/translator.py diff --git a/utils/ui.py b/sorusora/utils/ui.py similarity index 100% rename from utils/ui.py rename to sorusora/utils/ui.py