Finish the addrole/removerole commands and surrounding functionality #24

Merged
cswimr merged 22 commits from addrole into main 2024-05-03 21:46:14 -04:00
Showing only changes of commit 1a74ce9130 - Show all commits

View file

@ -1610,7 +1610,9 @@ class Aurora(commands.Cog):
current_time = time.time()
database = connect()
cursor = database.cursor()
global_num = 0
global_unban_num = 0
global_addrole_num = 0
global_removerole_num = 0
guilds: list[discord.Guild] = self.bot.guilds
for guild in guilds:
@ -1756,7 +1758,9 @@ class Aurora(commands.Cog):
addrole_num,
removerole_num,
)
global_num = global_num + unban_num + addrole_num + removerole_num
global_unban_num = global_unban_num + unban_num
global_addrole_num = global_addrole_num + addrole_num
global_removerole_num = global_removerole_num + removerole_num
database.commit()
cursor.close()
@ -1766,7 +1770,9 @@ class Aurora(commands.Cog):
logger.debug(
"Completed expiry loop in %sms with %s users unbanned, %s roles added, and %s roles removed",
f"{completion_time:.6f}",
global_num,
global_unban_num,
global_addrole_num,
global_removerole_num,
)
########################################################################################################################