Compare commits

..

No commits in common. "master" and "1.0.1" have entirely different histories.

275 changed files with 1450 additions and 32993 deletions

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ApifoxUploaderProjectSetting">
<option name="apiAccessToken" value="APS-QWelq6AktQqByilNWeWZgKoPT7a4ml1d" />
</component>
</project>

1
.idea/compiler.xml generated
View File

@ -8,7 +8,6 @@
<entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.projectlombok/lombok/1.18.34/ec547ef414ab1d2c040118fb9c1c265ada63af14/lombok-1.18.34.jar" />
</processorPath>
<module name="MyBot.main" />
<module name="MyBot.mybot-api.main" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel target="11" />

View File

@ -1 +1 @@
1.0.7
1.0.2

4
.idea/gradle.xml generated
View File

@ -4,13 +4,11 @@
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="LOCAL" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleHome" value="$USER_HOME$/.sdkman/candidates/gradle/current" />
<option name="gradleHome" value="" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/mybot-api" />
</set>
</option>
</GradleProjectSettings>

View File

@ -21,25 +21,5 @@
<option name="name" value="maven" />
<option name="url" value="https://libraries.minecraft.net" />
</remote-repository>
<remote-repository>
<option name="id" value="maven" />
<option name="name" value="maven" />
<option name="url" value="https://maven.aliyun.com/repository/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven2" />
<option name="name" value="maven2" />
<option name="url" value="https://maven.aliyun.com/repository/central" />
</remote-repository>
<remote-repository>
<option name="id" value="maven3" />
<option name="name" value="maven3" />
<option name="url" value="https://maven.aliyun.com/repository/gradle-plugin" />
</remote-repository>
<remote-repository>
<option name="id" value="MavenLocal" />
<option name="name" value="MavenLocal" />
<option name="url" value="file:/$MAVEN_REPOSITORY$" />
</remote-repository>
</component>
</project>

5
.idea/misc.xml generated
View File

@ -5,10 +5,9 @@
<groovy codeStyle="LEGACY" />
</component>
<component name="EntryPointsManager">
<list size="3">
<list size="2">
<item index="0" class="java.lang.String" itemvalue="cn.wzpmc.api.plugins.event.EventHandler" />
<item index="1" class="java.lang.String" itemvalue="cn.wzpmc.plugins.event.EventHandler" />
<item index="2" class="java.lang.String" itemvalue="com.alibaba.fastjson2.annotation.JSONField" />
<item index="1" class="java.lang.String" itemvalue="com.alibaba.fastjson2.annotation.JSONField" />
</list>
</component>
<component name="ExternalStorageConfigurationManager" enabled="true" />

1
.idea/modules.xml generated
View File

@ -3,7 +3,6 @@
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/modules/MyBot.main.iml" filepath="$PROJECT_DIR$/.idea/modules/MyBot.main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/mybot-api/MyBot.mybot-api.main.iml" filepath="$PROJECT_DIR$/.idea/modules/mybot-api/MyBot.mybot-api.main.iml" />
</modules>
</component>
</project>

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="AdditionalModuleElements">
<content url="file://$MODULE_DIR$/../.." dumb="true">
<excludeFolder url="file://$MODULE_DIR$/../../run" />
</content>
</component>
</module>

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="AdditionalModuleElements">
<content url="file://$MODULE_DIR$/../../../mybot-api/build/generated/sources/annotationProcessor/java/main">
<sourceFolder url="file://$MODULE_DIR$/../../../mybot-api/build/generated/sources/annotationProcessor/java/main" isTestSource="false" generated="true" />
</content>
</component>
</module>

View File

@ -11,7 +11,7 @@
2. 任意 OneBot11 协议框架的实现
### 使用步骤
1. 前往 [GitHub Release](https://github.com/Wzp-2008/MyBot/releases/latest) 或 [Gitea Release](https://wzpmc.cn:3000/wzp/MyBot/releases/latest) 下载最新版本的 JAR 包。
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 服务端:
@ -39,7 +39,7 @@
<repositories>
<repository>
<id>wzpmc-maven-releases</id>
<url>https://wzpmc.cn:90/repository/maven-public</url>
<url>https://wzpmc.cn:90/repository/maven-releases</url>
</repository>
</repositories>
```
@ -50,7 +50,7 @@
```groovy
repositories {
maven {
url "https://wzpmc.cn:90/repository/maven-public"
url "https://wzpmc.cn:90/repository/maven-releases"
}
}
```
@ -59,7 +59,7 @@ repositories {
```kotlin
repositories {
maven {
url = uri("https://wzpmc.cn:90/repository/maven-public")
url = uri("https://wzpmc.cn:90/repository/maven-releases")
}
}
```
@ -71,7 +71,7 @@ repositories {
```xml
<dependency>
<groupId>cn.wzpmc</groupId>
<artifactId>mybot-api</artifactId>
<artifactId>my-bot</artifactId>
<version>[LATEST-VERSION]</version>
</dependency>
```
@ -80,16 +80,16 @@ repositories {
##### Groovy DSL
```groovy
implementation 'cn.wzpmc:mybot-api:[LATEST-VERSION]'
implementation 'cn.wzpmc:my-bot:[LATEST-VERSION]'
```
##### Kotlin DSL
```kotlin
implementation("cn.wzpmc:mybot-api:[LATEST-VERSION]")
implementation("cn.wzpmc:my-bot:[LATEST-VERSION]")
```
---
如此设置之后,您将轻松地将 MyBot-API 集成到您的项目中,并快速构建与 OneBot11 兼容的机器人应用。Enjoy~
如此设置之后,您将轻松地将 MyBot 集成到您的项目中,并快速构建与 OneBot11 兼容的机器人应用。Enjoy~
---

View File

@ -11,7 +11,7 @@
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.
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:
@ -39,7 +39,7 @@ In your `pom.xml`, add the following repository configuration:
<repositories>
<repository>
<id>wzpmc-maven-releases</id>
<url>https://wzpmc.cn:90/repository/maven-public</url>
<url>https://wzpmc.cn:90/repository/maven-releases</url>
</repository>
</repositories>
```
@ -50,7 +50,7 @@ In your `pom.xml`, add the following repository configuration:
```groovy
repositories {
maven {
url "https://wzpmc.cn:90/repository/maven-public"
url "https://wzpmc.cn:90/repository/maven-releases"
}
}
```
@ -59,7 +59,7 @@ repositories {
```kotlin
repositories {
maven {
url = uri("https://wzpmc.cn:90/repository/maven-public")
url = uri("https://wzpmc.cn:90/repository/maven-releases")
}
}
```
@ -71,7 +71,7 @@ In your `pom.xml`, add the following dependency:
```xml
<dependency>
<groupId>cn.wzpmc</groupId>
<artifactId>mybot-api</artifactId>
<artifactId>my-bot</artifactId>
<version>[LATEST-VERSION]</version>
</dependency>
```
@ -80,16 +80,16 @@ In your `pom.xml`, add the following dependency:
##### Groovy DSL
```groovy
implementation 'cn.wzpmc:mybot-api:[LATEST-VERSION]'
implementation 'cn.wzpmc:my-bot:[LATEST-VERSION]'
```
##### Kotlin DSL
```kotlin
implementation("cn.wzpmc:mybot-api:[LATEST-VERSION]")
implementation("cn.wzpmc:my-bot:[LATEST-VERSION]")
```
---
With these settings, you'll be able to seamlessly integrate MyBot-API into your project and quickly build OneBot11-compatible bot applications. Enjoy!
With these settings, you'll be able to seamlessly integrate MyBot into your project and quickly build OneBot11-compatible bot applications. Enjoy!
---

View File

@ -2,59 +2,41 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer
val projectName = rootProject.name
val groupName: String by extra
val projectArtifactId: String by extra
val projectVersion: String by extra
val groupName by extra("cn.wzpmc")
val projectArtifactId by extra("my-bot")
val projectVersion by extra("1.0.1")
plugins {
id("java-library")
id("java")
id("maven-publish")
id("com.github.johnrengelman.shadow") version "8.1.1"
}
allprojects {
apply(plugin = "java-library")
val groupName by extra("cn.wzpmc")
val projectArtifactId by extra("my-bot")
val projectVersion by extra("1.0.7-SNAPSHOT")
repositories {
mavenCentral()
maven("https://libraries.minecraft.net")
}
dependencies {
// https://mvnrepository.com/artifact/org.projectlombok/lombok
compileOnly("org.projectlombok:lombok:1.18.34")
annotationProcessor("org.projectlombok:lombok:1.18.34")
// https://mvnrepository.com/artifact/com.alibaba.fastjson2/fastjson2
api("com.alibaba.fastjson2:fastjson2:2.0.52")
api("com.mojang:brigadier:1.0.18")
// https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-api
api("org.apache.logging.log4j:log4j-api:2.23.1")
testImplementation(platform("org.junit:junit-bom:5.10.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
// https://mvnrepository.com/artifact/org.yaml/snakeyaml
api("org.yaml:snakeyaml:2.2")
}
tasks.compileJava {
options.encoding = "UTF-8"
}
tasks.javadoc {
options.encoding = "UTF-8"
}
}
group = groupName
version = projectVersion
repositories {
mavenCentral()
maven("https://libraries.minecraft.net")
}
dependencies {
implementation(project(":mybot-api"))
implementation("net.minecrell:terminalconsoleappender:1.3.0") {
exclude(group = "org.apache.logging.log4j", module = "log4j-core")
exclude(group = "org.apache.logging.log4j", module = "log4j-api")
}
// https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core
implementation("org.apache.logging.log4j:log4j-core:2.23.1")
// https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-jul
implementation("org.apache.logging.log4j:log4j-jul:2.23.1")
implementation("com.mojang:brigadier:1.0.18")
// https://mvnrepository.com/artifact/io.netty/netty-all
implementation("io.netty:netty-all:4.1.112.Final")
// https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core
implementation("org.apache.logging.log4j:log4j-core:2.23.1")
// https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-api
implementation("org.apache.logging.log4j:log4j-api:2.23.1")
// https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-jul
implementation("org.apache.logging.log4j:log4j-jul:2.23.1")
// https://mvnrepository.com/artifact/com.alibaba.fastjson2/fastjson2
implementation("com.alibaba.fastjson2:fastjson2:2.0.52")
// https://mvnrepository.com/artifact/org.yaml/snakeyaml
implementation("org.yaml:snakeyaml:2.2")
// https://mvnrepository.com/artifact/org.jline/jline
implementation("org.jline:jline-terminal:3.26.3")
implementation("org.jline:jline-reader:3.26.3")
@ -64,6 +46,22 @@ dependencies {
implementation("org.jline:jline-terminal-jansi:3.26.3")
// https://mvnrepository.com/artifact/org.fusesource.jansi/jansi
implementation("org.fusesource.jansi:jansi:2.4.1")
/*// https://mvnrepository.com/artifact/org.jline/jline-terminal-jna
implementation("org.jline:jline-terminal-jna:3.26.3")
// https://mvnrepository.com/artifact/net.java.dev.jna/jna
implementation("net.java.dev.jna:jna:5.14.0")*/
// https://mvnrepository.com/artifact/org.projectlombok/lombok
compileOnly("org.projectlombok:lombok:1.18.34")
annotationProcessor("org.projectlombok:lombok:1.18.34")
testImplementation(platform("org.junit:junit-bom:5.10.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
}
tasks.compileJava {
options.encoding = "UTF-8"
}
tasks.javadoc {
options.encoding = "UTF-8"
}
tasks.register<Jar>("javadocJar") {
archiveClassifier.set("javadoc")
@ -88,6 +86,57 @@ tasks.withType<ShadowJar> {
tasks.named("build") {
dependsOn(tasks.named("shadowJar"))
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
groupId = groupName
artifactId = projectArtifactId
version = projectVersion
artifact(tasks.named("javadocJar"))
artifact(tasks.named("sourcesJar"))
pom {
name.set(projectName)
description.set("A Java-based OneBot11-compatible robot framework")
licenses {
license {
name.set("The MIT License")
url.set("https://opensource.org/licenses/MIT")
}
}
developers {
developer {
id.set("wzp")
name.set("wzp")
email.set("minecraftwzpmc@gmail.com")
}
}
scm {
connection.set("scm:git:https://wzpmc.cn:3000/wzp/MyBot.git")
developerConnection.set("scm:git:https://wzpmc.cn:3000/wzp/MyBot.git")
url.set("https://wzpmc.cn:3000/wzp/MyBot")
}
}
}
}
repositories {
maven {
val releasesRepoUrl = uri("https://wzpmc.cn:90/repository/maven-releases")
val snapshotsRepoUrl = uri("https://wzpmc.cn:90/repository/maven-snapshots")
url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
credentials {
username = project.findProperty("repo.user") as String? ?: ""
password = project.findProperty("repo.password") as String? ?: ""
}
}
}
}
tasks.test {
useJUnitPlatform()
}

2
docs/.gitignore vendored
View File

@ -1,2 +0,0 @@
.idea/
node_modules/

5
docs/.idea/.gitignore generated vendored
View File

@ -1,5 +0,0 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/

12
docs/.idea/docs.iml generated
View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/docs.iml" filepath="$PROJECT_DIR$/.idea/docs.iml" />
</modules>
</component>
</project>

6
docs/.idea/vcs.xml generated
View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>

View File

@ -1 +0,0 @@
cache/

View File

@ -1,269 +0,0 @@
import {
useMediaQuery
} from "./chunk-WVCZVGU2.js";
import {
computed,
ref,
shallowRef,
watch
} from "./chunk-XIDTNVOX.js";
// node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/index.js
import "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/styles/fonts.css";
// node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/without-fonts.js
import "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/styles/vars.css";
import "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/styles/base.css";
import "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/styles/icons.css";
import "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/styles/utils.css";
import "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/styles/components/custom-block.css";
import "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/styles/components/vp-code.css";
import "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/styles/components/vp-code-group.css";
import "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/styles/components/vp-doc.css";
import "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/styles/components/vp-sponsor.css";
import VPBadge from "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/components/VPBadge.vue";
import Layout from "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/Layout.vue";
import { default as default2 } from "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/components/VPBadge.vue";
import { default as default3 } from "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/components/VPImage.vue";
import { default as default4 } from "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/components/VPButton.vue";
import { default as default5 } from "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/components/VPHomeContent.vue";
import { default as default6 } from "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/components/VPHomeHero.vue";
import { default as default7 } from "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/components/VPHomeFeatures.vue";
import { default as default8 } from "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/components/VPHomeSponsors.vue";
import { default as default9 } from "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/components/VPLink.vue";
import { default as default10 } from "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/components/VPDocAsideSponsors.vue";
import { default as default11 } from "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/components/VPSocialLink.vue";
import { default as default12 } from "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/components/VPSocialLinks.vue";
import { default as default13 } from "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/components/VPSponsors.vue";
import { default as default14 } from "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/components/VPTeamPage.vue";
import { default as default15 } from "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/components/VPTeamPageTitle.vue";
import { default as default16 } from "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/components/VPTeamPageSection.vue";
import { default as default17 } from "D:/ProjectsAfter240630/Java/Frameworks/MyBot/docs/node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/components/VPTeamMembers.vue";
// node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/support/utils.js
import { withBase } from "vitepress";
// node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/composables/data.js
import { useData as useData$ } from "vitepress";
var useData = useData$;
// node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/support/utils.js
function ensureStartingSlash(path) {
return /^\//.test(path) ? path : `/${path}`;
}
// node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/support/sidebar.js
function getSidebar(_sidebar, path) {
if (Array.isArray(_sidebar))
return addBase(_sidebar);
if (_sidebar == null)
return [];
path = ensureStartingSlash(path);
const dir = Object.keys(_sidebar).sort((a, b) => {
return b.split("/").length - a.split("/").length;
}).find((dir2) => {
return path.startsWith(ensureStartingSlash(dir2));
});
const sidebar = dir ? _sidebar[dir] : [];
return Array.isArray(sidebar) ? addBase(sidebar) : addBase(sidebar.items, sidebar.base);
}
function getSidebarGroups(sidebar) {
const groups = [];
let lastGroupIndex = 0;
for (const index in sidebar) {
const item = sidebar[index];
if (item.items) {
lastGroupIndex = groups.push(item);
continue;
}
if (!groups[lastGroupIndex]) {
groups.push({ items: [] });
}
groups[lastGroupIndex].items.push(item);
}
return groups;
}
function addBase(items, _base) {
return [...items].map((_item) => {
const item = { ..._item };
const base = item.base || _base;
if (base && item.link)
item.link = base + item.link;
if (item.items)
item.items = addBase(item.items, base);
return item;
});
}
// node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/composables/sidebar.js
function useSidebar() {
const { frontmatter, page, theme: theme2 } = useData();
const is960 = useMediaQuery("(min-width: 960px)");
const isOpen = ref(false);
const _sidebar = computed(() => {
const sidebarConfig = theme2.value.sidebar;
const relativePath = page.value.relativePath;
return sidebarConfig ? getSidebar(sidebarConfig, relativePath) : [];
});
const sidebar = ref(_sidebar.value);
watch(_sidebar, (next, prev) => {
if (JSON.stringify(next) !== JSON.stringify(prev))
sidebar.value = _sidebar.value;
});
const hasSidebar = computed(() => {
return frontmatter.value.sidebar !== false && sidebar.value.length > 0 && frontmatter.value.layout !== "home";
});
const leftAside = computed(() => {
if (hasAside)
return frontmatter.value.aside == null ? theme2.value.aside === "left" : frontmatter.value.aside === "left";
return false;
});
const hasAside = computed(() => {
if (frontmatter.value.layout === "home")
return false;
if (frontmatter.value.aside != null)
return !!frontmatter.value.aside;
return theme2.value.aside !== false;
});
const isSidebarEnabled = computed(() => hasSidebar.value && is960.value);
const sidebarGroups = computed(() => {
return hasSidebar.value ? getSidebarGroups(sidebar.value) : [];
});
function open() {
isOpen.value = true;
}
function close() {
isOpen.value = false;
}
function toggle() {
isOpen.value ? close() : open();
}
return {
isOpen,
sidebar,
sidebarGroups,
hasSidebar,
hasAside,
leftAside,
isSidebarEnabled,
open,
close,
toggle
};
}
// node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/composables/local-nav.js
import { onContentUpdated } from "vitepress";
// node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/composables/outline.js
import { getScrollOffset } from "vitepress";
var resolvedHeaders = [];
function getHeaders(range) {
const headers = [
...document.querySelectorAll(".VPDoc :where(h1,h2,h3,h4,h5,h6)")
].filter((el) => el.id && el.hasChildNodes()).map((el) => {
const level = Number(el.tagName[1]);
return {
element: el,
title: serializeHeader(el),
link: "#" + el.id,
level
};
});
return resolveHeaders(headers, range);
}
function serializeHeader(h) {
let ret = "";
for (const node of h.childNodes) {
if (node.nodeType === 1) {
if (node.classList.contains("VPBadge") || node.classList.contains("header-anchor") || node.classList.contains("ignore-header")) {
continue;
}
ret += node.textContent;
} else if (node.nodeType === 3) {
ret += node.textContent;
}
}
return ret.trim();
}
function resolveHeaders(headers, range) {
if (range === false) {
return [];
}
const levelsRange = (typeof range === "object" && !Array.isArray(range) ? range.level : range) || 2;
const [high, low] = typeof levelsRange === "number" ? [levelsRange, levelsRange] : levelsRange === "deep" ? [2, 6] : levelsRange;
return buildTree(headers, high, low);
}
function buildTree(data, min, max) {
resolvedHeaders.length = 0;
const result = [];
const stack = [];
data.forEach((item) => {
const node = { ...item, children: [] };
let parent = stack[stack.length - 1];
while (parent && parent.level >= node.level) {
stack.pop();
parent = stack[stack.length - 1];
}
if (node.element.classList.contains("ignore-header") || parent && "shouldIgnore" in parent) {
stack.push({ level: node.level, shouldIgnore: true });
return;
}
if (node.level > max || node.level < min)
return;
resolvedHeaders.push({ element: node.element, link: node.link });
if (parent)
parent.children.push(node);
else
result.push(node);
stack.push(node);
});
return result;
}
// node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/composables/local-nav.js
function useLocalNav() {
const { theme: theme2, frontmatter } = useData();
const headers = shallowRef([]);
const hasLocalNav = computed(() => {
return headers.value.length > 0;
});
onContentUpdated(() => {
headers.value = getHeaders(frontmatter.value.outline ?? theme2.value.outline);
});
return {
headers,
hasLocalNav
};
}
// node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/without-fonts.js
var theme = {
Layout,
enhanceApp: ({ app }) => {
app.component("Badge", VPBadge);
}
};
var without_fonts_default = theme;
export {
default2 as VPBadge,
default4 as VPButton,
default10 as VPDocAsideSponsors,
default5 as VPHomeContent,
default7 as VPHomeFeatures,
default6 as VPHomeHero,
default8 as VPHomeSponsors,
default3 as VPImage,
default9 as VPLink,
default11 as VPSocialLink,
default12 as VPSocialLinks,
default13 as VPSponsors,
default17 as VPTeamMembers,
default14 as VPTeamPage,
default16 as VPTeamPageSection,
default15 as VPTeamPageTitle,
without_fonts_default as default,
useLocalNav,
useSidebar
};
//# sourceMappingURL=@theme_index.js.map

File diff suppressed because one or more lines are too long

View File

@ -1,40 +0,0 @@
{
"hash": "30a63267",
"configHash": "2c9c0d33",
"lockfileHash": "de33837a",
"browserHash": "7755b019",
"optimized": {
"vue": {
"src": "../../../node_modules/.pnpm/vue@3.5.11/node_modules/vue/dist/vue.runtime.esm-bundler.js",
"file": "vue.js",
"fileHash": "f71e9ed4",
"needsInterop": false
},
"vitepress > @vue/devtools-api": {
"src": "../../../node_modules/.pnpm/@vue+devtools-api@7.4.6/node_modules/@vue/devtools-api/dist/index.js",
"file": "vitepress___@vue_devtools-api.js",
"fileHash": "e96d8db2",
"needsInterop": false
},
"vitepress > @vueuse/core": {
"src": "../../../node_modules/.pnpm/@vueuse+core@11.1.0_vue@3.5.11/node_modules/@vueuse/core/index.mjs",
"file": "vitepress___@vueuse_core.js",
"fileHash": "692684da",
"needsInterop": false
},
"@theme/index": {
"src": "../../../node_modules/.pnpm/vitepress@1.4.0_@algolia+client-search@4.24.0_postcss@8.4.47_search-insights@2.17.2/node_modules/vitepress/dist/client/theme-default/index.js",
"file": "@theme_index.js",
"fileHash": "9599b31e",
"needsInterop": false
}
},
"chunks": {
"chunk-WVCZVGU2": {
"file": "chunk-WVCZVGU2.js"
},
"chunk-XIDTNVOX": {
"file": "chunk-XIDTNVOX.js"
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,3 +0,0 @@
{
"type": "module"
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,567 +0,0 @@
import {
DefaultMagicKeysAliasMap,
StorageSerializers,
TransitionPresets,
assert,
breakpointsAntDesign,
breakpointsBootstrapV5,
breakpointsMasterCss,
breakpointsPrimeFlex,
breakpointsQuasar,
breakpointsSematic,
breakpointsTailwind,
breakpointsVuetify,
breakpointsVuetifyV2,
breakpointsVuetifyV3,
bypassFilter,
camelize,
clamp,
cloneFnJSON,
computedAsync,
computedEager,
computedInject,
computedWithControl,
containsProp,
controlledRef,
createEventHook,
createFetch,
createFilterWrapper,
createGlobalState,
createInjectionState,
createReusableTemplate,
createSharedComposable,
createSingletonPromise,
createTemplatePromise,
createUnrefFn,
customStorageEventName,
debounceFilter,
defaultDocument,
defaultLocation,
defaultNavigator,
defaultWindow,
directiveHooks,
executeTransition,
extendRef,
formatDate,
formatTimeAgo,
get,
getLifeCycleTarget,
getSSRHandler,
hasOwn,
hyphenate,
identity,
increaseWithUnit,
injectLocal,
invoke,
isClient,
isDef,
isDefined,
isIOS,
isObject,
isWorker,
makeDestructurable,
mapGamepadToXbox360Controller,
noop,
normalizeDate,
notNullish,
now,
objectEntries,
objectOmit,
objectPick,
onClickOutside,
onKeyDown,
onKeyPressed,
onKeyStroke,
onKeyUp,
onLongPress,
onStartTyping,
pausableFilter,
promiseTimeout,
provideLocal,
rand,
reactify,
reactifyObject,
reactiveComputed,
reactiveOmit,
reactivePick,
refAutoReset,
refDebounced,
refDefault,
refThrottled,
refWithControl,
resolveRef,
resolveUnref,
set,
setSSRHandler,
syncRef,
syncRefs,
templateRef,
throttleFilter,
timestamp,
toReactive,
toRef,
toRefs,
toValue,
tryOnBeforeMount,
tryOnBeforeUnmount,
tryOnMounted,
tryOnScopeDispose,
tryOnUnmounted,
unrefElement,
until,
useActiveElement,
useAnimate,
useArrayDifference,
useArrayEvery,
useArrayFilter,
useArrayFind,
useArrayFindIndex,
useArrayFindLast,
useArrayIncludes,
useArrayJoin,
useArrayMap,
useArrayReduce,
useArraySome,
useArrayUnique,
useAsyncQueue,
useAsyncState,
useBase64,
useBattery,
useBluetooth,
useBreakpoints,
useBroadcastChannel,
useBrowserLocation,
useCached,
useClipboard,
useClipboardItems,
useCloned,
useColorMode,
useConfirmDialog,
useCounter,
useCssVar,
useCurrentElement,
useCycleList,
useDark,
useDateFormat,
useDebounceFn,
useDebouncedRefHistory,
useDeviceMotion,
useDeviceOrientation,
useDevicePixelRatio,
useDevicesList,
useDisplayMedia,
useDocumentVisibility,
useDraggable,
useDropZone,
useElementBounding,
useElementByPoint,
useElementHover,
useElementSize,
useElementVisibility,
useEventBus,
useEventListener,
useEventSource,
useEyeDropper,
useFavicon,
useFetch,
useFileDialog,
useFileSystemAccess,
useFocus,
useFocusWithin,
useFps,
useFullscreen,
useGamepad,
useGeolocation,
useIdle,
useImage,
useInfiniteScroll,
useIntersectionObserver,
useInterval,
useIntervalFn,
useKeyModifier,
useLastChanged,
useLocalStorage,
useMagicKeys,
useManualRefHistory,
useMediaControls,
useMediaQuery,
useMemoize,
useMemory,
useMounted,
useMouse,
useMouseInElement,
useMousePressed,
useMutationObserver,
useNavigatorLanguage,
useNetwork,
useNow,
useObjectUrl,
useOffsetPagination,
useOnline,
usePageLeave,
useParallax,
useParentElement,
usePerformanceObserver,
usePermission,
usePointer,
usePointerLock,
usePointerSwipe,
usePreferredColorScheme,
usePreferredContrast,
usePreferredDark,
usePreferredLanguages,
usePreferredReducedMotion,
usePrevious,
useRafFn,
useRefHistory,
useResizeObserver,
useScreenOrientation,
useScreenSafeArea,
useScriptTag,
useScroll,
useScrollLock,
useSessionStorage,
useShare,
useSorted,
useSpeechRecognition,
useSpeechSynthesis,
useStepper,
useStorage,
useStorageAsync,
useStyleTag,
useSupported,
useSwipe,
useTemplateRefsList,
useTextDirection,
useTextSelection,
useTextareaAutosize,
useThrottleFn,
useThrottledRefHistory,
useTimeAgo,
useTimeout,
useTimeoutFn,
useTimeoutPoll,
useTimestamp,
useTitle,
useToNumber,
useToString,
useToggle,
useTransition,
useUrlSearchParams,
useUserMedia,
useVModel,
useVModels,
useVibrate,
useVirtualList,
useWakeLock,
useWebNotification,
useWebSocket,
useWebWorker,
useWebWorkerFn,
useWindowFocus,
useWindowScroll,
useWindowSize,
watchArray,
watchAtMost,
watchDebounced,
watchDeep,
watchIgnorable,
watchImmediate,
watchOnce,
watchPausable,
watchThrottled,
watchTriggerable,
watchWithFilter,
whenever
} from "./chunk-WVCZVGU2.js";
import "./chunk-XIDTNVOX.js";
export {
DefaultMagicKeysAliasMap,
StorageSerializers,
TransitionPresets,
assert,
computedAsync as asyncComputed,
refAutoReset as autoResetRef,
breakpointsAntDesign,
breakpointsBootstrapV5,
breakpointsMasterCss,
breakpointsPrimeFlex,
breakpointsQuasar,
breakpointsSematic,
breakpointsTailwind,
breakpointsVuetify,
breakpointsVuetifyV2,
breakpointsVuetifyV3,
bypassFilter,
camelize,
clamp,
cloneFnJSON,
computedAsync,
computedEager,
computedInject,
computedWithControl,
containsProp,
computedWithControl as controlledComputed,
controlledRef,
createEventHook,
createFetch,
createFilterWrapper,
createGlobalState,
createInjectionState,
reactify as createReactiveFn,
createReusableTemplate,
createSharedComposable,
createSingletonPromise,
createTemplatePromise,
createUnrefFn,
customStorageEventName,
debounceFilter,
refDebounced as debouncedRef,
watchDebounced as debouncedWatch,
defaultDocument,
defaultLocation,
defaultNavigator,
defaultWindow,
directiveHooks,
computedEager as eagerComputed,
executeTransition,
extendRef,
formatDate,
formatTimeAgo,
get,
getLifeCycleTarget,
getSSRHandler,
hasOwn,
hyphenate,
identity,
watchIgnorable as ignorableWatch,
increaseWithUnit,
injectLocal,
invoke,
isClient,
isDef,
isDefined,
isIOS,
isObject,
isWorker,
makeDestructurable,
mapGamepadToXbox360Controller,
noop,
normalizeDate,
notNullish,
now,
objectEntries,
objectOmit,
objectPick,
onClickOutside,
onKeyDown,
onKeyPressed,
onKeyStroke,
onKeyUp,
onLongPress,
onStartTyping,
pausableFilter,
watchPausable as pausableWatch,
promiseTimeout,
provideLocal,
rand,
reactify,
reactifyObject,
reactiveComputed,
reactiveOmit,
reactivePick,
refAutoReset,
refDebounced,
refDefault,
refThrottled,
refWithControl,
resolveRef,
resolveUnref,
set,
setSSRHandler,
syncRef,
syncRefs,
templateRef,
throttleFilter,
refThrottled as throttledRef,
watchThrottled as throttledWatch,
timestamp,
toReactive,
toRef,
toRefs,
toValue,
tryOnBeforeMount,
tryOnBeforeUnmount,
tryOnMounted,
tryOnScopeDispose,
tryOnUnmounted,
unrefElement,
until,
useActiveElement,
useAnimate,
useArrayDifference,
useArrayEvery,
useArrayFilter,
useArrayFind,
useArrayFindIndex,
useArrayFindLast,
useArrayIncludes,
useArrayJoin,
useArrayMap,
useArrayReduce,
useArraySome,
useArrayUnique,
useAsyncQueue,
useAsyncState,
useBase64,
useBattery,
useBluetooth,
useBreakpoints,
useBroadcastChannel,
useBrowserLocation,
useCached,
useClipboard,
useClipboardItems,
useCloned,
useColorMode,
useConfirmDialog,
useCounter,
useCssVar,
useCurrentElement,
useCycleList,
useDark,
useDateFormat,
refDebounced as useDebounce,
useDebounceFn,
useDebouncedRefHistory,
useDeviceMotion,
useDeviceOrientation,
useDevicePixelRatio,
useDevicesList,
useDisplayMedia,
useDocumentVisibility,
useDraggable,
useDropZone,
useElementBounding,
useElementByPoint,
useElementHover,
useElementSize,
useElementVisibility,
useEventBus,
useEventListener,
useEventSource,
useEyeDropper,
useFavicon,
useFetch,
useFileDialog,
useFileSystemAccess,
useFocus,
useFocusWithin,
useFps,
useFullscreen,
useGamepad,
useGeolocation,
useIdle,
useImage,
useInfiniteScroll,
useIntersectionObserver,
useInterval,
useIntervalFn,
useKeyModifier,
useLastChanged,
useLocalStorage,
useMagicKeys,
useManualRefHistory,
useMediaControls,
useMediaQuery,
useMemoize,
useMemory,
useMounted,
useMouse,
useMouseInElement,
useMousePressed,
useMutationObserver,
useNavigatorLanguage,
useNetwork,
useNow,
useObjectUrl,
useOffsetPagination,
useOnline,
usePageLeave,
useParallax,
useParentElement,
usePerformanceObserver,
usePermission,
usePointer,
usePointerLock,
usePointerSwipe,
usePreferredColorScheme,
usePreferredContrast,
usePreferredDark,
usePreferredLanguages,
usePreferredReducedMotion,
usePrevious,
useRafFn,
useRefHistory,
useResizeObserver,
useScreenOrientation,
useScreenSafeArea,
useScriptTag,
useScroll,
useScrollLock,
useSessionStorage,
useShare,
useSorted,
useSpeechRecognition,
useSpeechSynthesis,
useStepper,
useStorage,
useStorageAsync,
useStyleTag,
useSupported,
useSwipe,
useTemplateRefsList,
useTextDirection,
useTextSelection,
useTextareaAutosize,
refThrottled as useThrottle,
useThrottleFn,
useThrottledRefHistory,
useTimeAgo,
useTimeout,
useTimeoutFn,
useTimeoutPoll,
useTimestamp,
useTitle,
useToNumber,
useToString,
useToggle,
useTransition,
useUrlSearchParams,
useUserMedia,
useVModel,
useVModels,
useVibrate,
useVirtualList,
useWakeLock,
useWebNotification,
useWebSocket,
useWebWorker,
useWebWorkerFn,
useWindowFocus,
useWindowScroll,
useWindowSize,
watchArray,
watchAtMost,
watchDebounced,
watchDeep,
watchIgnorable,
watchImmediate,
watchOnce,
watchPausable,
watchThrottled,
watchTriggerable,
watchWithFilter,
whenever
};
//# sourceMappingURL=vitepress___@vueuse_core.js.map

View File

@ -1,7 +0,0 @@
{
"version": 3,
"sources": [],
"sourcesContent": [],
"mappings": "",
"names": []
}

View File

@ -1,343 +0,0 @@
import {
BaseTransition,
BaseTransitionPropsValidators,
Comment,
DeprecationTypes,
EffectScope,
ErrorCodes,
ErrorTypeStrings,
Fragment,
KeepAlive,
ReactiveEffect,
Static,
Suspense,
Teleport,
Text,
TrackOpTypes,
Transition,
TransitionGroup,
TriggerOpTypes,
VueElement,
assertNumber,
callWithAsyncErrorHandling,
callWithErrorHandling,
camelize,
capitalize,
cloneVNode,
compatUtils,
compile,
computed,
createApp,
createBaseVNode,
createBlock,
createCommentVNode,
createElementBlock,
createHydrationRenderer,
createPropsRestProxy,
createRenderer,
createSSRApp,
createSlots,
createStaticVNode,
createTextVNode,
createVNode,
customRef,
defineAsyncComponent,
defineComponent,
defineCustomElement,
defineEmits,
defineExpose,
defineModel,
defineOptions,
defineProps,
defineSSRCustomElement,
defineSlots,
devtools,
effect,
effectScope,
getCurrentInstance,
getCurrentScope,
getCurrentWatcher,
getTransitionRawChildren,
guardReactiveProps,
h,
handleError,
hasInjectionContext,
hydrate,
hydrateOnIdle,
hydrateOnInteraction,
hydrateOnMediaQuery,
hydrateOnVisible,
initCustomFormatter,
initDirectivesForSSR,
inject,
isMemoSame,
isProxy,
isReactive,
isReadonly,
isRef,
isRuntimeOnly,
isShallow,
isVNode,
markRaw,
mergeDefaults,
mergeModels,
mergeProps,
nextTick,
normalizeClass,
normalizeProps,
normalizeStyle,
onActivated,
onBeforeMount,
onBeforeUnmount,
onBeforeUpdate,
onDeactivated,
onErrorCaptured,
onMounted,
onRenderTracked,
onRenderTriggered,
onScopeDispose,
onServerPrefetch,
onUnmounted,
onUpdated,
onWatcherCleanup,
openBlock,
popScopeId,
provide,
proxyRefs,
pushScopeId,
queuePostFlushCb,
reactive,
readonly,
ref,
registerRuntimeCompiler,
render,
renderList,
renderSlot,
resolveComponent,
resolveDirective,
resolveDynamicComponent,
resolveFilter,
resolveTransitionHooks,
setBlockTracking,
setDevtoolsHook,
setTransitionHooks,
shallowReactive,
shallowReadonly,
shallowRef,
ssrContextKey,
ssrUtils,
stop,
toDisplayString,
toHandlerKey,
toHandlers,
toRaw,
toRef,
toRefs,
toValue,
transformVNodeArgs,
triggerRef,
unref,
useAttrs,
useCssModule,
useCssVars,
useHost,
useId,
useModel,
useSSRContext,
useShadowRoot,
useSlots,
useTemplateRef,
useTransitionState,
vModelCheckbox,
vModelDynamic,
vModelRadio,
vModelSelect,
vModelText,
vShow,
version,
warn,
watch,
watchEffect,
watchPostEffect,
watchSyncEffect,
withAsyncContext,
withCtx,
withDefaults,
withDirectives,
withKeys,
withMemo,
withModifiers,
withScopeId
} from "./chunk-XIDTNVOX.js";
export {
BaseTransition,
BaseTransitionPropsValidators,
Comment,
DeprecationTypes,
EffectScope,
ErrorCodes,
ErrorTypeStrings,
Fragment,
KeepAlive,
ReactiveEffect,
Static,
Suspense,
Teleport,
Text,
TrackOpTypes,
Transition,
TransitionGroup,
TriggerOpTypes,
VueElement,
assertNumber,
callWithAsyncErrorHandling,
callWithErrorHandling,
camelize,
capitalize,
cloneVNode,
compatUtils,
compile,
computed,
createApp,
createBlock,
createCommentVNode,
createElementBlock,
createBaseVNode as createElementVNode,
createHydrationRenderer,
createPropsRestProxy,
createRenderer,
createSSRApp,
createSlots,
createStaticVNode,
createTextVNode,
createVNode,
customRef,
defineAsyncComponent,
defineComponent,
defineCustomElement,
defineEmits,
defineExpose,
defineModel,
defineOptions,
defineProps,
defineSSRCustomElement,
defineSlots,
devtools,
effect,
effectScope,
getCurrentInstance,
getCurrentScope,
getCurrentWatcher,
getTransitionRawChildren,
guardReactiveProps,
h,
handleError,
hasInjectionContext,
hydrate,
hydrateOnIdle,
hydrateOnInteraction,
hydrateOnMediaQuery,
hydrateOnVisible,
initCustomFormatter,
initDirectivesForSSR,
inject,
isMemoSame,
isProxy,
isReactive,
isReadonly,
isRef,
isRuntimeOnly,
isShallow,
isVNode,
markRaw,
mergeDefaults,
mergeModels,
mergeProps,
nextTick,
normalizeClass,
normalizeProps,
normalizeStyle,
onActivated,
onBeforeMount,
onBeforeUnmount,
onBeforeUpdate,
onDeactivated,
onErrorCaptured,
onMounted,
onRenderTracked,
onRenderTriggered,
onScopeDispose,
onServerPrefetch,
onUnmounted,
onUpdated,
onWatcherCleanup,
openBlock,
popScopeId,
provide,
proxyRefs,
pushScopeId,
queuePostFlushCb,
reactive,
readonly,
ref,
registerRuntimeCompiler,
render,
renderList,
renderSlot,
resolveComponent,
resolveDirective,
resolveDynamicComponent,
resolveFilter,
resolveTransitionHooks,
setBlockTracking,
setDevtoolsHook,
setTransitionHooks,
shallowReactive,
shallowReadonly,
shallowRef,
ssrContextKey,
ssrUtils,
stop,
toDisplayString,
toHandlerKey,
toHandlers,
toRaw,
toRef,
toRefs,
toValue,
transformVNodeArgs,
triggerRef,
unref,
useAttrs,
useCssModule,
useCssVars,
useHost,
useId,
useModel,
useSSRContext,
useShadowRoot,
useSlots,
useTemplateRef,
useTransitionState,
vModelCheckbox,
vModelDynamic,
vModelRadio,
vModelSelect,
vModelText,
vShow,
version,
warn,
watch,
watchEffect,
watchPostEffect,
watchSyncEffect,
withAsyncContext,
withCtx,
withDefaults,
withDirectives,
withKeys,
withMemo,
withModifiers,
withScopeId
};
//# sourceMappingURL=vue.js.map

View File

@ -1,7 +0,0 @@
{
"version": 3,
"sources": [],
"sourcesContent": [],
"mappings": "",
"names": []
}

View File

@ -1,20 +0,0 @@
import { defineConfig } from 'vitepress'
import zh from "./zh";
import en from "./en";
// https://vitepress.dev/reference/site-config
export default defineConfig({
...zh,
locales: {
root: {
label: '简体中文',
lang: 'zh'
},
en: {
label: 'English',
lang: 'en',
link: '/en/',
...en
}
}
})

View File

@ -1,40 +0,0 @@
import {defineConfig} from "vitepress";
const en = defineConfig({
title: "MyBot",
description: "MyBot docs",
themeConfig: {
nav: [
{ text: 'Home', link: '/en/' },
{ text: 'Docs', link: '/en/deployment' }
],
sidebar: [
{
text: "For Administrator",
items: [
{ text: "Deployment", link: "/en/deployment" },
{ text: "Configuration", link: "/en/config" }
]
},
{
text: 'For Developer',
items: [
{ text: 'Quick Start', link: '/en/quick-start' },
]
},
{
text: "API Reference",
items: [
{ text: "API Overview", link: '/en/api-list' }
]
}
],
socialLinks: [
{ icon: 'github', link: 'https://github.com/Wzp-2008/MyBot/', ariaLabel: "GitHub" },
{ icon: 'github', link: 'https://wzpmc.cn:3000/wzp/MyBot', ariaLabel: "Gitea" }
],
},
});
export default en;

View File

@ -1,41 +0,0 @@
import {defineConfig} from "vitepress";
const zh = defineConfig({
title: "MyBot",
description: "MyBot文档",
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: '主页', link: '/' },
{ text: '文档', link: '/deployment' }
],
sidebar: [
{
text: "对管理员",
items: [
{ text: "部署MyBot", link: '/deployment' },
{ text: "配置", link: "/config" }
]
},
{
text: '对开发者',
items: [
{ text: '快速开始', link: '/quick-start' },
]
},
{
text: "API参考",
items: [
{ text: "API总览", link: '/api-list' }
]
}
],
socialLinks: [
{ icon: 'github', link: 'https://github.com/Wzp-2008/MyBot/', ariaLabel: "GitHub" },
{ icon: 'github', link: 'https://wzpmc.cn:3000/wzp/MyBot', ariaLabel: "Gitea" }
],
},
});
export default zh;

View File

@ -1,49 +0,0 @@
---
outline: deep
---
# Runtime API Examples
This page demonstrates usage of some of the runtime APIs provided by VitePress.
The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:
```md
<script setup>
import { useData } from 'vitepress'
const { theme, page, frontmatter } = useData()
</script>
## Results
### Theme Data
<pre>{{ theme }}</pre>
### Page Data
<pre>{{ page }}</pre>
### Page Frontmatter
<pre>{{ frontmatter }}</pre>
```
<script setup>
import { useData } from 'vitepress'
const { site, theme, page, frontmatter } = useData()
</script>
## Results
### Theme Data
<pre>{{ theme }}</pre>
### Page Data
<pre>{{ page }}</pre>
### Page Frontmatter
<pre>{{ frontmatter }}</pre>
## More
Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata).

View File

@ -1,68 +0,0 @@
# 主配置文件 {#main-config}
## 服务器验证 `authorization` {#authorization}
::: warning 实验性功能
此功能可能出现Bug作者的测试环境未找到token配置项若出现BUG请通过[Github Issues](https://github.com/Wzp-2008/MyBot/issues)或[Gitea 工单](https://wzpmc.cn:3000/wzp/MyBot/issues)向作者提交反馈
:::
### enable
是否启动验证
- 类型: `boolean`
- 值:`true` `false`
- 样例:
```yaml
enable: false
```
### token
验证所使用的token
- 类型: `string`
- 不启动验证则留空
- 样例:
```yaml
token: ""
```
---
## 指令执行失败提示 `fallback` {#fallback}
### command
当指令无效时发送的消息
- 类型:`string`
- 样例:
```yaml
command: 无效的指令!
```
### errorUncaught
当指令执行错误时发送的消息
- 类型:`string`
- 样例:
```yaml
errorUncaught: 指令运行时出现错误!
```
---
## 好友相关配置 `friend` {#friend}
### autoAccept
是否自动通过好友申请
- 类型:`boolean`
- 值:`true` `false`
- 样例:
```yaml
autoAccept: true
```
---
## 好友相关配置 `group` {#group}
### autoAccept
是否自动通过群邀请
- 类型:`boolean`
- 值:`true` `false`
- 样例:
```yaml
autoAccept: true
```
---
## ws连接地址 `websocket` {#websocket}
ws连接地址
- 类型:`string`
- 样例:
```yaml
websocket: ws://127.0.0.1:3001
```

View File

@ -1,47 +0,0 @@
# 环境要求
- Java 11(最低) / 17(推荐)
MyBot的可执行文件可以在 [Github Release](https://github.com/Wzp-2008/MyBot/releases/latest) 或 [Gitea Release](https://wzpmc.cn:3000/wzp/MyBot/releases/latest) 下载到
你需要准备一个空文件夹来运行MyBot
::: code-group
```bat [windows (cmd)]
md mybot
cd mybot
```
```powershell [windows (powershell)]
New-Item mybot
cd mybot
```
```bash [linux / macos]
mkdir mybot
cd mybot
```
:::
并将jar文件放置到其中
接下来通过此命令首次启动MyBot
```bash
/path/to/java -jar MyBot-XXXXXX.jar
```
::: tip 注意
将/path/to/java替换为你的java可执行程序路径
:::
启动完成后将会在MyBot文件夹中创建一个config.yml即主配置文件
关于配置文件的修改,请参阅文档中的[配置](/config)一栏
完成配置文件的修改后,再次使用命令
```bash
/path/to/java -jar MyBot-XXXXXX.jar
```
启动MyBot
至此Bot已完成启动~

View File

@ -1,49 +0,0 @@
---
outline: deep
---
# Runtime API Examples
This page demonstrates usage of some of the runtime APIs provided by VitePress.
The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:
```md
<script setup>
import { useData } from 'vitepress'
const { theme, page, frontmatter } = useData()
</script>
## Results
### Theme Data
<pre>{{ theme }}</pre>
### Page Data
<pre>{{ page }}</pre>
### Page Frontmatter
<pre>{{ frontmatter }}</pre>
```
<script setup>
import { useData } from 'vitepress'
const { site, theme, page, frontmatter } = useData()
</script>
## Results
### Theme Data
<pre>{{ theme }}</pre>
### Page Data
<pre>{{ page }}</pre>
### Page Frontmatter
<pre>{{ frontmatter }}</pre>
## More
Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata).

View File

@ -1,68 +0,0 @@
# Main Configuration File {#main-config}
## `authorization` {#authorization}
::: warning Experimental
There may be a Bug in this function (the token configuration item is not found in the author's test environment). if there is a BUG, please submit feedback to the author through [Github Issues](https://github.com/Wzp-2008/MyBot/issues) or [Gitea ticket](https://wzpmc.cn:3000/wzp/MyBot/issues)
:::
### enable
should use authorization?
- type `boolean`
- value`true` `false`
- example
```yaml
enable: false
```
### token
The token used on the authorization
- type `string`
- can be empty when not using authorization
- example
```yaml
token: ""
```
---
## `fallback` {#fallback}
### command
when command executing have errors sends message
- type`string`
- example
```yaml
command: Invalid command!
```
### errorUncaught
Message sent when instruction execution fails
- type`string`
- example
```yaml
errorUncaught: Error while command is running!
```
---
## `friend` {#friend}
### autoAccept
Whether to automatically apply through friends
- type`boolean`
- values`true` `false`
- example
```yaml
autoAccept: true
```
---
## `group` {#group}
### autoAccept
Automatically through group invitation
- type`boolean`
- values`true` `false`
- example
```yaml
autoAccept: true
```
---
## `websocket` {#websocket}
ws connection address
- type`string`
- example
```yaml
websocket: ws://127.0.0.1:3001
```

View File

View File

@ -1,25 +0,0 @@
---
# https://vitepress.dev/reference/default-theme-home-page
layout: home
hero:
name: "MyBot"
text: "MyBot docs"
tagline: A Java-based OneBot11-compatible robot framework
actions:
- theme: brand
text: Quick Start
link: /deployment
- theme: alt
text: API Reference
link: /api-list
features:
- title: Bukkit Like Plugin Form
details: Minecraft developers can easily get started
- title: API rich
details: compatible with all onebot11 apis and events
- title: Low occupancy
details: The full version only takes up 20M of storage and less than 100M of memory.
---

View File

@ -1,85 +0,0 @@
# Markdown Extension Examples
This page demonstrates some of the built-in markdown extensions provided by VitePress.
## Syntax Highlighting
VitePress provides Syntax Highlighting powered by [Shiki](https://github.com/shikijs/shiki), with additional features like line-highlighting:
**Input**
````md
```js{4}
export default {
data () {
return {
msg: 'Highlighted!'
}
}
}
```
````
**Output**
```js{4}
export default {
data () {
return {
msg: 'Highlighted!'
}
}
}
```
## Custom Containers
**Input**
```md
::: info
This is an info box.
:::
::: tip
This is a tip.
:::
::: warning
This is a warning.
:::
::: danger
This is a dangerous warning.
:::
::: details
This is a details block.
:::
```
**Output**
::: info
This is an info box.
:::
::: tip
This is a tip.
:::
::: warning
This is a warning.
:::
::: danger
This is a dangerous warning.
:::
::: details
This is a details block.
:::
## More
Check out the documentation for the [full list of markdown extensions](https://vitepress.dev/guide/markdown).

View File

@ -1,25 +0,0 @@
---
# https://vitepress.dev/reference/default-theme-home-page
layout: home
hero:
name: "MyBot"
text: "MyBot 开发文档"
tagline: 一个基于 Java 的 OneBot11 兼容机器人框架
actions:
- theme: brand
text: 快速开始
link: /deployment
- theme: alt
text: API参考
link: /api-list
features:
- title: Bukkit Like插件形式
details: MC开发者可轻松上手
- title: API丰富
details: 兼容所有OneBot11 API\事件
- title: 占用低
details: 完整版仅仅占用20M存储,100M以下内存
---

View File

@ -1,18 +0,0 @@
{
"name": "mybot-docs",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"docs:dev": "vitepress dev",
"docs:build": "vitepress build",
"docs:preview": "vitepress preview"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"vitepress": "^1.4.0"
}
}

1491
docs/pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -1,85 +0,0 @@
# 快速开始
This page demonstrates some of the built-in markdown extensions provided by VitePress.
## Syntax Highlighting
VitePress provides Syntax Highlighting powered by [Shiki](https://github.com/shikijs/shiki), with additional features like line-highlighting:
**Input**
````md
```js{4}
export default {
data () {
return {
msg: 'Highlighted!'
}
}
}
```
````
**Output**
```js{4}
export default {
data () {
return {
msg: 'Highlighted!'
}
}
}
```
## Custom Containers
**Input**
```md
::: info
This is an info box.
:::
::: tip
This is a tip.
:::
::: warning
This is a warning.
:::
::: danger
This is a dangerous warning.
:::
::: details
This is a details block.
:::
```
**Output**
::: info
This is an info box.
:::
::: tip
This is a tip.
:::
::: warning
This is a warning.
:::
::: danger
This is a dangerous warning.
:::
::: details
This is a details block.
:::
## More
Check out the documentation for the [full list of markdown extensions](https://vitepress.dev/guide/markdown).

View File

@ -1,78 +0,0 @@
val projectName = rootProject.name
val groupName: String by extra
val projectArtifactId = "mybot-api"
val projectVersion: String by extra
plugins {
id("maven-publish")
}
group = "cn.wzpmc"
version = projectVersion
repositories {
mavenCentral()
}
dependencies {}
tasks.register<Jar>("javadocJar") {
archiveClassifier.set("javadoc")
from(tasks.named("javadoc"))
}
tasks.register<Jar>("sourcesJar") {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
groupId = groupName
artifactId = projectArtifactId
version = projectVersion
artifact(tasks.named("javadocJar"))
artifact(tasks.named("sourcesJar"))
pom {
name.set(projectName)
description.set("A Java-based OneBot11-compatible robot framework")
licenses {
license {
name.set("The MIT License")
url.set("https://opensource.org/licenses/MIT")
}
}
developers {
developer {
id.set("wzp")
name.set("wzp")
email.set("minecraftwzpmc@gmail.com")
}
}
scm {
connection.set("scm:git:https://wzpmc.cn:3000/wzp/MyBot.git")
developerConnection.set("scm:git:https://wzpmc.cn:3000/wzp/MyBot.git")
url.set("https://wzpmc.cn:3000/wzp/MyBot")
}
}
}
}
repositories {
maven {
val releasesRepoUrl = uri("https://wzpmc.cn:90/repository/maven-releases")
val snapshotsRepoUrl = uri("https://wzpmc.cn:90/repository/maven-snapshots")
url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
credentials {
username = project.findProperty("repo.user") as String? ?: ""
password = project.findProperty("repo.password") as String? ?: ""
}
}
}
}
tasks.test {
useJUnitPlatform()
}

View File

@ -1,40 +0,0 @@
package cn.wzpmc.api;
import lombok.SneakyThrows;
/**
* 主Api接口
*
* @author wzp
* @version 0.0.5-dev
* @since 2024/8/16 17:31
*/
public interface IMainApi {
/**
* 进行请求操作
*
* @param packet 请求包
* @param <REQUEST> 请求类型
* @param <RESPONSE> 返回类型
* @return 请求返回包
* @throws InterruptedException 请求过程中出现Ctrl+C时抛出
* @author wzp
* @since 2024/8/23 21:32 v0.0.5-dev
*/
<REQUEST, RESPONSE> ActionResponse<RESPONSE> doApiCall(Action<REQUEST, RESPONSE> packet) throws InterruptedException;
/**
* 进行请求操作
*
* @param packet 请求包
* @param <REQUEST> 请求类型
* @param <RESPONSE> 返回类型
* @return 请求返回包
* @author wzp
* @since 2024/8/27 15:11 v1.0.2
*/
@SneakyThrows
default <REQUEST, RESPONSE> ActionResponse<RESPONSE> doApiCallSafe(Action<REQUEST, RESPONSE> packet) {
return doApiCall(packet);
}
}

View File

@ -1,45 +0,0 @@
package cn.wzpmc.events.notice.essence;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 添加精华消息事件
*
* @author wzp
* @version 1.0.3
* @since 2024/9/16 21:32
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class EssenceAddEvent extends EssenceEvent {
/**
* 群ID
*
* @since 2024/9/16 21:33 v1.0.3
*/
@JSONField(name = "group_id")
private Long groupId;
/**
* 设置人ID
*
* @since 2024/9/16 21:33 v1.0.3
*/
@JSONField(name = "user_id")
private Long userId;
/**
* 消息ID
*
* @since 2024/9/16 21:33 v1.0.3
*/
@JSONField(name = "message_id")
private Long messageId;
/**
* 消息发送者ID
*
* @since 2024/9/16 21:33 v1.0.3
*/
@JSONField(name = "sender_id")
private Long senderId;
}

View File

@ -1,25 +0,0 @@
package cn.wzpmc.events.notice.essence;
import cn.wzpmc.events.notice.NoticeEvent;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 精华消息事件
*
* @author wzp
* @version 1.0.3
* @since 2024/9/16 21:24
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class EssenceEvent extends NoticeEvent {
/**
* 群精华消息子类型
*
* @since 2024/8/1 下午11:26 v0.0.2-dev
*/
@JSONField(name = "sub_type")
private EssenceSubType subType;
}

View File

@ -1,22 +0,0 @@
package cn.wzpmc.events.notice.essence;
/**
* 精华消息子事件
*
* @author wzp
* @version 1.0.3
* @since 2024/9/16 21:31
*/
public enum EssenceSubType {
/**
* 添加精华消息事件
*
* @since 2024/9/16 21:35 v1.0.3
*/
ADD(EssenceAddEvent.class);
public final Class<? extends EssenceEvent> clazz;
EssenceSubType(Class<? extends EssenceEvent> clazz) {
this.clazz = clazz;
}
}

View File

@ -1,24 +0,0 @@
package cn.wzpmc.events.notice.notify;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 用户正在输入事件
*
* @author wzp
* @version 1.0.2
* @since 2024/8/29 21:52
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class InputStatusNotifyEvent extends NotifyEvent {
/**
* 状态文本
*
* @since 2024/8/29 23:16 v1.0.2
*/
@JSONField(name = "status_text")
private String statusText;
}

View File

@ -1,59 +0,0 @@
package cn.wzpmc.message.json.parts;
import cn.wzpmc.message.json.JsonMessagePart;
import com.alibaba.fastjson2.JSONObject;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* "@"某人
*
* @author MoYiJiangNan
* @version 0.0.3-dev
* @since 2024/8/2 下午11:22
*/
@Data
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor(access = AccessLevel.PROTECTED)
public class At implements JsonMessagePart {
/**
* "@" QQ all 表示全体成员
*
* @since 2024/8/2 下午11:50 v0.0.3-dev
*/
private String qq;
/**
* 获取用于@全体成员的AT对象
*
* @return 全体成员的At对象
* @author wzp
* @since 2024/8/31 23:51 v1.0.3
*/
public static At all() {
return new At("all");
}
/**
* 获取用于@用户的AT对象
*
* @param userId 用户ID
* @return 指定用户的At对象
* @author wzp
* @since 2024/8/31 23:50 v1.0.3
*/
public static At user(Long userId) {
return new At(userId.toString());
}
@Override
public PartType getPartType() {
return PartType.AT;
}
public JSONObject getData() {
return JSONObject.of("qq", this.qq);
}
}

View File

@ -1,47 +0,0 @@
package cn.wzpmc.message.json.parts;
import cn.wzpmc.message.json.JsonMessagePart;
import com.alibaba.fastjson2.JSONObject;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 未知消息类型
*
* @author wzp
* @version 1.0.5
* @since 2024/11/17 17:22
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UnknownPart implements JsonMessagePart {
/**
* 类型文本
*
* @since 2024/11/17 17:32 v1.0.5
*/
private String type;
/**
* 消息数据
*
* @since 2024/11/17 17:33 v1.0.5
*/
private JSONObject data;
@Override
public PartType getPartType() {
return PartType.UNKNOWN;
}
@Override
public String getStringPartType() {
return type;
}
@Override
public JSONObject getData() {
return data;
}
}

View File

@ -1,53 +0,0 @@
package cn.wzpmc.plugins.configuration;
/**
* 配置
*
* @author wzp
* @version 0.0.1-dev
* @since 2024/7/31 上午3:42
*/
public interface IConfiguration {
/**
* @author wzp
* @since 2025/3/26 17:29 v1.0.7
* @return 网络相关配置
*/
INetworkConfiguration getNetwork();
/**
*
* @author wzp
* @since 2025/2/4 13:44 v1.0.5
* @return 命令前缀
*/
String getCommandPrefix();
/**
* @return 通信验证
* @author wzp
* @since 2024/7/31 上午3:48 v0.0.1-dev
*/
IAuthorizationConfiguration getAuthorization();
/**
* @return 失败消息提示
* @author wzp
* @since 2024/7/31 上午3:49 v0.0.1-dev
*/
IFallbackConfiguration getFallback();
/**
* @return 获取好友配置
* @author wzp
* @since 2024/8/30 15:42 v1.0.3
*/
IFriendConfiguration getFriend();
/**
* @return 获取群聊配置
* @author wzp
* @since 2024/8/31 23:56 v1.0.3
*/
IGroupConfiguration getGroup();
}

View File

@ -1,17 +0,0 @@
package cn.wzpmc.plugins.configuration;
/**
* 好友配置
*
* @author wzp
* @version 1.0.3
* @since 2024/8/30 15:39
*/
public interface IFriendConfiguration {
/**
* @return 是否自动同意好友申请
* @author wzp
* @since 2024/8/30 15:41 v1.0.3
*/
Boolean isAutoAccept();
}

View File

@ -1,17 +0,0 @@
package cn.wzpmc.plugins.configuration;
/**
* 群聊相关配置
*
* @author wzp
* @version 1.0.3
* @since 2024/8/31 23:55
*/
public interface IGroupConfiguration {
/**
* @return 是否自动同意加群邀请
* @author wzp
* @since 2024/8/30 15:41 v1.0.3
*/
Boolean isAutoAccept();
}

View File

@ -1,38 +0,0 @@
package cn.wzpmc.plugins.configuration;
/**
* @author wzp
* @since 2025/3/26 17:26
* @version 1.0.7
*/
public interface INetworkConfiguration {
/**
* @return WebSocket连接URL
* @author wzp
* @since 2025/3/26 17:26 v1.0.7
*/
String getWebsocket();
/**
* @author wzp
* @since 2025/3/26 17:27 v1.0.7
* @return 是否启用连接重试
*/
Boolean isRetry();
/**
* @author wzp
* @since 2025/3/26 17:27 v1.0.7
* @return 重试最大次数-1为无限
*/
Integer getMaxRetryCount();
/**
* @author wzp
* @since 2025/3/26 17:28 v1.0.7
* @return 获取重试间隔单位毫秒
*/
Long getRetryInterval();
}

View File

@ -1,3 +1,2 @@
val projectName by extra("MyBot")
rootProject.name = projectName
include("mybot-api")
rootProject.name = projectName

View File

@ -1,16 +1,17 @@
package cn.wzpmc;
import cn.wzpmc.api.IMainApi;
import cn.wzpmc.api.actions.message.get.GetLoginInfoAction;
import cn.wzpmc.builtin.commands.*;
import cn.wzpmc.builtin.event.AddGroupEventHandler;
import cn.wzpmc.api.api.IMainApi;
import cn.wzpmc.api.api.actions.message.get.GetLoginInfoAction;
import cn.wzpmc.api.plugins.BasePlugin;
import cn.wzpmc.builtin.commands.DeOpCommand;
import cn.wzpmc.builtin.commands.HelpCommand;
import cn.wzpmc.builtin.commands.OpCommand;
import cn.wzpmc.builtin.commands.StopCommand;
import cn.wzpmc.builtin.event.CommandEventHandler;
import cn.wzpmc.builtin.event.FriendAddEventHandler;
import cn.wzpmc.configuration.Configuration;
import cn.wzpmc.console.MyBotConsole;
import cn.wzpmc.entities.user.bot.MyBot;
import cn.wzpmc.network.WebSocketConnectionHandler;
import cn.wzpmc.plugins.BasePlugin;
import cn.wzpmc.plugins.CommandManager;
import cn.wzpmc.plugins.PluginClassLoader;
import cn.wzpmc.plugins.PluginManager;
@ -18,7 +19,6 @@ import cn.wzpmc.utils.JsonUtils;
import cn.wzpmc.utils.ReflectionUtils;
import cn.wzpmc.utils.TemplateFileUtils;
import cn.wzpmc.utils.YamlUtils;
import com.alibaba.fastjson2.JSONObject;
import lombok.SneakyThrows;
import lombok.extern.log4j.Log4j2;
@ -27,89 +27,41 @@ import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.Objects;
@Log4j2
public class Main {
private static final String DEFAULT_CONFIGURATION_FILE_PATH = "templates/config.yaml";
public static void initializeJVM() {
public static void initializeJVM(){
System.setProperty("java.util.logging.manager", "org.apache.logging.log4j.jul.LogManager");
System.setProperty("terminal.jline", "true");
}
public static void initializeJsonUtils() {
public static void initializeJsonUtils(){
JsonUtils.initReader();
JsonUtils.initWriter();
}
public static Configuration getConfiguration() {
File configurationFile = new File("config.yaml");
ClassLoader classLoader = Main.class.getClassLoader();
if (TemplateFileUtils.saveDefaultConfig(classLoader, DEFAULT_CONFIGURATION_FILE_PATH, configurationFile)) {
if (TemplateFileUtils.saveDefaultConfig(Main.class.getClassLoader(), DEFAULT_CONFIGURATION_FILE_PATH, configurationFile)) {
log.debug("创建日志文件成功!");
log.info("首次启动默认配置文件已创建请填写后再次启动MyBot");
return null;
}
log.debug("读取配置文件 {}", configurationFile.getAbsolutePath());
Configuration configuration = YamlUtils.readYamlFile(configurationFile, Configuration.class);
JSONObject fullConfiguration = YamlUtils.readYamlFile(configurationFile, JSONObject.class);
Configuration defaultConfiguration = TemplateFileUtils.readDefaultConfig(classLoader, DEFAULT_CONFIGURATION_FILE_PATH, Configuration.class);
// 配置文件自动更新 start
boolean isChanged = false;
// 1.0.3 配置文件更新 start
if (configuration.getFriend() == null) {
configuration.setFriend(defaultConfiguration.getFriend());
isChanged = true;
}
if (Objects.isNull(configuration.getFriend().isAutoAccept())) {
configuration.getFriend().setAutoAccept(defaultConfiguration.getFriend().getAutoAccept());
isChanged = true;
}
if (configuration.getGroup() == null) {
configuration.setGroup(defaultConfiguration.getGroup());
isChanged = true;
}
if (Objects.isNull(configuration.getGroup().isAutoAccept())) {
configuration.getGroup().setAutoAccept(defaultConfiguration.getGroup().getAutoAccept());
isChanged = true;
}
// end
// 1.0.7 配置文件自动更新
if (configuration.getCommandPrefix() == null) {
configuration.setCommandPrefix(defaultConfiguration.getCommandPrefix());
isChanged = true;
}
if (configuration.getNetwork() == null) {
configuration.setNetwork(defaultConfiguration.getNetwork());
configuration.getNetwork().setWebsocket(fullConfiguration.getString("websocket"));
isChanged = true;
}
// end
if (isChanged) {
log.warn("已自动升级配置文件请检查config.yml是否有错误的地方有则请修改");
YamlUtils.writeYamlFile(configurationFile, configuration);
}
// 配置文件自动更新end
return configuration;
return YamlUtils.readYamlFile(configurationFile, Configuration.class);
}
public static MyBot createBot(Configuration configuration) {
public static MyBot createBot(Configuration configuration){
return new MyBot(configuration);
}
public static URI getUriFromConfiguration(Configuration configuration) {
public static URI getUriFromConfiguration(Configuration configuration){
URI uri;
try {
uri = new URI(configuration.getNetwork().getWebsocket());
uri = new URI(configuration.getWebsocket());
} catch (URISyntaxException e) {
return null;
}
return uri;
}
public static void loadPlugins(MyBot myBot) throws MalformedURLException {
File pluginsDir = new File("plugins");
if (TemplateFileUtils.createDefaultDirectory(pluginsDir)) {
@ -133,37 +85,40 @@ public class Main {
URI fileURI = file.toURI();
PluginClassLoader pluginClassLoader = new PluginClassLoader(new URL[]{fileURI.toURL()}, myBot);
BasePlugin load = ReflectionUtils.load(pluginClassLoader, file, pluginManager);
if (load == null) {
if (load == null){
log.info("插件{}加载失败!", name);
continue;
}
load.onLoad();
}
// 注册内置指令
CommandManager commandManager = myBot.getCommandManager();
commandManager.registerCommand(new StopCommand(myBot));
commandManager.registerCommand(new OpCommand());
commandManager.registerCommand(new HelpCommand());
commandManager.registerCommand(new DeOpCommand());
}
public static WebSocketConnectionHandler createConnection(MyBot myBot, URI uri) {
WebSocketConnectionHandler webSocketConnectionHandler = new WebSocketConnectionHandler(myBot, uri);
webSocketConnectionHandler.connect();
public static WebSocketConnectionHandler createConnection(MyBot myBot, URI uri){
WebSocketConnectionHandler webSocketConnectionHandler = new WebSocketConnectionHandler(myBot);
webSocketConnectionHandler.connect(uri);
return webSocketConnectionHandler;
}
public static void startConsole(MyBot myBot, WebSocketConnectionHandler webSocketConnectionHandler) {
public static void startConsole(MyBot myBot, WebSocketConnectionHandler webSocketConnectionHandler){
MyBotConsole myBotConsole = new MyBotConsole(myBot, webSocketConnectionHandler);
myBotConsole.start();
}
@SneakyThrows
public static void main(String[] args) {
initializeJVM();
initializeJsonUtils();
log.info("启动MyBot...");
Configuration configuration = getConfiguration();
if (configuration == null) {
if (configuration == null){
return;
}
MyBot myBot = createBot(configuration);
URI uri = getUriFromConfiguration(configuration);
if (uri == null) {
if (uri == null){
log.error("无法解析websocket地址");
return;
}
@ -174,20 +129,6 @@ public class Main {
// 获取Bot消息
mainApi.doApiCall(new GetLoginInfoAction());
myBot.registerEventHandler(new CommandEventHandler());
if (myBot.getConfiguration().getFriend().isAutoAccept()) {
myBot.registerEventHandler(new FriendAddEventHandler());
}
if (myBot.getConfiguration().getGroup().isAutoAccept()) {
myBot.registerEventHandler(new AddGroupEventHandler());
}
// 注册内置指令
CommandManager commandManager = myBot.getCommandManager();
commandManager.registerCommand(new StopCommand(myBot));
commandManager.registerCommand(new OpCommand());
commandManager.registerCommand(new HelpCommand());
commandManager.registerCommand(new DeOpCommand());
commandManager.registerCommand(new ListCommand());
commandManager.registerCommand(new SendCommand());
startConsole(myBot, webSocketConnectionHandler);
}
}

View File

@ -1,4 +1,4 @@
package cn.wzpmc.api;
package cn.wzpmc.api.api;
import lombok.*;
@ -6,10 +6,9 @@ import java.util.UUID;
/**
* 抽象请求体
*
* @author wzp
* @version 0.0.5-dev
* @since 2024/8/16 21:36
* @version 0.0.5-dev
*/
@Getter
@ToString
@ -17,22 +16,19 @@ import java.util.UUID;
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Setter(AccessLevel.PROTECTED)
public class Action<REQUEST, RESPONSE> {
/**
* 请求回调值默认随机生成不建议自己修改
*
* @since 2024/8/23 21:29 v0.0.5-dev
*/
private final UUID echo = UUID.randomUUID();
/**
* 请求操作类型
*
* @since 2024/8/23 21:29 v0.0.5-dev
*/
private Actions action;
/**
* 请求参数
*
* @since 2024/8/23 21:29 v0.0.5-dev
*/
private REQUEST params;
/**
* 请求回调值默认随机生成不建议自己修改
* @since 2024/8/23 21:29 v0.0.5-dev
*/
private final UUID echo = UUID.randomUUID();
}

View File

@ -1,4 +1,4 @@
package cn.wzpmc.api;
package cn.wzpmc.api.api;
import lombok.Data;
@ -6,7 +6,6 @@ import java.util.UUID;
/**
* 请求操作返回
*
* @author wzp
* @version 0.0.5-dev
* @since 2024/8/16 17:43
@ -15,25 +14,21 @@ import java.util.UUID;
public class ActionResponse<RESPONSE> {
/**
* 请求返回消息
*
* @since 2024/8/23 21:30 v0.0.5-dev
*/
private final String status;
/**
* 请求返回码
*
* @since 2024/8/23 21:30 v0.0.5-dev
*/
private final short retcode;
/**
* 请求返回数据
*
* @since 2024/8/23 21:31 v0.0.5-dev
*/
private final RESPONSE data;
/**
* 请求返回回调
*
* @since 2024/8/23 21:31 v0.0.5-dev
*/
private final UUID echo;

View File

@ -1,253 +1,212 @@
package cn.wzpmc.api;
package cn.wzpmc.api.api;
import cn.wzpmc.api.actions.message.send.SendMessageActionResponseData;
import cn.wzpmc.entities.*;
import cn.wzpmc.user.IBot;
import cn.wzpmc.user.IUser;
import cn.wzpmc.api.api.actions.message.send.SendMessageActionResponseData;
import cn.wzpmc.api.entities.*;
import cn.wzpmc.api.user.IBot;
import cn.wzpmc.api.user.IUser;
/**
* 操作类型
*
* @author wzp
* @version 0.0.5-dev
* @since 2024/8/16 22:24
* @version 0.0.5-dev
*/
public enum Actions {
/**
* 发送私聊消息
*
* @since 2024/8/23 21:07 v0.0.5-dev
*/
SEND_PRIVATE_MSG(SendMessageActionResponseData.class),
/**
* 发送群消息
*
* @since 2024/8/23 21:07 v0.0.5-dev
*/
SEND_GROUP_MSG(SendMessageActionResponseData.class),
/**
* 撤回消息
*
* @since 2024/8/23 21:07 v0.0.5-dev
*/
DELETE_MSG,
/**
* 获取消息
*
* @since 2024/8/23 21:07 v0.0.5-dev
*/
GET_MSG(MessageInformation.class),
/**
* 获取合并转发消息
*
* @since 2024/8/23 21:08 v0.0.5-dev
*/
GET_FORWARD_MSG(MessageInformation.class),
/**
* 发送好友赞
*
* @since 2024/8/23 21:08 v0.0.5-dev
*/
SEND_LIKE,
/**
* 群组踢人
*
* @since 2024/8/23 21:08 v0.0.5-dev
*/
SET_GROUP_KICK,
/**
* 群组单人禁言
*
* @since 2024/8/23 21:08 v0.0.5-dev
*/
SET_GROUP_BAN,
/**
* 群组匿名用户禁言
*
* @since 2024/8/23 21:08 v0.0.5-dev
*/
SET_GROUP_ANONYMOUS_BAN,
/**
* 群组全员禁言
*
* @since 2024/8/23 21:09 v0.0.5-dev
*/
SET_GROUP_WHOLE_BAN,
/**
* 群组设置管理员
*
* @since 2024/8/23 21:09 v0.0.5-dev
*/
SET_GROUP_ADMIN,
/**
* 群组匿名
*
* @since 2024/8/23 21:09 v0.0.5-dev
*/
SET_GROUP_ANONYMOUS,
/**
* 设置群名片群备注
*
* @since 2024/8/23 21:09 v0.0.5-dev
*/
SET_GROUP_CARD,
/**
* 设置群名
*
* @since 2024/8/24 19:04 v0.0.6-dev
*/
SET_GROUP_NAME,
/**
* 退出群组
*
* @since 2024/8/24 20:01 v0.0.6-dev
*/
SET_GROUP_LEAVE,
/**
* 设置群组专属头衔
*
* @since 2024/8/24 20:01 v0.0.6-dev
*/
SET_GROUP_SPECIAL_TITLE,
/**
* 处理加好友请求
*
* @since 2024/8/24 20:01 v0.0.6-dev
*/
SET_FRIEND_ADD_REQUEST,
/**
* 处理加群请求邀请
*
* @since 2024/8/24 20:02 v0.0.6-dev
*/
SET_GROUP_ADD_REQUEST,
/**
* 获取登录号信息
*
* @since 2024/8/24 20:02 v0.0.6-dev
*/
GET_LOGIN_INFO(IBot.class),
/**
* 获取陌生人信息
*
* @since 2024/8/24 20:02 v0.0.6-dev
*/
GET_STRANGER_INFO(IUser.class),
/**
* 获取好友列表
*
* @since 2024/8/24 20:02 v0.0.6-dev
*/
GET_FRIEND_LIST(FriendInformation.class, true),
GET_FRIEND_LIST(MessageInformation.class, true),
/**
* 获取群信息
*
* @since 2024/8/24 20:02 v0.0.6-dev
*/
GET_GROUP_INFO(GroupInformation.class),
/**
* 获取群列表
*
* @since 2024/8/24 20:02 v0.0.6-dev
*/
GET_GROUP_LIST(GroupInformation.class, true),
/**
* 获取群成员信息
*
* @since 2024/8/24 20:02 v0.0.6-dev
*/
GET_GROUP_MEMBER_INFO(GroupMemberInformation.class),
/**
* 获取群成员列表
*
* @since 2024/8/24 20:03 v0.0.6-dev
*/
GET_GROUP_MEMBER_LIST(GroupMemberInformation.class, true),
/**
* 获取群荣誉信息
*
* @since 2024/8/24 20:03 v0.0.6-dev
*/
GET_GROUP_HONOR_INFO(HonorInformation.class),
/**
* 获取 Cookies
*
* @since 2024/8/24 20:03 v0.0.6-dev
*/
GET_COOKIES(CookiesInformation.class),
/**
* 获取 CSRF Token
*
* @since 2024/8/24 20:04 v0.0.6-dev
*/
GET_CSRF_TOKEN(CsrfTokenInformation.class),
/**
* 获取 QQ 相关接口凭证
*
* @since 2024/8/24 20:04 v0.0.6-dev
*/
GET_CREDENTIALS(CredentialsInformation.class),
/**
* 获取语音
*
* @since 2024/8/24 20:04 v0.0.6-dev
*/
GET_RECORD(FilePathInformation.class),
/**
* 获取图片
*
* @since 2024/8/24 20:04 v0.0.6-dev
*/
GET_IMAGE(FilePathInformation.class),
/**
* 检查是否可以发送图片
*
* @since 2024/8/24 20:04 v0.0.6-dev
*/
CAN_SEND_IMAGE(YesNo.class),
/**
* 检查是否可以发送语音
*
* @since 2024/8/24 20:04 v0.0.6-dev
*/
CAN_SEND_RECORD(YesNo.class),
/**
* 获取运行状态
*
* @since 2024/8/24 20:04 v0.0.6-dev
*/
GET_STATUS(BotStatus.class),
/**
* 获取版本信息
*
* @since 2024/8/24 20:04 v0.0.6-dev
*/
GET_VERSION_INFO(VersionInformation.class),
/**
* 重启 OneBot 实现
*
* @since 2024/8/24 20:05 v0.0.6-dev
*/
SET_RESTART,
/**
* 清理缓存
*
* @since 2024/8/24 20:05 v0.0.6-dev
*/
CLEAN_CACHE;
public final Class<?> responseClass;
public final boolean array;
Actions(Class<?> responseClass, boolean array) {
this.responseClass = responseClass;
this.array = array;
}
Actions(Class<?> responseClass) {
this(responseClass, false);
}
Actions() {
Actions(){
this(Void.class);
}
}

View File

@ -0,0 +1,21 @@
package cn.wzpmc.api.api;
/**
* 主Api接口
* @author wzp
* @version 0.0.5-dev
* @since 2024/8/16 17:31
*/
public interface IMainApi {
/**
* 进行请求操作
* @author wzp
* @since 2024/8/23 21:32 v0.0.5-dev
* @param packet 请求包
* @return 请求返回包
* @param <REQUEST> 请求类型
* @param <RESPONSE> 返回类型
* @throws InterruptedException 请求过程中出现Ctrl+C时抛出
*/
<REQUEST, RESPONSE> ActionResponse<RESPONSE> doApiCall(Action<REQUEST, RESPONSE> packet) throws InterruptedException;
}

View File

@ -1,11 +1,10 @@
package cn.wzpmc.api.actions.message;
package cn.wzpmc.api.api.actions.message;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
/**
* 清理缓存
*
* @author wzp
* @version 0.0.6-dev
* @since 2024/8/24 20:46
@ -13,7 +12,6 @@ import cn.wzpmc.api.Actions;
public class CleanCacheAction extends Action<Void, Void> {
/**
* 清理缓存
*
* @author wzp
* @since 2024/8/24 23:59 v0.0.6-dev
*/

View File

@ -1,12 +1,11 @@
package cn.wzpmc.api.actions.message.can;
package cn.wzpmc.api.api.actions.message.can;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.entities.YesNo;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import cn.wzpmc.api.entities.YesNo;
/**
* 检查是否可以发送图片
*
* @author wzp
* @version 0.0.6-dev
* @since 2024/8/24 20:45
@ -14,11 +13,10 @@ import cn.wzpmc.entities.YesNo;
public class CanSendImageAction extends Action<Void, YesNo> {
/**
* 检查是否可以发送图片
*
* @author wzp
* @since 2024/8/24 23:51 v0.0.6-dev
*/
public CanSendImageAction() {
public CanSendImageAction(){
super.setAction(Actions.CAN_SEND_IMAGE);
}
}

View File

@ -1,12 +1,11 @@
package cn.wzpmc.api.actions.message.can;
package cn.wzpmc.api.api.actions.message.can;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.entities.YesNo;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import cn.wzpmc.api.entities.YesNo;
/**
* 检查是否可以发送语音
*
* @author wzp
* @version 0.0.6-dev
* @since 2024/8/24 20:45
@ -14,11 +13,10 @@ import cn.wzpmc.entities.YesNo;
public class CanSendRecordAction extends Action<Void, YesNo> {
/**
* 检查是否可以发送语音
*
* @author wzp
* @since 2024/8/24 23:51 v0.0.6-dev
*/
public CanSendRecordAction() {
public CanSendRecordAction(){
super.setAction(Actions.CAN_SEND_RECORD);
}
}

View File

@ -1,14 +1,13 @@
package cn.wzpmc.api.actions.message.delete;
package cn.wzpmc.api.api.actions.message.delete;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* 撤回消息
*
* @author wzp
* @version 0.0.5-dev
* @since 2024/8/17 23:02
@ -16,22 +15,19 @@ import lombok.Data;
public class DeleteMessageAction extends Action<DeleteMessageAction.Params, Void> {
/**
* 撤回消息
*
* @param messageId 消息ID
* @author wzp
* @since 2024/8/23 21:09 v0.0.5-dev
* @param messageId 消息ID
*/
public DeleteMessageAction(Integer messageId) {
public DeleteMessageAction(Integer messageId){
super.setAction(Actions.DELETE_MSG);
super.setParams(new Params(messageId));
}
@Data
@AllArgsConstructor
public static class Params {
/**
* 消息ID
*
* @since 2024/8/17 23:03 v0.0.5-dev
*/
@JSONField(name = "message_id")

View File

@ -1,14 +1,13 @@
package cn.wzpmc.api.actions.message.get;
package cn.wzpmc.api.api.actions.message.get;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.entities.CookiesInformation;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import cn.wzpmc.api.entities.CookiesInformation;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* 获取 Cookies
*
* @author wzp
* @version 0.0.6-dev
* @since 2024/8/24 20:43
@ -16,10 +15,9 @@ import lombok.Data;
public class GetCookiesAction extends Action<GetCookiesAction.Params, CookiesInformation> {
/**
* 获取 Cookies
*
* @param domain 需要获取 cookies 的域名
* @author wzp
* @since 2024/8/24 23:51 v0.0.6-dev
* @param domain 需要获取 cookies 的域名
*/
public GetCookiesAction(String domain) {
super.setAction(Actions.GET_COOKIES);
@ -28,20 +26,17 @@ public class GetCookiesAction extends Action<GetCookiesAction.Params, CookiesInf
/**
* 获取 Cookies
*
* @author wzp
* @since 2024/8/24 23:51 v0.0.6-dev
*/
public GetCookiesAction() {
this("");
}
@Data
@AllArgsConstructor
public static final class Params {
/**
* 需要获取 cookies 的域名
*
* @since 2024/8/24 23:32 v0.0.6-dev
*/
private String domain;

View File

@ -1,14 +1,13 @@
package cn.wzpmc.api.actions.message.get;
package cn.wzpmc.api.api.actions.message.get;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.entities.CredentialsInformation;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import cn.wzpmc.api.entities.CredentialsInformation;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* 获取 QQ 相关接口凭证
*
* @author wzp
* @version 0.0.6-dev
* @since 2024/8/24 20:44
@ -16,10 +15,9 @@ import lombok.Data;
public class GetCredentialsAction extends Action<GetCredentialsAction.Params, CredentialsInformation> {
/**
* 获取 QQ 相关接口凭证
*
* @param domain 需要获取 cookies 的域名
* @author wzp
* @since 2024/8/24 23:51 v0.0.6-dev
* @param domain 需要获取 cookies 的域名
*/
public GetCredentialsAction(String domain) {
super.setAction(Actions.GET_COOKIES);
@ -28,20 +26,17 @@ public class GetCredentialsAction extends Action<GetCredentialsAction.Params, Cr
/**
* 获取 QQ 相关接口凭证
*
* @author wzp
* @since 2024/8/24 23:52 v0.0.6-dev
*/
public GetCredentialsAction() {
this("");
}
@Data
@AllArgsConstructor
public static final class Params {
/**
* 需要获取 cookies 的域名
*
* @since 2024/8/24 23:32 v0.0.6-dev
*/
private String domain;

View File

@ -1,12 +1,11 @@
package cn.wzpmc.api.actions.message.get;
package cn.wzpmc.api.api.actions.message.get;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.entities.CsrfTokenInformation;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import cn.wzpmc.api.entities.CsrfTokenInformation;
/**
* 获取 CSRF Token
*
* @author wzp
* @version 0.0.6-dev
* @since 2024/8/24 20:44
@ -14,11 +13,10 @@ import cn.wzpmc.entities.CsrfTokenInformation;
public class GetCsrfTokenAction extends Action<Void, CsrfTokenInformation> {
/**
* 获取 CSRF Token
*
* @author wzp
* @since 2024/8/24 23:52 v0.0.6-dev
*/
public GetCsrfTokenAction() {
public GetCsrfTokenAction(){
super.setAction(Actions.GET_CSRF_TOKEN);
}
}

View File

@ -1,14 +1,13 @@
package cn.wzpmc.api.actions.message.get;
package cn.wzpmc.api.api.actions.message.get;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.entities.MessageInformation;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import cn.wzpmc.api.entities.MessageInformation;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* 获取合并转发消息
*
* @author wzp
* @version 0.0.5-dev
* @since 2024/8/23 19:46
@ -16,22 +15,19 @@ import lombok.Data;
public class GetForwardMessageAction extends Action<GetForwardMessageAction.Params, MessageInformation> {
/**
* 获取合并转发消息
*
* @param id 合并转发ID
* @author wzp
* @since 2024/8/23 21:10 v0.0.5-dev
* @param id 合并转发ID
*/
public GetForwardMessageAction(String id) {
public GetForwardMessageAction(String id){
super.setAction(Actions.GET_FORWARD_MSG);
super.setParams(new GetForwardMessageAction.Params(id));
}
@Data
@AllArgsConstructor
public static final class Params {
/**
* 合并转发ID
*
* @since 2024/8/23 19:47 v0.0.5-dev
*/
private String id;

View File

@ -1,26 +1,24 @@
package cn.wzpmc.api.actions.message.get;
package cn.wzpmc.api.api.actions.message.get;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.entities.FriendInformation;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import cn.wzpmc.api.entities.MessageInformation;
import java.util.List;
/**
* 获取好友列表
*
* @author wzp
* @version 0.0.6-dev
* @since 2024/8/24 20:41
*/
public class GetFriendListAction extends Action<Void, List<FriendInformation>> {
public class GetFriendListAction extends Action<Void, List<MessageInformation>> {
/**
* 获取好友列表
*
* @author wzp
* @since 2024/8/24 23:52 v0.0.6-dev
*/
public GetFriendListAction() {
public GetFriendListAction(){
super.setAction(Actions.GET_FRIEND_LIST);
}
}

View File

@ -1,16 +1,15 @@
package cn.wzpmc.api.actions.message.get;
package cn.wzpmc.api.api.actions.message.get;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.entities.HonorInformation;
import cn.wzpmc.entities.HonorType;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import cn.wzpmc.api.entities.HonorInformation;
import cn.wzpmc.api.entities.HonorType;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* 获取群荣誉信息
*
* @author wzp
* @version 0.0.6-dev
* @since 2024/8/24 20:43
@ -18,11 +17,10 @@ import lombok.Data;
public class GetGroupHonorInfoAction extends Action<GetGroupHonorInfoAction.Params, HonorInformation> {
/**
* 获取群荣誉信息
*
* @param groupId 群号
* @param type 要获取的群荣誉类型可传入 talkative performer legend strong_newbie emotion 以分别获取单个类型的群荣誉数据或传入 all 获取所有数据
* @author wzp
* @since 2024/8/24 23:52 v0.0.6-dev
* @param groupId 群号
* @param type 要获取的群荣誉类型可传入 talkative performer legend strong_newbie emotion 以分别获取单个类型的群荣誉数据或传入 all 获取所有数据
*/
public GetGroupHonorInfoAction(Long groupId, HonorType type) {
this.setAction(Actions.GET_GROUP_HONOR_INFO);
@ -31,28 +29,24 @@ public class GetGroupHonorInfoAction extends Action<GetGroupHonorInfoAction.Para
/**
* 获取群荣誉信息
*
* @param groupId 群号
* @author wzp
* @since 2024/8/24 23:53 v0.0.6-dev
* @param groupId 群号
*/
public GetGroupHonorInfoAction(Long groupId) {
this(groupId, HonorType.ALL);
}
@Data
@AllArgsConstructor
public static final class Params {
/**
* 群号
*
* @since 2024/8/24 23:52 v0.0.6-dev
*/
@JSONField(name = "group_id")
private Long groupId;
/**
* 要获取的群荣誉类型可传入 talkative performer legend strong_newbie emotion 以分别获取单个类型的群荣誉数据或传入 all 获取所有数据
*
* @since 2024/8/24 23:52 v0.0.6-dev
*/
private HonorType type;

View File

@ -1,15 +1,14 @@
package cn.wzpmc.api.actions.message.get;
package cn.wzpmc.api.api.actions.message.get;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.entities.GroupInformation;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import cn.wzpmc.api.entities.GroupInformation;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* 获取群信息
*
* @author wzp
* @version 0.0.6-dev
* @since 2024/8/24 20:41
@ -17,41 +16,36 @@ import lombok.Data;
public class GetGroupInfoAction extends Action<GetGroupInfoAction.Params, GroupInformation> {
/**
* 获取群信息
*
* @param groupId 群号
* @param noCache 是否不使用缓存使用缓存可能更新不及时但响应更快
* @author wzp
* @since 2024/8/24 23:53 v0.0.6-dev
* @param groupId 群号
* @param noCache 是否不使用缓存使用缓存可能更新不及时但响应更快
*/
public GetGroupInfoAction(Long groupId, Boolean noCache) {
public GetGroupInfoAction(Long groupId, Boolean noCache){
super.setAction(Actions.GET_GROUP_INFO);
super.setParams(new Params(groupId, noCache));
}
/**
* 获取群信息
*
* @param groupId 群号
* @author wzp
* @since 2024/8/24 23:53 v0.0.6-dev
* @param groupId 群号
*/
public GetGroupInfoAction(Long groupId) {
public GetGroupInfoAction(Long groupId){
this(groupId, false);
}
@Data
@AllArgsConstructor
public static final class Params {
/**
* 群号
*
* @since 2024/8/24 22:58 v0.0.6-dev
*/
@JSONField(name = "group_id")
private Long groupId;
/**
* 是否不使用缓存使用缓存可能更新不及时但响应更快
*
* @since 2024/8/24 22:58 v0.0.6-dev
*/
@JSONField(name = "no_cache", defaultValue = "false")

View File

@ -1,14 +1,13 @@
package cn.wzpmc.api.actions.message.get;
package cn.wzpmc.api.api.actions.message.get;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.entities.GroupInformation;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import cn.wzpmc.api.entities.GroupInformation;
import java.util.List;
/**
* 获取群列表
*
* @author wzp
* @version 0.0.6-dev
* @since 2024/8/24 20:42
@ -16,11 +15,10 @@ import java.util.List;
public class GetGroupListAction extends Action<Void, List<GroupInformation>> {
/**
* 获取群列表
*
* @author wzp
* @since 2024/8/24 23:54 v0.0.6-dev
*/
public GetGroupListAction() {
public GetGroupListAction(){
super.setAction(Actions.GET_GROUP_LIST);
}
}

View File

@ -1,15 +1,14 @@
package cn.wzpmc.api.actions.message.get;
package cn.wzpmc.api.api.actions.message.get;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.entities.GroupMemberInformation;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import cn.wzpmc.api.entities.GroupMemberInformation;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* 获取群成员信息
*
* @author wzp
* @version 0.0.6-dev
* @since 2024/8/24 20:42
@ -17,50 +16,44 @@ import lombok.Data;
public class GetGroupMemberInfoAction extends Action<GetGroupMemberInfoAction.Params, GroupMemberInformation> {
/**
* 获取群成员信息
*
* @param groupId 群号
* @param userId QQ
* @param noCache 是否不使用缓存
* @author wzp
* @since 2024/8/24 23:54 v0.0.6-dev
* @param groupId 群号
* @param userId QQ
* @param noCache 是否不使用缓存
*/
public GetGroupMemberInfoAction(Long groupId, Long userId, Boolean noCache) {
public GetGroupMemberInfoAction(Long groupId, Long userId, Boolean noCache){
super.setAction(Actions.GET_GROUP_MEMBER_INFO);
super.setParams(new Params(groupId, userId, noCache));
}
/**
* 获取群成员信息
*
* @param groupId 群号
* @param userId QQ
* @author wzp
* @since 2024/8/24 23:54 v0.0.6-dev
* @param groupId 群号
* @param userId QQ
*/
public GetGroupMemberInfoAction(Long groupId, Long userId) {
this(groupId, userId, false);
}
@Data
@AllArgsConstructor
public static final class Params {
/**
* 群号
*
* @since 2024/8/24 23:02 v0.0.6-dev
*/
@JSONField(name = "group_id")
private Long groupId;
/**
* QQ
*
* @since 2024/8/24 23:02 v0.0.6-dev
*/
@JSONField(name = "user_id")
private Long userId;
/**
* 是否不使用缓存
*
* @since 2024/8/24 23:02 v0.0.6-dev
*/
@JSONField(name = "no_cache", defaultValue = "false")

View File

@ -1,8 +1,8 @@
package cn.wzpmc.api.actions.message.get;
package cn.wzpmc.api.api.actions.message.get;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.entities.GroupMemberInformation;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import cn.wzpmc.api.entities.GroupMemberInformation;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
@ -11,7 +11,6 @@ import java.util.List;
/**
* 获取群成员列表
*
* @author wzp
* @version 0.0.6-dev
* @since 2024/8/24 20:42
@ -19,22 +18,19 @@ import java.util.List;
public class GetGroupMemberListAction extends Action<GetGroupMemberListAction.Params, List<GroupMemberInformation>> {
/**
* 获取群成员列表
*
* @param groupId 群号
* @author wzp
* @since 2024/8/24 23:54 v0.0.6-dev
* @param groupId 群号
*/
public GetGroupMemberListAction(Long groupId) {
super.setAction(Actions.GET_GROUP_MEMBER_LIST);
super.setParams(new Params(groupId));
}
@Data
@AllArgsConstructor
public static final class Params {
/**
* 群号
*
* @since 2024/8/24 23:08 v0.0.6-dev
*/
@JSONField(name = "group_id")

View File

@ -1,14 +1,13 @@
package cn.wzpmc.api.actions.message.get;
package cn.wzpmc.api.api.actions.message.get;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.entities.FilePathInformation;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import cn.wzpmc.api.entities.FilePathInformation;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* 获取图片
*
* @author wzp
* @version 0.0.6-dev
* @since 2024/8/24 20:44
@ -16,22 +15,19 @@ import lombok.Data;
public class GetImageAction extends Action<GetImageAction.Params, FilePathInformation> {
/**
* 获取图片
*
* @param file 收到的图片文件名消息段的 file 参数 6B4DE3DFD1BD271E3297859D41C530F5.jpg
* @author wzp
* @since 2024/8/24 23:55 v0.0.6-dev
* @param file 收到的图片文件名消息段的 file 参数 6B4DE3DFD1BD271E3297859D41C530F5.jpg
*/
public GetImageAction(String file) {
super.setAction(Actions.GET_IMAGE);
super.setParams(new Params(file));
}
@Data
@AllArgsConstructor
public static final class Params {
/**
* 收到的图片文件名消息段的 file 参数 6B4DE3DFD1BD271E3297859D41C530F5.jpg
*
* @since 2024/8/24 23:41 v0.0.6-dev
*/
private String file;

View File

@ -1,12 +1,11 @@
package cn.wzpmc.api.actions.message.get;
package cn.wzpmc.api.api.actions.message.get;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.user.IBot;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import cn.wzpmc.api.user.IBot;
/**
* 获取登录号信息
*
* @author wzp
* @version 0.0.6-dev
* @since 2024/8/24 20:18
@ -14,7 +13,6 @@ import cn.wzpmc.user.IBot;
public class GetLoginInfoAction extends Action<Void, IBot> {
/**
* 获取登录号信息
*
* @author wzp
* @since 2024/8/24 23:55 v0.0.6-dev
*/

View File

@ -1,15 +1,14 @@
package cn.wzpmc.api.actions.message.get;
package cn.wzpmc.api.api.actions.message.get;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.entities.MessageInformation;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import cn.wzpmc.api.entities.MessageInformation;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* 获取消息
*
* @author wzp
* @version 0.0.5-dev
* @since 2024/8/17 23:07
@ -17,22 +16,19 @@ import lombok.Data;
public class GetMessageAction extends Action<GetMessageAction.Params, MessageInformation> {
/**
* 获取消息
*
* @param messageId 消息 ID
* @author wzp
* @since 2024/8/23 21:11 v0.0.5-dev
* @param messageId 消息 ID
*/
public GetMessageAction(Integer messageId) {
public GetMessageAction(Integer messageId){
super.setAction(Actions.GET_MSG);
super.setParams(new Params(messageId));
}
@Data
@AllArgsConstructor
public static class Params {
/**
* 消息 ID
*
* @since 2024/8/23 21:11 v0.0.5-dev
*/
@JSONField(name = "message_id")

View File

@ -1,15 +1,14 @@
package cn.wzpmc.api.actions.message.get;
package cn.wzpmc.api.api.actions.message.get;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.entities.FilePathInformation;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import cn.wzpmc.api.entities.FilePathInformation;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* 获取语音
*
* @author wzp
* @version 0.0.6-dev
* @since 2024/8/24 20:44
@ -17,29 +16,25 @@ import lombok.Data;
public class GetRecordAction extends Action<GetRecordAction.Params, FilePathInformation> {
/**
* 获取语音
*
* @param file 收到的语音文件名消息段的 file 参数 0B38145AA44505000B38145AA4450500.silk
* @param outFormat 要转换到的格式目前支持 mp3amrwmam4aspxoggwavflac
* @author wzp
* @since 2024/8/24 23:55 v0.0.6-dev
* @param file 收到的语音文件名消息段的 file 参数 0B38145AA44505000B38145AA4450500.silk
* @param outFormat 要转换到的格式目前支持 mp3amrwmam4aspxoggwavflac
*/
public GetRecordAction(String file, String outFormat) {
public GetRecordAction(String file, String outFormat){
super.setAction(Actions.GET_RECORD);
super.setParams(new Params(file, outFormat));
}
@Data
@AllArgsConstructor
public static final class Params {
/**
* 收到的语音文件名消息段的 file 参数 0B38145AA44505000B38145AA4450500.silk
*
* @since 2024/8/24 23:35 v0.0.6-dev
*/
private String file;
/**
* 要转换到的格式目前支持 mp3amrwmam4aspxoggwavflac
*
* @since 2024/8/24 23:35 v0.0.6-dev
*/
@JSONField(name = "out_format")

View File

@ -1,12 +1,11 @@
package cn.wzpmc.api.actions.message.get;
package cn.wzpmc.api.api.actions.message.get;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.entities.BotStatus;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import cn.wzpmc.api.entities.BotStatus;
/**
* 获取运行状态
*
* @author wzp
* @version 0.0.6-dev
* @since 2024/8/24 20:45
@ -14,11 +13,10 @@ import cn.wzpmc.entities.BotStatus;
public class GetStatusAction extends Action<Void, BotStatus> {
/**
* 获取运行状态
*
* @author wzp
* @since 2024/8/24 23:55 v0.0.6-dev
*/
public GetStatusAction() {
public GetStatusAction(){
super.setAction(Actions.GET_STATUS);
}
}

View File

@ -1,15 +1,14 @@
package cn.wzpmc.api.actions.message.get;
package cn.wzpmc.api.api.actions.message.get;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.user.IUser;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import cn.wzpmc.api.user.IUser;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* 获取陌生人信息
*
* @author wzp
* @version 0.0.6-dev
* @since 2024/8/24 20:41
@ -17,41 +16,36 @@ import lombok.Data;
public class GetStrangerInfoAction extends Action<GetStrangerInfoAction.Params, IUser> {
/**
* 获取陌生人信息
*
* @param userId QQ
* @param noCache 是否不使用缓存使用缓存可能更新不及时但响应更快
* @author wzp
* @since 2024/8/24 23:55 v0.0.6-dev
* @param userId QQ
* @param noCache 是否不使用缓存使用缓存可能更新不及时但响应更快
*/
public GetStrangerInfoAction(Long userId, boolean noCache) {
public GetStrangerInfoAction(Long userId, boolean noCache){
super.setAction(Actions.GET_STRANGER_INFO);
super.setParams(new GetStrangerInfoAction.Params(userId, noCache));
}
/**
* 获取陌生人信息
*
* @param userId QQ
* @author wzp
* @since 2024/8/24 23:55 v0.0.6-dev
* @param userId QQ
*/
public GetStrangerInfoAction(Long userId) {
public GetStrangerInfoAction(Long userId){
this(userId, false);
}
@Data
@AllArgsConstructor
public static final class Params {
/**
* QQ
*
* @since 2024/8/24 22:52 v0.0.6-dev
*/
@JSONField(name = "user_id")
private Long userId;
/**
* 是否不使用缓存使用缓存可能更新不及时但响应更快
*
* @since 2024/8/24 22:52 v0.0.6-dev
*/
@JSONField(name = "no_cache", defaultValue = "false")

View File

@ -1,12 +1,11 @@
package cn.wzpmc.api.actions.message.get;
package cn.wzpmc.api.api.actions.message.get;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.entities.VersionInformation;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import cn.wzpmc.api.entities.VersionInformation;
/**
* 获取版本信息
*
* @author wzp
* @version 0.0.6-dev
* @since 2024/8/24 20:45
@ -14,11 +13,10 @@ import cn.wzpmc.entities.VersionInformation;
public class GetVersionInfoAction extends Action<Void, VersionInformation> {
/**
* 获取版本信息
*
* @author wzp
* @since 2024/8/24 23:55 v0.0.6-dev
*/
public GetVersionInfoAction() {
public GetVersionInfoAction(){
super.setAction(Actions.GET_VERSION_INFO);
}

View File

@ -1,15 +1,14 @@
package cn.wzpmc.api.actions.message.send;
package cn.wzpmc.api.api.actions.message.send;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.message.MessageComponent;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import cn.wzpmc.api.message.MessageComponent;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* 发送群消息
*
* @author wzp
* @version 0.0.5-dev
* @since 2024/8/17 22:52
@ -17,49 +16,43 @@ import lombok.Data;
public class SendGroupMessageAction extends Action<SendGroupMessageAction.Params, SendMessageActionResponseData> {
/**
* 发送群消息
*
* @param groupId 群号
* @param message 要发送的内容
* @param autoEscape 消息内容是否作为纯文本发送即不解析 CQ 只在 message 字段是字符串时有效
* @author wzp
* @since 2024/8/23 21:11 v0.0.5-dev
* @param groupId 群号
* @param message 要发送的内容
* @param autoEscape 消息内容是否作为纯文本发送即不解析 CQ 只在 message 字段是字符串时有效
*/
public SendGroupMessageAction(Long groupId, MessageComponent message, boolean autoEscape) {
public SendGroupMessageAction(Long groupId, MessageComponent message, boolean autoEscape){
super.setAction(Actions.SEND_GROUP_MSG);
super.setParams(new SendGroupMessageAction.Params(groupId, message, autoEscape));
}
/**
* 发送群消息
*
* @param groupId 群号
* @param message 要发送的内容
* @author wzp
* @since 2024/8/23 21:11 v0.0.5-dev
* @param groupId 群号
* @param message 要发送的内容
*/
public SendGroupMessageAction(Long groupId, MessageComponent message) {
public SendGroupMessageAction(Long groupId, MessageComponent message){
this(groupId, message, false);
}
@Data
@AllArgsConstructor
public static class Params {
/**
* 群号
*
* @since 2024/8/17 22:54 v0.0.5-dev
*/
@JSONField(name = "group_id")
private Long groupId;
/**
* 要发送的内容
*
* @since 2024/8/17 22:54 v0.0.5-dev
*/
private MessageComponent message;
/**
* 消息内容是否作为纯文本发送即不解析 CQ 只在 message 字段是字符串时有效
*
* @since 2024/8/17 22:51 v0.0.5-dev
*/
@JSONField(name = "auto_escape")

View File

@ -1,14 +1,13 @@
package cn.wzpmc.api.actions.message.send;
package cn.wzpmc.api.api.actions.message.send;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* 发送好友赞
*
* @author wzp
* @version 0.0.5-dev
* @since 2024/8/23 19:49
@ -16,41 +15,36 @@ import lombok.Data;
public class SendLikeAction extends Action<SendLikeAction.Params, Void> {
/**
* 发送好友赞
*
* @param userId 对方 QQ
* @param times 赞的次数每个好友每天最多 10
* @author wzp
* @since 2024/8/23 21:12 v0.0.5-dev
* @param userId 对方 QQ
* @param times 赞的次数每个好友每天最多 10
*/
public SendLikeAction(Long userId, Long times) {
public SendLikeAction(Long userId, Long times){
super.setAction(Actions.SEND_LIKE);
super.setParams(new Params(userId, times));
}
/**
* 发送好友赞
*
* @param userId 对方 QQ
* @author wzp
* @since 2024/8/23 21:12 v0.0.5-dev
* @param userId 对方 QQ
*/
public SendLikeAction(Long userId) {
public SendLikeAction(Long userId){
this(userId, 1L);
}
@Data
@AllArgsConstructor
public static final class Params {
/**
* 对方 QQ
*
* @since 2024/8/23 21:12 v0.0.5-dev
*/
@JSONField(name = "user_id")
private Long userId;
/**
* 赞的次数每个好友每天最多 10
*
* @since 2024/8/23 21:12 v0.0.5-dev
*/
@JSONField(defaultValue = "1")

View File

@ -1,11 +1,10 @@
package cn.wzpmc.api.actions.message.send;
package cn.wzpmc.api.api.actions.message.send;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.Data;
/**
* 发送私聊消息返回
*
* @author wzp
* @version 0.0.5-dev
* @since 2024/8/17 21:55
@ -14,7 +13,6 @@ import lombok.Data;
public class SendMessageActionResponseData {
/**
* 消息 ID
*
* @since 2024/8/17 22:51 v0.0.5-dev
*/
@JSONField(name = "message_id")

View File

@ -1,15 +1,14 @@
package cn.wzpmc.api.actions.message.send;
package cn.wzpmc.api.api.actions.message.send;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.message.MessageComponent;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import cn.wzpmc.api.message.MessageComponent;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* 发送私聊消息
*
* @author wzp
* @version 0.0.5-dev
* @since 2024/8/17 21:54
@ -17,49 +16,43 @@ import lombok.Data;
public class SendPrivateMessageAction extends Action<SendPrivateMessageAction.Params, SendMessageActionResponseData> {
/**
* 发送私聊消息
*
* @param userId 对方 QQ
* @param message 要发送的内容
* @param autoEscape 消息内容是否作为纯文本发送即不解析 CQ 只在 message 字段是字符串时有效
* @author wzp
* @since 2024/8/23 21:13 v0.0.5-dev
* @param userId 对方 QQ
* @param message 要发送的内容
* @param autoEscape 消息内容是否作为纯文本发送即不解析 CQ 只在 message 字段是字符串时有效
*/
public SendPrivateMessageAction(Long userId, MessageComponent message, boolean autoEscape) {
public SendPrivateMessageAction(Long userId, MessageComponent message, boolean autoEscape){
super.setAction(Actions.SEND_PRIVATE_MSG);
super.setParams(new Params(userId, message, autoEscape));
}
/**
* 发送私聊消息
*
* @param userId 对方 QQ
* @param message 要发送的内容
* @author wzp
* @since 2024/8/23 21:14 v0.0.5-dev
* @param userId 对方 QQ
* @param message 要发送的内容
*/
public SendPrivateMessageAction(Long userId, MessageComponent message) {
public SendPrivateMessageAction(Long userId, MessageComponent message){
this(userId, message, false);
}
@Data
@AllArgsConstructor
public static class Params {
/**
* 对方 QQ
*
* @since 2024/8/17 22:51 v0.0.5-dev
*/
@JSONField(name = "user_id")
private Long userId;
/**
* 要发送的内容
*
* @since 2024/8/17 22:51 v0.0.5-dev
*/
private MessageComponent message;
/**
* 消息内容是否作为纯文本发送即不解析 CQ 只在 message 字段是字符串时有效
*
* @since 2024/8/17 22:51 v0.0.5-dev
*/
@JSONField(name = "auto_escape")

View File

@ -1,14 +1,13 @@
package cn.wzpmc.api.actions.message.set;
package cn.wzpmc.api.api.actions.message.set;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* 处理加好友请求
*
* @author wzp
* @version 0.0.6-dev
* @since 2024/8/24 20:08
@ -16,25 +15,23 @@ import lombok.Data;
public class SetFriendAddRequestAction extends Action<SetFriendAddRequestAction.Params, Void> {
/**
* 处理加好友请求
*
* @param flag 加好友请求的 flag需从上报的数据中获得
* @param approve 是否同意请求
* @param remark 添加后的好友备注仅在同意时有效
* @author wzp
* @since 2024/8/24 23:56 v0.0.6-dev
* @param flag 加好友请求的 flag需从上报的数据中获得
* @param approve 是否同意请求
* @param remark 添加后的好友备注仅在同意时有效
*/
public SetFriendAddRequestAction(String flag, boolean approve, String remark) {
public SetFriendAddRequestAction(String flag, boolean approve, String remark){
super.setAction(Actions.SET_FRIEND_ADD_REQUEST);
super.setParams(new Params(flag, approve, remark));
}
/**
* 处理加好友请求
*
* @param flag 加好友请求的 flag需从上报的数据中获得
* @param approve 是否同意请求
* @author wzp
* @since 2024/8/24 23:56 v0.0.6-dev
* @param flag 加好友请求的 flag需从上报的数据中获得
* @param approve 是否同意请求
*/
public SetFriendAddRequestAction(String flag, boolean approve) {
this(flag, approve, "");
@ -42,11 +39,10 @@ public class SetFriendAddRequestAction extends Action<SetFriendAddRequestAction.
/**
* 处理加好友请求
*
* @param flag 加好友请求的 flag需从上报的数据中获得
* @param remark 添加后的好友备注仅在同意时有效
* @author wzp
* @since 2024/8/24 23:56 v0.0.6-dev
* @param flag 加好友请求的 flag需从上报的数据中获得
* @param remark 添加后的好友备注仅在同意时有效
*/
public SetFriendAddRequestAction(String flag, String remark) {
this(flag, true, remark);
@ -54,34 +50,29 @@ public class SetFriendAddRequestAction extends Action<SetFriendAddRequestAction.
/**
* 处理加好友请求
*
* @param flag 加好友请求的 flag需从上报的数据中获得
* @author wzp
* @since 2024/8/24 23:56 v0.0.6-dev
* @param flag 加好友请求的 flag需从上报的数据中获得
*/
public SetFriendAddRequestAction(String flag) {
this(flag, true);
}
@Data
@AllArgsConstructor
public static final class Params {
/**
* 加好友请求的 flag需从上报的数据中获得
*
* @since 2024/8/24 21:09 v0.0.6-dev
*/
private String flag;
/**
* 是否同意请求
*
* @since 2024/8/24 21:09 v0.0.6-dev
*/
@JSONField(defaultValue = "true")
private boolean approve;
/**
* 添加后的好友备注仅在同意时有效
*
* @since 2024/8/24 21:09 v0.0.6-dev
*/
private String remark;

View File

@ -1,15 +1,14 @@
package cn.wzpmc.api.actions.message.set;
package cn.wzpmc.api.api.actions.message.set;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.events.request.group.GroupJoinRequestEventSubType;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import cn.wzpmc.api.events.request.group.GroupJoinRequestEventSubType;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* 处理加群请求邀请
*
* @author wzp
* @version 0.0.6-dev
* @since 2024/8/24 20:18
@ -17,13 +16,12 @@ import lombok.Data;
public class SetGroupAddRequestAction extends Action<SetGroupAddRequestAction.Params, Void> {
/**
* 处理加群请求邀请
*
* @param flag 加群请求的 flag需从上报的数据中获得
* @param type 请求类型
* @param approve 是否同意请求邀请
* @param reason 拒绝理由仅在拒绝时有效
* @author wzp
* @since 2024/8/24 23:56 v0.0.6-dev
* @param flag 加群请求的 flag需从上报的数据中获得
* @param type 请求类型
* @param approve 是否同意请求邀请
* @param reason 拒绝理由仅在拒绝时有效
*/
public SetGroupAddRequestAction(String flag, GroupJoinRequestEventSubType type, boolean approve, String reason) {
super.setAction(Actions.SET_GROUP_ADD_REQUEST);
@ -32,12 +30,11 @@ public class SetGroupAddRequestAction extends Action<SetGroupAddRequestAction.Pa
/**
* 处理加群请求邀请
*
* @param flag 加群请求的 flag需从上报的数据中获得
* @param type 请求类型
* @param reason 拒绝理由仅在拒绝时有效
* @author wzp
* @since 2024/8/24 23:56 v0.0.6-dev
* @param flag 加群请求的 flag需从上报的数据中获得
* @param type 请求类型
* @param reason 拒绝理由仅在拒绝时有效
*/
public SetGroupAddRequestAction(String flag, GroupJoinRequestEventSubType type, String reason) {
this(flag, type, false, reason);
@ -45,41 +42,35 @@ public class SetGroupAddRequestAction extends Action<SetGroupAddRequestAction.Pa
/**
* 处理加群请求邀请
*
* @param flag 加群请求的 flag需从上报的数据中获得
* @param type 请求类型
* @author wzp
* @since 2024/8/24 23:56 v0.0.6-dev
* @param flag 加群请求的 flag需从上报的数据中获得
* @param type 请求类型
*/
public SetGroupAddRequestAction(String flag, GroupJoinRequestEventSubType type) {
this(flag, type, true, "");
}
@Data
@AllArgsConstructor
public static final class Params {
/**
* 加群请求的 flag需从上报的数据中获得
*
* @since 2024/8/24 21:14 v0.0.6-dev
*/
private String flag;
/**
* 请求类型
*
* @since 2024/8/24 21:14 v0.0.6-dev
*/
private GroupJoinRequestEventSubType type;
/**
* 是否同意请求邀请
*
* @since 2024/8/24 21:14 v0.0.6-dev
*/
@JSONField(defaultValue = "true")
private boolean approve;
/**
* 拒绝理由仅在拒绝时有效
*
* @since 2024/8/24 21:14 v0.0.6-dev
*/
private String reason;

View File

@ -1,14 +1,13 @@
package cn.wzpmc.api.actions.message.set;
package cn.wzpmc.api.api.actions.message.set;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* 群组设置管理员
*
* @author wzp
* @version 0.0.5-dev
* @since 2024/8/23 20:51
@ -16,50 +15,44 @@ import lombok.Data;
public class SetGroupAdminAction extends Action<SetGroupAdminAction.Params, Void> {
/**
* 群组设置管理员
*
* @param groupId 群号
* @param userId 要设置管理员的 QQ
* @param enable true 为设置false 为取消
* @author wzp
* @since 2024/8/23 21:14 v0.0.5-dev
* @param groupId 群号
* @param userId 要设置管理员的 QQ
* @param enable true 为设置false 为取消
*/
public SetGroupAdminAction(Long groupId, Long userId, Boolean enable) {
public SetGroupAdminAction(Long groupId, Long userId, Boolean enable){
super.setAction(Actions.SET_GROUP_ADMIN);
super.setParams(new Params(groupId, userId, enable));
}
/**
* 群组设置管理员
*
* @param groupId 群号
* @param userId 要设置管理员的 QQ
* @author wzp
* @since 2024/8/23 21:14 v0.0.5-dev
* @param groupId 群号
* @param userId 要设置管理员的 QQ
*/
public SetGroupAdminAction(Long groupId, Long userId) {
this(groupId, userId, true);
}
@Data
@AllArgsConstructor
public static final class Params {
/**
* 群号
*
* @since 2024/8/23 21:15 v0.0.5-dev
*/
@JSONField(name = "group_id")
private Long groupId;
/**
* 要设置管理员的 QQ
*
* @since 2024/8/23 21:15 v0.0.5-dev
*/
@JSONField(name = "user_id")
private Long userId;
/**
* true 为设置false 为取消
*
* @since 2024/8/23 21:15 v0.0.5-dev
*/
@JSONField(defaultValue = "true")

View File

@ -1,14 +1,13 @@
package cn.wzpmc.api.actions.message.set;
package cn.wzpmc.api.api.actions.message.set;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* 群组匿名
*
* @author wzp
* @version 0.0.5-dev
* @since 2024/8/23 20:55
@ -16,11 +15,10 @@ import lombok.Data;
public class SetGroupAnonymousAction extends Action<SetGroupAnonymousAction.Params, Void> {
/**
* 群组匿名
*
* @param groupId 群号
* @param enable 是否允许匿名聊天
* @author wzp
* @since 2024/8/23 21:16 v0.0.5-dev
* @param groupId 群号
* @param enable 是否允许匿名聊天
*/
public SetGroupAnonymousAction(Long groupId, Boolean enable) {
super.setAction(Actions.SET_GROUP_ANONYMOUS);
@ -29,28 +27,24 @@ public class SetGroupAnonymousAction extends Action<SetGroupAnonymousAction.Para
/**
* 群组匿名
*
* @param groupId 群号
* @author wzp
* @since 2024/8/23 21:16 v0.0.5-dev
* @param groupId 群号
*/
public SetGroupAnonymousAction(Long groupId) {
this(groupId, true);
}
@Data
@AllArgsConstructor
public static final class Params {
/**
* 群号
*
* @since 2024/8/23 21:16 v0.0.5-dev
*/
@JSONField(name = "group_id")
private Long groupId;
/**
* 是否允许匿名聊天
*
* @since 2024/8/23 21:16 v0.0.5-dev
*/
@JSONField(defaultValue = "true")

View File

@ -1,15 +1,14 @@
package cn.wzpmc.api.actions.message.set;
package cn.wzpmc.api.api.actions.message.set;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.message.json.parts.Anonymous;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import cn.wzpmc.api.message.json.parts.Anonymous;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* 群组匿名用户禁言
*
* @author wzp
* @version 0.0.5-dev
* @since 2024/8/23 20:08
@ -17,13 +16,12 @@ import lombok.Data;
public class SetGroupAnonymousBanAction extends Action<SetGroupAnonymousBanAction.Params, Void> {
/**
* 群组匿名用户禁言
*
* @param groupId 群号
* @param anonymous 可选要禁言的匿名用户对象群消息上报的 anonymous 字段
* @param flag 可选要禁言的匿名用户的 flag需从群消息上报的数据中获得
* @param duration 禁言时长单位秒无法取消匿名用户禁言默认30 * 60
* @author wzp
* @since 2024/8/23 21:17 v0.0.5-dev
* @param groupId 群号
* @param anonymous 可选要禁言的匿名用户对象群消息上报的 anonymous 字段
* @param flag 可选要禁言的匿名用户的 flag需从群消息上报的数据中获得
* @param duration 禁言时长单位秒无法取消匿名用户禁言默认30 * 60
*/
protected SetGroupAnonymousBanAction(Long groupId, Anonymous anonymous, String flag, Long duration) {
super.setAction(Actions.SET_GROUP_ANONYMOUS_BAN);
@ -32,12 +30,11 @@ public class SetGroupAnonymousBanAction extends Action<SetGroupAnonymousBanActio
/**
* 群组匿名用户禁言
*
* @param groupId 群号
* @param anonymous 要禁言的匿名用户对象群消息上报的 anonymous 字段
* @param duration 禁言时长单位秒无法取消匿名用户禁言
* @author wzp
* @since 2024/8/23 21:17 v0.0.5-dev
* @param groupId 群号
* @param anonymous 要禁言的匿名用户对象群消息上报的 anonymous 字段
* @param duration 禁言时长单位秒无法取消匿名用户禁言
*/
public SetGroupAnonymousBanAction(Long groupId, Anonymous anonymous, Long duration) {
this(groupId, anonymous, null, duration);
@ -45,11 +42,10 @@ public class SetGroupAnonymousBanAction extends Action<SetGroupAnonymousBanActio
/**
* 群组匿名用户禁言
*
* @param groupId 群号
* @param anonymous 要禁言的匿名用户对象群消息上报的 anonymous 字段
* @author wzp
* @since 2024/8/23 21:17 v0.0.5-dev
* @param groupId 群号
* @param anonymous 要禁言的匿名用户对象群消息上报的 anonymous 字段
*/
public SetGroupAnonymousBanAction(Long groupId, Anonymous anonymous) {
this(groupId, anonymous, 1800L);
@ -57,12 +53,11 @@ public class SetGroupAnonymousBanAction extends Action<SetGroupAnonymousBanActio
/**
* 群组匿名用户禁言
*
* @param groupId 群号
* @param flag 要禁言的匿名用户的 flag需从群消息上报的数据中获得
* @param duration 禁言时长单位秒无法取消匿名用户禁言
* @author wzp
* @since 2024/8/23 21:17 v0.0.5-dev
* @param groupId 群号
* @param flag 要禁言的匿名用户的 flag需从群消息上报的数据中获得
* @param duration 禁言时长单位秒无法取消匿名用户禁言
*/
public SetGroupAnonymousBanAction(Long groupId, String flag, Long duration) {
this(groupId, null, flag, duration);
@ -70,41 +65,35 @@ public class SetGroupAnonymousBanAction extends Action<SetGroupAnonymousBanActio
/**
* 群组匿名用户禁言
*
* @param groupId 群号
* @param flag 要禁言的匿名用户的 flag需从群消息上报的数据中获得
* @author wzp
* @since 2024/8/23 21:17 v0.0.5-dev
* @param groupId 群号
* @param flag 要禁言的匿名用户的 flag需从群消息上报的数据中获得
*/
public SetGroupAnonymousBanAction(Long groupId, String flag) {
this(groupId, flag, 1800L);
}
@Data
@AllArgsConstructor
public static final class Params {
/**
* 群号
*
* @since 2024/8/23 21:17 v0.0.5-dev
*/
@JSONField(name = "group_id")
private Long groupId;
/**
* 可选要禁言的匿名用户对象群消息上报的 anonymous 字段
*
* @since 2024/8/23 21:17 v0.0.5-dev
*/
private Anonymous anonymous;
/**
* 可选要禁言的匿名用户的 flag需从群消息上报的数据中获得
*
* @since 2024/8/23 21:17 v0.0.5-dev
*/
private String flag;
/**
* 禁言时长单位秒无法取消匿名用户禁言默认30 * 60
*
* @since 2024/8/23 21:17 v0.0.5-dev
*/
@JSONField(defaultValue = "1800")

View File

@ -1,14 +1,13 @@
package cn.wzpmc.api.actions.message.set;
package cn.wzpmc.api.api.actions.message.set;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* 群组单人禁言
*
* @author wzp
* @version 0.0.5-dev
* @since 2024/8/23 20:03
@ -16,50 +15,44 @@ import lombok.Data;
public class SetGroupBanAction extends Action<SetGroupBanAction.Params, Void> {
/**
* 群组单人禁言
*
* @param groupId 群号
* @param userId 要禁言的 QQ
* @param duration 禁言时长单位秒0 表示取消禁言
* @author wzp
* @since 2024/8/23 21:20 v0.0.5-dev
* @param groupId 群号
* @param userId 要禁言的 QQ
* @param duration 禁言时长单位秒0 表示取消禁言
*/
public SetGroupBanAction(Long groupId, Long userId, Long duration) {
public SetGroupBanAction(Long groupId, Long userId, Long duration){
super.setAction(Actions.SET_GROUP_BAN);
super.setParams(new Params(groupId, userId, duration));
}
/**
* 群组单人禁言
*
* @param groupId 群号
* @param userId 要禁言的 QQ
* @author wzp
* @since 2024/8/23 21:20 v0.0.5-dev
* @param groupId 群号
* @param userId 要禁言的 QQ
*/
public SetGroupBanAction(Long groupId, Long userId) {
public SetGroupBanAction(Long groupId, Long userId){
this(groupId, userId, 1800L);
}
@Data
@AllArgsConstructor
public static final class Params {
/**
* 群号
*
* @since 2024/8/23 21:20 v0.0.5-dev
*/
@JSONField(name = "group_id")
private Long groupId;
/**
* 要禁言的 QQ
*
* @since 2024/8/23 21:20 v0.0.5-dev
*/
@JSONField(name = "user_id")
private Long userId;
/**
* 禁言时长单位秒0 表示取消禁言默认30 * 60
*
* @since 2024/8/23 21:20 v0.0.5-dev
*/
@JSONField(defaultValue = "1800")

View File

@ -1,14 +1,13 @@
package cn.wzpmc.api.actions.message.set;
package cn.wzpmc.api.api.actions.message.set;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* 设置群名片群备注
*
* @author wzp
* @version 0.0.5-dev
* @since 2024/8/23 20:59
@ -16,12 +15,11 @@ import lombok.Data;
public class SetGroupCardAction extends Action<SetGroupCardAction.Params, Void> {
/**
* 设置群名片群备注
*
* @param groupId 群号
* @param userId 要设置的 QQ
* @param card 群名片内容不填或空字符串表示删除群名片
* @author wzp
* @since 2024/8/23 21:22 v0.0.5-dev
* @param groupId 群号
* @param userId 要设置的 QQ
* @param card 群名片内容不填或空字符串表示删除群名片
*/
public SetGroupCardAction(Long groupId, Long userId, String card) {
super.setAction(Actions.SET_GROUP_CARD);
@ -30,36 +28,31 @@ public class SetGroupCardAction extends Action<SetGroupCardAction.Params, Void>
/**
* 设置群名片群备注
*
* @param groupId 群号
* @param userId 要设置的 QQ
* @author wzp
* @since 2024/8/23 21:22 v0.0.5-dev
* @param groupId 群号
* @param userId 要设置的 QQ
*/
public SetGroupCardAction(Long groupId, Long userId) {
this(groupId, userId, "");
}
@Data
@AllArgsConstructor
public static final class Params {
/**
* 群号
*
* @since 2024/8/23 21:23 v0.0.5-dev
*/
@JSONField(name = "group_id")
private Long groupId;
/**
* 要设置的 QQ
*
* @since 2024/8/23 21:23 v0.0.5-dev
*/
@JSONField(name = "user_id")
private Long userId;
/**
* 群名片内容不填或空字符串表示删除群名片默认为空
*
* @since 2024/8/23 21:23 v0.0.5-dev
*/
private String card;

View File

@ -1,14 +1,13 @@
package cn.wzpmc.api.actions.message.set;
package cn.wzpmc.api.api.actions.message.set;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* 群组踢人
*
* @author wzp
* @version 0.0.5-dev
* @since 2024/8/23 19:52
@ -16,12 +15,11 @@ import lombok.Data;
public class SetGroupKickAction extends Action<SetGroupKickAction.Params, Void> {
/**
* 群组踢人
*
* @param groupId 群号
* @param userId 要踢的 QQ
* @param rejectAddRequest 拒绝此人的加群请求
* @author wzp
* @since 2024/8/23 21:24 v0.0.5-dev
* @param groupId 群号
* @param userId 要踢的 QQ
* @param rejectAddRequest 拒绝此人的加群请求
*/
public SetGroupKickAction(Long groupId, Long userId, Boolean rejectAddRequest) {
super.setAction(Actions.SET_GROUP_KICK);
@ -30,36 +28,31 @@ public class SetGroupKickAction extends Action<SetGroupKickAction.Params, Void>
/**
* 群组踢人
*
* @param groupId 群号
* @param userId 要踢的 QQ
* @author wzp
* @since 2024/8/23 21:24 v0.0.5-dev
* @param groupId 群号
* @param userId 要踢的 QQ
*/
public SetGroupKickAction(Long groupId, Long userId) {
this(groupId, userId, false);
}
@Data
@AllArgsConstructor
public static final class Params {
/**
* 群号
*
* @since 2024/8/23 21:25 v0.0.5-dev
*/
@JSONField(name = "group_id")
private Long groupId;
/**
* 要踢的 QQ
*
* @since 2024/8/23 21:25 v0.0.5-dev
*/
@JSONField(name = "user_id")
private Long userId;
/**
* 拒绝此人的加群请求默认为false
*
* @since 2024/8/23 21:25 v0.0.5-dev
*/
@JSONField(name = "reject_add_request", defaultValue = "false")

View File

@ -1,14 +1,13 @@
package cn.wzpmc.api.actions.message.set;
package cn.wzpmc.api.api.actions.message.set;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* 退出群组
*
* @author wzp
* @version 0.0.6-dev
* @since 2024/8/24 20:07
@ -16,41 +15,36 @@ import lombok.Data;
public class SetGroupLeaveAction extends Action<SetGroupLeaveAction.Params, Void> {
/**
* 退出群组
*
* @param groupId 群号
* @param isDismiss 是否解散如果登录号是群主则仅在此项为 true 时能够解散
* @author wzp
* @since 2024/8/24 23:57 v0.0.6-dev
* @param groupId 群号
* @param isDismiss 是否解散如果登录号是群主则仅在此项为 true 时能够解散
*/
public SetGroupLeaveAction(Long groupId, boolean isDismiss) {
public SetGroupLeaveAction(Long groupId, boolean isDismiss){
super.setAction(Actions.SET_GROUP_LEAVE);
super.setParams(new Params(groupId, isDismiss));
}
/**
* 退出群组
*
* @param groupId 群号
* @author wzp
* @since 2024/8/24 23:57 v0.0.6-dev
* @param groupId 群号
*/
public SetGroupLeaveAction(Long groupId) {
public SetGroupLeaveAction(Long groupId){
this(groupId, false);
}
@Data
@AllArgsConstructor
public static final class Params {
/**
* 群号
*
* @since 2024/8/24 21:02 v0.0.6-dev
*/
@JSONField(name = "group_id")
private Long groupId;
/**
* 是否解散如果登录号是群主则仅在此项为 true 时能够解散
*
* @since 2024/8/24 21:02 v0.0.6-dev
*/
@JSONField(name = "is_dismiss", defaultValue = "false")

View File

@ -1,14 +1,13 @@
package cn.wzpmc.api.actions.message.set;
package cn.wzpmc.api.api.actions.message.set;
import cn.wzpmc.api.Action;
import cn.wzpmc.api.Actions;
import cn.wzpmc.api.api.Action;
import cn.wzpmc.api.api.Actions;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* 设置群名
*
* @author wzp
* @version 0.0.6-dev
* @since 2024/8/24 20:07
@ -16,30 +15,26 @@ import lombok.Data;
public class SetGroupNameAction extends Action<SetGroupNameAction.Params, Void> {
/**
* 设置群名
*
* @param groupId 群号
* @param groupName 新群名
* @author wzp
* @since 2024/8/24 23:57 v0.0.6-dev
* @param groupId 群号
* @param groupName 新群名
*/
public SetGroupNameAction(Long groupId, String groupName) {
public SetGroupNameAction(Long groupId, String groupName){
super.setAction(Actions.SET_GROUP_NAME);
super.setParams(new Params(groupId, groupName));
}
@Data
@AllArgsConstructor
public static final class Params {
/**
* 群号
*
* @since 2024/8/24 20:59 v0.0.6-dev
*/
@JSONField(name = "group_id")
private Long groupId;
/**
* 新群名
*
* @since 2024/8/24 21:00 v0.0.6-dev
*/
@JSONField(name = "group_name")

Some files were not shown because too many files have changed in this diff Show More