mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-12 21:27:22 +01:00
fix bug
This commit is contained in:
parent
98ed5cb472
commit
698890f991
1 changed files with 9 additions and 5 deletions
|
|
@ -270,12 +270,16 @@ internal class DiscordBot : IHostedService
|
|||
foreach (var user in userList)
|
||||
{
|
||||
if (registeredUsers.Contains(user.Id))
|
||||
await _botServices.AddRegisteredRoleAsync(user, registrationRole).ConfigureAwait(false);
|
||||
|
||||
if (kickUnregistered)
|
||||
{
|
||||
if ((executionStartTime - user.JoinedAt.Value).TotalDays > 7)
|
||||
await _botServices.KickUserAsync(user).ConfigureAwait(false);
|
||||
await _botServices.AddRegisteredRoleAsync(user, registrationRole).ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (kickUnregistered)
|
||||
{
|
||||
if ((executionStartTime - user.JoinedAt.Value).TotalDays > 7)
|
||||
await _botServices.KickUserAsync(user).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
token.ThrowIfCancellationRequested();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue