3ventic / BotVentic

Twitch-focused Discord bot
https://github.com/3ventic/BotVenticCore
MIT License
22 stars 4 forks source link

Dictionary Upgrade! #5

Closed DigitalVortex92 closed 8 years ago

DigitalVortex92 commented 8 years ago

Emotes are now in a dictionary!

I've also fixed a missing case for emote handling by making embedded content fallback to the HandleEdit function rather than the HandleMessage function as it triggers both a create and edit event.

I've also removed an unnecessary parameter from GetExistingBotReplyOrNull as it was not necessary.

Because of the nature of the application, messages are queued while UpdateAllEmotes is running, so DictEmotes.Clear() is a safe call and should never error when updating emotes UNLESS the array is searching at the same time as that is called. Possible fix may be required in the future.