Sound Rule Precedence

Why have an order of precedence at all?

The Avrae integration works by watching for Avrae messages and finding the related sounds. Avrae includes lots of information and consistent naming which makes it's messages good for determining what happened. However it doesn't include who sent the command that triggered the message. As a result Bard Bot doesn't necessarily know who sent the command that resulted in a particular message. So it needs a way to figure out what sounds to play without relying on the original sender.

Channel Wide Profiles

Voice channels have a single, merged, channel wide profile made up of the active profiles of all the users in a voice channel. This allows everyone to benefit from the custom sounds uploaded by everyone else. When two people both define sounds for the same thing though only one will be used. The sound belonging to the user with the alphabetically last discord user name will 'win' and end up being used. The sharing sounds and collision resolution become troublesome in two cases.

Character Profiles

The merging of profiles has two major issues: 1) You can't have sounds unique to your character and 2) your sounds can be overridden by other users. Character profiles provide an alternative way of setting up sounds that help address those issues. When you have an active character and you do something with Avrae where the character name is included in the output, if the character name in the message matches the character you have active the sound profile of your active character will be used.

If two users both have active characters with the same name Bard Bot will again run into name collisions and have to decide which profile has precedence. This however should be very rare and isn't a supported use case. If you have a party with two identically named characters expect to have issues.