From 574dabbeace457de4a19b3038c31a9cfd9d058f3 Mon Sep 17 00:00:00 2001 From: Dav Date: Thu, 6 Aug 2020 19:12:05 +0000 Subject: [PATCH] [Reports] Give friendly error if no report channel set (#4136) --- redbot/cogs/reports/reports.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/redbot/cogs/reports/reports.py b/redbot/cogs/reports/reports.py index 8ced825f1..1e91b0298 100644 --- a/redbot/cogs/reports/reports.py +++ b/redbot/cogs/reports/reports.py @@ -271,9 +271,16 @@ class Reports(commands.Cog): with contextlib.suppress(discord.Forbidden, discord.HTTPException): if val is None: - await author.send( - _("There was an error sending your report, please contact a server admin.") - ) + if await self.config.guild(ctx.guild).output_channel() is None: + await author.send( + _( + "This server has no reports channel set up. Please contact a server admin." + ) + ) + else: + await author.send( + _("There was an error sending your report, please contact a server admin.") + ) else: await author.send(_("Your report was submitted. (Ticket #{})").format(val)) self.antispam[guild.id][author.id].stamp()