Dustin Pianalto 0bf31a3e5d
Some checks failed
CI / build (push) Has been cancelled
Add view command and update utils
2021-02-23 23:29:19 -09:00

15 lines
299 B
Go

package discord_utils
import "github.com/dustinpianalto/disgoman"
func GetDisplayName(ctx disgoman.Context, id string) string {
member, err := ctx.Session.GuildMember(ctx.Guild.ID, id)
if err != nil {
return ""
}
if member.Nick != "" {
return member.Nick
}
return member.User.Username
}