Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the .gardening profile command. #235

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
4 changes: 2 additions & 2 deletions planttycoon/planttycoon.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,8 @@ async def _profile(self, ctx: commands.Context, *, member: discord.Member = None
await ctx.send("ERROR\nYou blocked me, didn't you?")

em = discord.Embed(color=discord.Color.green()) # , description='\a\n')
avatar = author.avatar_url if author.avatar else author.default_avatar_url
em.set_author(name="Gardening profile of {}".format(author.name), icon_url=avatar)
avatar = author.avatar_url if getattr(author, 'avatar_url', None) else None
em.set_author(name=f"Gardening profile of {author.display_name}", icon_url=avatar)
em.add_field(name="**Thneeds**", value=str(gardener.points))
if gardener.current:
em.set_thumbnail(url=gardener.current["image"])
Expand Down
Loading