لوگوی پیام رسان بلهدانلود «بله»
عکس پروفایل BaleCoreB
۸۱ عضو

BaleCore

مشاهده در اپلیکیشن بلهمشاهده در وب بله
۴ تیر ۱۴۰۴
undefined آموزش شماره #7
🟢 متود sendContact:
chat_id ==> int | str
phone_number ==> str
first_name ==> str
last_name ==> str
reply_to_message_id ==> int
reply_markup ==> list

🟡 نکته: async\await
undefined نمونه:

await bot.send_contact(chat_id=chat_id, phone_number=phone_number, first_name=first_name, last_name=last_name)


#BaleCore #ربات_بله #آموزش_پایتون #برنامه_نویسی #ارسال_مخاطبundefined @balecore
undefined۲

۱۹۳

۰:۴۶

undefined آموزش شماره #8
🟢 متود sendLocation:
chat_id ==> int | str
latitude ==> float
longitude ==> float
reply_to_message_id ==> int
reply_markup ==> list

🟡 نکته: async\await
undefined نمونه:

await bot.send_location(chat_id=chat_id, latitude=latitude, longitude=longitude)


#BaleCore #ربات_بله #آموزش_پایتون #برنامه_نویسی #ارسال_موقعیتundefined @balecore
undefined۲
undefined۱

۲۰۱

۰:۴۶

undefined آموزش شماره #9
🟢 متود sendVoice:
chat_id ==> int | str
voice ==> str
caption ==> str
reply_to_message_id ==> int
reply_markup ==> list

🟡 نکته: async\await
undefined نمونه:

await bot.send_voice(chat_id=chat_id, voice=voice)


#BaleCore #ربات_بله #آموزش_پایتون #برنامه_نویسی #ارسال_ضبطundefined @balecore
undefined۱
undefined۱

۲۰۱

۱۴:۴۹

undefined آموزش شماره #10
🟢 متود sendAudio:
chat_id ==> int | str
audio ==> str
caption ==> str
reply_to_message_id ==> int
reply_markup ==> list

🟡 نکته: async\await
undefined نمونه:

await bot.send_audio(chat_id=chat_id, audio=audio)


#BaleCore #ربات_بله #آموزش_پایتون #برنامه_نویسی #ارسال_موسیقیundefined @balecore
undefined۱
undefined۱

۲۱۲

۱۴:۵۰

۹ تیر ۱۴۰۴
undefined آموزش شماره #11
🟢 ربات Echo:
message ==> text ==> message.text
message ==> reply_text ==> message.reply_text()

🟡 نکته: async\await
undefined نمونه:

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 #ربات_بله #آموزش_پایتون #برنامه_نویسی #ربات_اکوundefined @balecore
undefined۱

۱۹۵

۱۷:۵۰

undefined آموزش شماره #12
🟢 نصب کتابخانه:
pip install -U balecore
pip install balecore
pip install -e https://mirror-pypi.runflare.com/simple balecore
sudo pip install balecore


#BaleCore #ربات_بله #آموزش_پایتون #برنامه_نویسی #نصب_کتابخانهundefined @balecore
undefined۱

۱۹۴

۱۷:۵۴

undefined آموزش شماره #13
🟢 اجرای ربات:
بدون asyncio:

bot.start
با asyncio:

import asyncio 
asyncio.run(bot.start_polling)


#BaleCore #ربات_بله #آموزش_پایتون #برنامه_نویسی #اجرای_رباتundefined @balecore

۲۰۱

۱۸:۵۷

undefined آموزش شماره #14
🟢 آموزش Bot:
token ==> strurl ==> str ==> https://tapi.bale.aiproxy ==> str ==> Noneinfo_file_path ==> JSON ==> info.jsonconcurrency_limit ==> int ==> 100

bot = Bot(token="TOKEN")


#BaleCore #ربات_بله #آموزش_پایتون #برنامه_نویسی #آموزش_Botundefined @balecore

۲۳۱

۱۹:۰۲

۱۰ تیر ۱۴۰۴
undefined آموزش شماره #15
🟢 ربات 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 #ربات_بله #آموزش_پایتون #برنامه_نویسی #آموزش_ریپلای_کیبوردundefined @balecore

۲۲۲

۱۸:۲۲

undefined آموزش شماره #16
🟢 ربات 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 #ربات_بله #آموزش_پایتون #برنامه_نویسی #آموزش_آینلاین_کیبوردundefined @balecore

۲۶۳

۱۹:۰۹