Remove redundant SyncLock

This commit is contained in:
Noikoio 2019-05-03 12:49:09 -07:00
parent 7c41be45e3
commit 75b625970a

View file

@ -109,6 +109,7 @@ Class BackgroundWorker
gs.RoleWarning = True gs.RoleWarning = True
Return 0 Return 0
End If End If
gs.RoleWarning = False
End SyncLock End SyncLock
' Determine who's currently having a birthday ' Determine who's currently having a birthday
@ -119,9 +120,6 @@ Class BackgroundWorker
Dim announceNames As IEnumerable(Of SocketGuildUser) Dim announceNames As IEnumerable(Of SocketGuildUser)
Try Try
announceNames = Await BirthdayApplyAsync(guild, role, birthdays) announceNames = Await BirthdayApplyAsync(guild, role, birthdays)
SyncLock _bot.KnownGuilds
_bot.KnownGuilds(guild.Id).RoleWarning = False
End SyncLock
Catch ex As Discord.Net.HttpException Catch ex As Discord.Net.HttpException
If ex.HttpCode = HttpStatusCode.Forbidden Then If ex.HttpCode = HttpStatusCode.Forbidden Then
SyncLock _bot.KnownGuilds SyncLock _bot.KnownGuilds