Skip to content

deepred5/yande-telegram-bot

Repository files navigation

yande-telegram-bot

Telegram搜索@yande5_bot或点击这里yande5_bot

使用方法:

  • /latest 3 获取最新3张图片
  • /popular 1d(1d/1w/1m/1y) 获取1天(天/周/月/年)的popular图片
  • /random 3 获取随机3张图片
  • /tag bra 3 获取标签为bra的3张图片
  • /help 帮助信息
  • /about 关于
  • /start 开始使用

Telegram搜索@dailyYande或者点击这里dailyYande

使用@yande5_bot机器人管理@dailyYande channel

每晚20:00准时发送当日popular图片,每周日21:00准时发送本周popular图片

部署

参考从零开始写一个Telegram Bot

config.js

module.exports = {
  token: '你的token',
  socksPassword: '本地开发时的ss梯子密码',
  url: 'webhook模式下的转发地址',
  port: 'webhook模式下express监听端口',
  myId: '用户Id',
  dailyYandeChannelId: '频道Id' // 需要bot为该频道的管理员
}

nginx配置

# 代理yande bot
location /bot${你的token} {
    proxy_pass http://127.0.0.1:9000; # 对应config.js里面的port端口
    proxy_http_version 1.1;
    proxy_set_header X_FORWARDED_PROTO https;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $host;
}

pm2启动

pm2 start start.json

Releases

No releases published

Packages

No packages published