Skip to content

Commit

Permalink
fix: use presenceUpdate->roleHigherThanBotrole in /addActivityRole
Browse files Browse the repository at this point in the history
  • Loading branch information
tippfehlr committed Aug 23, 2024
1 parent db280e4 commit 35e9101
Showing 1 changed file with 4 additions and 28 deletions.
32 changes: 4 additions & 28 deletions src/modules/commands/addActivityRole.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,34 +230,10 @@ async function process(
interaction.guild.members.me?.roles.highest?.position &&
role.position >= interaction.guild.members.me.roles.highest.position
) {
reply(interaction, undefined, [
new EmbedBuilder()
.setColor(Colors.Red)
.setDescription(
__({
phrase:
'To assign roles, my highest role needs to be higher than the role I am assigning.\nMove any of my roles higher than the role I should manage.',
locale,
}),
)
.addFields(
{
name: __({ phrase: 'My highest role:', locale }),
value:
`<@&${interaction.guild.members.me.roles.highest.id}> ` +
__(
{ phrase: '(position #%s)', locale },
interaction.guild.members.me.roles.highest.position.toString(),
),
},
{
name: __({ phrase: 'the activity role:', locale }),
value:
`<@&${role.id}> ` +
__({ phrase: '(position #%s)', locale }, role.position.toString()),
},
),
]);
reply(
interaction,
__({ phrase: 'presenceUpdate->roleHigherThanBotRole', locale }, `<@&${role.id}>`),
);
return;
}
if (
Expand Down

0 comments on commit 35e9101

Please sign in to comment.