Video Demo: WW-Market-Video
Bot Link: WW-Market Link
worldwide market is a telegram bot where you can buy a product no matter where it is, and as well you can sell your products no matter where you are.
-
set-up your bot following these steps:
- open telegram
- open this bot: BotFather
- from Menu click the /newbot command to create new bot and save the bot token
- follow this steps [Getting Payment Token] to get a payments provider token. But Note: this bot uses "Stripe" as its provider and hardly recommend to use it to avoid any errors
-
you need to install the pyTelegramBotAPI library. see the Installation Guide
-
Run this commands in your terminal
export BOT_TOKEN=Your_Bot_Token
export PROVIDER_TOKEN=Your_Payments_Provider_Token
export PASSWORD=This_Password_You_Will_Be_Asked_For_Later_To_Prove_That_You're_The_Owner
- Owners
- Admins
- Users
No matter what you or any user type, the bot will ask for a password (Which is the password you exported in the 3rd step of installation).
if the password is wrong, the bot will ask to try again, so please start the bot and enter the password right after running the bot.
if the password is right, you'll get a message tells you that you are added as an owner and the bot would start to work for any other user.
the bot will sends you a welcoming message and displays a Markup keyboard buttons in the place of the regular letter-keyboard.
it lets the user type a search word and then show all the products posts that contain this search word
on the results of (show all products - search - my cart - bought products - my products - pending posts) if the number of the posts more than one.
on the results of (show all products - search - my cart - bought products - my products - pending posts) if the number of the posts more than one.
this file has all the message handlers that takes the coming message and depending on its type, contents..etc, the appropriate filter will be called.
this file has all the filters functions that are responsible for showing the appropriate response to the users.
this file has some useful functions to prevent us from copy pasting in the previous two files and also can be used for building other telegram bots.
Table | Column 1 | Column 2 | Column 3 | Column 4 | Column 5 | Column 6 | Column 7 | Column 8 | Column 9 |
---|---|---|---|---|---|---|---|---|---|
users | id | name | is_admin | balance | last_sw | ||||
products | id | owner_id | name | price | description | country | city | photo_id | is_approved |
cart | user_id | product_id | |||||||
history | id | user_id | product_id | charge_id | done |