mirror of
				https://github.com/TitanEmbeds/Titan.git
				synced 2025-11-04 07:47:10 +01:00 
			
		
		
		
	Put all guilds in a list before going thru it
This commit is contained in:
		@@ -91,8 +91,11 @@ class Titan(discord.AutoShardedClient):
 | 
				
			|||||||
    async def start_cleanup(self):
 | 
					    async def start_cleanup(self):
 | 
				
			||||||
        with self.database.get_session() as session:
 | 
					        with self.database.get_session() as session:
 | 
				
			||||||
            guilds = session.query(Guilds).all()
 | 
					            guilds = session.query(Guilds).all()
 | 
				
			||||||
 | 
					            guilds_new = []
 | 
				
			||||||
            count = 0
 | 
					            count = 0
 | 
				
			||||||
            for guild in guilds:
 | 
					            for guild in guilds:
 | 
				
			||||||
 | 
					                guilds_new.append(guild)
 | 
				
			||||||
 | 
					            for guild in guilds_new:
 | 
				
			||||||
                count += 1
 | 
					                count += 1
 | 
				
			||||||
                self.logger.info("[{}] snowflake-{} name-{}".format(count, guild.guild_id, guild.name))
 | 
					                self.logger.info("[{}] snowflake-{} name-{}".format(count, guild.guild_id, guild.name))
 | 
				
			||||||
                try:
 | 
					                try:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user