Coding Skill Builder ๐Ÿ’ช๐Ÿ“š(Full AI Based)
154 subscribers
1 photo
6 links
๐ŸŒŸ Welcome to Coding Skill Builder!

Unlock your potential with quick tips and tutorials on personal development, professional skills, and creative pursuits. Join our community and start building your skills today! ๐Ÿ’ช๐Ÿ“šโœจ

โฉ https://t.me/+4hTMRVjnQ2oyMGQ1
Download Telegram
๐ŸŽ‰ Welcome to BJSkillBuilder! ๐ŸŽ‰

Hey there, Skill Builders! ๐Ÿ‘‹โœจ

Weโ€™re SUPER excited to kick off our journey with you on this channel! ๐Ÿš€ Are you ready to unlock your potential and level up your skills? Whether you want to master a new hobby, boost your career, or just learn something fun, youโ€™ve come to the right place! ๐ŸŒŸ

๐ŸŒˆ Whatโ€™s Coming Your Way:

โ€ข ๐Ÿ“š Skill Tutorials: Easy-to-follow guides on everything from coding ๐Ÿ’ป to creative arts ๐ŸŽจ!

โ€ข ๐Ÿ—ฃ๏ธ Expert Interviews: Get insider tips from industry pros who are ready to share their secrets! ๐Ÿคซ

โ€ข ๐Ÿ† Fun Challenges: Participate in exciting activities to put your new skills to the test and show off your progress! ๐ŸŽ‰

โ€ข ๐Ÿค Community Support: Connect with fellow learners, share your journey, and ask all the questions you have! ๐Ÿ’ฌ

๐Ÿ’ก We Want to Hear from YOU!
What skills are you eager to learn? Drop a comment below and let us know! We canโ€™t wait to create content that YOU want to see! ๐ŸŽฏ

Stay tuned for our very first tutorial coming soon! Letโ€™s embark on this amazing learning adventure together! ๐ŸŒโœจ

Happy Learning,
The BJSkillBuilder Team ๐Ÿ’–

โ“ Want to donate us
https://t.me/DonatePB_Bot?start=donate
๐Ÿ‘7๐Ÿ”ฅ3โค2
๐ŸŒŸ Day 1: Welcome to Bots.Business and JavaScript Basics! ๐ŸŒŸ

Hi everyone! ๐Ÿ‘‹ Welcome to Day 1 of our 30-Day Bots.Business JavaScript (BJS) Learning Session! ๐ŸŽ‰ Today, weโ€™re starting our exciting journey into the world of bots. ๐Ÿค–โœจ Weโ€™ll learn the basics of Bots.Business and a little bit about JavaScript. ๐Ÿ’ป

---

โ–ŽWhat is Bots.Business? ๐Ÿค”

Bots.Business is a cool platform that helps you create and manage bots easily. Youโ€™ll use a special version of JavaScript called Bots.Business JavaScript (BJS). Donโ€™t worry if youโ€™ve never coded beforeโ€”this is made for beginners! ๐ŸŒฑ

โ–ŽWhy Use Bots.Business? ๐ŸŒˆ

โ€ข Easy to Use: You can start making bots quickly. โšก

โ€ข Great Features: Use helpful tools to make your bots even better. ๐Ÿ› ๏ธ

โ€ข Many Uses: Create bots for Telegram, automate responses, and more! ๐Ÿ“ฒ

---

โ–ŽWhat is JavaScript? ๐Ÿ“œ

JavaScript is a popular programming language that makes websites interactive. Itโ€™s also used to create bots! In our learning session, weโ€™ll work with a simpler version called BJS (Bots.Business JavaScript). ๐ŸŽˆ

---

โ–ŽLetโ€™s Get Started! ๐Ÿš€

1. Create Your First Bot ๐Ÿค–

   โ€ข Log in to the Bots.Business platform. ๐Ÿ”‘

   โ€ข Give your bot a fun name! ๐ŸŽŠ

2. Set Up a Command ๐Ÿ’ฌ

   โ€ข Bots respond to commands. Youโ€™ll set one up today!

   โ€ข Example: Create a command called /start and make it say:

     โ€ข "Welcome to my first bot! Letโ€™s get started!" ๐ŸŽ‰

3. Test Your Bot ๐Ÿงช

   โ€ข Connect your bot to Telegram using the BotFather token. ๐Ÿ”—

   โ€ข Try out the /start command and see your bot in action! ๐ŸŽˆ

---

โ–ŽExample: Your First Script ๐Ÿ“

Letโ€™s make your bot send a welcome message when someone starts it. Hereโ€™s how:

Bot.sendMessage("Hello! This is my first Bots.Business bot.");


โ€ข Go to your botโ€™s Command Editor. ๐Ÿ› ๏ธ

โ€ข Create a command (like /hello) and paste that code there.

Now, when you type /hello in Telegram, your bot will reply with:
"Hello! This is my first Bots.Business bot." ๐ŸŽŠ๐Ÿค–

---

โ–ŽYour Assignment for Day 1 ๐Ÿ“š

1. Create your first bot and give it a fun name. ๐ŸŽ‰

2. Set up a /start command with your welcome message. ๐Ÿ’ฌ

3. Test your bot by sending the /start command in Telegram. ๐Ÿ“ฒ

Bonus: Try adding a /hello command using the example code! ๐ŸŒŸ

---

โ–ŽWhatโ€™s Next? ๐Ÿ”ฎ

Join us tomorrow for Day 2, where weโ€™ll learn more about how bots work and how they handle commands. Keep experimenting, have fun, and let your creativity shine! โœจ

Happy bot building! ๐Ÿš€๐ŸŽ‰
1๐Ÿ‘7โค5๐Ÿ”ฅ1
What is the correct way to make your bot send a "Hello!" message when the user types /hello?
Final Results
81%
Bot.sendMessage("Hello!");
2%
console.log("Hello!");
5%
Add "Hello!" in the bot's description.
12%
Bots can't respond to /hello commands.
๐Ÿ‘3
โ–ŽDay 2: Bot Commands and Responses ๐ŸŽ‰

Welcome to Day 2 of the 30-Day Bots.Business JavaScript (BJS) Learning Session! ๐Ÿš€ Yesterday, we covered the basics of Bots.Business and created a simple bot with a /start command. Today, weโ€™ll dive deeper into commands and learn how to make your bot respond to user input dynamically. ๐Ÿ’ฌ

---

โ–ŽWhat Are Commands? โ“

In Bots.Business, commands are the backbone of your bot. Each command is a specific trigger that tells your bot how to respond when a user sends a particular message. Commands can have predefined text responses or JavaScript code for more dynamic actions. โš™๏ธ

---

โ–ŽHow to Create Commands ๐Ÿ› ๏ธ

1. Step 1: Open the Command Editor 
   Go to your botโ€™s Commands section in the Bots.Business dashboard. ๐Ÿ“Š

2. Step 2: Add a New Command 
   Create a new command by typing its name (e.g., /info, /help). โœ๏ธ 
   Add the response or JavaScript code you want the bot to execute when the command is triggered. ๐Ÿ”„

3. Step 3: Save and Test 
   Save the command and test it in Telegram by typing the command in your bot's chat. ๐Ÿ“ฑ

---

โ–ŽStatic Response Example ๐Ÿ“œ

Letโ€™s create a simple command called /help that responds with a static message:

โ€ข Command Name: /help 

โ€ข Response: "Welcome to the help section! Use /start to begin or /info to learn more about me." ๐Ÿ†˜ 
When a user types /help, the bot will reply with this predefined text.

---

โ–ŽDynamic Response Example Using JavaScript ๐Ÿ’ป

You can use JavaScript to make responses more dynamic. For example, letโ€™s create a /greet command that uses the userโ€™s name to greet them:

Bot.sendMessage("Hello, " + user.first_name + "! How can I assist you today?"); 


โ€ข Create a command /greet in the Command Editor. โœจ 

โ€ข Add the above script to the command. 

โ€ข Save and test it by typing /greet in your botโ€™s chat. โœ…

If the userโ€™s first name is John, the bot will reply: 
"Hello, John! How can I assist you today?" ๐Ÿ‘‹

---

โ–ŽHandling Custom Inputs ๐ŸŽจ

You can also create commands to handle inputs from users. For instance, letโ€™s create a /ask command that prompts the user for their favorite color:

Bot.sendMessage("Whatโ€™s your favorite color?"); 


To handle the userโ€™s reply, you can create another command to capture their response. For example:

Bot.sendMessage("Nice choice! I love that color too."); 


---

โ–ŽAssignment for Day 2 ๐Ÿ“š

1. Create a command /about with the static response: 
   "This is a demo bot created with Bots.Business JavaScript. Stay tuned for more!" ๐ŸŽŠ

2. Create a dynamic command /myname that replies with the userโ€™s name. Use this script: 
  
   Bot.sendMessage("Hi, " + user.first_name + "! Nice to meet you."); 
  


3. Optional Challenge: 
   Create a command /askcolor that asks the user their favorite color and responds dynamically to their input. (Hint: Use a callback command to handle the input.) ๐ŸŽฏ

---

โ–ŽWhatโ€™s Next? ๐Ÿ”ฎ

Tomorrow, in Day 3, weโ€™ll explore Variables in Bots.Business JavaScript. Variables will allow us to store and manipulate user data to create more personalized and interactive bots. Keep practicing and experimenting! ๐Ÿ’ช
๐Ÿ‘7โค2๐Ÿ”ฅ1
Coding Skill Builder ๐Ÿ’ช๐Ÿ“š(Full AI Based)
Bot.sendMessage("Hi, " + user.first_name + "! Nice to meet you.");
  
To add both the first name and last name in the message, you can modify the code as follows:

Bot.sendMessage("Hi, " + user.first_name + " " + user.last_name + "! Nice to meet you."); 


By adding user.last_name next to user.first_name with a space in between, you will include both the first name and last name in the greeting message. This code will now address the user by their first name and last name, making the message more personalized.
1โค3๐Ÿ‘3
โ–ŽDay 3: Using Variables in Bots.Business JavaScript (BJS)

Welcome to Day 3! Today, weโ€™ll dive deeper into using variables in your bot to enhance its interactivity and personalization.

---

โ–ŽWhat Are Variables?

Variables are essential components in programming that allow you to store and manage data. In the context of Bots.Business JavaScript, variables can help you:

โ€ข Remember user-specific information: such as names, ages, and preferences.

โ€ข Track statistics: like the number of interactions or scores.

โ€ข Pass data between commands.

You can store various types of data in variables, including strings (text), numbers, and more.

---

โ–ŽHow to Use Variables in BJS

1. Declaring a Variable
   To create a variable and assign it a value:
  
   let myVariable = "Hello, World!";
  


2. Using a Variable
   You can use the variable to send messages or perform actions:
  
   Bot.sendMessage(myVariable);
  


3. Modifying a Variable
   To change the value of a variable:
let myVariable = "Goodbye, World!";
  


---

โ–ŽWorking with User-Specific Variables

In Bots.Business, user-specific data is often managed using User.setProperty and User.getProperty methods.

โ–ŽStoring Data: User.setProperty()

To store user-specific data:
User.setProperty("key", value, "string");


โ€ข key: Unique identifier (e.g., "name", "age").

โ€ข value: The data to store (e.g., "John", 25).

โ€ข type: The type of data (e.g., "string", "number", "boolean").

Example:
User.setProperty("name", "John", "string");


โ–ŽRetrieving Data: User.getProperty()

To retrieve stored data:
let name = User.getProperty("name");
Bot.sendMessage("Your name is: " + name);


---

โ–ŽExample: Storing and Using a Name

Letโ€™s create two commands: /setname to store the userโ€™s name and /getname to retrieve it.

1. Command: /setname
  
   // Assume user input is captured in userInput
   User.setProperty("name", userInput, "string"); // Replace userInput with actual input
   Bot.sendMessage("Your name has been saved!");
  


2. Command: /getname
  
   let name = User.getProperty("name");
   Bot.sendMessage("Your saved name is: " + name);
  


---

โ–ŽExample: Counting User Interactions

You can track how many times a user interacts with your bot using variables.

1. Command: /interact
  
   let count = User.getProperty("interaction_count") || 0; // Default to 0 if not set
   count += 1;
   User.setProperty("interaction_count", count, "number");
   Bot.sendMessage("You have interacted with this bot " + count + " times!");
  


---

โ–ŽAssignment for Day 3

1. Create a command /saveage that asks the user for their age and stores it in a variable.

   โ€ข Hint: Use User.setProperty("age", userInput, "number");.

2. Create a command /getage that retrieves and displays the saved age.

   โ€ข Hint: Use User.getProperty("age");.

3. Bonus Challenge:

   โ€ข Create a command /reset that clears the saved age and interaction count.

     โ€ข Hint: Use User.setProperty("key", null); to reset a variable.

---

โ–ŽWhatโ€™s Next?

In Day 4, we will explore conditions (if/else statements) and how to make your bot respond differently based on user input or stored variables. Keep practicing what youโ€™ve learned today, and feel free to share your progress! Happy coding!
๐Ÿ‘5๐Ÿ”ฅ3
Hey learners! ๐Ÿ‘‹

You've completed 3 days of the Bots.Business learning session. It's time to put your knowledge to the test! ๐Ÿ’ช
1๏ธโƒฃ What will this script do?

Bot.sendMessage("Hello, " + user.first_name + "!");
๐Ÿ‘4
2๏ธโƒฃ How do you save a userโ€™s name in a variable?
Whoever answers will learn ๐Ÿ“š๐Ÿค”
๐Ÿ‘5
3๏ธโƒฃ What will this code do?

let count = User.getProperty("interaction_count") || 0;  
count += 1;
User.setProperty("interaction_count", count, "number");
Bot.sendMessage("Youโ€™ve interacted " + count + " times!");
๐Ÿ‘1