Skip to content

Commit

Permalink
Fix member join message embed
Browse files Browse the repository at this point in the history
  • Loading branch information
l7ssha committed Nov 7, 2024
1 parent b4bd266 commit 2d5cdce
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/src/modules/join_logs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,14 @@ class JoinLogsModule implements RequiresInitialization {

_logger.fine('Sending join message for member ${event.member.id} in channel $channelId');

final now = DateTime.now();

final embed = EmbedBuilder(
description: '**Member joined**',
author: EmbedAuthorBuilder(name: event.member.user!.username, iconUrl: event.member.user!.avatar.url),
fields: [
EmbedFieldBuilder(name: 'ID', value: event.member.id.toString(), isInline: true),
EmbedFieldBuilder(name: 'Joined At', value: _formatDateTimeString(now), isInline: true),
EmbedFieldBuilder(name: 'Account created at', value: _formatDateTimeString(now), isInline: true)
EmbedFieldBuilder(name: 'ID', value: userMention(event.member.id), isInline: true),
EmbedFieldBuilder(name: 'Joined At', value: _formatDateTimeString(event.member.joinedAt), isInline: true),
EmbedFieldBuilder(
name: 'Account created at', value: _formatDateTimeString(event.member.id.timestamp), isInline: true)
]);

channel.sendMessage(MessageBuilder(embeds: [embed]));
Expand Down

0 comments on commit 2d5cdce

Please sign in to comment.