Telegram bot that creates a text message from the link address of an ebook or an audio book.
/startand/help: show an help message./inline: shows an help message for inline mode.- text: given a link or a text containing a link, it returns the request message.
/reporttext: works the same way it does with text, but it returns a report.html file when errors occur.- inline: the bot works inline the same way it does with text.
/stats: sends information about the number of request received./refresh: reloads the information for the filters./support: shows an help message on how to support the developer.
/list_admins: shows the list of admins/add_admin [admin id]: adds admin/remove_admin [admin id]: removes admin
/list_titles: shows the list of DMCA titles/add_title: adds a title to the list of DMCA titles/remove_title: removes a title from the list of DMCA titles/list_authors: shows the list of DMCA authors/add_author: adds a author to the list of DMCA authors/remove_author: removes a author from the list of DMCA authors/list_publishers: shows the list of DMCA publishers/add_publisher: adds a publisher to the list of DMCA publishers/remove_publisher: removes a publisher from the list of DMCA publishers
#request [tags]
Title: [book title]
Author: [book author]
Publisher: [book publisher]
Link: [link received]
The available tags are:
- language tag, such as #italian, #french, etc
- kindle unlimited tag #KU
- audiobook tag #audiobook
- Scribd tag #scribd for requests from Scribd
- Storytel tag #storytel for requests from Storytel
- Archive tag #archive for requests from Archive and OpenLibrary
The tags are automatically added based on the url provided.
Example:
#request
Title: Serpentine
Author: Philip Pullman
Publisher: Knopf Books for Young Readers
Link: https://www.amazon.com/His-Dark-Materials-Philip-Pullman-ebook/dp/B08CL2WJ34/ref=tmm_kin_swatch_0?_encoding=UTF8&qid=1634305599&sr=8-1
Given an Amazon link of a Kindle book, it returns the request message.
Amazon languages supported:
- en: English
- it: Italian
- de: German
- nl: Dutch
- es: Spanish
- pt: Portuguese
- fr: French
Given an Audible link of an audiobook, it returns the request message.
It always add the #audiobook tag.
Given a Scribd link of either an ebook or an audiobook, it returns the request message.
It always add the #scribd tag. If it is an audiobook, it also add the #audiobook tag.
Given a Storytel link of either an ebook or an audiobook, it returns the request message.
It always add the #storytel tag. If it is an audiobook, it also add the #audiobook tag.
Given a Archive link of an ebook, it returns the request message.
It always add the #archive tag.
Given a OpenLibrary link of an ebook, it returns the request message.
It always add the #archive tag.
- Amazon: Kindle ebooks.
- Audible: audiobooks.
- Scribd: ebooks or audiobooks.
- Storytel: ebooks or audiobooks.
- Archive: ebooks.
- OpenLibrary: ebooks.
The publication date of the given product cannot be in the future.
The book or the author must not be protected by DMCA and the publisher must not be academic.
Malayalam is not allowed.
npm run build
Start script
npm start
Define token and run the project
BOT_TOKEN="110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw" npm start
Replace the token in the command, which is invalid, with your own.
BOT_TOKEN: create a bot using @BotFather, and get the Telegram API token.CONFIG_PATH: path where to store the generated configurations, without/at the endADMINS: array of admin ids as a string
'[12345,67890]'
STORYTEL_AUTHS: list of auth objects as defined below.
{
"userId": "string",
"token": "string",
"locale": "string"
}
Example:
BOT_TOKEN="110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw" STORYTEL_AUTHS="[{'userId':'12345678','token':'AAAAAAAAA_BBBBBBBB','locale':'/in/en/'}]" npm start
The authentication is required to get books and audiobooks information. The bot may not work as expected, if not provided.
To interact with the Amazon API
AMAZON_API_SITESTRIPE_MARKETPLACE_ID: marketplace id provided by Amazon.AMAZON_API_SITESTRIPE_LONG_URL_PARAMS: URL parameters that tracks back to the Affiliate account.AMAZON_API_SITESTRIPE_COOKIES: cookies to authenticate to the API.