JohnWolfson / Lakea-Discord-Bot

A discord bot to work alongside 'Lakea' stream assistant to add aid Materies Coil and his community
0 stars 0 forks source link

Dictionary For Loop Optimisiation #37

Closed JohnWolfson closed 4 months ago

JohnWolfson commented 4 months ago

Lakea currently loops through dictionaries by looping through the keys and accessing the value through a look up. This should be optimised using the dictionary.items() function which returns both the key and value removing the additional look up function. I.E.

''' for key, value in dictionary.items(): //code '''

Acceptance Cirteria:

JohnWolfson commented 4 months ago

This hasn't been applied to the dnd_message_builder() function as it seems to cause issues when trying to call functions. It should be considered for future loops using dictionary loops