Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Log users that joins guild #75

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

sukaruta
Copy link
Contributor

No description provided.

Comment on lines +291 to +293
.AppendLine($"{Format.Bold("`Mention:`")} <@{user.Id}>")
.AppendLine($"{Format.Bold("`GuildId:`")} {log.GuildId}")
.AppendLine($"{Format.Bold("`IsBot: `")} {user.IsBot}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should also just be fields

Comment on lines +295 to +297
.AddField("AccountCreationDate", user.CreatedAt.ToUniversalTimestamp(), true)
.AddField("JoinDate", log.JoinDate?.ToUniversalTimestamp(), true)
.AddField("FirstJoinDate", log.FirstJoinDate?.ToUniversalTimestamp(), true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add spaces in here

Comment on lines +18 to +23
public DateTimeOffset LogDate { get; set; }
public GuildUserEntity User { get; set; }
public DateTimeOffset? FirstJoinDate { get; set; }
public DateTimeOffset? JoinDate { get; set; }
public ulong GuildId { get; set; }
public ulong UserId { get; set; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should add a blank line in between them for consistency

Comment on lines +14 to +15
FirstJoinDate = user.JoinedAt;
JoinDate = userJoinDate;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The JoinDate can be inferred from the LogDate so the only important thing is the FirstJoinDate

Copy link
Member

@sabihoshi sabihoshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good so far, maybe name the JoinLoggingBehavior to GuildUserBehavior for in the future when leave logs are added, as well as some checking for when members join such as account age, not just logging.

@sabihoshi sabihoshi force-pushed the main branch 2 times, most recently from d018f0c to 7ca34a0 Compare April 23, 2022 11:35
@sabihoshi sabihoshi force-pushed the main branch 15 times, most recently from 2d8b095 to c8f7d9a Compare May 5, 2022 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants