mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[Reports] Give friendly error if no report channel set (#4136)
This commit is contained in:
parent
297ba8f2b7
commit
a9bd1c60e6
@ -304,9 +304,16 @@ class Reports(commands.Cog):
|
|||||||
|
|
||||||
with contextlib.suppress(discord.Forbidden, discord.HTTPException):
|
with contextlib.suppress(discord.Forbidden, discord.HTTPException):
|
||||||
if val is None:
|
if val is None:
|
||||||
await author.send(
|
if await self.config.guild(ctx.guild).output_channel() is None:
|
||||||
_("There was an error sending your report, please contact a server admin.")
|
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:
|
else:
|
||||||
await author.send(_("Your report was submitted. (Ticket #{})").format(val))
|
await author.send(_("Your report was submitted. (Ticket #{})").format(val))
|
||||||
self.antispam[guild.id][author.id].stamp()
|
self.antispam[guild.id][author.id].stamp()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user