gershik-feed-bot

command module
v0.0.1-test Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2023 License: MIT Imports: 5 Imported by: 0

README

gershik-feed-bot

A Telegram feed bot made mainly for my friend @gershik.

What is it?

This bot polls different Telegram channels and collects all its messages into a single feed. You can create multiple feeds, each with its own channels. Also, there is a filtering feature, so you can filter out messages that contain certain text.

Getting started

  1. Create a bot using @BotFather.
  2. Grab your API ID and API hash from here.
  3. Get the binary from releases or build it yourself.
  4. Run it without any arguments to generate a config file.
  5. Fill in the config file config.yml.

Note: You can get your Telegram ID by sending /getid to @myidbot. 6. Run it again and enjoy!

Building

  1. Install Go.
  2. Clone this repository.
  3. Run go build in the repository directory.

Configuration file

Bot
Name Type Description
token string Bot token.
whitelist []int64 List of users who can use the bot.
User
Name Type Description
session_path string Path to the session JSON file.
app_id int API ID from here.
app_hash string API hash from here.
Poller
Name Type Description
storage_path string Path to the storage JSON file.
inteval int Polling interval in seconds.
channels_interval int Interval between polling different channels in seconds.
mark_as_unread bool Mark messages as unread after forwarding.
filters []Filter List of filters.
Filter object
Name Type Description
channels []int64 List of channels IDs where the filter should be applied.
text string Text to filter, not case sensitive.

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package config provides a simple configuration system.
Package config provides a simple configuration system.
Package storage provides a persistent storage for feed data.
Package storage provides a persistent storage for feed data.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL