Support for non-uids in interactivity
Created by: VelvetThePanda
Summary
Fixes an issue where using the same id in multiple messages, and then using interactivity on those same messages would overwrite the previous result, causing one time out to cancel every message with the same id
Changes proposed
- Change
ConcurrentDictionary<string, T>
toConcurrentHashSet<T>
- Change all instances of
id
andmessage.Id.ToString(CultureInfo.InvariantCulture)
tomessage
- Change ComponentMatchRequest's
Id
property toDiscordMessage
- Rename aforementionedProperty to Message (TargetMessage would likely be more apt)
Notes
This should avoid a very minute performance regression caused by enumerating a concurrent collection, and concurrent HashSet at that by checking if the target message matches before checking the predicate. It's probably literally a fraction of a ns, but who cares.