feat: sort friends alphabetically

This commit is contained in:
Twig 2025-07-16 10:22:04 +02:00
parent 0f583f085e
commit ace66980bf
No known key found for this signature in database
3 changed files with 17 additions and 3 deletions

7
utils/getDisplayName.ts Normal file
View file

@ -0,0 +1,7 @@
import type { GuildMemberResponse, UserResponse } from "~/types/interfaces";
export function getDisplayName(user: UserResponse, member: GuildMemberResponse | undefined = undefined): string {
if (member?.nickname) return member.nickname
if (user.display_name) return user.display_name
return user.username
}