BotBuildUp News
159 subscribers
2 photos
9 links
Download Telegram
Channel created
๐Ÿค– Create Your Bots
https://botbuildup.com
Please open Telegram to view this post
VIEW IN TELEGRAM
111โค1
โ“ Que. How to get/set other users properties via telegram id?


๐ŸงชSol: Use below functions

//To set properties
$user->setPropTG('name', '1234567890', 'John Doe');

//To get properties
$name = $user->getPropTG('name', '1234567890');
Please open Telegram to view this post
VIEW IN TELEGRAM
16โค1
๐Ÿค” How to Use Telegram Api's In BBU ๐Ÿ˜


โœ๏ธ For sending a message:
$api->sendMessage([
    'chat_id' => $chat_id,
    'text' => "Hello World"
]);


๐Ÿ™ƒ For editing message:
$response = $api->sendMessage([
'chat_id' => $chat_id,
'text' => "Hello World",
]);
$api->editMessageText([
'chat_id' => $chat_id,
'text' => "Bye World",
'message_id' => $response->result->message_id
]);


๐Ÿ™‚ For editing message when click on inline keyboard:
$api->editMessageText([
'chat_id' => $chat_id,
'text' => "Bye World",
'message_id' => $callback_query->message->message_id
]);


๐Ÿ“ธ For sending a photo:
$api->sendPhoto([
    'chat_id' => $chat_id,
    'photo' => "https://www.google.co.in/images/branding/googlelogo/2x/googlelogo_color_160x56dp.png",
]);


๐Ÿ™‚ For editing caption of photo:
$response = $api->sendPhoto([
    'chat_id' => $chat_id,
    'photo' => "https://www.google.co.in/images/branding/googlelogo/2x/googlelogo_color_160x56dp.png",
]);
$api->editMessageCaption([
'chat_id' => $chat_id,
'caption' => "Bye World",
'message_id' => $response->result->message_id
]);


๐Ÿ˜†For editing caption of photo when click on inline keyboard:
$api->editMessageCaption([
'chat_id' => $chat_id,
'caption' => "Bye World",
'message_id' => $callback_query->message->message_id
]);


๐Ÿ“„ For sending a document:
$api->sendDocument([
    'chat_id' => $chat_id,
    'document' => "https://www.google.co.in/images/branding/googlelogo/2x/googlelogo_color_160x56dp.png",
]);


๐ŸŽ™ For sending an audio:
$api->sendAudio([
'chat_id' => $chat_id,
'audio' => "CQACAgQAAxkDAAINRWcME7iyyAnpQWsF14FTnu_JYKA9AAJCBgACMxNkULevRePngBJSNgQ",
]);


๐Ÿ“ผ For sending a video:
$api->sendVideo([
'chat_id' => $chat_id,
'video' => "BAACAgUAAxkDAAINWGcMFImZBWSxWZu_CQoy_AABEdSM6AAC3w8AAsoO6VcxVmhw-v5CWDYE",
]);


๐Ÿค” For sending an animation:
$api->sendAnimation([
'chat_id' => $chat_id,
'animation' => "CgACAgQAAxkDAAINrWcMHN5wBJli7khbzcqjtsOJMjRIAAL9BgACJVRkUNf0YbGreu6gNgQ",
]);


๐Ÿ˜  For alert when clicking on inline keyboard:
$api->answerCallbackQuery([
'callback_query_id' => $callback_query->id,
'text' => "Hello World",
//'show_alert' => true /*if you want to show as alert*/
]);


๐ŸŽฒ For sending dice:
$api->sendDice([
'chat_id' => $chat_id,
'emoji' => "๐ŸŽฒ"
]);


๐Ÿ†˜ For More Visit Official Docs.
Please open Telegram to view this post
VIEW IN TELEGRAM
16โค4๐Ÿ”ฅ2๐Ÿฅฐ1
BotBuildUp News pinned ยซ๐Ÿค– Create Your Bots https://botbuildup.comยป
BotBuildUp News
๐Ÿค” What priority matters to you?
๐Ÿ˜ Ok, Let's Focus On Speed First โ˜บ๏ธ
Please open Telegram to view this post
VIEW IN TELEGRAM
18๐Ÿ˜Ž1
BotBuildUp News
๐Ÿ˜ Ok, Let's Focus On Speed First โ˜บ๏ธ
๐Ÿ˜• Is ๐Ÿ˜ speed better than before now?๐Ÿค”
Please open Telegram to view this post
VIEW IN TELEGRAM
15โค1๐Ÿ”ฅ1
We've added 2 new functions today, which might make coding a bit easier for you! ๐Ÿ’ป๐Ÿค–

1. We have found that using entities can send errors sometimes, so we have added utils::parse_txt function, you can use the below example
//Syntax
//parse_txt($text/*required*/, 'Markdown'/*optional,default:Markdown*/)

//Usage
/*command name:acceptemail
answer: Send your email id
wait for answer: on
code:
*/
$parsedemail = utils::parse_txt($text,'Markdown');
$api->sendMessage([
    'chat_id' => $chat_id,
'parse_mode' => 'Markdown',
    'text' => "*your email {$parsedemail}*"
]);


2. If you are looking to get an answer from the user command specific you may find utils::get_params function, you can use the example below
//Syntax
//get_params($text/*optional,default:text*/,2/* from user,optional,default:0*/)

//Usage
/*command name:/setcolor
code:
*/
$params = utils::get_params(null,2);
$color=$params[1];
$api->sendMessage([
    'chat_id' => $chat_id,
    'text' => "your color set :{$color}"
]);

//Usage
//User can set color like
//setcolor blue
//Result: your color set to: blue


๐Ÿ˜ Comment What's Next? Or Request Feature In Comment
Please open Telegram to view this post
VIEW IN TELEGRAM
18๐Ÿ‘2
๐Ÿ˜ Do We need ๐Ÿ˜ Bot Store Too?
Anonymous Quiz
81%
Yes ๐Ÿ’ฏ
19%
๐Ÿ’ Let me comment
16๐Ÿฅฐ1
Happy Diwali to everyone! May this festival of lights bring joy and warmth to your life and strengthen the bonds within your families.๐ŸคŒ

In addition, we have a special gift for you, which we will unveil during Diwali celebrations. Wishing you all a wonderful and prosperous festival!
๐Ÿ’ฅ
Please open Telegram to view this post
VIEW IN TELEGRAM
15
BotBuildUp News
Happy Diwali to everyone! May this festival of lights bring joy and warmth to your life and strengthen the bonds within your families.๐ŸคŒ In addition, we have a special gift for you, which we will unveil during Diwali celebrations. Wishing you all a wonderfulโ€ฆ
๐ŸŽ‰ Exciting News Ahead! ๐ŸŽ‰

We appreciate your patience as we finalize your special giftโ€”it will be ready for you soon! ๐ŸŽโœจ

In addition, weโ€™re thrilled to announce that weโ€™re considering offering compensation to those talented bot coders who develop their own bots in our community. ๐Ÿ’ป๐Ÿค– Your expertise and creativity deserve recognition!
Together, letโ€™s build a vibrant community where innovation thrives. We believe in rewarding contributions based on the value they bring to our collective journey. ๐Ÿš€

Stay tuned for more updates, and letโ€™s continue to inspire each other!
๐Ÿ’ช โญ๏ธ
Please open Telegram to view this post
VIEW IN TELEGRAM
111๐Ÿ‘1
โœจ Today have added getAllUsers() method of ๐Ÿˆโ€โฌ› $bot object which is usefull for get all users list as array

//Below code returns all users data in array form
//Don't use it to get single user information like if you want to match with current user telegram I'd and return information
$bot->getAllUsers();
//It's userful when you want to export all users data
Please open Telegram to view this post
VIEW IN TELEGRAM
15
Update Time! ๐Ÿš€

The $http object now includes GET, POST, and a handy CUSTOM method! ๐ŸŒฒ
A small but useful tweak to make your API calls more flexible. Check out the syntax below:

$response = $http->get($url, $data, $headers);
$body = $response->result();//will have response body
$headers = $response->headers();//will have response headers
$code = $response->code();//will have response code
$time = $response->time();//will have response body
$has_error = $response->has_error();//do response have error
if(!$has_error){
$output = $body;
}else{
$error = $response->error();//will have error data
}


//same for post and custom
//$http->post($url, $data, $headers);
//$http->custom($method,$url, $data, $headers);


๐Ÿ˜ Letโ€™s keep improving! โœจ
Please open Telegram to view this post
VIEW IN TELEGRAM
18๐Ÿ”ฅ2โšก1๐Ÿ‘1
BotBuildUp News
$http->get
โœ… You can also call methods like:
Http::get($url, $data, $headers);
Please open Telegram to view this post
VIEW IN TELEGRAM
17โค1โšก1๐Ÿ‘1๐Ÿ”ฅ1