Ridgure / TwitchBot

This is an irc bot written in python by Ridgure for Ridgure
https://www.twitch.tv/ridgure
MIT License
6 stars 4 forks source link

Bad set of indicies for elf file... #1

Closed kbigliar closed 5 years ago

kbigliar commented 5 years ago

https://github.com/Ridgure/TwitchBot/blob/313f8231600da1b7549df406106e68569b6f2fe4/bot.py#L1389

instead of indexing every value, do something like

for i2 in [8,10,12,14,16,18]:

or possibly (for future scalability)

firstNames = [] index = 8 while index < range(len(subscriberLines[i1])): firstNames.append(index) index += 2 for i2 in firstNames

Ridgure commented 5 years ago

Interesting. Will check this out.

Ridgure commented 5 years ago

Have changed to suggested as in line 2:

for i2 in [8,10,12,14,16,18]:

Works for now until infinite elfs break it again in which case I will have to come back here for inspiration. Never added so much information into a for loop parameter. Interesting.

kbigliar commented 5 years ago

the bottom one will populate every other index starting at the specified first index given up til the last elf is named.

Ridgure commented 5 years ago

Elves are now set do populate infinitely