mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-11-20 10:36:30 +01:00
added info command to bot, added fix_cost and per_unit_cost
This commit is contained in:
@@ -144,12 +144,10 @@ def check_url_is_readable(url):
|
||||
|
||||
|
||||
def get_amount_per_task(task, dvm_config, duration=1):
|
||||
# duration is either static 1 (for images etc) or in seconds
|
||||
if duration == 0:
|
||||
duration = 1
|
||||
# duration is either static 1 (for images etc) or in seconds by default (e.g. audio/video)
|
||||
for dvm in dvm_config.SUPPORTED_DVMS: # this is currently just one
|
||||
if dvm.TASK == task:
|
||||
amount = dvm.COST * duration
|
||||
amount = dvm.FIX_COST + (dvm.PER_UNIT_COST * duration)
|
||||
return amount
|
||||
else:
|
||||
print("[" + dvm_config.SUPPORTED_DVMS[
|
||||
|
||||
Reference in New Issue
Block a user