Bots.Business
3.79K subscribers
673 photos
19 videos
27 files
595 links
Download Telegram
⚠️ If you need any HTTP on /start it is better to add background: true

Users can't wait your http request!

Start command must be very quickly!
πŸ‘13❀3πŸ‘Ž2πŸ₯°2
New methods added:

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
We have new πŸŒ₯ Cloud.Tiny!

- 31 days
- 200 000 iterations

It is like Cloud.Hobby:
- no Broadcasting (no Bot.runAll)
- no Auto Retry


Cost: 9 $ / month
πŸ‘8πŸ‘Ž6
10 TopList BJS

// 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
πŸ‘Ž31πŸ‘9πŸ”₯2
You can unlink all tg accounts from BB Account in @BotsBusinessAdminBot now

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! πŸŽ‰
πŸ‘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
// 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
πŸ‘4❀2πŸ‘Ž2πŸ”₯1
Random "oh. Error happened" - fix in progress
πŸ‘6❀1πŸ‘1
Random "oh. Error happened" - fixed

(it was just 1 hour bug)
❀5πŸ‘4
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:
...
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:
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
Bots.Business
User.getProperty("score")
Some of users confused here with TopBoardLib.

We have prop "score" here.

But with TopBoardLib you can:
- use any numeric value (integer or float, positive or negative)
- use prop like
let value = User.getProperty("score")

- use res value like
let value = Libs.ResourcesLib.userRes("balance").value

- use user's input like
let value = parseFloat(message)
(don't forget that user must input numeric only)

- use message index like
let value = message.id
(I don't know why we need this but it is possible)

- income webhook data
- any numeric data!

after this your code will be:
let value = ... // you already have it 

// Adding this points to a user
TopBoardLib.addScore({
value: value
// boardName: "YOU BOARD NAME" // you can pass boar name
});
πŸ€”6🀣4πŸ‘2πŸ‘Ž2😱1
❓ Do you also want to learn "Bot Making" ? But can't find anything to learn it.

πŸ₯³ Don't worry, I've brought a full "Telegram Bot Making Course" for free πŸ†“ from where you can learn bot making from scratch to advance

πŸ‘‰ Here's the 1st lecture for today :- https://youtu.be/CNhZg7MZBvg
❀10πŸ‘4πŸ‘Ž4πŸ”₯1
Forwarded from Bots.Business
Seems Telegram have some troubles now
πŸ‘11πŸ‘Ž5