Skip to content

Telegram bot to search and send videos in any chat (like @gif). Users can upload/edit/delete their own videos.

License

Notifications You must be signed in to change notification settings

Selutario/videogram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Videogram

Description

Telegram bot to search and send videos in any chat (inline, like @gif). Users can upload/edit/delete their own videos.

How to install

  1. Get a Telegram API key at @BotFather via Telegram:
    /newbot
    
  2. Enable inline mode for your bot at @BotFather via Telegram:
    /setinline
    
  3. Also enable inline feedback for your bot at @BotFather via Telegram:
    /setinlinefeedback
    
  4. Clone this repository in your host:
    git clone https://github.com/Selutario/videogram.git
    cd videogram
    
  5. Create .env file:
    cp .env.example .env
    
  6. Run this to get your UID and GID:
    id
    
    or
    id -u # UID
    id -g # GID
    
  7. Edit the .env file to add the token obtained in step 1. and the UID and GID in step 5.. For example:
    VIDEOGRAM_TOKEN=6092251042:AAGxRqK5QlZN7AlhBgVQIzSKAEy7nigsW_8
    UID=1000
    GID=1000
    
  8. Build and run the container using docker-compose:
    docker compose up -d
    

Usage

The bot is finally running. In order to use it for the first time, you will need to create a Telegram channel where the bot will publish all the new uploaded videos. It doesn't mind whether it is public or private. Then, add the bot to the channel (it must be administrator). Once it is added, a message like this one should appear:

Image

image

Now is time to upload your first video. Talk to your bot and send /upload command. It will ask you for some extra information:

Image

image

All the uploaded videos will be published in the channel that you created before.

Image

image

Everybody can now query the bot in all conversations to search and send any of the uploaded videos:

Image

image

Available commands

The bot will answers to these commands:

  • /random: Get a randomly chosen video.
  • /upload: Upload a new video.
  • /edit: Edit the file, title, description or keywords of any previously uploaded video. Only administrator or the user who uploaded the video can edit it.
  • /delete: Delete any video. Only administrators can delete videos by default.
  • /get_sent_videos: Get history of the videos sent by all users.
  • /get_db_backup: Get a backup of the database file.

Configuration

The configuration file will allow you to modify the administrator users, ban users, change language, enable or disable the uploading, editing or deleting of videos, etc.

The file can be found in the repository under this path:

config/settings/settings.yaml

About

Telegram bot to search and send videos in any chat (like @gif). Users can upload/edit/delete their own videos.

Topics

Resources

License

Stars

Watchers

Forks