Skip to content

Commit

Permalink
fix(hubLogs): fix owner retrieval in JoinLeaveLogger
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-737 committed Jan 25, 2024
1 parent c9bd39f commit f4d1122
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/HubLoggerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,14 @@ export class JoinLeaveLogger extends HubLoggerService {
const totalConnections = await db.connectedList.count({
where: { hubId: hub.id, connected: true },
});
const owner = await server.fetchOwner();
const owner = await server.client.users.fetch(server.ownerId).catch(() => null);

const embed = new EmbedBuilder()
.setTitle('Server Left')
.setDescription(
stripIndents`
${emojis.dotRed} **Server:** ${server.name} (${server.id})
${emojis.dotRed} **Owner:** ${owner.user.tag} (${server.ownerId})
${emojis.dotRed} **Owner:** ${owner?.username} (${server.ownerId})
${emojis.dotRed} **Member Count:** ${server.memberCount}
`,
)
Expand Down

0 comments on commit f4d1122

Please sign in to comment.