Split if statement for more clarity
This commit is contained in:
parent
3a94de9f23
commit
c34a396c78
1 changed files with 24 additions and 18 deletions
|
@ -76,9 +76,15 @@ internal static class EventHandler
|
|||
return;
|
||||
}
|
||||
|
||||
// Sends a DM to the assigned staff member if at least a day has gone by since the last message and the user sending the message isn't staff
|
||||
// Ignore staff messages
|
||||
if (Database.IsStaff(e.Author.Id))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Sends a DM to the assigned staff member if at least a day has gone by since the last message
|
||||
IReadOnlyList<DiscordMessage> messages = await e.Channel.GetMessagesAsync(2);
|
||||
if (messages.Count > 1 && messages[1].Timestamp < DateTimeOffset.UtcNow.AddDays(Config.ticketUpdatedNotificationDelay * -1) && !Database.IsStaff(e.Author.Id))
|
||||
if (messages.Count > 1 && messages[1].Timestamp < DateTimeOffset.UtcNow.AddDays(Config.ticketUpdatedNotificationDelay * -1))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue