mirror of
				https://github.com/miaowware/qrm2.git
				synced 2025-10-31 11:20:19 -04:00 
			
		
		
		
	add restart command
This commit is contained in:
		
							parent
							
								
									0d7dc3853c
								
							
						
					
					
						commit
						f4f1472e34
					
				| @ -21,6 +21,18 @@ class InfoCog(commands.Cog): | ||||
|         embed = embed.add_field(name="License", value=self.gs.info.license) | ||||
|         await ctx.send(embed=embed) | ||||
| 
 | ||||
|     @commands.command(name="restart") | ||||
|     async def _restart_bot(self, ctx): | ||||
|         """Restarts the bot.""" | ||||
|         if ctx.author.id in self.gs.opt.owners_uids: | ||||
|             await ctx.message.add_reaction("✅") | ||||
|             await self.bot.logout() | ||||
|         else: | ||||
|             try: | ||||
|                 await ctx.message.add_reaction("❌") | ||||
|             except: | ||||
|                 return | ||||
| 
 | ||||
| 
 | ||||
| def setup(bot): | ||||
|     bot.add_cog(InfoCog(bot)) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user