Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @bot.message_handler(commands=['start'])
- def start(m):
- try:
- for i in range (-1,10):
- bot.delete_message(m.chat.id,m.message_id+i)
- except:
- pass
- gif = 'CgACAgQAAxkBAAIBM15OxkUofuioKz0XxMs10xdgceZGAAI7BgACnfd4Ul_T32ps-cQOGAQ'
- kb = types.InlineKeyboardMarkup()
- kb.add(types.InlineKeyboardButton(text='קהילה🧑🏽💻', url='https://t.me/GanKasom'))
- kb.add(types.InlineKeyboardButton(text='מגדלים 🧑🏽🌾', url='https://t.me/GanKasomGrow'))
- kb.add(types.InlineKeyboardButton(text='יד שנייה 📦', url='https://t.me/GanKasomExchange'))
- kb.add(types.InlineKeyboardButton(text='כיוונים', callback_data="כיוונים"'))
- kb.add(types.InlineKeyboardButton(text='ביקורות 💭', url='https://t.me/GanKasomReviews'))
- kb.add(types.InlineKeyboardButton(text='בוט ביקורות 📝', url='https://t.me/GanKasomReviews'))
- bot.send_document(m.chat.id, gif, reply_markup = kb)
- @bot.callback_query_handler(func=lambda c:True)
- def inline(c):
- if c.data == 'כיוונים':
- key = types.InlineKeyboardMarkup()
- but_1 = types.InlineKeyboardButton(text="צפון", callback_data="כיוונים")
- key.add(but_1, but_2, but_3)
- @server.route('/' + TOKEN, methods=['POST'])
- def getMessage():
- bot.process_new_updates([telebot.types.Update.de_json(request.stream.read().decode("utf-8"))])
- return "!", 200
- @server.route("/")
- def webhook():
- bot.remove_webhook()
- bot.set_webhook(url='https://quiet-lake-27894.herokuapp.com/' + TOKEN)
- return "Gan Kasom Project ...", 200
- if __name__ == "__main__":
- server.run(host="0.0.0.0", port=int(os.environ.get('PORT', 5000)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement