mirror of
				https://github.com/TitanEmbeds/Titan.git
				synced 2025-11-03 23:37:09 +01:00 
			
		
		
		
	Refractor bot start code
This commit is contained in:
		@@ -52,18 +52,6 @@ class Titan(discord.AutoShardedClient):
 | 
			
		||||
        except: # Can be ignored
 | 
			
		||||
            pass     
 | 
			
		||||
    
 | 
			
		||||
    def run(self):
 | 
			
		||||
        try:
 | 
			
		||||
            self.loop.run_until_complete(self.start())
 | 
			
		||||
        except discord.errors.LoginFailure:
 | 
			
		||||
            print("Invalid bot token in config!")
 | 
			
		||||
        finally:
 | 
			
		||||
            try:
 | 
			
		||||
                self._cleanup()
 | 
			
		||||
            except Exception as e:
 | 
			
		||||
                print("Error in cleanup:", e)
 | 
			
		||||
            self.loop.close()
 | 
			
		||||
    
 | 
			
		||||
    async def start(self):
 | 
			
		||||
        await self.redisqueue.connect()
 | 
			
		||||
        await super().start(config["bot-token"])
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user