docs: adding multilanguage docs

This commit is contained in:
wzp 2024-08-25 00:43:21 +08:00
parent 230b753084
commit 2c858c248f
2 changed files with 196 additions and 2 deletions

View File

@ -1,4 +1,99 @@
# MyBot
## 一个基于Java的OneBot11兼容机器人框架
#### A Java-based OneBot11-compatible robot framework
### 一个基于 Java 的 OneBot11 兼容机器人框架
---
## 快速开始
### 环境要求
1. Java 运行环境JRE版本 ≥ 11
2. 任意 OneBot11 协议框架的实现
### 使用步骤
1. 前往 [Github Release](https://github.com/Wzp-2008/MyBot/releases/latest) 或 [Gitea Release](https://wzpmc.cn:3000/wzp/MyBot/releases/latest) 下载最新版本的 JAR 包。
2. 将下载的 JAR 包放入一个空文件夹中。
3. 启动你的 OneBot 实例。
4. 通过以下命令启动 MyBot 服务端:
```bash
java -jar mybot.jar
```
5. 编辑生成的配置文件,将其中的 WebSocket 地址设置为你的 OneBot WebSocket 地址。
6. 再次运行以下命令启动服务端:
```bash
java -jar mybot.jar
```
7. 现在,你可以开始使用 MyBot 啦!
---
是的,添加相关仓库的指南能够帮助开发者更顺利地集成 MyBot。如果你使用了自定义的 Maven 仓库,可以在开发指南中提供详细的仓库设置说明。我可以帮你添加这部分内容,下面是修改后的开发指南部分:
---
## 开发指南
### 添加仓库
如果你需要从自定义仓库拉取依赖项,请在项目的构建文件中添加以下仓库配置:
#### Maven 仓库设置
`pom.xml` 中添加以下仓库配置:
```xml
<repositories>
<repository>
<id>wzpmc-maven-releases</id>
<url>https://wzpmc.cn:90/repository/maven-releases</url>
</repository>
</repositories>
```
#### Gradle 仓库设置
##### Groovy DSL
```groovy
repositories {
maven {
url "https://wzpmc.cn:90/repository/maven-releases"
}
}
```
##### Kotlin DSL
```kotlin
repositories {
maven {
url = uri("https://wzpmc.cn:90/repository/maven-releases")
}
}
```
### 添加依赖
#### Maven 构建
在你的 `pom.xml` 中添加以下依赖项:
```xml
<dependency>
<groupId>cn.wzpmc</groupId>
<artifactId>my-bot</artifactId>
<version>[LATEST-VERSION]</version>
</dependency>
```
#### Gradle 构建
##### Groovy DSL
```groovy
implementation 'cn.wzpmc:my-bot:[LATEST-VERSION]'
```
##### Kotlin DSL
```kotlin
implementation("cn.wzpmc:my-bot:[LATEST-VERSION]")
```
---
如此设置之后,您将轻松地将 MyBot 集成到您的项目中,并快速构建与 OneBot11 兼容的机器人应用。Enjoy~
---

99
README_EN.md Normal file
View File

@ -0,0 +1,99 @@
# MyBot
### A Java-Based OneBot11-Compatible Bot Framework
---
## Quick Start
### Requirements
1. Java Runtime Environment (JRE) version ≥ 11
2. Implementation of any OneBot11 protocol framework
### Steps to Use
1. Go to [Github Release](https://github.com/Wzp-2008/MyBot/releases/latest) or [Gitea Release](https://wzpmc.cn:3000/wzp/MyBot/releases/latest) to download the latest version of the JAR package.
2. Place the downloaded JAR package in an empty folder.
3. Start your OneBot instance.
4. Start the MyBot server using the following command:
```bash
java -jar mybot.jar
```
5. Edit the generated configuration file and set the WebSocket address to your OneBot WebSocket address.
6. Run the following command again to start the server:
```bash
java -jar mybot.jar
```
7. Now, you can start using MyBot!
---
Yes, adding repository guidelines will help developers better integrate MyBot. If you are using custom Maven repositories, you can provide detailed repository setup instructions in the development guide. I can help you add this section. Here's the modified development guide:
---
## Development Guide
### Add Repositories
If you need to pull dependencies from custom repositories, add the following repository configurations to your project's build file:
#### Maven Repository Setup
In your `pom.xml`, add the following repository configuration:
```xml
<repositories>
<repository>
<id>wzpmc-maven-releases</id>
<url>https://wzpmc.cn:90/repository/maven-releases</url>
</repository>
</repositories>
```
#### Gradle Repository Setup
##### Groovy DSL
```groovy
repositories {
maven {
url "https://wzpmc.cn:90/repository/maven-releases"
}
}
```
##### Kotlin DSL
```kotlin
repositories {
maven {
url = uri("https://wzpmc.cn:90/repository/maven-releases")
}
}
```
### Add Dependencies
#### Maven Build
In your `pom.xml`, add the following dependency:
```xml
<dependency>
<groupId>cn.wzpmc</groupId>
<artifactId>my-bot</artifactId>
<version>[LATEST-VERSION]</version>
</dependency>
```
#### Gradle Build
##### Groovy DSL
```groovy
implementation 'cn.wzpmc:my-bot:[LATEST-VERSION]'
```
##### Kotlin DSL
```kotlin
implementation("cn.wzpmc:my-bot:[LATEST-VERSION]")
```
---
With these settings, you'll be able to seamlessly integrate MyBot into your project and quickly build OneBot11-compatible bot applications. Enjoy!
---