Skip to content

Commit

Permalink
Feat: username now read from a unique function
Browse files Browse the repository at this point in the history
  • Loading branch information
scientiststwin committed Aug 17, 2023
1 parent f788b5e commit d2fc536
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/services/memberActivity.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -876,10 +876,7 @@ function getActivityComposition(guildMember: IGuildMember, memberActivity: any,

type networkGraphUserInformationType = { username: string, avatar: string | null | undefined, joinedAt: Date | null, roles: any, ngu: string }
function getUserInformationForNetworkGraph(user: IGuildMember, guildRoles: IRole[]): networkGraphUserInformationType{
const username = user?.username
const discriminator = user?.discriminator
const fullUsername = discriminator === "0" ? username : username + "#" + discriminator

const fullUsername = guildMemberService.getUsername(user)
const avatar = user?.avatar
const joinedAt = user?.joinedAt
const roles = roleService.getRolesForGuildMember(user, guildRoles);
Expand Down

0 comments on commit d2fc536

Please sign in to comment.