SmartBot is a new era in bot development.
And that's why:
- the entire content part of the bot can be separated into language files. Moreover, this can (and should) be done at the initial stage of development.
- even one language file gives very great benefits: to change some lines you donβt need to go through commands - you just edit the language file
- the use of SmartBot principles allows you to simplify the logic. She's really getting smaller! This makes development easier!
- you can make simple bots simply based on language files!
We focus on this architecture.
New help articles is available now!
- Overview
- Lang Files
- SmartBot
- SmartTasker
- AmountDialog
#smartBot
And that's why:
- the entire content part of the bot can be separated into language files. Moreover, this can (and should) be done at the initial stage of development.
- even one language file gives very great benefits: to change some lines you donβt need to go through commands - you just edit the language file
- the use of SmartBot principles allows you to simplify the logic. She's really getting smaller! This makes development easier!
- you can make simple bots simply based on language files!
We focus on this architecture.
New help articles is available now!
- Overview
- Lang Files
- SmartBot
- SmartTasker
- AmountDialog
#smartBot
π₯5
Some users use external APIs for very simple codes!
For example we can use this code for sample transaction generation in TRON network.
For example we can use this code for sample transaction generation in TRON network.
function getSampleNickName() {
const prefixes = ["Mighty", "Tiny", "Happy", "Crazy", "Wise", "Brave", "Sneaky", "Lucky"];
const baseNames = ["Dragon", "Wolf", "Phoenix", "Tiger", "Hawk", "Lion", "Bear", "Fox"];
const prefix = prefixes[Math.floor(Math.random() * prefixes.length)];
const baseName = baseNames[Math.floor(Math.random() * baseNames.length)];
return `${prefix}${baseName}`;
}
function getSampleTrxTransaction({min, max}) {
// Random user ID generation
const userID = Math.floor(Math.random() * 9000000000) + 1000000000;
// Random amount generation
const amount = Math.random() * (max - min) + min;
// Conversion of TRX to USD
const in_usd = CurrencyQuote.convert({ amount: amount, from: "TRX", to: "USD" });
const name = getSampleNickName();
// Generating a plausible hash
const hashString = `${name}${userID}${amount}`;
const hash = CryptoJS.SHA256(hashString).toString();
return {
name: name,
userID: userID,
amount: amount.toFixed(2),
in_usd: in_usd.toFixed(2),
hash: hash
};
}
// using
const trxTransaction = getSampleTrxTransaction({min: 0.01, max: 1000});
Bot.sendMessage(
`*${trxTransaction.name}* sent *${trxTransaction.amount} TRX* (${trxTransaction.in_usd} USD) to *${trxTransaction.userID}*`
)π11π±4β€2
New methods added:
Please see full info:
https://core.telegram.org/bots/api
Api.setMessageReaction(opts)
Api.deleteMessages(opts)
Api.forwardMessages(opts)
Api.copyMessages(opts)
Api.getUserChatBoosts(opts)
Please see full info:
https://core.telegram.org/bots/api
π₯5π3π€2β€1
This media is not supported in your browser
VIEW IN TELEGRAM
β€10π2π₯1
10 TopList BJS
You can use this instead of List now.
see next comment also
// update leader board
function updateLeader(value) {
if(!value) { return }
if(value == 0) { return }
let curAmount = User.getProperty("amount") || 0;
curAmount += value;
User.setProperty("amount", curAmount);
let list = getLeaders();
let leader = list.find(leader => leader.tgId === user.telegramid);
if (leader) {
leader.value = curAmount;
} else {
list.push({ tgId: user.telegramid, name: user.first_name, value: curAmount });
}
list.sort((a, b) => b.value - a.value);
if (list.length > 10) {
list = list.slice(0, 10);
}
Bot.setProperty("TopList", { list: list }, "json");
}
function getLeaders() {
let storedList = Bot.getProperty("TopList");
if (storedList && storedList.list) {
return storedList.list;
}
return [];
}
// user have +1 point
// or other value like friends count, usd amount etc
updateLeader(1);
You can use this instead of List now.
see next comment also
π7β€1π₯1
Do you want 15 min chat timeout instead of 60 min?
We need the 1st level for this!
https://t.me/botsbus?boost
We need the 1st level for this!
https://t.me/botsbus?boost
Telegram
Bots.Business
Boost this channel to help it unlock additional features.
π31π9π₯2
You can unlink all tg accounts from BB Account in @BotsBusinessAdminBot now
P.S. restart bot via start command again
P.S. restart bot via start command again
π4π₯2
@BotsBusinessAdminBot have "Balance" button now.
β οΈ Please note: It is just testing!
All balances will be removed after testing!
Revenue Sharing development in progress! π
β οΈ Please note: It is just testing!
All balances will be removed after testing!
Revenue Sharing development in progress! π
π6β€3π₯°1
New Lib - TopBoardLib
TopBoardLib is a lib designed for managing a leader board in a chatbot. It provides functionality for adding, updating, retrieving, and resetting user scores, as well as managing multiple leader boards.
Command /bonus
command /top:
Full help:
https://help.bots.business/libs/topboardlib
it is based on
https://t.me/botsbus/1949
#topList #topBoard
TopBoardLib is a lib designed for managing a leader board in a chatbot. It provides functionality for adding, updating, retrieving, and resetting user scores, as well as managing multiple leader boards.
Command /bonus
// we just add +5 to user's Score
let userScore = User.getProperty("score") || 0;
userScore = userScore + 5;
// Adding this points to a user
TopBoardLib.addScore({
value: 5
// boardName: "Game" // you can pass boar name
});
command /top:
// Retrieving the leaderboard
let leaderboard = TopBoardLib.getBoard();
let leaderboardText = "The leaderboard is currently empty.";
// Check if the leaderboard is not empty
if (leaderboard.length > 0) {
// Create a string to represent the leaderboard
leaderboardText = "π Leaderboard π\n\n";
leaderboard.forEach((entry, index) => {
leaderboardText += `${index + 1}. ${entry.tgId}: ${entry.value} points\n`;
});
}
// Send the leaderboard
Api.sendMessage({ text: leaderboardText });
Full help:
https://help.bots.business/libs/topboardlib
it is based on
https://t.me/botsbus/1949
#topList #topBoard
help.bots.business
TopBoardLib | Bots.Business - Help
π4β€2π2π₯1
You can try BB AI on Chat GPT:
https://chat.openai.com/g/g-mW7CZYp2i-bb-ai-help
it can help you with coding
https://chat.openai.com/g/g-mW7CZYp2i-bb-ai-help
it can help you with coding
ChatGPT
ChatGPT - BB Ai Help
ChatGPT helps you get answers, find inspiration, and be more productive.
RefLib: TopList - fixed
RefLib use TopBoardLib now by default.
So Top Ref List is fixed.
What i need to do?
Do you already use RefLib.getTopList() ? And sorting is not working?
It is working now!
else - use RefLib.getTopList() - please see help
By default we have 10 members on TopList. You can pass topBoardMaxCount param with your count:
Please test our Demo Ref bot by link:
https://t.me/DemoReferalTrackingBot?start=user1860
You can try Top List here
RefLib use TopBoardLib now by default.
So Top Ref List is fixed.
What i need to do?
Do you already use RefLib.getTopList() ? And sorting is not working?
It is working now!
else - use RefLib.getTopList() - please see help
By default we have 10 members on TopList. You can pass topBoardMaxCount param with your count:
...
RefLib.track({
onTouchOwnLink: onTouchOwnLink,
onAlreadyAttracted: onAlreadyAttracted,
onAttracted: onAttracted,
// you can use "", "r" and etc for prefix
// if you change it - you need to pass same linkPrefix for
// RefLib.getLink() also!
// Prefix "user" is used by default
// linkPrefix: "user",
// you can pass debug for external debug info
//debug: true,
// we can use List or TopBoardLib for Top List
// by default TopBoardLib is used
// useList: false
// if useList - false (TopBoardLib is used)
// you can pass max board count
// it is 10 by default
topBoardMaxCount: 5
});
Please test our Demo Ref bot by link:
https://t.me/DemoReferalTrackingBot?start=user1860
You can try Top List here
π7π₯°2π»2β€1
Bots.Business
RefLib: TopList - fixed RefLib use TopBoardLib now by default. So Top Ref List is fixed. What i need to do? Do you already use RefLib.getTopList() ? And sorting is not working? It is working now! else - use RefLib.getTopList() - please see help By defaultβ¦
Update Regarding TopBoard and RefLib:
We regret to inform you that a bug has been identified in the TopBoard system associated with RefLib. The issue pertains to:
To address this, we are planning an update to the Lib Code in next hours. Unfortunately, this necessitates the removal of all existing data on TopBoard for RefLib. We understand the inconvenience this may cause and sincerely apologize for this incident. Rest assured, we are taking immediate steps to rectify the situation and prevent future occurrences.
UPDATE:
RefLib updated. Bug is fixed
We regret to inform you that a bug has been identified in the TopBoard system associated with RefLib. The issue pertains to:
Bug Description:
There is an incorrect assignment of the user count for Ref Link owners to users who were attracted by them.
To address this, we are planning an update to the Lib Code in next hours. Unfortunately, this necessitates the removal of all existing data on TopBoard for RefLib. We understand the inconvenience this may cause and sincerely apologize for this incident. Rest assured, we are taking immediate steps to rectify the situation and prevent future occurrences.
UPDATE:
RefLib updated. Bug is fixed
π5π2π€1π¦1π1
You can clear your track data now in @DemoReferalTrackingBot (only for attracted user not for Ref Owner) and retest ref link again
Please rerun bot with /start again for this command.
You can use this link:
https://t.me/DemoReferalTrackingBot?start=user1860
Please rerun bot with /start again for this command.
You can use this link:
https://t.me/DemoReferalTrackingBot?start=user1860
Bots.Business
Update Regarding TopBoard and RefLib: We regret to inform you that a bug has been identified in the TopBoard system associated with RefLib. The issue pertains to: Bug Description: There is an incorrect assignment of the user count for Ref Link owners to usersβ¦
Clouds updated.
BB General something later
BB General something later
π4π3