گروه رسمی BaleCore:
@balecore_group
۱۵:۳۵
به کانال آموزش جامع و کاربردی کتابخانه BaleCore خوش اومدید! 🩵
اینجا قراره با هم صفر تا صد ساخت رباتهای حرفهای و جذاب برای پیامرسان بله رو با استفاده از کتابخونه قدرتمند BaleCore یاد بگیریم.
BaleCore یه کتابخونه پایتونیه که کار شما رو برای ساخت ربات بله خیلی آسونتر و سریعتر میکنه. با استفاده از BaleCore میتونید:
ما اینجا هستیم تا به شما کمک کنیم به یه توسعهدهنده ربات حرفهای برای بله تبدیل بشید. پس اگه به ساخت ربات علاقه دارید یا میخواید مهارتهاتون رو تو این زمینه ارتقا بدید، حتماً با ما همراه باشید.
همچنین، خوشحال میشیم اگه دوستان و همکارانتون رو هم به این کانال دعوت کنید.
#BaleCore #ربات_بله #آموزش_پایتون #برنامه_نویسی
۱۱:۴۱
Python - BaleCore.zip
۲۹.۹۴ کیلوبایت
کتابخانه BaleCore
نسخه 1.0.2
این فایل زیپ شامل فایل های کتابخانه BaleCore و چندین ربات تست است.
#BaleCore #ربات_بله #آموزش_پایتون #برنامه_نویسی
@balecore
نسخه 1.0.2
این فایل زیپ شامل فایل های کتابخانه BaleCore و چندین ربات تست است.
#BaleCore #ربات_بله #آموزش_پایتون #برنامه_نویسی
۱۷:۰۶
🟢 متود sendMessage:
chat_id ==> int | str
text ==> str
reply_to_message_id ==> int
reply_markup ==> list
🟡 نکته: async\await
await bot.send_message(chat_id=chat_id, text=text)#BaleCore #ربات_بله #آموزش_پایتون #برنامه_نویسی #ارسال_پیام
۰:۲۰
🟢 متود sendPhoto:
chat_id ==> int | str
photo ==> str
caption ==> str
reply_to_message_id ==> int
reply_markup ==> list
🟡 نکته: async\await
await bot.send_photo(chat_id=chat_id, photo=photo)#BaleCore #ربات_بله #آموزش_پایتون #برنامه_نویسی #ارسال_عکس
۰:۲۳
🟢 متود sendVideo:
chat_id ==> int | str
video ==> str
caption ==> str
reply_to_message_id ==> int
reply_markup ==> list
🟡 نکته: async\await
await bot.send_video(chat_id=chat_id, video=video)#BaleCore #ربات_بله #آموزش_پایتون #برنامه_نویسی #ارسال_ویدیو
۰:۲۵
🟢 متود sendAnimation:
chat_id ==> int | str
animation ==> str
caption ==> str
reply_to_message_id ==> int
reply_markup ==> list
🟡 نکته: async\await
await bot.send_animation(chat_id=chat_id, animation=animation)#BaleCore #ربات_بله #آموزش_پایتون #برنامه_نویسی #ارسال_ویدیو_بیصدا
۰:۲۹
🟢 متود sendSticker:
chat_id ==> int | str
sticker ==> str
reply_to_message_id ==> int
reply_markup ==> list
🟡 نکته: async\await
await bot.send_sticker(chat_id=chat_id, sticker=sticker)#BaleCore #ربات_بله #آموزش_پایتون #برنامه_نویسی #ارسال_شمایل
۰:۳۰
🟢 متود sendDocument:
chat_id ==> int | str
document ==> str
caption ==> str
reply_to_message_id ==> int
reply_markup ==> list
🟡 نکته: async\await
await bot.send_document(chat_id=chat_id, document=document)#BaleCore #ربات_بله #آموزش_پایتون #برنامه_نویسی #ارسال_مستندات
۰:۳۲
🟢 متود sendContact:
chat_id ==> int | str
phone_number ==> str
first_name ==> str
last_name ==> str
reply_to_message_id ==> int
reply_markup ==> list
🟡 نکته: async\await
await bot.send_contact(chat_id=chat_id, phone_number=phone_number, first_name=first_name, last_name=last_name)#BaleCore #ربات_بله #آموزش_پایتون #برنامه_نویسی #ارسال_مخاطب
۰:۴۶
🟢 متود sendLocation:
chat_id ==> int | str
latitude ==> float
longitude ==> float
reply_to_message_id ==> int
reply_markup ==> list
🟡 نکته: async\await
await bot.send_location(chat_id=chat_id, latitude=latitude, longitude=longitude)#BaleCore #ربات_بله #آموزش_پایتون #برنامه_نویسی #ارسال_موقعیت
۰:۴۶
🟢 متود sendVoice:
chat_id ==> int | str
voice ==> str
caption ==> str
reply_to_message_id ==> int
reply_markup ==> list
🟡 نکته: async\await
await bot.send_voice(chat_id=chat_id, voice=voice)#BaleCore #ربات_بله #آموزش_پایتون #برنامه_نویسی #ارسال_ضبط
۱۴:۴۹
🟢 متود sendAudio:
chat_id ==> int | str
audio ==> str
caption ==> str
reply_to_message_id ==> int
reply_markup ==> list
🟡 نکته: async\await
await bot.send_audio(chat_id=chat_id, audio=audio)#BaleCore #ربات_بله #آموزش_پایتون #برنامه_نویسی #ارسال_موسیقی
۱۴:۵۰
🟢 ربات Echo:
message ==> text ==> message.text
message ==> reply_text ==> message.reply_text()
🟡 نکته: async\await
from balecore import Bot, Filters
bot = Bot(token="TOKEN", url="https://tapi.bale.ai")
filters = Filters(bot)
@bot.Message()
async def echo(bot, update, message):
await message.reply_text(message.text)
bot.start
#BaleCore #ربات_بله #آموزش_پایتون #برنامه_نویسی #ربات_اکو
۱۷:۵۰
🟢 نصب کتابخانه:
pip install -U balecore
pip install balecore
pip install -e https://mirror-pypi.runflare.com/simple balecore
sudo pip install balecore
#BaleCore #ربات_بله #آموزش_پایتون #برنامه_نویسی #نصب_کتابخانه
۱۷:۵۴
🟢 اجرای ربات:
بدون asyncio:
bot.startبا asyncio:
import asyncio
asyncio.run(bot.start_polling)#BaleCore #ربات_بله #آموزش_پایتون #برنامه_نویسی #اجرای_ربات
۱۸:۵۷
🟢 آموزش Bot:
token ==> strurl ==> str ==> https://tapi.bale.aiproxy ==> str ==> Noneinfo_file_path ==> JSON ==> info.jsonconcurrency_limit ==> int ==> 100
bot = Bot(token="TOKEN")#BaleCore #ربات_بله #آموزش_پایتون #برنامه_نویسی #آموزش_Bot
۱۹:۰۲
🟢 ربات ReplyKeyboardMarkup:
from balecore import Bot, Filters, ReplyKeyboardMarkup, ReplyKeyboardButton
bot = Bot(token="")
filters = Filters(bot)
@bot.Message(filters.private & filters.command("start")
async def reply_keyboard(bot, update, message):
chat_id = message.chat.id
keyboard = ReplyKeyboardMarkup()
keyboard.add_row(ReplyKeyboardButton(text="button 1"), ReplyKeyboardButton(text="button 2"))
keyboard.add_row(ReplyKeyboardButton(text="button 3"))
await bot.send_message(chat_id=chat_id, text="Hello, balecore!", reply_markup=keyboard)
bot.start#BaleCore #ربات_بله #آموزش_پایتون #برنامه_نویسی #آموزش_ریپلای_کیبورد
۱۸:۲۲
🟢 ربات InlineKeyboardMarkup:
from balecore import Bot, Filters, InlineKeyboardButton, InlineKeyboardMarkup
bot = Bot(token="")
filters = Filters(bot)
@bot.Message(filters.private & filters.command("start")
async def reply_keyboard(bot, update, message):
chat_id = message.chat.id
keyboard = InlineKeyboardMarkup()
keyboard.add_row(InlineKeyboardButton("button 1", "button1"), InlineKeyboardButton("button 2", "button2"))
keyboard.add_row(InlineKeyboardButton("button 3", "button3"))
await bot.semd_message(chat_id=chat_id, text="Hello, balecore!", reply_markup=keyboard)
@bot.CallbackQuery()
async def callback_query(bot, update, message):
callback_query.message.bot = bot
data = callback_query.data
if data == "button1":
await callback_query.message("it,s button 1")
elif data == "button2":
await callback_query.message("it,s button 2")
elif data == "button3":
await callback_query.message("it,s button 3")
bot.start#BaleCore #ربات_بله #آموزش_پایتون #برنامه_نویسی #آموزش_آینلاین_کیبورد
۱۹:۰۹