Bots.Business
3.79K subscribers
673 photos
19 videos
27 files
595 links
Download Telegram
@BBDemoTaskBot - available in the BB Store

GitHub
https://github.com/bots-business/BBDemoTaskBot

Benefits
- Very high coding level
- New SmartBot architecture
- SmartTasker is used

SmartBot Architecture
- Multi-language - bot can be translated into any language with only one file
(ChatGPT can also translate it!)
- Logic is isolated from content
- Logic becomes simpler!

Task System
- Core Tasks (bot joining, referral) and Paid Tasks
- Task rewarding only after the correct answer
- Based on URL-visiting task, but it can be any task because we have a validation poll

Withdraw
- Simple withdraw system by user request
- Admin can accept or reject requests in the channel
- Powerful amount checking with SmartAmountDialog

Miro Bot Map
https://miro.com/app/board/uXjVNMBw3Eg=/

How to Use This Bot?
1. Install it from the Store!
2. Change the setup/lng-en command (you can also add a new language file)
3. Change constants in @-commands.
4. Change Paid&Core Tasks in @-commands.
5. Run /setup

#SmartBot #DemoTaskBot
❀4πŸ‘4
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
πŸ”₯5
We had night downtime due DDoS attack
πŸ‘Ž12πŸ€ͺ7😱4πŸ‘2
Forwarded from z0x99 πŸ‘¨β€πŸ’»
I don't know who created this but I just shared here.
πŸ‘9πŸ‘Ž7🀣6πŸ‘3πŸ™ˆ3πŸ™1
Some users use external APIs for very simple codes!

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
⚠️ 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