A lightweight library that centralizes advertisement management for your Bots.Business bot.
Provides a pool of promotional messages and a ready-to-use formatted footer – perfect for Telegram bots.
- Random ad selection – picks one ad from a curated list every time you call it.
- Pre-formatted HTML footer – includes a styled ad block with a clickable attribution link (
Quinx Ads). - Easy integration – publish once and call from any command using
Libs.AdLib. - No external dependencies – works with the native Bots.Business API.
To make the library importable via Git, your repository must contain a libs folder:
AdLab/
└── libs/
└── AdLib.js
Optional: You can also include a commands folder with your bot’s command files – but be aware that a full import will replace your bot's existing commands. Back up your bot first!
- Set up a Git repository (public or private) with the structure above.
- In the Bots.Business app, open your bot and go to Sync > Import from Git rep.
- Generate a Deploy Key and add the public key to your repository’s deploy keys (write access required).
- Enter your repo URL / branch and import.
- After a successful import, the library is loaded and ready to use.
⚠️ Warning: Importing from Git will erase all existing commands and libs in your bot. Always back up your current code first.
Once imported, call the library’s functions from any command’s BJS code.
Returns an HTML-formatted string containing a random ad, wrapped in a blockquote, with an Ads: Quinx Ads header.
var footer = Libs.AdLib.getAdFooter();
Bot.sendMessage(footer);Returns only the raw ad text (no formatting or links).
var adText = Libs.AdLib.getRandomAd();
Bot.sendMessage(adText);var msg = "<b>Welcome!</b> Here is today's recommendation.\n";
msg += Libs.AdLib.getAdFooter();
Api.sendMessage({
chat_id: user.telegramid,
text: msg,
parse_mode: "HTML"
});The library ships with a set of default ads (you can edit the advertisements array):
| Channel | Description |
|---|---|
@MaximXEmojis |
Expressive emojis for every mood. |
@MaximXStickers |
Vibrant and diverse sticker packs. |
@MaximXBots |
Cutting-edge bots for fun, utility, and more. |
@MaximXWallpaper |
Stunning wallpapers to revamp your device’s look. |
@MaximXIcons |
Unique and stylish profile icons. |
@MaximXAnime |
Curated anime recommendations and community discussions. |
To add or remove ads, simply edit the array inside AdLib.js and re-import the repository.
- Change the
advertisementsarray to include your own promotional texts. - Modify the
getAdFooter()function to adjust the HTML wrapper or attribution link. - After changes, commit them to your repository and re-import to update the library.
This library is provided as-is for use in your own Bots.Business projects. You are free to modify and redistribute it. Attribution is appreciated but not required.
Powered by Bots.Business.