Improve permission_explanation for prematurely closed Periods

- Periods closed improperly through the 'close' command were not being
shown properly through the 'status' command.
- Fixed error in Submission state checking in on_message handling.
- Added embed support to 'close' command message responses.
This commit is contained in:
Xevion
2021-02-18 08:04:27 -06:00
parent 0ee89fc607
commit 813bb7ea1d
3 changed files with 12 additions and 8 deletions

View File

@@ -210,13 +210,13 @@ class ContestCommandsCog(commands.Cog, name='Contest'):
period: Period = guild.current_period
if period is None or not period.active:
await ctx.send('No period is currently active.')
await ctx.send(embed=helpers.error_embed(message='No period is currently active.'))
else:
overwrite = discord.PermissionOverwrite()
overwrite.send_messages = False
overwrite.add_reactions = False
period.deactivate()
await ctx.send('The current period has been closed.')
await ctx.send(embed=helpers.success_embed(message='The current period has been closed.'))
@commands.command()
@commands.guild_only()