Skip to content

Commit 25552df

Browse files
committed
Improve logout command to show user that was logged out
1 parent 970380c commit 25552df

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

bot.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
SOFTWARE.
2323
'''
2424

25-
__version__ = '1.5.0'
25+
__version__ = '1.5.1'
2626

2727
from contextlib import redirect_stdout
2828
from urllib.parse import urlparse
@@ -387,13 +387,18 @@ async def _logout(self, ctx):
387387
em = discord.Embed(
388388
color=discord.Color.green(),
389389
title='Logged out',
390-
description='Successfully logged out.'
390+
description='No longer logged into '
391391
)
392392

393393
if data['error']:
394394
em.color = discord.Color.red()
395395
em.title = 'Error'
396396
em.description = 'You are not logged in already.'
397+
else:
398+
user = data['user']
399+
em.description += user['username']
400+
em.set_author(name=user['username'], icon_url=user['avatar_url'], url=user['url'])
401+
em.set_thumbnail(url=user['avatar_url'])
397402

398403
await ctx.send(embed=em)
399404

0 commit comments

Comments
 (0)