go telegram bot, used for video collect and more.

For what

我的想法:

  1. 部署一个私有的tg api server到国外的vps
  2. 通过 sshfs(sftp) 挂载我国内的nas到vps上
  3. 在tg上转发视频到我的bot
  4. 通过此程序handle此转发
  5. 透过私有api server会下载视频到我的vps上
  6. 将视频移动到挂载目录,自动同步到我的nas
  7. done

以上愿景目前已基本实现,同时此仓库还保留了bot的扩展性,以后有其他想法如:上传图片返回链接(当图床用)、上传网页生成pdf等,可以直接在 bot目录下添加扩展

使用方法

  1. 找botFarther申请bot,获取token
  2. 将token放入config.toml中
  3. 去这里 申请自己的api server,然后使用api服务器搭建
  4. 修改相关的配置文件
  5. 部署程序到可达tg的服务器
  6. 将config.example.toml改为config.toml,然后运行程序
  7. 开始转发视频即可

TODO

  1. 编写一个build脚本,自动生成run包,一键部署到vps
  2. 尝试与chevereto图床联动

Thanks

  1. 生成uuid的库:https://github.com/google/uuid
  2. 打印日志的库:https://github.com/sirupsen/logrus
  3. 美化日志的库:https://github.com/antonfisher/nested-logrus-formatter
  4. 处理配置文件的库:https://github.com/gookit/config
  5. go操作telegram的api库:https://github.com/go-telegram-bot-api/telegram-bot-api
  6. 协程池:https://github.com/panjf2000/ants

另外,由于官方api server的限制,这里我们需要搭建自己的api服务器
使用私有服务器能绕过官方服务器的下载限制

Owner
Kencin
白日无定影,清江无定波
Kencin
Similar Resources

A tip bot and Lightning wallet on Telegram ⚡️

A tip bot and Lightning wallet on Telegram ⚡️

@LightningTipBot 🏅 A Telegram Lightning ⚡️ Bitcoin wallet and tip bot for group chats. This repository contains everything you need to set up and run

Dec 23, 2022

Telegram bot for distorting images and stickers using CAS

Telegram bot for distorting images and stickers using CAS

Distortioner Telegram bot for distorting pictures, stickers, voice messages and GIFs using Content Aware Scale. Currently resides here: @distortionerb

Dec 21, 2022

Telegram bot check your TrainingPeaks profile workouts and send notification if some workouts added or changed

TrainingPeaks Bot Telegram bot check your TrainingPeaks profile workouts and sen

Dec 29, 2021

UcodeQrTelebot ver2 - Easy way to get QR and U-code using Utopia API in telegram bot

UcodeQrTelebot ver2 - Easy way to get QR and U-code using Utopia API in telegram bot

UcodeQrTelebot Easy way to get QR and U-code using Utopia API in telegram bot Us

Dec 30, 2021

RaspChecker - A Telegram bot that allows you to monitor your Raspberry Pi's temperature and shut it down. Written in Golang.

RaspChecker Remotely monitor your Raspberry Pi's temperature and shut it down if you want. All through Telegram. How to set up In order to run the bot

Jan 2, 2022

A Telegram bot that asks you a question and evaluate the response you provide.

A Telegram bot that asks you a question and evaluate the response you provide.

PiSquared A Telegram bot that asks you a question and evaluate the response you provide. Thanks to the labse_bert model, the evaluation of the answer

Nov 13, 2022

This repository will guide you to steal whatever the user copies and send content to telegram bot.

copy-clipboard-stealer-with-telegram This repository will guide you to steal whatever the user copies and send content to telegram bot. Setting Envior

Oct 4, 2022

Telegram Bot Framework for Go

Margelet Telegram Bot Framework for Go is based on telegram-bot-api It uses Redis to store it's states, configs and so on. Any low-level interactions

Dec 22, 2022

Client lib for Telegram bot api

Micha Client lib for Telegram bot api. Supports Bot API v2.3.1 (of 4th Dec 2016). Simple echo bot example: package main import ( "log" "git

Nov 10, 2022
Pro-bot - A telegram bot to play around with the community telegram channels

pro-bot ?? Pro Bot A Telegram Bot to Play Around With The Community Telegram Cha

Jan 24, 2022
A bot based on Telegram Bot API written in Golang allows users to download public Instagram photos, videos, and albums without receiving the user's credentials.

InstagramRobot InstagramRobot is a bot based on Telegram Bot API written in Golang that allows users to download public Instagram photos, videos, and

Dec 16, 2021
Bot - Telegram Music Bot in Go

Telegram Music Bot in Go An example bot using gotgcalls. Setup Install the serve

Jun 28, 2022
Bot-template - A simple bot template for creating a bot which includes a config, postgresql database

bot-template This is a simple bot template for creating a bot which includes a c

Sep 9, 2022
A discord bot that watches for tiktok URL's and automatically uploads the corresponding video to the channel

TikiTok Bot A Discord bot that watches for TikTok URLs and sends a message to the channel with the corresponding video attached Click to invite the bo

Jul 28, 2022
The serverless OTP telegram service use telegram as OTP service, and send OTP through webhook

Setup OTP First thing, you need prepare API(webhook) with POST method, the payload format as below { "first_name": "Nolan", "last_name": "Nguyen",

Jul 24, 2022
IRC, Slack, Telegram and RocketChat bot written in go
IRC, Slack, Telegram and RocketChat bot written in go

go-bot IRC, Slack & Telegram bot written in Go using go-ircevent for IRC connectivity, nlopes/slack for Slack and Syfaro/telegram-bot-api for Telegram

Dec 20, 2022
Golang telegram bot API wrapper, session-based router and middleware

go-tgbot Pure Golang telegram bot API wrapper generated from swagger definition, session-based routing and middlewares. Usage benefits No need to lear

Nov 16, 2022
Bot that polls activity API for Github organisation and pushes updates to Telegram.

git-telegram-bot Telegram bot for notifying org events Requirements (for building) Go version 1.16.x Setup If you don't have a telegram bot token yet,

Apr 8, 2022
Library for working with golang telegram client + bot based on tdlib. This library was taken from the user Arman92 and changed for the current version of tdlib.

go-tdlib Golang Telegram TdLib JSON bindings Install To install, you need to run inside a docker container (it is given below) go get -u github.com/ka

Dec 2, 2022