Telegram bot link sanitiser and frontend proxy substituter
Ignore messaged forwarded from self
Fix further None occurences
Fix no effective_{user,message} bug


browse  log 



You can also use your local clone with git send-email.


A Telegram Bot which sanitises and substitutes share links with lightweight, privacy respecting proxy frontend alternatives.


Supported services (configurable):

  • twitter.com => Nitter
  • youtube.com => Inividious, CloudTube
  • instagram.com => Bibliogram
  • reddit.com => Teddit, Libreddit, Old Reddit




  • scdoc (build dep.)
  • Python >= 3.9
  • PyPI: python-telegram-bot >= 13


$ git clone https://git.sr.ht/~torresjrjr/linkchanbot
$ cd linkchanbot
$ python -m pip install -r requirements.txt
# make install

To start serving, linkchanbot needs further configuration.



  • Visit @botfather.
  • Create a new bot (or select an existing one).
  • Save the bot API token.
  • Disable "Group Privacy mode".
  • Enable "Inline mode".
  • Set the "inline placeholder" to "Paste link...".
  • Optionally set "inline feedback" to "100%" for logging.
  • Set the bot commands: /start, /help, and /about.


Add the required bot token (and optionally an admin username) either in bot.cfg in the linkchan config directory ($XDG_CONFIG_HOME/linkchan or $HOME/.config/linkchan):

# required
token = 123:ABC...
# optional, provides /restart and /shutdown
admin = username

Or by environment variable:

$ export LINKCHAN_TOKEN='123:ABC...'
$ export LINKCHAN_ADMIN='admin_username'

Your bot should now be ready.

#Advanced configuration

See linkchanbot(1)


linkchanbot comes with a preconfigured list of 'alts' (proxies) and other configuration data. This data is updated with new commits. On start-up, linkchanbot copies this data in the absence of locally configured data to XDG_CONFIG_HOME/linkchan (bot.cfg is untouched).

To fully update linkchanbot and its configuration data, perform a normal installtion with the latest commit, then remove (and backup) the local configuration files and restart linkchanbot.

	$ rm ~/.config/linkchan/alts.json
	$ rm ~/.config/linkchan/services.json
	/restart  (or manaully in the shell)


See linkchanbot(1) or linkchanbot --help.