The pronoun command allows users to mark their pronouns via roles. The
command will refuse to create a non-existent role; instead, it will
error away. It will only add or remove the specified roles (in pronouns.json)
Resolves #83
Depends on #92 This completes the set of changes to allow users to add their own roles.
Multitudinous considerations have to be taken in the design.
Embeds were used to clearly mark success/failiure through colour coding. The procedure which does this has not been added as a utility function yet. Pending discussion, perhaps it should.
In addition, multiple roles can be self-assigned -- this is done because some users are comfortable with multiple pronouns.
Ideally, role assignment could be done over private Direct Messages with the bot. This is not implemented in this change. Initially, it was thought that behaviour over direct message is ambiguous because it's unclear what should happen if a user has membership of multiple bot-governed guilds. However, it's clear that the bot should simply apply the change iteratively. The risk is that pronoun usage may want to be withheld in certain servers. Despite the benefits of not drawing attention to a user when assigning pronoun roles, it was concluded that the risks of unexpected behaviour -- which could have dramatic consequences -- were too great.
The audit logs contain messages explaining that the pronoun assignment was a user requested action, and noting that changes were made by a bot.
.find(key, value) notation is deprecated in favour of .find(v => v.key === value). Therefore, in a sweep later on, we should replace all deprecated methods for progress to v12.
Since this PR was opened, an additional commit was made. Here is its commit message.
refactor(pronoun.json): Move pronoun config file
Move the pronoun configuration JSON file next to the other configuration
files, rather than being in the /utils directory. It isn't a utility;
nor does a utility directly depend on it. In addition, it's important
for it to be easy to modify. directory. It isn't a utility; nor does a
utility directly depend on it. In addition, it's important for it to be
easy to modify.
feat(commands): Add 'pronoun' command
The pronoun command allows users to mark their pronouns via roles. The command will refuse to create a non-existent role; instead, it will error away. It will only add or remove the specified roles (in pronouns.json)
Resolves #83 Depends on #92 This completes the set of changes to allow users to add their own roles.
Multitudinous considerations have to be taken in the design.
Embeds were used to clearly mark success/failiure through colour coding. The procedure which does this has not been added as a utility function yet. Pending discussion, perhaps it should.
In addition, multiple roles can be self-assigned -- this is done because some users are comfortable with multiple pronouns.
Ideally, role assignment could be done over private Direct Messages with the bot. This is not implemented in this change. Initially, it was thought that behaviour over direct message is ambiguous because it's unclear what should happen if a user has membership of multiple bot-governed guilds. However, it's clear that the bot should simply apply the change iteratively. The risk is that pronoun usage may want to be withheld in certain servers. Despite the benefits of not drawing attention to a user when assigning pronoun roles, it was concluded that the risks of unexpected behaviour -- which could have dramatic consequences -- were too great.
The audit logs contain messages explaining that the pronoun assignment was a user requested action, and noting that changes were made by a bot.
.find(key, value)
notation is deprecated in favour of.find(v => v.key === value)
. Therefore, in a sweep later on, we should replace all deprecated methods for progress to v12.Since this PR was opened, an additional commit was made. Here is its commit message.