Repository navigation
bot.py #5069
bot.py
#5069
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
from telegram.ext import (
Updater, CommandHandler, MessageHandler,
Filters, ConversationHandler
)
from telegram import ReplyKeyboardMarkup
import os
TOKEN = os.getenv("BOT_TOKEN")
ADMIN_ID = int(os.getenv("ADMIN_ID"))
DESIGN, TIME, CONTACT = range(3)
def start(update, context):
keyboard = [
["🎨 Xizmatlar", "💼 Portfolio"],
["📝 Buyurtma berish", "📞 Aloqa"]
]
reply_markup = ReplyKeyboardMarkup(keyboard, resize_keyboard=True)
def menu(update, context):
text = update.message.text
def order_start(update, context):
update.message.reply_text("Qanday dizayn kerak?")
return DESIGN
def get_design(update, context):
context.user_data["design"] = update.message.text
update.message.reply_text("Qachon tayyor bo‘lishi kerak?")
return TIME
def get_time(update, context):
context.user_data["time"] = update.message.text
update.message.reply_text("Aloqa uchun username yoki raqam:")
return CONTACT
def get_contact(update, context):
context.user_data["contact"] = update.message.text
def main():
updater = Updater(TOKEN)
dp = updater.dispatcher
if name == "main":
main()
All reactions