Total Pageviews

Showing posts with label telegram. Show all posts
Showing posts with label telegram. Show all posts

Sunday, 27 September 2026

TG-UserBot

 A modular Telegram UserBot.

A modular Telegram UserBot for Python which uses the Telethon library. It is made to help you do your usual client tasks without the hassle and also has some additional useful features.

Documentation Status

Heroku guide is available here.

Deploy to Heroku

Incase your Redis session renders invalid, stop your dyno & run the userbot locally again, it will delete your old session from Redis. Then re-run the userbot again, login and exit it and start your dyno on Heroku.

Requirements:

  • Python 3.7.3 or above.
  • A Telegram API key (API ID and hash).
  • Redis Endpoint and Password from Redis Labs
    • Redis session is optional but needed if you are planning to use AFK and PM-Permit.

Procedure:

Clone the repository.

$ git clone https://github.com/kandnub/TG-UserBot/

Change the current directory to the cloned one.

$ cd TG-UserBot

Edit the config either using Nano/Vim or a Text Editor and put your ENV Vars in the same.

$ nano sample_config.ini
$ mv sample_config.ini config.ini

Install all the requirements using pip.

$ pip3 install --user -r requirements.txt

Run the UserBot once you have a valid configuration file.

$ python3 -m userbot

Resources:

  • TG-UserBot Documentations: Official userbot documentations. Here you can find all the help you need to get the bot up and running and can also find all the documented commands.
    • Regular maintenance of docs is not possible thus some new commands may be missing from the same.
  • Telegram Support Group: Exclusive Telegram support group. On here you can ask for help, request a feature or provide feedback to improve the bot.Constructuive criticism is also appriciated
from https://github.com/TG-UserBot/TG-UserBot

Saturday, 26 September 2026

tgfilestream

 A Telegram bot that can stream Telegram files to users over HTTP.

Setup

Install dependencies (see requirements.txt), configure environment variables (see below) and run with python3 -m tgfilestream.

A reverse proxy is recommended to add TLS. When using a reverse proxy, keep HOST as-is, but add the publicly accessible URL to PUBLIC_URL. The URL should include the protocol, e.g. https://example.com.

Environment variables

  • TG_API_ID (required) - Your Telegram API ID.
  • TG_API_HASH (required) - Your Telegram API hash.
  • PORT (defaults to 8080) - The port to listen at.
  • HOST (defaults to localhost) - The host to listen at.
  • PUBLIC_URL (defaults to http://localhost:8080) - The prefix for links that the bot gives.
  • TRUST_FORWARD_HEADERS (defaults to false) - Whether or not to trust X-Forwarded-For headers when logging requests.
  • DEBUG (defaults to false) - Whether or not to enable extra prints.
  • LOG_CONFIG - Path to a Python basic log config. Overrides DEBUG.
  • REQUEST_LIMIT (default 5) - The maximum number of requests a single IP can have active at a time.
  • CONNECTION_LIMIT (default 20) - The maximum number of connections to a single Telegram datacenter.
  • TG_START_MESG - The message that should be shown in Telegram chat, in case of non-media message.
  • TG_G_C_MESG - The message that should be shown in a Telegram Group chat.
  • TG_SESSION_NAME (defaults to tgfilestream) - The name of the Telethon session file to use.
  • TG_BOT_FATHER_TOKEN (defaults to None) - This option is mutually exclusive to TG_SESSION_NAME, and if set, the client will login as a bot, instead of an user.

from https://github.com/SpEcHiDe/tgfilestream
-----------------------------------------------------------

Telegram File To Link Generation Bot

A Telegram bot that can stream Telegram files to users over HTTP.

Setup

Install dependencies (see requirements.txt), configure environment variables (see below) and run with python3 -m tgfilestream.

A reverse proxy is recommended to add TLS. When using a reverse proxy, keep HOST as-is, but add the publicly accessible URL to PUBLIC_URL. The URL should include the protocol, e.g. https://example.com.

You can also tap the Deploy To Heroku button below to deploy straight to Heroku!

With Bot Token & Session String

Deploy

Without Session String

Deploy

Watch our YouTube video for more details - How To Create Your Own Telegram File To Link Generation Bot

Environment variables

  • TG_API_ID (required) - Your Telegram API ID.
  • TG_API_HASH (required) - Your Telegram API hash.
  • TG_SESSION_NAME (defaults to tgfilestream) - The name of the Telethon session file to use.
  • TG_BOT_FATHER_TOKEN - Your bot token, as a string..
  • PORT (defaults to 8080) - The port to listen at.
  • HOST (defaults to localhost) - The host to listen at.
  • PUBLIC_URL (defaults to http://localhost:8080) - The prefix for links that the bot gives.
  • TRUST_FORWARD_HEADERS (defaults to false) - Whether or not to trust X-Forwarded-For headers when logging requests.
  • DEBUG (defaults to false) - Whether or not to enable extra prints.
  • LOG_CONFIG - Path to a Python basic log config. Overrides DEBUG.
  • REQUEST_LIMIT (default 5) - The maximum number of requests a single IP can have active at a time.
  • CONNECTION_LIMIT (default 20) - The maximum number of connections to a single Telegram datacenter.
  • TG_START_MESG - The message that should be shown in Telegram chat, in case of non-media message.

How to get TG_SESSION_NAME string

Run Console in Heroku python3 GenerateStringSession.py and follow.

  • Note: When it will ask for Phone Number and Bot token Give Bot token value

OR use online terminal

Run

from https://github.com/TGExplore/TG-Files-to-Link

Tuesday, 15 September 2026

Telegram-Recorder

 悄无声息的转发消息 | UserBot: Forward everything you like, 7/24.

Forward anything to a channel/group with a user identity on Telegram.
If you have trouble using this project, join the demo group listed below.

联动项目:https://github.com/abusetelegram/AlwaysOnline-

写在前面

很多时候,Telegram本身被认为是一个安全,可以自由交流的地方。但是,接近无限的消息储存和公开的消息读取让很多人的信息处在一个危险的状态:你在公共区域发送的消息,即使是修改,删除了,也是可以被直接记录的。

而与此同时大多数人对于这个概念却是缺失的。

这个仓库的目的是为了验证一个攻击概念,即可以完整的追踪并标记一个独立ID的个体,是可行的。

你可以做什么呢?也许他在某个时刻发送了一张他的桌面截图,上面有他的一些信息,或者是说了一句“我在xx省”,就算是删除了,只要是公开群,或者是公开链接的私密群,都是可以被记录下来的。而且这个过程完全可以不被发现。一点一滴下来的结果,是什么呢?

借此希望提醒所有人,在公开群组,或是任何你不熟悉的人的群组的发言要谨慎。Telegram从某种程度上来说,是安全的。但是你自己作死泄漏的信息,谁也帮不到你。

这个项目最开始是为了回应 @CNBlackListR 项目被质疑收集信息而制作的demo,用于证明实际上,一个群组的最基本组成部分———群成员才是最大的潜在记录者。

Telegram是个好地方,不错,对于熟悉的人之间的交流是的。但是Telegram目前的机制对于陌生人之间的互动,以及消息保护,是极其不到位的。在如此开放且声称安全的平台下,默认的安全设置却如此之低(默认允许任何人拉你群入,查看在线状态),但是对于正常使用时被封锁,申诉的成本,却如此之高(默认不回复,志愿者团队就等于没有)。同时,创建账号的成本对于号商来说,也是无比的低(随意换号注册,删除账号即可解除大部分限制,十几个号就可以造成很大的影响)。且不提淘宝上都已经有完整的产业链了。

这是一个态度问题

再举一个例子:官方在之前的inline bot泄漏用户IP地址漏洞上,在几个月前就有开发者反馈的情况下,却是在新闻炒作的时候才部分修复了这个漏洞(对,部分平台的客户端,第三方客户端依然存在这个问题)。【数据来源稍后补充】

不得不说,对于一个以安全放在首要位置上的聊天软件,虽然说技术上很敬佩,但是态度上,我只能说我看不到诚意。甚至在很多时候,感觉是为了避免自身信誉收到影响而对于部分事件故意不做出回应,而在有利地位的时候却大写新闻稿。

既然你喜欢在出事的时候再做修复,那我们就搞事情咯w

功能特性

  • 只要你愿意,没人能够发现你再转发消息(不显示在线)
  • 附带了对应信息的真实来源者
  • 不影响正常使用,不会产生已读,一个账号可以同时做记录并真人活跃

使用说明

为了防止大规模滥用,我们移除了公开群不需要加群即可监听的部分。并移除了部分额外功能

如果你是开发者,你应该很快就能做到你自己想做的事情,我也拦不了你,所以,w

使用前

  • 请先补全 data.py 内客户端ID和Hash    - 不知道如何填写请参考联动项目说明
  • 依赖包:pip3 install telethon
  • 账号需要提前加入到你想要转发的群组,否则不能获取到对应信息
  • 如果你想监听单独某个人在群组内的消息,使用 @JsonDumpBot 获取对方ID,转发他的一条消息过去即可。

工具说明

  • login.py 用于登陆
  • list.py 用于获取当前账号所有聊天记录的 ID
    • 会在当前目录产生一个list.txt,格式是:群组名(用户名)|ID
    • 然后就可以补全监控列表(在data.py,listened_groups_id群组ID, listened_persons_id人ID)了,可以填入多个,用逗号隔开。填入对应ID即可
    • fwd_channel 是目的地,超级群或者频道ID均可
  • main.py 跑起来!

前台运行,用个screen套住就好

几个注意事项

  • fwd_channel虽然是个数组,但是默认只会用到第一个进行转发,如果你需要多个转发,请自行修改main.py内destination
  • mtype 用于控制发送消息的具体信息程度,如果想要显示全部请改为all

Demo & 交流群组

https://t.me/joinchat/CMe2Rkv8aHktyLyQJHVrqg

from  https://github.com/abusetelegram/telegram-recorder

Saturday, 28 March 2026

PaperplaneExtended

 Bleeding edge memes.

Project Paperplane Extended

A modular Telegram userbot running on Python 3.6+ with an sqlalchemy database.

Based on RaphielGang's Paperplane Telegram userbot...

...or rather, it's Paperplane + insane extras from the community.

from  https://github.com/Spyderzz/Userbot

( https://github.com/AvinashReddy3108/PaperplaneExtended)

Thursday, 26 February 2026

用telegram听歌

 用 Winamp/千千静听 将从各个地方捣鼓过来的音乐细心地管理起来,修改它的 MetaData,按专辑/歌手分类,那个时代的音乐好像多了一点仪式感。

但流媒体出来之后,一切都变了,它让我们变得更懒,不用再去到处下载,不用再去编辑 id3 tag,在一个 App 里全部搞定。确实方便了,但我们也不再「拥有」一首歌,无论是实体还是数字形式的,我们拥有的只是一段时间的使用权。

除此之外,我更在意的是其中的商业模式,为了能让用户更高频更长久地使用 App,会结合很多推荐算法来猜你喜欢(有时确实还挺准的,当然我是指 Spotify),但这会带来两个问题:1. 歌曲的「厚重感」下降了。2. 主体变了,听歌的我好像在被算法投喂。以前的音乐就像书一样,可以买回来放在书架上,分门别类地整理好,想看的时候挑一本就行。现在书还是那本书,但是要坐交通工具(网络)去某个地方(App)看,会有各种不同的新书/可能喜欢的书来吸引我。如果同一首歌听了超过 5 遍,感觉都对不起算法。现在一打开流媒体播放器,就有种 overwhelmed 的感觉,就像是算法在指导我,你应该听哪些歌。

另一方面,音乐有很强的「场景唤醒」能力。如果某一段时间经常在听一类歌,当几年后(甚至更久),再听到这些歌时,当时的场景,周围的人,发生的事都会浮现出来,这感觉很好。流媒体出来之后,这个能力也被大大削弱了,每次打开流媒体 App,首屏的内容都是新的(至少是新旧混杂的),即使我们再想听某几首歌,也很容易钻到其他歌曲里,这样音乐就凿不出时间的坑。

流媒体背后的逻辑其实是现在很多 App 的共性,通过「直达人心」的算法来攫取你的注意力,用便捷的操作来形成 hook,从而达到「停不下来」的效果。这类工具我想称为「热工具」,与之相对的是「冷工具」,就像冷兵器一样,容易操作,可控,不 Magic,能否耍得 6,完全取决于操作者。我喜欢冷工具,就像 Winamp 或 千千静听那样。

于是我就开始寻找合适的播放媒介,前一阵子买过 iPod Shuffle,但后来怎么也找不到了(这可能就是做得太 mini 的一个弊端吧),想想还是从 App 入手吧,需要跨平台,最好能同步,同时属于「冷工具」,交互和 UI 尽量简单些,找了一些 MP3 播放器都不太满意,最后的解决方案是:Telegram。

Telegram 支持上传歌曲. 如果同时上传多首歌曲,就可以形成 Playlist(只要上传时选择「Group」就行)。

后台播放也没问题,同步的话,自然不在话下。有一个小问题是,默认点击一首歌后,当前 Chat 里的所有歌都会加到 Queue 里,无法只播放某个 Playlist,解决办法也很简单(也是官方推荐的做法),新建一个 Private Channel,然后把 Playlist forward 过去就行了。

最后就是歌曲的来源,我会优先考虑从 Youtube 下载,如果没有,再看有没有方便的渠道可以购买,还是没有的话,fallback 到其他下载渠道。

Monday, 17 November 2025

将 Telegram 当音乐播放器吧!

(寻找音乐、即时歌词、无损音乐不失真压缩)

步骤一:到 @music_v1bot 下载歌曲,并找到歌词

  输入指令: /search (你想要的歌名)

 

步骤二:下载 MT 管理器(点我)

开启:下载好的歌词文件

 

步骤三:最右上角、搜索>勾选正则化,替换(全部替换)

输入:[(\d{2}:\d{2}).\d+]

替换:$1

注意:"$1"后面要加一个空格(英文)。

 

代码作者:Aric

  并将选取好的歌词,粘贴到音乐文件就完成了。

(我是范例-点我查看)

须知

使用:“.FLAC“格式的音乐文件,有时候不能正常显示歌词时间轴,是正常的,所以你可能要转换特定的格式,如.mp3,或是.ogg 或.m4a 的歌曲。

  → 如果你对音乐品质有极致追求,也有电脑,我个人极度推荐使用 dBpowerAMP 这类型工具,将无损音乐格式转换成 m4a (水果的算法:QAAC 编码的音乐),目前可以算是当今世界上最好的压缩算法,在通讯界享有盛名,且压缩后可以到接近百分之百还原。(甚至连对音乐/声学研究的职业工作者都讚叹不已)笔者强烈推荐,只叹手机没有类似的软件。专门转成 QAAC 编码的。

电脑版 dBpowerAMP 下载/教学请点我

from https://telegra.ph/Telegram-Real-Time-sync-lyrics-05-14 

Wednesday, 22 October 2025

BroadcastChannel

Turn your Telegram Channel into a MicroBlog.

memo.miantiao.me

English | 简体中

✨ Features

  • Turn your Telegram Channel into a MicroBlog
  • SEO friendly /sitemap.xml
  • 0 JS on the browser side
  • RSS and RSS JSON /rss.xml /rss.json

🪧 Demo

Real users

Platform

  1. Cloudflare
  2. Netlify
  3. Vercel

BroadcastChannel supports deployment on serverless platforms like Cloudflare, Netlify, Vercel that support Node.js SSR, or on a VPS. For detailed tutorials, see Deploy your Astro site.

🧱 Tech Stack

🏗️ Deployment

Docker

  1. docker pull ghcr.io/ccbikai/broadcastchannel:main
  2. docker run -d --name broadcastchannel -p 4321:4321 -e CHANNEL=miantiao_me ghcr.io/ccbikai/broadcastchannel:main

Serverless

  1. Fork this project to your GitHub
  2. Create a project on Cloudflare/Netlify/Vercel
  3. Select the BroadcastChannel project and the Astro framework
  4. Configure the environment variable CHANNEL with your channel name. This is the minimal configuration, for more configurations see the options below
  5. Save and deploy
  6. Bind a domain (optional).
  7. Update code, refer to the official GitHub documentation Syncing a fork branch from the web UI.

⚒️ Configuration

## Telegram Channel Username, must be configured. The string of characters following t.me/
CHANNEL=miantiao_me

## Language and timezone settings, language options see [dayjs](https://github.com/iamkun/dayjs/tree/dev/src/locale)
LOCALE=en
TIMEZONE=America/New_York

## Social media usernames
TELEGRAM=ccbikai
TWITTER=ccbikai
GITHUB=ccbikai
MASTODON=mastodon.social/@Mastodon
BLUESKY=bsky.app

## The following two social media need to be URLs
DISCORD=https://DISCORD.com
PODCAST=https://PODCAST.com

## Header and footer code injection, supports HTML
FOOTER_INJECT=FOOTER_INJECT
HEADER_INJECT=HEADER_INJECT

## SEO configuration options, can prevent search engines from indexing content
NO_FOLLOW=false
NO_INDEX=false

## Sentry configuration options, collect server-side errors
SENTRY_AUTH_TOKEN=SENTRY_AUTH_TOKEN
SENTRY_DSN=SENTRY_DSN
SENTRY_PROJECT=SENTRY_PROJECT

## Telegram host name and static resource proxy, not recommended to modify
HOST=telegram.dog
STATIC_PROXY=

## Enable Google Site Search
GOOGLE_SEARCH_SITE=memo.miantiao.me

## Enable tags page, separate tags with commas
TAGS=tag1,tag2,tag3

## Show comments
COMMENTS=true

## List of links in the Links page, Separate using commas and semicolons
LINKS=Title1,URL1;Title2,URL3;Title3,URL3;

## Sidebar Navigation Item, Separate using commas and semicolons
NAVS=Title1,URL1;Title2,URL3;Title3,URL3;

## Enable RSS beautify
RSS_BEAUTIFY=true

🙋🏻 FAQs

  1. Why is the content empty after deployment?
    • Check if the channel is public, it must be public
    • The channel username is a string, not a number
    • Turn off the "Restricting Saving Content" setting in the channel
    • Redeploy after modifying environment variables
    • Telegram blocks public display of some sensitive channels, you can verify by visiting https://t.me/s/channelusername.

    from https://github.com/ccbikai/BroadcastChannel