Skip to content

Commit

Permalink
[worker] Fix missing fields in verification on join embed
Browse files Browse the repository at this point in the history
Signed-off-by: tiksan <[email protected]>
  • Loading branch information
dssecret committed Sep 29, 2024
1 parent d35485f commit e0f100c
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions worker/lib/guild/verify/message.ex
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,21 @@ defmodule Tornium.Guild.Verify.Message do
added_roles = MapSet.difference(updated_roles, original_roles)

if updated_member.nick != original_member.nick do
Nostrum.Struct.Embed.put_field(embed, "Nickname", "#{original_member.nick} -> #{updated_member.nick}")
embed = Nostrum.Struct.Embed.put_field(embed, "Nickname", "#{original_member.nick} -> #{updated_member.nick}")
end

if MapSet.size(removed_roles) > 0 do
Nostrum.Struct.Embed.put_field(
embed,
"Removed Roles",
Tornium.Utils.roles_to_string(MapSet.to_list(removed_roles))
)
embed =
Nostrum.Struct.Embed.put_field(
embed,
"Removed Roles",
Tornium.Utils.roles_to_string(MapSet.to_list(removed_roles))
)
end

if MapSet.size(added_roles) > 0 do
Nostrum.Struct.Embed.put_field(embed, "Added Roles", Tornium.Utils.roles_to_string(MapSet.to_list(added_roles)))
embed =
Nostrum.Struct.Embed.put_field(embed, "Added Roles", Tornium.Utils.roles_to_string(MapSet.to_list(added_roles)))
end

embed
Expand Down

0 comments on commit e0f100c

Please sign in to comment.