Giter Site home page Giter Site logo

darrenwestwood / greed Goto Github PK

View Code? Open in Web Editor NEW

This project forked from steffo99/greed

89.0 5.0 55.0 649 KB

A customizable Telegram shop bot that accepts bitcoin payments

Home Page: https://www.youtube.com/watch?v=xatg16QA_0g

License: GNU Affero General Public License v3.0

Python 99.80% Dockerfile 0.20%
telegram bitcoin blockonomics telegram-store bitcoin-payments telegram-shop

greed's Issues

User credit not recalculated in open chats

After a bitcoin payment is confirmed, a new conversation has to be started for the user credit to reflect in any open conversations by sending the /start command.

The callback file does not recalculate the user credit in any running/already open conversations.

Solution

Ensure user.recalculate_credit() is called for the appropriate user during Blockonomics callbacks.

An example of similar functionality is manually adding transactions to a specific user from the admin menu:
https://github.com/DarrenWestwood/greed/blob/master/worker.py#L1205

Callback problem

Hello I am following all tutorial i noticed you used heroku to generate the link I tried with ngrok but i am not able to make this work what should i pus as "secret" ?I am not able to make payments working

Error when accesing product as a customer

Hello,

I've an error when, as a customer, I select the "Order products" item :

self.__user_menu()
File "/opt/greed/worker.py", line 480, in __user_menu
self.__order_menu()
File "/opt/greed/worker.py", line 518, in __order_menu
cart[message['result']['message_id']] = [product, 0]
KeyError: 'result'

Note : I have only one product on my catalog

Thank you for your help

bitcoin transaction

Hello! Today I decided to test your wonderful script for finalizing the bot for paying for bitcoin, I really liked it and I put it on my server, according to the instructions, everything works fine! only one problem arose for me, when I replenished my account in the bot, the transaction went through, the bot received a notification of successful payment, but the balance itself was not replenished, as it was, and remained 0 euros ... can you tell me what could be the problem?
blockonomics - confirmed that the transaction went through the merchant and the money went to my wallet, and in the bot my profile shows 0 euros as if I had not replenished my balance

Gap Limit 1008

Hi, I keep getting gap limit 1008 at blockonomics. Is there a way to solve the blockonomics.py to check for funds before issuing new address?

Feature Request: send line from text files on order completion

i think you should add an option to sell files, like if i wanted to setup some kind of online store, selling files.....
it could help...

so what would happen is
keep "thing" as the item
customer bought the amount of thing
once bought, those many files/lines get deleted from the source automatically so it doesnt go to the next customer, and it updates the stock automatically.

Payment Functions not working

Hi i really hope i can reach you to make this amazing bot work.

I have followed the installation steps.

I receive code 200 in my test log bench on the blockonomics platform.

Everything seems to be working but i tried to send 4$ as real test payment.
So i added funds via bitcoin and entered 4$
Then i sent from bitcoin wallet.
The transaction appears in my blockonomics but the funds never appeared on the telegram account.
Also i check the real payment transaction of 4$ never appear in "transaction list " function on the admin panel i can only see the credit transaction.

Also when i try the "Orders" function
I get a error message from the bot i cant complete orders or refund them.

Can you help me identify the problem for wich my transaction are not going inside the bot and orders functions not working
Thank you very much.

Here below i will give you picture to help you see the problem.

IMG_20230603_195123_855.jpg

IMG_20230603_195119_714.jpg

IMG_20230603_195114_340.jpg

IMG_20230603_195103_706.jpg

IMG_20230603_195059_988.jpg

Flood Control

Whenever i try to start the bot, it gives an error of flood control. please see the issue.

not installing on docker or though pip. t

I am aware that installation instrutctions we were redirected to the original repo, but i think this error has something to do with the BTC system... although i really have no idea what. the toml module is bugging out with the config. if someone could help me out with this i would appreciate it.

thon3 (3.8.2-4) ...
killua@machine:~/greed$ python -OO core.py
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/toml/decoder.py", line 511, in loads
ret = decoder.load_line(line, currentlevel, multikey,
File "/usr/local/lib/python3.8/dist-packages/toml/decoder.py", line 778, in load_line
value, vtype = self.load_value(pair[1], strictly_valid)
File "/usr/local/lib/python3.8/dist-packages/toml/decoder.py", line 812, in load_value
raise ValueError("Empty value is invalid")
ValueError: Empty value is invalid

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "core.py", line 13, in
import worker
File "/home/killua/greed/worker.py", line 14, in
from blockonomics import Blockonomics
File "/home/killua/greed/blockonomics.py", line 2, in
import configloader
File "/home/killua/greed/configloader.py", line 31, in
user_cfg = nuconfig.NuConfig(user_cfg_file)
File "/home/killua/greed/nuconfig.py", line 12, in init
self.data = toml.load(file)
File "/usr/local/lib/python3.8/dist-packages/toml/decoder.py", line 156, in load
return loads(f.read(), _dict, decoder)
File "/usr/local/lib/python3.8/dist-packages/toml/decoder.py", line 514, in loads
raise TomlDecodeError(str(err), original, pos)
toml.decoder.TomlDecodeError: Empty value is invalid (line 63 column 1 char 2538)

Vps and funds

Hi i encounter problem with vps and sqlite database.

I connected the vps, blokonomics and the bot.
But i dont know why the sqlite part doesnt work with the database
I receive funds via blokonomics but it never update the funds on blokonomics..

I really need little help here to help fix my database issue.
If any way to contact you it would be nice.
Iam not sure how to generate the sqlite file and how to connect it with the rest of the greed bot.

Remove Test Code

The payment does not wait in the background but halts further bot execution indefinitely or till a payment message is received via websocket.

SQL Issue

Hi,

I am getting errors such as

sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: btc_transactions
2022-05-21T18:00:36.311584+00:00 app[web.1]: [SQL: SELECT btc_transactions.transaction_id AS btc_transactions_transaction_id, btc_transactions.user_id AS btc_transactions_user_id, btc_transactions.price AS btc_transactions_price, btc_transactions.value AS btc_transactions_value, btc_transactions.currency AS btc_transactions_currency, btc_transactions.status AS btc_transactions_status, btc_transactions.timestamp AS btc_transactions_timestamp, btc_transactions.address AS btc_transactions_address, btc_transactions.txid AS btc_transactions_txid
2022-05-21T18:00:36.311585+00:00 app[web.1]: FROM btc_transactions
2022-05-21T18:00:36.311585+00:00 app[web.1]: WHERE btc_transactions.address = ?]

How do I fix this?

Not Detecting BTC

So I tested my bot on a fake account and paid, even after the BTC is confirmed on Blockonomics and after using the /start command again, the balance isn't updated. any fix?

Bitcoin

Bitcoin is not showing in Payment options

Could not find matching xpub

I have set the HTTP Callback URL on the Blockonomics Merchants Page which is deployed in HEROKU, everything is working fine. But when I am trying to Top up every time this error is happening. Please help me.

error

Links to @Steffo99/greed instead of @DarrenWestwood/greed

Hi!

I see that the default strings of your bot are still linking to the original repository:

"If you find any, please report them at https://github.com/Steffo99/greed/issues."

greed/strings/en.py

Lines 358 to 361 in 06002d9

bot_info = 'This bot is using <a href="https://github.com/Steffo99/greed">greed</a>,' \
' a framework by @Steffo for Telegram payments released under the' \
' <a href="https://github.com/Steffo99/greed/blob/master/LICENSE.txt">' \
'Affero General Public License 3.0</a>.\n'

Can you update them so that they point to this repository?

Often, users are raising downstream issues to me, and it takes me a while to understand that and to redirect them to the correct place, so maybe this will be helpful to everybody.

Hosting problem

Hello
First of all , thanks for making this code public.
Can you please suggest a best hosting website where we can host the bot 24/7 . I tried in many website but couldn't figure out the callback url stuff in other hosting site.
It will be great if you write about hosting it on one of the hosting site.

Bot freezing after trying to add bitcoin funds

bottg
Hello after I hit for example 10$ bitcoin in adding funds the bot freeze and stop working and need to get restarted by console I was able to push on heroku and launch with heroku run python core.py

Any idea on why this happening? thanks

customers funds not updating

I cloned the bot greed in my vps and activated ssl certificate on domain and have my blokonomics all set up.
I receive transaction on the blokonomics and to my wallet.
But the funds balance of customers never updating.
I have problem to connect the sqlite database to the core.py file.
I am no sure if i need to connect sqlite on vps or on computer and when i lunch the bot the database.sqlite (file) never generate.

I am really in blocked position now.
any guidance will very much appreciated .
thank you Darren.

Trackback (most recent call last)

Traceback (most recent call last):
File "core.py", line 168, in
main()
File "core.py", line 111, in main
if update.message.text == receiving_worker.loc.get("menu_cancel"):
AttributeError: 'NoneType' object has no attribute 'get'

How to remove the location

Location bugs the bot because people using my bot are not included in the criteria (France, VPN..) How can I delete the elements because removing the lines corresponding to the location the bot no longer works.

Splitting products in multiple categories

Hello, can You please add a feature of adding products in multiple categories (like electronics, clothes, food) and not grouping them in a single catalog? Thanks

NOT WORKING

Is this still working? I tried so much, the callback request seems not to work, even when I test transaction it still doesn't say it's in the balance. I'm not sure what to do here

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.