fix(art): fixed artset list erroring if configs aren't set

This commit is contained in:
Seaswimmer 2023-12-28 10:03:18 -05:00
parent 48cd63c5d4
commit 13032fe184
Signed by untrusted user: cswimr
GPG key ID: 1EBC234EEDA901AE

View file

@ -65,4 +65,12 @@ class Art(commands.Cog):
"""List all settings."""
art_channel = ctx.guild.get_channel(await self.config.guild(ctx.guild).art_channel())
art_submission_channel = ctx.guild.get_channel(await self.config.guild(ctx.guild).art_submission_channel())
if art_channel:
response_str = f"Art channel: {art_channel.mention}\n"
else:
response_str = "Art channel not set.\n"
if art_submission_channel:
response_str += f"Art submission channel: {art_submission_channel.mention}"
else:
response_str += "Art submission channel not set."
await ctx.send(f"Art channel: {art_channel.mention}\nArt submission channel: {art_submission_channel.mention}")