Skip to content
/ tgsetu Public

hentai robot,setu for telegram,tg涩图机器人,setubot,从 https://moe.jitsu.top/r18 获取一张色图发送到telegram

License

Notifications You must be signed in to change notification settings

xmexg/tgsetu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7b319cb · Apr 5, 2024

History

6 Commits
Dec 17, 2023
Dec 17, 2023
Dec 19, 2023
Dec 17, 2023
Dec 17, 2023
Apr 5, 2024
Dec 19, 2023
Dec 19, 2023

Repository files navigation

tgsetu

Telegram的色图机器人

开始使用前

安装java

  • ubuntu: sudo apt install openjdk-17-jdk
  • windows: 前往oracle手动下载安装

申请tg机器人

快速安装

  1. 下载jar文件
  2. cd到jar文件所在目录,使用 java -jar 文件名.jar 运行
  3. 初次运行会生成 config.json 配置文件,编辑该json文件并再次运行jar image

从源码构建

  • 安装 jdk17

    • ubuntu: sudo apt install openjdk-17-jdk
    • windows: 前往oracle手动下载安装
  • 安装 mvn

    • ubuntu:
      1. 安装 sudo apt install maven
      2. 设置代理
        export HTTP_PROXY=http://127.0.0.1:20171
        export HTTPS_PROXY=http://127.0.0.1:20171
    • windows:
      • 手动安装: 在官网下载并配置环境变量

      • 命令安装:
        1. 组合键win+s搜索powershell,以管理员身份运行powershell
        2. 依次执行
        Set-ExecutionPolicy Bypass -Scope Process -Force
        iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
        (若提示安装失败,可使用Remove-Item C:\ProgramData\chocolatey -Recurse删除chocolatey目录,然后再次尝试安装)
        choco install maven

        image
        3. 将maven添加进系统环境变量
        $currentPath = [Environment]::GetEnvironmentVariable("PATH", "Machine")
        $newPathToAdd = "C:\ProgramData\chocolatey\lib\maven\apache-maven-3.9.6\bin" image

      1. maven设置代理
        notepad (Get-Command mvn | Select-Object -ExpandProperty Source), "..\..\..\conf\settings.xml" image
  • 克隆项目

    git clone https://github.com/xmexg/tgsetu.git
    cd tgsetu
    image

  • 开始构建

    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] ------------------------------------------------------------------------
    
  • 运行jar

    windows在cmd中运行

    • cd target
    • java -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPost=(你的代理端口) -jar tgst-1.0-SNAPSHOT-jar-with-dependencies.jar
      国内不能连接到telegram, 有如下两种方法:
      1. 你尝试添加 -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
      1. 在国外服务器运行该程序
        推荐第二种方法, 因为第一种方法不稳定, 即便设置代理,有时也会意外断开连接

config.json配置文件

    {
	"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": "二次元头像"
		}
	    ]
    }

About

hentai robot,setu for telegram,tg涩图机器人,setubot,从 https://moe.jitsu.top/r18 获取一张色图发送到telegram

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages