public static MessageDeletedAuditData Create(IChannel channel, IMessage message = null) { if (message == null) { return(new MessageDeletedAuditData(channel.Id, false)); } else { return(new MessageDeletedAuditData(channel.Id, true, AuditUserInfo.Create(message.Author), message.CreatedAt.LocalDateTime, message.Content)); } }
public static IAuditLogData Create(IAuditLogData entryData) { if (entryData is not BotAddAuditLogData data) { return(null); } return(new AuditBotAdded() { Bot = AuditUserInfo.Create(data.Target) }); }
public UserLeftAuditData(int memberCount, bool isBan, string banReason, IUser user) : this(memberCount, isBan, banReason, AuditUserInfo.Create(user)) { }