예제 #1
0
 public UserLeftAuditData(int memberCount, bool isBan, string banReason, AuditUserInfo user)
 {
     MemberCount = memberCount;
     IsBan       = isBan;
     BanReason   = banReason;
     User        = user;
 }
예제 #2
0
 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));
     }
 }
예제 #3
0
        public static IAuditLogData Create(IAuditLogData entryData)
        {
            if (entryData is not BotAddAuditLogData data)
            {
                return(null);
            }

            return(new AuditBotAdded()
            {
                Bot = AuditUserInfo.Create(data.Target)
            });
        }
예제 #4
0
 public UserLeftAuditData(int memberCount, bool isBan, string banReason, IUser user) :
     this(memberCount, isBan, banReason, AuditUserInfo.Create(user))
 {
 }
예제 #5
0
 public MessageDeletedAuditData(ulong channelId, bool isInCache, AuditUserInfo author, DateTime createdAt, string content) : this(channelId, isInCache)
 {
     Author    = author;
     CreatedAt = createdAt;
     Content   = content;
 }