コード例 #1
0
ファイル: scheduling.py プロジェクト: Sanketh7/contest-bot
    async def handle_end_contest(self):
        contest: Contest = DB.get_current_contest()
        # assert(contest and contest.should_end)

        try:
            msg = await Settings.sign_up_channel.fetch_message(contest.post_id)
            await msg.delete()
        except Exception as e:
            logging.error(
                "Failed to delete post for contest {}\n".format(contest.id) +
                str(e))

        DB.end_current_contest()