This repository has been archived by the owner on Aug 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
KingPrimes
authored and
KingPrimes
committed
Jun 14, 2022
0 parents
commit ba04e90
Showing
714 changed files
with
83,244 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
###################################################################### | ||
# Build Tools | ||
|
||
.gradle | ||
/build/ | ||
!gradle/wrapper/gradle-wrapper.jar | ||
|
||
target/ | ||
!.mvn/wrapper/maven-wrapper.jar | ||
|
||
###################################################################### | ||
# IDE | ||
|
||
### STS ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
|
||
### IntelliJ IDEA ### | ||
.idea | ||
*.iws | ||
*.iml | ||
*.ipr | ||
|
||
### NetBeans ### | ||
nbproject/private/ | ||
build/* | ||
nbbuild/ | ||
dist/ | ||
nbdist/ | ||
.nb-gradle/ | ||
|
||
###################################################################### | ||
# Others | ||
*.log | ||
*.xml.versionsBackup | ||
*.swp | ||
|
||
!*/build/*.java | ||
!*/build/*.html | ||
!*/build/*.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2018 TWG | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software is furnished to do so, | ||
subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
<div align="center"> | ||
<img src = ".github/logo.png" width="280" height="280" alt="TWGBot"/><br> | ||
项目编写于2020年8月12日 | ||
该项目以<a href="https://gitee.com/y_project/RuoYi-Vue">若依框架</a>为基础开发<br> | ||
使用 <a href="https://github.com/MisakaTAT/Shiro">Shiro</a> OneBot协议的QQ机器人快速开发框架 | ||
|
||
![](https://img.shields.io/badge/JDK-1.8+-brightgreen) | ||
![](https://img.shields.io/badge/MySql-8.5-green) | ||
![](https://img.shields.io/badge/Redis-5.0+-green) | ||
|
||
</div> | ||
|
||
> 使用方法:<br> | ||
安装**Java JDK 1.8** <br> | ||
安装**MySql 8.5+** <br> | ||
安装**Redis 5.0+** <br> | ||
新建一个名为 **bot-server** 的数据库 编码为 **utf-8mb4** 排序规则为 **utf8mb4_0900_ai_ci**<br> | ||
> 导入 **sql/bot-server.sql** 文件 **到你新建的数据库中** | ||
|
||
> 修改 **twg-admin/src/main/resources** 中的 **application-druid.yml** <br> | ||
> 主库数据源 下的 **master** <br> | ||
**username: 你的MySql用户名**<br> | ||
**password: 你的MySql密码** | ||
|
||
> 修改 **src/main/java/com/twg/bot/enums/WarframeTypeEnum** 中的 **ADMIN_QQ(你的QQ账号)** <br> | ||
### Bot-Aiml | ||
|
||
关键词回复模块 | ||
-------------------------------- | ||
主要实现了模糊关键词回复 | ||
支持教学与回复,表情|艾特|图片|GIF图片 | ||
|
||
--------------- | ||
|
||
### Bot-Group | ||
|
||
群组控制模块 | ||
--- | ||
入群验证码功能 | ||
|
||
--- | ||
|
||
### Bot-Image-ToGif | ||
|
||
> ### Gif表情包生成模块 | ||
> #### 在指令后方@某个群员 如果没有@默认时你自己的头像 | ||
> **指令:**<br> | ||
> capoo <br> | ||
> funnny<br> | ||
> 精神支柱<br> | ||
--- | ||
|
||
### Bot-Server | ||
|
||
Bot核心模块 | ||
|
||
--- | ||
|
||
### Bot-Warframe | ||
|
||
> ### Warframe 游戏查询模块 | ||
> 使用此模块时需要先开启功能,管理人员发送 **开启WF** 即可开启功能 | ||
> <br> 同理,发送 **关闭WF** 即可关闭功能 | ||
|
||
> 指令:<br> | ||
> **突击**<br> | ||
> **入侵**<br> | ||
> **奸商**<br> | ||
> **仲裁**<br> | ||
> **每日特惠**<br> | ||
> **裂隙**<br> | ||
> **平原**<br> | ||
> **钢铁**<br> | ||
> **电波**<br> | ||
> **翻译**<br> | ||
> **紫卡倾向变动**<br> | ||
> 查询指令用法介绍 <br> | ||
> **/WM** 从 <a href="https://warframe.market/">Warframe.Market</a> 上查询物品的售价<br> | ||
> 例如: /wm 充沛 满级、/wm ash、/wm 牛、/wm 压迫点 满级 买家 <br><br> | ||
> **/WiKI** 拼接 <a href="https://warframe.huijiwiki.com/">灰机Wiki</a> 的搜索链接 <br><br> | ||
> **/WR** | **/ZKWM** 从 <a href="https://warframe.market/">Warframe.Market</a> 上查询紫卡的售价<br> | ||
> 例如: /wr 绝路、/wr 拉托 -爆率,多重 -有|无 <br><br> | ||
> **/CD** | **/C** 从 <a href="https://warframe.market/">Warframe.Market</a> 上查询赤毒武器的售价<br> | ||
> 例如:/CD 沙皇、/C 沙皇 <br><br> | ||
> **/XT** | **/X** 从 <a href="https://warframe.market/">Warframe.Market</a> 上查询信条武器的售价<br> | ||
> 例如:/XT 弧电、 /X 弧电 | ||
> 订阅指令<br> | ||
> 使用订阅指令之前请发送 订阅列表查看对应的订阅内容<br> | ||
> **订阅/取消订阅**<br> | ||
> 此指令用于群订阅<br> | ||
在订阅指令后方加上 订阅列表中的数字<br> | ||
管理员/群主 可强制取消 订阅<br> | ||
如: 订阅 2<br> | ||
意为 :订阅仲裁<br> | ||
取消订阅 2<br> | ||
意为 : 取消订阅仲裁 | ||
> <br><br> | ||
> **私人订阅 / 取消私人订阅** | ||
> 此指令用于私人订阅 <br>与订阅指令不同之处 你订阅的某个内容更新时 机器人会主动@你 | ||
|
||
相关文档:<a href="https://www.yuque.com/kingprimes/twgbot">语雀</a> | ||
|
||
Thanks | ||
--- | ||
Thanks <a href="https://www.jetbrains.com/?from=TWGBot" rel="nofollow">JetBrains</a> Provide Free License Support | ||
OpenSource Project | ||
|
||
<img src="https://camo.githubusercontent.com/5816b4341e77865c19606305fd5d007098f269e38b92dae5ce93191b45e20af8/68747470733a2f2f6d696b7561632e636f6d2f696d616765732f6a6574627261696e732d76617269616e742d332e706e67" width="200" data-canonical-src="https://mikuac.com/images/jetbrains-variant-3.png" style="max-width: 100%;"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@echo off | ||
echo. | ||
echo [信息] 清理工程target生成路径。 | ||
echo. | ||
|
||
%~d0 | ||
cd %~dp0 | ||
|
||
cd .. | ||
call mvn clean | ||
|
||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@echo off | ||
echo. | ||
echo [信息] 打包Web工程,生成war/jar包文件。 | ||
echo. | ||
|
||
%~d0 | ||
cd %~dp0 | ||
|
||
cd .. | ||
call mvn clean package -Dmaven.test.skip=true | ||
|
||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
@echo off | ||
echo. | ||
echo [��Ϣ] ʹ��Jar��������Web���̡� | ||
echo. | ||
|
||
cd %~dp0 | ||
cd ../twg-admin/target | ||
|
||
set JAVA_OPTS=-Xms256m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m | ||
|
||
java -jar %JAVA_OPTS% ruoyi-admin.jar | ||
|
||
cd bin | ||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="http://maven.apache.org/POM/4.0.0" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>twg</artifactId> | ||
<groupId>com.twg</groupId> | ||
<version>3.7.0</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>bot-aiml</artifactId> | ||
|
||
<properties> | ||
<maven.compiler.source>8</maven.compiler.source> | ||
<maven.compiler.target>8</maven.compiler.target> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.twg</groupId> | ||
<artifactId>twg-common</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.twg</groupId> | ||
<artifactId>bot-server</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.twg</groupId> | ||
<artifactId>bot-group</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
39 changes: 39 additions & 0 deletions
39
bot-aiml/src/main/java/com/twg/bot/aiml/controller/TestImageController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.twg.bot.aiml.controller; | ||
|
||
import com.twg.bot.aiml.domain.IssueReply; | ||
import com.twg.bot.aiml.service.IssueReplyService; | ||
import com.twg.framework.interceptor.IgnoreAuth; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import javax.servlet.http.HttpServletResponse; | ||
|
||
|
||
@RestController | ||
@RequestMapping("/issue") | ||
public class TestImageController { | ||
@Autowired | ||
IssueReplyService service; | ||
|
||
@IgnoreAuth | ||
@GetMapping(value = "{uuid}/getImage/{id}") | ||
public void getImage(HttpServletResponse response, @PathVariable Integer id) { | ||
try { | ||
response.setHeader("Content-Type", "image/gif"); | ||
IssueReply issueReply = service.selectIssueReplyBuMsgId(id); | ||
response.getOutputStream().write(issueReply.getMsgReplyImage()); | ||
} catch (Exception ignored) { | ||
|
||
} | ||
} | ||
|
||
|
||
@GetMapping("/getIssue") | ||
public String getIssue() { | ||
return service.selectIssueReplyBuMsgId(2).toString(); | ||
} | ||
|
||
} |
Oops, something went wrong.