You are on page 1of 8

import telegram

from telegram import InlineKeyboardButton, InlineKeyboardMarkup


from telegram.ext import Updater, CommandHandler, CallbackQueryHandler
from dotenv import load_dotenv
import os
import logging
logger = logging.getLogger(__name__)

load_dotenv()
TOKEN = os.getenv("TOKEN")

def main():
# Create an updater and dispatcher
updater = Updater(TOKEN, use_context=True)
dispatcher = updater.dispatcher

# Register command handlers


dispatcher.add_handler(CommandHandler("start", start))
dispatcher.add_handler(CommandHandler("about", about))
dispatcher.add_handler(CommandHandler("m_new", m_new))
dispatcher.add_handler(CommandHandler("m_bestsellers", m_bestsellers))
dispatcher.add_handler(CommandHandler("m_most_popular", m_most_popular))
dispatcher.add_handler(CommandHandler("m_promo", m_promo))
dispatcher.add_handler(CommandHandler("m_product_type", m_product_type))
dispatcher.add_handler(CommandHandler("m_our_vendors", m_our_vendors))
dispatcher.add_error_handler(error_handler)

# Start polling for updates


updater.start_polling()
updater.idle()

def start(update, context):


message = """🤝 Welcome to the Stoned Illuminati Market! 🦉
Your one-stop shop for all Cannabis & Mushroom needs. Browse and buy from multiple
vendors with ease, all in one place. Find everything from Flowers to Edibles,
conveniently and hassle-free.

New Products /m_new


🏆 Best Sellers /m_bestsellers 🏆
🥇 Most Popular /m_most_popular 🥇
🎉 Promotions /m_promo 🎉

✨ Browse by Products:
💐 Flower /m_bud
🖋 Concentrates & Rosin /m_wax
Distillate & Carts /m_distillate_carts
🍄 Mushrooms /m_mushrooms
🥓 Edibles /m_edibles
Prerolls Moonrocks & Misc /m_misc
🛍 Custom Listings /m_custom
✨ Browse by Vendor /m_our_vendors

🛒 /cart
🛍 /orders
@SiMarketSupport
"""
update.message.reply_text(message)

def m_new(update, context):


message = """🆕 NEW PRODUCTS 🆕

The list of recently added products

Incredible SnowCaps Bigs 14g


/p_0QRol2WoD7yclEGmaS9Xkl
-- by Area420

LIVE HASH ROSIN


/p_4Ee7dGhEWTbIfu3BY8ZJKC
-- by DRGREENTHUMB4201

1G LIVE CARTRIDGES
/p_0YtIYcGP5zVVjfKkcwpSBt
-- by Flight School

1G PACKWOODS DISPOSABLES
/p_1mHc7MVcRg2rq9a2klMsEg
-- by Flight School

2G MELT DISPOSABLES
/p_10EzflQY23hOVeGaVVA1vV
-- by Flight School"""
image_url =
"https://i.guim.co.uk/img/media/2747225b06ab616f1df940e57e73155c87b467de/
0_0_4942_2965/master/4942.jpg?width=620&dpr=1&s=none"
buttons = [
[InlineKeyboardButton("Next 5 >", callback_data="promo_1")],
[InlineKeyboardButton("Flowers ", callback_data="promo_2")],
[InlineKeyboardButton("Disposables and Carts",
callback_data="promo_3")],
[InlineKeyboardButton("Concentrates", callback_data="promo_4")],
[InlineKeyboardButton("Mushroom", callback_data="promo_5")],
[InlineKeyboardButton("Promotions", callback_data="promo_6")],
[InlineKeyboardButton("Distillate Carts Dissposal",
callback_data="promo_7")],
]

reply_markup = InlineKeyboardMarkup(buttons)

# Send image with the message and buttons


context.bot.send_photo(chat_id=update.effective_chat.id,
photo=image_url, caption=message,
reply_markup=reply_markup)

def m_bestsellers(update, context):


message = """💲 OUR BESTSELLERS 💲

This list of products sorted by dollar value of sales. Highest revenue products
appear first.
8-Strain Combo
/p_4dRkGgIdeyxeWTOitDn2sN
-- by Frost_Garden

Exotic Smalls
/p_11DV8paUnxdueiVFj8a7nT
-- by Boomingsales

Stoned Age Distillate Cartridge


/p_334PYHA7BSrYJzCmNrEGMG
-- by Frost_Garden

Outdoor Flower 5 Strains


/p_6kwoQfWzbD9vO2FJEaWNcU
-- by Boomingsales

Crumble 2g
/p_6m8EKWDoYFNr45JtZzp05W
-- by Frost_Garden"""
image_url =
"https://www.outsourcing-pharma.com/var/wrbm_gb_food_pharma/storage/images/
_aliases/wrbm_large/publications/pharmaceutical-science/outsourcing-pharma.com/
article/2023/06/29/anebulo-pharmaceuticals-providing-an-effective-antidote-for-
cannabis-intoxication/16535705-1-eng-GB/Anebulo-Pharmaceuticals-providing-an-
effective-antidote-for-cannabis-intoxication.jpg"

buttons = [
[InlineKeyboardButton("Next 5 >", callback_data="promo_1")],
[InlineKeyboardButton("🌸Flowers ", callback_data="promo_2")],
[InlineKeyboardButton("☁️Carts", callback_data="promo_3")],
[InlineKeyboardButton("🏺Wax", callback_data="promo_4")],
[InlineKeyboardButton("🍬Edibles", callback_data="promo_5")],
[InlineKeyboardButton("🍄Shrooms", callback_data="promo_6")],
[InlineKeyboardButton("🚬Preerolls Moonrocks Mic",
callback_data="promo_7")],
]

reply_markup = InlineKeyboardMarkup(buttons)

# Send image with the message and buttons


context.bot.send_photo(chat_id=update.effective_chat.id,
photo=image_url, caption=message,
reply_markup=reply_markup)

def m_most_popular(update, context):


message = """💕MOST POPULAR PRODUCTS 💕

The list of products sorted sorted by number of the purchases. Most popular appear
first.

Stoned Age Distillate Cartridge


/p_334PYHA7BSrYJzCmNrEGMG
-- by Frost_Garden

Divine Banana
/p_1K3ILmaScKG8LLR7ROswrR
-- by Frost_Garden
Crumble 2g
/p_6m8EKWDoYFNr45JtZzp05W
-- by Frost_Garden

8-Strain Combo
/p_4dRkGgIdeyxeWTOitDn2sN
-- by Frost_Garden

Platinum Gorilla
/p_6MnPI4K7Zq4NMBQy3dNT7Z
-- by Frost_Garden"""
image_url = "https://encrypted-tbn0.gstatic.com/images?
q=tbn:ANd9GcQzgHNEuveHT_2tXIE9hdFbHhZAJFE7-
wn3OGFI2hSavj2wiSQ1AmVyJvmDdmk3rgW8Jpg&usqp=CAU"

buttons = [
[InlineKeyboardButton("Next 5 >", callback_data="promo_1")],
[InlineKeyboardButton("🌸Flowers ", callback_data="promo_2")],
[InlineKeyboardButton("☁️Carts", callback_data="promo_3")],
[InlineKeyboardButton("🏺Wax", callback_data="promo_4")],
[InlineKeyboardButton("🍬Edibles", callback_data="promo_5")],
[InlineKeyboardButton("🍄Shrooms", callback_data="promo_6")],
[InlineKeyboardButton("🚬Preerolls Moonrocks Mic",
callback_data="promo_7")],
]

reply_markup = InlineKeyboardMarkup(buttons)

context.bot.send_photo(chat_id=update.effective_chat.id,
photo=image_url, caption=message,
reply_markup=reply_markup)

def m_promo(update, context):


message = """14g SI BOT CELEBRATION - Exotic
/p_4CUiVDGTM3aJkOLuvyCiG6
-- by Area420

1 GRAM CARTRIDGES - SALE


/p_02d9aHVwMp8nDYTYYMzXgE
-- by PrettyPacks

Area420 Omakase 4 Oz Platter


/p_25cFGMsT3qa2kfWcqYyme3
-- by Area420

AvaBarksdale Product Sampler


/p_4TPQfkzzPkYxa3cwoZdJMH
-- by AvaBarksdale1

Kitty's Katnip
/p_1VuAyD1L042UMSzRAJQsnc
-- by Sticky Kitty"""
image_url = "https://thehubbackend.com/media/19719-Promotion%20Policies.png"

buttons = [
[InlineKeyboardButton("Next 2 >", callback_data="promo_1")],
[InlineKeyboardButton("🌸 Flowers 🌸", callback_data="promo_2")],
[InlineKeyboardButton("☁️ Disposables and Carts ☁️
",
callback_data="promo_3")],
[InlineKeyboardButton("🏺 Concentrates 🏺", callback_data="promo_4")],
[InlineKeyboardButton("🍄 Mushroom 🍄", callback_data="promo_5")],
]
reply_markup = InlineKeyboardMarkup(buttons)

context.bot.send_photo(chat_id=update.effective_chat.id, photo=image_url,
caption=message, reply_markup=reply_markup)

def m_product_type(update, context):


message = """Product Types:

🌸 Flower /m_bud
🍯 Extracts /m_wax
☁️ Distillate & Carts /m_distillate_carts
🍄 Mushrooms /m_mushrooms
🍫 Edibles /m_edibles
🚬 Pre Rolls & Misc /m_misc
🫵🏾 Custom Listings /m_custom

🏘 /start
🔑 /market_pgp
🛒 /cart
🛍 /orders"""
image_url = "https://encrypted-tbn0.gstatic.com/images?
q=tbn:ANd9GcQzgHNEuveHT_2tXIE9hdFbHhZAJFE7-
wn3OGFI2hSavj2wiSQ1AmVyJvmDdmk3rgW8Jpg&usqp=CAU"

context.bot.send_photo(chat_id=update.effective_chat.id,
photo=image_url, caption=message)

def m_our_vendors(update, context):


message = """ ACTIVE VENDORS

Area420 /v_area420
AvaBarksdale1 /v_avab
Black Market Beef Jerky /v_meatman
Boomingsales /v_boom
DaleDenton2020 /v_dd2020
DRGREENTHUMB4201 /v_dgt710
Flight School /v_flight
Frost_Garden /v_frostgar
House Of Fire /v_hof
KiND /v_kind
MushieMushie /v_mushie
mushroomgod /v_mushgod
NaturesLab /v_naterlab
NorCal Connect /v_cal
PrettyPacks /v_pp
Psylocybe Fanaticus /v_psyfan
QueenTetra /v_qtetra
SFTreats /v_sf
Si Media Exclusive Deals /v_simedia
SomethingTerps /v_st
Sticky Kitty /v_kitty
Surefour /v_surefour
TheBudFather /v_tbf
TheStarMan /v_starman
Top Shelf Cannabis /v_tsc
ValleyHeat /v_vh
WilliamShatner /v_shatner
XaZaWorld /v_xaza

--------------------------

💤 Inactive Vendors 💤

HOUSE OF THE DANK /v_dankdank


lain /v_lain

--------------------------
🏘 /start
🔑 /market_pgp
🛒 /cart
🛍 /orders"""
image_url = "https://tandem.app/files/featured-image-4-steps-to-simplify-your-
vendor-due.1108.jpg"
context.bot.send_photo(chat_id=update.effective_chat.id,
photo=image_url, caption=message)

def about(update, context):


message = """Welcome to Si Market, the ultimate destination for seamless
shopping from multiple vendors under one virtual roof! We understand the hassle of
juggling between different online shops, managing multiple checkouts, and dealing
with separate payments. That's why we have created a platform that simplifies your
shopping experience, allowing you to explore a wide range of vendors and products,
and conveniently checkout all your items in a single payment.

At Si Market, you have the freedom to browse through numerous vendors, each
offering their unique products, services, and special deals. Whether you're
searching for Flowers, Concentrates, Edibles, Mushrooms, or any other related item,
our diverse selection ensures that you'll find exactly what you need, all in one
place.

Gone are the days of tedious and time-consuming shopping experiences. With Si
Market, you can effortlessly add items to your shopping cart from various vendors,
while also comparing prices, reading reviews, and making informed decisions. No
more hopping from one website to another or dealing with different payment
procedures. Our streamlined platform makes your shopping journey not only
convenient but also enjoyable.

With our secure and user-friendly interface, you can navigate Si Market with ease,
ensuring a smooth and personalized experience. Find the perfect products, discover
new vendors, and create your unique shopping cart tailored to your preferences.
Once you're ready to make a purchase, our seamless checkout process allows you to
review and pay for all your items in one go. Bid farewell to the hassle of multiple
payments and tracking numerous orders — Si Market takes care of it all, providing
you with a stress-free shopping experience.

So why wait? Join the Si Market community today and indulge in the convenience of
shopping from multiple vendors, all while enjoying a hassle-free checkout process.
Start exploring our extensive selection and make your shopping dreams a reality.

Si Market - simplifying the way you shop, one vendor at a time.


"""

# Inline keyboard buttons


buttons = [
[InlineKeyboardButton("🏠 Home", callback_data="button1")],
[InlineKeyboardButton("Apply to become a vendor",
callback_data="button2")],
[InlineKeyboardButton("Apply to create market", callback_data="button1")],
]

# Create markup
reply_markup = InlineKeyboardMarkup(buttons)

# Send message with the inline keyboard


update.effective_message.reply_text(message, reply_markup=reply_markup)

def error_handler(update, context):


"""Log the error and send a message to the user."""
logger.error(msg="Exception occurred", exc_info=context.error)
update.message.reply_text("An error occurred. Please try again later.")

# Register error handler

# Execute the main function


if __name__ == '__main__':
main()
"In the start command there is message send is "🤝 Welcome to the Stoned Illuminati
Market! 🦉
Your one-stop shop for all Cannabis & Mushroom needs. Browse and buy from multiple
vendors with ease, all in one place. Find everything from Flowers to Edibles,
conveniently and hassle-free.

New Products /m_new


🏆 Best Sellers /m_bestsellers 🏆
🥇 Most Popular /m_most_popular 🥇
🎉 Promotions /m_promo 🎉

✨ Browse by Products:
💐 Flower /m_bud
🖋 Concentrates & Rosin /m_wax
☁️Distillate & Carts /m_distillate_carts
🍄 Mushrooms /m_mushrooms
🥓 Edibles /m_edibles
Prerolls Moonrocks & Misc /m_misc
🛍 Custom Listings /m_custom
✨ Browse by Vendor /m_our_vendors

🛒 /cart
🛍 /orders

@SiMarketSupport" I want that this message should not be send other than this it
add message message of the 1column and 2 row of start.xlsx with the " New
Products /m_new
🏆 Best Sellers /m_bestsellers 🏆
🥇 Most Popular /m_most_popular 🥇
🎉 Promotions /m_promo 🎉
" and then also add goes to the category.xlsx and in category.xlsx there are
further 3 spreadsheet it read the name of that and then add that with the message
and give the categories in a way like "/category" if category is shampoo it add
/shapoo in format like "Browse by Products
category /category" if two or more categores it written in same format in the next
line in the same format.... On the side by side and when some one click that
category it again go to the category.xlsx and first copyy the initial descrption
written in the 1column 2nd row then it add image with it image url is give then it
add first product name in one line and in second line it automatiaclly generates
and product id for the specific product in a way that if some one click that id i.e
"/productid" it then give the product name product description product image and
with this it the end it give the variations in the form of the button like here
"40g-(40)$----50g-(30)$----70g-(60)$" in the button it writes first 40g and then 40
and then create a new button and add another variation with 50g-30$ the variations
can be distingwished by "---" and if there are more variations it add more
buttons... Do it I will tell you more in next prompt

You might also like