add restart command

This commit is contained in:
Abigail Gold 2019-10-04 13:46:40 -04:00
parent 0d7dc3853c
commit f4f1472e34

View File

@ -21,6 +21,18 @@ class InfoCog(commands.Cog):
embed = embed.add_field(name="License", value=self.gs.info.license) embed = embed.add_field(name="License", value=self.gs.info.license)
await ctx.send(embed=embed) 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): def setup(bot):
bot.add_cog(InfoCog(bot)) bot.add_cog(InfoCog(bot))