安装java
sudo apt install openjdk-17-jdk
申请tg机器人
java -jar 文件名.jar
运行 config.json
配置文件,编辑该json文件并再次运行jar
jdk17
sudo apt install openjdk-17-jdk
mvn
sudo apt install maven
export HTTP_PROXY=http://127.0.0.1:20171
export HTTPS_PROXY=http://127.0.0.1:20171
windows:
命令安装:
win+s
搜索powershell
,以管理员身份运行powershell
Set-ExecutionPolicy Bypass -Scope Process -Force
iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
Remove-Item C:\ProgramData\chocolatey -Recurse
删除chocolatey目录,然后再次尝试安装)choco install maven
maven
添加进系统环境变量$currentPath = [Environment]::GetEnvironmentVariable("PATH", "Machine")
$newPathToAdd = "C:\ProgramData\chocolatey\lib\maven\apache-maven-3.9.6\bin"
maven
设置代理notepad (Get-Command mvn | Select-Object -ExpandProperty Source), "..\..\..\conf\settings.xml"
git clone https://github.com/xmexg/tgsetu.git
cd tgsetu
mvn clean package
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.407 s
[INFO] Finished at: 2023-12-17T17:08:57+08:00
[INFO] ------------------------------------------------------------------------
windows在cmd中运行
cd target
java -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPost=(你的代理端口) -jar tgst-1.0-SNAPSHOT-jar-with-dependencies.jar
-DsocksProxyHost=127.0.0.1 -DsocksProxyPort=(你的http代理端口)
设置socks代理
java -DsocksProxyHost=127.0.0.1 -DsocksProxyPort=10810 -jar tgst-2.0-SNAPSHOT-jar-with-dependencies.jar
{
"tgBotName": "",
"tgBotToken": "",
"message": [
{
"type": "help",
"keyWord": ["help", "/help", "start", "/start", "帮助", "/帮助"],
"intro": "色图机器人 for telegram, 仓库地址: https://github.com/xmexg/tgsetu"
},
{
"type": "image",
"keyWord": ["/hentai", "hentai", "/setu", "setu", "色图", "涩图", "来点色图", "来点涩图", "来张色图", "来张涩图"],
"url": "https://moe.jitsu.top/r18",
"intro": "R18图"
},
{
"type": "image",
"keyWord": ["/bg", "bg", "二次元"],
"url": "https://www.loliapi.com/bg/",
"intro": "随机二次元图"
},
{
"type": "image",
"keyWord": ["/pc", "pc"],
"url": "https://www.loliapi.com/acg/pc/",
"intro": "二次元电脑图"
},
{
"type": "image",
"keyWord": ["/pe", "pe"],
"url": "https://www.loliapi.com/acg/pe/",
"intro": "二次元手机图"
},
{
"type": "image",
"keyWord": ["/tx", "tx", "头像"],
"url": "https://www.loliapi.com/acg/pp/",
"intro": "二次元头像"
}
]
}