diff options
| author | 2019-12-09 21:45:02 +0100 | |
|---|---|---|
| committer | 2019-12-09 21:45:02 +0100 | |
| commit | 5a732586b775b54d282bb9470795ca64a477fb4c (patch) | |
| tree | ebbc58fa84b56be0850745117dea4ac7fc6c8a34 /bot | |
| parent | lint test change (diff) | |
Fix indentation
The bookmark method's function signature is reformatted,
bookmark image url is reduced to a single line,
and the embed's description is broken into separate lines.
Diffstat (limited to 'bot')
| -rw-r--r-- | bot/seasons/evergreen/bookmark.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/bot/seasons/evergreen/bookmark.py b/bot/seasons/evergreen/bookmark.py index 52d2d362..c8b53f71 100644 --- a/bot/seasons/evergreen/bookmark.py +++ b/bot/seasons/evergreen/bookmark.py @@ -16,20 +16,25 @@ class Bookmark(commands.Cog): self.bot = bot
@commands.command(name="bookmark", aliases=("bm", "pin"))
- async def bookmark(self, ctx: commands.Context,
- target_message: discord.Message, *,
- title: str = None) -> None:
+ async def bookmark(
+ self,
+ ctx: commands.Context,
+ target_message: discord.Message,
+ *, title: str = None
+ ) -> None:
"""Send you a link to the provided message in DM."""
log.info(f"{ctx.author} bookmarked {target_message.jump_url} with title {title}.")
-
embed = discord.Embed(
title=title,
colour=Colours.soft_green,
- description=f"{target_message.content} \n\n[Give it a visit.]({target_message.jump_url})"
+ description=(
+ f"{target_message.content}\n\n"
+ f"[Give it a visit.]({target_message.jump_url})"
+ )
)
embed.set_author(name=target_message.author, icon_url=target_message.author.avatar_url)
- embed.set_thumbnail(url="https://img.icons8.com/color/48/FF3333/"
- "bookmark-ribbon.png")
+ embed.set_thumbnail(url="https://img.icons8.com/color/48/FF3333/bookmark-ribbon.png")
+
try:
await ctx.author.send(embed=embed)
except discord.Forbidden:
|