aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Numerlor <[email protected]>2020-12-12 04:34:05 +0100
committerGravatar Numerlor <[email protected]>2021-01-09 20:10:53 +0100
commitf416e42efce74082d155d9159114f698a97305cb (patch)
tree735d75a83101df8b9661803487ffff4add865c36
parentMove copyright outside of license text (diff)
Return the sent message
This allows the caller to work with the message further
-rw-r--r--bot/utils/messages.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/utils/messages.py b/bot/utils/messages.py
index 42bde358d..c42e4bacc 100644
--- a/bot/utils/messages.py
+++ b/bot/utils/messages.py
@@ -135,14 +135,14 @@ def sub_clyde(username: Optional[str]) -> Optional[str]:
return username # Empty string or None
-async def send_denial(ctx: Context, reason: str) -> None:
+async def send_denial(ctx: Context, reason: str) -> discord.Message:
"""Send an embed denying the user with the given reason."""
embed = discord.Embed()
embed.colour = discord.Colour.red()
embed.title = random.choice(NEGATIVE_REPLIES)
embed.description = reason
- await ctx.send(embed=embed)
+ return await ctx.send(embed=embed)
def format_user(user: discord.abc.User) -> str: