A customizable, multilanguage Telegram shop bot with Telegram Payments support

Overview

Greed

A customizable, multilanguage Telegram shop bot with Telegram Payments support!

Demo

Send a message to @greedtestbot on Telegram to view a demo of the bot in action!

Use the special credit card number 4242 4242 4242 4242 to add unlimited credit to your account.

Screenshots

Installation

This installation procedure assumes you are on a Linux system, using bash and have python3.8 installed.

Requirements

Consider renting a VPS to host the bot on; a cheap one should do, as greed is pretty lightweight! :)

Steps

  1. Download the project files by running:

    git clone https://github.com/Steffo99/greed.git
  2. Enter the newly created folder:

    cd greed
  3. Create a new virtualenv:

    python3.8 -m venv venv
  4. Activate the virtualenv:

    source venv/bin/activate
  5. Install the project requirements:

    pip install -r requirements.txt
  6. Optional: For colored console output, install coloredlogs:

    pip install coloredlogs
  7. Generate the configuration file:

    python -OO core.py
  8. Edit the configuration file, adding your bot and payment tokens to it:

    nano config/config.toml

    (Press Ctrl+X and then two times Enter to save and quit nano.)

  9. Optional: customize the files in the strings folder for custom messages.

  10. Start the bot:

    python -OO core.py
  11. Open Telegram, and send a /start command to your bot to be automatically promoted to 💼 Manager.

  12. Stop the bot by pressing Ctrl+C.

Running the bot

After the installation, to run the bot, you'll need to:

  1. Activate the virtualenv (if it's not already activated in the current console session):

    source venv/bin/activate
  2. Start the bot:

    python -OO core.py

Keep the bot running

If you want to keep the bot open even after you closed your terminal window, you'll need to use some external program.

Some of them are:

  • screen (easier, but doesn't restart automatically)
  • systemd (recommended, but more difficult)

screen

  1. Open a screen that will be running the bot with the following command:
    screen venv/bin/python -OO core.py
    To safely detach the screen, press Ctrl+A and then Ctrl+D.

systemd

Assuming you downloaded greed in /srv/greed:

  1. Create a new user named greed:

    useradd greed --system
  2. Give ownership of the greed folder you downloaded earlier to the greed user:

    chown -R greed: /srv/greed
  3. Create a new file in /etc/systemd/system named bot-greed.service with the following contents:

    [Unit]
    Name=bot-greed
    Description=Greed Bot
    Wants=network-online.target
    After=network-online.target nss-lookup.target
    
    [Service]
    Type=exec
    User=greed
    WorkingDirectory=/srv/greed
    ExecStart=/srv/greed/venv/bin/python -OO /srv/greed/core.py
    Environment=PYTHONUNBUFFERED=1
    
    [Install]
    WantedBy=multi-user.target
  4. Start the bot-greed service:

    systemctl start bot-greed
  5. If everything goes well, enable the bot-greed service, so it will automatically start on a reboot:

    systemctl enable bot-greed   

Updating

To update the bot, run the following commands:

git stash
git pull
git stash pop

If you're using an older version of greed, you may need to recreate the configuration, as greed won't use config.ini anymore and will use config.toml instead.

Usage

All features can be accessed through the Telegram bot chat.

As a 💼 Manager, you can add new products, check the placed orders, create new transactions and generate .csv log files.
You can also add additional 💼 Managers.

Users will be able to add credit to their wallet, place orders and contact you in case they require assistance.

Documentation and help

If you find a bug, have an idea for a new feature or just require help with greed, please post an issue or open a discussion on GitHub, or, if GitHub is blocked in your country, send me an email at [email protected]!

If you can read Italian, you can try to read the paper I wrote about greed for my final High School exam.

If you are proficient in Python, you can also try reading the code. Most of the bot interactions can be found in the worker.py file, so try to have a look there.

Forks

Some people made a copy of Greed and added or changed some things to it (they made a fork).
These forks are listed below.

Please note that @Steffo99, the main developer of greed, does not endorse any of these forks.
Do not file bug reports here for bugs in a fork!

Bitcoin - Blockonomics

DarrenWestwood is currently maintaining a greed fork adding Bitcoin support through Blockonomics.

Comments
  • Bot crashing. Exception in sqlite (Database is locked)

    Bot crashing. Exception in sqlite (Database is locked)

    How to reproduce:

    • /start as an Administrator
    • Go to "📦 Orders"
    • Click "🛑 Stop" to stop live orders.
    • Click "👤 Switch to customer mode"
    • Click "🛒 Order products"
    • Click "🔙 Cancel"
    • Send /start command to go back to Administrator menu

    CRASH. Sqlite exception. Database is locked.

    Exception in <Worker 763512861>: (sqlite3.OperationalError) database is locked [SQL: UPDATE admins SET live_mode=? WHERE admins.user_id = ?] [parameters: (0, 763512861)] (Background on this error at: http://sqlalche.me/e/13/e3q8)

    bug 
    opened by mastersuv 17
  • Timed out while calling get_updates()

    Timed out while calling get_updates()

    $ sudo python3 -OO core.py

    greed-bot is now starting! Timed out while calling get_updates(), retrying in 1 secs... Exception in thread Worker 411164928: Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context context) File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/default.py", line 509, in do_execute cursor.execute(statement, parameters) sqlite3.OperationalError: no such table: users

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last): File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/home/ubuntu/tlgrm_shop/worker.py", line 64, in run self.user = self.session.query(db.User).filter(db.User.user_id == self.chat.id).one_or_none() File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/query.py", line 2917, in one_or_none ret = list(self) File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/query.py", line 2988, in iter return self._execute_and_instances(context) File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/orm/query.py", line 3011, in _execute_and_instances result = conn.execute(querycontext.statement, self._params) File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 948, in execute return meth(self, multiparams, params) File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/sql/elements.py", line 269, in _execute_on_connection return connection._execute_clauseelement(self, multiparams, params) File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 1060, in _execute_clauseelement compiled_sql, distilled_params File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 1200, in _execute_context context) File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 1413, in _handle_dbapi_exception exc_info File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/util/compat.py", line 265, in raise_from_cause reraise(type(exception), exception, tb=exc_tb, cause=cause) File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/util/compat.py", line 248, in reraise raise value.with_traceback(tb) File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context context) File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/default.py", line 509, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: users [SQL: 'SELECT users.user_id AS users_user_id, users.first_name AS users_first_name, users.last_name AS users_last_name, users.username AS users_username, users.credit AS users_credit \nFROM users \nWHERE users.user_id = ?'] [parameters: (411164928,)] (Background on this error at: http://sqlalche.me/e/e3q8)

    Timed out while calling get_updates(), retrying in 1 secs... Timed out while calling get_updates(), retrying in 1 secs...

    question 
    opened by ismoil-nosr 17
  • Bitcoin payments

    Bitcoin payments

    Integrating Bitcoin

    1. If you plan on accepting Bitcoin payments, enter your Blockonomics api key into the config.ini file: https://www.blockonomics.co/merchants#/

    2. In order to receive notifications of Bitcoin payments, you are required to deploy your bot in order to receive a public url where webhooks can be delivered to Greed Bot.

    For testing ngrok https://ngrok.com/download works well:

    • Run the following command in a new terminal:./ngrok http 5000
    • Look at the "Forwarding" line to see your unique Ngrok domain name eg. https://greed.ngrok.io/

    For production gunicorn can be used https://pypi.org/project/gunicorn:

    • Run the following command to launch Greed Bot: gunicorn --workers=1 core:app or add web: gunicorn --workers=1 core:app to your Procfile Once Greed Bot is running and you have received your public url eg. https://greed.herokuapp.com/

    Callback URL

    • Add callback?secret=YOUR_SECRET_HERE_ to the end of your URL. eg. https://greed.herokuapp.com/callback?secret=YOUR_SECRET_HERE_, replacing with the secret entered in your config.ini file.
    • Set this url as the HTTP Callback URL in your Blockonomics account: https://www.blockonomics.co/merchants#/page3
    feature 
    opened by DarrenWestwood 6
  • SQLite Error: no such table.

    SQLite Error: no such table.

    Steps to reproduce:

    1. Download current build
    2. Unpack and install dependencies
    3. Start the bot

    When issuing /start in Telegram the bot produces with the following error:

    Exception in thread Worker 661051424:
    Traceback (most recent call last):
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context
        context)
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 509, in do_execute
        cursor.execute(statement, parameters)
    sqlite3.OperationalError: no such table: users
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
        self.run()
      File "/home/ubuntu/greed-master/worker.py", line 64, in run
        self.user = self.session.query(db.User).filter(db.User.user_id == self.chat.id).one_or_none()
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 2924, in one_or_none
        ret = list(self)
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 2995, in __iter__
        return self._execute_and_instances(context)
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3018, in _execute_and_instances
        result = conn.execute(querycontext.statement, self._params)
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 948, in execute
        return meth(self, multiparams, params)
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/sql/elements.py", line 269, in _execute_on_connection
        return connection._execute_clauseelement(self, multiparams, params)
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1060, in _execute_clauseelement
        compiled_sql, distilled_params
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1200, in _execute_context
        context)
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1413, in _handle_dbapi_exception
        exc_info
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 265, in raise_from_cause
        reraise(type(exception), exception, tb=exc_tb, cause=cause)
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 248, in reraise
        raise value.with_traceback(tb)
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context
        context)
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 509, in do_execute
        cursor.execute(statement, parameters)
    sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: users [SQL: 'SELECT users.user_id AS users_user_id, users.first_name AS users_first_name, users.last_name AS users_last_name, users.username AS users_username, users.credit AS users_credit \nFROM users \nWHERE users.user_id = ?'] [parameters: (661051424,)] (Background on this error at: http://sqlalche.me/e/e3q8)
    

    Tried running the database generation script and then running the bot, the error persists.

    [ubuntu@apollo greed-master]$ python3.6 -OO database.py
    [ubuntu@apollo greed-master]$ python3.6 -OO core.py
    greed-bot is now starting!
    Timed out while calling get_updates(), retrying in 1 secs...
    Timed out while calling get_updates(), retrying in 1 secs...
    Exception in thread Worker 661051424:
    Traceback (most recent call last):
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context
        context)
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 509, in do_execute
        cursor.execute(statement, parameters)
    sqlite3.OperationalError: no such table: users
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
        self.run()
      File "/home/ubuntu/greed-master/worker.py", line 64, in run
        self.user = self.session.query(db.User).filter(db.User.user_id == self.chat.id).one_or_none()
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 2924, in one_or_none
        ret = list(self)
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 2995, in __iter__
        return self._execute_and_instances(context)
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3018, in _execute_and_instances
        result = conn.execute(querycontext.statement, self._params)
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 948, in execute
        return meth(self, multiparams, params)
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/sql/elements.py", line 269, in _execute_on_connection
        return connection._execute_clauseelement(self, multiparams, params)
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1060, in _execute_clauseelement
        compiled_sql, distilled_params
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1200, in _execute_context
        context)
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1413, in _handle_dbapi_exception
        exc_info
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 265, in raise_from_cause
        reraise(type(exception), exception, tb=exc_tb, cause=cause)
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 248, in reraise
        raise value.with_traceback(tb)
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context
        context)
      File "/home/ubuntu/.local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 509, in do_execute
        cursor.execute(statement, parameters)
    sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: users [SQL: 'SELECT users.user_id AS users_user_id, users.first_name AS users_first_name, users.last_name AS users_last_name, users.username AS users_username, users.credit AS users_credit \nFROM users \nWHERE users.user_id = ?'] [parameters: (661051424,)] (Background on this error at: http://sqlalche.me/e/e3q8)
    

    [ubuntu@apollo greed-master]$ python -V Python 2.7.15rc1 [ubuntu@apollo greed-master]$ python3 -V Python 3.6.6

    bug 
    opened by ripinet5 6
  • Feature: Allow disabling cash payments

    Feature: Allow disabling cash payments

    Describe the proposed feature

    I noticed that if you change in the config/config.toml credit_card_token = "" The credit card option disappears from the users' menu, is there a way to remove the cash as well?

    Amazing job by the way, thank you so much for this bot, sir.

    Reasoning

    No response

    Additional information

    No response

    feature 
    opened by cpbreeze 5
  • Feature: Publish docker image on DockerHub

    Feature: Publish docker image on DockerHub

    Describe the proposed feature

    Just publish the builded docker images on dockerhub

    Reasoning

    Publishing this image in docker hub will make easier to install it as a service in some environments like Unraid.

    Additional information

    No response

    feature 
    opened by yayitazale 4
  • Error

    Error

    2021-07-09 17:12:42 | Core | core | @ThisPCShopBot is starting! 2021-07-09 17:12:43 | Core | duckbot | Telegram error while calling get_updates(), retrying in 5 secs... Full error: Conflict: can't use getUpdates method while webhook is active; use deleteWebhook to delete the webhook first Traceback (most recent call last): File "/home/runner/telegramshop/duckbot.py", line 22, in result_func return func(*args, **kwargs) File "/home/runner/telegramshop/duckbot.py", line 82, in get_updates return self.bot.get_updates(*args, **kwargs) File "/home/runner/telegramshop/venv/lib/python3.8/site-packages/telegram/bot.py", line 127, in decorator result = func(*args, **kwargs) File "/home/runner/telegramshop/venv/lib/python3.8/site-packages/telegram/bot.py", line 2761, in get_updates result = self._post( File "/home/runner/telegramshop/venv/lib/python3.8/site-packages/telegram/bot.py", line 259, in _post return self.request.post( File "/home/runner/telegramshop/venv/lib/python3.8/site-packages/telegram/utils/request.py", line 350, in post result = self._request_wrapper( File "/home/runner/telegramshop/venv/lib/python3.8/site-packages/telegram/utils/request.py", line 277, in _request_wrapper raise Conflict(message) telegram.error.Conflict: Conflict: can't use getUpdates method while webhook is active; use deleteWebhook to delete the webhook first

    bug 
    opened by CocaColaSRL 4
  • Scape of the keys in file string

    Scape of the keys in file string

    I tried to insert some strings of my own in the language files, but as braces called "{...}" it doesn't work in the new messages I created even following a syntax, maybe it is an error in the localization.py formation

    Steps to reproduce the behavior:

    1. Go to wathever string file
    2. try create a new message format using the standard keys
    3. when a tested the key did showed, like "{name}", but works in messages that were already there
    bug 
    opened by tomtomaZ 4
  • Extend order info to all transactions

    Extend order info to all transactions

    1. Fix brief order view from user.
    2. Save order_info to worker.
    3. Save worker.order_info in __order_transaction to db instead of empty row.
    4. Show order_info in full order view for admin.
    5. Hide notes if empty.

    Don't use if you are not sure what you are doing.

    feature 
    opened by valentino-sm 3
  • [via email] Error when making the payment Steffo99/greed

    [via email] Error when making the payment Steffo99/greed

    From: samuel ramirez [email protected]

    2021-05-06 12:46:54 | Worker 1775961268 | worker | Exception in <Worker 177= 5961268>: (sqlite3.IntegrityError) NOT NULL constraint failed: orderitems.o= rder_id [SQL: INSERT INTO orderitems (product_id, order_id) VALUES (?, ?)] [parameters: (1, None)] (Background on this error at: http://sqlalche.me/e/14/gkpj) Traceback (most recent call last): File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack= ages\sqlalchemy\engine\base.py", line 1763, in _execute_context self.dialect.do_execute( File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack= ages\sqlalchemy\engine\default.py", line 717, in do_execute cursor.execute(statement, parameters) sqlite3.IntegrityError: NOT NULL constraint failed: orderitems.order_id

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last): File "C:\Users\jsram\greed\worker.py", line 211, in run self.__admin_menu() File "C:\Users\jsram\greed\worker.py", line 926, in __admin_menu self.__user_menu() File "C:\Users\jsram\greed\worker.py", line 468, in __user_menu self.__order_menu() File "C:\Users\jsram\greed\worker.py", line 663, in __order_menu self.__order_transaction(order=3Dorder, value=3D-int(self.__get_cart_va= lue(cart))) File "C:\Users\jsram\greed\worker.py", line 689, in __order_transaction self.session.commit() File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack= ages\sqlalchemy\orm\session.py", line 1428, in commit self._transaction.commit(_to_root=3Dself.future) File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack= ages\sqlalchemy\orm\session.py", line 826, in commit self._prepare_impl() File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack= ages\sqlalchemy\orm\session.py", line 805, in _prepare_impl self.session.flush() File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack= ages\sqlalchemy\orm\session.py", line 3260, in flush self._flush(objects) File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack= ages\sqlalchemy\orm\session.py", line 3400, in flush transaction.rollback(capture_exception=3DTrue) File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack= ages\sqlalchemy\util\langhelpers.py", line 70, in exit compat.raise( File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack= ages\sqlalchemy\util\compat.py", line 211, in raise raise exception File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack= ages\sqlalchemy\orm\session.py", line 3360, in _flush flush_context.execute() File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack= ages\sqlalchemy\orm\unitofwork.py", line 453, in execute rec.execute(self) File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack= ages\sqlalchemy\orm\unitofwork.py", line 627, in execute util.preloaded.orm_persistence.save_obj( File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack= ages\sqlalchemy\orm\persistence.py", line 242, in save_obj _emit_insert_statements( File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack= ages\sqlalchemy\orm\persistence.py", line 1219, in _emit_insert_statements result =3D connection._execute_20( File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack= ages\sqlalchemy\engine\base.py", line 1578, in _execute_20 return meth(self, args_10style, kwargs_10style, execution_options) File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack= ages\sqlalchemy\sql\elements.py", line 320, in _execute_on_connection return connection._execute_clauseelement( File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack= ages\sqlalchemy\engine\base.py", line 1447, in _execute_clauseelement ret =3D self._execute_context( File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack= ages\sqlalchemy\engine\base.py", line 1806, in _execute_context self.handle_dbapi_exception( File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack= ages\sqlalchemy\engine\base.py", line 1987, in handle_dbapi_exception util.raise( File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack= ages\sqlalchemy\util\compat.py", line 211, in raise raise exception File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack= ages\sqlalchemy\engine\base.py", line 1763, in _execute_context self.dialect.do_execute( File "C:\Users\jsram\AppData\Local\Programs\Python\Python39\lib\site-pack= ages\sqlalchemy\engine\default.py", line 717, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.IntegrityError: (sqlite3.IntegrityError) NOT NULL constraint= failed: orderitems.order_id [SQL: INSERT INTO orderitems (product_id, order_id) VALUES (?, ?)] [parameters: (1, None)] (Background on this error at: http://sqlalche.me/e/14/gkpj) Enviado desde Correohttps://go.microsoft.com/fwlink/?LinkId=3D550986 para= Windows 10

    bug 
    opened by Steffo99 3
  • Full order info

    Full order info

    1. Fix brief text order message to user.
    2. Save order_info to worker.
    3. Save new transaction to db with order_info instead of empty row.
    4. Show order_info in full order view for admin.
    5. Hide notes if empty.

    Full backward compatibility except for three lines in several language files shown for admin order views.

    feature 
    opened by valentino-sm 3
  • Feature: switch to payments for each order

    Feature: switch to payments for each order

    Describe the proposed feature

    Hi

    First of all, thanks for your work I think this is a super nice project.

    I wish to be able to switch from the actual system of adding funds before making orders to a typical system of paying just the amount of each order at the chekout.

    I'm not a python expert but I'll start reviewing the code to see if I can helpt with pull requests.

    Thanks

    Reasoning

    Adding funds can be nice for periodic payments systems, but the usual way to make payments in online stores is to pay on the checkout only for the order amount.

    Additional information

    No response

    feature 
    opened by yayitazale 0
  • Bump certifi from 2020.12.5 to 2022.12.7

    Bump certifi from 2020.12.5 to 2022.12.7

    Bumps certifi from 2020.12.5 to 2022.12.7.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Feature: `linux/arm/v7` support for Raspberry Pi

    Feature: `linux/arm/v7` support for Raspberry Pi

    Describe the proposed feature

    Hey,

    Supporting Raspberry Pi (armhf) would be interesting. You have a great project!

    regards

    Reasoning

    mi@raspberrypi:~ $ docker run --volume "$(pwd)/config:/etc/greed" --volume "$(pwd)/strings:/usr/src/greed/strings" --volume "$(pwd)/data:/var/lib/greed" ghcr.io/steffo99/greed
    Unable to find image 'ghcr.io/steffo99/greed:latest' locally
    latest: Pulling from steffo99/greed
    Digest: sha256:3c93908e10f2cf0a1de8e066c62e109ad32386c979bf82ee05dc716364240d5b
    Status: Downloaded newer image for ghcr.io/steffo99/greed:latest
    WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested
    

    Additional information

    No response

    feature help wanted 
    opened by semaf 1
  • Add turkish language

    Add turkish language

    [via email, from @atakan0920]

    hello my friend;

    My name is Atakan, your project on github is very nice, but there is no Turkish language option when I review it and I prepared a Turkish language pack for you, I would be glad if you add it to your project  

    help wanted lang 
    opened by Steffo99 0
  • Feature: Demo mode

    Feature: Demo mode

    Describe the proposed feature

    A configurable option which automatically promotes every user to manager, allowing them to test out the features of the bot.

    Additionally, it would regularly wipe its database, so that there will be a greater chance for interested users to see the bot in a clean state.

    Reasoning

    So that users may test Greed without installing it themselves.

    Additional information

    No response

    feature 
    opened by Steffo99 0
Releases(v0.18.0)
  • v0.18.0(Nov 19, 2022)

    Security and feature release!

    :shield: Security

    • Introduced some checks to prevent de-authorized users from accessing menus they were forbidden from using (fe751cb56d8f27d0bfa1b907521a3a5661afed09)

    :sparkles: New features

    • Added configuration option to disable cash payments (#190, Payments.Cash.enable_pay_with_cash)
    • Added configuration option to disable admin transaction creation (#190, Payments.Cash.enable_create_transaction)

    :notebook_with_decorative_cover: Documentation

    • Added warranty and liability disclaimer in the front page of the documentation

    :mag: Full changelog

    Source code(tar.gz)
    Source code(zip)
  • v0.17.1(Jun 9, 2022)

    A new patch release!

    💠 Improvements

    • Better description of product deletion message by @oleg20111511 in https://github.com/Steffo99/greed/pull/175
    • Removed raw calls to Telegram Bot API and replaced them with python-telegram-bot methods by @oleg20111511 in https://github.com/Steffo99/greed/pull/178
    • Fixed an issue when, while editing a product without a price, part of the string would not be localized by @oleg20111511 in https://github.com/Steffo99/greed/pull/178

    :mag: Full changelog

    Source code(tar.gz)
    Source code(zip)
  • v0.17.0(Mar 28, 2022)

    Since the original release...

    :sparkles: New features

    • Multiple language support by @DarrenWestwood in https://github.com/Steffo99/greed/pull/32
    • Cart summary by @pzhuk in https://github.com/Steffo99/greed/pull/38
    • Allow configuration of currency symbol by @pzhuk in https://github.com/Steffo99/greed/pull/42
    • Configurable payment presets by @pzhuk in https://github.com/Steffo99/greed/pull/40
    • Logging support by @Steffo99 in https://github.com/Steffo99/greed/pull/52
    • Better strings and localization support by @Steffo99 in https://github.com/Steffo99/greed/pull/54
    • Completely rework the configuration system by @Steffo99 in https://github.com/Steffo99/greed/pull/76
    • Support tips by @Steffo99 in https://github.com/Steffo99/greed/pull/124
    • Removed unused imports and refactored imports by @rashidkalwar in https://github.com/Steffo99/greed/pull/145
    • Add Docker support by @Steffo99 in https://github.com/Steffo99/greed/pull/168

    :pirate_flag: New languages

    • :ukraine: by @pzhuk in https://github.com/Steffo99/greed/pull/36, @Trentyn in https://github.com/Steffo99/greed/pull/171 and https://github.com/Steffo99/greed/pull/173
    • :ru: by @pzhuk in https://github.com/Steffo99/greed/pull/41, @Bakx13 in https://github.com/Steffo99/greed/pull/92, @valentino-sm in https://github.com/Steffo99/greed/pull/111 and https://github.com/Steffo99/greed/pull/113, @Trentyn in https://github.com/Steffo99/greed/pull/172
    • :cn: by @zhihuiyuze in https://github.com/Steffo99/greed/pull/68
    • :israel: by @netanelkoli in https://github.com/Steffo99/greed/pull/70
    • :mexico: by @mastersuv in https://github.com/Steffo99/greed/pull/85
    • :brazil: by @eufelipemateus in https://github.com/Steffo99/greed/pull/132

    :bug: Bugfixes

    • Fix cancellable calls by @pzhuk in https://github.com/Steffo99/greed/pull/37
    • Fix typo by @mastersuv in https://github.com/Steffo99/greed/pull/84
    • python-telegram-bot improvements by @valentino-sm in https://github.com/Steffo99/greed/pull/105
    • Fix one-to-one relation warning by @valentino-sm in https://github.com/Steffo99/greed/pull/106
    • Fix sqlalchemy exception by @valentino-sm in https://github.com/Steffo99/greed/pull/114 and https://github.com/Steffo99/greed/pull/11
    • Fix orderitem-order relation warning by @valentino-sm in https://github.com/Steffo99/greed/pull/1185
    • Fix worker admin init by @valentino-sm in https://github.com/Steffo99/greed/pull/126

    :arrow_up: Dependency upgrades

    • Bump urllib3 from 1.26.4 to 1.26.5 by @dependabot in https://github.com/Steffo99/greed/pull/136

    :mag: Full changelog

    Source code(tar.gz)
    Source code(zip)
WebCash is an experimental new electronic cash ("e-cash") that enables decentralized and instant payments to anyone

Webcash WebCash is an experimental new electronic cash ("e-cash") that enables decentralized and instant payments to anyone, anywhere in the world. Us

Bryan Bishop 24 Dec 11, 2022
LavaAPI - A simple library for accepting payments and using the LAVA Wallet

This library was created to simplify the LAVA api provided on the official websi

Vlad Baccara 8 Dec 18, 2022
A Telegram Filter Bot, Support Unlimited Filter. Also, The Bot can auto-filter telegram File | video

A Telegram Filter Bot, Support Unlimited Filter. Also, The Bot can auto-filter telegram File | video

Hash Minner 3 Nov 27, 2021
Free and Open Source Group Voice chat music player for telegram ❤️ with button support youtube playback support

Free and Open Source Group Voice chat music player for telegram ❤️ with button support youtube playback support

Sehath Perera 1 Jan 8, 2022
toldium is a modular, fast, reliable and customizable multiplatform bot library for your communities

toldium The easy multiplatform bot toldium is a modular, fast, reliable and customizable multiplatform bot library for your communities, from a commun

Stockdroid Fans 5 Nov 3, 2021
Customizable and open-sourced bot for a few private servers

MarlBot A private bot for controlling monkeys and turtles. Why does this bot exist? The bot exists as a general-purpose community bot for a select few

KR 1 Jan 18, 2022
A secure and customizable bot for controlling cross-server announcements and interactions within Discord

DiscordBot A secure and customizable bot for controlling cross-server announcements and interactions within Discord. Within the code of the bot, you c

Jacob Dorfmeister 1 Jan 22, 2022
A Telegram Repo For Devs To Controll The Bots Under Maintenance.This Bot Is For Developers, If Your Bot Is Down, Use This Repo To Give Your Dear Subscribers Some Support By Providing Them Response.

Maintenance Bot A Telegram Repo For Devs To Controll The Bots Under Maintenance About This Bot This Bot Is For Developers, If Your Bot Is Down, Use Th

Vɪᴠᴇᴋ 47 Dec 29, 2022
A Telegram Repo For Devs To Controll The Bots Under Maintenance.This Bot Is For Developers, If Your Bot Is Down, Use This Repo To Give Your Dear Subscribers Some Support By Providing Them Response.

Maintenance Bot A Telegram Repo For Devs To Controll The Bots Under Maintenance About This Bot This Bot Is For Developers, If Your Bot Is Down, Use Th

Vɪᴠᴇᴋ 47 Dec 29, 2022
A simple Telegram bot that can broadcast messages and media to the bot subscribers. with mongo DB support

?????????????????? ?????? A simple Telegram bot that can broadcast messages and media to the bot subscribers using MongoDB. Features Support mongodb.c

N A C BOTS 70 Jan 2, 2023
Uploader-Bot - A Modified Telegram Url Uploader Bot With Mongodb, Zee5, Sonyliv Support and Many Other Yt-dlp Sites

???????????????? ?????????????????? ?? APP_ID API_HASH TG_BOT_TOKEN DATABASE_URL

null 11 Sep 10, 2022
null 1 Feb 18, 2022
Faster Twitch Alerts is a highly customizable, lightning-fast alternative to Twitch's slow mobile notification system

Faster Twitch Alerts What is "Faster Twitch Alerts"? Faster Twitch Alerts is a highly customizable, lightning-fast alternative to Twitch's slow mobile

null 6 Dec 22, 2022
A Telegram Bot to Play Audio in Voice Chats With Youtube and Deezer support. Supports Live streaming from youtube Supports Mega Radio Fm Streamings

Bot To Stream Musics on PyTGcalls with Channel Support. A Telegram Bot to Play Audio in Voice Chats With Supports Live streaming from youtube and Mega

Shamil Habeeb 37 Dec 15, 2022
Telegram bot untuk mencari jawaban dibrainly, support inline juga

Brainly-Telebot Bot Untuk Mencari Jawaban Dibrainly Jika ingin clone. Boleh kok Dibuat dengan python menggunakan MTproto Library. Yaitu Pyrogram Bot y

... 7 Mar 17, 2022
An Inline Telegram YouTube Downloader bot with custom, permanent thumbnail support and cancel upload facility. Make your fork now.

Inline-Tube-Mate (YouTube Downloader) An Inline Telegram bot that can download YouTube videos with permanent thumbnail support Bot need to be in Inlin

Renjith Mangal 41 Dec 14, 2022
⬇️ Telegram Bot to download TikTok videos without watermark in a snap with Inline mode support.

⬇️ Tokmate - Telegram Bot to download TikTok videos ⛲ Features Superfast and supports all type of TikTok links Download any TikTok videos without mate

Hemanta Pokharel 35 Jan 5, 2023
A simple telegram bot to recognize lengthy voice files to text and vice versa with multiple language support.

Voicebot A simple Telegram bot to convert lengthy voice clips to text and vice versa with supporting languages. Mandatory Variables API_HASH - Yo

Renjith Mangal 12 Oct 21, 2022
A simple telegram bot to save restricted content with custom thumbmail support by Mahesh Chauhan

Save Restricted Content Bot A simple telegram bot to save restricted content with custom thumbmail support by Mahesh Chauhan. Variables API_ID API_HAS

Mahesh Chauhan 532 Jan 2, 2023