aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Den4200 <[email protected]>2021-03-30 16:06:23 -0400
committerGravatar Den4200 <[email protected]>2021-03-30 16:07:02 -0400
commit2334c95d8781df829ac2ec1a1c5abb2b4d776586 (patch)
tree8ef721777dca8cf2763f26ee90cd3aec243dbc93
parentReplace usage of `textwrap.dedent` with a cleaner method. (diff)
Gracefully handle failure to upload to hastebin in `!dmrelay`.
-rw-r--r--bot/exts/moderation/dm_relay.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bot/exts/moderation/dm_relay.py b/bot/exts/moderation/dm_relay.py
index 68a48c67c..1d2206e27 100644
--- a/bot/exts/moderation/dm_relay.py
+++ b/bot/exts/moderation/dm_relay.py
@@ -55,6 +55,11 @@ class DMRelay(Cog):
)
paste_link = await send_to_paste_service(metadata + output, extension="txt")
+
+ if paste_link is None:
+ await ctx.send(f"{Emojis.cross_mark} Failed to upload output to hastebin.")
+ return
+
await ctx.send(paste_link)
async def cog_check(self, ctx: Context) -> bool: