Skip to content

luclu7/telebotsqlite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telebot SQLite

This project is just a generic inline Telegram bot. It supports audio, pictures and documents (aka files).

You change easily change the content by editing the db.sqlite file (table "entries") with this structure:

name url thumburl type mime
tux https://upload.wikimedia.org/wikipedia/commons/thumb/3/35/Tux.svg/1000px-Tux.svg.png https://upload.wikimedia.org/wikipedia/commons/thumb/3/35/Tux.svg/500px-Tux.svg.png photo anything you want
ultima 6 intro https://luclu7.fr/pub/ultima6intro.mp3 anything you want audio anything you want
42.zip http://www.unforgettable.dk/42.zip anything you want document application/zip

Please note that the MIME type for documents (file) can only be either "application/pdf" or "application/zip" (Telebot/Telegram API limitation)

You must put something (whatever you want) in the thumburl and mime column if it's not respectively a picture or a document (file), at least for now.

As this program uses go-sqlite3, it uses CGo.

Installation

Just download the latest release, launch it to create the SQLite database (db.sqlite) and edit it with your favourite SQLite client. You can also just download the example database here. Don't forget to rename it to db.sqlite. You must export the TELEBOT_TOKEN environment variable with your Telegram token, then launch it. Mention your bot anywhere and it should work.

(basic) Troubleshooting

Don't forget to enable the inline mode on your bot.

License

Feel free to fork it and do your own stuff with it, this project is under the Unlicense, see LICENSE.md.

About

Generic inline Telegram bot which use an SQLite database

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors