Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Crowdin updates #82

Merged
merged 30 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
3a93120
New translations readme.th.md (Romanian)
Maseshi May 2, 2024
f3e3d68
New translations readme.th.md (French)
Maseshi May 2, 2024
24656f8
New translations readme.th.md (Spanish)
Maseshi May 2, 2024
7ca90f0
New translations readme.th.md (Bulgarian)
Maseshi May 2, 2024
e7f690c
New translations readme.th.md (Czech)
Maseshi May 2, 2024
8058a15
New translations readme.th.md (Danish)
Maseshi May 2, 2024
26ff69e
New translations readme.th.md (German)
Maseshi May 2, 2024
a969ade
New translations readme.th.md (Greek)
Maseshi May 2, 2024
26313a5
New translations readme.th.md (Finnish)
Maseshi May 2, 2024
b72d555
New translations readme.th.md (Hungarian)
Maseshi May 2, 2024
af6a179
New translations readme.th.md (Italian)
Maseshi May 2, 2024
47cfb6e
New translations readme.th.md (Japanese)
Maseshi May 2, 2024
b4e40ce
New translations readme.th.md (Korean)
Maseshi May 2, 2024
6f92ad2
New translations readme.th.md (Lithuanian)
Maseshi May 2, 2024
0a9298f
New translations readme.th.md (Dutch)
Maseshi May 2, 2024
99eb680
New translations readme.th.md (Norwegian)
Maseshi May 2, 2024
2e5def2
New translations readme.th.md (Polish)
Maseshi May 2, 2024
0dd88bd
New translations readme.th.md (Russian)
Maseshi May 2, 2024
579d934
New translations readme.th.md (Swedish)
Maseshi May 2, 2024
92ca5f7
New translations readme.th.md (Turkish)
Maseshi May 2, 2024
26ae5d1
New translations readme.th.md (Ukrainian)
Maseshi May 2, 2024
cf2060c
New translations readme.th.md (Chinese Simplified)
Maseshi May 2, 2024
38a3440
New translations readme.th.md (Chinese Traditional)
Maseshi May 2, 2024
977f5d1
New translations readme.th.md (Vietnamese)
Maseshi May 2, 2024
ad3e8b1
New translations readme.th.md (Portuguese, Brazilian)
Maseshi May 2, 2024
23d4ed7
New translations readme.th.md (Indonesian)
Maseshi May 2, 2024
f3a7406
New translations readme.th.md (Croatian)
Maseshi May 2, 2024
ee63d08
New translations readme.th.md (Hindi)
Maseshi May 2, 2024
647a6aa
New translations readme.th.md (English, United States)
Maseshi May 2, 2024
5541c44
New translations readme.th.md (English, United Kingdom)
Maseshi May 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 94 additions & 53 deletions documents/README.bg.md

Large diffs are not rendered by default.

148 changes: 94 additions & 54 deletions documents/README.cs.md

Large diffs are not rendered by default.

147 changes: 94 additions & 53 deletions documents/README.da.md

Large diffs are not rendered by default.

149 changes: 94 additions & 55 deletions documents/README.de.md

Large diffs are not rendered by default.

147 changes: 94 additions & 53 deletions documents/README.el.md

Large diffs are not rendered by default.

148 changes: 94 additions & 54 deletions documents/README.en-GB.md

Large diffs are not rendered by default.

148 changes: 94 additions & 54 deletions documents/README.en-US.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div align="center">
<img src="https://raw.githubusercontent.com/Maseshi/Shioru/main/assets/icons/favicon-circle.png" width="100" />
<img src="https://raw.githubusercontent.com/Maseshi/Shioru/main/assets/icons/apple-icon.png" width="100" style="border-radius: 100%;" />
<strong>
<h1>Shioru</h2>
<p>Assistants within your Discord server will help make your server a better place to live.</p>
<p>เลขาส่วนตัวใน Discord ที่จะช่วยทำให้กิลด์ของคุณน่าอยู่ยิ่งขึ้น</p>
</strong>
<img src="https://img.shields.io/badge/discord.js-v14-7354F6?logo=discord&logoColor=white" />
<img src="https://img.shields.io/github/stars/Maseshi/Shioru.svg?logo=github" />
Expand All @@ -25,7 +25,7 @@

[เปลี่ยนภาษา](https://github.com/Maseshi/Shioru/tree/main/documents)

Your good server assistant will help make your server look more lively. She can do a number of things, where you can view detailed information for the commands by typing `/help`, You can [invite Shioru to your server from here](https://discord.com/api/oauth2/authorize?client_id=704706906505347183&permissions=8&scope=applications.commands%20bot&redirect_uri=https%3A%2F%2Fshiorus.web.app%2Fthanks-you).
เลขาส่วนตัวที่ดีที่สุดของคุณจะช่วยให้กิลด์ของคุณดูมีชีวิตชีวามากขึ้น เธอสามารถทำสิ่งต่าง ๆ ได้หลายอย่างซึ่งคุณสามารถดูรายละเอียดข้อมูลของคำสั่งทั้งหมด ได้ง่าย ๆ โดยพิมพ์ `/help`

<div align="center">
<a href="https://discord.com/api/oauth2/authorize?client_id=704706906505347183&permissions=8&scope=applications.commands%20bot&redirect_uri=https%3A%2F%2Fshiorus.web.app%2Fthanks-you">
Expand All @@ -43,94 +43,134 @@ Your good server assistant will help make your server look more lively. She can
- Support customization of server notifications
- You can chat by typing `@Shioru` followed by the message you wish to communicate.
- Able to use application commands (/)
- จำลองระบบฐานข้อมูลสำหรับทดสอบ
- รองรับการทำงานบน Shard

And many other interesting features...

## Prerequisites

- [Node.js](https://nodejs.org/) v18.0.0 or higher
- [Python](https://www.python.org/downloads/) v2.0.0 หรือมากกว่า
- [Firebase](https://firebase.google.com/)
- [Node.js](https://nodejs.org/) v20.6.0 หรือมากกว่า
- [Python](https://www.python.org/downloads/) v3.8.0 หรือมากกว่า
- [Java](https://www.oracle.com/java/technologies/downloads/) v11.0.0 หรือมากกว่า
- [Build Tools](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022) หรือ[ติดตั้งด้วยตัวเอง](#1-ติดตั้ง-build-tools)
- [Firebase Tools](https://firebase.google.com/docs/cli)
- [FFmpeg](https://www.ffmpeg.org/download.html)
- [Git](https://git-scm.com/downloads)

## Quick setup guide
## การติดตั้ง

ทดสอบแล้วบนระบบ Mac, Linux และ Windows
### 1. ติดตั้ง **Build Tools**

### เพิ่มบอทไปยังเซิร์ฟเวอร์
ทำการติดตั้ง **Build tools** โดยรันคำสั่งดังต่อไปนี้ตามระบบปฏิบัติการของคุณ

- Go to the [Discord Developer Portal](https://discord.com/developers/applications)
- Click **"New Application"** and give your bot a name and accept the Discord policy rules.
- Go to the **"Bot"** page and enable all options in the **Privileged Gateway Intents** section. ![](https://raw.githubusercontent.com/Maseshi/Shioru/main/assets/images/discord-developer-portal-privileged-gateway-intents.png)
- Invite your bot to the server by going to the **OAuth2 > URL Generator** page, selecting `bot` and `applications.commands` selecting `Administrator`. Then copy the link and paste it on your browser's address. ![](https://raw.githubusercontent.com/Maseshi/Shioru/main/assets/images/discord-developer-portal-scopes.png)
- สำหรับระบบปฏิบัติการ Linux และ MacOS

### Setup a bot

เนื่องจากเราใช้ [sodium](https://www.npmjs.com/package/sodium) ในการเข้ารหัสและถอดรหัส เราจึงจำเป็นต้องติดตั้งส่วนประกอบเพิ่มเติมต่อไปนี้:

```bat
@REM บน Windows
npm install -g windows-build-tools
```
```sh
# บน MacOS (Darwin)
brew install libtool autoconf automake
sudo apt update
sudo apt install build-essential
```

- สำหรับระบบปฏิบัติการ Windows

```sh
# บน Linux
sudo apt-get install libtool-bin
npm install --global --production --add-python-to-path windows-build-tools
```

> **💡 ทริป**: คุณสามารถข้ามขั้นตอนนี้ผ่านตัวติดตั้ง Node.js ดังภาพต่อไปนี้ ![](https://raw.githubusercontent.com/Maseshi/Shioru/main/assets/images/node-js-tools-for-native-modules.png)

### 2. โคลนบอทและติดตั้งส่วนประกอบ

- Launch a terminal and run the following commands.
```bat
git clone https://github.com/Maseshi/Shioru.git
cd Shioru
npm install
```
- Rename the `.env.example` file to `.env` and add all values.

```bat
git clone https://github.com/Maseshi/Shioru.git
cd Shioru
npm install
```
> **💡 หมายเหตุ:** คุณสามารถแก้ไขข้อมูลบางอย่างใน **config** ที่ [./source/configs/data.js](../source/configs/data.js)

- You can edit some data in **config** at `./source/configs/data.js`.
### 3. ตั้งค่าบอทและเชิญเข้าร่วม

### Setup Firebase
- Go to the [Discord Developer Portal](https://discord.com/developers/applications)
- Click **"New Application"** and give your bot a name and accept the Discord policy rules.
- Go to the **"Bot"** page and enable all options in the **Privileged Gateway Intents** section. ![](https://raw.githubusercontent.com/Maseshi/Shioru/main/assets/images/discord-developer-portal-privileged-gateway-intents.png)
- เชิญบอทของคุณไปที่เซิร์ฟเวอร์โดยไปที่หน้า **OAuth2 > URL Generator** เลือก `bot` และ `applications.commands` เลือก `Administrator` จากนั้นคัดลอกลิงก์และวางในแถบที่อยู่ของเบราว์เซอร์ของคุณ ![](https://raw.githubusercontent.com/Maseshi/Shioru/main/assets/images/discord-developer-portal-scopes.png)

### 4. ตั้งค่าฐานข้อมูล

- Go to https://firebase.google.com/ and start setting up the project.
- Add a new project and go through the steps.
- Add your first application with **Website**, name your app without the need to select **"Also set up Firebase Hosting for this app."** and register the app. ![](https://raw.githubusercontent.com/Maseshi/Shioru/main/assets/images/firebase-setup-web-application.png)
- Firebase will provide you with information about the configuration. Apply these values to the `.env.example` file.
- Firebase จะให้ข้อมูลเกี่ยวกับการกำหนดค่าแก่คุณ นำค่าเหล่านี้ไปใช้กับไฟล์ `.env`
- Go to **Build > [Realtime Database](https://console.firebase.google.com/u/0/project/_/database/data)** to create a database for storing data.

### Development
## 🪛 การพัฒนา

- Rename the `.env.example` file to `.env` and add all values.
- ไปที่เทอร์มินัลแล้วรันคำสั่ง `npm run dev` สำหรับการพัฒนาและ `npm start` สำหรับการใช้งานจริง > **หมายเหตุ**: เมื่อคุณเข้าสู่โหมดการพัฒนา คุณลักษณะบางอย่างอาจถูกปิดใช้งาน เช่น การส่งสถิติ การอัปเดตข้อมูล เป็นต้น
- เปิดเทอร์มินัลแล้วรัน `npm run emulators` เพื่อจำลองระบบฐานข้อมูลใน**โหมดพัฒนา**
- เปิดเทอร์มินัลหน้าใหม่แล้วรันคำสั่ง `npm run dev` > **💡 หมายเหตุ:** เมื่อคุณเข้าสู่โหมดการพัฒนา คุณลักษณะบางอย่างอาจถูกปิดใช้งาน เช่น การส่งสถิติ การอัปเดตข้อมูล เป็นต้น

## Quick Troubleshooting
## ☕ จำลอง

- หากคุณพบปัญหาระหว่างการติดตั้งคอมโพเนนต์ซึ่งบนเทอร์มินัลระบุว่า `gyp ERR! stack Error: not found: make` ปัญหานี้อาจเกิดจาก **Build tools** ติดตั้งไม่ถูกต้องหรืออาจยังไม่ได้ติดตั้ง วิธีแก้ไขคือดาวน์โหลดเวอร์ชันล่าสุดของ [Node.js](https://nodejs.org/) และทำเครื่องหมายที่ส่วนนี้ภายในขั้นตอนการติดตั้ง
ทดสอบการใช้งานจริงด้วยการทำงานที่คล้ายกับการใช้งานจริง โดยระบบจะคำนวณการแยกเศษของการทำงานตามจำนวนของกิลด์โดยอัตโนมัติ

![](https://raw.githubusercontent.com/Maseshi/Shioru/main/assets/images/node-js-tools-for-native-modules.png)
- เปิดเทอร์มินัลแล้วรัน `npm run emulators` เพื่อจำลองระบบฐานข้อมูลใน**โหมดจำลอง**
- เปิดเทอร์มินัลหน้าใหม่แล้วรันคำสั่ง `npm run serve` > **💡 หมายเหตุ:** คุณจะเข้าสู่โหมดการพัฒนาโดยอัตโนมัติเนื่องจากเป็นการจำลองการใช้งานจริง ทำให้คุณสมบัติบางอย่างอาจไม่ทำงาน

- If you can't install the **sodium** dependency, install **libsodium-wrappers** instead.
```bat
npm uninstall sodium
npm install libsodium-wrappers@latest --save
```
- If you can't play music or music playback commands are not working, install [FFmpeg](https://ffmpeg.org/download.html) **(recommended)** or install the **ffmpeg-static** package.
```bat
npm install ffmpeg-static@latest --save
```
## 🍵 ใช้งานจริง

## Improve Translate
สำหรับการใช้งานจริงสามารถใช้คำสั่งหรือชุดคำสั่งที่เตรียมไว้ได้ตามปกติ ดังนี้:

You can help us translate existing languages or languages that are not currently available on [Crowdin](https://crowdin.com/project/shioru).
- บน Linux หรือ MacOS

```sh
# with command file (recommend)

sh start.sh || sudo sh start.sh

# or with call command

npm start
```

- บน Windows

```bat
@REM with command file (recommend)

./start.bat

@REM or with call command

npm start
```

## Credits
### 🐳 ทำงานบน Docker

Thank you to all the original creators for allowing us to use these wonderful works of yours.
การดำเนินการนี้จำเป็นต้องมี [Docker](https://www.docker.com/products/docker-desktop/)

Personal drawing by: [夏月 まりな (NATSUKI MARINA)](https://www.pixiv.net/en/users/482462)/[お着替え中](https://www.pixiv.net/en/artworks/76075098)
- ใช้คำสั่ง `npm run docker:build` แล้วรอให้ทำงานเสร็จทั้งหมด
- จากนั้นเปิดโปรแกรม Docker แล้วสั่งรันพร้อมกับใส่ข้อมูลสภาพแวดล้อมที่จำเป็น (env) หรือใช้คำสั่ง `npm run docker:run` แล้วรอจนบอททำงาน > **💡 หมายเหตุ:** คุณสามารถตรวจสอบการทำงานได้โดยใช้คำสั่ง `docker ps -a`

## แก้ไขปัญหาอย่างรวดเร็ว

### `gyp ERR! stack Error: not found: make`

ปัญหานี้อาจเกิดจาก **Build Tools** ติดตั้งไม่ถูกต้องหรืออาจยังไม่ได้ติดตั้ง วิธีแก้ไขปัญหานี้ให้ดูที่ส่วน[การติดตั้ง Build Tools](#1-ติดตั้ง-build-tools)

### `@firebase/firestore: Firestore (10.6.0): GrpcConnection RPC 'Write' stream 0x58a118ce error. Code: 14 Message: 14 UNAVAILABLE: No connection established. Last error: connect ECONNREFUSED 127.0.0.1:8080`

เป็นไปได้ว่าคุณยังไม่ได้จำลองระบบฐานข้อมูลบนเครื่องในโหมดทดสอบ โดยคุณสามารถแก้ปัญหานี้ได้โดยปิดบอทแล้วรันคำสั่งดังนี้ในอีกหน้าหนึ่ง

```bat
npm run emulators
```

## ปรับปรุงการแปลภาษา

You can help us translate existing languages or languages that are not currently available on [Crowdin](https://crowdin.com/project/shioru).

## Found a problem

If you encounter any problems from your current job You can let us know through the tab. [issue](https://github.com/Maseshi/Shioru/issues) of this repository.
หากคุณพบปัญหาใดๆ จากการทำงานปัจจุบันของคุณ คุณสามารถแจ้งให้เราทราบได้ผ่านแท็บ [issues](https://github.com/Maseshi/Shioru/issues) ของพื้นที่เก็บนี้ได้
Loading
Loading