Skip to content

Commit

Permalink
minor optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzaaitbrik committed Feb 22, 2024
1 parent 236a55a commit 5a72537
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion RedditDMBot.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,13 @@ def main():
username = choice(list_usernames) # getting a random username from the list of usernames to DM
if(len(accounts) == 0): # to check if all accounts are used
accounts, used_accounts = used_accounts, list() # repopulates accounts with used_accounts and reinitialize used_accounts to an empty list
account = accounts.pop(0) # getting the first account of the list accounts, then removing it
try:
account = accounts.pop(0) # getting the first account of the list accounts, then removing it
except IndexError:
log('[Main] There are no more useful accounts to use.')
break
asyncio.run(RedditDMBot(used_accounts,account,username)) # entry point
log('[Main] Done.')



Expand Down

0 comments on commit 5a72537

Please sign in to comment.