allow 2 inputs after link for bot

This commit is contained in:
Believethehype
2023-12-01 21:17:32 +01:00
parent 01bd25ce40
commit 85bc9eabb7
5 changed files with 30 additions and 20 deletions

View File

@@ -21,7 +21,7 @@ class DVMConfig:
LNBITS_ADMIN_KEY = '' # In order to pay invoices, e.g. from the bot to DVMs, or reimburse users.
LNBITS_URL = 'https://lnbits.com'
DB: str
NEW_USER_BALANCE: int = 250 # Free credits for new users
NEW_USER_BALANCE: int = 0 # Free credits for new users
NIP89: NIP89Config
SHOW_RESULT_BEFORE_PAYMENT: bool = False # if this is true show results even when not paid right after autoprocess

View File

@@ -35,7 +35,6 @@ def nip89_announce_tasks(dvm_config, client):
def fetch_nip89_paramters_for_deletion(keys, eventid, client, dvmconfig):
print("Pubkey generated from Private Key " + keys.public_key().to_hex())
idfilter = Filter().id(EventId.from_hex(eventid)).limit(1)
nip89events = client.get_events_of([idfilter], timedelta(seconds=dvmconfig.RELAY_TIMEOUT))
d_tag = ""
@@ -51,17 +50,13 @@ def fetch_nip89_paramters_for_deletion(keys, eventid, client, dvmconfig):
print("No dtag found")
return
pubkey = event.pubkey().to_hex()
print("Pubkey of Event: " + pubkey)
if pubkey == keys.public_key().to_hex():
if event.pubkey().to_hex() == keys.public_key().to_hex():
nip89_delete_announcement(event.id().to_hex(), keys, d_tag, client, dvmconfig)
print("NIP89 announcement deleted from known relays!")
else:
print("Privatekey does not belong to event")
def nip89_delete_announcement(eid: str, keys: Keys, dtag: str, client: Client, config):
e_tag = Tag.parse(["e", eid])
a_tag = Tag.parse(["a", str(EventDefinitions.KIND_ANNOUNCEMENT) + ":" + keys.public_key().to_hex() + ":" + dtag])