Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# TS3AudioBot

This is a open-source TeamSpeak3 bot, playing music and much more.
English · [简体中文](README.zh-CN.md) · [繁體中文](README.zh-TW.md)

This is an open-source TeamSpeak3 bot, playing music and much more.

- **Got questions?** Check out our [Wiki](https://github.com/Splamy/TS3AudioBot/wiki), [FAQ](https://github.com/Splamy/TS3AudioBot/wiki/FAQ), or ask on our [![Join Gitter Chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/TS3AudioBot/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link)
- **Something's broken or it's complicated?** [Open an issue](https://github.com/Splamy/TS3AudioBot/issues/new/choose)
Expand Down
160 changes: 160 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
# TS3AudioBot

[English](README.md) · 简体中文 · [繁體中文](README.zh-TW.md)

这是一个开源的 TeamSpeak3 机器人,可以播放音乐以及更多功能。

- **有问题?** 查看我们的 [Wiki](https://github.com/Splamy/TS3AudioBot/wiki)、[FAQ](https://github.com/Splamy/TS3AudioBot/wiki/FAQ),或在 [![加入 Gitter 聊天](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/TS3AudioBot/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link) 上提问
- **遇到故障或复杂问题?** [提交 Issue](https://github.com/Splamy/TS3AudioBot/issues/new/choose)
- 请使用并填写我们提供的模板,除非模板不适用于你的情况或有充分理由不这样做。
这有助于我们更快地处理技术问题
- 请尽量用英文提交 Issue,这样便于大家参与,也便于相关联的 Issue 能被正确引用。
- **想支持此项目?**
- 你可以参与讨论并提出功能建议。不过我们的[待办列表](https://github.com/Splamy/TS3AudioBot/projects/2)很长,功能请求可能需要一些时间
- 你可以贡献代码。我们对此非常感激,请在**开始之前**提交 Issue 或联系维护者进行讨论。
- 你可以通过 [![Patreon][patreon-badge]][patreon-link] 或 [![Paypal][paypal-badge]][paypal-link] 支持我

[patreon-badge]: https://img.shields.io/badge/Patreon-Donate!-F96854.svg?logo=patreon&style=flat-square
[patreon-link]: https://patreon.com/Splamy

[paypal-badge]: https://img.shields.io/badge/Paypal-Donate!-00457C.svg?logo=paypal&style=flat-square
[paypal-link]: https://paypal.me/Splamy

## 特性

* 播放 YouTube 和 SoundCloud 歌曲,以及流式播放 Twitch(可通过插件扩展)
* 歌曲历史记录
* 多种语音订阅模式,包括:关注客户端、频道和耳语组
* 面向所有用户的播放列表管理
* 强大的权限配置
* 插件支持
* Web API
* 多实例
* 本地化
* 凭借自研无头 TS3 客户端,CPU 和内存占用低

想了解计划中的和正在进行的功能,请查看我们的[路线图](https://github.com/Splamy/TS3AudioBot/projects/2)。

## 机器人命令

机器人完全可通过聊天进行操作。
开始使用,请向机器人发送 `!help`。
如需查看所有命令,请查阅我们的在线 [OpenApiV3 生成器](http://tab.splamy.de/openapi/index.html)。
深入的命令教程请参见[此处的 Wiki](https://github.com/Splamy/TS3AudioBot/wiki/CommandSystem)。

## 安装

### 下载

根据你的平台和偏好选择并下载构建版本:

| | 稳定版 | 实验版 |
| -- | -- | -- |
| | 版本通常被认为是稳定的,但重大功能更新不会很快。 | 始终拥有最新最好的功能,但可能不完全稳定或存在有问题的功能。 |
| Windows_x64 | [![下载](https://img.shields.io/badge/Download-master-green.svg)](https://splamy.de/api/nightly/ts3ab/master_win_x64/download) | [![下载](https://img.shields.io/badge/Download-develop-green.svg)](https://splamy.de/api/nightly/ts3ab/develop_win_x64/download) |
| Linux_x64 | [![下载](https://img.shields.io/badge/Download-master-green.svg)](https://splamy.de/api/nightly/ts3ab/master_linux_x64/download) | [![下载](https://img.shields.io/badge/Download-develop-green.svg)](https://splamy.de/api/nightly/ts3ab/develop_linux_x64/download) |
| Docker | [![Docker](https://img.shields.io/badge/Docker-0.11.0-0db7ed.svg)](https://github.com/getdrunkonmovies-com/TS3AudioBot_docker)(注意:此构建版本由社区维护。它包含了所有依赖项以及预配置的 youtube-dl) | - |

(我们还有更多构建版本,如 linux arm/arm64 和依赖 .NET framework 的版本,可在我们的 [nightly 服务器](https://splamy.de/Nightly#ts3ab) 上获取)

#### Linux

安装所需的依赖:

* **Ubuntu**/**Debian**:
运行 `sudo apt-get install libopus-dev ffmpeg`
* **Arch Linux**:
运行 `sudo pacman -S opus ffmpeg`
* **CentOS 7**:
运行
```
sudo yum -y install epel-release
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
sudo yum -y install ffmpeg opus-devel
```
* **手动安装**:
1. 确保已安装 C 编译器
2. 赋予 Opus 脚本可执行权限:`chmod u+x InstallOpus.sh`,然后运行 `./InstallOpus.sh`
3. 获取 ffmpeg [32位](https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-i686-static.tar.xz) 或 [64位](https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz) 二进制文件
4. 解压 ffmpeg 压缩包:`tar -vxf ffmpeg-git-*XXbit*-static.tar.xz`
5. 从 `ffmpeg-git-*DATE*-amd64-static/ffmpeg` 获取 ffmpeg 二进制文件,并复制到你的 TS3AudioBot 文件夹中

#### Windows

1. 获取 ffmpeg [32位](https://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-latest-win32-static.zip) 或 [64位](https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-latest-win64-static.zip) 二进制文件
2. 打开压缩包,将 `ffmpeg-latest-winXX-static/bin/ffmpeg.exe` 中的 ffmpeg 二进制文件复制到你的 TS3AudioBot 文件夹中

### 可选依赖

如果机器人无法播放某些 YouTube 视频,可能是因为嵌入限制导致的。
你可以安装 [youtube-dl](https://github.com/rg3/youtube-dl/) 的二进制文件或源代码文件夹(并在配置中指定路径),以尝试绕过此限制。

### 首次设置

1. 运行机器人:`./TS3AudioBot`(Linux)或 `TS3AudioBot.exe`(Windows),然后按照设置说明操作。
2. (可选)关闭机器人,根据需要配置 `rights.toml` 文件。
你可以使用自动生成文件中建议的模板规则,
或深入了解[这里的权限语法](https://github.com/Splamy/TS3AudioBot/wiki/Rights)。
然后重新启动机器人。
3. (可选,但强烈建议以确保一切正常运行)。
- 为 ServerAdmin 组(或具有等效权限的组)创建一个权限密钥。
- 向机器人发送私信 `!bot setup <权限密钥>`。
4. 恭喜,你已经完成了!尽情享受你最喜爱的音乐,体验这个强大的命令系统,或者随心所欲地探索吧 ;)。
更多信息请查阅 [CommandSystem](https://github.com/Splamy/TS3AudioBot/wiki/CommandSystem)。

## 手动构建

| master | develop |
|:--:|:--:|
| [![构建状态](https://ci.appveyor.com/api/projects/status/i7nrhqkbntdhwpxp/branch/master?svg=true)](https://ci.appveyor.com/project/Splamy/ts3audiobot/branch/master) | [![构建状态](https://ci.appveyor.com/api/projects/status/i7nrhqkbntdhwpxp/branch/develop?svg=true)](https://ci.appveyor.com/project/Splamy/ts3audiobot/branch/develop) |

### 下载源码

使用 `git clone --recurse-submodules https://github.com/Splamy/TS3AudioBot.git` 克隆代码仓库。

#### Linux

1. 按照[此教程](https://docs.microsoft.com/dotnet/core/install/linux-package-managers)获取最新的 `dotnet core 3.1` 版本,并选择你的平台
2. 进入仓库目录:`cd TS3AudioBot`
3. 运行 `dotnet build --framework netcoreapp3.1 --configuration Release TS3AudioBot` 构建 AudioBot
4. 生成的二进制文件位于 `./TS3AudioBot/bin/Release/netcoreapp3.1`,可以通过 `dotnet TS3AudioBot.dll` 运行

#### Windows

1. 确保已安装包含 `dotnet core 3.1` 开发工具链的 `Visual Studio`
2. 使用 Visual Studio 构建 AudioBot

### 构建 Web 界面

1. 打开终端,进入 `./WebInterface` 文件夹
2. 运行 `npm install` 恢复或更新此项目的所有依赖
3. 运行 `npm run build` 构建项目。
构建后的项目位于 `./WebInterface/dist`。
请确保在 ts3audiobot.toml 中将 webinterface 路径设置为此文件夹。
4. 你也可以使用 `npm run start` 进行开发。
这将使用 webpack 开发服务器并支持热重载,而非使用 ts3ab 自带的服务器。

## 社区

### 本地化

:speech_balloon: *想要帮助翻译或改进翻译?*
加入我们的 [Transifex](https://www.transifex.com/respeak/ts3audiobot/) 帮助翻译,
或加入我们的 [Gitter](https://gitter.im/TS3AudioBot/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link) 讨论或提问!
所有帮助都值得感谢 :heart:

翻译需要经过人工审核,然后将自动构建并部署到[我们的 nightly 服务器](https://splamy.de/TS3AudioBot)。

## 许可证

本项目采用 [OSL-3.0](https://opensource.org/licenses/OSL-3.0) 许可。

为什么选择 OSL-3.0:

- OSL 允许你在链接到我们的库时无需公开自己的项目,这对于你想将 TSLib 作为库使用的情况可能很有用。
- 如果你创建插件,不必像 GPL 那样公开它们。(不过我们仍然希望你能分享它们 :)
- 通过 OSL,我们希望允许你将 TS3AB 作为服务提供(甚至是商业服务)。我们不希望本软件被出售,而是希望服务被提供。我们希望这款软件对所有人都是免费的。
- TL; DR? https://tldrlegal.com/license/open-software-licence-3.0

---
[![forthebadge](http://forthebadge.com/images/badges/60-percent-of-the-time-works-every-time.svg)](http://forthebadge.com) [![forthebadge](http://forthebadge.com/images/badges/built-by-developers.svg)](http://forthebadge.com) [![forthebadge](http://forthebadge.com/images/badges/built-with-love.svg)](http://forthebadge.com) [![forthebadge](http://forthebadge.com/images/badges/contains-cat-gifs.svg)](http://forthebadge.com) [![forthebadge](http://forthebadge.com/images/badges/made-with-c-sharp.svg)](http://forthebadge.com)
160 changes: 160 additions & 0 deletions README.zh-TW.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
# TS3AudioBot

[English](README.md) · [简体中文](README.zh-CN.md) · 繁體中文

這是一個開源的 TeamSpeak3 機器人,可以播放音樂以及更多功能。

- **有問題?** 查看我們的 [Wiki](https://github.com/Splamy/TS3AudioBot/wiki)、[FAQ](https://github.com/Splamy/TS3AudioBot/wiki/FAQ),或在 [![加入 Gitter 聊天](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/TS3AudioBot/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link) 上發問
- **遇到故障或複雜問題?** [提交 Issue](https://github.com/Splamy/TS3AudioBot/issues/new/choose)
- 請使用並填寫我們提供的範本,除非範本不適用於你的情況或有充分理由不這麼做。
這有助於我們更快地處理技術問題
- 請盡量用英文提交 Issue,這樣便於大家參與,也便於相關聯的 Issue 能被正確引用。
- **想支援此專案?**
- 你可以參與討論並提出功能建議。不過我們的[待辦清單](https://github.com/Splamy/TS3AudioBot/projects/2)很長,功能請求可能需要一些時間
- 你可以貢獻程式碼。我們對此非常感激,請在**開始之前**提交 Issue 或聯絡維護者進行討論。
- 你可以透過 [![Patreon][patreon-badge]][patreon-link] 或 [![Paypal][paypal-badge]][paypal-link] 支援我

[patreon-badge]: https://img.shields.io/badge/Patreon-Donate!-F96854.svg?logo=patreon&style=flat-square
[patreon-link]: https://patreon.com/Splamy

[paypal-badge]: https://img.shields.io/badge/Paypal-Donate!-00457C.svg?logo=paypal&style=flat-square
[paypal-link]: https://paypal.me/Splamy

## 特性

* 播放 YouTube 和 SoundCloud 歌曲,以及串流播放 Twitch(可透過外掛程式擴充)
* 歌曲歷史記錄
* 多種語音訂閱模式,包括:關注客戶端、頻道和耳語群組
* 面向所有使用者的播放清單管理
* 強大的權限設定
* 外掛程式支援
* Web API
* 多實例
* 在地化
* 憑藉自研無頭 TS3 用戶端,CPU 和記憶體佔用低

想瞭解計劃中的和正在進行的功能,請查看我們的[路線圖](https://github.com/Splamy/TS3AudioBot/projects/2)。

## 機器人指令

機器人完全可透過聊天進行操作。
開始使用請向機器人傳送 `!help`。
如需查看所有指令,請查閱我們的線上 [OpenApiV3 產生器](http://tab.splamy.de/openapi/index.html)。
深入的指令教學請參見[此處的 Wiki](https://github.com/Splamy/TS3AudioBot/wiki/CommandSystem)。

## 安裝

### 下載

根據你的平臺和偏好選擇並下載建置版本:

| | 穩定版 | 實驗版 |
| -- | -- | -- |
| | 版本通常被認為是穩定的,但重大功能更新不會很快。 | 始終擁有最新最好的功能,但可能不完全穩定或存在有問題的功能。 |
| Windows_x64 | [![下載](https://img.shields.io/badge/Download-master-green.svg)](https://splamy.de/api/nightly/ts3ab/master_win_x64/download) | [![下載](https://img.shields.io/badge/Download-develop-green.svg)](https://splamy.de/api/nightly/ts3ab/develop_win_x64/download) |
| Linux_x64 | [![下載](https://img.shields.io/badge/Download-master-green.svg)](https://splamy.de/api/nightly/ts3ab/master_linux_x64/download) | [![下載](https://img.shields.io/badge/Download-develop-green.svg)](https://splamy.de/api/nightly/ts3ab/develop_linux_x64/download) |
| Docker | [![Docker](https://img.shields.io/badge/Docker-0.11.0-0db7ed.svg)](https://github.com/getdrunkonmovies-com/TS3AudioBot_docker)(注意:此建置版本由社群維護。它包含了所有相依套件以及預先設定好的 youtube-dl) | - |

(我們還有更多建置版本,如 linux arm/arm64 和依賴 .NET framework 的版本,可在我們的 [nightly 伺服器](https://splamy.de/Nightly#ts3ab) 上取得)

#### Linux

安裝所需的相依套件:

* **Ubuntu**/**Debian**:
執行 `sudo apt-get install libopus-dev ffmpeg`
* **Arch Linux**:
執行 `sudo pacman -S opus ffmpeg`
* **CentOS 7**:
執行
```
sudo yum -y install epel-release
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
sudo yum -y install ffmpeg opus-devel
```
* **手動安裝**:
1. 確保已安裝 C 編譯器
2. 賦予 Opus 腳本可執行權限:`chmod u+x InstallOpus.sh`,然後執行 `./InstallOpus.sh`
3. 取得 ffmpeg [32位元](https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-i686-static.tar.xz) 或 [64位元](https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz) 二進位檔案
4. 解壓縮 ffmpeg 壓縮包:`tar -vxf ffmpeg-git-*XXbit*-static.tar.xz`
5. 從 `ffmpeg-git-*DATE*-amd64-static/ffmpeg` 取得 ffmpeg 二進位檔案,並複製到你的 TS3AudioBot 資料夾中

#### Windows

1. 取得 ffmpeg [32位元](https://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-latest-win32-static.zip) 或 [64位元](https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-latest-win64-static.zip) 二進位檔案
2. 開啟壓縮包,將 `ffmpeg-latest-winXX-static/bin/ffmpeg.exe` 中的 ffmpeg 二進位檔案複製到你的 TS3AudioBot 資料夾中

### 選用相依套件

如果機器人無法播放某些 YouTube 影片,可能是因為嵌入限制導致的。
你可以安裝 [youtube-dl](https://github.com/rg3/youtube-dl/) 的二進位檔案或原始碼資料夾(並在設定中指定路徑),以嘗試繞過此限制。

### 首次設定

1. 執行機器人:`./TS3AudioBot`(Linux)或 `TS3AudioBot.exe`(Windows),然後按照設定指示操作。
2. (選用)關閉機器人,根據需要設定 `rights.toml` 檔案。
你可以使用自動生成檔案中建議的範本規則,
或深入瞭解[這裡的權限語法](https://github.com/Splamy/TS3AudioBot/wiki/Rights)。
然後重新啟動機器人。
3. (選用,但強烈建議以確保一切正常執行)。
- 為 ServerAdmin 群組(或具有等效權限的群組)建立一個權限金鑰。
- 向機器人傳送私訊 `!bot setup <權限金鑰>`。
4. 恭喜,你已經完成了!盡情享受你最喜愛的音樂,體驗這個強大的指令系統,或者隨心所欲地探索吧 ;)。
更多資訊請查閱 [CommandSystem](https://github.com/Splamy/TS3AudioBot/wiki/CommandSystem)。

## 手動建置

| master | develop |
|:--:|:--:|
| [![建置狀態](https://ci.appveyor.com/api/projects/status/i7nrhqkbntdhwpxp/branch/master?svg=true)](https://ci.appveyor.com/project/Splamy/ts3audiobot/branch/master) | [![建置狀態](https://ci.appveyor.com/api/projects/status/i7nrhqkbntdhwpxp/branch/develop?svg=true)](https://ci.appveyor.com/project/Splamy/ts3audiobot/branch/develop) |

### 下載原始碼

使用 `git clone --recurse-submodules https://github.com/Splamy/TS3AudioBot.git` 克隆程式碼倉庫。

#### Linux

1. 按照[此教學](https://docs.microsoft.com/dotnet/core/install/linux-package-managers)取得最新的 `dotnet core 3.1` 版本,並選擇你的平臺
2. 進入倉庫目錄:`cd TS3AudioBot`
3. 執行 `dotnet build --framework netcoreapp3.1 --configuration Release TS3AudioBot` 建置 AudioBot
4. 產生的二進位檔案位於 `./TS3AudioBot/bin/Release/netcoreapp3.1`,可以透過 `dotnet TS3AudioBot.dll` 執行

#### Windows

1. 確保已安裝包含 `dotnet core 3.1` 開發工具鏈的 `Visual Studio`
2. 使用 Visual Studio 建置 AudioBot

### 建置 Web 介面

1. 開啟終端機,進入 `./WebInterface` 資料夾
2. 執行 `npm install` 還原或更新此專案的所有相依套件
3. 執行 `npm run build` 建置專案。
建置後的專案位於 `./WebInterface/dist`。
請確保在 ts3audiobot.toml 中將 webinterface 路徑設定為此資料夾。
4. 你也可以使用 `npm run start` 進行開發。
這將使用 webpack 開發伺服器並支援熱重載,而非使用 ts3ab 自帶的伺服器。

## 社群

### 在地化

:speech_balloon: *想要協助翻譯或改善翻譯?*
加入我們的 [Transifex](https://www.transifex.com/respeak/ts3audiobot/) 協助翻譯,
或加入我們的 [Gitter](https://gitter.im/TS3AudioBot/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link) 討論或提問!
所有幫助都值得感謝 :heart:

翻譯需要經過人工審核,然後將自動建置並部署到[我們的 nightly 伺服器](https://splamy.de/TS3AudioBot)。

## 授權條款

本專案採用 [OSL-3.0](https://opensource.org/licenses/OSL-3.0) 授權。

為什麼選擇 OSL-3.0:

- OSL 允許你在連結到我們的函式庫時無需公開自己的專案,這對於你想將 TSLib 作為函式庫使用的情況可能很有用。
- 如果你建立外掛程式,不必像 GPL 那樣公開它們。(不過我們仍然希望你能分享它們 :)
- 透過 OSL,我們希望允許你將 TS3AB 作為服務提供(甚至是商業服務)。我們不希望本軟體被販售,而是希望服務被提供。我们希望這款軟體對所有人都是免費的。
- TL; DR? https://tldrlegal.com/license/open-software-licence-3.0

---
[![forthebadge](http://forthebadge.com/images/badges/60-percent-of-the-time-works-every-time.svg)](http://forthebadge.com) [![forthebadge](http://forthebadge.com/images/badges/built-by-developers.svg)](http://forthebadge.com) [![forthebadge](http://forthebadge.com/images/badges/built-with-love.svg)](http://forthebadge.com) [![forthebadge](http://forthebadge.com/images/badges/contains-cat-gifs.svg)](http://forthebadge.com) [![forthebadge](http://forthebadge.com/images/badges/made-with-c-sharp.svg)](http://forthebadge.com)