Skip to content

Commit

Permalink
commands(iam): flip bot text response logic (#1076)
Browse files Browse the repository at this point in the history
The `/iam` command responds with the reverse of the actual action taken
which can confuse the user. This change just flips the logic, so the
correct Locale string is used.

#### References
Fixes: #1075

#### Checklist
- [x] Documentation is changed or added (if applicable)
- [x] Commit message follows the [commit
guidelines](https://bastion.gitbook.io/docs/developers/contributing-guidelines/pulls#commit)
  • Loading branch information
iamtraction authored Jan 9, 2025
2 parents 47b3f27 + 0f37290 commit 7732e5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/iam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class IamCommand extends Command {
await interaction.member.roles.add(role);
}

return await interaction.editReply((interaction.client as Client).locales.getText(interaction.guildLocale, interaction.member.roles.cache.has(role.id) ? "selfRoleUnassign" : "selfRoleAssign", { role: role }));
return await interaction.editReply((interaction.client as Client).locales.getText(interaction.guildLocale, interaction.member.roles.cache.has(role.id) ? "selfRoleAssign" : "selfRoleUnassign", { role: role }));
}

return await interaction.editReply({
Expand Down

0 comments on commit 7732e5f

Please sign in to comment.