mirror of
https://github.com/NoiTheCat/BirthdayBot.git
synced 2024-11-21 21:54:36 +00:00
Remove redundant SyncLock
This commit is contained in:
parent
7c41be45e3
commit
75b625970a
1 changed files with 1 additions and 3 deletions
|
@ -109,6 +109,7 @@ Class BackgroundWorker
|
|||
gs.RoleWarning = True
|
||||
Return 0
|
||||
End If
|
||||
gs.RoleWarning = False
|
||||
End SyncLock
|
||||
|
||||
' Determine who's currently having a birthday
|
||||
|
@ -119,9 +120,6 @@ Class BackgroundWorker
|
|||
Dim announceNames As IEnumerable(Of SocketGuildUser)
|
||||
Try
|
||||
announceNames = Await BirthdayApplyAsync(guild, role, birthdays)
|
||||
SyncLock _bot.KnownGuilds
|
||||
_bot.KnownGuilds(guild.Id).RoleWarning = False
|
||||
End SyncLock
|
||||
Catch ex As Discord.Net.HttpException
|
||||
If ex.HttpCode = HttpStatusCode.Forbidden Then
|
||||
SyncLock _bot.KnownGuilds
|
||||
|
|
Loading…
Reference in a new issue