From 772aa2f7709520581f1cfc3b0033862fce5fbef4 Mon Sep 17 00:00:00 2001 From: Sakimori Date: Mon, 4 Jan 2021 16:17:55 -0500 Subject: [PATCH] deletes tournament setup message, ensures more than 1 team in a tournament --- the_prestige.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/the_prestige.py b/the_prestige.py index 94b48bc..f40eaaa 100644 --- a/the_prestige.py +++ b/the_prestige.py @@ -518,12 +518,20 @@ class StartTournamentCommand(Command): return team_dic[team] = {"wins": 0} + channel = msg.channel + await msg.delete() + + if len(team_dic) < 2: + await msg.channel.send("One team does not a tournament make.") + return + id = random.randint(1111,9999) tourney = leagues.tournament(tourney_name, team_dic, id=id, secs_between_rounds = round_delay * 60) tourney.build_bracket(random_sort = True) - await start_tournament_round(msg.channel, tourney) + + await start_tournament_round(channel, tourney) commands = [