aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar kwzrd <[email protected]>2019-12-09 21:55:02 +0100
committerGravatar kwzrd <[email protected]>2019-12-09 21:55:02 +0100
commite123f41a3e49558ffbfc944db86e23fc659b468a (patch)
treeb9ecc378f2f56468b9d20c6e1604bfb148f291ce
parentFix indentation (diff)
Improve wording of log and response messages
Improves the wording of both docstrings, strips trailing dot from log and response messages for consistency. Refactors the error embed and renames the variable.
-rw-r--r--bot/seasons/evergreen/bookmark.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/bot/seasons/evergreen/bookmark.py b/bot/seasons/evergreen/bookmark.py
index c8b53f71..d64c0068 100644
--- a/bot/seasons/evergreen/bookmark.py
+++ b/bot/seasons/evergreen/bookmark.py
@@ -22,8 +22,8 @@ class Bookmark(commands.Cog):
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}.")
+ """Send the author a link to `target_message` via DMs."""
+ log.info(f"{ctx.author} bookmarked {target_message.jump_url} with title {title}")
embed = discord.Embed(
title=title,
colour=Colours.soft_green,
@@ -38,17 +38,17 @@ class Bookmark(commands.Cog):
try:
await ctx.author.send(embed=embed)
except discord.Forbidden:
- embed_error = discord.Embed(
+ error_embed = discord.Embed(
title=random.choice(ERROR_REPLIES),
- description="You have to enable direct messages from this server to receive DMs from me.",
+ description=f"{ctx.author.mention}, please enable your DMs to receive the bookmark",
colour=Colours.soft_red
)
- await ctx.send(embed=embed_error)
+ await ctx.send(embed=error_embed)
return
- await ctx.send("Bookmark sent to your DM.")
+ await ctx.send("Bookmark sent to your DM")
def setup(bot: commands.Bot) -> None:
- """Bookmark Cog load."""
+ """Load the Bookmark cog."""
bot.add_cog(Bookmark(bot))
log.info("Bookmark cog loaded")