Skip to content

Commit

Permalink
fix: update profile command
Browse files Browse the repository at this point in the history
  • Loading branch information
namnhce committed Oct 9, 2023
1 parent 8fa92f1 commit 75451d7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/discord/view/profile/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ func (v *Profile) List(original *model.DiscordMessage, employees []model.Employe
for _, p := range employee.Projects {
projects += fmt.Sprintf("%v, ", p.Name)
}

if projects == "" {
projects = "N/A"
}

userInfo += "\n**Projects:** " + strings.TrimRight(projects, ", ")

messageEmbed := []*discordgo.MessageEmbedField{
Expand Down

0 comments on commit 75451d7

Please sign in to comment.