renaming, fixes, client with opts

This commit is contained in:
Believethehype
2023-11-23 13:30:09 +01:00
parent 417acde9c4
commit 5ccdfd2671
9 changed files with 68 additions and 43 deletions

View File

@@ -83,12 +83,12 @@ def check_task_is_supported(event, client, get_duration=False, config=None):
print("Output format not supported, skipping..")
return False, "", 0
for dvm in dvm_config.SUPPORTED_TASKS:
for dvm in dvm_config.SUPPORTED_DVMS:
if dvm.TASK == task:
if not dvm.is_input_supported(input_type, event.content()):
return False, task, duration
if task not in (x.TASK for x in dvm_config.SUPPORTED_TASKS):
if task not in (x.TASK for x in dvm_config.SUPPORTED_DVMS):
return False, task, duration
return True, task, duration
@@ -118,7 +118,7 @@ def check_url_is_readable(url):
def get_amount_per_task(task, dvm_config, duration=1):
for dvm in dvm_config.SUPPORTED_TASKS: #this is currently just one
for dvm in dvm_config.SUPPORTED_DVMS: #this is currently just one
if dvm.TASK == task:
amount = dvm.COST * duration
return amount