Improved open voice state check #292_shutdown_procedure
This commit is contained in:
parent
f034413e35
commit
00db6ac10f
@ -259,6 +259,7 @@ class DataIntegrityService:
|
|||||||
self._logger.fatal(__name__, f"Server not found in database: {guild.id}")
|
self._logger.fatal(__name__, f"Server not found in database: {guild.id}")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
# close open voice states
|
||||||
for member in guild.members:
|
for member in guild.members:
|
||||||
if member.bot:
|
if member.bot:
|
||||||
self._logger.trace(__name__, f"User {member.id} is ignored, because its a bot")
|
self._logger.trace(__name__, f"User {member.id} is ignored, because its a bot")
|
||||||
@ -291,7 +292,10 @@ class DataIntegrityService:
|
|||||||
self._users.update_user(user)
|
self._users.update_user(user)
|
||||||
|
|
||||||
self._db_context.save_changes()
|
self._db_context.save_changes()
|
||||||
|
if self._is_for_shutdown:
|
||||||
|
return
|
||||||
|
|
||||||
|
# add open voice states
|
||||||
for member in guild.members:
|
for member in guild.members:
|
||||||
if member.bot:
|
if member.bot:
|
||||||
self._logger.trace(__name__, f"User {member.id} is ignored, because its a bot")
|
self._logger.trace(__name__, f"User {member.id} is ignored, because its a bot")
|
||||||
|
Loading…
Reference in New Issue
Block a user