Checking to see if message is sent after bot has logged out

pull/8/head
sgoudham 4 years ago
parent c8e7926650
commit a53d9b0473

@ -175,14 +175,13 @@ async def leave(ctx):
@is_owner()
async def restart(ctx):
"""Restart the Bot"""
async with ctx.typing():
try:
await ctx.send("**Success Senpai! Bot has been restarted**")
except Exception as ex:
print(ex)
await ctx.send("Error: {}".format(ex))
await client.logout()
try:
await client.logout()
except Exception as ex:
print(ex)
await ctx.send("Error: {}".format(ex))
await ctx.send("**Success Senpai! Bot has been restarted**")
@client.command(name='help')

Loading…
Cancel
Save