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() @is_owner()
async def restart(ctx): async def restart(ctx):
"""Restart the Bot""" """Restart the Bot"""
async with ctx.typing(): try:
try: await client.logout()
await ctx.send("**Success Senpai! Bot has been restarted**") except Exception as ex:
except Exception as ex: print(ex)
print(ex) await ctx.send("Error: {}".format(ex))
await ctx.send("Error: {}".format(ex))
await ctx.send("**Success Senpai! Bot has been restarted**")
await client.logout()
@client.command(name='help') @client.command(name='help')

Loading…
Cancel
Save