Explicit account modification #42
		Loading…
	
	Add table
		
		Reference in a new issue
	
	
	No description provided.
		
		Delete branch "35_Explicit_account_modification"
	
	Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Following the issue #35
Added two functions:
delete_accountconfirm_deletedelete_accountdoes nothing, it just tells the player to confirm usingconfirm_delete.confirm_delete, actually deletes the account. We could add a confirmation logic but this should be enough to defer most people from instantly deleting their account on accident. As theconfirm_deletecommand doesn't appear in the help, onlydelete_accountdoes.WIP Explicit account modificationto Explicit account modificationShould be ok for review
Very good how you are working hard my friend, huge respect
@ -56,0 +61,4 @@user = CURSOR.fetchone()if not user:return False # No such userI mean, you do expect this username to be deleted anyway, right. False if the user does exist and the operation failed for some reason. Though depends on the use-case
@ -150,9 +187,11 @@ def generate_response(notification: ParsedNotification) -> BotResponse | None:# Unrestricted commandsmatch command:case 'signup':res = do_signup()Oh, you already do have the mapping! now just move the functions away to their own separate places, to unload the file
@ -8,3 +8,3 @@def do_roll(full_user: str) -> BotResponse:def do_roll(author: str) -> BotResponse:The function seems to grow too big too huge. Instead of piling every action in one file
response.py, splitting every do_* into separate files could help. The file will be very heavy on a lot of unrelated to each other changes, hence every function belongs to a separate "domain", that could be expressed by splitting@ -97,4 +116,4 @@be a number between 1 and 5','attachment_urls': None}if not (is_float(arguments[2]) and 0.0 < float(arguments[2]) <= 1.0):it'd be more readable if you unpacked the array into variables that have names.
is_float(arguments[2]))is too low-level if you are not someone who wrote this function.For example,
is_float(rarity)seems better and less bug prone, since you can't fuck up accessing by a wrong index