Libs object. No imports needed.
Libs.Random
Generate random values for referral codes, tokens, dice rolls, and more.randomInt
Generates a random integer betweenmin and max (inclusive).
BLP Example
randomStr
Generates a random alphanumeric string.BLP Example
randomFloat
Generates a random floating-point number between0.0 and 1.0.
BLP Example
randomAscii
Generates a random string using all ASCII letters (including uppercase).BLP Example
Libs.DateAndTime
Get current date and time in any timezone.Note:time.sleep()and standard Python sleep methods are blocked on the BLP platform. UseBot.runCommandAfter(seconds, command)for delays.
now
Returns a detailed time object for a specific timezone.
Returns a dictionary with keys:
date, time, datetime, timestamp, year, month, day, hour, minute, second, weekday.
BLP Example
utcnow
Returns the current UTC time as a dictionary.BLP Example
date_now
Returns only the current date as a formatted stringYYYY-MM-DD.
BLP Example
time (UNIX Timestamp)
Returns the current UNIX timestamp (seconds since epoch) as an integer.BLP Example
Libs.AI
Integrate powerful Large Language Models directly into your bot. Bots.LT currently supports OpenAI and Google Gemini.
Note: To use these APIs, you must pass your own API keys. You can store your API keys safely using Bot.saveData("openai_key", "sk-...").
askOpenAI
Calls the OpenAI Chat Completions API (e.g. ChatGPT).BLP Example
askGemini
Calls the Google Gemini API (Generative Language).BLP Example
Libs.Crypto
Fetch real-time cryptocurrency prices with automatic fallbacks across multiple APIs (Coinbase, Binance, KuCoin).get_price
Gets the current price of a cryptocurrency.BLP Example
convert
Converts an amount from one currency to another.BLP Example
get_coin_info
Returns detailed 24-hour market data for a coin.
Returns a dictionary with:
price, market_cap, volume_24h, change_24h (%), high_24h, low_24h.
BLP Example
Libs.Webhook
Generate secure, encrypted webhook URLs that trigger specific bot commands when accessed via HTTP.getUrlFor
BLP Example
BLP Example (Used with external payment gateway)
