Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Sardorr555 committed Oct 10, 2023
0 parents commit 6d51cf0
Show file tree
Hide file tree
Showing 4 changed files with 160 additions and 0 deletions.
79 changes: 79 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions account.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@



class App:
def __init__(self):
pass

def person(self):
pass
72 changes: 72 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@

import telebot
from telebot import types
from telebot.types import WebAppInfo



bot = telebot.TeleBot('6606800926:AAETK4HfFVqOk-mmfMSn87gLAlriA5XiAjY')




@bot.message_handler(commands=['start', 'main'])
def main(message):
markup = types.ReplyKeyboardMarkup(resize_keyboard=True, row_width=2)
courier_button = types.KeyboardButton("Курьер🏃")
client_button = types.KeyboardButton("Клиент🙋‍♂")
markup.add(courier_button, client_button)

# Send the message with the initial options
bot.send_message(message.chat.id, "Выберите роль:", reply_markup=markup)


@bot.message_handler(commands=['group'])
def group(message):
bot.send_message(message.chat.id, f'это наша группа для общения https://t.me/moscowDeliiveryBot ')




@bot.message_handler(func=lambda message: message.text in ["Курьер🏃", "Клиент🙋‍♂"])
def on_click(message):
user_id = message.from_user.id
if message.text == "Курьер🏃":
# Create a keyboard markup with two courier options
markup = types.ReplyKeyboardMarkup(resize_keyboard=True, row_width=2)
button1 = telebot.types.KeyboardButton("Легковой", web_app=WebAppInfo(url="https://google.com/"))
button2 = telebot.types.KeyboardButton("Грузовой", web_app=WebAppInfo(url="https://google.com/"))

markup.add(button1, button2)
bot.send_message(user_id, "Выберите тип курьера:", reply_markup=markup)
elif message.text == "Клиент🙋‍♂":
# Create a keyboard markup with two client options
markup = types.ReplyKeyboardMarkup(resize_keyboard=True, row_width=2)
button1 = telebot.types.KeyboardButton("Легковой", web_app=WebAppInfo(url="https://youtube.com/"))
button2 = telebot.types.KeyboardButton("Грузовой", web_app=WebAppInfo(url="https://youtube.com/"))

markup.add(button1, button2)
bot.send_message(user_id, "Выберите тип клиента:", reply_markup=markup)
else:
# Handle other messages (optional)
bot.send_message(user_id, "Извините, не понял ваш запрос. Пожалуйста, выберите опцию из меню.")



@bot.message_handler(func=lambda message: message.text in ["Аккаунт курьера", "аккаунт клиента"])
def account_setting(message):

if message.text == "Аккаунт курьера":
pass
elif message.text == "аккаунт клиента":
pass







bot.polling(none_stop=True)


Binary file added requirements.txt
Binary file not shown.

0 comments on commit 6d51cf0

Please sign in to comment.