L235 / hat-collector

GNU General Public License v2.0
0 stars 4 forks source link

Bot leaves channels with differing capitalization #20

Closed L235 closed 2 years ago

L235 commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

To reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Console output If available, add console output.

sample output

Environment:

Additional context Add any other context about the problem here.

L235 commented 2 years ago

https://github.com/L235/hat-collector/blob/b2124e5d6eba9a96c653347f930df9b6ce9fe20a/snitch.py#L79-L82

Is there any way to make the comparison between self.channel_list and self.channels.keys() case-insensitive? I think that would fix this. (Can you tell Python is not my first language? 😄 )

PhantomTech commented 2 years ago

There is a way, in this case the best way is probably to make sure both lists are lowercase. Since self.channels.keys() seems to always be lowercase, we just need to make sure self.channel_list is lowercase also which was expertly done by someone in 5035be86d48b0103ba7fb47c75497dab7a893fc5