From a6b2f0d5d9a5580d3880d9fac368cb6a937c987b Mon Sep 17 00:00:00 2001 From: ddorn Date: Sun, 26 Apr 2020 01:50:06 +0200 Subject: [PATCH] :bug: --- tfjm-discord-bot.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tfjm-discord-bot.py b/tfjm-discord-bot.py index 5842353..45dfa8e 100644 --- a/tfjm-discord-bot.py +++ b/tfjm-discord-bot.py @@ -1,17 +1,15 @@ #!/bin/python -import enum import os +import random import sys import traceback from collections import defaultdict from operator import attrgetter from time import sleep -from typing import List, Dict +from typing import Dict import discord from discord.ext import commands -import random - from discord.ext.commands import Context from discord.utils import get @@ -143,6 +141,8 @@ class Phase: pass async def next(self, ctx: Context) -> "Phase": + if self.NEXT is None: + return None return self.NEXT(self.tirage) @@ -236,7 +236,7 @@ class TiragePhase(Phase): if team.drawn_problem: await ctx.send( - "Vous avez déjà tiré in problème, merci de l'accepter (`!yes`) " + "Vous avez déjà tiré un problème, merci de l'accepter (`!yes`) " "ou de le refuser (`!no)`." ) elif not self.available(problem):