Telegram
Bots.Business
Boost this channel to help it unlock additional features.
π6π4β€3π€3
@BBDemoTaskBot
New:
- /clear command for data reset. You can retest bot again
- withdrawal - working now (It is just demo. Admin must process transactions manually: it is common case)
- withdrawals channel - @BBTaskLog (it can be public or only for admin)
- bug fixing
This is still slowly bot. Command "@" have approx 1500 lines of code.
It will be more quickly after Lib migrations!
In progress:
- Help articles
- Lib(s) migration
- Bot publishing in BB Store
Done:
- bot (v1) - DONE β
- lib codes
P.S.
Because we have /clear command - it is not possible make real rewards with BBP in this bot.
It is demo bot not real Task Bot and data resetting important for debugging here.
Please don't ask about rewards π
New:
- /clear command for data reset. You can retest bot again
- withdrawal - working now (It is just demo. Admin must process transactions manually: it is common case)
- withdrawals channel - @BBTaskLog (it can be public or only for admin)
- bug fixing
This is still slowly bot. Command "@" have approx 1500 lines of code.
It will be more quickly after Lib migrations!
In progress:
- Help articles
- Lib(s) migration
- Bot publishing in BB Store
Done:
- bot (v1) - DONE β
- lib codes
P.S.
Because we have /clear command - it is not possible make real rewards with BBP in this bot.
It is demo bot not real Task Bot and data resetting important for debugging here.
Please don't ask about rewards π
β€3π±3π1
Bots.Business
@BBDemoTaskBot New: - /clear command for data reset. You can retest bot again - withdrawal - working now (It is just demo. Admin must process transactions manually: it is common case) - withdrawals channel - @BBTaskLog (it can be public or only for admin)β¦
@BBDemoTaskBot - updated and become more quickly!
Code from "@" moved to libs.
We had approx 1500 lines of codes here. And now only 300 (much more comments)
Test bot speed now: @BBDemoTaskBot!
Code from "@" moved to libs.
We had approx 1500 lines of codes here. And now only 300 (much more comments)
Test bot speed now: @BBDemoTaskBot!
π3
@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
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
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