Skip to content

Commit

Permalink
Merge pull request #116 from SCAICT/development
Browse files Browse the repository at this point in the history
README i18n
  • Loading branch information
iach526526 authored Aug 26, 2024
2 parents 08e0f8b + 548dbf0 commit 058a20b
Show file tree
Hide file tree
Showing 3 changed files with 247 additions and 27 deletions.
110 changes: 83 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,51 +5,106 @@
<img src="uwu.png" width="200px" alt="中電喵 SCAICT uwu">

# 中電喵 SCAICT uwu
[![同步代辦事項至 Notion](https://github.com/SCAICT/SCAICT-uwu/actions/workflows/notion.yml/badge.svg?event=issues)](https://github.com/SCAICT/SCAICT-uwu/actions/workflows/notion.yml)
[![website](https://img.shields.io/website?label=website&&url=https%3A%2F%2Fscaict.org%2F)](https://scaict.org/)
[![SCAICT store](https://img.shields.io/website?label=SCAICT-store&&url=https%3A%2F%2Fstore.scaict.org%2F)](https://store.scaict.org/)
[![document](https://img.shields.io/website?label=Document&&url=https%3A%2F%2Fstore.scaict.org%2F)](https://g.scaict.org/doc/)
[![Join Discord](https://img.shields.io/discord/959823904266944562?label=Discord&logo=discord&)](https://dc.scaict.org)
[![follow Instagram](https://img.shields.io/badge/follow-%40scaict.tw-pink?&logo=instagram)](https://www.instagram.com/scaict.tw/)

</div>

住在中電會 Discord 伺服器的貓咪

[![同步代辦事項至 Notion](https://github.com/SCAICT/SCAICT-uwu/actions/workflows/notion.yml/badge.svg?event=issues)](https://github.com/SCAICT/SCAICT-uwu/actions/workflows/notion.yml)
[![官方網站](https://img.shields.io/website?label=官方網站&&url=https%3A%2F%2Fscaict.org%2F)](https://scaict.org/)
[![中電商店](https://img.shields.io/website?label=中電商店&&url=https%3A%2F%2Fstore.scaict.org%2F)](https://store.scaict.org/)
[![加入 Discord 伺服器](https://img.shields.io/discord/959823904266944562?label=Discord&logo=discord&)](https://dc.scaict.org)
[![追蹤 Instagram](https://img.shields.io/badge/follow-%40scaict.tw-pink?&logo=instagram)](https://www.instagram.com/scaict.tw/)
# SCAICT-uwu
SCAICT-uwu is a playful and interactive Discord bot that resides in the SCAICT Discord community. Designed to bring fun and utility to its users, SCAICT-uwu loves to sing, dance, code, and do math, making it an engaging companion for the community members.

## Overview

SCAICT-uwu offers a range of interactive features, from daily activities to coding challenges. Whether you want to play games, solve puzzles, or simply chat, SCAICT-uwu is always ready to respond to your commands.

### About SCAICT
SCAICT, the Student Club Information Association of Central Taiwan, is an electronic engineering club composed of schools from central Taiwan. By combining the resources of the Central District, we actively organize educational events, activities, and competitions related to information technology, with the goal of facilitating the flow of technology and knowledge.

## Features

### Slash Commands

Interact with SCAICT-uwu using slash commands in any channel where the bot is active. These commands are intuitive and designed to provide instant feedback or initiate specific bot actions.

<div style="align:center">

![charge demo](https://raw.githubusercontent.com/SCAICT/doc/main/static/img/charge-demo.gif)

</div>

> 這個專案目前處於開發階段,並且可能會有一些問題。如果您發現了任何問題或有任何建議,請透過提交 issue 來通知我們。
### Dedicated Channels

## 如何部署?
Some interactions with SCAICT-uwu occur within dedicated channels, allowing for more focused activities such as guessing colors or counting.
![color guess](https://raw.githubusercontent.com/SCAICT/doc/main/static/img/color-demo.gif)
### Store
#### Buy somthing
You can buy some products like our stickers or USB drives using Electric Points. Note that the products currently can only be exchanged during in-person events. We will soon offer shipping options and more virtual rewards for redemption.

1. clone 此儲存庫。
2. 在 Python 3.11 中建立環境。
3. 安裝必要的函式庫。
<div align="center">

![store demo](https://raw.githubusercontent.com/SCAICT/doc/main/static/img/store-demo.png)

</div>

#### Play slot
Get some tickets, and you can play the slot machine to earn Electric Points. Just long press to start the slot.
<div align="center">

![solt demo](https://raw.githubusercontent.com/SCAICT/doc/main/static/img/slot-demo.gif)

</div>

## Getting Started
1. **Join the Server**
Start by joining the SCAICT Discord community using this [link](https://dc.scaict.org).

2. **Earn Your First Electric Points**
Visit the `#daily-charge` channel and use the `/charge` command to receive your first set of Electric Points, the primary currency used within the bot's ecosystem.

3. **Enjoy in Services**
Explore the various commands and interactions SCAICT-uwu offers, and enjoy the space within the server, engaging and connecting with everyone.

## Usage Examples

> For more detailed documentation, please refer to [this link](https://g.scaict.org/doc/docs/SCAICT-uwu/intro).
## How to Deploy?

1. Clone this repository.
2. Create an environment in Python 3.11.
3. Install the required libraries.

```bash
pip install -r requirements.txt
```

4. `DataBase/server.config.json` 中設定頻道。
5. 啟動 SQL 伺服器。
6. 在 Breadcrumbs SCAICT-uwu 的 `cog/core/sql_acc.py` 中設定 SQL 伺服器。
7. 執行 Flask
4. Configure the channels in `DataBase/server.config.json`.
5. Start the SQL server.
6. Configure the SQL server in `cog/core/sql_acc.py` within Breadcrumbs SCAICT-uwu.
7. Run Flask.

```bash
flask run
```

8. 執行 `main.py`
8. Execute `main.py`.

```bash
python main.py
```

## 檔案
### Files

* `main.py`中電喵
* `app.py`中電商店
* `generate_secrets.py`:為 `app.py` 產生密鑰,執行後儲存在 `token.json` 中。
* 資料庫 MySQL:使用外部伺服器,相關設定在 `cog/core/secret.py` 中。
* `token.json`
* `main.py`: 中電喵.
* `app.py`: 中電商店.
* `generate_secrets.py`: Generates keys for `app.py`. After execution, the keys are stored in `token.json`.
* Database MySQL: Uses an external server. Configuration is in `cog/core/secret.py`.
* `token.json`:

```json
{
Expand All @@ -65,18 +120,19 @@
}
```

* `DataBase/slot.json`
* `DataBase/slot.json`:

設定老虎機的中獎機率。
Configures the jackpot probabilities for the slot machine.

```json
{
"element": [ percentage, reward ]
}
```
> For more detailed documentation, please refer to [this link](https://g.scaict.org/doc/docs/category/%E9%96%8B%E7%99%BC%E8%80%85%E5%B0%88%E5%8D%80)

> 更詳細的說明文件敘述可以參考[這裡](https://g.scaict.org/doc/)

## 鳴謝
## Acknowledgements

中電喵是由中電會和[貢獻者們](https://github.com/SCAICT/SCAICT-uwu/graphs/contributors)共同開發和維護的專案。角色設計由[毛哥 EM](https://elvismao.com/) [瑞樹](https://www.facebook.com/ruishuowo)創作,而部分圖示則選用了來自 [Freepik - Flaticon](https://www.flaticon.com/free-icons/slot-machine) 的設計素材。
SCAICT-uww is a project jointly developed and maintained by SCAICT and [contributors](https://github.com/SCAICT/SCAICT-uwu/graphs/contributors). The character design was created by [毛哥 EM](https://elvismao.com/) and [瑞樹](https://www.facebook.com/ruishuowo), while some icons were sourced from [Freepik - Flaticon](https://www.flaticon.com/free-icons/slot-machine).
82 changes: 82 additions & 0 deletions README_zh-Hant.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<!-- markdownlint-disable first-line-h1 -->
<!-- markdownlint-disable html -->

<div align="center">
<img src="uwu.png" width="200px" alt="中電喵 SCAICT uwu">

# 中電喵 SCAICT uwu

住在中電會 Discord 伺服器的貓咪

[![同步代辦事項至 Notion](https://github.com/SCAICT/SCAICT-uwu/actions/workflows/notion.yml/badge.svg?event=issues)](https://github.com/SCAICT/SCAICT-uwu/actions/workflows/notion.yml)
[![官方網站](https://img.shields.io/website?label=官方網站&&url=https%3A%2F%2Fscaict.org%2F)](https://scaict.org/)
[![中電商店](https://img.shields.io/website?label=中電商店&&url=https%3A%2F%2Fstore.scaict.org%2F)](https://store.scaict.org/)
[![加入 Discord 伺服器](https://img.shields.io/discord/959823904266944562?label=Discord&logo=discord&)](https://dc.scaict.org)
[![追蹤 Instagram](https://img.shields.io/badge/follow-%40scaict.tw-pink?&logo=instagram)](https://www.instagram.com/scaict.tw/)

</div>

> 這個專案目前處於開發階段,並且可能會有一些問題。如果您發現了任何問題或有任何建議,請透過提交 issue 來通知我們。
## 如何部署?

1. clone 此儲存庫。
2. 在 Python 3.11 中建立環境。
3. 安裝必要的函式庫。

```bash
pip install -r requirements.txt
```

4.`DataBase/server.config.json` 中設定頻道。
5. 啟動 SQL 伺服器。
6. 在 Breadcrumbs SCAICT-uwu 的 `cog/core/sql_acc.py` 中設定 SQL 伺服器。
7. 執行 Flask。

```bash
flask run
```

8. 執行 `main.py`

```bash
python main.py
```

## 檔案

* `main.py`:中電喵。
* `app.py`:中電商店。
* `generate_secrets.py`:為 `app.py` 產生密鑰,執行後儲存在 `token.json` 中。
* 資料庫 MySQL:使用外部伺服器,相關設定在 `cog/core/secret.py` 中。
* `token.json`

```json
{
"discord_token": "",
"secret_key": "",
"discord_client_id": "",
"discord_client_secret": "",
"discord_redirect_uri": "http://127.0.0.1:5000/callback",
"github_client_id": "",
"github_client_secret": "",
"github_redirect_uri": "http://127.0.0.1:5000/github/callback",
"github_discord_redirect_uri": "http://127.0.0.1:5000/github/discord-callback"
}
```

* `DataBase/slot.json`

設定老虎機的中獎機率。

```json
{
"element": [ percentage, reward ]
}
```

> 更詳細的說明文件敘述可以參考[這裡](https://g.scaict.org/doc/)
## 鳴謝

中電喵是由中電會和[貢獻者們](https://github.com/SCAICT/SCAICT-uwu/graphs/contributors)共同開發和維護的專案。角色設計由[毛哥 EM](https://elvismao.com/)[瑞樹](https://www.facebook.com/ruishuowo)創作,而部分圖示則選用了來自 [Freepik - Flaticon](https://www.flaticon.com/free-icons/slot-machine) 的設計素材。
82 changes: 82 additions & 0 deletions READMEtemp
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<!-- markdownlint-disable first-line-h1 -->
<!-- markdownlint-disable html -->

<div align="center">
<img src="uwu.png" width="200px" alt="中電喵 SCAICT uwu">

# 中電喵 SCAICT uwu

住在中電會 Discord 伺服器的貓咪

[![同步代辦事項至 Notion](https://github.com/SCAICT/SCAICT-uwu/actions/workflows/notion.yml/badge.svg?event=issues)](https://github.com/SCAICT/SCAICT-uwu/actions/workflows/notion.yml)
[![官方網站](https://img.shields.io/website?label=官方網站&&url=https%3A%2F%2Fscaict.org%2F)](https://scaict.org/)
[![中電商店](https://img.shields.io/website?label=中電商店&&url=https%3A%2F%2Fstore.scaict.org%2F)](https://store.scaict.org/)
[![加入 Discord 伺服器](https://img.shields.io/discord/959823904266944562?label=Discord&logo=discord&)](https://dc.scaict.org)
[![追蹤 Instagram](https://img.shields.io/badge/follow-%40scaict.tw-pink?&logo=instagram)](https://www.instagram.com/scaict.tw/)

</div>

> 這個專案目前處於開發階段,並且可能會有一些問題。如果您發現了任何問題或有任何建議,請透過提交 issue 來通知我們。

## 如何部署?

1. clone 此儲存庫。
2. 在 Python 3.11 中建立環境。
3. 安裝必要的函式庫。

```bash
pip install -r requirements.txt
```

4. 在 `DataBase/server.config.json` 中設定頻道。
5. 啟動 SQL 伺服器。
6. 在 Breadcrumbs SCAICT-uwu 的 `cog/core/sql_acc.py` 中設定 SQL 伺服器。
7. 執行 Flask。

```bash
flask run
```

8. 執行 `main.py`。

```bash
python main.py
```

## 檔案

* `main.py`:中電喵。
* `app.py`:中電商店。
* `generate_secrets.py`:為 `app.py` 產生密鑰,執行後儲存在 `token.json` 中。
* 資料庫 MySQL:使用外部伺服器,相關設定在 `cog/core/secret.py` 中。
* `token.json`:

```json
{
"discord_token": "",
"secret_key": "",
"discord_client_id": "",
"discord_client_secret": "",
"discord_redirect_uri": "http://127.0.0.1:5000/callback",
"github_client_id": "",
"github_client_secret": "",
"github_redirect_uri": "http://127.0.0.1:5000/github/callback",
"github_discord_redirect_uri": "http://127.0.0.1:5000/github/discord-callback"
}
```

* `DataBase/slot.json`:

設定老虎機的中獎機率。

```json
{
"element": [ percentage, reward ]
}
```

> 更詳細的說明文件敘述可以參考[這裡](https://g.scaict.org/doc/)

## 鳴謝

中電喵是由中電會和[貢獻者們](https://github.com/SCAICT/SCAICT-uwu/graphs/contributors)共同開發和維護的專案。角色設計由[毛哥 EM](https://elvismao.com/) 和[瑞樹](https://www.facebook.com/ruishuowo)創作,而部分圖示則選用了來自 [Freepik - Flaticon](https://www.flaticon.com/free-icons/slot-machine) 的設計素材。

0 comments on commit 058a20b

Please sign in to comment.