Пример #1
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));
     }
 }
Пример #2
0
        public static IAuditLogData Create(IAuditLogData entryData)
        {
            if (entryData is not BotAddAuditLogData data)
            {
                return(null);
            }

            return(new AuditBotAdded()
            {
                Bot = AuditUserInfo.Create(data.Target)
            });
        }
Пример #3
0
 public UserLeftAuditData(int memberCount, bool isBan, string banReason, IUser user) :
     this(memberCount, isBan, banReason, AuditUserInfo.Create(user))
 {
 }